refactor mylistings and my rentals
This commit is contained in:
@@ -442,7 +442,7 @@ class EmailService {
|
||||
<p><strong>Rental Period:</strong> {{startDate}} to {{endDate}}</p>
|
||||
{{earningsSection}}
|
||||
{{stripeSection}}
|
||||
<p><a href="{{myListingsUrl}}" class="button">View My Listings</a></p>
|
||||
<p><a href="{{owningUrl}}" class="button">View My Listings</a></p>
|
||||
`
|
||||
),
|
||||
|
||||
@@ -697,7 +697,7 @@ class EmailService {
|
||||
|
||||
async sendRentalRequestEmail(rental) {
|
||||
const frontendUrl = process.env.FRONTEND_URL || "http://localhost:3000";
|
||||
const approveUrl = `${frontendUrl}/my-listings?rentalId=${rental.id}`;
|
||||
const approveUrl = `${frontendUrl}/owning?rentalId=${rental.id}`;
|
||||
|
||||
// Fetch owner details
|
||||
const owner = await User.findByPk(rental.ownerId, {
|
||||
@@ -754,7 +754,7 @@ class EmailService {
|
||||
|
||||
async sendRentalRequestConfirmationEmail(rental) {
|
||||
const frontendUrl = process.env.FRONTEND_URL || "http://localhost:3000";
|
||||
const viewRentalsUrl = `${frontendUrl}/my-rentals`;
|
||||
const viewRentalsUrl = `${frontendUrl}/renting`;
|
||||
|
||||
// Fetch renter details
|
||||
const renter = await User.findByPk(rental.renterId, {
|
||||
@@ -1539,7 +1539,7 @@ class EmailService {
|
||||
paymentMessage: paymentMessage,
|
||||
earningsSection: earningsSection,
|
||||
stripeSection: stripeSection,
|
||||
rentalDetailsUrl: `${frontendUrl}/my-listings?rentalId=${rental.id}`,
|
||||
rentalDetailsUrl: `${frontendUrl}/owning?rentalId=${rental.id}`,
|
||||
};
|
||||
|
||||
const htmlContent = this.renderTemplate(
|
||||
@@ -1615,7 +1615,7 @@ class EmailService {
|
||||
</ul>
|
||||
</div>
|
||||
<p style="text-align: center;">
|
||||
<a href="${frontendUrl}/my-rentals?rentalId=${rental.id}&action=review" class="button">Leave a Review</a>
|
||||
<a href="${frontendUrl}/renting?rentalId=${rental.id}&action=review" class="button">Leave a Review</a>
|
||||
</p>
|
||||
`;
|
||||
} else {
|
||||
@@ -1749,7 +1749,7 @@ class EmailService {
|
||||
returnedDate: returnedDate,
|
||||
earningsSection: earningsSection,
|
||||
stripeSection: stripeSection,
|
||||
myListingsUrl: `${frontendUrl}/my-listings`,
|
||||
owningUrl: `${frontendUrl}/owning`,
|
||||
};
|
||||
|
||||
const ownerHtmlContent = this.renderTemplate(
|
||||
|
||||
Reference in New Issue
Block a user