Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33507 tejus.loha 1
$(document).on('click', ".onboarding-form1", function () {
33845 tejus.loha 2
    doGetAjaxRequestHandler(`${context}/loiForm`,
33507 tejus.loha 3
        function (response) {
4
            $('#' + 'main-content').html(response);
5
        });
6
});
7
 
33577 tejus.loha 8
 
9
$(document).on('change', "#maritalStatus", function () {
10
    let maritalStatus = $(this).val();
11
    console.log("maritalStatus - " + maritalStatus);
12
    if (maritalStatus == 1) {
13
        $(".loiAnniversaryDate").removeClass('hide-model');
14
        $(".loiAnniversaryDate").addClass('show-model');
15
    } else {
16
        $(".loiAnniversaryDate").removeClass('show-model');
17
        $(".loiAnniversaryDate").addClass('hide-model');
18
    }
19
 
20
});
21
 
33578 tejus.loha 22
 
33577 tejus.loha 23
$(document).on('click', ".submitLoiForm", function () {
24
    // Gather input values
25
    const referId = $('select[name="referId"]').val();
26
    const billingAddress = $('select[name="billingAddress"]').val();
33582 tejus.loha 27
    const acquiredDate = $('input[name="acquiredDate"]').val();
33577 tejus.loha 28
    const firstName = $('input[name="firstName"]').val();
29
    const lastName = $('input[name="lastName"]').val();
30
    const mobile = $('input[name="mobile"]').val();
33780 tejus.loha 31
 
32
    // validate email pattern
33
    const emailValue = $('input[name="email"]').val();
34
    var email;
35
    if (emailValue.length > 0) {
36
        if (isValidEmail(emailValue)) {
37
            email = emailValue;
38
        } else {
39
            alert("Please check your Email Address");
40
            return;
41
        }
42
    }
33577 tejus.loha 43
    const landline = $('input[name="landline"]').val();
44
    const dob = $('input[name="dob"]').val();
33624 tejus.loha 45
    var today = new Date();
46
    var birthDate = new Date(dob);
47
    var age = today.getFullYear() - birthDate.getFullYear();
48
    var monthDiff = today.getMonth() - birthDate.getMonth();
49
 
50
    if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
51
        age--;
52
    }
33577 tejus.loha 53
    var maritalStatus = $('select[name="maritalStatus"]').val();
54
    const anniversaryDate = $('input[name="anniversaryDate"]').val();
55
    const panNo = $('input[name="panNo"]').val();
56
    const adharNo = $('input[name="adharNo"]').val();
57
    const gstNo = $('input[name="gstNo"]').val();
58
    const bankName = $('input[name="bankName"]').val();
59
    const ifscCode = $('input[name="ifscCode"]').val();
60
    const accountNo = $('input[name="accountNo"]').val();
61
    const businessType = $('select[name="businessType"]').val();
62
    const companyName = $('input[name="companyName"]').val();
63
    const gstPin = $('input[name="gstPin"]').val();
64
    const gstState = $('input[name="gstState"]').val();
65
    const gstCity = $('input[name="gstCity"]').val();
66
    const gstDistrict = $('input[name="gstDistrict"]').val();
67
    const agreeWalletValue = $('select[name="agreeWalletValue"]').val();
68
    const storeArea = $('input[name="storeArea"]').val();
69
    const storePotential = $('input[name="storePotential"]').val();
33658 tejus.loha 70
    let brandCommitment = [];
71
    var brandCommitmentInputs = document.querySelectorAll(".brand-commitment");
72
    brandCommitmentInputs.forEach(function (input) {
73
        var commitmentValue = parseInt(input.value);
74
        if (!isNaN(commitmentValue)) {
75
            brandCommitment.push({
76
                brandName: input.getAttribute("name"),
77
                value: commitmentValue
78
            });
79
        }
80
    });
81
    let totalCommitment = brandCommitment.reduce((total, commitment) => total + commitment.value, 0);
82
    console.log("Total Commitment Amount:", totalCommitment);
33577 tejus.loha 83
    const lessCommitReason = $('input[name="lessCommitReason"]').val();
33658 tejus.loha 84
    let minCommit = totalCommitment >= storePotential * (70 / 100);
33577 tejus.loha 85
    const agreedBrandFees = $('select[name="agreedBrandFees"]').val();
86
    console.log("agreedBrandFees - ", agreedBrandFees);
33624 tejus.loha 87
    const values = agreedBrandFees.split(/[-]/); // Split the string
88
    const brandFee = parseFloat(values[1]);
33577 tejus.loha 89
    const brandFeesCollected = $('input[name="brandFeesCollected"]').val();
90
    const paymentMode = $('select[name="paymentMode"]').val();
91
    const paymentReferenceNo = $('input[name="paymentReferenceNo"]').val();
33578 tejus.loha 92
    const feeCollectingDate = $('input[name="feeCollectingDate"]').val();
33577 tejus.loha 93
 
94
    let missingFields = [];
95
    if (!firstName) missingFields.push('First Name');
96
    if (!lastName) missingFields.push('Last Name');
97
    if (mobile.length < 10 || !mobile) {
98
        missingFields.push('Mobile number should be 10 digit');
99
    }
33658 tejus.loha 100
    if (!minCommit) {
33577 tejus.loha 101
        if (!lessCommitReason) missingFields.push('Less Commit Reason');
102
    }
103
    if (!maritalStatus) missingFields.push('Marital Status');
104
    if (maritalStatus == 1) {
105
        if (!anniversaryDate) missingFields.push('Anniversary Date');
106
    }
107
    if (!email) missingFields.push('Email');
33582 tejus.loha 108
    if (!acquiredDate) missingFields.push('Acquired date');
33577 tejus.loha 109
    if (!dob) missingFields.push('dob(Date of Birth)');
33624 tejus.loha 110
    if (age <= 18) missingFields.push('You must be at least 18 years old to Fill LOI FORM. ');
33577 tejus.loha 111
    if (!panNo) missingFields.push('Pan Number');
112
    if (!adharNo) missingFields.push('Aadhar Number');
113
    if (!gstNo) missingFields.push('GST Number');
114
    if (!bankName) missingFields.push('Bank Name');
115
    if (!ifscCode) missingFields.push('IFSC code');
116
    if (!accountNo) missingFields.push('Account Number');
117
    if (!businessType) missingFields.push('businessType');
118
    if (!companyName) missingFields.push('Company Name');
119
    if (!agreeWalletValue) missingFields.push('Agree Wallet Value');
120
    if (!storeArea) missingFields.push('storeArea');
121
    if (!storePotential) missingFields.push('Store Potential');
122
    if (!agreedBrandFees) missingFields.push('Agreed Brand Fees');
123
    if (!brandFeesCollected) missingFields.push('Brand Fees Collected');
33845 tejus.loha 124
    if (brandFeesCollected > brandFee) missingFields.push('The collected brand fee must not exceed the agreed brand fees.');
33577 tejus.loha 125
    if (!paymentMode) missingFields.push('Payment Mode');
126
    if (!paymentReferenceNo) missingFields.push('Payment Reference No');
33578 tejus.loha 127
    if (!feeCollectingDate) missingFields.push('Fee Collecting Date');
33577 tejus.loha 128
    if (missingFields.length > 0) {
129
        alert('The following fields are required: ' + missingFields.join(', '));
130
        return;
131
    }
132
    const loiFormData = {
133
        referId: referId,
134
        businessType: businessType,
33582 tejus.loha 135
        acquiredDate: acquiredDate,
33577 tejus.loha 136
        firstName: firstName,
137
        lastName: lastName,
138
        mobile: mobile,
139
        email: email,
140
        landline: landline,
141
        dob: dob,
142
        anniversaryDate: anniversaryDate,
143
        panNo: panNo,
144
        adharNo: adharNo,
145
        gstNo: gstNo,
146
        bankName: bankName,
147
        ifscCode: ifscCode,
148
        accountNo: accountNo,
149
        companyName: companyName,
150
        gstPin: gstPin,
151
        gstState: gstState,
152
        gstCity: gstCity,
153
        gstDistrict: gstDistrict,
154
        agreeWalletValue: agreeWalletValue,
155
        storeArea: storeArea,
156
        storePotential: storePotential,
157
        lessCommitReason: lessCommitReason,
158
        agreedBrandFees: agreedBrandFees,
159
        brandFeesCollected: brandFeesCollected,
160
        paymentMode: paymentMode,
161
        paymentReferenceNo: paymentReferenceNo,
33578 tejus.loha 162
        feeCollectingTimeStamp: feeCollectingDate,
33658 tejus.loha 163
        billingAddress: billingAddress,
164
        brandCommitment: brandCommitment
33577 tejus.loha 165
    };
33658 tejus.loha 166
 
33577 tejus.loha 167
    console.log("form data - ", loiFormData);
168
    if (confirm("Are you sure to submit the form ?")) {
169
        doPostAjaxRequestWithJsonHandler(`${context}/submitLoiForm`, JSON.stringify(loiFormData), function (response) {
170
            console.log('responsee', response);
33507 tejus.loha 171
            if (response) {
172
                alert("Your LOI form Submitted successfully ");
173
                pendingLoiForm("main-content");
174
 
175
            } else {
176
                alert("Your LOI form not Submitted , try again ");
33845 tejus.loha 177
                doGetAjaxRequestHandler(`${context}/loiForm`,
33507 tejus.loha 178
                    function (response) {
179
                        $('#' + 'main-content').html(response);
180
                    });
181
            }
182
        });
183
    }
184
});
33578 tejus.loha 185
 
33658 tejus.loha 186
$(document).on('click', ".updateLoiForm", function () {
33507 tejus.loha 187
    let loiId = $(this).val();
188
    console.log("form id - ", loiId);
33658 tejus.loha 189
    doGetAjaxRequestHandler(context + "/updateLoiForm?loiId=" + loiId,
33507 tejus.loha 190
        function (response) {
191
            $('#' + 'main-content').html(response);
192
        });
193
});
33845 tejus.loha 194
// $(document).on('click', ".cancel_loi", function () {
195
//     let loiId = $(this).val();
196
//     let companyName = $(this).data('company');
197
//     console.log("form id - ", loiId);
198
//     if (confirm(`Are you sure to Cancel "${companyName}" LOI`)) {
199
//         doPutAjaxRequestHandler(`${context}/cancelLoi?loiId=${loiId}`,
200
//             function (response) {
201
//                 pendingLoiForm("main-content");
202
//             });
203
//     }
204
// });
33710 tejus.loha 205
$(document).on('click', ".save_agree_brand_fee", function () {
206
    let loiId = $(this).val();
207
    var $tr = $(this).closest('tr');
208
    var agreedBrandFee = $tr.find('input[name="brandFee"]').val();
209
    if (confirm("Are you sure to change Agreed brand fee")) {
210
        doPutAjaxRequestHandler(`${context}/updateAgreedBrandFee?loiId=${loiId}&brandFee=${agreedBrandFee}`, function (response) {
211
            pendingLoiForm("main-content");
212
        });
213
    } else {
214
        pendingLoiForm("main-content");
215
    }
216
});
33507 tejus.loha 217
 
33658 tejus.loha 218
$(document).on('click', ".updateLoiFormDataButton", function () {
219
    console.log("updateLoiFormDataButton clicked..");
220
    let loiId = $(this).data('loiid');
221
 
222
    const firstName = $('input[name="firstName"]').val();
223
    const lastName = $('input[name="lastName"]').val();
224
    const mobile = $('input[name="mobile"]').val();
225
    const email = $('input[name="email"]').val();
226
    const landline = $('input[name="landline"]').val();
227
    const dob = $('input[name="dob"]').val();
228
    const panNo = $('input[name="panNo"]').val();
229
    const adharNo = $('input[name="adharNo"]').val();
230
    let missingFields = [];
231
    if (!firstName) missingFields.push('First Name');
232
    if (!lastName) missingFields.push('Last Name');
233
    if (mobile.length < 10 || !mobile) {
234
        missingFields.push('Mobile number should be 10 digit');
235
    }
236
    if (!dob) missingFields.push('dob(Date of Birth)');
237
    if (!panNo) missingFields.push('Pan Number');
238
    if (!adharNo) missingFields.push('Aadhar Number');
239
    if (!email) missingFields.push('Email');
240
    if (missingFields.length > 0) {
241
        alert('The following fields are required: ' + missingFields.join(', '));
242
        return;
243
    }
244
    const loiFormData = {
245
        firstName: firstName,
246
        lastName: lastName,
247
        mobile: mobile,
248
        email: email,
249
        landline: landline,
250
        dob: dob,
251
        panNo: panNo,
252
        adharNo: adharNo
253
    };
254
    console.log("loiFormData - ", loiFormData);
255
    alert("you want update ..");
256
    doPostAjaxRequestWithJsonHandler(`${context}/updateLoiFormData?loiId=${loiId}`, JSON.stringify(loiFormData), function (response) {
33507 tejus.loha 257
        pendingLoiForm("main-content");
258
    });
259
 
260
});
261
 
262
$(document).on('click', ".pending-onboarding-form", function () {
33710 tejus.loha 263
    doGetAjaxRequestHandler(`${context}/pendingLoiForm`,
33507 tejus.loha 264
        function (response) {
265
            $('#' + 'main-content').html(response);
266
        });
267
});
268
$(document).on('click', "#addBrandFeePayment", function () {
269
    let formData = objectifyForm($("form[name='brandFeeCollectionForm']").serializeArray());
270
    let loiId = $(this).val();
271
    console.log("form id -", loiId);
272
    for (var key in formData) {
273
        if (formData.hasOwnProperty(key) && formData[key].trim() === '') {
274
            alert("The (" + key + ") value is blank please fill this field !");
275
            return false;
276
        }
277
    }
278
    let jsonData = JSON.stringify(formData);
33658 tejus.loha 279
    if (confirm("Are you sure to add payment ?")) {
33525 tejus.loha 280
        doPostAjaxRequestWithJsonHandler(`${context}/brandfeeCollection?loiId=` + loiId, jsonData, function (response) {
281
            if (response) {
282
                alert("Payment add successfully...");
283
                pendingLoiForm("main-content");
33507 tejus.loha 284
 
33525 tejus.loha 285
            }
286
        });
287
    } else {
33658 tejus.loha 288
        alert("Payment is not add.");
289
 
33525 tejus.loha 290
    }
33507 tejus.loha 291
 
292
});
293
 
294
$(document).on('click', ".generateLoi", function () {
295
    let loiId = $(this).val();
296
    console.log("form id - ", loiId);
297
    doGetAjaxRequestHandler(context + "/generateLoi?loiId=" + loiId,
298
        function (response) {
299
            $('#' + 'main-content').html(response);
300
        });
301
});
302
 
33845 tejus.loha 303
$(document).on('click', ".mk-approve-loi", function () {
304
    let loiId = $(this).val();
305
    let companyName = $(this).data('company');
306
    let flag = $(this).data('flag');
307
    console.log("form id - ", loiId);
308
    if (flag === 1) {
309
        if (confirm(`Are you sure Approve Loi of  ${companyName} `)) {
310
            console.log("Approval");
311
            doPutAjaxRequestHandler(`${context}/approve-reject-Loi?loiId=${loiId}&flag=${true}`,
312
                function (response) {
313
                    alert("Loi Approved successfully");
314
                    pendingLoiForm("main-content");
315
                });
316
        }
317
    } else {
318
        if (confirm(`Are you sure to Reject "${companyName}" LOI`)) {
319
            console.log("reject");
320
            doPutAjaxRequestHandler(`${context}/approve-reject-Loi?loiId=${loiId}&flag=${false}`,
321
                function (response) {
322
                    pendingLoiForm("main-content");
323
                });
324
        }
325
    }
326
});
327
 
33507 tejus.loha 328
$(document).on('click', "#LOI_otp", function () {
329
    let loiId = $(this).val();
330
    console.log("loiId-", loiId);
33577 tejus.loha 331
    if (confirm("Are you sure to send OTP ?")) {
332
        doPostAjaxRequestHandler(`${context}/loiAcceptanceOtp?loiId=` + loiId,
333
            function (response) {
334
                alert(response);
335
                doGetAjaxRequestHandler(context + "/generateLoi?loiId=" + loiId,
336
                    function (response) {
337
                        $('#' + 'main-content').html(response);
338
                    });
339
            });
340
    } else {
341
        alert("OTP not send .");
342
    }
343
 
33507 tejus.loha 344
});
345
 
346
 
347
$(document).on('click', ".onboardingFormDone", function () {
348
    let loiId = $(this).val();
349
    var loi = $(document).find(".upload-form-loi input[type=file]").val();
350
    console.log("form id - ", loiId);
351
    doPostAjaxRequestHandler(`${context}/uploadLoi?loiId=${loiId}&loi=${loi}`,
352
        function (response) {
353
            $('#' + 'main-content').html(response);
354
        });
355
});
356
 
357
//confirmPayment
33525 tejus.loha 358
$(document).on('click', ".paymentConfirmBtn", function () {
359
    let approval = $(this).data('approval');
33507 tejus.loha 360
    let bfcId = $(this).val();
33525 tejus.loha 361
    let description = "All details are correct";
362
    if (confirm("Are you sure to confirm this payment ?")) {
363
        doPutAjaxRequestHandler(`${context}/feePaymentApproval?bfcId=${bfcId}&feePaymentStatus=${approval}&description=${description}`,
364
            function (response) {
33845 tejus.loha 365
                alert("Payment is confirm successfully");
33525 tejus.loha 366
                pendingLoiForm("main-content");
367
            });
368
    }
369
});
370
 
371
$(document).on('click', ".paymentRejectBtn", function () {
33507 tejus.loha 372
    let approval = $(this).data('approval');
33525 tejus.loha 373
    let bfcId = $(this).val();
374
    let description;
375
    description = prompt("Reason for rejection..");
376
    if (description !== null) {
377
        if (confirm("Are you sure to Reject this payment ?")) {
378
            doPutAjaxRequestHandler(`${context}/feePaymentApproval?bfcId=${bfcId}&feePaymentStatus=${approval}&description=${description}`,
379
                function (response) {
33845 tejus.loha 380
                    alert("Payment is rejected successfully");
33525 tejus.loha 381
                    pendingLoiForm("main-content");
382
                });
383
        }
384
    } else {
385
        alert("Please mention the reason as description and try again");
386
    }
33507 tejus.loha 387
});
388
$(document).on('click', ".upload-document-form", function () {
389
    let loiId = $(this).val();
33617 tejus.loha 390
    doGetAjaxRequestHandler(`${context}/uploadDocumentForm?loiId=${loiId}`,
33507 tejus.loha 391
        function (response) {
392
            $('#' + 'main-content').html(response);
393
        });
394
});
395
$(document).on('input', 'table#OnboardingDocumentTable input[type=file]', function () {
396
    if (confirm('Confirm file upload ?')) {
397
        var fileSelector = $(this)[0];
398
        if (fileSelector != undefined
399
            && fileSelector.files[0] != undefined) {
400
            var file = this.files[0];
401
            console.log("file", file);
402
            let fileInput = $(this);
403
            console.log("fileInput", file);
404
            uploadDocument(file, function (documentId) {
405
                console.log("documentIdzzz  : ", documentId);
406
                fileInput.closest('td').find(".documentId").val(documentId);
407
            });
408
        }
409
    }
410
});
411
$(document).on('click', ".mk_docApproval", function () {
412
    let loiId = $(this).data('form_id');
413
    let docMasterId = $(this).data('doc_master_id');
414
    let flag = $(this).data('flag');
415
    console.log("flag -", flag);
416
    doPutAjaxRequestHandler(`${context}/documentVerify?loiId=${loiId}&docMasterId=${docMasterId}&flag=${flag}`,
417
        function (response) {
418
            alert(response);
33617 tejus.loha 419
            doGetAjaxRequestHandler(`${context}/uploadDocumentForm?loiId=${loiId}`,
33507 tejus.loha 420
                function (response) {
421
                    $('#' + 'main-content').html(response);
422
                });
423
 
424
        });
425
});
426
$(document).on('click', "#uploadDocumentbtn1", function () {
427
    if (confirm("Are you sure to upload all documents ?")) {
428
        var loiId = $(this).val();
429
        var loiDocModels = [];
430
        console.log("loiId -", loiId);
431
        $("#OnboardingDocumentTable > tbody > tr").each(function (rowIndex) {
432
            var marsterId = $(this).find(".masterId").val();
433
            var docId = $(this).find(".documentId").val();
434
            var docName = $(this).find(".documentName").val();
435
            console.log("marsterId -", marsterId);
436
            var loiDocModel = {
437
                documentId: docId,
438
                documentName: docName,
439
                documentMasterId: marsterId
440
            };
441
            loiDocModels.push(loiDocModel);
442
        });
443
        console.log(loiDocModels);
444
        var loiDocModelData = JSON.stringify(loiDocModels);
445
        doPostAjaxRequestWithJsonHandler(`${context}/uploadOnboardingDocument?loiId=${loiId}`, loiDocModelData, function (response) {
446
            console.log('response-', response);
447
            pendingLoiForm("main-content");
448
        });
449
    } else {
450
        //Nothing to do
451
    }
452
 
453
 
454
});
455
 
