Started deleting of ads.
This commit is contained in:
@@ -202,16 +202,37 @@ const generateCheckUpEmail = searchRequest => {
|
||||
${emailFooter}`;
|
||||
};
|
||||
|
||||
const generateNewAdPublishEmail = (realEstate, numberOfMatchingRequests) => {
|
||||
const generateNewAdPublishEmail = (
|
||||
realEstate,
|
||||
kiviOriginal,
|
||||
numberOfMatchingRequests
|
||||
) => {
|
||||
let countingPrefix;
|
||||
if (
|
||||
numberOfMatchingRequests === 2 ||
|
||||
numberOfMatchingRequests === 3 ||
|
||||
numberOfMatchingRequests === 4
|
||||
) {
|
||||
countingPrefix = "postoje";
|
||||
} else {
|
||||
countingPrefix = "postoji";
|
||||
}
|
||||
let countingSufix;
|
||||
if (numberOfMatchingRequests % 10 === 1 && numberOfMatchingRequests !== 11) {
|
||||
countingSufix = "zahtjev";
|
||||
} else {
|
||||
countingSufix = "zahtjeva";
|
||||
}
|
||||
|
||||
return `<h3>${stagingTag}Zdravo</h3>
|
||||
<div>Uspješno ste objavili oglas za Vašu nekretninu na <strong>Kivi.ba.</strong><div>
|
||||
<br/>
|
||||
<div>U Kivi bazi trenutno postoji ${numberOfMatchingRequests} zahtjeva za nekretninom kao sto je Vaša.</div>
|
||||
<div>U Kivi bazi trenutno ${countingPrefix} ${numberOfMatchingRequests} ${countingSufix} za nekretninom kao sto je Vaša.</div>
|
||||
<br />
|
||||
<div>Pregledajte Vaš oglas na sljedećem linku: <a href="${realEstate.url}" rel="noreferrer">${realEstate.title}</a><div>
|
||||
<br/>
|
||||
<div>Ako želite izmijeniti detalje oglasa, <a href="#">izmjenite ovdje</a></div>
|
||||
<div>Ako želite izbrisati Vaš oglas iz Kivi baze, <a href="#">izbrišite ovdje</a></div>
|
||||
<div>Ako želite izmijeniti detalje oglasa, <a href="#">izmjenite ovdje.</a></div>
|
||||
<div>Ako želite izbrisati Vaš oglas iz Kivi baze, <a href="${APP_URL}/obrisioglas/${kiviOriginal.kiviAdId}">izbrišite ovdje.</a></div>
|
||||
<br/>
|
||||
<div>Hvala na ukazanom povjerenju!</div>
|
||||
<br/>
|
||||
|
||||
Reference in New Issue
Block a user