| 29978 |
amit.gupta |
1 |
<section class="wrapper">
|
|
|
2 |
<div class="row">
|
|
|
3 |
<div class="col-lg-12">
|
|
|
4 |
<ol class="breadcrumb">
|
|
|
5 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
6 |
<li><i class="icon_document_alt"></i>SEND NOTIFICATION</li>
|
|
|
7 |
</ol>
|
|
|
8 |
</div>
|
|
|
9 |
</div>
|
|
|
10 |
|
|
|
11 |
<div class="row" style="background:white;background-color:white;padding:10px;min-height:600px">
|
|
|
12 |
|
|
|
13 |
<form>
|
|
|
14 |
<div class="col-lg-2">
|
|
|
15 |
<div class="form-group">
|
|
|
16 |
<label for="exampleFormControlSelect1">Select Warehouse</label>
|
|
|
17 |
<select class="form-control" id="warehouseId">
|
|
|
18 |
#foreach($warehouse in $warehouses.entrySet())
|
|
|
19 |
<option value="$warehouse.getKey()">$warehouse.getValue()</option>
|
|
|
20 |
#end
|
|
|
21 |
</select>
|
|
|
22 |
</div>
|
|
|
23 |
</div>
|
|
|
24 |
<div class="col-lg-3">
|
|
|
25 |
<label for="exampleFormControlSelect1">Choose Model</label>
|
|
|
26 |
<div class="input-group">
|
|
|
27 |
<input type="text" class="form-control typeahead" id="entityData"
|
|
|
28 |
placeholder="Search Models"> <span class="input-group-btn">
|
|
|
29 |
<button id="model-to-notify" class="btn btn-default" type="button">Select Model</button>
|
|
|
30 |
</span>
|
|
|
31 |
</div>
|
|
|
32 |
</div>
|
|
|
33 |
</form>
|
|
|
34 |
</div>
|
|
|
35 |
</section>
|
|
|
36 |
<script type="text/javascript">
|
|
|
37 |
$(document).ready(function () {
|
|
|
38 |
getEntityAheadOptions($("#entityData"), function (selectedEntity) {
|
|
|
39 |
itemCatalogId = selectedEntity.catalogId_i;
|
| 30017 |
amit.gupta |
40 |
itemTitle = selectedEntity.title_s
|
| 29978 |
amit.gupta |
41 |
});
|
|
|
42 |
$("#model-to-notify").click(function () {
|
| 30017 |
amit.gupta |
43 |
colorNumberHandler(itemCatalogId, 0, 'Notify for ' + itemTitle, 'Notify', function (itemQuantity, callback) {
|
|
|
44 |
let poItemWarehouseModel = {
|
|
|
45 |
warehouseId: $("#warehouseId").val(),
|
|
|
46 |
itemIdQuantityList: itemQuantity
|
|
|
47 |
}
|
|
|
48 |
doPostAjaxRequestWithJsonHandler(`${context}/indent/send-po-notification`, JSON.stringify(poItemWarehouseModel), function (response) {
|
|
|
49 |
if (response) {
|
|
|
50 |
alert("Notified Successfully");
|
|
|
51 |
}
|
|
|
52 |
callback();
|
|
|
53 |
})
|
|
|
54 |
})
|
| 29978 |
amit.gupta |
55 |
});
|
|
|
56 |
});
|
|
|
57 |
</script>
|