new loader
This commit is contained in:
parent
fd7aae2f5d
commit
fe6c712a18
95 changed files with 1189 additions and 950 deletions
|
|
@ -2,7 +2,10 @@
|
|||
<div class="col-12 row">
|
||||
<div class="row col-12" style="padding-top: 80px">
|
||||
<div id="information" name="1" class="row col-12 information">
|
||||
<Informationvue v-model:statusEdit="statusEdit" :profileType="profileType" />
|
||||
<Informationvue
|
||||
v-model:statusEdit="statusEdit"
|
||||
:profileType="profileType"
|
||||
/>
|
||||
</div>
|
||||
<div id="certicate" name="15" class="row col-12 q-mt-md">
|
||||
<Certicate v-model:statusEdit="statusEdit" :profileType="profileType" />
|
||||
|
|
@ -20,7 +23,10 @@
|
|||
<CoinedVue v-model:statusEdit="statusEdit" :profileType="profileType" />
|
||||
</div>
|
||||
<div id="assessment" name="6" class="row col-12 q-mt-md">
|
||||
<AssessmentVue v-model:statusEdit="statusEdit" :profileType="profileType" />
|
||||
<AssessmentVue
|
||||
v-model:statusEdit="statusEdit"
|
||||
:profileType="profileType"
|
||||
/>
|
||||
</div>
|
||||
<div id="position" name="7" class="row col-12 q-mt-md">
|
||||
<SalaryVue v-model:statusEdit="statusEdit" />
|
||||
|
|
@ -53,7 +59,9 @@
|
|||
class="bg-grey-2 text-white"
|
||||
style="z-index: 99; padding: 0% 1% 0% 1%"
|
||||
>
|
||||
<div class="row col-12 q-gutter-sm q-pb-sm text-dark no-wrap items-center">
|
||||
<div
|
||||
class="row col-12 q-gutter-sm q-pb-sm text-dark no-wrap items-center"
|
||||
>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
|
|
@ -64,7 +72,12 @@
|
|||
@click="router.go(-1)"
|
||||
>
|
||||
</q-btn>
|
||||
<q-avatar v-if="imageUrl == null" size="65px" rounded class="containerimage">
|
||||
<q-avatar
|
||||
v-if="imageUrl == null"
|
||||
size="65px"
|
||||
rounded
|
||||
class="containerimage"
|
||||
>
|
||||
<img
|
||||
src="@/assets/avatar_user.jpg"
|
||||
class="bg-grey-3"
|
||||
|
|
@ -108,7 +121,9 @@
|
|||
</q-avatar>
|
||||
<div class="row items-center text-dark q-ml-md">
|
||||
<div class="column">
|
||||
<div class="text-bold q-pb-xs text-name">{{ fullname }}{{ leaveReason }}</div>
|
||||
<div class="text-bold q-pb-xs text-name">
|
||||
{{ fullname }}{{ leaveReason }}
|
||||
</div>
|
||||
<div>{{ position }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -118,9 +133,13 @@
|
|||
flat
|
||||
:color="reasonStatus ? 'primary' : 'pink-5'"
|
||||
@click="clickRetire()"
|
||||
:icon="reasonStatus ? 'mdi-home-import-outline' : 'mdi-home-export-outline'"
|
||||
:icon="
|
||||
reasonStatus ? 'mdi-home-import-outline' : 'mdi-home-export-outline'
|
||||
"
|
||||
>
|
||||
<q-tooltip>{{ reasonStatus ? "กลับเข้าราชการ" : "ออกราชการ" }}</q-tooltip>
|
||||
<q-tooltip>{{
|
||||
reasonStatus ? "กลับเข้าราชการ" : "ออกราชการ"
|
||||
}}</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn icon="mdi-file-eye-outline" round color="primary" flat>
|
||||
|
|
@ -131,7 +150,9 @@
|
|||
<q-item-section class="text-blue">ก.พ.7/ก.ก.1</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="clickKp7Short()">
|
||||
<q-item-section class="text-primary">ประวัติแบบย่อ</q-item-section>
|
||||
<q-item-section class="text-primary"
|
||||
>ประวัติแบบย่อ</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
|
|
@ -233,9 +254,18 @@
|
|||
<strong>อัปโหลดรูปภาพ</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="n in images" :key="n" class="col-3" @click="imageActive(n)">
|
||||
<div
|
||||
v-for="n in images"
|
||||
:key="n"
|
||||
class="col-3"
|
||||
@click="imageActive(n)"
|
||||
>
|
||||
<div :class="getClass(n)">
|
||||
<q-img v-if="n.avatar != null" :src="n.avatar" :class="imageClass(n)">
|
||||
<q-img
|
||||
v-if="n.avatar != null"
|
||||
:src="n.avatar"
|
||||
:class="imageClass(n)"
|
||||
>
|
||||
<!-- <div
|
||||
class="absolute-top bg-transparent cursor-pointer text-right"
|
||||
style="padding: 5px"
|
||||
|
|
@ -311,7 +341,9 @@
|
|||
|
||||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div
|
||||
class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs"
|
||||
>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-select
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
|
|
@ -373,7 +405,10 @@
|
|||
lazy-rules
|
||||
autogrow
|
||||
v-model="leaveDetail"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกสาเหตุ/เหตุผลของการพ้นจากราชการ'}`]"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณากรอกสาเหตุ/เหตุผลของการพ้นจากราชการ'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
:label="`${'สาเหตุ/เหตุผลของการพ้นจากราชการ'}`"
|
||||
/>
|
||||
|
|
@ -431,7 +466,13 @@
|
|||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn flat round color="public" @click="Retire" icon="mdi-content-save-outline">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="public"
|
||||
@click="Retire"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
|
|
@ -468,7 +509,15 @@ const $q = useQuasar();
|
|||
const store = useDataStore();
|
||||
const { changeTab, loaderPage } = store;
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, dateToISO, modalConfirm, messageError, dialogMessage } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
dateToISO,
|
||||
modalConfirm,
|
||||
messageError,
|
||||
dialogMessage,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const imageUrl = ref<any>(null);
|
||||
|
|
@ -544,7 +593,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileAvatarId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -568,12 +617,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const checkProfileData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileCheckId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -584,12 +633,12 @@ const checkProfileData = async () => {
|
|||
router.push("/registry");
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchAvatarHistory = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileAvatarHistoryId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -608,7 +657,7 @@ const fetchAvatarHistory = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -617,7 +666,7 @@ const uploadImage = async (e: any) => {
|
|||
if (input.length > 0) {
|
||||
const formData = new FormData();
|
||||
formData.append("FileData", input[0]);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileAvatarId(profileId.value), formData)
|
||||
.then((res) => {})
|
||||
|
|
@ -644,7 +693,7 @@ const deletePhoto = async (id: string) => {
|
|||
// undefined,
|
||||
// false
|
||||
// );
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileAvatarHistoryId(id))
|
||||
.then((res) => {})
|
||||
|
|
@ -672,7 +721,7 @@ const selectAvatarHistory = async () => {
|
|||
);
|
||||
return;
|
||||
}
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileAvatarId(profileId.value), {
|
||||
avatar: activeImage.value.avatarId,
|
||||
|
|
@ -740,7 +789,7 @@ const downloadKP7Short = () => {};
|
|||
|
||||
const clickKp7 = async () => {
|
||||
window.open(config.API.profileReportId(profileId.value));
|
||||
// loaderPage(true);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.profileReportId(profileId.value))
|
||||
// .then((res) => {
|
||||
|
|
@ -753,7 +802,7 @@ const clickKp7 = async () => {
|
|||
// })
|
||||
// .catch((e) => {messageError($q, e);})
|
||||
// .finally(() => {
|
||||
// loaderPage(false);
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
|
|
@ -772,7 +821,7 @@ const downloadFilePDF = async (res: string, fileName: string) => {
|
|||
|
||||
const clickKp7Short = async () => {
|
||||
window.open(config.API.profileKp7ShortId(profileId.value));
|
||||
// loaderPage(true);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.profileKp7ShortId(profileId.value))
|
||||
// .then((res) => {
|
||||
|
|
@ -785,7 +834,7 @@ const clickKp7Short = async () => {
|
|||
// })
|
||||
// .catch((e) => {messageError($q, e);})
|
||||
// .finally(() => {
|
||||
// loaderPage(false);
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
|
|
@ -809,7 +858,7 @@ const clickRetire = async () => {
|
|||
|
||||
const Retire = async () => {
|
||||
if (reasonStatus.value == true) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileReactive(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -824,7 +873,7 @@ const Retire = async () => {
|
|||
router.push("/registry");
|
||||
});
|
||||
} else {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileDeactive(profileId.value), {
|
||||
leaveDate: dateToISO(leaveDate.value),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue