Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
33512 tejus.loha 1
$(document).on('click', ".onboarding_timeline", function () {
2
    doGetAjaxRequestHandler(context + "/partnerStoreTimeline",
3
        function (response) {
4
            $('#' + 'main-content').html(response);
5
        });
6
});
29061 tejbeer 7
 
33512 tejus.loha 8
$(document).on('click', ".legal-kyc", function () {
9
    doGetAjaxRequestHandler(context + "/getOpenPartnerPendingKyc",
10
        function (response) {
11
            $('#' + 'main-content').html(response);
12
        });
13
});
29794 tejbeer 14
 
33512 tejus.loha 15
$(document).on('click', '.submit1', function () {
16
    var row = $(this).closest("tr");
17
    console.log(row);
18
    var rowIndex = $(this).closest('tr').prevAll().length;
29794 tejbeer 19
 
33512 tejus.loha 20
    var data0 = $(row).find("td:eq(0)").text();
21
    var data1 = $(row).find("input[name='outlateName']").val();
22
    var data2 = $(row).find("td:eq(2)").text();
23
    if (data2 != "") {
24
        data2 = data2 + "T00:00:00";
25
    }
26
    var data3 = $(row).find("input[name='acquireddate']").val();
27
    if (data3 != "") {
28
        data3 = data3 + "T00:00:00";
29
    }
30
    var data4 = $(row).find("input[name='updateOutlateName']").val();
28908 tejbeer 31
 
33512 tejus.loha 32
    var data5 = $(row).find("input[name='phonenumber1']").val();
28908 tejbeer 33
 
33512 tejus.loha 34
    var counterPotential = $(row).find("input[name='counterPotential']").val();
28908 tejbeer 35
 
33512 tejus.loha 36
    console.log(counterPotential)
28908 tejbeer 37
 
38
 
32843 shampa 39
//		var rbmAuthId = $(row).find("input[name='hiddenrbmAuthId']").val();
33512 tejus.loha 40
    var rbmAuthId = $(row).find("select[name='rbmAuthId']").val();
31730 tejbeer 41
 
33512 tejus.loha 42
    console.log(rbmAuthId)
28908 tejbeer 43
 
33512 tejus.loha 44
    var data6 = $(row).find("input[name='city1']").val();
29763 tejbeer 45
 
33512 tejus.loha 46
    var data7 = $(row).find("#authUserStateHead option:selected").val();
47
    var data8 = $(row).find("#authUserbdm option:selected").val();
29763 tejbeer 48
 
33512 tejus.loha 49
    var data9 = $(row).find("input[name='abrand1']").val();
50
    var data10 = $(row).find("input[name='recbrand1']").val();
51
    var data11 = $(row).find("input[name='BrandFeesdate1']").val();
52
    if (data11 != "") {
53
        data11 = data11 + "T00:00:00";
54
    }
27813 tejbeer 55
 
33512 tejus.loha 56
    var data12 = $(row).find("input[name='awallet']").val();
27833 tejbeer 57
 
33512 tejus.loha 58
    var data13 = $(row).find("input[name='idate1']").val();
59
    if (data13 != "") {
60
        data13 = data13 + "T00:00:00";
61
    }
62
    var data14 = $(row).find(".kyc input[type=hidden]").val();
63
    var data15 = $(row).find(".aadhar input[type=hidden]").val();
64
    var data16 = $(row).find(".pan input[type=hidden]").val();
65
    var data17 = $(row).find(".gst input[type=hidden]").val();
66
    var data18 = $(row).find(".cancheque input[type=hidden]").val();
67
    var data19 = $(row).find(".rent input[type=hidden]").val();
68
    console.log("data19" + data19);
69
    var data20 = $(row).find(".loi input[type=hidden]").val();
70
    console.log("data18" + data18);
29061 tejbeer 71
 
33512 tejus.loha 72
    var docCompleted = $(row).find("#allDocumentComp option:selected").val();
29061 tejbeer 73
 
74
 
33512 tejus.loha 75
    var data21 = $(row).find("input[name='code1']").val();
76
    console.log(data21);
77
    var data22 = $(row).find("input[name='rplaned1']").val();
78
    if (data22 != "") {
79
        data22 = data22 + "T00:00:00";
80
    }
81
    var data23 = $(row).find("input[name='ractual1']").val();
82
    if (data23 != "") {
83
        data23 = data23 + "T00:00:00";
84
    }
85
    var data24 = $(row).find("input[name='deploymentPlanedDate']").val();
86
    if (data24 != "") {
87
        data24 = data24 + "T00:00:00";
88
    }
89
    var data25 = $(row).find("input[name='dactual']").val();
90
    if (data25 != "") {
91
        data25 = data25 + "T00:00:00";
92
    }
93
    var data26 = $(row).find("input[name='spayment1']").val();
27813 tejbeer 94
 
33512 tejus.loha 95
    var data27 = $(row).find("input[name='exdate']").val();
96
    if (data27 != "") {
97
        data27 = data27 + "T00:00:00";
98
    }
27829 tejbeer 99
 
33512 tejus.loha 100
    var data28 = $(row).find("input[name='paydate']").val();
27833 tejbeer 101
 
33512 tejus.loha 102
    if (data28 != "") {
103
        data28 = data28 + "T00:00:00";
104
    }
105
    var data29 = $(row).find("input[name='inaugrationDate']").val();
27833 tejbeer 106
 
33512 tejus.loha 107
    if (data29 != "") {
108
        data29 = data29 + "T00:00:00";
109
    }
27884 tejbeer 110
 
33512 tejus.loha 111
    var data30 = $(row).find("#billingStatus input[type='checkbox']").is(":checked") ? 1 : 0;
33891 tejus.loha 112
    var data31 = $(row).find(".aadharBack input[type=hidden]").val();
27884 tejbeer 113
 
33512 tejus.loha 114
    var partnerOnBoardingObject = {};
115
    partnerOnBoardingObject['id'] = data0
28908 tejbeer 116
 
117
 
33512 tejus.loha 118
    partnerOnBoardingObject['createdTimestamp'] = data2
119
    partnerOnBoardingObject['acquiredDate'] = data3
120
    partnerOnBoardingObject['outletName'] = data4
121
    partnerOnBoardingObject['phoneNumber'] = data5
28908 tejbeer 122
 
33512 tejus.loha 123
    partnerOnBoardingObject['authId'] = rbmAuthId
124
    partnerOnBoardingObject['city'] = data6
125
    partnerOnBoardingObject['stateHead'] = data7
126
    partnerOnBoardingObject['bdm'] = data8
27829 tejbeer 127
 
33512 tejus.loha 128
    partnerOnBoardingObject['agreedBrandFees'] = data9
129
    partnerOnBoardingObject['receivedBrandFees'] = data10
130
    partnerOnBoardingObject['finalBrandFees'] = data11
131
    partnerOnBoardingObject['agreedWallet'] = data12
132
    partnerOnBoardingObject['investmentDate'] = data13
133
    partnerOnBoardingObject['kyc'] = data14
134
    partnerOnBoardingObject['aadharDoc'] = data15
33891 tejus.loha 135
    partnerOnBoardingObject['aadharDocBack'] = data31
33512 tejus.loha 136
    partnerOnBoardingObject['panDoc'] = data16
137
    partnerOnBoardingObject['gst'] = data17
138
    partnerOnBoardingObject['cancelCheque'] = data18
139
    partnerOnBoardingObject['rentAgreement'] = data19
140
    partnerOnBoardingObject['loi'] = data20
141
    partnerOnBoardingObject['docCompleted'] = docCompleted
142
    partnerOnBoardingObject['code'] = data21
143
    partnerOnBoardingObject['receePlaned'] = data22
144
    partnerOnBoardingObject['receeActual'] = data23
145
    partnerOnBoardingObject['deploymentPlanedDate'] = data24
146
    partnerOnBoardingObject['deploymentDate'] = data25
147
    partnerOnBoardingObject['stockPayment'] = data26
148
    partnerOnBoardingObject['expectedDate'] = data27
149
    partnerOnBoardingObject['payDate'] = data28
150
    partnerOnBoardingObject['inaugrationDate'] = data29
151
    partnerOnBoardingObject['billingStatus'] = data30
152
    partnerOnBoardingObject['counterPotential'] = counterPotential
27829 tejbeer 153
 
33512 tejus.loha 154
    var jsonObject = JSON.stringify(partnerOnBoardingObject);
27829 tejbeer 155
 
33512 tejus.loha 156
    console.log(jsonObject);
27829 tejbeer 157
 
33512 tejus.loha 158
    if (confirm("Are you sure you want to submit the request") == true) {
159
        doAjaxRequestWithJsonHandler(context + "/partnerOnBoardingListing", "POST", jsonObject, function (response) {
160
            row.html(response);
161
            row.css("background-color", "#F8F8FF");
27858 tejbeer 162
 
33512 tejus.loha 163
        });
164
    }
27829 tejbeer 165
 
33512 tejus.loha 166
});
167
$(document).on('change', "input.leadIdOnboarding", function () {
168
    var leadId = $("#leadId").val();
169
    console.log(leadId)
28908 tejbeer 170
 
33512 tejus.loha 171
    doAjaxRequestHandler(context + "/getLead?leadId=" + leadId, "GET",
172
        function (response) {
173
            console.log(response)
31370 tejbeer 174
 
33512 tejus.loha 175
            console.log(response.response)
31370 tejbeer 176
 
33512 tejus.loha 177
            var data = response.response
31370 tejbeer 178
 
33512 tejus.loha 179
            $('#outLetName1').val(data.outLetName);
180
            $('#number1').val(data.leadMobile);
31370 tejbeer 181
 
182
 
33512 tejus.loha 183
        });
31370 tejbeer 184
 
33512 tejus.loha 185
})
31370 tejbeer 186
 
33512 tejus.loha 187
$(document).on('click', '.submit-design', function () {
188
    var row = $(this).closest("tr");
189
    console.log(row);
190
    var rowIndex = $(this).closest('tr').prevAll().length;
28908 tejbeer 191
 
33512 tejus.loha 192
    var id = $(row).find("td:eq(0)").text();
28908 tejbeer 193
 
33512 tejus.loha 194
    var outletName = $(row).find("td:eq(1) input[type='text']").val();
195
    var createdTimestamp = $(row).find("td:eq(2)").text();
196
    if (createdTimestamp != "") {
197
        createdTimestamp = createdTimestamp + "T00:00:00";
198
    }
199
    var acquiredDate = $(row).find("td:eq(3) input[type='date']").val();
200
    if (acquiredDate != "") {
201
        acquiredDate = acquiredDate + "T00:00:00";
202
    }
28908 tejbeer 203
 
33512 tejus.loha 204
    var phoneNumber = $(row).find("td:eq(4) input[type='number']").val();
28908 tejbeer 205
 
206
 
33512 tejus.loha 207
    var city = $(row).find("td:eq(5) input[type='text']").val();
28908 tejbeer 208
 
27829 tejbeer 209
 
33512 tejus.loha 210
    var agreedBrandFees = $(row).find("td:eq(8) input[type='text']").val();
29763 tejbeer 211
 
33512 tejus.loha 212
    console.log("agreedBrandFees" + agreedBrandFees);
27829 tejbeer 213
 
28908 tejbeer 214
 
33512 tejus.loha 215
    var investmentDate = $(row).find("td:eq(9) input[type='date']").val();
216
    if (investmentDate != "") {
217
        investmentDate = investmentDate + "T00:00:00";
218
    }
219
    console.log("investmentDate" + investmentDate);
28908 tejbeer 220
 
33512 tejus.loha 221
    var loi = $(row).find(".loiDesign input[type=hidden]").val();
222
    console.log("loi" + loi);
28908 tejbeer 223
 
33512 tejus.loha 224
    var kycDesign = $(row).find(".kycDesign input[type=hidden]").val();
28908 tejbeer 225
 
33512 tejus.loha 226
    var code = $(row).find("td:eq(12) input[type='text']").val();
227
    console.log("code" + code);
28908 tejbeer 228
 
229
 
33512 tejus.loha 230
    var receePlaned = $(row).find("td:eq(13) input[type='date']").val();
231
    if (receePlaned != "") {
232
        receePlaned = receePlaned + "T00:00:00";
233
    }
234
    var receeActual = $(row).find("td:eq(14) input[type='date']").val();
235
    if (receeActual != "") {
236
        receeActual = receeActual + "T00:00:00";
237
    }
238
    console.log("receeActual" + receeActual);
28908 tejbeer 239
 
240
 
33512 tejus.loha 241
    var twoDBoqPlanedDate = $(row).find("td:eq(16) input[type='date']").val();
242
    if (twoDBoqPlanedDate != "") {
243
        twoDBoqPlanedDate = twoDBoqPlanedDate + "T00:00:00";
244
    }
28908 tejbeer 245
 
33512 tejus.loha 246
    var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
247
    if (twoDBoqdate != "") {
248
        twoDBoqdate = twoDBoqdate + "T00:00:00";
249
    }
250
    var twodBOQ = $(row).find(".twoDBoq input[type=hidden]").val();
28908 tejbeer 251
 
33512 tejus.loha 252
    var threeDBoqPlanedDate = $(row).find("td:eq(19) input[type='date']").val();
253
    if (threeDBoqPlanedDate != "") {
254
        threeDBoqPlanedDate = threeDBoqPlanedDate + "T00:00:00";
255
    }
28908 tejbeer 256
 
33512 tejus.loha 257
    var threeDBoqdate = $(row).find("td:eq(20) input[type='date']").val();
258
    if (threeDBoqdate != "") {
259
        threeDBoqdate = threeDBoqdate + "T00:00:00";
260
    }
28908 tejbeer 261
 
33512 tejus.loha 262
    var threeDBoq = $(row).find(".threeDBoq input[type=hidden]").val();
28908 tejbeer 263
 
33512 tejus.loha 264
    var poVenderPlanedDate = $(row).find("td:eq(22) input[type='date']").val();
265
    if (poVenderPlanedDate != "") {
266
        poVenderPlanedDate = poVenderPlanedDate + "T00:00:00";
267
    }
268
    var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
269
    if (poVenderDate != "") {
270
        poVenderDate = poVenderDate + "T00:00:00";
271
    }
28908 tejbeer 272
 
273
 
33512 tejus.loha 274
    var briefingPartnerPlaned = $(row).find("td:eq(24) input[type='date']").val();
275
    if (briefingPartnerPlaned != "") {
276
        briefingPartnerPlaned = briefingPartnerPlaned + "T00:00:00";
277
    }
278
    var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
279
    if (briefingPartner != "") {
280
        briefingPartner = briefingPartner + "T00:00:00";
281
    }
282
    var deploymentPlanedDate = $(row).find("td:eq(26) input[type='date']").val();
283
    if (deploymentPlanedDate != "") {
284
        deploymentPlanedDate = deploymentPlanedDate + "T00:00:00";
285
    }
286
    var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
287
    if (deploymentDate != "") {
288
        deploymentDate = deploymentDate + "T00:00:00";
289
    }
28908 tejbeer 290
 
291
 
33512 tejus.loha 292
    var finalPicsOutletPlanedDate = $(row).find("td:eq(28) input[type='date']").val();
293
    if (finalPicsOutletPlanedDate != "") {
294
        finalPicsOutletPlanedDate = finalPicsOutletPlanedDate + "T00:00:00";
295
    }
28908 tejbeer 296
 
33512 tejus.loha 297
    var finalPicsOutletDate = $(row).find("td:eq(29) input[type='date']").val();
298
    if (finalPicsOutletDate != "") {
299
        finalPicsOutletDate = finalPicsOutletDate + "T00:00:00";
300
    }
301
    var finalPicsOutlet = $(row).find(".finalPics input[type=hidden]").val();
28908 tejbeer 302
 
33512 tejus.loha 303
    var nocDate = $(row).find("td:eq(31) input[type='date']").val();
304
    if (nocDate != "") {
305
        nocDate = nocDate + "T00:00:00";
306
    }
307
    var noc = $(row).find(".noc input[type=hidden]").val();
308
    var partnerOnBoardingObject = {};
309
    partnerOnBoardingObject['id'] = id
310
    partnerOnBoardingObject['outletName'] = outletName
27829 tejbeer 311
 
33512 tejus.loha 312
    partnerOnBoardingObject['createdTimestamp'] = createdTimestamp
313
    partnerOnBoardingObject['acquiredDate'] = acquiredDate
28908 tejbeer 314
 
33512 tejus.loha 315
    partnerOnBoardingObject['phoneNumber'] = phoneNumber
28908 tejbeer 316
 
33512 tejus.loha 317
    partnerOnBoardingObject['city'] = city
28908 tejbeer 318
 
28600 amit.gupta 319
 
33512 tejus.loha 320
    partnerOnBoardingObject['agreedBrandFees'] = agreedBrandFees
29763 tejbeer 321
 
33512 tejus.loha 322
    partnerOnBoardingObject['investmentDate'] = investmentDate
323
    partnerOnBoardingObject['loi'] = loi
324
    partnerOnBoardingObject['kycDesign'] = kycDesign
325
    partnerOnBoardingObject['code'] = code
326
    partnerOnBoardingObject['receePlaned'] = receePlaned
327
    partnerOnBoardingObject['receeActual'] = receeActual
328
    partnerOnBoardingObject['twoDBoqPlanedDate'] = twoDBoqPlanedDate
329
    partnerOnBoardingObject['twoDBoqdate'] = twoDBoqdate
330
    partnerOnBoardingObject['twodBOQ'] = twodBOQ
331
    partnerOnBoardingObject['threeDBoqPlanedDate'] = threeDBoqPlanedDate
332
    partnerOnBoardingObject['threeDBoqdate'] = threeDBoqdate
333
    partnerOnBoardingObject['threeDBoq'] = threeDBoq
334
    partnerOnBoardingObject['poVenderPlanedDate'] = poVenderPlanedDate
335
    partnerOnBoardingObject['poVenderDate'] = poVenderDate
28908 tejbeer 336
 
33512 tejus.loha 337
    partnerOnBoardingObject['briefingPartnerPlaned'] = briefingPartnerPlaned
338
    partnerOnBoardingObject['briefingPartner'] = briefingPartner
339
    partnerOnBoardingObject['deploymentPlanedDate'] = deploymentPlanedDate
340
    partnerOnBoardingObject['deploymentDate'] = deploymentDate
341
    partnerOnBoardingObject['finalPicsOutletPlanedDate'] = finalPicsOutletPlanedDate
342
    partnerOnBoardingObject['finalPicsOutletDate'] = finalPicsOutletDate
343
    partnerOnBoardingObject['finalPicsOutlet'] = finalPicsOutlet
344
    partnerOnBoardingObject['nocDate'] = nocDate
345
    partnerOnBoardingObject['noc'] = noc
28908 tejbeer 346
 
28600 amit.gupta 347
 
33512 tejus.loha 348
    var jsonObject = JSON.stringify(partnerOnBoardingObject);
28908 tejbeer 349
 
33512 tejus.loha 350
    console.log(jsonObject);
28908 tejbeer 351
 
33512 tejus.loha 352
    if (confirm("Are you sure you want to submit the request") == true) {
353
        doAjaxRequestWithJsonHandler(context + "/partnerOnboardingDesignaTatPanel", "POST", jsonObject, function (response) {
354
            row.html(response);
355
            row.css("background-color", "#F8F8FF");
28600 amit.gupta 356
 
33512 tejus.loha 357
        });
358
    }
28600 amit.gupta 359
 
33512 tejus.loha 360
});
28600 amit.gupta 361
 
362
 
33512 tejus.loha 363
$(document).on('click', ".noticPartneronboarding", function () {
364
    var id = $(this).data('id');
365
    console.log(id);
366
    if (confirm("Are you sure you want to Notice Isssue this Partner") == true) {
367
        doPostAjaxRequestHandler(context + "/partnerOnboardingNotice?id=" + id,
368
            function (response) {
28600 amit.gupta 369
 
33512 tejus.loha 370
                console.log("reponse" + response);
371
                if (response == 'true') {
372
                    alert("successfully Done");
28600 amit.gupta 373
 
28940 manish 374
 
33512 tejus.loha 375
                    panelListing("main-content");
376
                }
377
            });
378
    }
379
});
29061 tejbeer 380
 
381
 
33512 tejus.loha 382
$(document).on('click', ".holdPartnerOnboarding", function () {
383
    var id = $(this).data('id');
384
    console.log(id);
385
    if (confirm("Are you sure you want to hold this Partner") == true) {
386
        doPostAjaxRequestHandler(context + "/partnerOnboardingHold?id=" + id,
387
            function (response) {
29061 tejbeer 388
 
33512 tejus.loha 389
                console.log("reponse" + response);
390
                if (response == 'true') {
391
                    alert("successfully Done");
29061 tejbeer 392
 
393
 
33512 tejus.loha 394
                    panelListing("main-content");
395
                }
396
            });
397
    }
398
});
28600 amit.gupta 399
 
29061 tejbeer 400
 
33512 tejus.loha 401
$(document).on('click', ".unHoldPartnerOnboarding", function () {
402
    var id = $(this).data('id');
403
    console.log(id);
404
    if (confirm("Are you sure you want to Unhold this Partner") == true) {
405
        doPostAjaxRequestHandler(context + "/partnerOnboardingUnhold?id=" + id,
406
            function (response) {
29061 tejbeer 407
 
33512 tejus.loha 408
                console.log("reponse" + response);
409
                if (response == 'true') {
410
                    alert("successfully Done");
411
                    panelListing("main-content");
412
                }
413
            });
414
    }
415
});
29061 tejbeer 416
 
417
 
33512 tejus.loha 418
$(document).on('click', ".addKyc", function () {
419
    var id = $(this).data('id');
420
    console.log(id);
421
    doAjaxRequestHandler(context + "/getFofoKyc?onBoardingId=" + id, "GET",
422
        function (response) {
28900 manish 423
 
33512 tejus.loha 424
            console.log(response)
425
            $('.' + "fofoKycContainer").html(response);
29061 tejbeer 426
 
33512 tejus.loha 427
        });
29763 tejbeer 428
 
33512 tejus.loha 429
});
29763 tejbeer 430
 
431
 
33512 tejus.loha 432
var table = $('#fofokyctable').DataTable();
433
$(document).on('dblclick', '#fofokyctable tbody tr', function () {
434
    console.log("dblclick");
435
    var data = table.row(this).data();
29763 tejbeer 436
 
33512 tejus.loha 437
    $(this).find(":selected").attr('disabled', false).show();
438
    $(this).find(":input").attr('disabled', false).show();
29763 tejbeer 439
 
440
 
33512 tejus.loha 441
});
29763 tejbeer 442
 
443
 
33512 tejus.loha 444
$(document).on('click', '.addKycdetail', function () {
445
    var row = $(this).closest("tr");
29763 tejbeer 446
 
33512 tejus.loha 447
    var onBoardingId = $(this).data('onboardingid');
29763 tejbeer 448
 
33512 tejus.loha 449
    console.log(row);
450
    var rowIndex = $(this).closest('tr').prevAll().length;
451
    var id = $(row).find("td:eq(0)").text();
452
    var firstName = $(row).find("td:eq(1) input[type='text']").val();
453
    var middleName = $(row).find("td:eq(2) input[type='text']").val();
454
    var lastName = $(row).find("td:eq(3) input[type='text']").val();
29763 tejbeer 455
 
33512 tejus.loha 456
    var fatherName = $(row).find("td:eq(4) input[type='text']").val();
29763 tejbeer 457
 
33512 tejus.loha 458
    var dob = $(row).find("td:eq(5) input[type='date']").val();
29763 tejbeer 459
 
33512 tejus.loha 460
    if (dob != "") {
29763 tejbeer 461
 
33512 tejus.loha 462
        dob = dob + "T00:00:00";
463
    }
29763 tejbeer 464
 
33512 tejus.loha 465
    var gender = $(row).find("td:eq(6) option:selected").val();
466
    var maritalStatus = $(row).find("td:eq(7) option:selected").val();
29763 tejbeer 467
 
33512 tejus.loha 468
    var email = $(row).find("td:eq(8) input[type='text']").val();
29763 tejbeer 469
 
33512 tejus.loha 470
    var mobile = $(row).find("td:eq(9) input[type='text']").val();
471
    var pan = $(row).find("td:eq(10) input[type='text']").val();
29763 tejbeer 472
 
473
 
33512 tejus.loha 474
    var pandocId = $(row).find(".pandoc input[type=hidden]").val();
29774 tejbeer 475
 
33512 tejus.loha 476
    var poaNO = $(row).find("td:eq(12) input[type='text']").val();
477
    var poaType = $(row).find("td:eq(13) option:selected").val();
29763 tejbeer 478
 
33512 tejus.loha 479
    var paoFrontd = $(row).find(".paof input[type=hidden]").val();
480
    var paoBackId = $(row).find(".paob input[type=hidden]").val();
29763 tejbeer 481
 
33512 tejus.loha 482
    var address1 = $(row).find("td:eq(16) input[type='text']").val();
29763 tejbeer 483
 
33512 tejus.loha 484
    var address2 = $(row).find("td:eq(17) input[type='text']").val();
29763 tejbeer 485
 
33512 tejus.loha 486
    var address3 = $(row).find("td:eq(18) input[type='text']").val();
29763 tejbeer 487
 
33512 tejus.loha 488
    var city = $(row).find("td:eq(19) input[type='text']").val();
29763 tejbeer 489
 
490
 
33512 tejus.loha 491
    var state = $(row).find("td:eq(20) input[type='text']").val();
29763 tejbeer 492
 
33512 tejus.loha 493
    var pincode = $(row).find("td:eq(21) input[type='text']").val();
29763 tejbeer 494
 
495
 
33512 tejus.loha 496
    console.log(city)
497
    if (dob === "") {
498
        alert("dob is required");
499
        return;
500
    }
29763 tejbeer 501
 
502
 
33512 tejus.loha 503
    if (gender === "") {
504
        alert("gender is required");
505
        return;
506
    }
29763 tejbeer 507
 
508
 
33512 tejus.loha 509
    if (fatherName === "") {
510
        alert("Father Name is required");
511
        return;
512
    }
29763 tejbeer 513
 
33512 tejus.loha 514
    if (maritalStatus === "") {
515
        alert("Marital Status is required");
516
        return;
517
    }
29763 tejbeer 518
 
33512 tejus.loha 519
    if (email === "") {
520
        alert("email is required");
521
        return;
522
    }
29763 tejbeer 523
 
33512 tejus.loha 524
    if (mobile === "") {
525
        alert("mobile is required");
526
        return;
527
    }
29763 tejbeer 528
 
33512 tejus.loha 529
    if (pan === "") {
530
        alert("pan is required");
531
        return;
532
    }
29763 tejbeer 533
 
33512 tejus.loha 534
    if (pandocId === "") {
535
        alert("panDoc is required");
536
        return;
537
    }
29763 tejbeer 538
 
33512 tejus.loha 539
    if (poaNO === "") {
540
        alert("paoNO is required");
541
        return;
542
    }
29763 tejbeer 543
 
33512 tejus.loha 544
    if (poaType === "") {
545
        alert("paoType is required");
546
        return;
547
    }
29774 tejbeer 548
 
33512 tejus.loha 549
    if (paoFrontd === "") {
550
        alert("paoFrontd is required");
551
        return;
552
    }
29774 tejbeer 553
 
33512 tejus.loha 554
    if (paoBackId === "") {
555
        alert("paoBackId is required");
556
        return;
557
    }
29763 tejbeer 558
 
33512 tejus.loha 559
    if (address1 === "") {
560
        alert("address1 is required");
561
        return;
562
    }
563
    if (address2 === "") {
564
        alert("address2 is required");
565
        return;
566
    }
29763 tejbeer 567
 
33512 tejus.loha 568
    if (city === "") {
569
        alert("city is required");
570
        return;
571
    }
572
    if (state === "") {
573
        alert("state is required");
574
        return;
575
    }
29763 tejbeer 576
 
33512 tejus.loha 577
    if (pincode === "") {
578
        alert("pincode is required");
579
        return;
580
    }
29763 tejbeer 581
 
33512 tejus.loha 582
    var kycDetail = {};
583
    kycDetail['id'] = id
29763 tejbeer 584
 
33512 tejus.loha 585
    kycDetail['firstName'] = firstName
586
    kycDetail['middleName'] = middleName
587
    kycDetail['lastName'] = lastName
29763 tejbeer 588
 
33512 tejus.loha 589
    kycDetail['fatherName'] = fatherName
29763 tejbeer 590
 
33512 tejus.loha 591
    kycDetail['dob'] = dob
592
    kycDetail['gender'] = gender
593
    kycDetail['maritalStatus'] = maritalStatus
594
    kycDetail['email'] = email
595
    kycDetail['mobile'] = mobile
596
    kycDetail['pan'] = pan
597
    kycDetail['pandocId'] = pandocId
598
    kycDetail['poaNo'] = poaNO
599
    kycDetail['poaType'] = poaType
600
    kycDetail['paoFrontd'] = paoFrontd
601
    kycDetail['paoBackId'] = paoBackId
29763 tejbeer 602
 
33512 tejus.loha 603
    kycDetail['address1'] = address1
604
    kycDetail['address2'] = address2
605
    kycDetail['address3'] = address3
606
    kycDetail['city'] = city
607
    kycDetail['state'] = state
608
    kycDetail['pincode'] = pincode
609
    kycDetail['onboardingId'] = onBoardingId
29763 tejbeer 610
 
33512 tejus.loha 611
    var jsonObject = JSON.stringify(kycDetail);
612
    console.log("kycDetail" + jsonObject);
29763 tejbeer 613
 
33512 tejus.loha 614
    console.log(jsonObject);
29763 tejbeer 615
 
33512 tejus.loha 616
    if (confirm("Are you sure you want to submit the request") == true) {
617
        doAjaxRequestWithJsonHandler(context + "/addPartnerKyc", "POST", jsonObject, function (response) {
618
            row.html(response);
29763 tejbeer 619
 
620
 
33512 tejus.loha 621
        });
622
    }
29763 tejbeer 623
 
33512 tejus.loha 624
});
29774 tejbeer 625
 
29763 tejbeer 626
 
33512 tejus.loha 627
$(document).on('click', ".addNewRow", function () {
628
    var id = $(this).data('id');
629
    console.log(id);
630
    doAjaxRequestHandler(context + "/addKycRow?onBoardingId=" + id, "GET",
631
        function (response) {
29763 tejbeer 632
 
33512 tejus.loha 633
            console.log(response)
634
            $('.' + "fofoKycContainer").html(response);
29763 tejbeer 635
 
33512 tejus.loha 636
        });
29763 tejbeer 637
 
33512 tejus.loha 638
});
29763 tejbeer 639
 
640
 
33512 tejus.loha 641
var table = $('#legalkyctable').DataTable();
642
$(document).on('dblclick', '#legalkyctable tbody tr', function () {
643
    console.log("dblclick");
644
    var data = table.row(this).data();
29763 tejbeer 645
 
33512 tejus.loha 646
    $(this).find(":selected").attr('disabled', false).show();
647
    $(this).find(":input").attr('disabled', false).show();
29763 tejbeer 648
 
649
 
33512 tejus.loha 650
});
29763 tejbeer 651
 
652
 
33512 tejus.loha 653
$(document).on('click', '.addlegalKycdetail', function () {
654
    var row = $(this).closest("tr");
29763 tejbeer 655
 
33512 tejus.loha 656
    console.log(row);
29763 tejbeer 657
 
33512 tejus.loha 658
    var id = $(row).find("td:eq(2)").text();
659
    var status = $(row).find("td:eq(3) option:selected").val();
29763 tejbeer 660
 
29794 tejbeer 661
 
33512 tejus.loha 662
    var businessType = $(row).find("td:eq(4) option:selected").val();
663
    var firstName = $(row).find("td:eq(5) input[type='text']").val();
664
    var middleName = $(row).find("td:eq(6) input[type='text']").val();
665
    var lastName = $(row).find("td:eq(7) input[type='text']").val();
29794 tejbeer 666
 
33512 tejus.loha 667
    var fatherName = $(row).find("td:eq(8) input[type='text']").val();
29794 tejbeer 668
 
33512 tejus.loha 669
    var dob = $(row).find("td:eq(9) input[type='date']").val();
29794 tejbeer 670
 
33512 tejus.loha 671
    if (dob != "") {
29794 tejbeer 672
 
33512 tejus.loha 673
        dob = dob + "T00:00:00";
674
    }
29794 tejbeer 675
 
33512 tejus.loha 676
    var gender = $(row).find("td:eq(10) option:selected").val();
677
    var maritalStatus = $(row).find("td:eq(11) option:selected").val();
29794 tejbeer 678
 
33512 tejus.loha 679
    var email = $(row).find("td:eq(12) input[type='text']").val();
29794 tejbeer 680
 
33512 tejus.loha 681
    var mobile = $(row).find("td:eq(13) input[type='text']").val();
682
    var pan = $(row).find("td:eq(14) input[type='text']").val();
29794 tejbeer 683
 
684
 
33512 tejus.loha 685
    var pandocId = $(row).find(".pandoc input[type=hidden]").val();
29794 tejbeer 686
 
33512 tejus.loha 687
    var poaNO = $(row).find("td:eq(16) input[type='text']").val();
688
    var poaType = $(row).find("td:eq(17) option:selected").val();
29884 tejbeer 689
 
33512 tejus.loha 690
    var paoFrontd = $(row).find(".paof input[type=hidden]").val();
691
    var paoBackId = $(row).find(".paob input[type=hidden]").val();
29884 tejbeer 692
 
33512 tejus.loha 693
    var address1 = $(row).find("td:eq(20) input[type='text']").val();
29794 tejbeer 694
 
33512 tejus.loha 695
    var address2 = $(row).find("td:eq(21) input[type='text']").val();
29794 tejbeer 696
 
33512 tejus.loha 697
    var address3 = $(row).find("td:eq(22) input[type='text']").val();
29794 tejbeer 698
 
33512 tejus.loha 699
    var city = $(row).find("td:eq(23) input[type='text']").val();
29794 tejbeer 700
 
701
 
33512 tejus.loha 702
    var state = $(row).find("td:eq(24) input[type='text']").val();
29794 tejbeer 703
 
33512 tejus.loha 704
    var pincode = $(row).find("td:eq(25) input[type='text']").val();
29794 tejbeer 705
 
706
 
33512 tejus.loha 707
    var kycDetail = {};
708
    kycDetail['id'] = id
709
    kycDetail['status'] = status
710
    kycDetail['businessType'] = businessType
711
    kycDetail['firstName'] = firstName
712
    kycDetail['middleName'] = middleName
713
    kycDetail['lastName'] = lastName
29794 tejbeer 714
 
33512 tejus.loha 715
    kycDetail['fatherName'] = fatherName
29794 tejbeer 716
 
33512 tejus.loha 717
    kycDetail['dob'] = dob
718
    kycDetail['gender'] = gender
719
    kycDetail['maritalStatus'] = maritalStatus
720
    kycDetail['email'] = email
721
    kycDetail['mobile'] = mobile
722
    kycDetail['pan'] = pan
723
    kycDetail['pandocId'] = pandocId
724
    kycDetail['poaNo'] = poaNO
725
    kycDetail['poaType'] = poaType
726
    kycDetail['paoFrontd'] = paoFrontd
727
    kycDetail['paoBackId'] = paoBackId
29794 tejbeer 728
 
33512 tejus.loha 729
    kycDetail['address1'] = address1
730
    kycDetail['address2'] = address2
731
    kycDetail['address3'] = address3
732
    kycDetail['city'] = city
733
    kycDetail['state'] = state
734
    kycDetail['pincode'] = pincode
29794 tejbeer 735
 
33512 tejus.loha 736
    var jsonObject = JSON.stringify(kycDetail);
737
    console.log("kycDetail" + jsonObject);
29794 tejbeer 738
 
33512 tejus.loha 739
    console.log(jsonObject);
29794 tejbeer 740
 
33512 tejus.loha 741
    if (confirm("Are you sure you want to submit the request") == true) {
742
        doAjaxRequestWithJsonHandler(context + "/addlegalPartnerKyc", "POST", jsonObject, function (response) {
743
            row.html(response);
29794 tejbeer 744
 
745
 
33512 tejus.loha 746
        });
747
    }
29794 tejbeer 748
 
33512 tejus.loha 749
});
29794 tejbeer 750
 
33512 tejus.loha 751
$(document).on('click', ".partner-onboarding-index", function () {
752
    panelListing("main-content");
753
});
29794 tejbeer 754
 
755
 
33512 tejus.loha 756
$(document).on('click', ".partner-onboarding-open", function () {
757
    console.log("yes");
758
    partnerOnboardingOpen("main-content");
759
});
29794 tejbeer 760
 
33512 tejus.loha 761
$(document).on('click', ".design-completed", function () {
762
    console.log("yes");
763
    partnerOnboardinDesignCompleted("main-content");
764
});
29794 tejbeer 765
 
33512 tejus.loha 766
$(document).on('click', ".design_tat", function () {
767
    console.log("yes");
768
    partnerOnboardingDesign("main-content");
769
});
29794 tejbeer 770
 
33512 tejus.loha 771
$(document).on('click', ".partner-onboarding-reject", function () {
772
    console.log("helo");
29794 tejbeer 773
 
33512 tejus.loha 774
    partnerOnboardingReject("main-content");
775
});
29794 tejbeer 776
 
33512 tejus.loha 777
$(document).on('input', 'table#legalkyctable input[type=file]', function () {
778
    if (confirm('Confirm upload ?')) {
779
        var fileSelector = $(this)[0];
780
        if (fileSelector != undefined
781
            && fileSelector.files[0] != undefined) {
782
            var url = `${context}/document-upload`;
783
            console.log(url);
784
            var file = this.files[0];
785
            console.log("file" + file);
786
            let fileInput = $(this);
787
            console.log("fileInput" + file);
788
            doAjaxUploadRequestHandler(
789
                url,
790
                'POST',
791
                file,
792
                function (response) {
793
                    console.log(response);
794
                    var documentId = response.response.document_id;
795
                    console.log("documentId : " + documentId);
796
                    fileInput.closest('td').find("input[type=hidden]").val(documentId);
797
                });
798
            // alert("Retailer Shop Document
799
            // is required");
800
        }
801
    } else {
802
        // Do nothing!
803
    }
804
});
29794 tejbeer 805
 
806
 
33512 tejus.loha 807
$(document).on('input', 'table#fofokyctable input[type=file]', function () {
808
    if (confirm('Confirm upload ?')) {
809
        var fileSelector = $(this)[0];
810
        if (fileSelector != undefined
811
            && fileSelector.files[0] != undefined) {
812
            var url = `${context}/document-upload`;
813
            console.log(url);
814
            var file = this.files[0];
815
            console.log("file" + file);
816
            let fileInput = $(this);
817
            console.log("fileInput" + file);
818
            doAjaxUploadRequestHandler(
819
                url,
820
                'POST',
821
                file,
822
                function (response) {
823
                    console.log(response);
824
                    var documentId = response.response.document_id;
825
                    console.log("documentId : " + documentId);
826
                    fileInput.closest('td').find("input[type=hidden]").val(documentId);
827
                });
828
            // alert("Retailer Shop Document
829
            // is required");
830
        }
831
    } else {
832
        // Do nothing!
833
    }
834
});
29794 tejbeer 835
 
33512 tejus.loha 836
$(document).on('input', 'table#example input[type=file]', function () {
837
    if (confirm('Confirm upload ?')) {
838
        var fileSelector = $(this)[0];
839
        if (fileSelector != undefined
840
            && fileSelector.files[0] != undefined) {
841
            var url = `${context}/document-upload`;
842
            console.log(url);
843
            var file = this.files[0];
844
            console.log("file" + file);
845
            let fileInput = $(this);
846
            console.log("fileInput" + file);
847
            doAjaxUploadRequestHandler(
848
                url,
849
                'POST',
850
                file,
851
                function (response) {
852
                    console.log(response);
853
                    var documentId = response.response.document_id;
854
                    console.log("documentId : " + documentId);
855
                    fileInput.closest('td').find("input[type=hidden]").val(documentId);
856
                });
857
            // alert("Retailer Shop Document
858
            // is required");
859
        }
860
    } else {
861
        // Do nothing!
862
    }
863
});
29794 tejbeer 864
 
865
 
33512 tejus.loha 866
$(document).on('input', 'table#partnerVerification input[type=file]', function () {
867
    if (confirm('Confirm upload ?')) {
868
        var fileSelector = $(this)[0];
869
        if (fileSelector != undefined
870
            && fileSelector.files[0] != undefined) {
871
            var url = `${context}/document-upload`;
872
            console.log(url);
873
            var file = this.files[0];
874
            console.log("file" + file);
875
            let fileInput = $(this);
876
            console.log("fileInput" + file);
877
            doAjaxUploadRequestHandler(
878
                url,
879
                'POST',
880
                file,
881
                function (response) {
882
                    console.log(response);
883
                    var documentId = response.response.document_id;
884
                    console.log("documentId : " + documentId);
885
                    fileInput.closest('td').find("input[type=hidden]").val(documentId);
886
                });
887
            // alert("Retailer Shop Document
888
            // is required");
889
        }
890
    } else {
891
        // Do nothing!
892
    }
893
});
27813 tejbeer 894
 
895
 
33512 tejus.loha 896
$(document).on('input', 'table#OnboardingDesign input[type=file]', function () {
897
    if (confirm('Confirm upload ?')) {
898
        var fileSelector = $(this)[0];
899
        if (fileSelector != undefined
900
            && fileSelector.files[0] != undefined) {
901
            var url = `${context}/document-upload`;
902
            console.log(url);
903
            var file = this.files[0];
904
            console.log("file" + file);
905
            let fileInput = $(this);
906
            console.log("fileInput" + file);
907
            doAjaxUploadRequestHandler(
908
                url,
909
                'POST',
910
                file,
911
                function (response) {
912
                    console.log(response);
913
                    var documentId = response.response.document_id;
914
                    console.log("documentId : " + documentId);
915
                    fileInput.closest('td').find("input[type=hidden]").val(documentId);
916
                });
917
            // alert("Retailer Shop Document
918
            // is required");
919
        }
920
    } else {
921
        // Do nothing!
922
    }
923
});
28908 tejbeer 924
 
33512 tejus.loha 925
$(document).on('click', '#newmodal', function () {
28908 tejbeer 926
 
27813 tejbeer 927
 
33512 tejus.loha 928
    var newOnboarding = {};
929
    var outletName = $('#outLetName1').val();
930
    var phoneNumber = $('#number1').val();
931
    var leadId = $("#leadId").val();
27763 tejbeer 932
 
27799 tejbeer 933
 
33512 tejus.loha 934
    if (outletName == "") {
29763 tejbeer 935
 
33512 tejus.loha 936
        alert("outletName is required ");
937
        return;
938
    }
939
    newOnboarding['outletName'] = $('#outLetName1').val();
29794 tejbeer 940
 
33512 tejus.loha 941
    if (phoneNumber == "") {
942
        alert("Phone Number is required ");
943
        return false;
29763 tejbeer 944
 
33512 tejus.loha 945
    }
946
    if (phoneNumber.length > 6 && phoneNumber.length < 11) {
29061 tejbeer 947
 
33512 tejus.loha 948
        newOnboarding['phoneNumber'] = $('#number1').val();
29061 tejbeer 949
 
33512 tejus.loha 950
    } else {
951
        alert("Number should be greater then 6 and less then 11");
952
        return false;
29061 tejbeer 953
 
33512 tejus.loha 954
    }
29061 tejbeer 955
 
33512 tejus.loha 956
    acquireddate1 = $('#acquireddate1').val();
957
    console.log(acquireddate1)
29061 tejbeer 958
 
33512 tejus.loha 959
    if (acquireddate1 != "") {
27799 tejbeer 960
 
33512 tejus.loha 961
        alert("Acquired date is required");
29061 tejbeer 962
 
33512 tejus.loha 963
    }
964
    if (acquireddate1 != "") {
965
        acquireddate1 = acquireddate1 + "T00:00:00";
966
    }
967
    newOnboarding['authId'] = $('#authUserOnboarding').val();
29061 tejbeer 968
 
33512 tejus.loha 969
    newOnboarding['acquiredDate'] = acquireddate1
970
    newOnboarding['leadId'] = leadId
29061 tejbeer 971
 
31370 tejbeer 972
 
33512 tejus.loha 973
    var json = JSON.stringify(newOnboarding);
974
    console.log(json);
975
    doAjaxRequestWithJsonHandler(
976
        context
977
        + "/partnerOnBoardingListing",
978
        "POST",
979
        json,
980
        function (response) {
29061 tejbeer 981
 
33512 tejus.loha 982
            panelListing("main-content");
29061 tejbeer 983
 
984
 
33512 tejus.loha 985
        });
986
});
29061 tejbeer 987
 
