refactor: header can't edit customer is INACTIVE
This commit is contained in:
parent
7bf30ab0a4
commit
850289f23d
3 changed files with 37 additions and 18 deletions
|
|
@ -21,14 +21,20 @@ import {
|
|||
DeleteButton,
|
||||
UndoButton,
|
||||
} from 'components/button';
|
||||
defineProps<{
|
||||
prefixId?: string;
|
||||
outlined?: boolean;
|
||||
readonly?: boolean;
|
||||
create?: boolean;
|
||||
actionDisabled?: boolean;
|
||||
customerType?: 'CORP' | 'PERS';
|
||||
}>();
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
prefixId?: string;
|
||||
outlined?: boolean;
|
||||
readonly?: boolean;
|
||||
create?: boolean;
|
||||
actionDisabled?: boolean;
|
||||
customerType?: 'CORP' | 'PERS';
|
||||
hideAction?: boolean;
|
||||
}>(),
|
||||
{
|
||||
hideAction: false,
|
||||
},
|
||||
);
|
||||
defineEmits<{
|
||||
(e: 'save'): void;
|
||||
(e: 'edit'): void;
|
||||
|
|
@ -144,7 +150,10 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
|
|||
|
||||
<template>
|
||||
<div class="row q-col-gutter-sm q-mb-sm">
|
||||
<div class="col-12 text-weight-bold text-body1 row items-center">
|
||||
<div
|
||||
v-if="!hideAction"
|
||||
class="col-12 text-weight-bold text-body1 row items-center"
|
||||
>
|
||||
<q-icon
|
||||
flat
|
||||
size="xs"
|
||||
|
|
|
|||
|
|
@ -40,14 +40,20 @@ defineEmits<{
|
|||
(e: 'delete'): void;
|
||||
}>();
|
||||
|
||||
defineProps<{
|
||||
index: number;
|
||||
customerName: string;
|
||||
readonly?: boolean;
|
||||
prefixId?: string;
|
||||
actionDisabled?: boolean;
|
||||
customerType?: 'CORP' | 'PERS';
|
||||
}>();
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
index: number;
|
||||
customerName: string;
|
||||
readonly?: boolean;
|
||||
prefixId?: string;
|
||||
actionDisabled?: boolean;
|
||||
customerType?: 'CORP' | 'PERS';
|
||||
hideAction?: boolean;
|
||||
}>(),
|
||||
{
|
||||
hideAction: false,
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -55,6 +61,7 @@ defineProps<{
|
|||
class="col-12 text-weight-bold row items-center q-mb-sm"
|
||||
:style="{ opacity: actionDisabled ? '.5' : undefined }"
|
||||
:id="`form-branch-customer-no-${index}`"
|
||||
v-if="!hideAction"
|
||||
>
|
||||
{{
|
||||
index === 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue