replaced vague notes with specific intended use, also fixed modal on top of modal for reviews
This commit is contained in:
@@ -303,7 +303,7 @@ class TemplateManager {
|
||||
<p><strong>Total Amount:</strong> ${{totalAmount}}</p>
|
||||
<p><strong>Your Earnings:</strong> ${{payoutAmount}}</p>
|
||||
<p><strong>Delivery Method:</strong> {{deliveryMethod}}</p>
|
||||
<p><strong>Renter Notes:</strong> {{rentalNotes}}</p>
|
||||
<p><strong>Intended Use:</strong> {{intendedUse}}</p>
|
||||
<p><a href="{{approveUrl}}" class="button">Review & Respond</a></p>
|
||||
<p>Please respond to this request within 24 hours.</p>
|
||||
`
|
||||
|
||||
@@ -53,7 +53,6 @@ class RentalFlowEmailService {
|
||||
* @param {string} rental.totalAmount - Total rental amount
|
||||
* @param {string} rental.payoutAmount - Owner's payout amount
|
||||
* @param {string} rental.deliveryMethod - Delivery method
|
||||
* @param {string} rental.notes - Rental notes from renter
|
||||
* @returns {Promise<{success: boolean, messageId?: string, error?: string}>}
|
||||
*/
|
||||
async sendRentalRequestEmail(owner, renter, rental) {
|
||||
@@ -88,7 +87,7 @@ class RentalFlowEmailService {
|
||||
? parseFloat(rental.payoutAmount).toFixed(2)
|
||||
: "0.00",
|
||||
deliveryMethod: rental.deliveryMethod || "Not specified",
|
||||
rentalNotes: rental.notes || "No additional notes provided",
|
||||
intendedUse: rental.intendedUse || "Not specified",
|
||||
approveUrl: approveUrl,
|
||||
};
|
||||
|
||||
|
||||
@@ -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