33512 tejus.loha 988
var table = $('#example').DataTable();
989
$(document).on('dblclick', '#example tbody tr', function () {
29061 tejbeer 990
 
33512 tejus.loha 991
    var data = table.row(this).data();
33891 tejus.loha 992
    var statusHold = $(this).find("td:eq(39) button[type='submit']").val();
29061 tejbeer 993
 
33891 tejus.loha 994
    console.log("statusHold=" + statusHold);
33512 tejus.loha 995
    if (statusHold.localeCompare("hold")) {
996
        $(this).find(":input").attr('disabled', true);
33891 tejus.loha 997
        $(this).find("td:eq(38) button[type='submit']").attr('disabled', false);
33512 tejus.loha 998
        $(this).find("td:eq(37) button[type='submit']").attr('disabled', false);
999
    } else {
1000
        $(this).find(":input").attr('disabled', false).show();
1001
        $(this).find(":selected").attr('disabled', false).show();
29061 tejbeer 1002
 
33512 tejus.loha 1003
    }
1004
    $(this).find("input[name=rbmAuthId]").attr('disabled', true);
1005
    $(this).find("input[name=verificationStatusOnboarding]").attr('disabled', true);
1006
    $(this).find("input[name=billingStatus]").attr('disabled', true);
31370 tejbeer 1007
 
1008
 
33512 tejus.loha 1009
    $(this).css("background-color", "#87d3f8");
1010
    let a = 12;
1011
    let b = 12;
1012
    console.log("yes" + a == b);
31370 tejbeer 1013
 
33512 tejus.loha 1014
});
27813 tejbeer 1015
 
33512 tejus.loha 1016
var table = $('#OnboardingDesign').DataTable();
1017
$(document).on('dblclick', '#OnboardingDesign tbody tr', function () {
27813 tejbeer 1018
 
33512 tejus.loha 1019
    var data = table.row(this).data();
29061 tejbeer 1020
 
33512 tejus.loha 1021
    $(this).find(":input").attr('disabled', false).show();
1022
    $(this).find(":selected").attr('disabled', true);
27813 tejbeer 1023
 
33512 tejus.loha 1024
    $(this).find("input[name=acquireddate]").attr('disabled', true);
1025
    $(this).find("input[name=outlateName]").attr('disabled', true);
1026
    $(this).find("input[name=phonenumber1]").attr('disabled', true);
1027
    $(this).find("input[name=kyc1]").attr('disabled', true);
1028
    $(this).find("input[name=city1]").attr('disabled', true);
1029
    $(this).find("input[name=shead1]").attr('disabled', true);
1030
    $(this).find("input[name=bdm1]").attr('disabled', true);
1031
    $(this).find("input[name=abrand1]").attr('disabled', true);
1032
    $(this).find("input[name=recbrand1]").attr('disabled', true);
1033
    $(this).find("input[name=BrandFeesdate1]").attr('disabled', true);
1034
    $(this).find("input[name=idate1]").attr('disabled', true);
1035
    $(this).find("input[name=loi1]").attr('disabled', true);
1036
    $(this).find("input[name=code1]").attr('disabled', true);
1037
    $(this).find("input[name=rplaned1]").attr('disabled', true);
1038
    $(this).find("input[name=stockPaymentDesign]").attr('disabled', true);
1039
    $(this).find("input[name=twoDBoq1]").attr('disabled', true);
1040
    $(this).find("input[name=threeBoqDate1]").attr('disabled', true);
1041
    $(this).find("input[name=poVenderDate1]").attr('disabled', true);
1042
    $(this).find("input[name=briefingPartnerPlanedDate1]").attr('disabled', true);
1043
    $(this).find("input[name=deploymentPlanedDate]").attr('disabled', true);
1044
    $(this).find("input[name=FinalPicsOutLets]").attr('disabled', true);
1045
    $(this).find("input[name=poVenderDate1]").attr('disabled', true);
1046
    $(this).css("background-color", "#87d3f8");
1047
    let a = 12;
1048
    let b = 12;
1049
    console.log("yes" + a == b);
28908 tejbeer 1050
 
33512 tejus.loha 1051
});
28908 tejbeer 1052
 
27813 tejbeer 1053
 
33512 tejus.loha 1054
var billingtable = $('#partnerbilling').DataTable();
1055
$(document).on('dblclick', '#partnerbilling tbody tr', function () {
1056
    var data = billingtable.row(this).data();
27813 tejbeer 1057
 
33512 tejus.loha 1058
    $(this).find(":input").attr('disabled', false).show();
29061 tejbeer 1059
 
1060
 
33512 tejus.loha 1061
});
29061 tejbeer 1062
 
33882 tejus.loha 1063
/*$(document)
33512 tejus.loha 1064
    .on(
1065
        'click',
1066
        ".submitOnboardingBilling",
1067
        function () {
29088 tejbeer 1068
 
33512 tejus.loha 1069
            var row = $(this).closest("tr");
1070
            console.log(row);
29061 tejbeer 1071
 
33512 tejus.loha 1072
            var onboardingId = $(row).find("td:eq(0)").text();
1073
            var stockPayment = $(row).find("td:eq(5) input[type='text']").val();
1074
            var advStock = $(row).find("td:eq(4) input[type='date']").val();
1075
            if (advStock != "") {
1076
                advStock = advStock + "T00:00:00";
1077
            }
28908 tejbeer 1078
 
33512 tejus.loha 1079
            var billingStatus = $(row)
1080
                .find("td:eq(6) input[type='checkbox']").is(":checked") ? 1 : 0;
27813 tejbeer 1081
 
33512 tejus.loha 1082
            doPostAjaxRequestHandler(context + "/partnerOnBoardingBillingSubmission?billingStatus=" + billingStatus + "&onBoardingId=" + onboardingId + "&advStock=" + advStock + "&stockPayment=" + stockPayment,
1083
                function (response) {
1084
                    row.html(response);
1085
                    alert("successfully submit");
28908 tejbeer 1086
 
1087
 
33512 tejus.loha 1088
                });
33882 tejus.loha 1089
        });*/
28908 tejbeer 1090
 
28600 amit.gupta 1091
 
