ต่อ api delete notification

This commit is contained in:
AnandaTon 2023-09-11 12:13:24 +07:00
parent 7f47b78067
commit 7c957419ae
2 changed files with 17 additions and 14 deletions

View file

@ -8,4 +8,5 @@ const message = `${env.API_PLACEMENT_URI}/message`;
export default { export default {
msgNotificate: `${message}/my-notifications`, msgNotificate: `${message}/my-notifications`,
msgInbox: `${message}/my-inboxes`, msgInbox: `${message}/my-inboxes`,
msgId: (id: string) => `${message}/my-notifications/${id}`,
}; };

View file

@ -39,6 +39,7 @@ const {
const DataStore = useroleUserDataStore(); const DataStore = useroleUserDataStore();
const { fetchroleUser } = DataStore; const { fetchroleUser } = DataStore;
const id = ref<string>("");
const $q = useQuasar(); const $q = useQuasar();
const { tabData, loader } = storeToRefs(store); const { tabData, loader } = storeToRefs(store);
const { changeTab } = store; const { changeTab } = store;
@ -405,19 +406,20 @@ if (keycloak.tokenParsed != null) {
} }
const deleteData = async (id: string) => { const deleteData = async (id: string) => {
await http; console.log("delete=", id);
// .delete(config.API.copyOrderId(id)) showLoader();
// .then((res) => { await http
// // const data = res.data.result; .delete(config.API.msgId(id))
// // console.log(res); .then((res) => {
// success($q, ""); success($q, "ลบข้อมูลสำเร็จ");
// }) })
// .catch((e) => { .catch((e) => {
// messageError($q, e); messageError($q, e);
// }) })
// .finally(async () => { .finally(async () => {
// // hideLoader(); getDataNotification();
// }); hideLoader();
});
}; };
const clickDelete = (id: string) => { const clickDelete = (id: string) => {
@ -509,7 +511,7 @@ const clickDelete = (id: string) => {
dense dense
icon="mdi-close" icon="mdi-close"
class="mybtn q-mx-xs" class="mybtn q-mx-xs"
@click="clickDelete" @click="clickDelete(n.id)"
></q-btn> ></q-btn>
</q-item> </q-item>
<q-separator color="grey-2" /> <q-separator color="grey-2" />