update info bid submitted mail
This commit is contained in:
parent
eea9d09d86
commit
2d80eefd70
|
|
@ -360,15 +360,23 @@ export class MailsService {
|
|||
}
|
||||
|
||||
getBidSubmittedEmailContent(bid: Bid): string {
|
||||
const histories = _.orderBy(bid.histories || [], ['price'], ['desc']);
|
||||
|
||||
const webname = extractDomain(bid.web_bid.origin_url);
|
||||
const title = `[${webname}] ${bid.name || 'Unnamed Item'}`;
|
||||
const endTime = formatEndTime(bid.close_time, false);
|
||||
const competitor = `$${bid.current_price}`;
|
||||
const max = `$${bid.max_price}`;
|
||||
const submitted = `$${bid.max_price}`;
|
||||
const maxReached = bid.max_price <= bid.max_price;
|
||||
const submitted =
|
||||
bid.max_price == histories[0]?.price
|
||||
? `$${bid.max_price}`
|
||||
: `$${histories[0]?.price}`;
|
||||
const maxReached = bid.max_price == histories[0]?.price;
|
||||
// const maxReached = bid.max_price <= bid.max_price;
|
||||
const from = process.env.MAIL_USER || 'no-reply@example.com';
|
||||
|
||||
console.log({ histories, maxReached, submitted });
|
||||
|
||||
return `
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
|
|
|||
Loading…
Reference in New Issue