fix: fix quotation customer branch id when create new employee
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s

This commit is contained in:
puriphatt 2025-07-15 11:57:15 +07:00
parent ad715b20a2
commit 8ef2ca2e96
3 changed files with 13 additions and 4 deletions

View file

@ -54,6 +54,7 @@ defineProps<{
employeeOwnerOption?: CustomerBranch[]; employeeOwnerOption?: CustomerBranch[];
prefixId: string; prefixId: string;
showBtnSave?: boolean; showBtnSave?: boolean;
disableCustomerSelect?: boolean;
}>(); }>();
defineEmits<{ defineEmits<{
@ -117,12 +118,16 @@ defineEmits<{
<div class="col-12 row" style="gap: var(--size-2)"> <div class="col-12 row" style="gap: var(--size-2)">
<SelectCustomer <SelectCustomer
id="form-select-customer-branch-id"
for="form-select-customer-branch-id"
v-model:value="customerBranchId" v-model:value="customerBranchId"
v-model:value-option="currentCustomerBranch" v-model:value-option="currentCustomerBranch"
:label="$t('customer.form.branchCode')" :label="$t('customer.form.branchCode')"
class="col-12 field-two" class="col-12 field-two"
simple
required required
:readonly :readonly
:disabled="disableCustomerSelect"
/> />
<q-input <q-input

View file

@ -68,6 +68,8 @@ defineEmits<{
:readonly :readonly
/> />
<SelectCustomer <SelectCustomer
id="about-select-customer-branch-id"
for="about-select-customer-branch-id"
v-model:value="customerBranchId" v-model:value="customerBranchId"
:label="$t('quotation.customer')" :label="$t('quotation.customer')"
:creatable-disabled-text="`(${$t('form.error.selectField', { :creatable-disabled-text="`(${$t('form.error.selectField', {
@ -88,14 +90,14 @@ defineEmits<{
<style scoped> <style scoped>
:deep( :deep(
label.q-field.row.no-wrap.items-start.q-field--outlined.q-select.field-one label.q-field.row.no-wrap.items-start.q-field--outlined.q-select.field-one
) { ) {
padding-right: 4px; padding-right: 4px;
} }
:deep( :deep(
label.q-field.row.no-wrap.items-start.q-field--outlined.q-select.field-two label.q-field.row.no-wrap.items-start.q-field--outlined.q-select.field-two
) { ) {
padding-left: 4px; padding-left: 4px;
} }
</style> </style>

View file

@ -663,6 +663,7 @@ watch(
:show=" :show="
() => { () => {
employeeFormStore.resetFormDataEmployee(true); employeeFormStore.resetFormDataEmployee(true);
setCurrentBranchId();
} }
" "
:before-close=" :before-close="
@ -1035,6 +1036,7 @@ watch(
</div> </div>
<BasicInformation <BasicInformation
disable-customer-select
no-action no-action
id="form-information" id="form-information"
prefix-id="form-employee" prefix-id="form-employee"