แก้ไขประวัติการศึกษา
This commit is contained in:
parent
d6545569d9
commit
8f81cb2c32
3 changed files with 25 additions and 24 deletions
|
|
@ -349,13 +349,14 @@
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date2Thai(finishDate)"
|
:model-value="finishDate ? date2Thai(finishDate) : null"
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
|
|
||||||
]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'วันที่สำเร็จการศึกษา'}`"
|
:label="`${'วันที่สำเร็จการศึกษา'}`"
|
||||||
>
|
>
|
||||||
|
<!-- :rules="[
|
||||||
|
(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
|
||||||
|
]" -->
|
||||||
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
name="event"
|
name="event"
|
||||||
|
|
@ -420,11 +421,11 @@
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="field"
|
v-model="field"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกสาขาวิชา/ทาง'}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'สาขาวิชา/ทาง'}`"
|
:label="`${'สาขาวิชา/ทาง'}`"
|
||||||
@update:modelValue="clickEditRow"
|
@update:modelValue="clickEditRow"
|
||||||
/>
|
/>
|
||||||
|
<!-- :rules="[(val) => !!val || `${'กรุณากรอกสาขาวิชา/ทาง'}`]" -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -449,11 +450,11 @@
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="gpa"
|
v-model="gpa"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเกรดเฉลี่ย'}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'เกรดเฉลี่ย'}`"
|
:label="`${'เกรดเฉลี่ย'}`"
|
||||||
@update:modelValue="clickEditRow"
|
@update:modelValue="clickEditRow"
|
||||||
/>
|
/>
|
||||||
|
<!-- :rules="[(val) => !!val || `${'กรุณากรอกเกรดเฉลี่ย'}`]" -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -464,11 +465,11 @@
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="country"
|
v-model="country"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกประเทศ'}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ประเทศ'}`"
|
:label="`${'ประเทศ'}`"
|
||||||
@update:modelValue="clickEditRow"
|
@update:modelValue="clickEditRow"
|
||||||
/>
|
/>
|
||||||
|
<!-- :rules="[(val) => !!val || `${'กรุณากรอกประเทศ'}`]" -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -507,12 +508,12 @@
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="durationYear"
|
v-model="durationYear"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ระยะเวลาหลักสูตร'}`"
|
:label="`${'ระยะเวลาหลักสูตร'}`"
|
||||||
@update:modelValue="clickEditRow"
|
@update:modelValue="clickEditRow"
|
||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
|
<!-- :rules="[(val) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]" -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
@ -635,7 +636,7 @@ const durationYear = ref<number>(0);
|
||||||
const other = ref<string>();
|
const other = ref<string>();
|
||||||
const fundName = ref<string>();
|
const fundName = ref<string>();
|
||||||
const isDate = ref<string | null>("true");
|
const isDate = ref<string | null>("true");
|
||||||
const finishDate = ref<Date>(new Date());
|
const finishDate = ref<Date | null>(null);
|
||||||
const startDate = ref<number>(new Date().getFullYear());
|
const startDate = ref<number>(new Date().getFullYear());
|
||||||
const startDate2 = ref<Date>(new Date());
|
const startDate2 = ref<Date>(new Date());
|
||||||
const endDate = ref<number>(new Date().getFullYear());
|
const endDate = ref<number>(new Date().getFullYear());
|
||||||
|
|
@ -1125,19 +1126,19 @@ const fetchData = async () => {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
level: e.educationLevel,
|
level: e.educationLevel,
|
||||||
levelId: e.educationLevelId,
|
levelId: e.educationLevelId,
|
||||||
positionPath: e.positionPath,
|
positionPath: e.positionPath ? e.positionPath : "-",
|
||||||
isEducation: e.isEducation,
|
isEducation: e.isEducation,
|
||||||
institute: e.institute,
|
institute: e.institute ? e.institute : "-",
|
||||||
degree: e.degree,
|
degree: e.degree ? e.degree : "-",
|
||||||
field: e.field,
|
field: e.field ? e.field : "-",
|
||||||
gpa: e.gpa,
|
gpa: e.gpa ? e.gpa : "-",
|
||||||
country: e.country,
|
country: e.country ? e.country : "-",
|
||||||
duration: e.duration,
|
duration: e.duration ? e.duration : "-",
|
||||||
durationYear: e.durationYear,
|
durationYear: e.durationYear,
|
||||||
other: e.other,
|
other: e.other ? e.other : "-",
|
||||||
fundName: e.fundName,
|
fundName: e.fundName,
|
||||||
isDate: e.isDate == null ? null : e.isDate.toString(),
|
isDate: e.isDate == null ? null : e.isDate.toString(),
|
||||||
finishDate: new Date(e.finishDate),
|
finishDate: e.finishDate ? new Date(e.finishDate) : "-",
|
||||||
startDate: new Date(e.startDate).getFullYear(),
|
startDate: new Date(e.startDate).getFullYear(),
|
||||||
endDate: new Date(e.endDate).getFullYear(),
|
endDate: new Date(e.endDate).getFullYear(),
|
||||||
startDate2: new Date(e.startDate),
|
startDate2: new Date(e.startDate),
|
||||||
|
|
@ -1277,7 +1278,7 @@ const saveData = async () => {
|
||||||
other: other.value,
|
other: other.value,
|
||||||
fundName: fundName.value,
|
fundName: fundName.value,
|
||||||
isDate: isDate.value == "true" ? true : false,
|
isDate: isDate.value == "true" ? true : false,
|
||||||
finishDate: dateToISO(finishDate.value),
|
finishDate: finishDate.value ? dateToISO(finishDate.value) : null,
|
||||||
startDate:
|
startDate:
|
||||||
isDate.value == "true"
|
isDate.value == "true"
|
||||||
? dateToISO(startDate2.value)
|
? dateToISO(startDate2.value)
|
||||||
|
|
@ -1327,7 +1328,7 @@ const editData = async () => {
|
||||||
other: other.value,
|
other: other.value,
|
||||||
fundName: fundName.value,
|
fundName: fundName.value,
|
||||||
isDate: isDate.value == "true" ? true : false,
|
isDate: isDate.value == "true" ? true : false,
|
||||||
finishDate: dateToISO(finishDate.value),
|
finishDate: finishDate.value ? dateToISO(finishDate.value) : null,
|
||||||
startDate:
|
startDate:
|
||||||
isDate.value == "true"
|
isDate.value == "true"
|
||||||
? dateToISO(startDate2.value)
|
? dateToISO(startDate2.value)
|
||||||
|
|
@ -1453,7 +1454,7 @@ const addData = () => {
|
||||||
other.value = "";
|
other.value = "";
|
||||||
fundName.value = "";
|
fundName.value = "";
|
||||||
isDate.value = "true";
|
isDate.value = "true";
|
||||||
finishDate.value = new Date();
|
finishDate.value = null;
|
||||||
startDate.value = new Date().getFullYear();
|
startDate.value = new Date().getFullYear();
|
||||||
endDate.value = new Date().getFullYear();
|
endDate.value = new Date().getFullYear();
|
||||||
startDate2.value = new Date();
|
startDate2.value = new Date();
|
||||||
|
|
@ -1519,7 +1520,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
other: e.other,
|
other: e.other,
|
||||||
fundName: e.fundName,
|
fundName: e.fundName,
|
||||||
isDate: e.isDate,
|
isDate: e.isDate,
|
||||||
finishDate: new Date(e.finishDate),
|
finishDate: e.finishDate ? new Date(e.finishDate) : null,
|
||||||
startDate: new Date(e.startDate).getFullYear(),
|
startDate: new Date(e.startDate).getFullYear(),
|
||||||
endDate: new Date(e.endDate).getFullYear(),
|
endDate: new Date(e.endDate).getFullYear(),
|
||||||
startDate2: new Date(e.startDate2),
|
startDate2: new Date(e.startDate2),
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ interface RequestItemsObject {
|
||||||
other: string;
|
other: string;
|
||||||
fundName: string;
|
fundName: string;
|
||||||
isDate: string | null;
|
isDate: string | null;
|
||||||
finishDate: Date;
|
finishDate: Date | null;
|
||||||
startDate: number;
|
startDate: number;
|
||||||
endDate: number;
|
endDate: number;
|
||||||
startDate2: Date;
|
startDate2: Date;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ interface ResponseObject {
|
||||||
other: string;
|
other: string;
|
||||||
fundName: string;
|
fundName: string;
|
||||||
isDate: string | null;
|
isDate: string | null;
|
||||||
finishDate: Date;
|
finishDate: Date | null | string;
|
||||||
startDate: number;
|
startDate: number;
|
||||||
endDate: number;
|
endDate: number;
|
||||||
startDate2: Date;
|
startDate2: Date;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue