feat: add support for debit notes in credit note forms and related components
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
This commit is contained in:
parent
7679c076a7
commit
2b310c667d
7 changed files with 40 additions and 7 deletions
|
|
@ -36,7 +36,7 @@ withDefaults(
|
|||
<span
|
||||
:class="{ 'link cursor-pointer': clickable }"
|
||||
v-if="typeof value === 'string'"
|
||||
@click="$emit('labelClick', value, null)"
|
||||
@click="clickable ? $emit('labelClick', value, null) : undefined"
|
||||
>
|
||||
{{ value }}
|
||||
<q-tooltip v-if="tooltip" :delay="500">{{ value }}</q-tooltip>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ defineProps<{
|
|||
const quotationId = defineModel<string>('quotationId', {
|
||||
required: true,
|
||||
});
|
||||
const isDebitNote = defineModel<boolean>('isDebitNote', {
|
||||
required: false,
|
||||
default: false,
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="row col-12">
|
||||
|
|
@ -37,6 +41,7 @@ const quotationId = defineModel<string>('quotationId', {
|
|||
cancelIncludeDebitNote: true,
|
||||
hasCancel: true,
|
||||
}"
|
||||
@selected="(v) => (isDebitNote = v.isDebitNote)"
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ const { getQuotationList: getList, getQuotation: getById } = useStore();
|
|||
|
||||
defineEmits<{
|
||||
(e: 'create'): void;
|
||||
(e: 'selected', value: SelectOption): void;
|
||||
}>();
|
||||
|
||||
type ExclusiveProps = {
|
||||
|
|
@ -117,6 +118,14 @@ function setDefaultValue() {
|
|||
(v: string) => !props.required || !!v || $t('form.error.required'),
|
||||
]"
|
||||
@filter="filter"
|
||||
@update:model-value="
|
||||
(v) => {
|
||||
$emit(
|
||||
'selected',
|
||||
selectOptions.find((opt) => opt.id === v),
|
||||
);
|
||||
}
|
||||
"
|
||||
>
|
||||
<template #append v-if="clearable">
|
||||
<q-icon
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue