no message
This commit is contained in:
parent
d20ef87c5e
commit
30b526a875
4 changed files with 35 additions and 5 deletions
|
|
@ -598,7 +598,20 @@
|
|||
/>
|
||||
<!-- :rules="[(val) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]" -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="note"
|
||||
label="หมายเหตุ"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<DialogFooter
|
||||
|
|
@ -761,6 +774,7 @@ const checkValidate = ref<boolean>(false); //validate data ผ่านหรื
|
|||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
const note = ref<string>()
|
||||
const rows = ref<RequestItemsObject[]>([]);
|
||||
const filter = ref<string>(""); //search data table
|
||||
const visibleColumns = ref<String[]>([]);
|
||||
|
|
@ -780,6 +794,7 @@ profileData.education.columns.length == 0
|
|||
"finishDate",
|
||||
"startDate",
|
||||
"endDate",
|
||||
"note",
|
||||
])
|
||||
: (visibleColumns.value = profileData.education.columns);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -937,6 +952,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "note",
|
||||
align: "left",
|
||||
label: "หมายเหตุ",
|
||||
sortable: true,
|
||||
field: "note",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
]);
|
||||
const columnsHistory = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -1248,6 +1274,7 @@ const fetchData = async () => {
|
|||
endDate2: e.endDate ? new Date(e.endDate) : null,
|
||||
createdFullName: e.createdFullName,
|
||||
createdAt: new Date(e.createdAt),
|
||||
note: e.note,
|
||||
});
|
||||
});
|
||||
console.log(data);
|
||||
|
|
@ -1304,6 +1331,7 @@ const getData = () => {
|
|||
startDate.value = row.startDate;
|
||||
endDate.value = row.endDate;
|
||||
startDate2.value = row.startDate2;
|
||||
note.value = row.note;
|
||||
inputStartDate.value = row.startDate
|
||||
? (Number(row.startDate) + 543).toLocaleString()
|
||||
: "";
|
||||
|
|
@ -1437,6 +1465,7 @@ const saveData = async () => {
|
|||
? dateToISO(endDate2.value as Date)
|
||||
: null
|
||||
: new Date(`${endDate.value}-01-01`),
|
||||
note:note.value
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -1487,6 +1516,7 @@ const editData = async () => {
|
|||
isDate.value == "true"
|
||||
? dateToISO(endDate2.value as Date)
|
||||
: new Date(`${endDate.value}-01-01`),
|
||||
note:note.value
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -1583,6 +1613,7 @@ const selectData = async (_props: DataProps) => {
|
|||
startDate2.value = _props.row.startDate2;
|
||||
endDate2.value = _props.row.endDate2;
|
||||
id.value = _props.row.id;
|
||||
note.value = _props.row.note;
|
||||
inputStartDate.value = _props.row.startDate
|
||||
? (Number(_props.row.startDate) + 543).toLocaleString()
|
||||
: "";
|
||||
|
|
@ -1630,6 +1661,7 @@ const addData = () => {
|
|||
inputStartDate.value = "";
|
||||
inputEndDate.value = "";
|
||||
finishDateInput.value = "";
|
||||
note.value = "";
|
||||
|
||||
dayChecked2.value = false;
|
||||
dayEndChecked2.value = false;
|
||||
|
|
@ -1695,6 +1727,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
durationYear: e.durationYear,
|
||||
other: e.other,
|
||||
fundName: e.fundName,
|
||||
note: e.note,
|
||||
isDate: e.isDate,
|
||||
finishDate: e.finishDate ? new Date(e.finishDate) : null,
|
||||
startDate: new Date(e.startDate).getFullYear(),
|
||||
|
|
|
|||
|
|
@ -64,9 +64,6 @@
|
|||
:label="`${'วันที่'}`"
|
||||
mask="##/##/####"
|
||||
dense
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||
:error="dayChecked"
|
||||
error-message="กรุณากรอกวันที่"
|
||||
/>
|
||||
|
||||
<datepicker
|
||||
|
|
@ -93,8 +90,6 @@
|
|||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date2Thai(date)"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'วันที่'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ interface RequestItemsObject {
|
|||
endDate2: Date|null;
|
||||
createdFullName: string;
|
||||
createdAt: Date;
|
||||
note: string;
|
||||
}
|
||||
|
||||
//columns
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ interface ResponseObject {
|
|||
endDate2: Date;
|
||||
createdFullName: string;
|
||||
createdAt: Date;
|
||||
note: string;
|
||||
}
|
||||
|
||||
export type { ResponseObject };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue