feat(wip): customer(employee) branch
This commit is contained in:
parent
622b25b900
commit
e853f6bf91
4 changed files with 341 additions and 36 deletions
|
|
@ -15,6 +15,7 @@ import { Status } from 'stores/types';
|
|||
import { CustomerStats, Customer, CustomerBranch } from 'stores/customer/types';
|
||||
import { Employee, EmployeeHistory } from 'stores/employee/types';
|
||||
|
||||
import { AddressForm } from 'components/form';
|
||||
import DrawerInfo from 'components/DrawerInfo.vue';
|
||||
import ButtonAddComponent from 'components/ButtonAddCompoent.vue';
|
||||
import PersonCard from 'components/shared/PersonCard.vue';
|
||||
|
|
@ -23,18 +24,14 @@ import TooltipComponent from 'components/TooltipComponent.vue';
|
|||
import EmptyAddButton from 'components/AddButton.vue';
|
||||
import NoData from 'components/NoData.vue';
|
||||
import PaginationComponent from 'components/PaginationComponent.vue';
|
||||
import DialogForm from 'components/DialogForm.vue';
|
||||
import SideMenu from 'components/SideMenu.vue';
|
||||
import BasicInformation from 'components/03_customer-management/employee/BasicInformation.vue';
|
||||
import FormPerson from 'components/02_personnel-management/FormPerson.vue';
|
||||
import {
|
||||
EmployerFormBasicInfo,
|
||||
EmployerFormBranch,
|
||||
EmployerBranch,
|
||||
} from './components';
|
||||
import { AddressForm } from 'components/form';
|
||||
import { EmployerFormBasicInfo, EmployerFormBranch } from './components';
|
||||
import BranchPage from './BranchPage.vue';
|
||||
import FormEmployeePassport from 'components/03_customer-management/FormEmployeePassport.vue';
|
||||
import FormEmployeeVisa from 'components/03_customer-management/FormEmployeeVisa.vue';
|
||||
import DialogForm from 'components/DialogForm.vue';
|
||||
import SideMenu from 'components/SideMenu.vue';
|
||||
import { AddButton } from 'components/button';
|
||||
|
||||
import {
|
||||
|
|
@ -655,8 +652,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'
|
||||
|
|
@ -1668,7 +1665,7 @@ watch(
|
|||
{
|
||||
icon: 'mdi-clock-outline',
|
||||
value: props.row.dateOfBirth
|
||||
? (calculateAge(props.row.dateOfBirth) ?? '')
|
||||
? calculateAge(props.row.dateOfBirth) ?? ''
|
||||
: '',
|
||||
},
|
||||
],
|
||||
|
|
@ -1800,19 +1797,17 @@ watch(
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col column" v-if="$route.name === 'CustomerBranchManagement'">
|
||||
<EmployerBranch
|
||||
<div
|
||||
class="col column rounded bordered"
|
||||
style="overflow: hidden"
|
||||
v-if="$route.name === 'CustomerBranchManagement'"
|
||||
>
|
||||
<BranchPage
|
||||
v-if="currentCustomer"
|
||||
:customer-id="currentCustomer.id"
|
||||
:customer-type="currentCustomer.customerType"
|
||||
v-model:mode-view="gridView"
|
||||
@back="$router.push('/customer-management')"
|
||||
@view-detail="
|
||||
async (value) => {
|
||||
await fetchListOfOptionBranch();
|
||||
// TODO: Assign data to form
|
||||
}
|
||||
"
|
||||
v-model:branch="branch"
|
||||
v-model:current-customer-name="currentCustomer.customerName"
|
||||
v-model:current-customer-url-image="currentCustomer.imageUrl"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue