Subversion Repositories SmartDukaan

Rev

Rev 34168 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33879 tejus.loha 1
$(document).on('click', ".partner_dealer_mapping", function () {
28848 manish 2
 
33879 tejus.loha 3
    console.log("Hello");
4
    partnerDealerMapping("main-content");
28848 manish 5
 
33879 tejus.loha 6
});
28848 manish 7
 
33879 tejus.loha 8
$(document).on('click', ".partner-onboarding-legal-index", function () {
29214 tejbeer 9
 
33879 tejus.loha 10
    console.log("Hello");
11
    partnerOnboardingLegal("main-content");
28885 manish 12
 
33879 tejus.loha 13
});
29104 manish 14
 
33879 tejus.loha 15
$(document).on('click', ".partner_onboarding_verification", function () {
29104 manish 16
 
33879 tejus.loha 17
    partnerOnboardingVerification("main-content");
28848 manish 18
 
33879 tejus.loha 19
});
20
$(document).on('click', ".noc_upload_verification", function () {
21
    nocUploadPanel("main-content");
22
});
28885 manish 23
 
33879 tejus.loha 24
$(document).on('click', ".partner-dashboard-training", function () {
28885 manish 25
 
33879 tejus.loha 26
    console.log("Hello");
27
    partnerDashboardTraining("main-content");
28848 manish 28
 
33879 tejus.loha 29
});
28848 manish 30
 
33879 tejus.loha 31
$(document).on(
32
    'click',
33
    ".partner-dealer-submit",
34
    function () {
28848 manish 35
 
33879 tejus.loha 36
        var row = $(this).closest("tr");
37
        console.log(row);
38
        var brandlength = $(this).data("brandlength");
39
        var onboardingId = $(row).find("td:eq(0)").text();
40
        var partnerCode = $(row).find("td:eq(4)").text();
28848 manish 41
 
33908 tejus.loha 42
        console.log("brandlength" + brandlength);
43
        var brandCodes = [];
33879 tejus.loha 44
        for (let i = 5; i < 5 + brandlength; i++) {
45
            brandCodes.push($(row).find(
46
                "td:eq(" + i + ") input[type='text']").val());
47
        }
28848 manish 48
 
33879 tejus.loha 49
        console.log("bands" + brandCodes);
28848 manish 50
 
33879 tejus.loha 51
        dmsCode = {
52
            "onboardingId": onboardingId,
53
            "partnerCode": partnerCode,
54
            "brands": brandCodes,
33908 tejus.loha 55
        };
28848 manish 56
 
33908 tejus.loha 57
        var jsonObject = JSON.stringify(dmsCode);
28848 manish 58
 
33879 tejus.loha 59
        console.log("jsonObject" + jsonObject);
60
        if (confirm("Are you sure you want to submit") == true) {
61
            doAjaxRequestWithJsonHandler(context + "/partnerDealerSubmit",
62
                "POST", jsonObject, function (response) {
63
                    row.html(response);
28848 manish 64
 
33879 tejus.loha 65
                });
66
        }
67
    });
28848 manish 68
 
33879 tejus.loha 69
$(document)
70
    .on(
71
        'click',
72
        ".partner-verification-resend",
73
        function () {
28848 manish 74
 
33879 tejus.loha 75
            var row = $(this).closest("tr");
76
            console.log(row);
28848 manish 77
 
33879 tejus.loha 78
            var onboardingId = $(row).find("td:eq(0)").text();
28848 manish 79
 
33879 tejus.loha 80
            if (confirm("Are you sure you want to Resend this verification") == true) {
81
                doPostAjaxRequestHandler(
82
                    context
83
                    + "/partnerVerificationResend?onboardingId="
84
                    + onboardingId, function (response) {
85
                        if (response == 'true') {
86
                            alert("Successfully Resend");
87
                            panelListing("main-content");
88
                        }
28848 manish 89
 
33879 tejus.loha 90
                    });
91
            }
28848 manish 92
 
33879 tejus.loha 93
        });
28848 manish 94
 
29213 tejbeer 95
 
33879 tejus.loha 96
$(document).on('click', ".partner-verifi-update-checkbox", function () {
97
    var row = $(this).closest("tr");
98
    console.log(row);
99
    var onboardingId = $(row).find("td:eq(0)").text();
29213 tejbeer 100
 
33879 tejus.loha 101
    doAjaxRequestHandler(context + "/partnerVerifiUpdateCheckbox?onboardingId=" + onboardingId, "GET", function (
102
        response) {
103
        $('.myVerificationCheckboxUpdate').html(response);
29213 tejbeer 104
 
33879 tejus.loha 105
    });
29213 tejbeer 106
 
107
 
33879 tejus.loha 108
});
29213 tejbeer 109
 
28848 manish 110
 
33879 tejus.loha 111
$(document).on('click', ".verification-checkbox-submit", function () {
29007 manish 112
 
113
 
33879 tejus.loha 114
    console.log("Hello");
115
    var row = $(this).closest("tr");
116
    console.log(row);
117
    var onboardingId = $(this).data('id');
29213 tejbeer 118
 
33879 tejus.loha 119
    var trainingVerifi = $('input[name="trainingVerifi"]').is(":checked") ? 1 : 0;
120
    var recceVerifi = $('input[name="recceVerifi"]').is(":checked") ? 1 : 0;
121
    var advStockPayment = $('input[name="advStockPayment"]').is(":checked") ? 1 : 0;
122
    var brandingVerifi = $('input[name="brandingVerifi"]').is(":checked") ? 1 : 0;
123
    var stockPay = $('input[name="stockPay"]').is(":checked") ? 1 : 0;
124
    var billingVerifi = $('input[name="billingVerifi"]').is(":checked") ? 1 : 0;
125
    var inaugrationVerifi = $('input[name="inaugrationVerifi"]').is(":checked") ? 1 : 0;
126
    var financialServices = $('input[name="financialServices"]').is(":checked") ? 1 : 0;
127
    var promotorVerifi = $('input[name="promotorVerifi"]').is(":checked") ? 1 : 0;
128
    var verifiComments = $('input[name="verifiCommentCheckbox"]').val();
29213 tejbeer 129
 
130
 
33879 tejus.loha 131
    var partnerVerficationCheckBoxObject = {};
132
    partnerVerficationCheckBoxObject['onboardingId'] = onboardingId
133
    partnerVerficationCheckBoxObject['trainingVerifi'] = trainingVerifi
134
    partnerVerficationCheckBoxObject['recceVerifi'] = recceVerifi
135
    partnerVerficationCheckBoxObject['advStockPayment'] = advStockPayment
136
    partnerVerficationCheckBoxObject['brandingVerifi'] = brandingVerifi
29213 tejbeer 137
 
33879 tejus.loha 138
    partnerVerficationCheckBoxObject['stockPay'] = stockPay
29213 tejbeer 139
 
33879 tejus.loha 140
    partnerVerficationCheckBoxObject['billingVerifi'] = billingVerifi
141
    partnerVerficationCheckBoxObject['inaugrationVerifi'] = inaugrationVerifi
142
    partnerVerficationCheckBoxObject['financialServices'] = financialServices
29213 tejbeer 143
 
33879 tejus.loha 144
    partnerVerficationCheckBoxObject['promotorVerifi'] = promotorVerifi
29213 tejbeer 145
 
33879 tejus.loha 146
    partnerVerficationCheckBoxObject['verifiCheckboxComment'] = verifiComments
29213 tejbeer 147
 
148
 
33879 tejus.loha 149
    var jsonObject = JSON
150
        .stringify(partnerVerficationCheckBoxObject);
29213 tejbeer 151
 
29007 manish 152
 
33879 tejus.loha 153
    console.log(jsonObject);
29213 tejbeer 154
 
155
 
33879 tejus.loha 156
    if (confirm("Are you sure you want to submit the request") == true) {
157
        doAjaxRequestWithJsonHandler(context
158
            + "/partnerVerificationCheckBoxSubmit", "POST",
159
            jsonObject, function (response) {
160
                alert("successfully Submitted");
161
                $('.myVerificationCheckboxUpdate').html(response);
29213 tejbeer 162
 
33879 tejus.loha 163
            });
164
    }
29007 manish 165
 
29213 tejbeer 166
 
33879 tejus.loha 167
});
29213 tejbeer 168
 
169
 
33879 tejus.loha 170
$(document)
171
    .on(
172
        'click',
173
        ".partner-verification-submit",
174
        function () {
29007 manish 175
 
33879 tejus.loha 176
            var row = $(this).closest("tr");
177
            console.log(row);
29213 tejbeer 178
 
33879 tejus.loha 179
            var onboardingId = $(row).find("td:eq(0)").text();
180
            var comment = $(row).find("td:eq(7) input[type='text']").val();
181
            var language = $(row).find("td:eq(8) option:selected").val();
35971 aman 182
            var approval = $(row).find("td:eq(9) option:selected").val();
29213 tejbeer 183
 
33879 tejus.loha 184
            console.log("onboardingId" + onboardingId);
185
            console.log("language" + language);
186
            console.log("approval" + approval);
187
            console.log("comment" + comment);
29213 tejbeer 188
 
33879 tejus.loha 189
            var partnerVerficationObject = {};
190
            partnerVerficationObject.onboardingId = onboardingId;
191
            partnerVerficationObject.comment = comment;
192
            partnerVerficationObject.language = language;
193
            partnerVerficationObject.approval = approval;
29213 tejbeer 194
 
195
 
33879 tejus.loha 196
            var jsonObject = JSON.stringify(partnerVerficationObject);
197
            console.log(jsonObject);
28848 manish 198
 
33879 tejus.loha 199
            if (confirm("Are you sure you want to submit the request")) {
200
                doAjaxRequestWithJsonHandler(`${context}/partnerVerificationSubmit`, "POST", jsonObject, function (response) {
201
                    if (response === 'true') {
202
                        alert("Request submited");
203
                        var dataTable = $('#partnerVerification').DataTable();
204
                        dataTable.row(row).remove().draw(false);
205
                    } else {
206
                        alert("Request not submit");
207
                    }
208
                });
209
            }
28848 manish 210
 
33879 tejus.loha 211
        });
212
$(document).on('click', '.uploadNocDoc', function () {
213
    console.log("uploadNocDoc clicked");
214
    let data = [];
215
    let isValid = true;  // To track if all validations pass
216
    $('#requiredNoc tbody tr').each(function () {
217
        let brandId = $(this).find('.brandId').val();
218
        let documentId = $(this).find('.documentId').val();
33882 tejus.loha 219
        let commitAmount = $(this).find('.commitAmount').val();
33908 tejus.loha 220
        let isActive = $(this).find('.mk_loiBrandCommit-isActive').val();
33879 tejus.loha 221
        let nocRequiredSelect = $(this).find('.noc-required');
222
        let nocRequired = nocRequiredSelect.val();
33908 tejus.loha 223
 
33879 tejus.loha 224
        console.log("nocRequired - ", nocRequired);
225
        console.log("documentId - ", documentId);
33882 tejus.loha 226
        console.log("commitAmount - ", commitAmount);
227
        console.log("isActive - ", isActive);
29763 tejbeer 228
 
33879 tejus.loha 229
        // Validate: If document is not uploaded, user must select "Not Required"
33882 tejus.loha 230
        if (parseInt(documentId) === 0 && nocRequired.trim() === "" && isActive === 'true') {
33879 tejus.loha 231
            alert("Please select 'Received' or 'Not Required' for brands without an uploaded NOC.");
232
            isValid = false;  // Mark validation as failed
233
            return;  // Exit loop early
234
        }
33882 tejus.loha 235
 
33879 tejus.loha 236
        data.push({
237
            brandId: brandId,
33882 tejus.loha 238
            amount: commitAmount,
239
            active: isActive,
33879 tejus.loha 240
            nocDocId: documentId || 0,  // Use null if no document uploaded
241
            nocGt: nocRequired
242
        });
28848 manish 243
 
33879 tejus.loha 244
    });
28885 manish 245
 
33879 tejus.loha 246
    // Stop if validation failed
247
    if (!isValid) {
248
        return;
249
    }
28885 manish 250
 
33879 tejus.loha 251
    // Get loiId from the button value
252
    let loiId = $(this).val();
33908 tejus.loha 253
    let onBoardingId = $(this).data('onboardingid');
29300 manish 254
 
33879 tejus.loha 255
    console.log("loiId - ", loiId);
33908 tejus.loha 256
    console.log("onBoardingId  - ", onBoardingId);
33879 tejus.loha 257
    console.log("data - ", data);
258
    // Check if data is available to send
259
    if (data.length === 0) {
260
        alert("Please select a value for NOC in at least one row then try to click Upload all ");
261
        return;
262
    }
263
    let payload = JSON.stringify(data);
264
    console.log("data - ", data);
265
    if (confirm("Are you sure to upload")) {
33908 tejus.loha 266
        doPostAjaxRequestWithJsonHandler(`${context}/updateLoiBrandCommitment?loiId=${loiId}&onBoardingId=${onBoardingId}`, payload, function (response) {
33879 tejus.loha 267
            if (response) {
268
                $('#nocUploadModal').modal('hide');
269
                alert("NOC uploaded successfully");
270
            }
271
        });
272
    } else {
273
        $('#nocUploadModal').modal('hide');
274
        return;
275
    }
276
});
28885 manish 277
 
33879 tejus.loha 278
$(document)
279
    .on(
280
        'click',
281
        ".partner-training-submit",
282
        function () {
28885 manish 283
 
33879 tejus.loha 284
            var row = $(this).closest("tr");
285
            console.log(row);
28885 manish 286
 
33879 tejus.loha 287
            var onboardingId = $(row).find("td:eq(0)").text();
28932 manish 288
 
33879 tejus.loha 289
            var datePlaned = $(row).find(
290
                "td:eq(8) input[type='date']").val();
29213 tejbeer 291
 
33879 tejus.loha 292
            if (datePlaned != "") {
293
                datePlaned = datePlaned + "T00:00:00";
294
            }
29213 tejbeer 295
 
33879 tejus.loha 296
            var dateCompleted = $(row).find(
297
                "td:eq(9) input[type='date']").val();
298
            if (dateCompleted != "") {
299
                dateCompleted = dateCompleted + "T00:00:00";
300
            }
29213 tejbeer 301
 
33879 tejus.loha 302
            var dashboardTraining = $(row).find(
303
                "td:eq(6) option:selected").val();
304
            var appTraining = $(row).find(
305
                "td:eq(7) option:selected").val();
29213 tejbeer 306
 
33879 tejus.loha 307
            console.log("onboardingId" + onboardingId);
308
            console.log("dateCompleted" + dateCompleted);
309
            console.log("dashboardTraining" + dashboardTraining);
310
            console.log("appTraining" + appTraining);
29213 tejbeer 311
 
33879 tejus.loha 312
            var partnerDashboardTraining = {};
313
            partnerDashboardTraining['onboardingId'] = onboardingId
314
            partnerDashboardTraining['datePlaned'] = datePlaned
315
            partnerDashboardTraining['dateCompleted'] = dateCompleted
316
            partnerDashboardTraining['dashboardTraining'] = dashboardTraining
317
            partnerDashboardTraining['appTraining'] = appTraining
29213 tejbeer 318
 
33879 tejus.loha 319
            var jsonObject = JSON
320
                .stringify(partnerDashboardTraining);
29213 tejbeer 321
 
33879 tejus.loha 322
            console.log(jsonObject);
28885 manish 323
 
33879 tejus.loha 324
            if (confirm("Are you sure you want to submit the request") == true) {
325
                doAjaxRequestWithJsonHandler(context
326
                    + "/partnerDashboardTrainingSubmit",
327
                    "POST", jsonObject, function (response) {
328
                        row.html(response);
329
                        row.css("background-color", "#F8F8FF");
28885 manish 330
 
33879 tejus.loha 331
                    });
332
            }
28885 manish 333
 
33879 tejus.loha 334
        });
28885 manish 335
 
336
 
33879 tejus.loha 337
$(document).on('input', 'table#onboardingLegal input[type=file]', function () {
338
    if (confirm('Confirm upload ?')) {
339
        var fileSelector = $(this)[0];
340
        if (fileSelector != undefined
341
            && fileSelector.files[0] != undefined) {
342
            var url = `${context}/document-upload`;
343
            console.log(url);
344
            var file = this.files[0];
345
            console.log("file" + file);
346
            let fileInput = $(this);
347
            console.log("fileInput" + file);
348
            doAjaxUploadRequestHandler(
349
                url,
350
                'POST',
351
                file,
352
                function (response) {
353
                    console.log(response);
354
                    var documentId = response.response.document_id;
355
                    console.log("documentId : " + documentId);
356
                    fileInput.closest('td').find("input[type=hidden]").val(documentId);
357
                });
358
            // alert("Retailer Shop Document
359
            // is required");
360
        }
361
    } else {
362
        // Do nothing!
363
    }
364
});
28885 manish 365
 
366
 
33879 tejus.loha 367
$(document)
368
    .on(
369
        'click',
370
        ".submit-legal",
371
        function () {
28885 manish 372
 
33879 tejus.loha 373
            var row = $(this).closest("tr");
374
            console.log(row);
28885 manish 375
 
33879 tejus.loha 376
            var onboardingId = $(row).find("td:eq(0)").text();
28885 manish 377
 
33879 tejus.loha 378
            var outletName = $(row).find("td:eq(1) input[type='text']").val();
28885 manish 379
 
33879 tejus.loha 380
            var aadhar = $(row).find(".aadhar input[type=hidden]").val();
33891 tejus.loha 381
 
382
            var aadharBack = $(row).find(".aadharBack input[type=hidden]").val();
383
 
33879 tejus.loha 384
            var pan = $(row).find(".pan input[type=hidden]").val();
385
            var gst = $(row).find(".gst input[type=hidden]").val();
386
            var cancheque = $(row).find(".cancheque input[type=hidden]").val();
387
            var rent = $(row).find(".rent input[type=hidden]").val();
388
            var loi = $(row).find(".loi input[type=hidden]").val();
33891 tejus.loha 389
            var docCompleted = $(row).find("td:eq(13) option:selected").val();
28885 manish 390
 
391
 
33879 tejus.loha 392
            var kycCompleted = $(row).find(".kyc input[type=hidden]").val();
28885 manish 393
 
33879 tejus.loha 394
            console.log(aadhar)
29213 tejbeer 395
 
33891 tejus.loha 396
            var anniversaryDate = $(row).find("td:eq(14) input[type='date']").val();
29213 tejbeer 397
 
33879 tejus.loha 398
            if (anniversaryDate != "") {
399
                anniversaryDate = anniversaryDate + "T00:00:00";
400
            }
33891 tejus.loha 401
            var dob = $(row).find("td:eq(15) input[type='date']").val();
29213 tejbeer 402
 
33879 tejus.loha 403
            if (dob != "") {
29213 tejbeer 404
 
33879 tejus.loha 405
                dob = dob + "T00:00:00";
406
            }
29213 tejbeer 407
 
33891 tejus.loha 408
            var phoneNumber = $(row).find("td:eq(17) input[type='number']").val();
33879 tejus.loha 409
            console.log(phoneNumber);
33891 tejus.loha 410
            var code = $(row).find("td:eq(16) input[type='text']").val();
29214 tejbeer 411
 
412
 
33891 tejus.loha 413
            var businessType = $(row).find("td:eq(18) option:selected").val();
29134 manish 414
 
29214 tejbeer 415
 
33879 tejus.loha 416
            var prebookingListingObject = {};
417
            prebookingListingObject['id'] = onboardingId
418
            prebookingListingObject['outletName'] = outletName
419
            prebookingListingObject['aadharDoc'] = aadhar
33891 tejus.loha 420
            prebookingListingObject['aadharDocBack'] = aadharBack
29214 tejbeer 421
 
33879 tejus.loha 422
            prebookingListingObject['panDoc'] = pan
423
            prebookingListingObject['gst'] = gst
424
            prebookingListingObject['cancelCheque'] = cancheque
425
            prebookingListingObject['rentAgreement'] = rent
426
            prebookingListingObject['loi'] = loi
427
            prebookingListingObject['docCompleted'] = docCompleted
428
            prebookingListingObject['code'] = code
429
            prebookingListingObject['anniversaryDate'] = anniversaryDate
430
            prebookingListingObject['dob'] = dob
431
            prebookingListingObject['phoneNumber'] = phoneNumber
29104 manish 432
 
29213 tejbeer 433
 
35971 aman 434
            prebookingListingObject['kyc'] = kycCompleted ? parseInt(kycCompleted) : 0
29213 tejbeer 435
 
29104 manish 436
 
35971 aman 437
            prebookingListingObject['businessType'] = businessType || null
29763 tejbeer 438
 
439
 
33879 tejus.loha 440
            var jsonObject = JSON.stringify(prebookingListingObject);
441
            console.log("prebookingListingObject" + prebookingListingObject);
442
            console.log("jsonObject" + jsonObject);
443
            if (confirm("Are you sure you want to submit the request") == true) {
444
                doAjaxRequestWithJsonHandler(context
445
                    + "/partnerOnboardingLegalSubmit",
446
                    "POST", jsonObject, function (response) {
447
                        row.html(response);
448
                        row.css("background-color", "#F8F8FF");
29213 tejbeer 449
 
33879 tejus.loha 450
                    });
451
            }
29213 tejbeer 452
 
33879 tejus.loha 453
        });
