Subversion Repositories SmartDukaan

Rev

Rev 30019 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

$(document).on('click', ".send-notification", function () {
    let regionId = $('#regionType').val();
    if (regionId == "") {
        alert("Please Select Region");
    } else if ($("#typeaheaditem").size() < 9) {
        alert("Please Select Complete model");
    } else if (typeof itemCatalogId == "undefined") {
        alert("Model not selected");
    } else if (confirm("Are you sure want to send PO Notification")) {
        let postParams = {
            "regionId": regionId, "catalogId": itemCatalogId
        }

        doPostAjaxRequestWithParamsHandler(context + "po/send-notification", params, function (response) {
            alert("Notification sent successfully");
            loadModel("main-content");
        });
    }
});

$(document).on('click', '.notify-po', function () {
    createPO();
});

function createPO() {
    doGetAjaxRequestHandler(`${context}/indent/send-po-notification`, function (response) {
        $('#main-content').html(response);
    });
}