| 27763 |
tejbeer |
1 |
$(function() {
|
| 27829 |
tejbeer |
2 |
$(document).on('click', '.submit1', function() {
|
|
|
3 |
var row = $(this).closest("tr");
|
|
|
4 |
console.log(row);
|
|
|
5 |
var rowIndex = $(this).closest('tr').prevAll().length;
|
| 27884 |
tejbeer |
6 |
|
| 27829 |
tejbeer |
7 |
var data0 = $(row).find("td:eq(0)").text();
|
| 27833 |
tejbeer |
8 |
|
| 27836 |
tejbeer |
9 |
var data1 = $(row).find("td:eq(1)").text();
|
| 27833 |
tejbeer |
10 |
var data2 = $(row).find("td:eq(2)").text();
|
| 27829 |
tejbeer |
11 |
if (data2 != "") {
|
|
|
12 |
data2 = data2 + "T00:00:00";
|
|
|
13 |
}
|
| 27833 |
tejbeer |
14 |
var data3 = $(row).find("td:eq(3) input[type='date']").val();
|
|
|
15 |
if (data3 != "") {
|
|
|
16 |
data3 = data3 + "T00:00:00";
|
|
|
17 |
}
|
|
|
18 |
var data4 = $(row).find("td:eq(4) input[type='text']").val();
|
|
|
19 |
|
|
|
20 |
var data5 = $(row).find("td:eq(5) input[type='number']").val();
|
| 28600 |
amit.gupta |
21 |
var address = $(row).find("td:eq(6) input[type='text']").val();
|
|
|
22 |
var data6 = $(row).find("td:eq(7) input[type='text']").val();
|
|
|
23 |
var data7 = $(row).find("td:eq(8) input[type='text']").val();
|
|
|
24 |
var data8 = $(row).find("td:eq(9) input[type='text']").val();
|
| 27763 |
tejbeer |
25 |
|
| 28600 |
amit.gupta |
26 |
var data9 = $(row).find("td:eq(10) input[type='text']").val();
|
|
|
27 |
var data10 = $(row).find("td:eq(11) input[type='text']").val();
|
|
|
28 |
var data11 = $(row).find("td:eq(12) input[type='date']").val();
|
| 27884 |
tejbeer |
29 |
if (data11 != "") {
|
|
|
30 |
data11 = data11 + "T00:00:00";
|
|
|
31 |
}
|
| 27813 |
tejbeer |
32 |
|
| 28600 |
amit.gupta |
33 |
var data12 = $(row).find("td:eq(13) input[type='text']").val();
|
| 27833 |
tejbeer |
34 |
|
| 28600 |
amit.gupta |
35 |
var data13 = $(row).find("td:eq(14) input[type='date']").val();
|
| 27884 |
tejbeer |
36 |
if (data13 != "") {
|
|
|
37 |
data13 = data13 + "T00:00:00";
|
| 27829 |
tejbeer |
38 |
}
|
| 27884 |
tejbeer |
39 |
var data14 = $(row).find(".kyc input[type=hidden]").val();
|
|
|
40 |
var data15 = $(row).find(".aadhar input[type=hidden]").val();
|
|
|
41 |
var data16 = $(row).find(".pan input[type=hidden]").val();
|
|
|
42 |
var data17 = $(row).find(".gst input[type=hidden]").val();
|
|
|
43 |
var data18 = $(row).find(".cancheque input[type=hidden]").val();
|
|
|
44 |
var data19 = $(row).find(".rent input[type=hidden]").val();
|
|
|
45 |
console.log("data19" + data19);
|
|
|
46 |
var data20 = $(row).find(".loi input[type=hidden]").val();
|
| 27829 |
tejbeer |
47 |
console.log("data18" + data18);
|
| 28600 |
amit.gupta |
48 |
var data21 = $(row).find("td:eq(23) input[type='text']").val();
|
|
|
49 |
var data22 = $(row).find("td:eq(23) input[type='date']").val();
|
| 27829 |
tejbeer |
50 |
if (data22 != "") {
|
|
|
51 |
data22 = data22 + "T00:00:00";
|
|
|
52 |
}
|
| 28600 |
amit.gupta |
53 |
var data23 = $(row).find("td:eq(24) input[type='date']").val();
|
| 27829 |
tejbeer |
54 |
if (data23 != "") {
|
|
|
55 |
data23 = data23 + "T00:00:00";
|
|
|
56 |
}
|
| 28600 |
amit.gupta |
57 |
var data24 = $(row).find("td:eq(25) input[type='date']").val();
|
| 27833 |
tejbeer |
58 |
if (data24 != "") {
|
|
|
59 |
data24 = data24 + "T00:00:00";
|
| 27829 |
tejbeer |
60 |
}
|
| 28600 |
amit.gupta |
61 |
var data25 = $(row).find("td:eq(26) input[type='date']").val();
|
| 27884 |
tejbeer |
62 |
if (data25 != "") {
|
|
|
63 |
data25 = data25 + "T00:00:00";
|
| 27829 |
tejbeer |
64 |
}
|
| 28600 |
amit.gupta |
65 |
var data26 = $(row).find("td:eq(27) input[type='text']").val();
|
| 27813 |
tejbeer |
66 |
|
| 28600 |
amit.gupta |
67 |
var data27 = $(row).find("td:eq(28) input[type='date']").val();
|
| 27833 |
tejbeer |
68 |
if (data27 != "") {
|
|
|
69 |
data27 = data27 + "T00:00:00";
|
|
|
70 |
}
|
| 27829 |
tejbeer |
71 |
|
| 28600 |
amit.gupta |
72 |
var data28 = $(row).find("td:eq(29) input[type='date']").val();
|
| 27833 |
tejbeer |
73 |
|
| 27884 |
tejbeer |
74 |
if (data28 != "") {
|
|
|
75 |
data28 = data28 + "T00:00:00";
|
|
|
76 |
}
|
| 27833 |
tejbeer |
77 |
|
| 27884 |
tejbeer |
78 |
|
| 28600 |
amit.gupta |
79 |
var data29 = $(row).find("td:eq(30) input[type='checkbox']").is(":checked") ? 1 : 0;
|
| 27884 |
tejbeer |
80 |
|
| 27829 |
tejbeer |
81 |
var prebookingListingObject = {};
|
|
|
82 |
prebookingListingObject['id'] = data0
|
| 27833 |
tejbeer |
83 |
|
|
|
84 |
|
|
|
85 |
prebookingListingObject['createdTimestamp'] = data2
|
|
|
86 |
prebookingListingObject['acquiredDate'] = data3
|
|
|
87 |
prebookingListingObject['outletName'] = data4
|
|
|
88 |
prebookingListingObject['phoneNumber'] = data5
|
| 28600 |
amit.gupta |
89 |
prebookingListingObject['address'] = address
|
| 27833 |
tejbeer |
90 |
prebookingListingObject['city'] = data6
|
|
|
91 |
prebookingListingObject['stateHead'] = data7
|
|
|
92 |
prebookingListingObject['bdm'] = data8
|
| 27829 |
tejbeer |
93 |
|
| 27833 |
tejbeer |
94 |
prebookingListingObject['agreedBrandFees'] = data9
|
| 27884 |
tejbeer |
95 |
prebookingListingObject['receivedBrandFees'] = data10
|
|
|
96 |
prebookingListingObject['finalBrandFees'] = data11
|
|
|
97 |
prebookingListingObject['agreedWallet'] = data12
|
|
|
98 |
prebookingListingObject['investmentDate'] = data13
|
|
|
99 |
prebookingListingObject['kyc'] = data14
|
|
|
100 |
prebookingListingObject['aadharDoc'] = data15
|
|
|
101 |
prebookingListingObject['panDoc'] = data16
|
|
|
102 |
prebookingListingObject['gst'] = data17
|
|
|
103 |
prebookingListingObject['cancelCheque'] = data18
|
|
|
104 |
prebookingListingObject['rentAgreement'] = data19
|
|
|
105 |
prebookingListingObject['loi'] = data20
|
|
|
106 |
prebookingListingObject['code'] = data21
|
|
|
107 |
prebookingListingObject['receePlaned'] = data22
|
|
|
108 |
prebookingListingObject['receeActual'] = data23
|
|
|
109 |
prebookingListingObject['designingPlaned'] = data24
|
|
|
110 |
prebookingListingObject['designingActual'] = data25
|
|
|
111 |
prebookingListingObject['stockPayment'] = data26
|
|
|
112 |
prebookingListingObject['expectedDate'] = data27
|
|
|
113 |
prebookingListingObject['payDate'] = data28
|
|
|
114 |
prebookingListingObject['billingStatus'] = data29
|
| 27829 |
tejbeer |
115 |
|
|
|
116 |
var jsonObject = JSON.stringify(prebookingListingObject);
|
|
|
117 |
|
|
|
118 |
console.log(jsonObject);
|
|
|
119 |
|
|
|
120 |
if (confirm("Are you sure you want to submit the request") == true) {
|
| 27842 |
tejbeer |
121 |
doAjaxRequestWithJsonHandler(context + "/partnerOnBoardingListing","POST",jsonObject,function(response) {
|
|
|
122 |
row.html(response);
|
| 27858 |
tejbeer |
123 |
row.css("background-color", "#F8F8FF");
|
|
|
124 |
|
| 27842 |
tejbeer |
125 |
});
|
| 27829 |
tejbeer |
126 |
}
|
|
|
127 |
|
|
|
128 |
});
|
| 27842 |
tejbeer |
129 |
|
| 28600 |
amit.gupta |
130 |
$(document).on('click', '.submit-design', function() {
|
|
|
131 |
var row = $(this).closest("tr");
|
|
|
132 |
console.log(row);
|
|
|
133 |
var rowIndex = $(this).closest('tr').prevAll().length;
|
|
|
134 |
|
|
|
135 |
var id = $(row).find("td:eq(0)").text();
|
|
|
136 |
|
|
|
137 |
var outletName = $(row).find("td:eq(1)").text();
|
|
|
138 |
var createdTimestamp = $(row).find("td:eq(2)").text();
|
|
|
139 |
if (createdTimestamp != "") {
|
|
|
140 |
createdTimestamp = createdTimestamp + "T00:00:00";
|
|
|
141 |
}
|
|
|
142 |
var acquiredDate = $(row).find("td:eq(3) input[type='date']").val();
|
|
|
143 |
if (acquiredDate != "") {
|
|
|
144 |
acquiredDate = acquiredDate + "T00:00:00";
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
var phoneNumber = $(row).find("td:eq(4) input[type='number']").val();
|
|
|
148 |
|
|
|
149 |
var address = $(row).find("td:eq(5) input[type='text']").val();
|
|
|
150 |
var city = $(row).find("td:eq(6) input[type='text']").val();
|
|
|
151 |
var stateHead = $(row).find("td:eq(7) input[type='text']").val();
|
|
|
152 |
var bdm = $(row).find("td:eq(8) input[type='text']").val();
|
| 27829 |
tejbeer |
153 |
|
| 28600 |
amit.gupta |
154 |
var agreedBrandFees = $(row).find("td:eq(9) input[type='text']").val();
|
|
|
155 |
|
|
|
156 |
console.log("agreedBrandFees"+agreedBrandFees);
|
| 27829 |
tejbeer |
157 |
|
| 28600 |
amit.gupta |
158 |
|
|
|
159 |
var investmentDate = $(row).find("td:eq(10) input[type='date']").val();
|
|
|
160 |
if (investmentDate != "") {
|
|
|
161 |
investmentDate = investmentDate + "T00:00:00";
|
|
|
162 |
}
|
|
|
163 |
console.log("investmentDate"+investmentDate);
|
|
|
164 |
|
|
|
165 |
var loi = $(row).find(".loiDesign input[type=hidden]").val();
|
|
|
166 |
console.log("loi" + loi);
|
|
|
167 |
|
|
|
168 |
var code = $(row).find("td:eq(12) input[type='text']").val();
|
|
|
169 |
console.log("code"+code);
|
|
|
170 |
|
|
|
171 |
|
|
|
172 |
var receePlaned = $(row).find("td:eq(13) input[type='date']").val();
|
|
|
173 |
if (receePlaned != "") {
|
|
|
174 |
receePlaned = receePlaned + "T00:00:00";
|
|
|
175 |
}
|
|
|
176 |
var receeActual = $(row).find("td:eq(14) input[type='date']").val();
|
|
|
177 |
if (receeActual != "") {
|
|
|
178 |
receeActual = receeActual + "T00:00:00";
|
|
|
179 |
}
|
|
|
180 |
console.log("receeActual"+receeActual);
|
|
|
181 |
|
|
|
182 |
var twoDBoqPlanedDate = $(row).find("td:eq(15) input[type='date']").val();
|
|
|
183 |
if (twoDBoqPlanedDate != "") {
|
|
|
184 |
twoDBoqPlanedDate = twoDBoqPlanedDate + "T00:00:00";
|
|
|
185 |
}
|
|
|
186 |
|
|
|
187 |
var twoDBoqdate = $(row).find("td:eq(16) input[type='date']").val();
|
|
|
188 |
if (twoDBoqdate != "") {
|
|
|
189 |
twoDBoqdate = twoDBoqdate + "T00:00:00";
|
|
|
190 |
}
|
|
|
191 |
var twodBOQ = $(row).find(".twoDBoq input[type=hidden]").val();
|
|
|
192 |
|
|
|
193 |
var threeDBoqPlanedDate = $(row).find("td:eq(18) input[type='date']").val();
|
|
|
194 |
if (threeDBoqPlanedDate != "") {
|
|
|
195 |
threeDBoqPlanedDate = threeDBoqPlanedDate + "T00:00:00";
|
|
|
196 |
}
|
|
|
197 |
|
|
|
198 |
var threeDBoqdate = $(row).find("td:eq(19) input[type='date']").val();
|
|
|
199 |
if (threeDBoqdate != "") {
|
|
|
200 |
threeDBoqdate = threeDBoqdate + "T00:00:00";
|
|
|
201 |
}
|
|
|
202 |
|
|
|
203 |
var threeDBoq = $(row).find(".threeDBoq input[type=hidden]").val();
|
|
|
204 |
|
|
|
205 |
var poVenderPlanedDate = $(row).find("td:eq(21) input[type='date']").val();
|
|
|
206 |
if (poVenderPlanedDate != "") {
|
|
|
207 |
poVenderPlanedDate = poVenderPlanedDate + "T00:00:00";
|
|
|
208 |
}
|
|
|
209 |
var poVenderDate = $(row).find("td:eq(22) input[type='date']").val();
|
|
|
210 |
if (poVenderDate != "") {
|
|
|
211 |
poVenderDate = poVenderDate + "T00:00:00";
|
|
|
212 |
}
|
|
|
213 |
var poVendor = $(row).find(".poVendor input[type=hidden]").val();
|
|
|
214 |
|
|
|
215 |
var briefingPartnerPlaned = $(row).find("td:eq(24) input[type='date']").val();
|
|
|
216 |
if (briefingPartnerPlaned != "") {
|
|
|
217 |
briefingPartnerPlaned = briefingPartnerPlaned + "T00:00:00";
|
|
|
218 |
}
|
|
|
219 |
var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
|
|
|
220 |
if (briefingPartner != "") {
|
|
|
221 |
briefingPartner = briefingPartner + "T00:00:00";
|
|
|
222 |
}
|
|
|
223 |
var deploymentPlanedDate = $(row).find("td:eq(26) input[type='date']").val();
|
|
|
224 |
if (deploymentPlanedDate != "") {
|
|
|
225 |
deploymentPlanedDate = deploymentPlanedDate + "T00:00:00";
|
|
|
226 |
}
|
|
|
227 |
var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
|
|
|
228 |
if (deploymentDate != "") {
|
|
|
229 |
deploymentDate = deploymentDate + "T00:00:00";
|
|
|
230 |
}
|
|
|
231 |
var finalPicsOutletPlanedDate = $(row).find("td:eq(28) input[type='date']").val();
|
|
|
232 |
if (finalPicsOutletPlanedDate != "") {
|
|
|
233 |
finalPicsOutletPlanedDate = finalPicsOutletPlanedDate + "T00:00:00";
|
|
|
234 |
}
|
|
|
235 |
|
|
|
236 |
var finalPicsOutletDate = $(row).find("td:eq(29) input[type='date']").val();
|
|
|
237 |
if (finalPicsOutletDate != "") {
|
|
|
238 |
finalPicsOutletDate = finalPicsOutletDate + "T00:00:00";
|
|
|
239 |
}
|
|
|
240 |
var finalPicsOutlet = $(row).find(".finalPics input[type=hidden]").val();
|
| 27829 |
tejbeer |
241 |
|
| 28600 |
amit.gupta |
242 |
var nocDate = $(row).find("td:eq(31) input[type='date']").val();
|
|
|
243 |
if (nocDate != "") {
|
|
|
244 |
nocDate = nocDate + "T00:00:00";
|
|
|
245 |
}
|
|
|
246 |
var noc = $(row).find(".noc input[type=hidden]").val();
|
|
|
247 |
var prebookingListingObject = {};
|
|
|
248 |
prebookingListingObject['id'] = id
|
|
|
249 |
prebookingListingObject['outletName']= outletName
|
|
|
250 |
|
|
|
251 |
prebookingListingObject['createdTimestamp'] = createdTimestamp
|
|
|
252 |
prebookingListingObject['acquiredDate'] = acquiredDate
|
|
|
253 |
|
|
|
254 |
prebookingListingObject['phoneNumber'] = phoneNumber
|
|
|
255 |
prebookingListingObject['address'] = address
|
|
|
256 |
prebookingListingObject['city'] = city
|
|
|
257 |
prebookingListingObject['stateHead'] = stateHead
|
|
|
258 |
prebookingListingObject['bdm'] = bdm
|
|
|
259 |
|
|
|
260 |
prebookingListingObject['agreedBrandFees'] = agreedBrandFees
|
|
|
261 |
|
|
|
262 |
prebookingListingObject['investmentDate'] = investmentDate
|
|
|
263 |
prebookingListingObject['loi'] = loi
|
|
|
264 |
prebookingListingObject['code'] = code
|
|
|
265 |
prebookingListingObject['receePlaned'] = receePlaned
|
|
|
266 |
prebookingListingObject['receeActual'] = receeActual
|
|
|
267 |
prebookingListingObject['twoDBoqPlanedDate'] = twoDBoqPlanedDate
|
|
|
268 |
prebookingListingObject['twoDBoqdate'] = twoDBoqdate
|
|
|
269 |
prebookingListingObject['twodBOQ'] = twodBOQ
|
|
|
270 |
prebookingListingObject['threeDBoqPlanedDate'] = threeDBoqPlanedDate
|
|
|
271 |
prebookingListingObject['threeDBoqdate'] = threeDBoqdate
|
|
|
272 |
prebookingListingObject['threeDBoq'] = threeDBoq
|
|
|
273 |
prebookingListingObject['poVenderPlanedDate'] = poVenderPlanedDate
|
|
|
274 |
prebookingListingObject['poVenderDate'] = poVenderDate
|
|
|
275 |
prebookingListingObject['poVendor'] = poVendor
|
|
|
276 |
prebookingListingObject['briefingPartnerPlaned'] = briefingPartnerPlaned
|
|
|
277 |
prebookingListingObject['briefingPartner'] = briefingPartner
|
|
|
278 |
prebookingListingObject['deploymentPlanedDate'] = deploymentPlanedDate
|
|
|
279 |
prebookingListingObject['deploymentDate'] = deploymentDate
|
|
|
280 |
prebookingListingObject['finalPicsOutletPlanedDate'] = finalPicsOutletPlanedDate
|
|
|
281 |
prebookingListingObject['finalPicsOutletDate'] = finalPicsOutletDate
|
|
|
282 |
prebookingListingObject['finalPicsOutlet'] = finalPicsOutlet
|
|
|
283 |
prebookingListingObject['nocDate'] = nocDate
|
|
|
284 |
prebookingListingObject['noc'] = noc
|
|
|
285 |
|
|
|
286 |
|
|
|
287 |
|
|
|
288 |
var jsonObject = JSON.stringify(prebookingListingObject);
|
|
|
289 |
|
|
|
290 |
console.log(jsonObject);
|
|
|
291 |
|
|
|
292 |
if (confirm("Are you sure you want to submit the request") == true) {
|
|
|
293 |
doAjaxRequestWithJsonHandler(context + "/partnerOnboardingDesignaTatPanel","POST",jsonObject,function(response) {
|
|
|
294 |
row.html(response);
|
|
|
295 |
row.css("background-color", "#F8F8FF");
|
|
|
296 |
|
|
|
297 |
});
|
|
|
298 |
}
|
|
|
299 |
|
|
|
300 |
});
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
|
| 27829 |
tejbeer |
304 |
$(document).on('click', ".partner-onboarding-index", function() {
|
| 27763 |
tejbeer |
305 |
panelListing("main-content");
|
|
|
306 |
});
|
| 27813 |
tejbeer |
307 |
|
|
|
308 |
|
|
|
309 |
$(document).on('click', ".partner-onboarding-open", function() {
|
|
|
310 |
console.log("yes");
|
| 27799 |
tejbeer |
311 |
partnerOnboardingOpen("main-content");
|
|
|
312 |
});
|
| 28600 |
amit.gupta |
313 |
|
|
|
314 |
$(document).on('click', ".design-completed", function() {
|
|
|
315 |
console.log("yes");
|
|
|
316 |
partnerOnboardinDesignCompleted("main-content");
|
|
|
317 |
});
|
|
|
318 |
|
|
|
319 |
$(document).on('click', ".design_tat", function() {
|
|
|
320 |
console.log("yes");
|
|
|
321 |
partnerOnboardingDesign("main-content");
|
|
|
322 |
});
|
| 27813 |
tejbeer |
323 |
|
| 27829 |
tejbeer |
324 |
$(document).on('click', ".partner-onboarding-reject", function() {
|
| 27799 |
tejbeer |
325 |
console.log("helo");
|
| 27763 |
tejbeer |
326 |
|
| 27799 |
tejbeer |
327 |
partnerOnboardingReject("main-content");
|
|
|
328 |
});
|
|
|
329 |
|
| 27813 |
tejbeer |
330 |
$(document).on('input', 'table#example input[type=file]', function() {
|
|
|
331 |
if (confirm('Confirm upload ?')) {
|
|
|
332 |
var fileSelector = $(this)[0];
|
|
|
333 |
if (fileSelector != undefined
|
|
|
334 |
&& fileSelector.files[0] != undefined) {
|
|
|
335 |
var url = `${context}/document-upload`;
|
|
|
336 |
console.log(url);
|
|
|
337 |
var file = this.files[0];
|
| 28600 |
amit.gupta |
338 |
console.log("file"+file);
|
| 27813 |
tejbeer |
339 |
let fileInput = $(this);
|
| 28600 |
amit.gupta |
340 |
console.log("fileInput"+file);
|
| 27813 |
tejbeer |
341 |
doAjaxUploadRequestHandler(
|
|
|
342 |
url,
|
|
|
343 |
'POST',
|
|
|
344 |
file,
|
|
|
345 |
function(response) {
|
|
|
346 |
console.log(response);
|
|
|
347 |
var documentId = response.response.document_id;
|
|
|
348 |
console.log("documentId : " + documentId);
|
|
|
349 |
fileInput.closest('td').find("input[type=hidden]").val(documentId);
|
|
|
350 |
});
|
|
|
351 |
// alert("Retailer Shop Document
|
|
|
352 |
// is required");
|
|
|
353 |
}
|
|
|
354 |
} else {
|
|
|
355 |
// Do nothing!
|
|
|
356 |
}
|
|
|
357 |
});
|
| 28600 |
amit.gupta |
358 |
$(document).on('input', 'table#OnboardingDesign input[type=file]', function() {
|
|
|
359 |
if (confirm('Confirm upload ?')) {
|
|
|
360 |
var fileSelector = $(this)[0];
|
|
|
361 |
if (fileSelector != undefined
|
|
|
362 |
&& fileSelector.files[0] != undefined) {
|
|
|
363 |
var url = `${context}/document-upload`;
|
|
|
364 |
console.log(url);
|
|
|
365 |
var file = this.files[0];
|
|
|
366 |
console.log("file"+file);
|
|
|
367 |
let fileInput = $(this);
|
|
|
368 |
console.log("fileInput"+file);
|
|
|
369 |
doAjaxUploadRequestHandler(
|
|
|
370 |
url,
|
|
|
371 |
'POST',
|
|
|
372 |
file,
|
|
|
373 |
function(response) {
|
|
|
374 |
console.log(response);
|
|
|
375 |
var documentId = response.response.document_id;
|
|
|
376 |
console.log("documentId : " + documentId);
|
|
|
377 |
fileInput.closest('td').find("input[type=hidden]").val(documentId);
|
|
|
378 |
});
|
|
|
379 |
// alert("Retailer Shop Document
|
|
|
380 |
// is required");
|
|
|
381 |
}
|
|
|
382 |
} else {
|
|
|
383 |
// Do nothing!
|
|
|
384 |
}
|
|
|
385 |
});
|
| 27799 |
tejbeer |
386 |
|
| 27829 |
tejbeer |
387 |
$(document).on('click', '#newmodal', function() {
|
| 27813 |
tejbeer |
388 |
|
|
|
389 |
|
| 27829 |
tejbeer |
390 |
var json = partnerOnBoardingListingJson();
|
|
|
391 |
console.log(json);
|
|
|
392 |
doAjaxRequestWithJsonHandler(
|
|
|
393 |
context
|
|
|
394 |
+ "/partnerOnBoardingListing",
|
|
|
395 |
"POST",
|
|
|
396 |
json,
|
|
|
397 |
function(response) {
|
| 27842 |
tejbeer |
398 |
|
| 27829 |
tejbeer |
399 |
panelListing("main-content");
|
| 27842 |
tejbeer |
400 |
|
| 27813 |
tejbeer |
401 |
|
| 27829 |
tejbeer |
402 |
});
|
|
|
403 |
});
|
| 27813 |
tejbeer |
404 |
|
| 27829 |
tejbeer |
405 |
var table = $('#example').DataTable();
|
|
|
406 |
$(document).on('dblclick', '#example tbody tr', function() {
|
| 27813 |
tejbeer |
407 |
|
| 27829 |
tejbeer |
408 |
var data = table.row(this).data();
|
| 27813 |
tejbeer |
409 |
|
| 27829 |
tejbeer |
410 |
$(this).find(":input").attr('disabled', false).show();
|
| 28600 |
amit.gupta |
411 |
$(this).find("td:eq(15) input[type='date']").attr('disabled', true).hide();
|
| 27829 |
tejbeer |
412 |
$(this).css("background-color", "#87d3f8");
|
| 27884 |
tejbeer |
413 |
let a=12;
|
|
|
414 |
let b=12;
|
|
|
415 |
console.log("yes"+a==b);
|
|
|
416 |
|
| 27829 |
tejbeer |
417 |
});
|
| 28600 |
amit.gupta |
418 |
|
|
|
419 |
var table = $('#OnboardingDesign').DataTable();
|
|
|
420 |
$(document).on('dblclick', '#OnboardingDesign tbody tr', function() {
|
| 27813 |
tejbeer |
421 |
|
| 28600 |
amit.gupta |
422 |
var data = table.row(this).data();
|
| 27813 |
tejbeer |
423 |
|
| 28600 |
amit.gupta |
424 |
$(this).find(":input" ).attr('disabled', false).show();
|
|
|
425 |
|
|
|
426 |
$(this).find("input[name=acquireddate]" ).attr('disabled', true);
|
|
|
427 |
$(this).find("input[name=outlateName]" ).attr('disabled', true);
|
|
|
428 |
$(this).find("input[name=phonenumber1]" ).attr('disabled', true);
|
|
|
429 |
$(this).find("input[name=addess1]" ).attr('disabled', true);
|
|
|
430 |
$(this).find("input[name=city1]" ).attr('disabled', true);
|
|
|
431 |
$(this).find("input[name=shead1]" ).attr('disabled', true);
|
|
|
432 |
$(this).find("input[name=bdm1]" ).attr('disabled', true);
|
|
|
433 |
$(this).find("input[name=abrand1]" ).attr('disabled', true);
|
|
|
434 |
$(this).find("input[name=recbrand1]" ).attr('disabled', true);
|
|
|
435 |
$(this).find("input[name=BrandFeesdate1]" ).attr('disabled', true);
|
|
|
436 |
$(this).find("input[name=idate1]" ).attr('disabled', true);
|
|
|
437 |
$(this).find("input[name=loi1]" ).attr('disabled', true);
|
|
|
438 |
$(this).find("input[name=code1]" ).attr('disabled', true);
|
|
|
439 |
$(this).find("input[name=rplaned1]" ).attr('disabled', true);
|
|
|
440 |
$(this).find("input[name=twoDBoq1]" ).attr('disabled', true);
|
|
|
441 |
$(this).find("input[name=threeBoqDate1]" ).attr('disabled', true);
|
|
|
442 |
$(this).find("input[name=poVenderDate1]" ).attr('disabled', true);
|
|
|
443 |
$(this).find("input[name=briefingPartnerPlanedDate1]" ).attr('disabled', true);
|
|
|
444 |
$(this).find("input[name=deploymentPlanedDate]" ).attr('disabled', true);
|
|
|
445 |
$(this).find("input[name=FinalPicsOutLets]" ).attr('disabled', true);
|
|
|
446 |
$(this).find("input[name=poVenderDate1]" ).attr('disabled', true);
|
|
|
447 |
$(this).css("background-color", "#87d3f8");
|
|
|
448 |
let a=12;
|
|
|
449 |
let b=12;
|
|
|
450 |
console.log("yes"+a==b);
|
|
|
451 |
|
|
|
452 |
});
|
|
|
453 |
|
|
|
454 |
|
| 27829 |
tejbeer |
455 |
$(document).on('click', ".delete", function() {
|
| 27813 |
tejbeer |
456 |
|
| 27829 |
tejbeer |
457 |
var id = $(this).data('id');
|
|
|
458 |
console.log('helo');
|
|
|
459 |
var id = $(this).data('id');
|
|
|
460 |
console.log(id);
|
|
|
461 |
if (confirm("Are you sure your outlet is open") == true) {
|
|
|
462 |
doPostAjaxRequestHandler(context + "/partnerOnBoardingOpen?id=" + id,
|
|
|
463 |
function(response) {
|
| 27813 |
tejbeer |
464 |
|
| 27829 |
tejbeer |
465 |
console.log("reponse" + response);
|
|
|
466 |
if (response == 'true') {
|
|
|
467 |
alert("congratulations your outlet is successfully open");
|
| 27813 |
tejbeer |
468 |
|
| 27829 |
tejbeer |
469 |
panelListing("main-content");
|
|
|
470 |
}
|
|
|
471 |
});
|
|
|
472 |
}
|
| 27813 |
tejbeer |
473 |
|
| 27829 |
tejbeer |
474 |
});
|
| 28600 |
amit.gupta |
475 |
$(document).on('click', ".design-complete", function() {
|
|
|
476 |
var id = $(this).data('id');
|
|
|
477 |
console.log('helo');
|
|
|
478 |
var id = $(this).data('id');
|
|
|
479 |
console.log(id);
|
|
|
480 |
if (confirm("Are you sure your Design TAT is Complete") == true) {
|
|
|
481 |
doPostAjaxRequestHandler(context + "/partnerDesignTatCompleted?id=" + id,
|
|
|
482 |
function(response) {
|
| 27813 |
tejbeer |
483 |
|
| 28600 |
amit.gupta |
484 |
console.log("reponse" + response);
|
|
|
485 |
if (response == 'true') {
|
|
|
486 |
alert("congratulations your Desiging is successfully Done");
|
| 27829 |
tejbeer |
487 |
|
| 28600 |
amit.gupta |
488 |
partnerOnboardingDesign("main-content");
|
|
|
489 |
}
|
|
|
490 |
});
|
|
|
491 |
}
|
|
|
492 |
|
|
|
493 |
});
|
|
|
494 |
|
|
|
495 |
|
| 27829 |
tejbeer |
496 |
$(document).on('click', ".rejectpartneronboarding", function() {
|
|
|
497 |
var id = $(this).data('id');
|
|
|
498 |
console.log('helo');
|
|
|
499 |
var id = $(this).data('id');
|
|
|
500 |
console.log(id);
|
|
|
501 |
if (confirm("Are you sure you want to reject the request") == true) {
|
|
|
502 |
doPostAjaxRequestHandler(context + "/partnerOnBoardingReject?id=" + id,
|
|
|
503 |
function(response) {
|
|
|
504 |
|
|
|
505 |
console.log("reponse" + response);
|
|
|
506 |
if (response == 'true') {
|
|
|
507 |
alert("successfully rejected");
|
|
|
508 |
panelListing("main-content");
|
|
|
509 |
}
|
|
|
510 |
});
|
|
|
511 |
}
|
|
|
512 |
|
|
|
513 |
});
|
|
|
514 |
|
| 27763 |
tejbeer |
515 |
});
|
|
|
516 |
|
| 27855 |
tejbeer |
517 |
$(document).on('click', ".Del", function() {
|
|
|
518 |
var $td = $(this).closest("td");
|
|
|
519 |
//var delDoc= $(this).closest('td').find('.gst', "input[type=hidden]").val();
|
|
|
520 |
//var columnName= $(this).closest('td' , "input[type=hidden]").val();
|
|
|
521 |
var dataDel=$td.find("input[type=hidden]").val('0');
|
|
|
522 |
dataDel=0;
|
|
|
523 |
console.log(dataDel);
|
|
|
524 |
if(dataDel==0)
|
|
|
525 |
{
|
|
|
526 |
$td.css({'background-color':'pink'});
|
|
|
527 |
console.log("true");
|
|
|
528 |
$td.find('a',".download").hide();
|
|
|
529 |
$td.find('a',".Del").hide();
|
|
|
530 |
}
|
|
|
531 |
|
|
|
532 |
|
|
|
533 |
});
|
| 27813 |
tejbeer |
534 |
|
| 27855 |
tejbeer |
535 |
|
| 28600 |
amit.gupta |
536 |
|
| 27813 |
tejbeer |
537 |
function partnerOnBoardingListingJson() {
|
| 27829 |
tejbeer |
538 |
var prebookingListingObject = {};
|
|
|
539 |
prebookingListingObject['outletName'] = $('#outLetName1').val();
|
|
|
540 |
prebookingListingObject['phoneNumber'] = $('#number1').val();
|
|
|
541 |
acquireddate1 = $('#acquireddate1').val();
|
|
|
542 |
if (acquireddate1 != "") {
|
|
|
543 |
acquireddate1 = acquireddate1 + "T00:00:00";
|
|
|
544 |
}
|
| 27813 |
tejbeer |
545 |
|
| 27829 |
tejbeer |
546 |
prebookingListingObject['acquiredDate'] = acquireddate1
|
|
|
547 |
return JSON.stringify(prebookingListingObject);
|
|
|
548 |
}
|
| 27813 |
tejbeer |
549 |
|
|
|
550 |
|
| 27829 |
tejbeer |
551 |
function panelListing(domId) {
|
|
|
552 |
doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
|
|
|
553 |
function(response) {
|
|
|
554 |
$('#' + domId).html(response);
|
|
|
555 |
});
|
|
|
556 |
}
|
| 27813 |
tejbeer |
557 |
|
|
|
558 |
|
|
|
559 |
|
| 27829 |
tejbeer |
560 |
|
| 27763 |
tejbeer |
561 |
function panelListing(domId) {
|
|
|
562 |
doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
|
|
|
563 |
function(response) {
|
|
|
564 |
$('#' + domId).html(response);
|
|
|
565 |
});
|
|
|
566 |
}
|
| 27799 |
tejbeer |
567 |
function partnerOnboardingOpen(domId) {
|
|
|
568 |
doAjaxRequestHandler(context + "/partnerOnBoardingOpenShow", "GET",
|
|
|
569 |
function(response) {
|
|
|
570 |
$('#' + domId).html(response);
|
|
|
571 |
});
|
|
|
572 |
}
|
| 28600 |
amit.gupta |
573 |
|
|
|
574 |
function partnerOnboardinDesignCompleted(domId) {
|
|
|
575 |
doAjaxRequestHandler(context + "/DesignTatCompletedShow", "GET",
|
|
|
576 |
function(response) {
|
|
|
577 |
$('#' + domId).html(response);
|
|
|
578 |
});
|
|
|
579 |
}
|
|
|
580 |
|
|
|
581 |
function partnerOnboardingDesign(domId) {
|
|
|
582 |
doAjaxRequestHandler(context + "/partnerOnBoardingDesign", "GET",
|
|
|
583 |
function(response) {
|
|
|
584 |
$('#' + domId).html(response);
|
|
|
585 |
});
|
|
|
586 |
}
|
|
|
587 |
|
| 27799 |
tejbeer |
588 |
function partnerOnboardingReject(domId) {
|
|
|
589 |
doAjaxRequestHandler(context + "/partnerOnBoardingRejectShow", "GET",
|
|
|
590 |
function(response) {
|
|
|
591 |
$('#' + domId).html(response);
|
|
|
592 |
});
|
|
|
593 |
}
|
| 27763 |
tejbeer |
594 |
|
| 27813 |
tejbeer |
595 |
|
| 27763 |
tejbeer |
596 |
function panelOnBoardingListing(domId) {
|
|
|
597 |
doAjaxRequestHandler(context + "/partnerOnBoardingListing", "POST",
|
|
|
598 |
function(response) {
|
|
|
599 |
$('#' + domId).html(response);
|
|
|
600 |
});
|
|
|
601 |
|
|
|
602 |
}
|
| 27842 |
tejbeer |
603 |
function partnerOnBoardingListingJson() {
|
|
|
604 |
var prebookingListingObject = {};
|
|
|
605 |
prebookingListingObject['outletName'] = $('#outLetName1').val();
|
|
|
606 |
prebookingListingObject['phoneNumber'] = $('#number1').val();
|
|
|
607 |
acquireddate1 =$('#acquireddate1').val();
|
|
|
608 |
if (acquireddate1 != "") {
|
|
|
609 |
acquireddate1 = acquireddate1 + "T00:00:00";
|
|
|
610 |
}
|
|
|
611 |
|
|
|
612 |
prebookingListingObject['acquiredDate']=acquireddate1
|
|
|
613 |
return JSON.stringify(prebookingListingObject);
|
|
|
614 |
}
|
| 27763 |
tejbeer |
615 |
|
|
|
616 |
|
| 27842 |
tejbeer |
617 |
function panelListing(domId) {
|
|
|
618 |
doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
|
|
|
619 |
function (response) {
|
|
|
620 |
$('#' + domId).html(response);
|
|
|
621 |
});
|
|
|
622 |
}
|
| 27763 |
tejbeer |
623 |
|
|
|
624 |
|
|
|
625 |
|
| 27842 |
tejbeer |
626 |
|