| 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 |
|
| 33879 |
tejus.loha |
42 |
console.log("brandlength" + brandlength)
|
|
|
43 |
var brandCodes = []
|
|
|
44 |
for (let i = 5; i < 5 + brandlength; i++) {
|
| 28848 |
manish |
45 |
|
| 33879 |
tejus.loha |
46 |
brandCodes.push($(row).find(
|
|
|
47 |
"td:eq(" + i + ") input[type='text']").val());
|
|
|
48 |
}
|
| 28848 |
manish |
49 |
|
| 33879 |
tejus.loha |
50 |
console.log("bands" + brandCodes);
|
| 28848 |
manish |
51 |
|
| 33879 |
tejus.loha |
52 |
dmsCode = {
|
|
|
53 |
"onboardingId": onboardingId,
|
|
|
54 |
"partnerCode": partnerCode,
|
| 28848 |
manish |
55 |
|
| 33879 |
tejus.loha |
56 |
"brands": brandCodes,
|
|
|
57 |
}
|
| 28848 |
manish |
58 |
|
| 33879 |
tejus.loha |
59 |
var jsonObject = JSON.stringify(dmsCode)
|
| 28848 |
manish |
60 |
|
| 33879 |
tejus.loha |
61 |
console.log("jsonObject" + jsonObject);
|
|
|
62 |
if (confirm("Are you sure you want to submit") == true) {
|
|
|
63 |
doAjaxRequestWithJsonHandler(context + "/partnerDealerSubmit",
|
|
|
64 |
"POST", jsonObject, function (response) {
|
| 28848 |
manish |
65 |
|
| 33879 |
tejus.loha |
66 |
row.html(response);
|
| 28848 |
manish |
67 |
|
| 33879 |
tejus.loha |
68 |
});
|
|
|
69 |
}
|
|
|
70 |
});
|
| 28848 |
manish |
71 |
|
| 33879 |
tejus.loha |
72 |
$(document)
|
|
|
73 |
.on(
|
|
|
74 |
'click',
|
|
|
75 |
".partner-verification-resend",
|
|
|
76 |
function () {
|
| 28848 |
manish |
77 |
|
| 33879 |
tejus.loha |
78 |
var row = $(this).closest("tr");
|
|
|
79 |
console.log(row);
|
| 28848 |
manish |
80 |
|
| 33879 |
tejus.loha |
81 |
var onboardingId = $(row).find("td:eq(0)").text();
|
| 28848 |
manish |
82 |
|
| 33879 |
tejus.loha |
83 |
if (confirm("Are you sure you want to Resend this verification") == true) {
|
|
|
84 |
doPostAjaxRequestHandler(
|
|
|
85 |
context
|
|
|
86 |
+ "/partnerVerificationResend?onboardingId="
|
|
|
87 |
+ onboardingId, function (response) {
|
|
|
88 |
if (response == 'true') {
|
|
|
89 |
alert("Successfully Resend");
|
|
|
90 |
panelListing("main-content");
|
|
|
91 |
}
|
| 28848 |
manish |
92 |
|
| 33879 |
tejus.loha |
93 |
});
|
|
|
94 |
}
|
| 28848 |
manish |
95 |
|
| 33879 |
tejus.loha |
96 |
});
|
| 28848 |
manish |
97 |
|
| 29213 |
tejbeer |
98 |
|
| 33879 |
tejus.loha |
99 |
$(document).on('click', ".partner-verifi-update-checkbox", function () {
|
|
|
100 |
var row = $(this).closest("tr");
|
|
|
101 |
console.log(row);
|
|
|
102 |
var onboardingId = $(row).find("td:eq(0)").text();
|
| 29213 |
tejbeer |
103 |
|
| 33879 |
tejus.loha |
104 |
doAjaxRequestHandler(context + "/partnerVerifiUpdateCheckbox?onboardingId=" + onboardingId, "GET", function (
|
|
|
105 |
response) {
|
|
|
106 |
$('.myVerificationCheckboxUpdate').html(response);
|
| 29213 |
tejbeer |
107 |
|
| 33879 |
tejus.loha |
108 |
});
|
| 29213 |
tejbeer |
109 |
|
|
|
110 |
|
| 33879 |
tejus.loha |
111 |
});
|
| 29213 |
tejbeer |
112 |
|
| 28848 |
manish |
113 |
|
| 33879 |
tejus.loha |
114 |
$(document).on('click', ".verification-checkbox-submit", function () {
|
| 29007 |
manish |
115 |
|
|
|
116 |
|
| 33879 |
tejus.loha |
117 |
console.log("Hello");
|
|
|
118 |
var row = $(this).closest("tr");
|
|
|
119 |
console.log(row);
|
|
|
120 |
var onboardingId = $(this).data('id');
|
| 29213 |
tejbeer |
121 |
|
| 33879 |
tejus.loha |
122 |
var trainingVerifi = $('input[name="trainingVerifi"]').is(":checked") ? 1 : 0;
|
|
|
123 |
var recceVerifi = $('input[name="recceVerifi"]').is(":checked") ? 1 : 0;
|
|
|
124 |
var advStockPayment = $('input[name="advStockPayment"]').is(":checked") ? 1 : 0;
|
|
|
125 |
var brandingVerifi = $('input[name="brandingVerifi"]').is(":checked") ? 1 : 0;
|
|
|
126 |
var stockPay = $('input[name="stockPay"]').is(":checked") ? 1 : 0;
|
|
|
127 |
var billingVerifi = $('input[name="billingVerifi"]').is(":checked") ? 1 : 0;
|
|
|
128 |
var inaugrationVerifi = $('input[name="inaugrationVerifi"]').is(":checked") ? 1 : 0;
|
|
|
129 |
var financialServices = $('input[name="financialServices"]').is(":checked") ? 1 : 0;
|
|
|
130 |
var promotorVerifi = $('input[name="promotorVerifi"]').is(":checked") ? 1 : 0;
|
|
|
131 |
var verifiComments = $('input[name="verifiCommentCheckbox"]').val();
|
| 29213 |
tejbeer |
132 |
|
|
|
133 |
|
| 33879 |
tejus.loha |
134 |
var partnerVerficationCheckBoxObject = {};
|
|
|
135 |
partnerVerficationCheckBoxObject['onboardingId'] = onboardingId
|
|
|
136 |
partnerVerficationCheckBoxObject['trainingVerifi'] = trainingVerifi
|
|
|
137 |
partnerVerficationCheckBoxObject['recceVerifi'] = recceVerifi
|
|
|
138 |
partnerVerficationCheckBoxObject['advStockPayment'] = advStockPayment
|
|
|
139 |
partnerVerficationCheckBoxObject['brandingVerifi'] = brandingVerifi
|
| 29213 |
tejbeer |
140 |
|
| 33879 |
tejus.loha |
141 |
partnerVerficationCheckBoxObject['stockPay'] = stockPay
|
| 29213 |
tejbeer |
142 |
|
| 33879 |
tejus.loha |
143 |
partnerVerficationCheckBoxObject['billingVerifi'] = billingVerifi
|
|
|
144 |
partnerVerficationCheckBoxObject['inaugrationVerifi'] = inaugrationVerifi
|
|
|
145 |
partnerVerficationCheckBoxObject['financialServices'] = financialServices
|
| 29213 |
tejbeer |
146 |
|
| 33879 |
tejus.loha |
147 |
partnerVerficationCheckBoxObject['promotorVerifi'] = promotorVerifi
|
| 29213 |
tejbeer |
148 |
|
| 33879 |
tejus.loha |
149 |
partnerVerficationCheckBoxObject['verifiCheckboxComment'] = verifiComments
|
| 29213 |
tejbeer |
150 |
|
|
|
151 |
|
| 33879 |
tejus.loha |
152 |
var jsonObject = JSON
|
|
|
153 |
.stringify(partnerVerficationCheckBoxObject);
|
| 29213 |
tejbeer |
154 |
|
| 29007 |
manish |
155 |
|
| 33879 |
tejus.loha |
156 |
console.log(jsonObject);
|
| 29213 |
tejbeer |
157 |
|
|
|
158 |
|
| 33879 |
tejus.loha |
159 |
if (confirm("Are you sure you want to submit the request") == true) {
|
|
|
160 |
doAjaxRequestWithJsonHandler(context
|
|
|
161 |
+ "/partnerVerificationCheckBoxSubmit", "POST",
|
|
|
162 |
jsonObject, function (response) {
|
| 29213 |
tejbeer |
163 |
|
|
|
164 |
|
| 33879 |
tejus.loha |
165 |
alert("successfully Submitted");
|
|
|
166 |
$('.myVerificationCheckboxUpdate').html(response);
|
| 29213 |
tejbeer |
167 |
|
| 33879 |
tejus.loha |
168 |
});
|
|
|
169 |
}
|
| 29007 |
manish |
170 |
|
| 29213 |
tejbeer |
171 |
|
| 33879 |
tejus.loha |
172 |
});
|
| 29213 |
tejbeer |
173 |
|
|
|
174 |
|
| 33879 |
tejus.loha |
175 |
$(document)
|
|
|
176 |
.on(
|
|
|
177 |
'click',
|
|
|
178 |
".partner-verification-submit",
|
|
|
179 |
function () {
|
| 29007 |
manish |
180 |
|
| 33879 |
tejus.loha |
181 |
var row = $(this).closest("tr");
|
|
|
182 |
console.log(row);
|
| 29213 |
tejbeer |
183 |
|
| 33879 |
tejus.loha |
184 |
var onboardingId = $(row).find("td:eq(0)").text();
|
|
|
185 |
var comment = $(row).find("td:eq(7) input[type='text']").val();
|
|
|
186 |
var language = $(row).find("td:eq(8) option:selected").val();
|
|
|
187 |
var approval = $(row).find("td:eq(10) option:selected").val();
|
| 29213 |
tejbeer |
188 |
|
| 33879 |
tejus.loha |
189 |
console.log("onboardingId" + onboardingId);
|
|
|
190 |
console.log("language" + language);
|
|
|
191 |
console.log("approval" + approval);
|
|
|
192 |
console.log("comment" + comment);
|
| 29213 |
tejbeer |
193 |
|
| 33879 |
tejus.loha |
194 |
if (approval === "NO") {
|
|
|
195 |
alert("You Can Not Approved Approval Status Without Received NOC From GT");
|
|
|
196 |
return;
|
|
|
197 |
}
|
| 29213 |
tejbeer |
198 |
|
| 33879 |
tejus.loha |
199 |
var partnerVerficationObject = {};
|
|
|
200 |
partnerVerficationObject.onboardingId = onboardingId;
|
|
|
201 |
partnerVerficationObject.comment = comment;
|
|
|
202 |
partnerVerficationObject.language = language;
|
|
|
203 |
partnerVerficationObject.approval = approval;
|
| 29213 |
tejbeer |
204 |
|
|
|
205 |
|
| 33879 |
tejus.loha |
206 |
var jsonObject = JSON.stringify(partnerVerficationObject);
|
|
|
207 |
console.log(jsonObject);
|
| 28848 |
manish |
208 |
|
| 33879 |
tejus.loha |
209 |
if (confirm("Are you sure you want to submit the request")) {
|
|
|
210 |
doAjaxRequestWithJsonHandler(`${context}/partnerVerificationSubmit`, "POST", jsonObject, function (response) {
|
|
|
211 |
if (response === 'true') {
|
|
|
212 |
alert("Request submited");
|
|
|
213 |
var dataTable = $('#partnerVerification').DataTable();
|
|
|
214 |
dataTable.row(row).remove().draw(false);
|
|
|
215 |
} else {
|
|
|
216 |
alert("Request not submit");
|
|
|
217 |
}
|
|
|
218 |
});
|
|
|
219 |
}
|
| 28848 |
manish |
220 |
|
| 33879 |
tejus.loha |
221 |
});
|
|
|
222 |
$(document).on('click', '.uploadNocDoc', function () {
|
|
|
223 |
console.log("uploadNocDoc clicked");
|
|
|
224 |
let data = [];
|
|
|
225 |
let isValid = true; // To track if all validations pass
|
|
|
226 |
$('#requiredNoc tbody tr').each(function () {
|
|
|
227 |
let brandId = $(this).find('.brandId').val();
|
|
|
228 |
let documentId = $(this).find('.documentId').val();
|
|
|
229 |
let nocRequiredSelect = $(this).find('.noc-required');
|
|
|
230 |
let nocRequired = nocRequiredSelect.val();
|
|
|
231 |
console.log("nocRequired - ", nocRequired);
|
|
|
232 |
console.log("documentId - ", documentId);
|
| 29763 |
tejbeer |
233 |
|
| 33879 |
tejus.loha |
234 |
// Validate: If document is not uploaded, user must select "Not Required"
|
|
|
235 |
if (documentId === 0 && nocRequired === "") {
|
|
|
236 |
alert("Please select 'Received' or 'Not Required' for brands without an uploaded NOC.");
|
|
|
237 |
isValid = false; // Mark validation as failed
|
|
|
238 |
return; // Exit loop early
|
|
|
239 |
}
|
|
|
240 |
data.push({
|
|
|
241 |
brandId: brandId,
|
|
|
242 |
nocDocId: documentId || 0, // Use null if no document uploaded
|
|
|
243 |
nocGt: nocRequired
|
|
|
244 |
});
|
| 28848 |
manish |
245 |
|
| 33879 |
tejus.loha |
246 |
});
|
| 28885 |
manish |
247 |
|
| 33879 |
tejus.loha |
248 |
// Stop if validation failed
|
|
|
249 |
if (!isValid) {
|
|
|
250 |
return;
|
|
|
251 |
}
|
| 28885 |
manish |
252 |
|
| 33879 |
tejus.loha |
253 |
// Get loiId from the button value
|
|
|
254 |
let loiId = $(this).val();
|
| 29300 |
manish |
255 |
|
| 33879 |
tejus.loha |
256 |
console.log("loiId - ", loiId);
|
|
|
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")) {
|
|
|
266 |
doPostAjaxRequestWithJsonHandler(`${context}/uploadNoc?loiId=${loiId}`, payload, function (response) {
|
|
|
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();
|
|
|
381 |
var pan = $(row).find(".pan input[type=hidden]").val();
|
|
|
382 |
var gst = $(row).find(".gst input[type=hidden]").val();
|
|
|
383 |
var cancheque = $(row).find(".cancheque input[type=hidden]").val();
|
|
|
384 |
var rent = $(row).find(".rent input[type=hidden]").val();
|
|
|
385 |
var loi = $(row).find(".loi input[type=hidden]").val();
|
|
|
386 |
var docCompleted = $(row).find("td:eq(12) option:selected").val();
|
| 28885 |
manish |
387 |
|
|
|
388 |
|
| 33879 |
tejus.loha |
389 |
var kycCompleted = $(row).find(".kyc input[type=hidden]").val();
|
| 28885 |
manish |
390 |
|
| 33879 |
tejus.loha |
391 |
console.log(aadhar)
|
| 29213 |
tejbeer |
392 |
|
| 33879 |
tejus.loha |
393 |
var anniversaryDate = $(row).find("td:eq(13) input[type='date']").val();
|
| 29213 |
tejbeer |
394 |
|
| 33879 |
tejus.loha |
395 |
if (anniversaryDate != "") {
|
|
|
396 |
anniversaryDate = anniversaryDate + "T00:00:00";
|
|
|
397 |
}
|
|
|
398 |
var dob = $(row).find("td:eq(14) input[type='date']").val();
|
| 29213 |
tejbeer |
399 |
|
| 33879 |
tejus.loha |
400 |
if (dob != "") {
|
| 29213 |
tejbeer |
401 |
|
| 33879 |
tejus.loha |
402 |
dob = dob + "T00:00:00";
|
|
|
403 |
}
|
| 29213 |
tejbeer |
404 |
|
| 33879 |
tejus.loha |
405 |
var phoneNumber = $(row).find("td:eq(16) input[type='number']").val();
|
|
|
406 |
console.log(phoneNumber);
|
|
|
407 |
var code = $(row).find("td:eq(11) input[type='text']").val();
|
| 29214 |
tejbeer |
408 |
|
|
|
409 |
|
| 33879 |
tejus.loha |
410 |
var businessType = $(row).find("td:eq(17) option:selected").val();
|
| 29134 |
manish |
411 |
|
| 29214 |
tejbeer |
412 |
|
| 33879 |
tejus.loha |
413 |
var prebookingListingObject = {};
|
|
|
414 |
prebookingListingObject['id'] = onboardingId
|
|
|
415 |
prebookingListingObject['outletName'] = outletName
|
|
|
416 |
prebookingListingObject['aadharDoc'] = aadhar
|
| 29214 |
tejbeer |
417 |
|
| 28885 |
manish |
418 |
|
| 33879 |
tejus.loha |
419 |
prebookingListingObject['panDoc'] = pan
|
|
|
420 |
prebookingListingObject['gst'] = gst
|
|
|
421 |
prebookingListingObject['cancelCheque'] = cancheque
|
|
|
422 |
prebookingListingObject['rentAgreement'] = rent
|
|
|
423 |
prebookingListingObject['loi'] = loi
|
|
|
424 |
prebookingListingObject['docCompleted'] = docCompleted
|
|
|
425 |
prebookingListingObject['code'] = code
|
|
|
426 |
prebookingListingObject['anniversaryDate'] = anniversaryDate
|
|
|
427 |
prebookingListingObject['dob'] = dob
|
|
|
428 |
prebookingListingObject['phoneNumber'] = phoneNumber
|
| 29104 |
manish |
429 |
|
| 29213 |
tejbeer |
430 |
|
| 33879 |
tejus.loha |
431 |
prebookingListingObject['kyc'] = kycCompleted
|
| 29213 |
tejbeer |
432 |
|
| 29104 |
manish |
433 |
|
| 33879 |
tejus.loha |
434 |
prebookingListingObject['businessType'] = businessType
|
| 29763 |
tejbeer |
435 |
|
|
|
436 |
|
| 33879 |
tejus.loha |
437 |
var jsonObject = JSON.stringify(prebookingListingObject);
|
|
|
438 |
console.log("prebookingListingObject" + prebookingListingObject);
|
|
|
439 |
console.log("jsonObject" + jsonObject);
|
|
|
440 |
if (confirm("Are you sure you want to submit the request") == true) {
|
|
|
441 |
doAjaxRequestWithJsonHandler(context
|
|
|
442 |
+ "/partnerOnboardingLegalSubmit",
|
|
|
443 |
"POST", jsonObject, function (response) {
|
|
|
444 |
row.html(response);
|
|
|
445 |
row.css("background-color", "#F8F8FF");
|
| 29213 |
tejbeer |
446 |
|
| 33879 |
tejus.loha |
447 |
});
|
|
|
448 |
}
|
| 29213 |
tejbeer |
449 |
|
| 33879 |
tejus.loha |
450 |
});
|
| 29104 |
manish |
451 |
|
| 29213 |
tejbeer |
452 |
|
| 33879 |
tejus.loha |
453 |
var table = $('#partnerVerification').DataTable();
|
|
|
454 |
$(document).on('dblclick', '#partnerVerification tbody tr', function () {
|
|
|
455 |
console.log("dblclick");
|
|
|
456 |
var data = table.row(this).data();
|
| 29763 |
tejbeer |
457 |
|
| 33879 |
tejus.loha |
458 |
$(this).find(":selected").attr('disabled', false).show();
|
|
|
459 |
$(this).find(":input").attr('disabled', false).show();
|
| 29104 |
manish |
460 |
|
| 33879 |
tejus.loha |
461 |
});
|
| 29213 |
tejbeer |
462 |
|
| 33879 |
tejus.loha |
463 |
$(document).on('input', 'table#requiredNoc input[type=file]', function () {
|
|
|
464 |
if (confirm('Confirm file upload ?')) {
|
|
|
465 |
var fileSelector = $(this)[0];
|
|
|
466 |
if (fileSelector != undefined && fileSelector.files[0] != undefined) {
|
|
|
467 |
var file = this.files[0];
|
|
|
468 |
console.log("file", file);
|
|
|
469 |
let fileInput = $(this);
|
|
|
470 |
console.log("fileInput", file);
|
|
|
471 |
uploadDocument(file, function (documentId) {
|
|
|
472 |
fileInput.closest('td').find(".documentId").val(documentId);
|
|
|
473 |
console.log("documentId", documentId);
|
|
|
474 |
});
|
|
|
475 |
}
|
|
|
476 |
}
|
|
|
477 |
});
|
| 29763 |
tejbeer |
478 |
|
| 33879 |
tejus.loha |
479 |
function getNocUploadForm(onboardingId) {
|
|
|
480 |
$('#nocUploadBody').html('');
|
|
|
481 |
doGetAjaxRequestHandler(`${context}/brandNocUpdateForm?onboardingId=` + onboardingId, function (response) {
|
|
|
482 |
$('#nocUploadBody').html(response);
|
|
|
483 |
});
|
|
|
484 |
}
|
| 29763 |
tejbeer |
485 |
|
| 33879 |
tejus.loha |
486 |
var table = $('#onboardingLegal').DataTable();
|
|
|
487 |
$(document).on('dblclick', '#onboardingLegal tbody tr', function () {
|
|
|
488 |
console.log("dblclick");
|
|
|
489 |
var data = table.row(this).data();
|
| 29763 |
tejbeer |
490 |
|
| 33879 |
tejus.loha |
491 |
$(this).find(":selected").attr('disabled', false).show();
|
|
|
492 |
$(this).find(":input").attr('disabled', false).show();
|
| 29104 |
manish |
493 |
|
| 33879 |
tejus.loha |
494 |
$(this).find("input[name=codeLegal]").attr('disabled', true);
|
|
|
495 |
$(this).find("input[name=shead1]").attr('disabled', true);
|
|
|
496 |
$(this).find("input[name=bdm1]").attr('disabled', true);
|
|
|
497 |
$(this).find("input[name=abrand1]").attr('disabled', true);
|
|
|
498 |
$(this).find("input[name=recbrand1]").attr('disabled', true);
|
|
|
499 |
});
|
| 29213 |
tejbeer |
500 |
|
| 33879 |
tejus.loha |
501 |
var table = $('#partnerDashboardTraining').DataTable();
|
|
|
502 |
$(document).on('dblclick', '#partnerDashboardTraining tbody tr',
|
|
|
503 |
function () {
|
|
|
504 |
console.log("dblclick");
|
|
|
505 |
var data = table.row(this).data();
|
| 29104 |
manish |
506 |
|
| 33879 |
tejus.loha |
507 |
$(this).find(":selected").attr('disabled', false).show();
|
|
|
508 |
$(this).find(":input").attr('disabled', false).show();
|
| 30286 |
tejbeer |
509 |
|
|
|
510 |
|
| 33879 |
tejus.loha |
511 |
});
|
| 30286 |
tejbeer |
512 |
|
| 33879 |
tejus.loha |
513 |
var table = $('#partnerDealerMapping').DataTable();
|
|
|
514 |
$(document).on('dblclick', '#partnerDealerMapping tbody tr', function () {
|
|
|
515 |
console.log("dblclick");
|
|
|
516 |
var data = table.row(this).data();
|
| 30286 |
tejbeer |
517 |
|
| 33879 |
tejus.loha |
518 |
$(this).find(":input").attr('disabled', false).show();
|
| 29213 |
tejbeer |
519 |
|
| 33879 |
tejus.loha |
520 |
});
|
| 29213 |
tejbeer |
521 |
|
| 29763 |
tejbeer |
522 |
|
| 28848 |
manish |
523 |
function partnerDealerMapping(domId) {
|
| 33879 |
tejus.loha |
524 |
doAjaxRequestHandler(context + "/partnerDealerMapping", "GET", function (
|
|
|
525 |
response) {
|
|
|
526 |
$('#' + domId).html(response);
|
|
|
527 |
});
|
| 28848 |
manish |
528 |
}
|
|
|
529 |
|
| 29104 |
manish |
530 |
function partnerOnboardingLegal(domId) {
|
| 33879 |
tejus.loha |
531 |
doAjaxRequestHandler(context + "/partnerOnboardingLegal", "GET", function (
|
|
|
532 |
response) {
|
|
|
533 |
$('#' + domId).html(response);
|
|
|
534 |
});
|
| 29104 |
manish |
535 |
}
|
|
|
536 |
|
| 28848 |
manish |
537 |
function partnerDashboardTraining(domId) {
|
| 33879 |
tejus.loha |
538 |
doAjaxRequestHandler(context + "/partnerDashboardTraining", "GET",
|
|
|
539 |
function (response) {
|
|
|
540 |
$('#' + domId).html(response);
|
|
|
541 |
});
|
| 28848 |
manish |
542 |
}
|
|
|
543 |
|
|
|
544 |
function partnerOnboardingVerification(domId) {
|
| 33879 |
tejus.loha |
545 |
doAjaxRequestHandler(`${context}/partnerOnboardingVerification`, "GET",
|
|
|
546 |
function (response) {
|
|
|
547 |
$('#' + domId).html(response);
|
|
|
548 |
});
|
| 28848 |
manish |
549 |
}
|
| 33879 |
tejus.loha |
550 |
|
|
|
551 |
function nocUploadPanel(domId) {
|
|
|
552 |
doAjaxRequestHandler(`${context}/uploadNocPanel`, "GET",
|
|
|
553 |
function (response) {
|
|
|
554 |
$('#' + domId).html(response);
|
|
|
555 |
});
|
|
|
556 |
}
|