29104 manish 454
 
29213 tejbeer 455
 
33879 tejus.loha 456
var table = $('#partnerVerification').DataTable();
457
$(document).on('dblclick', '#partnerVerification tbody tr', function () {
458
    console.log("dblclick");
459
    var data = table.row(this).data();
29763 tejbeer 460
 
33879 tejus.loha 461
    $(this).find(":selected").attr('disabled', false).show();
462
    $(this).find(":input").attr('disabled', false).show();
29104 manish 463
 
33879 tejus.loha 464
});
29213 tejbeer 465
 
33879 tejus.loha 466
$(document).on('input', 'table#requiredNoc input[type=file]', function () {
467
    if (confirm('Confirm file upload ?')) {
468
        var fileSelector = $(this)[0];
469
        if (fileSelector != undefined && fileSelector.files[0] != undefined) {
470
            var file = this.files[0];
471
            console.log("file", file);
472
            let fileInput = $(this);
473
            console.log("fileInput", file);
474
            uploadDocument(file, function (documentId) {
475
                fileInput.closest('td').find(".documentId").val(documentId);
476
                console.log("documentId", documentId);
477
            });
478
        }
479
    }
480
});
29763 tejbeer 481
 
34168 tejus.loha 482
function getPartnerCommitment(StoreCode){
483
    getAllCommitments(StoreCode, function (commitment) {
34149 tejus.loha 484
        $('#nocUploadBody').empty();
485
        $('#nocUploadBody').html(commitment);
486
    });
487
}
33879 tejus.loha 488
function getNocUploadForm(onboardingId) {
489
    $('#nocUploadBody').html('');
490
    doGetAjaxRequestHandler(`${context}/brandNocUpdateForm?onboardingId=` + onboardingId, function (response) {
491
        $('#nocUploadBody').html(response);
492
    });
493
}
29763 tejbeer 494
 
