Merge branch 'nice' into develop
This commit is contained in:
commit
83f7df51d8
2 changed files with 53 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
div
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { QForm, useQuasar } from "quasar";
|
||||
|
|
@ -34,6 +35,7 @@ const {
|
|||
date2Thai,
|
||||
pathRegistryEmp,
|
||||
onSearchDataTable,
|
||||
convertDateToAPI,
|
||||
} = mixin;
|
||||
|
||||
const id = ref<string>(route.params.id.toString()); //id profile
|
||||
|
|
@ -132,6 +134,20 @@ const columns = ref<QTableProps["columns"]>([
|
|||
.toString()
|
||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "isHigh",
|
||||
align: "left",
|
||||
label: "วุฒิการศึกษาสูงสุด",
|
||||
sortable: true,
|
||||
field: "isHigh",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => (v === true ? "ใช่" : v === false ? "ไม่ใช่" : "-"),
|
||||
sort: (a: string, b: string) =>
|
||||
a
|
||||
.toString()
|
||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "degree",
|
||||
align: "left",
|
||||
|
|
@ -258,6 +274,7 @@ const visibleColumns = ref<string[]>([
|
|||
"other",
|
||||
"fundName",
|
||||
"isEducation",
|
||||
"isHigh",
|
||||
"endDate",
|
||||
"startDate",
|
||||
"finishDate",
|
||||
|
|
@ -265,7 +282,7 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "lastUpdatedAt",
|
||||
sortBy: "",
|
||||
});
|
||||
|
||||
/** Table ประวัติแก้ไขประวัติการศึกษา*/
|
||||
|
|
@ -351,6 +368,20 @@ const historyColumns = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "isHigh",
|
||||
align: "left",
|
||||
label: "วุฒิการศึกษาสูงสุด",
|
||||
sortable: true,
|
||||
field: "isHigh",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => (v === true ? "ใช่" : v === false ? "ไม่ใช่" : "-"),
|
||||
sort: (a: string, b: string) =>
|
||||
a
|
||||
.toString()
|
||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "degree",
|
||||
align: "left",
|
||||
|
|
@ -486,6 +517,7 @@ const historyVisibleColumns = ref<string[]>([
|
|||
"other",
|
||||
"fundName",
|
||||
"isEducation",
|
||||
"isHigh",
|
||||
"endDate",
|
||||
"startDate",
|
||||
"finishDate",
|
||||
|
|
@ -524,6 +556,7 @@ const educationData = reactive<RequestItemsObject>({
|
|||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
isEducation: null,
|
||||
isHigh: null,
|
||||
degree: "",
|
||||
field: "",
|
||||
fundName: "",
|
||||
|
|
@ -591,6 +624,7 @@ function clearForm() {
|
|||
educationData.startDate = new Date();
|
||||
educationData.endDate = new Date();
|
||||
educationData.isEducation = null;
|
||||
educationData.isHigh = false;
|
||||
educationData.degree = "";
|
||||
educationData.field = "";
|
||||
educationData.fundName = "";
|
||||
|
|
@ -610,12 +644,14 @@ function editForm(row: any) {
|
|||
dialogStatus.value = "edit";
|
||||
editId.value = row?.id;
|
||||
isDate.value = row.isDate ? "true" : "false";
|
||||
|
||||
educationData.educationLevel = row.educationLevel;
|
||||
educationData.institute = row.institute;
|
||||
educationData.finishDate = row.finishDate;
|
||||
educationData.startDate = row.startDate;
|
||||
educationData.endDate = row.endDate;
|
||||
educationData.isEducation = row.isEducation;
|
||||
educationData.isHigh = row.isHigh ? true : false;
|
||||
educationData.degree = row.degree;
|
||||
educationData.field = row.field;
|
||||
educationData.fundName = row.fundName;
|
||||
|
|
@ -719,6 +755,9 @@ function addData() {
|
|||
isDate: isDate.value === "false" ? false : true,
|
||||
profileId: empType.value === "" ? id.value : undefined,
|
||||
profileEmployeeId: empType.value !== "" ? id.value : undefined,
|
||||
finishDate: convertDateToAPI(educationData.finishDate),
|
||||
startDate: convertDateToAPI(educationData.startDate),
|
||||
endDate: convertDateToAPI(educationData.endDate),
|
||||
})
|
||||
.then(async () => {
|
||||
await fetchData(id.value);
|
||||
|
|
@ -748,6 +787,9 @@ function editData(idData: string) {
|
|||
isDate: isDate.value === "false" ? false : true,
|
||||
durationYear:
|
||||
educationData.durationYear === "" ? null : educationData.durationYear,
|
||||
finishDate: convertDateToAPI(educationData.finishDate),
|
||||
startDate: convertDateToAPI(educationData.startDate),
|
||||
endDate: convertDateToAPI(educationData.endDate),
|
||||
})
|
||||
.then(async () => {
|
||||
await fetchData(id.value);
|
||||
|
|
@ -1467,6 +1509,15 @@ onMounted(async () => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="educationData.isHigh"
|
||||
label="วุฒิการศึกษาสูงสุด"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
outlined
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ interface RequestItemsObject {
|
|||
startDate: Date;
|
||||
endDate: Date;
|
||||
isEducation: boolean | null;
|
||||
isHigh: boolean | null;
|
||||
degree: string;
|
||||
field: string;
|
||||
fundName: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue