replaced vague notes with specific intended use, also fixed modal on top of modal for reviews

This commit is contained in:
jackiettran
2025-11-25 16:40:42 -05:00
parent 13268784fd
commit 8de814fdee
16 changed files with 282 additions and 85 deletions

View File

@@ -60,10 +60,9 @@ class LateReturnService {
* Process late return and update rental with fees
* @param {string} rentalId - Rental ID
* @param {Date} actualReturnDateTime - When item was returned
* @param {string} notes - Optional notes about the return
* @returns {Object} - Updated rental with late fee information
*/
static async processLateReturn(rentalId, actualReturnDateTime, notes = null) {
static async processLateReturn(rentalId, actualReturnDateTime) {
const rental = await Rental.findByPk(rentalId, {
include: [{ model: Item, as: "item" }],
});
@@ -84,10 +83,6 @@ class LateReturnService {
payoutStatus: "pending",
};
if (notes) {
updates.notes = notes;
}
const updatedRental = await rental.update(updates);
// Send notification to customer service if late return detected