33908 tejus.loha 495
 
33879 tejus.loha 496
var table = $('#onboardingLegal').DataTable();
497
$(document).on('dblclick', '#onboardingLegal tbody tr', function () {
498
    console.log("dblclick");
499
    var data = table.row(this).data();
29763 tejbeer 500
 
33879 tejus.loha 501
    $(this).find(":selected").attr('disabled', false).show();
502
    $(this).find(":input").attr('disabled', false).show();
29104 manish 503
 
33879 tejus.loha 504
    $(this).find("input[name=codeLegal]").attr('disabled', true);
505
    $(this).find("input[name=shead1]").attr('disabled', true);
506
    $(this).find("input[name=bdm1]").attr('disabled', true);
507
    $(this).find("input[name=abrand1]").attr('disabled', true);
508
    $(this).find("input[name=recbrand1]").attr('disabled', true);
509
});
29213 tejbeer 510
 
33879 tejus.loha 511
var table = $('#partnerDashboardTraining').DataTable();
512
$(document).on('dblclick', '#partnerDashboardTraining tbody tr',
513
    function () {
514
        console.log("dblclick");
515
        var data = table.row(this).data();
29104 manish 516
 
33879 tejus.loha 517
        $(this).find(":selected").attr('disabled', false).show();
518
        $(this).find(":input").attr('disabled', false).show();
30286 tejbeer 519
 
520
 
33879 tejus.loha 521
    });
30286 tejbeer 522
 
33879 tejus.loha 523
var table = $('#partnerDealerMapping').DataTable();
524
$(document).on('dblclick', '#partnerDealerMapping tbody tr', function () {
525
    console.log("dblclick");
526
    var data = table.row(this).data();
30286 tejbeer 527
 
33879 tejus.loha 528
    $(this).find(":input").attr('disabled', false).show();
29213 tejbeer 529
 
33879 tejus.loha 530
});
29213 tejbeer 531
 
29763 tejbeer 532
 
28848 manish 533
function partnerDealerMapping(domId) {
33879 tejus.loha 534
    doAjaxRequestHandler(context + "/partnerDealerMapping", "GET", function (
535
        response) {
536
        $('#' + domId).html(response);
537
    });
28848 manish 538
}
539
 
29104 manish 540
function partnerOnboardingLegal(domId) {
33879 tejus.loha 541
    doAjaxRequestHandler(context + "/partnerOnboardingLegal", "GET", function (
542
        response) {
543
        $('#' + domId).html(response);
544
    });
29104 manish 545
}
546
 
28848 manish 547
function partnerDashboardTraining(domId) {
33879 tejus.loha 548
    doAjaxRequestHandler(context + "/partnerDashboardTraining", "GET",
549
        function (response) {
550
            $('#' + domId).html(response);
551
        });
28848 manish 552
}
553
 
554
function partnerOnboardingVerification(domId) {
33879 tejus.loha 555
    doAjaxRequestHandler(`${context}/partnerOnboardingVerification`, "GET",
556
        function (response) {
557
            $('#' + domId).html(response);
558
        });
28848 manish 559
}
33879 tejus.loha 560
 
561
function nocUploadPanel(domId) {
562
    doAjaxRequestHandler(`${context}/uploadNocPanel`, "GET",
563
        function (response) {
564
            $('#' + domId).html(response);
565
        });
566
}
34099 tejus.loha 567
 
568
$(document).on('click', "#download-pdm-report", function () {
569
    const brandName = $('select[name="brandName"]').val();
570
    if(!brandName){
571
        alert("Please choose Brand Name");
572
        return;
573
    }
574
    console.log("brand - ",brandName);
575
    window.location.href = `${context}/downloadPdmReport?brandName=${brandName}`;
576
});
577
 
578