updated format code
This commit is contained in:
parent
b75d69ea08
commit
b14bad2249
241 changed files with 14012 additions and 13811 deletions
|
|
@ -182,9 +182,9 @@ function onClickSendOrder() {
|
|||
};
|
||||
http
|
||||
.post(config.API.orgProfileReport, data)
|
||||
.then(async() => {
|
||||
await props?.fetchData?.();
|
||||
await success($q, "บันทึกสำเร็จ");
|
||||
.then(async () => {
|
||||
await props?.fetchData?.();
|
||||
await success($q, "บันทึกสำเร็จ");
|
||||
closeDialog();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
|
|
@ -297,4 +297,4 @@ const changeBtn = async () => {
|
|||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</template>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -634,7 +634,7 @@ const getClass = (val: boolean) => {
|
|||
:addEmployee="statusAdd()"
|
||||
/>
|
||||
<q-form ref="myform">
|
||||
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-xs-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
|
|
@ -906,4 +906,4 @@ const getClass = (val: boolean) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
</HistoryTable>
|
||||
</template>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ const props = defineProps({
|
|||
},
|
||||
fetchDataProfile: {
|
||||
type: Function,
|
||||
default: () => { /* function */},
|
||||
default: () => {
|
||||
/* function */
|
||||
},
|
||||
},
|
||||
statusAdd: {
|
||||
type: Boolean,
|
||||
|
|
@ -493,7 +495,7 @@ const getClass = (val: boolean) => {
|
|||
:history="!statusAdd()"
|
||||
/>
|
||||
<q-form ref="myform">
|
||||
<div class="row col-12 q-col-gutter-x-sm q-col-gutter-y-sm">
|
||||
<div class="row col-12 q-col-gutter-x-sm q-col-gutter-y-sm">
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<selector
|
||||
:class="getClass(edit)"
|
||||
|
|
@ -669,4 +671,4 @@ const getClass = (val: boolean) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
</HistoryTable>
|
||||
</template>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1010,9 +1010,7 @@ const getClass = (val: boolean) => {
|
|||
<DialogHeader tittle="การลา" :close="clickCloseLeave" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div
|
||||
class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs"
|
||||
>
|
||||
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<selector
|
||||
:class="getClass(edit)"
|
||||
|
|
@ -1059,7 +1057,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
|
||||
:borderless="!edit"
|
||||
:model-value="dateThaiRange(dateRange)"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวัน เดือน ปีที่ลา'}`]"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,14 @@ const store = useProfileDataStore();
|
|||
const { profileData, changeProfileColumns } = store;
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, messageError, showLoader, hideLoader ,dialogConfirm} = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
const date = ref<Date>(new Date());
|
||||
|
|
@ -231,9 +238,9 @@ const clickAdd = async () => {
|
|||
/**
|
||||
* กดบันทึกใน dialog
|
||||
*/
|
||||
const clickSave = () => {
|
||||
dialogConfirm($q,()=>SaveData())
|
||||
}
|
||||
const clickSave = () => {
|
||||
dialogConfirm($q, () => SaveData());
|
||||
};
|
||||
const SaveData = async () => {
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
|
|
@ -513,9 +520,7 @@ const getClass = (val: boolean) => {
|
|||
<DialogHeader tittle="อื่นๆ" :close="clickClose" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div
|
||||
class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs"
|
||||
>
|
||||
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
|
|
@ -536,7 +541,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
|
||||
:borderless="!edit"
|
||||
:model-value="date2Thai(date)"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||
|
|
@ -619,4 +623,4 @@ const getClass = (val: boolean) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
</HistoryTable>
|
||||
</template>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -30,8 +30,15 @@ const store = useProfileDataStore();
|
|||
const { profileData, changeProfileColumns } = store;
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader,dialogConfirm } =
|
||||
mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
dateToISO,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
const field = ref<string>();
|
||||
|
|
@ -288,11 +295,11 @@ const clickAdd = async () => {
|
|||
/**
|
||||
* กดบันทึกใน dialog
|
||||
*/
|
||||
const clickSave = () => {
|
||||
dialogConfirm($q,()=>SaveData())
|
||||
}
|
||||
const clickSave = () => {
|
||||
dialogConfirm($q, () => SaveData());
|
||||
};
|
||||
const SaveData = async () => {
|
||||
await myForm.value.validate().then(async (result: boolean) => {
|
||||
await myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
if (modalEdit.value) {
|
||||
await editData();
|
||||
|
|
@ -577,9 +584,7 @@ const getClass = (val: boolean) => {
|
|||
<DialogHeader tittle="ความสามารถพิเศษ" :close="clickClose" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div
|
||||
class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs"
|
||||
>
|
||||
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
|
|
@ -684,4 +689,4 @@ const getClass = (val: boolean) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
</HistoryTable>
|
||||
</template>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -47,32 +47,38 @@ interface employeePosition {
|
|||
use: boolean;
|
||||
}
|
||||
interface FormEmployment {
|
||||
dateEmployment: Date | null
|
||||
orderEmployment: string
|
||||
dateEmployment: Date | null;
|
||||
orderEmployment: string;
|
||||
}
|
||||
interface FormEmploymentRef {
|
||||
dateEmployment: Object | null
|
||||
orderEmployment: Object | null
|
||||
dateEmployment: Object | null;
|
||||
orderEmployment: Object | null;
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
interface EmploymentList {
|
||||
id: string
|
||||
dateEmployment: Date | null
|
||||
orderEmployment: string
|
||||
dataISO: Date | null
|
||||
createdFullName: string
|
||||
createdAt: Date
|
||||
lastUpdateFullName: string
|
||||
lastUpdatedAt: Date
|
||||
id: string;
|
||||
dateEmployment: Date | null;
|
||||
orderEmployment: string;
|
||||
dataISO: Date | null;
|
||||
createdFullName: string;
|
||||
createdAt: Date;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdatedAt: Date;
|
||||
}
|
||||
interface Respones {
|
||||
id: string
|
||||
date: Date
|
||||
command: string
|
||||
createdFullName: string
|
||||
createdAt: Date
|
||||
lastUpdateFullName: string
|
||||
lastUpdatedAt: Date
|
||||
id: string;
|
||||
date: Date;
|
||||
command: string;
|
||||
createdFullName: string;
|
||||
createdAt: Date;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdatedAt: Date;
|
||||
}
|
||||
|
||||
export type { employeePosition, FormEmployment, FormEmploymentRef, EmploymentList, Respones };
|
||||
export type {
|
||||
employeePosition,
|
||||
FormEmployment,
|
||||
FormEmploymentRef,
|
||||
EmploymentList,
|
||||
Respones,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -82,28 +82,31 @@ export const useProfileDataStore = defineStore("profileEmployee", () => {
|
|||
};
|
||||
});
|
||||
|
||||
export const useRegistryEmployeeDataStore = defineStore("registryEmployeeDataStore", () => {
|
||||
const statusText = (val: string) => {
|
||||
switch (val) {
|
||||
case "WAITTING":
|
||||
return "รอดำเนินการ";
|
||||
case "PENDING":
|
||||
return "เลือกตำแหน่งแล้ว";
|
||||
case "APPROVE":
|
||||
return "อนุมัติ";
|
||||
case "REJECT":
|
||||
return "ไม่อนุมัติ";
|
||||
case "REPORT":
|
||||
return "ส่งรายชื่อไปออกคำสั่ง";
|
||||
case "DONE":
|
||||
return "ออกคำสั่งเสร็จแล้ว";
|
||||
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
};
|
||||
export const useRegistryEmployeeDataStore = defineStore(
|
||||
"registryEmployeeDataStore",
|
||||
() => {
|
||||
const statusText = (val: string) => {
|
||||
switch (val) {
|
||||
case "WAITTING":
|
||||
return "รอดำเนินการ";
|
||||
case "PENDING":
|
||||
return "เลือกตำแหน่งแล้ว";
|
||||
case "APPROVE":
|
||||
return "อนุมัติ";
|
||||
case "REJECT":
|
||||
return "ไม่อนุมัติ";
|
||||
case "REPORT":
|
||||
return "ส่งรายชื่อไปออกคำสั่ง";
|
||||
case "DONE":
|
||||
return "ออกคำสั่งเสร็จแล้ว";
|
||||
|
||||
return {
|
||||
statusText,
|
||||
};
|
||||
});
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
statusText,
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue