แก้ไขประเมินบุคคล

This commit is contained in:
Warunee Tamkoo 2023-12-23 12:18:02 +07:00
parent 2399c9dcf0
commit 3487ae71bb
6 changed files with 61 additions and 19 deletions

View file

@ -12,8 +12,7 @@ const router = useRouter();
const route = useRoute();
const id = ref<string>(route.params.id as string);
const $q = useQuasar();
const AnnouncementStartDate = ref<string | null>();
const AnnouncementEndDate = ref<string | null>();
const dateEndPrepareDoc2 = ref<string | null>();
const mixin = useCounterMixin();
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
const AnnouncementDate = ref<string | null>(date2Thai(new Date()));
@ -44,10 +43,12 @@ function getDate() {
.get(config.API.evaluationDateAnnounce(id.value))
.then((res) => {
const data = res.data.result;
AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce);
const endDate = new Date(data.dateStartAnnounce);
endDate.setDate(endDate.getDate() + 30);
AnnouncementEndDate.value = date2Thai(endDate);
endDate.setDate(endDate.getDate() + 210);
dateEndPrepareDoc2.value = date2Thai(endDate);
dateEndPrepareDoc2.value = data.dateEndPrepareDoc2
? date2Thai(data.dateEndPrepareDoc2)
: dateEndPrepareDoc2.value;
})
.catch((e) => {
messageError($q, e);
@ -88,8 +89,7 @@ onMounted(() => {
<q-banner class="text-weight-bold text-red-14 bg-red-2 text-center">
<div class="text-weight-bold">
<q-icon name="info_outline" color="red-14" size="24px" />
ประกาศเมอวนท {{ AnnouncementStartDate }} งวนท
{{ AnnouncementEndDate }}
นสดทายของการสงผลงานคอวนท {{ dateEndPrepareDoc2 }}
</div>
</q-banner>
</div>