diff --git a/src/modules/04_registry/components/Insignia.vue b/src/modules/04_registry/components/Insignia.vue
index addb42c3f..82db3a859 100644
--- a/src/modules/04_registry/components/Insignia.vue
+++ b/src/modules/04_registry/components/Insignia.vue
@@ -206,11 +206,11 @@
:readonly="!edit"
:borderless="!edit"
v-model="no"
- :rules="[(val:string) => !!val || `${'กรุณากรอกลำดับที่'}`]"
:label="`${'ลำดับที่'}`"
@update:modelValue="clickEditRow"
hide-bottom-space
/>
+
+
+
+
+
+
+
+
();
const section = ref();
const page = ref();
const receiveDate = ref(new Date());
-const dateAnnounce = ref(new Date());
+const dateAnnounce = ref(null);
const refCommandNo = ref();
const refCommandDate = ref(new Date());
const myForm = ref(); //form data input
@@ -567,7 +568,7 @@ const columns = ref([
{
name: "receiveDate",
align: "left",
- label: "ลงวันที่",
+ label: "วันที่ได้รับ",
sortable: true,
field: "receiveDate",
headerStyle: "font-size: 14px",
@@ -924,7 +925,7 @@ const fetchInsignia = async () => {
data.map((r: any) => {
option.push({
id: r.id.toString(),
- name: r.name.toString(),
+ name: r.name.toString() + ` (${r.shortName})`,
typeName:
r.insigniaType == null ? null : r.insigniaType.name.toString(),
});
@@ -954,18 +955,17 @@ const fetchData = async () => {
insignia: e.insignia == null ? null : e.insignia.name,
insigniaId: e.insignia == null ? null : e.insignia.id,
insigniaType: e.insigniaType,
- year: e.year,
- no: e.no,
- issue: e.issue,
- volumeNo: e.volumeNo,
- volume: e.volume,
- section: e.section,
- page: e.page,
+ year: e.year ? e.year : "-",
+ no: e.no ? e.no : "-",
+ issue: e.issue ? e.issue : "-",
+ volumeNo: e.volumeNo ? e.volumeNo : "-",
+ volume: e.volume ? e.volume : "-",
+ section: e.section ? e.section : "-",
+ page: e.page ? e.page : "-",
receiveDate: new Date(e.receiveDate),
- dateAnnounce: new Date(e.dateAnnounce),
- refCommandNo: e.refCommandNo,
- refCommandDate:
- e.refCommandDate == null ? null : new Date(e.refCommandDate),
+ dateAnnounce: e.dateAnnounce ? new Date(e.dateAnnounce) : "-",
+ refCommandNo: e.refCommandNo ? e.refCommandNo : "-",
+ refCommandDate: e.refCommandDate ? new Date(e.refCommandDate) : "-",
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
});
@@ -1088,7 +1088,7 @@ const saveData = async () => {
section: section.value,
page: page.value,
receiveDate: dateToISO(receiveDate.value),
- dateAnnounce: dateToISO(dateAnnounce.value),
+ dateAnnounce: dateAnnounce.value ? dateToISO(dateAnnounce.value) : null,
refCommandNo: refCommandNo.value,
refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value),
@@ -1124,7 +1124,7 @@ const editData = async () => {
section: section.value,
page: page.value,
receiveDate: dateToISO(receiveDate.value),
- dateAnnounce: dateToISO(dateAnnounce.value),
+ dateAnnounce: dateAnnounce.value ? dateToISO(dateAnnounce.value) : null,
refCommandNo: refCommandNo.value,
refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value),
@@ -1239,7 +1239,7 @@ const addData = () => {
section.value = "";
page.value = "";
receiveDate.value = new Date();
- dateAnnounce.value = new Date();
+ dateAnnounce.value = null;
refCommandNo.value = "";
refCommandDate.value = null;
};