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 modalPersonal = ref<boolean>(false);
|
||||||
|
|
||||||
|
const profileId = ref<string | null>("");
|
||||||
|
|
||||||
function fetchDataProfile(data: DataProfile) {
|
function fetchDataProfile(data: DataProfile) {
|
||||||
fetchProfile(data.profileId);
|
fetchProfile(data.profileId);
|
||||||
|
|
||||||
profile.id = data.profileId;
|
profile.id = data.profileId;
|
||||||
profile.fullName = `${data.prefix}${data.firstName} ${data.lastName}`;
|
profile.fullName = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||||
profile.position = data.position !== "" ? data.position : "-";
|
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);
|
profile.organization = findOrgName(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,6 +82,7 @@ watch(
|
||||||
() => props.data,
|
() => props.data,
|
||||||
() => {
|
() => {
|
||||||
const dataMain = props.data as DataProfile;
|
const dataMain = props.data as DataProfile;
|
||||||
|
profileId.value = dataMain.profileId;
|
||||||
fetchDataProfile(dataMain);
|
fetchDataProfile(dataMain);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -86,6 +96,7 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="profileId"
|
||||||
outline
|
outline
|
||||||
color="blue"
|
color="blue"
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue