From e3a9b8b6f958e5cbb02a670d75752b3a935e4c13 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 18 Jul 2026 14:00:26 +0100 Subject: [PATCH] Update Payment model to add 'postedAt', 'authorisedAt', and 'cancelledAt' fields while removing redundant definitions for improved data structure and clarity. --- src/database/models/Payment.js | 56 +++++++++++++--------------------- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/src/database/models/Payment.js b/src/database/models/Payment.js index 7dc43f0..f847369 100644 --- a/src/database/models/Payment.js +++ b/src/database/models/Payment.js @@ -186,6 +186,13 @@ export const Payment = { readOnly: true, columnWidth: 250 }, + { + name: 'postedAt', + label: 'Posted At', + type: 'dateTime', + readOnly: true, + columnWidth: 175 + }, { name: 'invoice', label: 'Invoice', @@ -195,6 +202,13 @@ export const Payment = { showHyperlink: true, columnWidth: 200 }, + { + name: 'authorisedAt', + label: 'Authorised At', + type: 'dateTime', + readOnly: true, + columnWidth: 175 + }, { name: 'payTo', label: 'Pay To', @@ -211,27 +225,6 @@ export const Payment = { return objectData?.invoice?.from } }, - { - name: 'paymentDate', - label: 'Payment Date', - type: 'dateTime', - required: true, - columnWidth: 175 - }, - { - name: 'postedAt', - label: 'Posted At', - type: 'dateTime', - readOnly: true, - columnWidth: 175 - }, - { - name: 'authorisedAt', - label: 'Authorised At', - type: 'dateTime', - readOnly: true, - columnWidth: 175 - }, { name: 'declinedAt', label: 'Declined At', @@ -239,13 +232,6 @@ export const Payment = { readOnly: true, columnWidth: 175 }, - { - name: 'cancelledAt', - label: 'Cancelled At', - type: 'dateTime', - readOnly: true, - columnWidth: 175 - }, { name: 'amount', label: 'Amount', @@ -255,19 +241,19 @@ export const Payment = { required: true, columnWidth: 150 }, + { + name: 'cancelledAt', + label: 'Cancelled At', + type: 'dateTime', + readOnly: true, + columnWidth: 175 + }, { name: 'paymentMethod', label: 'Payment Method', type: 'string', required: false, columnWidth: 150 - }, - { - name: 'notes', - label: 'Notes', - type: 'text', - required: false, - columnWidth: 200 } ], stats: [