diff --git a/src/components/03_customer-management/employee/BasicInformation.vue b/src/components/03_customer-management/employee/BasicInformation.vue index f00585af..c5420ba7 100644 --- a/src/components/03_customer-management/employee/BasicInformation.vue +++ b/src/components/03_customer-management/employee/BasicInformation.vue @@ -32,7 +32,7 @@ const customerBranch = defineModel<{ const nrcNo = defineModel('nrcNo'); const code = defineModel('code'); -const props = defineProps<{ +defineProps<{ noAction?: boolean; title?: string; dense?: boolean; @@ -52,52 +52,6 @@ defineEmits<{ (e: 'delete'): void; (e: 'edit'): void; }>(); - -const branchOptions = ref[]>([]); -let branchFilter: ( - value: string, - update: (callbackFn: () => void, afterFn?: (ref: QSelect) => 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( - () => optionsBranch.value, - () => { - branchFilter = selectFilterOptionRefMod( - optionsBranch, - branchOptions, - 'name', - ); - }, -); - -onMounted(() => { - branchFilter = selectFilterOptionRefMod(optionsBranch, branchOptions, 'name'); -});