| 28071 |
tejbeer |
1 |
$(function() {
|
|
|
2 |
|
| 28381 |
tejbeer |
3 |
$(document).on('click', '.retail-block-brand-submit', function() {
|
|
|
4 |
var brand = $('#block-brand').val();
|
|
|
5 |
var fofoIds = $('#selected-block-ids').val();
|
|
|
6 |
if (confirm("Are you sure you want to submit") == true) {
|
|
|
7 |
doPostAjaxRequestHandler(context + "/getRetailerBlockBrandMappping?brand=" + brand + "&fofoIds=" + fofoIds,
|
|
|
8 |
function(response) {
|
|
|
9 |
if (response = true) {
|
|
|
10 |
|
|
|
11 |
alert("Successfully Submitted");
|
|
|
12 |
$("button.block-brand-submit").click();
|
|
|
13 |
}
|
|
|
14 |
});
|
|
|
15 |
}
|
|
|
16 |
});
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
$(document).on('click', '.block-brand-submit', function() {
|
|
|
21 |
|
|
|
22 |
var brand = $('#block-brand').val();
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
doGetAjaxRequestHandler(context + "/getBlockBrand?brand=" + brand,
|
| 28071 |
tejbeer |
26 |
function(response) {
|
| 28381 |
tejbeer |
27 |
$('.partnersbyblockbrands').html(response);
|
| 28071 |
tejbeer |
28 |
});
|
| 28381 |
tejbeer |
29 |
|
|
|
30 |
|
|
|
31 |
});
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
$(document).on('click', '.brands-limit-submit', function() {
|
|
|
37 |
|
|
|
38 |
var brand = $('#show-brands').val();
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
doGetAjaxRequestHandler(context + "/getRetailerBrandslimitMapping?brand=" + brand,
|
|
|
42 |
function(response) {
|
|
|
43 |
$('.partnerByBrandsLimit').html(response);
|
| 28071 |
tejbeer |
44 |
});
|
| 28381 |
tejbeer |
45 |
})
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
$(document).on('click', '.pincode-submit', function() {
|
|
|
51 |
|
|
|
52 |
var fofoId = partnerId;
|
|
|
53 |
var pincode = $('#partnerPincode').val();
|
|
|
54 |
|
|
|
55 |
console.log("pin" + pincode);
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
doPostAjaxRequestHandler(context + "/setPartnerPincode?pincode=" + pincode + "&fofoId=" + fofoId,
|
| 28071 |
tejbeer |
59 |
function(response) {
|
| 28381 |
tejbeer |
60 |
$('.partner-pincode-container').html(response);
|
|
|
61 |
|
| 28071 |
tejbeer |
62 |
});
|
|
|
63 |
|
| 28381 |
tejbeer |
64 |
});
|
|
|
65 |
|
|
|
66 |
$(document).on('click', '.pincode-serach-submit', function() {
|
|
|
67 |
|
|
|
68 |
var pincode = $('#searchPincode').val();
|
|
|
69 |
|
|
|
70 |
console.log("pin" + pincode);
|
|
|
71 |
doGetAjaxRequestHandler(context + "/searchPincodePartner?pincode=" + pincode,
|
|
|
72 |
function(response) {
|
|
|
73 |
$('.pincode-container').html(response);
|
|
|
74 |
|
|
|
75 |
});
|
|
|
76 |
|
|
|
77 |
});
|
|
|
78 |
|
|
|
79 |
$(document).on('click', '.remove-pincode', function() {
|
|
|
80 |
var pin = $(this).data('pin');
|
|
|
81 |
var id = $(this).data('id');
|
|
|
82 |
var fofoId = $(this).data('fofoid');
|
|
|
83 |
console.log(pin);
|
|
|
84 |
console.log(fofoId);
|
|
|
85 |
if (confirm("Are you sure you want to remove this pincode") == true) {
|
|
|
86 |
doPostAjaxRequestHandler(context + "/removeSearchPincode?id=" + id + "&fofoId=" + fofoId + "&pin=" + pin,
|
|
|
87 |
function(response) {
|
|
|
88 |
|
|
|
89 |
$('.pincode-container').html(response);
|
|
|
90 |
|
|
|
91 |
});
|
|
|
92 |
}
|
|
|
93 |
});
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
$(document).on('click', ".pincode-delete", function() {
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
var id = $(this).data('id');
|
|
|
102 |
var fofoId = $(this).data('fofoid');
|
|
|
103 |
console.log(fofoId);
|
|
|
104 |
if (confirm("Are you sure you want to remove this pincode") == true) {
|
|
|
105 |
doPostAjaxRequestHandler(context + "/removePartnerPincode?id=" + id + "&fofoId=" + fofoId,
|
|
|
106 |
function(response) {
|
|
|
107 |
|
|
|
108 |
$('.partner-pincode-container').html(response);
|
|
|
109 |
|
|
|
110 |
});
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
});
|
|
|
114 |
|
| 28071 |
tejbeer |
115 |
});
|