refactor: kebab link, upload
This commit is contained in:
parent
cfbc1866f7
commit
bea936a7a0
1 changed files with 48 additions and 0 deletions
|
|
@ -9,6 +9,9 @@ const props = withDefaults(
|
||||||
idName: string;
|
idName: string;
|
||||||
status: string;
|
status: string;
|
||||||
hideToggle?: boolean;
|
hideToggle?: boolean;
|
||||||
|
useLink?: boolean;
|
||||||
|
useUpload?: boolean;
|
||||||
|
|
||||||
disableDelete?: boolean;
|
disableDelete?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
|
|
@ -20,6 +23,8 @@ const props = withDefaults(
|
||||||
defineEmits<{
|
defineEmits<{
|
||||||
(e: 'view'): void;
|
(e: 'view'): void;
|
||||||
(e: 'edit'): void;
|
(e: 'edit'): void;
|
||||||
|
(e: 'link'): void;
|
||||||
|
(e: 'upload'): void;
|
||||||
(e: 'delete'): void;
|
(e: 'delete'): void;
|
||||||
(e: 'changeStatus'): void;
|
(e: 'changeStatus'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
@ -87,6 +92,49 @@ watch(
|
||||||
{{ $t('general.edit') }}
|
{{ $t('general.edit') }}
|
||||||
</span>
|
</span>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
|
<q-item
|
||||||
|
v-if="status !== 'INACTIVE' && useLink"
|
||||||
|
v-close-popup
|
||||||
|
dense
|
||||||
|
clickable
|
||||||
|
class="row q-py-sm"
|
||||||
|
style="white-space: nowrap"
|
||||||
|
:id="`btn-kebab-edit-${idName}`"
|
||||||
|
@click.stop="() => $emit('link')"
|
||||||
|
>
|
||||||
|
<q-icon
|
||||||
|
size="xs"
|
||||||
|
class="col-3"
|
||||||
|
name="mdi-link-variant"
|
||||||
|
style="color: hsl(var(--yellow-6-hsl))"
|
||||||
|
/>
|
||||||
|
<span class="col-9 q-px-md flex items-center">
|
||||||
|
{{ $t('general.add', { text: $t('quotation.receipt') }) }}
|
||||||
|
</span>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
|
<q-item
|
||||||
|
v-if="status !== 'INACTIVE' && useUpload"
|
||||||
|
v-close-popup
|
||||||
|
dense
|
||||||
|
clickable
|
||||||
|
class="row q-py-sm"
|
||||||
|
style="white-space: nowrap"
|
||||||
|
:id="`btn-kebab-edit-${idName}`"
|
||||||
|
@click.stop="() => $emit('upload')"
|
||||||
|
>
|
||||||
|
<q-icon
|
||||||
|
size="xs"
|
||||||
|
class="col-3"
|
||||||
|
name="mdi-upload"
|
||||||
|
style="color: hsl(var(--blue-10-hsl))"
|
||||||
|
/>
|
||||||
|
<span class="col-9 q-px-md flex items-center">
|
||||||
|
{{ $t('general.upload', { msg: $t('general.attachment') }) }}
|
||||||
|
</span>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-if="status !== 'INACTIVE'"
|
v-if="status !== 'INACTIVE'"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue