diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 81f28f93..99e447c0 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -9,7 +9,7 @@ import { calculateAge, dateFormat } from 'src/utils/datetime'; import useCustomerStore from 'stores/customer'; import useEmployeeStore from 'stores/employee'; import useMyBranchStore from 'stores/my-branch'; -import useUtilsStore, { dialog } from 'stores/utils'; +import useUtilsStore, { dialog, notify } from 'stores/utils'; import useFlowStore from 'stores/flow'; import { Status } from 'stores/types'; import { CustomerStats, Customer, CustomerBranch } from 'stores/customer/types'; @@ -558,7 +558,7 @@ watch( ? 'hsla(var(--violet-11-hsl))' : 'hsla(var(--pink-6-hsl))', }" - @click="" + @click="console.log('add-branch')" padding="xs" icon="mdi-office-building" :label="$t('formDialogTitleCreateSubBranch')" @@ -615,8 +615,8 @@ watch( ? customerStats.map((v) => ({ count: v.name === 'CORP' - ? statsCustomerType?.CORP ?? 0 - : statsCustomerType?.PERS ?? 0, + ? (statsCustomerType?.CORP ?? 0) + : (statsCustomerType?.PERS ?? 0), label: v.name === 'CORP' ? 'customerLegalEntity' @@ -947,12 +947,14 @@ watch(
@@ -1144,7 +1146,11 @@ watch( $i18n.locale === 'en-US' ? `${props.row.customerName} `.trim() : `${props.row.customerNameEN} `.trim(), - img: props.row.imageUrl, + img: + props.row.imageUrl || + '/images/customer-' + + props.row.customerType + + '-avartar.png', male: undefined, female: undefined, detail: [ @@ -1180,7 +1186,7 @@ watch( `/customer-management/${props.row.id}/branch`, ) " - @view-card="" + @view-card="console.log('view customer')" @delete-card="deleteCustomerById(props.row.id)" @toggle-status=" triggerChangeStatus(props.row.id, props.row.status) @@ -1343,11 +1349,13 @@ watch( @@ -1592,7 +1600,9 @@ watch( $i18n.locale === 'en-US' ? `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim() : `${props.row.firstName} ${props.row.lastName} `.trim(), - img: props.row.profileImageUrl, + img: + props.row.profileImageUrl || + '/images/employee-avatar.png', male: props.row.gender === 'male', female: props.row.gender === 'female', detail: [ @@ -1604,7 +1614,7 @@ watch( { icon: 'mdi-clock-outline', value: props.row.dateOfBirth - ? calculateAge(props.row.dateOfBirth) ?? '' + ? (calculateAge(props.row.dateOfBirth) ?? '') : '', }, ], @@ -1617,8 +1627,8 @@ watch( ]" :disabled="props.row.status === 'INACTIVE'" @history="openHistory(props.row.id)" - @update-card="" - @enter-card="" + @update-card="console.log('update emp')" + @enter-card="console.log('enter-emp')" @delete-card="deleteEmployeeById(props.row.id)" @toggle-status=" triggerChangeStatus(props.row.id, props.row.status) @@ -2245,7 +2255,7 @@ watch( v-model:current-tab="employeeFormState.currentTab" v-model:cover-url="employeeFormState.profileUrl" fallbackCover="images/employee-banner.png" - :img="`images/employee-avatar.png`" + :img="`/images/employee-avatar.png`" :tabs-list="[ { name: 'personalInfo', label: 'personalInfo' }, { name: 'healthCheck', label: 'healthCheck' },