456
$(document).on('click', ".CompletedLoiForm", function () {
33617 tejus.loha 457
    doGetAjaxRequestHandler(`${context}/completedLoiForms`,
33507 tejus.loha 458
        function (response) {
459
            $('#' + 'main-content').html(response);
460
        });
461
});
462
 
463
$(document).on('click', "#createNewOnboardingPanel", function () {
464
    let loiId = $(this).val();
33710 tejus.loha 465
    //let authId = $(this).closest('tr').find('.authId').val();
33507 tejus.loha 466
 
33710 tejus.loha 467
    if (true) {
468
 
469
        doPostAjaxRequestHandler(`${context}/createNewOnboardingPanel?loiId=${loiId}&authId=${0}`,
33507 tejus.loha 470
            function (response) {
471
                if (response) {
33710 tejus.loha 472
                    // doGetAjaxRequestHandler(`${context}/completedLoiForms`,
473
                    //     function (response) {
474
                    //         $('#' + 'main-content').html(response);
475
                    //     });
476
                    alert("it moved successfully ");
33507 tejus.loha 477
                } else {
478
                    //nothing
479
                }
480
 
481
            });
482
    } else {
483
        alert("Please choose RBM ");
484
    }
485
 
486
});
487
 
33617 tejus.loha 488
$(document).on('click', "#downloadAllLoiForm", function () {
489
    const from = $('input[name="from"]').val();
490
    const to = $('input[name="to"]').val();
491
    let missingFields = [];
492
    if (!from) missingFields.push('From date');
493
    if (!to) missingFields.push('To date');
494
    if (missingFields.length > 0) {
495
        alert('Please select : ' + missingFields.join(','));
496
        return;
497
    }
498
    console.log("From - ", from)
499
    console.log("To - ", to)
500
 
501
    window.location.href = `${context}/downloadLoiFromReport?from=${from}&to=${to}`;
502
});
33658 tejus.loha 503
$(document).on('click', ".brandFeePaymentEdit", function () {
504
    var bfcId = $(this).val();
505
    console.log("bfcId - ", bfcId);
506
    // Get the table row
507
    var $row = $(this).closest('tr');
508
    console.log("row - ", $row);
509
    var feeCollectingTimeStamp = $row.find('input[name="feeCollectingTimeStamp"]').val();
510
    var collectedAmount = $row.find('input[name="collectedAmount"]').val();
511
    var paymentReferenceNo = $row.find('input[name="paymentReferenceNo"]').val();
512
    var paymentMode = $row.find('select[name="paymentMode"]').val();
513
    const Data = {
514
        id: bfcId,
515
        feeCollectingTimeStamp: feeCollectingTimeStamp,
516
        collectedAmount: collectedAmount,
517
        paymentReferenceNo: paymentReferenceNo,
518
        paymentMode: paymentMode
519
    };
520
    var jsonData = JSON.stringify(Data);
521
    if (confirm("Are you sure to update details")) {
522
        doPostAjaxRequestWithJsonHandler(`${context}/updatePayment`, jsonData,
523
            function (response) {
33845 tejus.loha 524
                if (response) {
525
                    alert("Updated payment details are save successfully ")
526
                    pendingLoiForm('main-content');
527
                } else {
528
                    alert("Updated payment details are not save ")
529
                    pendingLoiForm('main-content');
530
                }
33658 tejus.loha 531
            });
532
    } else {
533
        pendingLoiForm('main-content');
534
    }
33617 tejus.loha 535
 
33658 tejus.loha 536
 
537
});
538
 
539
 
33507 tejus.loha 540
function pendingLoiForm(domId) {
33710 tejus.loha 541
    doGetAjaxRequestHandler(`${context}/pendingLoiForm`,
33507 tejus.loha 542
        function (response) {
543
            $('#' + domId).html(response);
544
        });
545
}