Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m0s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m0s
This commit is contained in:
commit
817f8da43b
4 changed files with 22 additions and 7 deletions
|
|
@ -269,14 +269,15 @@ async function fetchProfile(id: string, avatarName: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirecToRegistry() {
|
function redirecToRegistry() {
|
||||||
router.push(
|
window.open(
|
||||||
`/registry-${
|
`/registry-${
|
||||||
employeeClass.value.toLocaleLowerCase() === "perm"
|
employeeClass.value.toLocaleLowerCase() === "perm"
|
||||||
? "employee"
|
? "employee"
|
||||||
: employeeClass.value.toLocaleLowerCase() === "temp"
|
: employeeClass.value.toLocaleLowerCase() === "temp"
|
||||||
? "temp"
|
? "temp"
|
||||||
: "officer"
|
: "officer"
|
||||||
}/${props.id}`
|
}/${props.id}`,
|
||||||
|
"_blank"
|
||||||
);
|
);
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,9 +196,9 @@ function onClickHistory() {
|
||||||
*/
|
*/
|
||||||
function onClickViewDetail(id: string) {
|
function onClickViewDetail(id: string) {
|
||||||
if (empType.value === "officer") {
|
if (empType.value === "officer") {
|
||||||
router.push(`/registry-officer/${id}`);
|
window.open(`/registry-officer/${id}`, "_blank");
|
||||||
} else {
|
} else {
|
||||||
router.push(`/registry-employee/${id}`);
|
window.open(`/registry-employee/${id}`, "_blank");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -800,6 +800,19 @@ function openDialogSendTransferResign(
|
||||||
: (modalDialogResign.value = true);
|
: (modalDialogResign.value = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ฟังก์ชันจัดการการกลับหน้า*/
|
||||||
|
function handleBackNavigation() {
|
||||||
|
if (window.history.length > 1) {
|
||||||
|
router.go(-1);
|
||||||
|
} else {
|
||||||
|
if (empType.value === "") {
|
||||||
|
router.push("/registry-officer");
|
||||||
|
} else if (empType.value === "-employee") {
|
||||||
|
router.push("/registry-employee");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchDataPersonal();
|
await fetchDataPersonal();
|
||||||
});
|
});
|
||||||
|
|
@ -816,7 +829,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="handleBackNavigation"
|
||||||
/>
|
/>
|
||||||
{{ titleName }}
|
{{ titleName }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,11 @@ async function fetchProfile(id: string, avatarName: string) {
|
||||||
* function rediract ไปทะเบียนประวัติ
|
* function rediract ไปทะเบียนประวัติ
|
||||||
*/
|
*/
|
||||||
function redirecToRegistry() {
|
function redirecToRegistry() {
|
||||||
router.push(
|
window.open(
|
||||||
`/registry${props.employeeClass ? props.employeeClass : "-officer"}/${
|
`/registry${props.employeeClass ? props.employeeClass : "-officer"}/${
|
||||||
profileId.value
|
profileId.value
|
||||||
}`
|
}`,
|
||||||
|
"_blank"
|
||||||
);
|
);
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue