Subversion Repositories SmartDukaan

Rev

Rev 33891 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33891 Rev 35971
Line 3... Line 3...
3
        function (response) {
3
        function (response) {
4
            $('#' + 'main-content').html(response);
4
            $('#' + 'main-content').html(response);
5
        });
5
        });
6
});
6
});
7
 
7
 
-
 
8
$(document).on('click', ".delay-panel", function () {
-
 
9
    doGetAjaxRequestHandler(context + "/partnerDelayPanel",
-
 
10
        function (response) {
-
 
11
            $('#' + 'main-content').html(response);
-
 
12
        });
-
 
13
});
-
 
14
 
8
$(document).on('click', ".legal-kyc", function () {
15
$(document).on('click', ".legal-kyc", function () {
9
    doGetAjaxRequestHandler(context + "/getOpenPartnerPendingKyc",
16
    doGetAjaxRequestHandler(context + "/getOpenPartnerPendingKyc",
10
        function (response) {
17
        function (response) {
11
            $('#' + 'main-content').html(response);
18
            $('#' + 'main-content').html(response);
12
        });
19
        });
Line 191... Line 198...
191
 
198
 
192
    var id = $(row).find("td:eq(0)").text();
199
    var id = $(row).find("td:eq(0)").text();
193
 
200
 
194
    var outletName = $(row).find("td:eq(1) input[type='text']").val();
201
    var outletName = $(row).find("td:eq(1) input[type='text']").val();
195
    var createdTimestamp = $(row).find("td:eq(2)").text();
202
    var createdTimestamp = $(row).find("td:eq(2)").text();
196
    if (createdTimestamp != "") {
203
    if (createdTimestamp) {
197
        createdTimestamp = createdTimestamp + "T00:00:00";
204
        createdTimestamp = createdTimestamp + "T00:00:00";
-
 
205
    } else {
-
 
206
        createdTimestamp = "";
198
    }
207
    }
199
    var acquiredDate = $(row).find("td:eq(3) input[type='date']").val();
208
    var acquiredDate = $(row).find("td:eq(3) input[type='date']").val();
200
    if (acquiredDate != "") {
209
    if (acquiredDate) {
201
        acquiredDate = acquiredDate + "T00:00:00";
210
        acquiredDate = acquiredDate + "T00:00:00";
-
 
211
    } else {
-
 
212
        acquiredDate = "";
202
    }
213
    }
203
 
214
 
204
    var phoneNumber = $(row).find("td:eq(4) input[type='number']").val();
215
    var phoneNumber = $(row).find("td:eq(4) input[type='number']").val();
205
 
216
 
206
 
217
 
Line 211... Line 222...
211
 
222
 
212
    console.log("agreedBrandFees" + agreedBrandFees);
223
    console.log("agreedBrandFees" + agreedBrandFees);
213
 
224
 
214
 
225
 
215
    var investmentDate = $(row).find("td:eq(9) input[type='date']").val();
226
    var investmentDate = $(row).find("td:eq(9) input[type='date']").val();
216
    if (investmentDate != "") {
227
    if (investmentDate) {
217
        investmentDate = investmentDate + "T00:00:00";
228
        investmentDate = investmentDate + "T00:00:00";
-
 
229
    } else {
-
 
230
        investmentDate = "";
218
    }
231
    }
219
    console.log("investmentDate" + investmentDate);
232
    console.log("investmentDate" + investmentDate);
220
 
233
 
221
    var loi = $(row).find(".loiDesign input[type=hidden]").val();
234
    var loi = $(row).find(".loiDesign input[type=hidden]").val();
222
    console.log("loi" + loi);
235
    console.log("loi" + loi);
Line 226... Line 239...
226
    var code = $(row).find("td:eq(12) input[type='text']").val();
239
    var code = $(row).find("td:eq(12) input[type='text']").val();
227
    console.log("code" + code);
240
    console.log("code" + code);
228
 
241
 
229
 
242
 
230
    var receePlaned = $(row).find("td:eq(13) input[type='date']").val();
243
    var receePlaned = $(row).find("td:eq(13) input[type='date']").val();
231
    if (receePlaned != "") {
244
    if (receePlaned) {
232
        receePlaned = receePlaned + "T00:00:00";
245
        receePlaned = receePlaned + "T00:00:00";
-
 
246
    } else {
-
 
247
        receePlaned = "";
233
    }
248
    }
234
    var receeActual = $(row).find("td:eq(14) input[type='date']").val();
249
    var receeActual = $(row).find("td:eq(14) input[type='date']").val();
235
    if (receeActual != "") {
250
    if (receeActual) {
236
        receeActual = receeActual + "T00:00:00";
251
        receeActual = receeActual + "T00:00:00";
-
 
252
    } else {
-
 
253
        receeActual = "";
237
    }
254
    }
238
    console.log("receeActual" + receeActual);
255
    console.log("receeActual" + receeActual);
239
 
256
 
240
 
257
 
241
    var twoDBoqPlanedDate = $(row).find("td:eq(16) input[type='date']").val();
258
    var twoDBoqPlanedDate = $(row).find("td:eq(16) input[type='date']").val();
242
    if (twoDBoqPlanedDate != "") {
259
    if (twoDBoqPlanedDate) {
243
        twoDBoqPlanedDate = twoDBoqPlanedDate + "T00:00:00";
260
        twoDBoqPlanedDate = twoDBoqPlanedDate + "T00:00:00";
-
 
261
    } else {
-
 
262
        twoDBoqPlanedDate = "";
244
    }
263
    }
245
 
264
 
246
    var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
265
    var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
247
    if (twoDBoqdate != "") {
266
    if (twoDBoqdate) {
248
        twoDBoqdate = twoDBoqdate + "T00:00:00";
267
        twoDBoqdate = twoDBoqdate + "T00:00:00";
-
 
268
    } else {
-
 
269
        twoDBoqdate = "";
249
    }
270
    }
250
    var twodBOQ = $(row).find(".twoDBoq input[type=hidden]").val();
271
    var twodBOQ = $(row).find(".twoDBoq input[type=hidden]").val();
251
 
272
 
252
    var threeDBoqPlanedDate = $(row).find("td:eq(19) input[type='date']").val();
273
    var threeDBoqPlanedDate = $(row).find("td:eq(19) input[type='date']").val();
253
    if (threeDBoqPlanedDate != "") {
274
    if (threeDBoqPlanedDate) {
254
        threeDBoqPlanedDate = threeDBoqPlanedDate + "T00:00:00";
275
        threeDBoqPlanedDate = threeDBoqPlanedDate + "T00:00:00";
-
 
276
    } else {
-
 
277
        threeDBoqPlanedDate = "";
255
    }
278
    }
256
 
279
 
257
    var threeDBoqdate = $(row).find("td:eq(20) input[type='date']").val();
280
    var threeDBoqdate = $(row).find("td:eq(20) input[type='date']").val();
258
    if (threeDBoqdate != "") {
281
    if (threeDBoqdate) {
259
        threeDBoqdate = threeDBoqdate + "T00:00:00";
282
        threeDBoqdate = threeDBoqdate + "T00:00:00";
-
 
283
    } else {
-
 
284
        threeDBoqdate = "";
260
    }
285
    }
261
 
286
 
262
    var threeDBoq = $(row).find(".threeDBoq input[type=hidden]").val();
287
    var threeDBoq = $(row).find(".threeDBoq input[type=hidden]").val();
263
 
288
 
264
    var poVenderPlanedDate = $(row).find("td:eq(22) input[type='date']").val();
289
    var poVenderPlanedDate = $(row).find("td:eq(22) input[type='date']").val();
265
    if (poVenderPlanedDate != "") {
290
    if (poVenderPlanedDate) {
266
        poVenderPlanedDate = poVenderPlanedDate + "T00:00:00";
291
        poVenderPlanedDate = poVenderPlanedDate + "T00:00:00";
-
 
292
    } else {
-
 
293
        poVenderPlanedDate = "";
267
    }
294
    }
268
    var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
295
    var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
269
    if (poVenderDate != "") {
296
    if (poVenderDate) {
270
        poVenderDate = poVenderDate + "T00:00:00";
297
        poVenderDate = poVenderDate + "T00:00:00";
-
 
298
    } else {
-
 
299
        poVenderDate = "";
271
    }
300
    }
272
 
301
 
273
 
302
 
274
    var briefingPartnerPlaned = $(row).find("td:eq(24) input[type='date']").val();
303
    var briefingPartnerPlaned = $(row).find("td:eq(24) input[type='date']").val();
275
    if (briefingPartnerPlaned != "") {
304
    if (briefingPartnerPlaned) {
276
        briefingPartnerPlaned = briefingPartnerPlaned + "T00:00:00";
305
        briefingPartnerPlaned = briefingPartnerPlaned + "T00:00:00";
-
 
306
    } else {
-
 
307
        briefingPartnerPlaned = "";
277
    }
308
    }
278
    var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
309
    var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
279
    if (briefingPartner != "") {
310
    if (briefingPartner) {
280
        briefingPartner = briefingPartner + "T00:00:00";
311
        briefingPartner = briefingPartner + "T00:00:00";
-
 
312
    } else {
-
 
313
        briefingPartner = "";
281
    }
314
    }
282
    var deploymentPlanedDate = $(row).find("td:eq(26) input[type='date']").val();
315
    var deploymentPlanedDate = $(row).find("td:eq(26) input[type='date']").val();
283
    if (deploymentPlanedDate != "") {
316
    if (deploymentPlanedDate) {
284
        deploymentPlanedDate = deploymentPlanedDate + "T00:00:00";
317
        deploymentPlanedDate = deploymentPlanedDate + "T00:00:00";
-
 
318
    } else {
-
 
319
        deploymentPlanedDate = "";
285
    }
320
    }
286
    var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
321
    var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
287
    if (deploymentDate != "") {
322
    if (deploymentDate) {
288
        deploymentDate = deploymentDate + "T00:00:00";
323
        deploymentDate = deploymentDate + "T00:00:00";
-
 
324
    } else {
-
 
325
        deploymentDate = "";
289
    }
326
    }
290
 
327
 
291
 
328
 
292
    var finalPicsOutletPlanedDate = $(row).find("td:eq(28) input[type='date']").val();
329
    var finalPicsOutletPlanedDate = $(row).find("td:eq(28) input[type='date']").val();
293
    if (finalPicsOutletPlanedDate != "") {
330
    if (finalPicsOutletPlanedDate) {
294
        finalPicsOutletPlanedDate = finalPicsOutletPlanedDate + "T00:00:00";
331
        finalPicsOutletPlanedDate = finalPicsOutletPlanedDate + "T00:00:00";
-
 
332
    } else {
-
 
333
        finalPicsOutletPlanedDate = "";
295
    }
334
    }
296
 
335
 
297
    var finalPicsOutletDate = $(row).find("td:eq(29) input[type='date']").val();
336
    var finalPicsOutletDate = $(row).find("td:eq(29) input[type='date']").val();
298
    if (finalPicsOutletDate != "") {
337
    if (finalPicsOutletDate) {
299
        finalPicsOutletDate = finalPicsOutletDate + "T00:00:00";
338
        finalPicsOutletDate = finalPicsOutletDate + "T00:00:00";
-
 
339
    } else {
-
 
340
        finalPicsOutletDate = "";
300
    }
341
    }
301
    var finalPicsOutlet = $(row).find(".finalPics input[type=hidden]").val();
342
    var finalPicsOutlet = $(row).find(".finalPics input[type=hidden]").val();
302
 
343
 
303
    var nocDate = $(row).find("td:eq(31) input[type='date']").val();
344
    var nocDate = $(row).find("td:eq(31) input[type='date']").val();
304
    if (nocDate != "") {
345
    if (nocDate) {
305
        nocDate = nocDate + "T00:00:00";
346
        nocDate = nocDate + "T00:00:00";
-
 
347
    } else {
-
 
348
        nocDate = "";
306
    }
349
    }
307
    var noc = $(row).find(".noc input[type=hidden]").val();
350
    var noc = $(row).find(".noc input[type=hidden]").val();
308
    var partnerOnBoardingObject = {};
351
    var partnerOnBoardingObject = {};
309
    partnerOnBoardingObject['id'] = id
352
    partnerOnBoardingObject['id'] = id
310
    partnerOnBoardingObject['outletName'] = outletName
353
    partnerOnBoardingObject['outletName'] = outletName
Line 987... Line 1030...
987
 
1030
 
988
var table = $('#example').DataTable();
1031
var table = $('#example').DataTable();
989
$(document).on('dblclick', '#example tbody tr', function () {
1032
$(document).on('dblclick', '#example tbody tr', function () {
990
 
1033
 
991
    var data = table.row(this).data();
1034
    var data = table.row(this).data();
-
 
1035
    // Use class-based selector instead of td:eq(N) — positional selectors break when columns are hidden
992
    var statusHold = $(this).find("td:eq(39) button[type='submit']").val();
1036
    var holdBtn = $(this).find("button.holdPartnerOnboarding, button.unHoldPartnerOnboarding");
-
 
1037
    var statusHold = holdBtn.val();
993
 
1038
 
994
    console.log("statusHold=" + statusHold);
1039
    console.log("statusHold=" + statusHold);
995
    if (statusHold.localeCompare("hold")) {
1040
    if (statusHold === "unhold") {
-
 
1041
        // Row is on hold — keep inputs disabled, only enable Submit and Open buttons
996
        $(this).find(":input").attr('disabled', true);
1042
        $(this).find(":input").attr('disabled', true);
997
        $(this).find("td:eq(38) button[type='submit']").attr('disabled', false);
1043
        $(this).find("button.open_outlet").attr('disabled', false);
998
        $(this).find("td:eq(37) button[type='submit']").attr('disabled', false);
1044
        $(this).find("button.submit1").attr('disabled', false);
999
    } else {
1045
    } else {
-
 
1046
        // Row is not on hold — enable all inputs for editing
1000
        $(this).find(":input").attr('disabled', false).show();
1047
        $(this).find(":input").attr('disabled', false).show();
1001
        $(this).find(":selected").attr('disabled', false).show();
1048
        $(this).find(":selected").attr('disabled', false).show();
1002
 
1049
 
1003
    }
1050
    }
1004
    $(this).find("input[name=rbmAuthId]").attr('disabled', true);
1051
    $(this).find("input[name=rbmAuthId]").attr('disabled', true);
1005
    $(this).find("input[name=verificationStatusOnboarding]").attr('disabled', true);
1052
    $(this).find("input[name=verificationStatusOnboarding]").attr('disabled', true);
1006
    $(this).find("input[name=billingStatus]").attr('disabled', true);
1053
    $(this).find("input[name=billingStatus]").attr('disabled', true);
1007
 
1054
 
1008
 
1055
 
1009
    $(this).css("background-color", "#87d3f8");
1056
    $(this).css("background-color", "#87d3f8");
1010
    let a = 12;
-
 
1011
    let b = 12;
-
 
1012
    console.log("yes" + a == b);
-
 
1013
 
1057
 
1014
});
1058
});
1015
 
1059
 
1016
var table = $('#OnboardingDesign').DataTable();
1060
var table = $('#OnboardingDesign').DataTable();
1017
$(document).on('dblclick', '#OnboardingDesign tbody tr', function () {
1061
$(document).on('dblclick', '#OnboardingDesign tbody tr', function () {
Line 1145... Line 1189...
1145
        alert("Please Fill The Recee Actual Date");
1189
        alert("Please Fill The Recee Actual Date");
1146
        return
1190
        return
1147
 
1191
 
1148
    }
1192
    }
1149
    if (twoDBoqdate == "") {
1193
    if (twoDBoqdate == "") {
1150
        alert("Please Fill The 2D with BOQ Actual Date");
-
 
1151
        return
-
 
1152
 
-
 
1153
    }
-
 
1154
    if (poVenderDate == "") {
-
 
1155
        alert("Please Fill The PO To Vendor Actual Date");
-
 
1156
        return
-
 
1157
 
-
 
1158
    }
-
 
1159
    if (briefingPartner == "") {
-
 
1160
        alert("Please Fill The Briefing Partner Actual Date ");
-
 
1161
        return
-
 
1162
 
-
 
1163
    }
-
 
1164
 
-
 
1165
    if (deploymentDate == "") {
-
 
1166
        alert("Please Fill The Deployment Actual Date ");
-
 
1167
        return
-
 
1168
 
-
 
1169
    }
-
 
1170
    if (nocDate == "") {
-
 
1171
        alert("Please Fill The NOC Actual Date ");
1194
        alert("Please Fill The BOQ Actual Date");
1172
        return
1195
        return
1173
 
1196
 
1174
    }
1197
    }
-
 
1198
    // Removed validations for hidden columns: PO Vendor, Briefing Partner, Deployment, NOC
1175
 
1199
 
1176
 
1200
 
1177
    var id = $(this).data('id');
1201
    var id = $(this).data('id');
1178
    console.log(id);
1202
    console.log(id);
1179
    if (confirm("Are you sure your Design TAT is Complete") == true) {
1203
    if (confirm("Are you sure your Design TAT is Complete") == true) {
Line 1280... Line 1304...
1280
        function (response) {
1304
        function (response) {
1281
            $('#' + domId).html(response);
1305
            $('#' + domId).html(response);
1282
        });
1306
        });
1283
}
1307
}
1284
 
1308
 
-
 
1309
// Full Stock Payment Panel - menu click handler
-
 
1310
$(document).on('click', ".full-stock-payment-panel", function () {
-
 
1311
    fullStockPaymentListing("main-content");
-
 
1312
});
-
 
1313
 
-
 
1314
function fullStockPaymentListing(domId) {
-
 
1315
    doAjaxRequestHandler(context + "/fullStockPaymentPanel", "GET",
-
 
1316
        function (response) {
-
 
1317
            $('#' + domId).html(response);
-
 
1318
        });
-
 
1319
}
-
 
1320
 
-
 
1321
// Welcome Call Panel - menu click handler
-
 
1322
$(document).on('click', ".welcome-call-panel", function () {
-
 
1323
    welcomeCallListing("main-content");
-
 
1324
});
-
 
1325
 
-
 
1326
function welcomeCallListing(domId) {
-
 
1327
    doAjaxRequestHandler(context + "/welcomeCallPanel", "GET",
-
 
1328
        function (response) {
-
 
1329
            $('#' + domId).html(response);
-
 
1330
        });
-
 
1331
}
-
 
1332
 
-
 
1333
// Open checklist modal for welcome call
-
 
1334
$(document).on('click', ".welcome-call-checkbox", function () {
-
 
1335
    var onboardingId = $(this).data("id");
-
 
1336
    doAjaxRequestHandler(context + "/welcomeCallCheckbox?onboardingId=" + onboardingId, "GET",
-
 
1337
        function (response) {
-
 
1338
            $('#myModal').html(response);
-
 
1339
            $('#myModal').modal('toggle');
-
 
1340
        });
-
 
1341
});
-
 
1342
 
-
 
1343
// Submit welcome call checklist
-
 
1344
$(document).on('click', '.welcome-call-submit', function () {
-
 
1345
    var onboardingId = $(this).data('id');
-
 
1346
 
-
 
1347
    var trainingVerifi = $('input[name="trainingVerifi"]').is(":checked") ? 1 : 0;
-
 
1348
    var recceVerifi = $('input[name="recceVerifi"]').is(":checked") ? 1 : 0;
-
 
1349
    var advStockPayment = $('input[name="advStockPayment"]').is(":checked") ? 1 : 0;
-
 
1350
    var brandingVerifi = $('input[name="brandingVerifi"]').is(":checked") ? 1 : 0;
-
 
1351
    var stockPay = $('input[name="stockPay"]').is(":checked") ? 1 : 0;
-
 
1352
    var billingVerifi = $('input[name="billingVerifi"]').is(":checked") ? 1 : 0;
-
 
1353
    var inaugrationVerifi = $('input[name="inaugrationVerifi"]').is(":checked") ? 1 : 0;
-
 
1354
    var financialServices = $('input[name="financialServices"]').is(":checked") ? 1 : 0;
-
 
1355
    var promotorVerifi = $('input[name="promotorVerifi"]').is(":checked") ? 1 : 0;
-
 
1356
    var verifiComments = $('input[name="verifiCommentCheckbox"]').val();
-
 
1357
 
-
 
1358
    var partnerVerficationCheckBoxObject = {};
-
 
1359
    partnerVerficationCheckBoxObject['onboardingId'] = onboardingId;
-
 
1360
    partnerVerficationCheckBoxObject['trainingVerifi'] = trainingVerifi;
-
 
1361
    partnerVerficationCheckBoxObject['recceVerifi'] = recceVerifi;
-
 
1362
    partnerVerficationCheckBoxObject['advStockPayment'] = advStockPayment;
-
 
1363
    partnerVerficationCheckBoxObject['brandingVerifi'] = brandingVerifi;
-
 
1364
    partnerVerficationCheckBoxObject['stockPay'] = stockPay;
-
 
1365
    partnerVerficationCheckBoxObject['billingVerifi'] = billingVerifi;
-
 
1366
    partnerVerficationCheckBoxObject['inaugrationVerifi'] = inaugrationVerifi;
-
 
1367
    partnerVerficationCheckBoxObject['financialServices'] = financialServices;
-
 
1368
    partnerVerficationCheckBoxObject['promotorVerifi'] = promotorVerifi;
-
 
1369
    partnerVerficationCheckBoxObject['verifiCheckboxComment'] = verifiComments;
-
 
1370
 
-
 
1371
    var jsonObject = JSON.stringify(partnerVerficationCheckBoxObject);
-
 
1372
 
-
 
1373
    if (confirm("Are you sure you want to submit the welcome call?") == true) {
-
 
1374
        doAjaxRequestWithJsonHandler(context + "/welcomeCallCheckboxSubmit", "POST",
-
 
1375
            jsonObject, function (response) {
-
 
1376
                alert("Welcome call successfully submitted");
-
 
1377
                $('#myModal').modal('hide');
-
 
1378
                welcomeCallListing("main-content");
-
 
1379
            });
-
 
1380
    }
-
 
1381
});
1285
 
1382
 
1286
 
1383
 
1287
 
1384