33891 tejus.loha 1092
$(document).on('click', ".open_outlet", function () {
28600 amit.gupta 1093
 
33512 tejus.loha 1094
    var id = $(this).data('id');
1095
    console.log('helo');
1096
    var id = $(this).data('id');
1097
    console.log(id);
1098
    if (confirm("Are you sure your outlet is open") == true) {
1099
        doPostAjaxRequestHandler(context + "/partnerOnBoardingOpen?id=" + id,
1100
            function (response) {
29088 tejbeer 1101
 
33512 tejus.loha 1102
                console.log("reponse" + response);
1103
                if (response == 'true') {
1104
                    alert("congratulations your outlet is successfully open");
29088 tejbeer 1105
 
33512 tejus.loha 1106
                    panelListing("main-content");
1107
                }
1108
            });
1109
    }
29088 tejbeer 1110
 
33512 tejus.loha 1111
});
1112
$(document).on('click', ".design-complete", function () {
1113
    var id = $(this).data('id');
1114
    var row = $(this).closest("tr");
1115
    console.log('helo');
1116
    var receeActual = $(row).find("td:eq(14) input[type='date']").val();
1117
    if (receeActual != "") {
1118
        receeActual = receeActual + "T00:00:00";
1119
    }
1120
    var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
1121
    if (twoDBoqdate != "") {
1122
        twoDBoqdate = twoDBoqdate + "T00:00:00";
1123
    }
29088 tejbeer 1124
 
33512 tejus.loha 1125
    var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
1126
    if (poVenderDate != "") {
1127
        poVenderDate = poVenderDate + "T00:00:00";
1128
    }
1129
    var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
1130
    if (briefingPartner != "") {
1131
        briefingPartner = briefingPartner + "T00:00:00";
1132
    }
29088 tejbeer 1133
 
33512 tejus.loha 1134
    var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
1135
    if (deploymentDate != "") {
1136
        deploymentDate = deploymentDate + "T00:00:00";
1137
    }
29088 tejbeer 1138
 
33512 tejus.loha 1139
    var nocDate = $(row).find("td:eq(31) input[type='date']").val();
1140
    if (nocDate != "") {
1141
        nocDate = nocDate + "T00:00:00";
1142
    }
29763 tejbeer 1143
 
33512 tejus.loha 1144
    if (receeActual == "") {
1145
        alert("Please Fill The Recee Actual Date");
1146
        return
29088 tejbeer 1147
 
33512 tejus.loha 1148
    }
1149
    if (twoDBoqdate == "") {
1150
        alert("Please Fill The 2D with BOQ Actual Date");
1151
        return
29088 tejbeer 1152
 
33512 tejus.loha 1153
    }
1154
    if (poVenderDate == "") {
1155
        alert("Please Fill The PO To Vendor Actual Date");
1156
        return
29088 tejbeer 1157
 
33512 tejus.loha 1158
    }
1159
    if (briefingPartner == "") {
1160
        alert("Please Fill The Briefing Partner Actual Date ");
1161
        return
29088 tejbeer 1162
 
33512 tejus.loha 1163
    }
29088 tejbeer 1164
 
33512 tejus.loha 1165
    if (deploymentDate == "") {
1166
        alert("Please Fill The Deployment Actual Date ");
1167
        return
29088 tejbeer 1168
 
33512 tejus.loha 1169
    }
1170
    if (nocDate == "") {
1171
        alert("Please Fill The NOC Actual Date ");
1172
        return
27813 tejbeer 1173
 
33512 tejus.loha 1174
    }
27813 tejbeer 1175
 
1176
 
33512 tejus.loha 1177
    var id = $(this).data('id');
1178
    console.log(id);
1179
    if (confirm("Are you sure your Design TAT is Complete") == true) {
1180
        doPostAjaxRequestHandler(context + "/partnerDesignTatCompleted?id=" + id,
1181
            function (response) {
27813 tejbeer 1182
 
33512 tejus.loha 1183
                console.log("reponse" + response);
1184
                if (response == 'true') {
1185
                    alert("congratulations your Desiging is successfully Done");
1186
                    partnerOnboardingDesign("main-content");
1187
                }
1188
            });
1189
    }
29061 tejbeer 1190
 
33512 tejus.loha 1191
});
29061 tejbeer 1192
 
1193
 
33512 tejus.loha 1194
$(document).on('click', ".rejectpartneronboarding", function () {
1195
    var id = $(this).data('id');
1196
    console.log('helo');
1197
    var id = $(this).data('id');
1198
    console.log(id);
1199
    if (confirm("Are you sure you want to reject the request") == true) {
1200
        doPostAjaxRequestHandler(context + "/partnerOnBoardingReject?id=" + id,
1201
            function (response) {
29061 tejbeer 1202
 
33512 tejus.loha 1203
                console.log("reponse" + response);
1204
                if (response == 'true') {
1205
                    alert("successfully rejected");
1206
                    panelListing("main-content");
1207
                }
1208
            });
1209
    }
29061 tejbeer 1210
 
27763 tejbeer 1211
});
1212
 
27813 tejbeer 1213
 
33512 tejus.loha 1214
$(document).on('click', ".Del", function () {
1215
    if (confirm("Are you sure you want to delete this doc")) {
1216
        var $td = $(this).closest("td");
1217
        $td.find("input[type=hidden]").val('0');
1218
        $td.css({'background-color': 'pink'});
1219
        $td.find('a', ".download").hide();
1220
        $td.find('a', ".Del").hide();
1221
    }
28908 tejbeer 1222
});
28600 amit.gupta 1223
 
28908 tejbeer 1224
 
27829 tejbeer 1225
function panelListing(domId) {
33512 tejus.loha 1226
    doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1227
        function (response) {
1228
            $('#' + domId).html(response);
1229
        });
27829 tejbeer 1230
}
27813 tejbeer 1231
 
1232
 
27763 tejbeer 1233
function panelListing(domId) {
33512 tejus.loha 1234
    doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1235
        function (response) {
1236
            $('#' + domId).html(response);
1237
        });
27763 tejbeer 1238
}
33512 tejus.loha 1239
 
27799 tejbeer 1240
function partnerOnboardingOpen(domId) {
33512 tejus.loha 1241
    doAjaxRequestHandler(context + "/partnerOnBoardingOpenShow", "GET",
1242
        function (response) {
1243
            $('#' + domId).html(response);
1244
        });
27799 tejbeer 1245
}
28600 amit.gupta 1246
 
1247
function partnerOnboardinDesignCompleted(domId) {
33512 tejus.loha 1248
    doAjaxRequestHandler(context + "/DesignTatCompletedShow", "GET",
1249
        function (response) {
1250
            $('#' + domId).html(response);
1251
        });
28600 amit.gupta 1252
}
1253
 
1254
function partnerOnboardingDesign(domId) {
33512 tejus.loha 1255
    doAjaxRequestHandler(context + "/partnerOnBoardingDesign", "GET",
1256
        function (response) {
1257
            $('#' + domId).html(response);
1258
        });
28600 amit.gupta 1259
}
1260
 
27799 tejbeer 1261
function partnerOnboardingReject(domId) {
33512 tejus.loha 1262
    doAjaxRequestHandler(context + "/partnerOnBoardingRejectShow", "GET",
1263
        function (response) {
1264
            $('#' + domId).html(response);
1265
        });
27799 tejbeer 1266
}
27763 tejbeer 1267
 
27813 tejbeer 1268
 
27763 tejbeer 1269
function panelOnBoardingListing(domId) {
33512 tejus.loha 1270
    doAjaxRequestHandler(context + "/partnerOnBoardingListing", "POST",
1271
        function (response) {
1272
            $('#' + domId).html(response);
1273
        });
27763 tejbeer 1274
 
1275
}
1276
 
1277
 
28908 tejbeer 1278
function panelListing(domId) {
33512 tejus.loha 1279
    doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",
1280
        function (response) {
1281
            $('#' + domId).html(response);
1282
        });
28908 tejbeer 1283
}
27763 tejbeer 1284
 
1285
 
27842 tejbeer 1286
 
28908 tejbeer 1287