fix: error undefined
This commit is contained in:
parent
5a5a0581de
commit
cc8ef8c97b
1 changed files with 11 additions and 12 deletions
|
|
@ -262,11 +262,13 @@ const responsiblePersonList = computed(() => {
|
|||
curr.productService.service?.workflow?.step.forEach((v) => {
|
||||
const key = v.order.toString();
|
||||
|
||||
if (!acc[key]) acc[key] = [];
|
||||
if (!acc[key]) acc[key] = v.responsiblePerson.map((v) => v.user);
|
||||
|
||||
const current = acc[key];
|
||||
|
||||
v.responsiblePerson.forEach((lhs) => {
|
||||
if (acc[v.order].find((rhs) => rhs.id === lhs.userId)) return;
|
||||
acc[v.order].push(lhs.user);
|
||||
if (current.find((rhs) => rhs.id === lhs.userId)) return;
|
||||
current.push(lhs.user);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -275,7 +277,7 @@ const responsiblePersonList = computed(() => {
|
|||
{},
|
||||
);
|
||||
|
||||
return temp;
|
||||
return temp || {};
|
||||
});
|
||||
|
||||
const successAll = computed(() => {
|
||||
|
|
@ -372,15 +374,12 @@ function isInstallmentPaySuccess(installmentNo: number) {
|
|||
<span class="app-text-muted">{{ $t('flow.responsiblePerson') }}</span>
|
||||
<span>
|
||||
<template
|
||||
v-if="
|
||||
responsiblePersonList &&
|
||||
responsiblePersonList[pageState.currentStep].length >= 1
|
||||
"
|
||||
v-if="responsiblePersonList[pageState.currentStep]?.length"
|
||||
>
|
||||
<AvatarGroup
|
||||
:data="
|
||||
responsiblePersonList[pageState.currentStep].map((v) => {
|
||||
return {
|
||||
(responsiblePersonList[pageState.currentStep] || []).map(
|
||||
(v) => ({
|
||||
name:
|
||||
$i18n.locale === 'eng'
|
||||
? `${v.firstNameEN} ${v.lastNameEN}`
|
||||
|
|
@ -390,8 +389,8 @@ function isInstallmentPaySuccess(installmentNo: number) {
|
|||
? `/no-img-man.png`
|
||||
: `/no-img-female.png`
|
||||
: `${baseUrl}/user/${v.id}/profile-image/${v.selectedImage}`,
|
||||
};
|
||||
})
|
||||
}),
|
||||
)
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue