Refactoring code module 11_probation
This commit is contained in:
parent
779e33d2a5
commit
606064c77c
5 changed files with 42 additions and 40 deletions
|
|
@ -5,16 +5,15 @@ import { useRoute, useRouter } from "vue-router";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import Criterion from "@/modules/11_probation/component/Criterion.vue";
|
||||
|
||||
import { useProbationStore } from "@/modules/11_probation/store/probation";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import Criterion from "@/modules/11_probation/component/Criterion.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useProbationStore();
|
||||
const dateAutherise = ref<any>(new Date());
|
||||
const behavior_improve_desc = ref<string>("");
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
showLoader,
|
||||
|
|
@ -26,8 +25,9 @@ const {
|
|||
dialogMessageNotify,
|
||||
dateToISO,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const dateAutherise = ref<Date | null>(new Date());
|
||||
const behavior_improve_desc = ref<string>("");
|
||||
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const profileId = ref<string>(route.params.profileId as string);
|
||||
|
|
@ -200,7 +200,7 @@ function putformData() {
|
|||
self_learning: Number(self_learning.value),
|
||||
training_seminar: Number(training_seminar.value),
|
||||
other_training: Number(other_training.value),
|
||||
assessor_dated: dateToISO(dateAutherise.value),
|
||||
assessor_dated: dateToISO(dateAutherise.value as Date),
|
||||
};
|
||||
dialogConfirm($q, async () => await saveformdata(data));
|
||||
}
|
||||
|
|
@ -434,7 +434,7 @@ onMounted(async () => {
|
|||
class="full-width datepicker col-3"
|
||||
:model-value="start_date != null ? date2Thai(start_date) : null"
|
||||
:label="`${'ระหว่างวันที่'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -474,7 +474,7 @@ onMounted(async () => {
|
|||
date_finish != null ? date2Thai(date_finish) : null
|
||||
"
|
||||
:label="`${'ถึงวันที่'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1372,7 +1372,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
|
|
@ -1445,7 +1445,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
|
|
@ -1728,7 +1728,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
|
|
@ -1799,7 +1799,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
</q-item-section>
|
||||
|
|
@ -2217,7 +2217,7 @@ onMounted(async () => {
|
|||
: null
|
||||
"
|
||||
:label="`${'ลงวันที่'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@ import { useRoute, useRouter } from "vue-router";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import Criterion from "@/modules/11_probation/component/Criterion.vue";
|
||||
|
||||
import { useProbationStore } from "@/modules/11_probation/store/probation";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import Criterion from "@/modules/11_probation/component/Criterion.vue";
|
||||
|
||||
const Header = defineAsyncComponent(
|
||||
() => import("@/modules/11_probation/component/Header.vue")
|
||||
);
|
||||
|
|
@ -1481,7 +1480,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
|
|
@ -1557,7 +1556,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
</q-item-section>
|
||||
|
|
@ -1843,7 +1842,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
</q-item-section>
|
||||
|
|
@ -1909,7 +1908,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
</q-item-section>
|
||||
|
|
@ -2332,7 +2331,7 @@ onMounted(async () => {
|
|||
dateAutherise != null ? date2Thai(dateAutherise) : null
|
||||
"
|
||||
:label="`${'ลงวันที่'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue