From 2662478ff165b39977e3dfe2606798971f069c17 Mon Sep 17 00:00:00 2001 From: Steven Moder Date: Wed, 19 Jun 2024 06:21:27 +0800 Subject: [PATCH] ```text feat: Add userName and handlerName fields to Request type This commit adds the `userName` and `handlerName` fields to the `Request` type in the `request.d.ts` file. These fields store the names of the user and handler associated with the request, providing additional information for request management. --- web/src/apis/requests.ts | 8 + web/src/types/request.d.ts | 2 + web/src/views/home/airline/FlightView.vue | 2 +- web/src/views/home/airline/TicketView.vue | 2 +- web/src/views/home/merchant/GoodsView.vue | 2 +- web/src/views/home/staff/LuggageView.vue | 2 +- web/src/views/home/staff/RequestView.vue | 304 +++++++++++++++++++++- 7 files changed, 317 insertions(+), 5 deletions(-) diff --git a/web/src/apis/requests.ts b/web/src/apis/requests.ts index 20b9781..b2c14a1 100644 --- a/web/src/apis/requests.ts +++ b/web/src/apis/requests.ts @@ -42,3 +42,11 @@ export const deleteRequestAPI = async (id: number): Promise => { export const handleRequestAPI = async (id: number): Promise => { return http.post(`/requests/${id}/handle`).then((res) => res.data); }; + +export const resolveRequestAPI = async (id: number): Promise => { + return http.post(`/requests/${id}/resolve`).then((res) => res.data); +}; + +export const cancelRequestAPI = async (id: number): Promise => { + return http.post(`/requests/${id}/cancel`).then((res) => res.data); +}; diff --git a/web/src/types/request.d.ts b/web/src/types/request.d.ts index bd53e73..0f9abc3 100644 --- a/web/src/types/request.d.ts +++ b/web/src/types/request.d.ts @@ -1,8 +1,10 @@ export type Request = { userId: number; + userName: string; info: string; status: string; handlerId: number; + handlerName: string; createdAt: string; updatedAt: string; }; diff --git a/web/src/views/home/airline/FlightView.vue b/web/src/views/home/airline/FlightView.vue index 62521a3..b969cde 100644 --- a/web/src/views/home/airline/FlightView.vue +++ b/web/src/views/home/airline/FlightView.vue @@ -149,7 +149,7 @@ const columns = [ }} > Modify - {" "} + {" "} + {" "} + {" "} +