replaced vague notes with specific intended use, also fixed modal on top of modal for reviews
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user