Merge branch 'develop'

This commit is contained in:
Methapon Metanipat 2024-09-27 14:42:04 +07:00
commit 7b92765f6a
10 changed files with 137 additions and 102 deletions

View file

@ -1747,7 +1747,7 @@
"value": "fee" "value": "fee"
}, },
{ {
"label": "ค่าดำเนินการ", "label": "ค่าดำเนินงาน",
"value": "processingFee" "value": "processingFee"
} }
] ]

View file

@ -9,6 +9,9 @@ import {
SaveButton, SaveButton,
UndoButton, UndoButton,
} from 'components/button'; } from 'components/button';
import { useI18n } from 'vue-i18n';
const { locale } = useI18n();
const optionsBranch = defineModel<{ id: string; name: string }[]>( const optionsBranch = defineModel<{ id: string; name: string }[]>(
'optionsBranch', 'optionsBranch',
@ -29,7 +32,7 @@ const customerBranch = defineModel<{
const nrcNo = defineModel<string>('nrcNo'); const nrcNo = defineModel<string>('nrcNo');
const code = defineModel<string>('code'); const code = defineModel<string>('code');
defineProps<{ const props = defineProps<{
noAction?: boolean; noAction?: boolean;
title?: string; title?: string;
dense?: boolean; dense?: boolean;
@ -56,6 +59,31 @@ let branchFilter: (
update: (callbackFn: () => void, afterFn?: (ref: QSelect) => void) => void, update: (callbackFn: () => void, afterFn?: (ref: QSelect) => void) => void,
) => void; ) => void;
function listBranch(customerCode: string) {
if (!props.employeeOwnerOption) return '';
const groupedLists: { [key: string]: CustomerBranch } =
props.employeeOwnerOption.reduce((acc, item) => {
const code = item.codeCustomer;
if (!acc[code]) {
acc[code] = [];
}
acc[code].push(item);
return acc;
}, {});
const list: CustomerBranch[] = groupedLists[customerCode];
const names = list.map((v) => {
return v.customer.customerType === 'CORP'
? locale.value === 'eng'
? v.registerNameEN
: v.registerName
: locale.value === 'eng'
? `${v.firstNameEN} ${v.lastNameEN}`
: `${v.firstName} ${v.lastName}`;
});
return names.join(' / ');
}
watch( watch(
() => optionsBranch.value, () => optionsBranch.value,
() => { () => {
@ -160,8 +188,6 @@ onMounted(() => {
]" ]"
> >
<template v-slot:option="scope"> <template v-slot:option="scope">
<!-- {{ console.log(scope.opt) }} -->
<q-item <q-item
v-if="scope.opt" v-if="scope.opt"
v-bind="scope.itemProps" v-bind="scope.itemProps"
@ -173,7 +199,12 @@ onMounted(() => {
<div class="q-mt-sm"> <div class="q-mt-sm">
<div> <div>
<span v-if="scope.opt.customer.customerType"> <span v-if="scope.opt.customer.customerType">
{{ `${scope.opt.code} ${$t('general.name')}` }}: {{ scope.opt.code }}
{{
scope.opt.customer.customerType === 'CORP'
? $t('customer.form.registerName')
: $t('customer.form.ownerName')
}}:
{{ {{
scope.opt.customer.customerType === 'CORP' scope.opt.customer.customerType === 'CORP'
? scope.opt.customerName ? scope.opt.customerName
@ -187,24 +218,15 @@ onMounted(() => {
<div class="text-caption app-text-muted-2 q-mb-xs"> <div class="text-caption app-text-muted-2 q-mb-xs">
<span v-if="scope.opt.customer" class="col column"> <span v-if="scope.opt.customer" class="col column">
{{ $t('customerEmployee.form.employerSelect.branchName') }}: {{ $t('customerBranch.form.title') }}:
{{ {{ listBranch(scope.opt.codeCustomer) }}
scope.opt.customer.customerType === 'CORP'
? $i18n.locale === 'eng'
? scope.opt.registerNameEN
: scope.opt.registerName
: $i18n.locale === 'eng'
? `${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` ||
'-'
: `${scope.opt.firstName} ${scope.opt.lastName}` || '-'
}}
</span> </span>
<span v-if="scope.opt.province" class="col"> <span v-if="scope.opt.province" class="col">
{{ $t('general.address') }} {{ $t('general.address') }}
{{ {{
$i18n.locale === 'eng' $i18n.locale === 'eng'
? `${scope.opt.addressEN || ''}, ${scope.opt.mooEN && `${$t('form.moo')} ${scope.opt.mooEN},`} ${scope.opt.soiEN && `${$t('form.soi')} ${scope.opt.soiEN},`} ${scope.opt.streetEN && `${scope.opt.streetEN} Rd,`} ${scope.opt.subDistrict.nameEN || ''}, ${scope.opt.district.nameEN || ''}, ${scope.opt.province.nameEN || ''}` ? `${scope.opt.addressEN || ''}, ${scope.opt.mooEN && `${$t('form.moo')} ${scope.opt.mooEN},`} ${scope.opt.soiEN && `${$t('form.soi')} ${scope.opt.soiEN},`} ${scope.opt.streetEN && `${scope.opt.streetEN} Rd,`} ${scope.opt.subDistrict.nameEN || ''}, ${scope.opt.district.nameEN || ''}, ${scope.opt.province.nameEN || ''}`
: `${scope.opt.address || ''}, ${scope.opt.moo && `${$t('form.moo')} ${scope.opt.moo},`} ${scope.opt.soi && `${$t('form.soi')} ${scope.opt.soi},`} ${scope.opt.street && `${$t('form.street')} ${scope.opt.street},`} ${scope.opt.subDistrict.name || ''}, ${scope.opt.district.name || ''}, ${scope.opt.province.name || ''}` : `${scope.opt.address || ''}, ${scope.opt.moo && `${$t('form.moo')} ${scope.opt.moo},`} ${scope.opt.soi && `${$t('form.soi')} ${scope.opt.soi},`} ${scope.opt.street && `${$t('form.road')} ${scope.opt.street},`} ${scope.opt.subDistrict.name || ''}, ${scope.opt.district.name || ''}, ${scope.opt.province.name || ''}`
}} }}
{{ scope.opt.subDistrict?.zipCode || '' }} {{ scope.opt.subDistrict?.zipCode || '' }}
</span> </span>
@ -222,50 +244,44 @@ onMounted(() => {
> >
<div class="q-mr-sm"> <div class="q-mr-sm">
{{ scope.opt.code }} {{ scope.opt.code }}
{{ $t('customerEmployee.form.employerSelect.branchName') }}:
{{ {{
$i18n.locale === 'eng' scope.opt.customer.customerType === 'CORP'
? scope.opt.registerNameEN ? $t('customer.form.registerName')
: scope.opt.registerName : $t('customer.form.ownerName')
}}:
{{
scope.opt.customer.customerType === 'CORP'
? scope.opt.customerName
: $i18n.locale === 'eng'
? `${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` || '-'
: `${scope.opt.firstName} ${scope.opt.lastName}` || '-'
}} }}
</div> </div>
<div <div
class="text-caption app-text-muted-2" class="text-caption app-text-muted-2"
v-if="scope.opt.customer && scope.opt.province" v-if="scope.opt.customer && scope.opt.province"
> >
{{ $t('customerEmployee.form.employerSelect.branchName') }}: {{ $t('customerBranch.form.title') }}:
{{ {{ listBranch(scope.opt.codeCustomer) }}
$i18n.locale === 'eng'
? scope.opt.customer.firstNameEN ||
'-' + ' ' + scope.opt.customer.lastNameEN
: scope.opt.customer.firstName ||
'-' + ' ' + scope.opt.customer.lastName
}}
{{ $t('general.address') }} {{ $t('general.address') }}
{{ {{
$i18n.locale === 'eng' $i18n.locale === 'eng'
? `${scope.opt.addressEN || ''} ${scope.opt.subDistrict.nameEN || ''} ${scope.opt.district.nameEN || ''} ${scope.opt.province.nameEN || ''}` ? `${scope.opt.addressEN || ''}, ${scope.opt.mooEN && `${$t('form.moo')} ${scope.opt.mooEN},`} ${scope.opt.soiEN && `${$t('form.soi')} ${scope.opt.soiEN},`} ${scope.opt.streetEN && `${scope.opt.streetEN} Rd,`} ${scope.opt.subDistrict.nameEN || ''}, ${scope.opt.district.nameEN || ''}, ${scope.opt.province.nameEN || ''}`
: `${scope.opt.address || ''} ${scope.opt.subDistrict.name || ''} ${scope.opt.district.name || ''} ${scope.opt.province.name || ''}` : `${scope.opt.address || ''}, ${scope.opt.moo && `${$t('form.moo')} ${scope.opt.moo},`} ${scope.opt.soi && `${$t('form.soi')} ${scope.opt.soi},`} ${scope.opt.street && `${$t('form.road')} ${scope.opt.street},`} ${scope.opt.subDistrict.name || ''}, ${scope.opt.district.name || ''}, ${scope.opt.province.name || ''}`
}} }}
{{ scope.opt.subDistrict?.zipCode || '' }} {{ scope.opt.subDistrict?.zipCode || '' }}
<q-tooltip v-if="scope.opt.customer && scope.opt.province"> <q-tooltip v-if="scope.opt.customer && scope.opt.province">
{{ $t('customerEmployee.form.employerSelect.branchName') }}: {{ $t('customerBranch.form.title') }}:
{{ {{ listBranch(scope.opt.codeCustomer) }}
$i18n.locale === 'eng'
? scope.opt.customer.firstNameEN ||
'-' + ' ' + scope.opt.customer.lastNameEN
: scope.opt.customer.firstName ||
'-' + ' ' + scope.opt.customer.lastName
}}
{{ $t('general.address') }} {{ $t('general.address') }}
{{ {{
$i18n.locale === 'eng' $i18n.locale === 'eng'
? `${scope.opt.addressEN || ''} ${scope.opt.subDistrict.nameEN || ''} ${scope.opt.district.nameEN || ''} ${scope.opt.province.nameEN || ''}` ? `${scope.opt.addressEN || ''}, ${scope.opt.mooEN && `${$t('form.moo')} ${scope.opt.mooEN},`} ${scope.opt.soiEN && `${$t('form.soi')} ${scope.opt.soiEN},`} ${scope.opt.streetEN && `${scope.opt.streetEN} Rd,`} ${scope.opt.subDistrict.nameEN || ''}, ${scope.opt.district.nameEN || ''}, ${scope.opt.province.nameEN || ''}`
: `${scope.opt.address || ''} ${scope.opt.subDistrict.name || ''} ${scope.opt.district.name || ''} ${scope.opt.province.name || ''}` : `${scope.opt.address || ''}, ${scope.opt.moo && `${$t('form.moo')} ${scope.opt.moo},`} ${scope.opt.soi && `${$t('form.soi')} ${scope.opt.soi},`} ${scope.opt.street && `${$t('form.road')} ${scope.opt.street},`} ${scope.opt.subDistrict.name || ''}, ${scope.opt.district.name || ''}, ${scope.opt.province.name || ''}`
}} }}
{{ scope.opt.zipCode || '' }} {{ scope.opt.subDistrict?.zipCode || '' }}
</q-tooltip> </q-tooltip>
</div> </div>
</div> </div>

View file

@ -1,4 +1,8 @@
<script setup lang="ts"></script> <script setup lang="ts">
defineProps<{
hideIcon?: boolean;
}>();
</script>
<template> <template>
<q-page-sticky position="bottom-right" :offset="[8, 8]"> <q-page-sticky position="bottom-right" :offset="[8, 8]">
@ -10,7 +14,12 @@
class="color-btn" class="color-btn"
> >
<slot> <slot>
<q-fab-action padding="xs" color="primary" icon="mdi-account-plus" /> <q-fab-action
padding="xs"
color="primary"
icon="mdi-account-plus"
v-if="!hideIcon"
/>
</slot> </slot>
</q-fab> </q-fab>
</q-page-sticky> </q-page-sticky>

View file

@ -32,8 +32,8 @@ export default {
order: 'Order', order: 'Order',
name: 'Name', name: 'Name',
fullName: 'Full Name', fullName: 'Full Name',
detail: 'Detail', detail: '{msg} Detail',
remark: 'Remark', remark: '{msg} Remark',
createdAt: 'Created at', createdAt: 'Created at',
noData: 'No Data', noData: 'No Data',
noField: 'No Field', noField: 'No Field',
@ -80,6 +80,14 @@ export default {
totalVatIncluded: 'Taxable amount', totalVatIncluded: 'Taxable amount',
vat: 'VAT {msg}', vat: 'VAT {msg}',
totalAmount: 'Total amount', totalAmount: 'Total amount',
specify: 'Secify {msg}',
noSpecify: 'No Specify{msg}',
noDataTable: 'There is no data displayed in this table yet.',
birthDate: 'Birth Date',
amount: 'amount {msg}',
numberOf: 'number of {msg}',
list: 'List of {msg}',
for: 'for {msg}',
}, },
menu: { menu: {
@ -346,6 +354,7 @@ export default {
issueDate: 'Issue Date', issueDate: 'Issue Date',
passportExpiryDate: 'Passport Expiry Date', passportExpiryDate: 'Passport Expiry Date',
ownerName: 'Owner Name',
firstName: 'First Name ', firstName: 'First Name ',
lastName: 'Last Name ', lastName: 'Last Name ',
firstNameEN: 'First Name in English', firstNameEN: 'First Name in English',
@ -545,6 +554,7 @@ export default {
}, },
service: { service: {
title: 'Type', title: 'Type',
title2: 'Service',
totalWork: 'Total Work', totalWork: 'Total Work',
code: 'Type Code', code: 'Type Code',
name: 'Type Name', name: 'Type Name',
@ -614,6 +624,19 @@ export default {
amount: 'Amount', amount: 'Amount',
payDueDate: 'Pay Due Date', payDueDate: 'Pay Due Date',
callDueDate: 'Call Due Date', callDueDate: 'Call Due Date',
processOn: 'Process on {msg}',
productList: 'List of Product',
foreignRefNo: 'Alien Reference Number',
documentExpireDate: 'Document Expiration Date',
pricePerUnit: 'Unit price',
sumPrice: 'Total price',
tax: 'Tax',
calTax: 'Calculate taxes',
allProduct: 'List of all products',
type: { type: {
all: 'All', all: 'All',
fullAmountCash: 'Full Amount Cash', fullAmountCash: 'Full Amount Cash',
@ -705,6 +728,8 @@ export default {
relationCustomerNotFound: 'Customer cannot be found.', relationCustomerNotFound: 'Customer cannot be found.',
relationCustomerBranchNotFound: 'Customer Branch cannot be found.', relationCustomerBranchNotFound: 'Customer Branch cannot be found.',
sameBranchCodeExists: 'This Head Office Abbreviation is already in use.', sameBranchCodeExists: 'This Head Office Abbreviation is already in use.',
productNameExists:
'Product with the same name already exists. If you want to create with this name please select another code.',
validateError: 'Validate Error', validateError: 'Validate Error',
codeMisMatch: 'Code Mismatch', codeMisMatch: 'Code Mismatch',
userExists: 'User already exits.', userExists: 'User already exits.',

View file

@ -32,8 +32,8 @@ export default {
order: 'ลำดับ', order: 'ลำดับ',
name: 'ชื่อ', name: 'ชื่อ',
fullName: 'ชื่อ-สกุล', fullName: 'ชื่อ-สกุล',
detail: 'รายละเอียด', detail: 'รายละเอียด{msg}',
remark: 'หมายเหตุ', remark: 'หมายเหตุ{msg}',
createdAt: 'สร้างเมื่อ', createdAt: 'สร้างเมื่อ',
noData: 'ไม่มีข้อมูล', noData: 'ไม่มีข้อมูล',
noField: 'ไม่มีฟิลด์', noField: 'ไม่มีฟิลด์',
@ -85,6 +85,9 @@ export default {
noDataTable: 'ยังไม่มีข้อมูลแสดงในตารางนี้', noDataTable: 'ยังไม่มีข้อมูลแสดงในตารางนี้',
birthDate: 'วันเกิด', birthDate: 'วันเกิด',
amount: 'จำนวน {msg}', amount: 'จำนวน {msg}',
numberOf: 'จำนวน{msg}',
list: 'รายการ{msg}',
for: 'เพื่อ{msg}',
}, },
menu: { menu: {
@ -350,6 +353,7 @@ export default {
issueDate: 'วันที่ออกหนังสือ', issueDate: 'วันที่ออกหนังสือ',
passportExpiryDate: 'วันหiมดอายุหนังสือเดินทาง', passportExpiryDate: 'วันหiมดอายุหนังสือเดินทาง',
ownerName: 'ชื่อเจ้าของ',
firstName: 'ชื่อ ', firstName: 'ชื่อ ',
lastName: 'นามสกุล ', lastName: 'นามสกุล ',
firstNameEN: 'ชื่อ ภาษาอังกฤษ', firstNameEN: 'ชื่อ ภาษาอังกฤษ',
@ -535,18 +539,19 @@ export default {
title: 'กลุ่มสินค้าและบริการ', title: 'กลุ่มสินค้าและบริการ',
withName: 'กลุ่ม {name}', withName: 'กลุ่ม {name}',
addTitle: 'เพิ่มกลุ่มสินค้าและบริการ', addTitle: 'เพิ่มกลุ่มสินค้าและบริการ',
code: 'รหัสสินค้าและบริการ', code: 'รหัสกลุ่มสินค้าและบริการ',
name: 'ชื่อสินค้าและบริการ', name: 'ชื่อกลุ่มสินค้าและบริการ',
}, },
type: { type: {
title: 'ปรเภทสินค้าและบริการ', title: 'ปรเภทสินค้าและบริการ',
withName: 'ประเภท {name}', withName: 'ประเภท {name}',
addTitle: 'เพิ่มประเภทสินค้าและบริการ', addTitle: 'เพิ่มประเภทสินค้าและบริการ',
code: 'รหัสสินค้าและบริการ', code: 'รหัสกลุ่มสินค้าและบริการ',
name: 'ชื่อสินค้าและบริการ', name: 'ชื่อกลุ่มสินค้าและบริการ',
}, },
service: { service: {
title: 'ประเภท', title: 'ประเภท',
title2: 'บริการ',
totalWork: 'งานทั้งหมด', totalWork: 'งานทั้งหมด',
code: 'รหัสประเภท', code: 'รหัสประเภท',
name: 'ชื่อประเภท', name: 'ชื่อประเภท',
@ -571,7 +576,7 @@ export default {
product: { product: {
title: 'สินค้าและบริการ', title: 'สินค้าและบริการ',
code: 'รหัสสินค้าและบริการ', code: 'รหัสสินค้าและบริการ',
name: 'ชื่อสินค้าและบริการ', name: 'ชื่อกลุ่มสินค้าและบริการ',
registeredBranch: 'สาขาที่ลงทะเบียน', registeredBranch: 'สาขาที่ลงทะเบียน',
noProduct: 'ยังไม่มีสินค้าและบริการ', noProduct: 'ยังไม่มีสินค้าและบริการ',
allProduct: 'สินค้าและบริการทั้งหมด', allProduct: 'สินค้าและบริการทั้งหมด',
@ -627,8 +632,9 @@ export default {
pricePerUnit: 'ราคาต่อหน่วย', pricePerUnit: 'ราคาต่อหน่วย',
sumPrice: 'ราคารวม', sumPrice: 'ราคารวม',
tax: 'ภาษี', tax: 'ภาษี',
calVat: 'คิดภาษี', calTax: 'คิดภาษี',
allProduct: 'รายการสินค้าทั้งหมด', allProduct: 'รายการสินค้าทั้งหมด',
type: { type: {
all: 'ทั้งหมด', all: 'ทั้งหมด',
fullAmountCash: 'เงินสดเต็มจำนวน', fullAmountCash: 'เงินสดเต็มจำนวน',
@ -717,6 +723,8 @@ export default {
relationCustomerNotFound: 'ไม่พบลูกค้า', relationCustomerNotFound: 'ไม่พบลูกค้า',
relationCustomerBranchNotFound: 'ไม่พบสาขาลูกค้า', relationCustomerBranchNotFound: 'ไม่พบสาขาลูกค้า',
sameBranchCodeExists: 'ตัวย่อสำนักงานใหญ่นี้ถูกใช้แล้ว', sameBranchCodeExists: 'ตัวย่อสำนักงานใหญ่นี้ถูกใช้แล้ว',
productNameExists:
'สินค้าที่มีชื่อเดียวกันมีในระบบแล้ว หากคุณต้องการสร้างด้วยชื่อนี้โปรดเลือกรหัสอื่น',
validateError: 'เกิดข้อผิดพลาดจากการตรวจสอบ', validateError: 'เกิดข้อผิดพลาดจากการตรวจสอบ',
codeMisMatch: 'รหัสไม่ตรงกัน', codeMisMatch: 'รหัสไม่ตรงกัน',
userExists: 'ชื่อผู้ใช้นี้มีอยู่ในระบบอยู่แล้ว', userExists: 'ชื่อผู้ใช้นี้มีอยู่ในระบบอยู่แล้ว',

View file

@ -1446,7 +1446,7 @@ watch(currentHq, () => {
<q-td v-if="fieldSelected.includes('branchLabelTel')"> <q-td v-if="fieldSelected.includes('branchLabelTel')">
{{ {{
props.row.contact !== undefined props.row.contact !== undefined
? props.row.contact[0]?.telephoneNo || '-' ? props.row.telephoneNo || '-'
: '-' : '-'
}} }}
</q-td> </q-td>

View file

@ -1188,7 +1188,6 @@ const emptyCreateDialog = ref(false);
<q-td <q-td
v-if="fieldSelected.includes('titleName')" v-if="fieldSelected.includes('titleName')"
style="max-width: 200px"
class="ellipsis" class="ellipsis"
> >
<div class="row items-center no-wrap"> <div class="row items-center no-wrap">
@ -2337,7 +2336,12 @@ const emptyCreateDialog = ref(false);
v-model:current-tab="employeeFormState.currentTab" v-model:current-tab="employeeFormState.currentTab"
v-model:toggle-status="currentFromDataEmployee.status" v-model:toggle-status="currentFromDataEmployee.status"
fallbackCover="/images/employee-banner.png" fallbackCover="/images/employee-banner.png"
:img="employeeFormState.profileUrl || `/images/employee-avatar.png`" :img="
`${baseUrl}/employee/${currentFromDataEmployee.id}/image/${currentFromDataEmployee.selectedImage}`.concat(
refreshImageState ? `?ts=${Date.now()}` : '',
) || null
"
:fallbackImg="'/images/employee-avatar.png'"
:tabs-list=" :tabs-list="
[ [
{ {
@ -3433,6 +3437,7 @@ const emptyCreateDialog = ref(false);
" "
> >
<EmployerFormBranch <EmployerFormBranch
prefixId="info"
v-if="!!customerFormState.editCustomerId" v-if="!!customerFormState.editCustomerId"
:index="idx" :index="idx"
:hide-action="customerFormData.status === 'INACTIVE'" :hide-action="customerFormData.status === 'INACTIVE'"

View file

@ -136,7 +136,6 @@ watch(
:label="$t('customer.form.employerName')" :label="$t('customer.form.employerName')"
for="input-legal-person-no" for="input-legal-person-no"
v-model="customerName" v-model="customerName"
:rules="[(val: string) => !!val || $t('form.error.required')]"
/> />
<q-input <q-input

View file

@ -1311,8 +1311,9 @@ async function enterGroup(
currentIdGrop.value = id; currentIdGrop.value = id;
currentNoAction.value = status === 'INACTIVE'; currentNoAction.value = status === 'INACTIVE';
pathTypeName.value = name; pathTypeName.value = name;
await fetchListOfService();
await fetchListOfProduct(); if (productMode.value === 'service') await fetchListOfService();
if (productMode.value === 'product') await fetchListOfProduct();
if (toService) await enterNext('service'); if (toService) await enterNext('service');
else productMode.value = 'group'; else productMode.value = 'group';
@ -1349,6 +1350,8 @@ async function enterNext(type: 'service' | 'product') {
filterStat.value.push('group'); filterStat.value.push('group');
filterStat.value.push('service'); filterStat.value.push('service');
} }
if (productMode.value === 'service') await fetchListOfService();
if (productMode.value === 'product') await fetchListOfProduct();
flowStore.rotate(); flowStore.rotate();
} }
@ -1507,55 +1510,23 @@ watch(
<template> <template>
<ButtonAddComponent <ButtonAddComponent
hide-icon
v-if="actionDisplay && !currentNoAction" v-if="actionDisplay && !currentNoAction"
style="z-index: 999" style="z-index: 999"
> @click="
<q-fab-action async () => {
v-if="productMode === 'group'" if (productMode === 'group') {
id="btn-add-product-group"
style="color: white; background-color: hsla(var(--pink-6-hsl))"
padding="xs"
icon="mdi-folder-multiple-plus-outline"
:label="$t('productService.group.addTitle')"
external-label
label-position="left"
@click="
async () => {
clearFormGroup(); clearFormGroup();
await fetchListOfOptionBranch(); await fetchListOfOptionBranch();
dialogInputForm = true; dialogInputForm = true;
} }
" if (productMode === 'product') {
/>
<q-fab-action
v-if="productMode === 'product'"
:label="$t('productService.product.addTitle')"
id="btn-add-product"
external-label
label-position="left"
style="color: white; background-color: hsla(var(--green-11-hsl))"
padding="xs"
icon="mdi-folder-multiple-plus-outline"
@click="
async () => {
productTab = 1; productTab = 1;
clearFormProduct(); clearFormProduct();
await fetchListOfOptionBranch(); await fetchListOfOptionBranch();
dialogProduct = true; dialogProduct = true;
} }
" if (productMode === 'service') {
></q-fab-action>
<q-fab-action
v-if="productMode === 'service'"
:label="$t('productService.service.addTitle')"
id="btn-add-service"
external-label
label-position="left"
style="color: white; background-color: hsla(var(--orange-6-hsl))"
padding="xs"
icon="mdi-server-plus-outline"
@click="
async () => {
serviceTab = 1; serviceTab = 1;
clearFormGroup(); clearFormGroup();
clearFormService(); clearFormService();
@ -1563,9 +1534,9 @@ watch(
serviceTab = 1; serviceTab = 1;
dialogService = true; dialogService = true;
} }
" }
></q-fab-action> "
</ButtonAddComponent> />
<div class="full-height column no-wrap"> <div class="full-height column no-wrap">
<div class="text-body-2 q-mb-xs flex items-center"> <div class="text-body-2 q-mb-xs flex items-center">

View file

@ -76,6 +76,8 @@ export type CustomerBranch = {
customerId: string; customerId: string;
id: string; id: string;
customer: Customer;
status: Status; status: Status;
createdBy: string | null; createdBy: string | null;
createdAt: string; createdAt: string;