Subversion Repositories SmartDukaan

Rev

Rev 30016 | Rev 30022 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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 () {
30019 amit.gupta 22
    sendPONotification();
30016 amit.gupta 23
});
24
 
30019 amit.gupta 25
function sendPONotification() {
30016 amit.gupta 26
    doGetAjaxRequestHandler(`${context}/indent/send-po-notification`, function (response) {
27
        $('#main-content').html(response);
28
    });
29
}