| 30016 |
amit.gupta |
1 |
$(document).on('click', ".send-notification", function () {
|
|
|
2 |
let regionId = $('#regionType').val();
|
|
|
3 |
if (regionId == "") {
|
|
|
4 |
alert("Please Select Region");
|
|
|
5 |
} else if ($("#typeaheaditem").size() < 9) {
|
|
|
6 |
alert("Please Select Complete model");
|
|
|
7 |
} else if (typeof itemCatalogId == "undefined") {
|
|
|
8 |
alert("Model not selected");
|
|
|
9 |
} else if (confirm("Are you sure want to send PO Notification")) {
|
|
|
10 |
let postParams = {
|
|
|
11 |
"regionId": regionId, "catalogId": itemCatalogId
|
|
|
12 |
}
|
|
|
13 |
|
|
|
14 |
doPostAjaxRequestWithParamsHandler(context + "po/send-notification", params, function (response) {
|
|
|
15 |
alert("Notification sent successfully");
|
|
|
16 |
loadModel("main-content");
|
|
|
17 |
});
|
|
|
18 |
}
|
|
|
19 |
});
|
|
|
20 |
|
|
|
21 |
$(document).on('click', '.notify-po', function () {
|
|
|
22 |
createPO();
|
|
|
23 |
});
|
|
|
24 |
|
|
|
25 |
function createPO() {
|
|
|
26 |
doGetAjaxRequestHandler(`${context}/indent/send-po-notification`, function (response) {
|
|
|
27 |
$('#main-content').html(response);
|
|
|
28 |
});
|
|
|
29 |
}
|