diff --git a/src/interface/response/dashboard/dashboard.ts b/src/interface/response/dashboard/dashboard.ts index e6320ecfa..5f144bb2b 100644 --- a/src/interface/response/dashboard/dashboard.ts +++ b/src/interface/response/dashboard/dashboard.ts @@ -21,6 +21,7 @@ interface DataInbox { subject: string; timereceive: Date; body: string; + payload: string; ratingModel: number; } diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index a6c72593d..917097a25 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -20,6 +20,7 @@ const { success, messageError, date2Thai, + dialogRemove } = mixin; const iteminbox = ref([]); @@ -53,6 +54,7 @@ const data = ref([ // ratingModel: 0, // }, ]); +const payLoadtext = ref() const btnReply = ref(true); const listpayload = ref([]); const listpayloadNolink = ref([]); @@ -85,7 +87,7 @@ const getData = async () => { .get(config.API.msgInbox) .then((res: any) => { const response = res.data.result; - // console.log(response); + console.log(response); let list: DataInbox[] = []; response.map((e: ResponseInbox) => { list.push({ @@ -97,6 +99,7 @@ const getData = async () => { subject: e.subject ?? "", timereceive: new Date(e.createdAt), body: e.body ?? "", + payload: e.payload, ratingModel: 0, }); }); @@ -114,6 +117,28 @@ const selectInbox = (id: string) => { link.value = id; data.value = inboxList.value.filter((r) => r.no == id); }; +const deleteData = (id:string) => { + dialogRemove($q, () => removeData(id)) +} + +//รอ api ลบ +const removeData = async (id:string) => { + console.log("delete=",id) + +// showLoader(); +// await http +// .delete(config.API.) +// .then((res) => { +// success($q, "ลบข้อมูลสำเร็จ"); +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// getData() +// hideLoader() +// }) +} @@ -143,7 +168,7 @@ const selectInbox = (id: string) => { > { }} - + /> --> + { bordered :style="$q.screen.gt.xs ? 'height: 80vh' : 'height: auto;'" > -
+
@@ -243,30 +270,31 @@ const selectInbox = (id: string) => { date2Thai(d.timereceive) }}
- + /> --> - + /> -->
@@ -281,19 +309,19 @@ const selectInbox = (id: string) => { >
-
+
- เอกสารแนบ (10 MB) + เอกสารแนบ
- + /> -->