Subversion Repositories SmartDukaan

Rev

Rev 36522 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36522 Rev 36703
Line 161... Line 161...
161
            alert("Offer deleted");
161
            alert("Offer deleted");
162
            $clicked.closest('tr').remove();
162
            $clicked.closest('tr').remove();
163
        });
163
        });
164
    }
164
    }
165
});
165
});
-
 
166
// Evicts monthOfferIds + catalog.published_yearmonth + todayOffers caches, then reloads listing
-
 
167
$(document).on('click', 'a.refresh-offer-cache', function () {
-
 
168
    let yearMonth = $("#yearmonth").val();
-
 
169
    if (!yearMonth) {
-
 
170
        yearMonth = new Date().toISOString().slice(0, 7);
-
 
171
    }
-
 
172
    doGetAjaxRequestHandler(`${context}/offer/refreshCache?yearMonth=${yearMonth}`, function (response) {
-
 
173
        alert(response);
-
 
174
        loadOfferHistory('#main-content', yearMonth);
-
 
175
    });
-
 
176
});
166
$(document).on('click', '#publish-all-btn', function () {
177
$(document).on('click', '#publish-all-btn', function () {
167
    let yearMonth = $("#yearmonth").val();
178
    let yearMonth = $("#yearmonth").val();
168
    if (!yearMonth) {
179
    if (!yearMonth) {
169
        yearMonth = new Date().toISOString().slice(0, 7);
180
        yearMonth = new Date().toISOString().slice(0, 7);
170
    }
181
    }