From 94965871289259fa20e0f7816c64ca68270a657d Mon Sep 17 00:00:00 2001 From: Kavehhn174 Date: Sun, 16 Aug 2026 08:01:37 +0330 Subject: [PATCH] feat: add admin transaction edit UI on payment detail page Wire create and update flows to admin transaction endpoints with status, amount, and date fields. --- src/api/paymentApi.js | 3 +- src/views/payments/PaymentDetailView.vue | 165 ++++++++++++++++++++++- 2 files changed, 160 insertions(+), 8 deletions(-) diff --git a/src/api/paymentApi.js b/src/api/paymentApi.js index 7c26f1b..2198dc0 100644 --- a/src/api/paymentApi.js +++ b/src/api/paymentApi.js @@ -8,5 +8,6 @@ export const paymentApi = { create: (data) => axiosInstance.post('/payments/admin/create', data), update: (id, data) => axiosInstance.put(`/payments/admin/update/${id}`, data), delete: (id) => axiosInstance.delete(`/payments/admin/delete/${id}`), - recordTransaction: (paymentId, data) => axiosInstance.post(`/payments/user/pay/${paymentId}`, data) + recordTransaction: (paymentId, data) => axiosInstance.post(`/payments/admin/transactions/${paymentId}`, data), + updateTransaction: (transactionId, data) => axiosInstance.put(`/payments/admin/transactions/${transactionId}`, data) }; diff --git a/src/views/payments/PaymentDetailView.vue b/src/views/payments/PaymentDetailView.vue index f769ed1..fa84cd9 100644 --- a/src/views/payments/PaymentDetailView.vue +++ b/src/views/payments/PaymentDetailView.vue @@ -108,6 +108,13 @@ {{ data.notes || '—' }} + + + @@ -118,14 +125,26 @@
- +
+ + +
+
- + + +
+
+ + +
+
+
@@ -145,6 +164,51 @@