refactor: handle action edit
This commit is contained in:
parent
936fd7ebdd
commit
c8be545ef8
3 changed files with 5 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ const props = withDefaults(
|
||||||
columns: QTableProps['columns'];
|
columns: QTableProps['columns'];
|
||||||
grid?: boolean;
|
grid?: boolean;
|
||||||
visibleColumns?: string[];
|
visibleColumns?: string[];
|
||||||
|
hideEdit?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
row: () => [],
|
row: () => [],
|
||||||
|
|
@ -151,6 +152,7 @@ defineEmits<{
|
||||||
:idName="`btn-kebab-${props.row.firstName}`"
|
:idName="`btn-kebab-${props.row.firstName}`"
|
||||||
status="'ACTIVE'"
|
status="'ACTIVE'"
|
||||||
hide-toggle
|
hide-toggle
|
||||||
|
:hide-edit="hideEdit"
|
||||||
@view="$emit('view', props.row)"
|
@view="$emit('view', props.row)"
|
||||||
@edit="$emit('edit', props.row)"
|
@edit="$emit('edit', props.row)"
|
||||||
@delete="$emit('delete', props.row.id)"
|
@delete="$emit('delete', props.row.id)"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ const props = withDefaults(
|
||||||
hideToggle?: boolean;
|
hideToggle?: boolean;
|
||||||
useLink?: boolean;
|
useLink?: boolean;
|
||||||
useUpload?: boolean;
|
useUpload?: boolean;
|
||||||
|
hideEdit?: boolean;
|
||||||
|
|
||||||
disableDelete?: boolean;
|
disableDelete?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
|
|
@ -73,7 +74,7 @@ watch(
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-if="status !== 'INACTIVE'"
|
v-if="status !== 'INACTIVE' && !hideEdit"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
dense
|
dense
|
||||||
clickable
|
clickable
|
||||||
|
|
|
||||||
|
|
@ -621,6 +621,7 @@ async function storeDataLocal(id: string) {
|
||||||
:rows="quotationData"
|
:rows="quotationData"
|
||||||
:visible-columns="pageState.fieldSelected"
|
:visible-columns="pageState.fieldSelected"
|
||||||
:grid="pageState.gridView"
|
:grid="pageState.gridView"
|
||||||
|
:hide-edit="pageState.currentTab !== 'Issued'"
|
||||||
@preview="(id: any) => storeDataLocal(id)"
|
@preview="(id: any) => storeDataLocal(id)"
|
||||||
@view="
|
@view="
|
||||||
(item) => {
|
(item) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue