fix bug
This commit is contained in:
parent
2a0abd7c03
commit
c506fe404a
1 changed files with 12 additions and 1 deletions
|
|
@ -33,12 +33,21 @@ const profile = reactive<FormProfile>({
|
|||
});
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
|
||||
const profileId = ref<string | null>("");
|
||||
|
||||
function fetchDataProfile(data: DataProfile) {
|
||||
fetchProfile(data.profileId);
|
||||
|
||||
profile.id = data.profileId;
|
||||
profile.fullName = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||
profile.position = data.position !== "" ? data.position : "-";
|
||||
profile.positionLevel = `${data.posTypeName} (${data.posLevelName})`;
|
||||
if (data.posTypeName && data.posLevelName) {
|
||||
profile.positionLevel = `${data.posTypeName} (${data.posLevelName})`;
|
||||
} else if (data.posTypeName) {
|
||||
profile.positionLevel = `${data.posTypeName}`;
|
||||
} else if (data.posLevelName) {
|
||||
profile.positionLevel = `(${data.posLevelName})`;
|
||||
} else profile.positionLevel = "-";
|
||||
profile.organization = findOrgName(data);
|
||||
}
|
||||
|
||||
|
|
@ -73,6 +82,7 @@ watch(
|
|||
() => props.data,
|
||||
() => {
|
||||
const dataMain = props.data as DataProfile;
|
||||
profileId.value = dataMain.profileId;
|
||||
fetchDataProfile(dataMain);
|
||||
}
|
||||
);
|
||||
|
|
@ -86,6 +96,7 @@ watch(
|
|||
</div>
|
||||
<q-space />
|
||||
<q-btn
|
||||
v-if="profileId"
|
||||
outline
|
||||
color="blue"
|
||||
dense
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue