Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
34437 ranu 1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
    <meta charset="UTF-8">
5
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
36080 aman 6
    <meta name="description" content="Smart Dukaan Partner Dashboard">
34437 ranu 7
    <meta name="author" content="smartdukaan">
8
 
9
    <meta name="referer" content="no-referer">
10
    <meta name="referrer" content="no-referrer">
11
 
12
    <!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
13
    <link rel="shortcut icon" href="assets/images/icons/favicon.png">
14
 
36080 aman 15
    <title>Smart Dukaan - Partner Dashboard</title>
34437 ranu 16
 
17
    <!-- Bootstrap CSS -->
18
    <!-- bootstrap theme -->
19
    <!--external css-->
20
    <!-- font icon -->
21
    <link href="resources/css/elegant-icons-style.css" rel="stylesheet"/>
22
    <link href="resources/css/font-awesome.min.css" rel="stylesheet"/>
23
    <!-- full calendar css-->
24
    <!-- owl carousel -->
25
    <link rel="stylesheet" href="resources/css/owl.carousel.css" type="text/css">
26
    <link href="resources/css/jquery-jvectormap-1.2.2.css" rel="stylesheet">
27
    <!-- Custom styles -->
28
    <link href="resources/css/widgets.css" rel="stylesheet">
29
    <link href="resources/css/style.css?v=${cssVersion}" rel="stylesheet">
30
    <link href="resources/css/card.css?v=${cssVersion}" rel="stylesheet">
31
    <link href="resources/css/brand-logo.css?v=${cssVersion}" rel="stylesheet">
32
    <link href="resources/css/style-responsive.css?v=${cssVersion}" rel="stylesheet"/>
33
    <link href="resources/css/jquery-ui-1.10.4.min.css" rel="stylesheet">
34
    <link type="text/css" href="resources/css/bootstrap.css" rel="stylesheet">
35
    <!--<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/bootstrap/3/css/bootstrap.css" />-->
36
    <link href="resources/css/bootstrap-theme.min.css" rel="stylesheet">
37
    <link rel="stylesheet" type="text/css" href="resources/js/daterangepicker/daterangepicker.css"/>
38
 
39
    <link rel="stylesheet" type="text/css" href="resources/css/bootstrap-multiselect.css"/>
40
    <link rel="stylesheet" type="text/css" href="resources/css/datatables.bootstrap.min.css"/>
41
    <link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css'
42
          integrity='sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ' crossorigin='anonymous'>
43
    <link rel="stylesheet" type="text/css" href="resources/css/bootstrap-tagsinput.css">
44
    <!-- Include the Toastify CSS file -->
45
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
46
    <style>
47
 
48
        <!--
49
        Small desktops-- >
50
 
51
        @media (max-width: 1920px) {
52
            body {
53
                zoom: 80% !important;
54
            }
55
        }
56
 
57
        @media (max-width: 1280px) {
58
            div.count {
59
                font-size: 18px;
60
            }
61
        }
62
 
63
 
64
        .current-margin {
65
            cursor: pointer;
66
        }
67
 
68
        .margin-calculator {
69
            cursor: pointer;
70
        }
71
 
72
        .Vivo:hover {
73
            border-radius: 40px;
74
            background: blue;
75
        }
76
 
77
 
78
        .Samsung:hover {
79
            border-radius: 4px;
80
            background: blue;
81
        }
82
 
83
        .Vivo:hover {
84
            border-radius: 4px;
85
            background: mediumblue;
86
        }
87
 
88
        .Oppo:hover {
89
            border-radius: 4px;
90
            background: green;
91
        }
92
 
93
        .Lava:hover {
94
            border-radius: 4px;
95
            background: salmon;
96
        }
97
 
98
        .Live:hover {
99
            border-radius: 4px;
100
            background: coral;
101
        }
102
 
103
        .Nokia:hover {
104
            border-radius: 4px;
105
            background: blue;
106
        }
107
 
108
        .Realme:hover {
109
            border-radius: 4px;
110
            background: yellow;
111
        }
112
 
113
        .Tecno:hover {
114
            border-radius: 4px;
115
            background: DarkTurquoise;
116
        }
117
 
118
        .Samsung {
119
 
120
            -moz-border-radius: 4px;
121
            border-radius: 4px;
122
            border: solid 5px black;
123
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
124
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
125
            background-image: linear-gradient(#4682B4, #dae5f4);
126
            color: #FFF;
127
            padding: 8px 12px;
128
            text-decoration: none;
129
            cursor: pointer;
130
 
131
 
132
        }
133
 
134
        .Vivo {
135
            -moz-border-radius: 4px;
136
            border-radius: 4px;
137
            border: solid 5px black;
138
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
139
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
140
            background-image: linear-gradient(#4682B4, #dae5f4);
141
            color: #FFF;
142
            padding: 8px 12px;
143
            text-decoration: none;
144
            cursor: pointer;
145
 
146
        }
147
 
148
        .Oppo {
149
            -moz-border-radius: 4px;
150
            border-radius: 4px;
151
            border: solid 5px black;
152
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
153
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
154
            background-image: linear-gradient(#4682B4, #dae5f4);
155
            color: #FFF;
156
            padding: 8px 12px;
157
            text-decoration: none;
158
            cursor: pointer;
159
 
160
        }
161
 
162
        .Lava {
163
 
164
            -moz-border-radius: 4px;
165
            border-radius: 4px;
166
            border: solid 5px black;
167
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
168
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
169
            background-image: linear-gradient(#4682B4, #dae5f4);
170
            color: #FFF;
171
            padding: 8px 12px;
172
            text-decoration: none;
173
            cursor: pointer;
174
 
175
        }
176
 
177
        .Realme {
178
            -moz-border-radius: 4px;
179
            border-radius: 4px;
180
            border: solid 5px black;
181
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
182
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
183
            background-image: linear-gradient(#4682B4, #dae5f4);
184
            color: #FFF;
185
            padding: 8px 12px;
186
            text-decoration: none;
187
            cursor: pointer;
188
 
189
        }
190
 
191
        .Tecno {
192
            -moz-border-radius: 4px;
193
            border-radius: 4px;
194
            border: solid 5px black;
195
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
196
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
197
            background-image: linear-gradient(#4682B4, #dae5f4);
198
            color: #FFF;
199
            padding: 8px 12px;
200
            text-decoration: none;
201
            cursor: pointer;
202
 
203
        }
204
 
205
        .Nokia {
206
            -moz-border-radius: 4px;
207
            border-radius: 4px;
208
            border: solid 5px black;
209
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
210
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
211
            background-image: linear-gradient(#4682B4, #dae5f4);
212
            color: #FFF;
213
            padding: 8px 12px;
214
            text-decoration: none;
215
            cursor: pointer;
216
 
217
        }
218
 
219
        .Live {
220
 
221
            -moz-border-radius: 4px;
222
            border-radius: 4px;
223
            border: solid 5px black;
224
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
225
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
226
            background-image: linear-gradient(#4682B4, #dae5f4);
227
            color: #FFF;
228
            padding: 8px 12px;
229
            text-decoration: none;
230
            cursor: pointer;
231
        }
232
 
233
        #accesoriesStock:hover {
234
            cursor: pointer;
235
            border-radius: 4px;
236
            background: white;
237
        }
238
 
239
        #accesoriesStock {
240
 
241
            -moz-border-radius: 4px;
242
            border-radius: 4px;
243
            border: solid 5px black;
244
            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
245
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
246
            background-image: linear-gradient(#4682B4, #dae5f4);
247
            color: #FFF;
248
            padding: 14px 3px 18px 3px;
249
            text-decoration: none;
250
            object-fit: cover;
251
            width: 100%;
252
            height: 90px;
253
 
254
        }
255
 
256
        .loading {
257
            display: none;
258
        }
259
 
260
        .breadcrumb {
261
            padding: 0 15px;
262
        }
263
 
264
        .purple-bg {
265
 
266
            background-image: linear-gradient(#800080, #DDA0DD);
267
            box-shadow: 6px 5px 6px purple;
268
        }
269
 
270
        .stars-outer {
271
            display: inline-block;
272
            position: relative;
273
            font-family: 'Mukta', FontAwesome;
274
        }
275
 
276
        .stars-outer::before {
277
            content: "\f006 \f006 \f006 \f006 \f006";
278
        }
279
 
280
        .stars-inner {
281
            position: absolute;
282
            top: 0;
283
            left: 0;
284
            white-space: nowrap;
285
            overflow: hidden;
286
            width: 0;
287
        }
288
 
289
        .stars-inner::before {
290
            content: "\f005 \f005 \f005 \f005 \f005";
291
            color: #f8ce0b;
292
        }
293
 
294
 
295
        .table-striped > tbody > tr:nth-child(odd) > td {
296
            background: white;
297
            background-color: #dae5f4;
298
        }
299
 
300
        .table-striped > tbody > tr:nth-child(even) > td {
301
            background: #f2f2f2;
302
            background-color: #b8d1f3;
303
        }
304
 
305
        .btn:hover {
306
            color: grey;
307
            text-decoration: none;
308
        }
309
 
310
        .btn-primary:hover {
311
            color: grey;
312
            text-decoration: none;
313
        }
314
 
315
        .sale-details {
316
            cursor: pointer;
317
        }
318
 
319
        .fa-2x {
320
            font-size: 1.4em;
321
        }
322
 
323
        .cover {
324
            object-fit: cover;
325
            width: 92%;
326
            height: 90px;
327
        }
328
 
329
        .info-box .notifications i {
330
            display: inline-block;
331
            margin-top: 0px;
332
            height: 25px;
333
            font-size: 16px;
334
            line-height: 25px;
335
            width: 25px;
336
            float: none;
337
            text-align: center;
338
            padding-right: 0px;
339
            color: #768399;
340
        }
341
 
342
        #preview {
343
            position: relative;
344
            color: #fff;
345
            float: left;
346
            width: 100%;
347
            -webkit-border-radius: 10px;
348
            -moz-border-radius: 10px;
349
            border-radius: 10px;
350
            clear: both;
351
        }
352
 
353
        #canvas-preview {
354
            width: 100%;
355
            position: relative;
356
            top: -15px;
357
        }
358
 
359
        #preview-textfield {
360
            position: absolute;
361
            top: -10px;
362
            left: 0;
363
            right: 0;
364
            text-align: center;
365
            font-size: 2em;
366
            font-weight: bold;
367
            color: white;
368
            font-family: 'Amaranth', sans-serif, Hind, 'Mukta';
369
        }
370
 
371
        #descriptionMenu {
372
            list-style: desc !important;
373
            list-style-type: square;
374
            text-align: left;
375
        }
376
 
377
        .messagebutton {
378
            margin-left: 1px;
379
 
380
        }
381
 
382
        .partnerTypeList a {
383
            color: #1f1d1d;
384
            border-bottom: none !important;
385
            background-color: #efecec;
386
            border: 1px solid #dad5d5 !important;
387
            padding: 10px 15px !important;
388
        }
389
 
390
        .Partnerdropdiv {
391
            background-color: #efecec !important;
392
            padding: 0 !important;
393
        }
394
 
395
        .partnerGold:hover {
396
            background-color: #D4AF37 !important;
397
            background-image: unset !important;
398
        }
399
 
400
        .partnerBronz:hover {
401
            background-color: #CD7F32 !important;
402
            background-image: unset !important;
403
        }
404
 
405
        .partnerPlatinum:hover {
406
            background-color: #799096 !important;
407
            background-image: unset !important;
408
        }
409
 
410
        .partnerSilver:hover {
411
            background-color: #BCC6CC !important;
412
            background-image: unset !important;
413
        }
414
 
415
        .partnerDiamond:hover {
416
            background-color: #B9F2FF !important;
417
            background-image: unset !important;
418
        }
419
 
420
        /*Custom Css by Vikas*/
421
        .info-box .row div, .info-box .row strong {
422
            font-size: 16px !important;
423
        }
424
 
425
        .info-box.light-salmon-bg div.title {
426
            font-size: 12px !important;
427
        }
428
 
429
        .info-box.orange-bg button div {
430
            font-size: 10px !important;
431
        }
432
 
433
    </style>
434
</head>
435
 
436
<body style="background-color:#f7f7f7">
437
<!--<div class="loading"><img src="resources/images/icons/loading.gif"></div>-->
438
<!-- container section start -->
439
<section id="container">
440
 
441
 
442
    <header class="header dark-bg indian-flag">
443
        <div class="toggle-nav">
444
            <div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"><i
445
                    class="icon_menu"></i></div>
446
        </div>
34505 ranu 447
        <a href="${rc.contextPath}/analysisDashboard?fofoId=$fofoId" class="logo" style="margin-top: 7px"> <img
34437 ranu 448
                src="resources/images/SmartDukaan-135x45.jpg" alt="smartDukaan" width="140"
449
                height="45">$fofoStore.getCode()</a>
450
 
451
        <ul class="nav pull-left top-menu">
452
            <li class="dropdown">
453
                <a data-toggle="dropdown" class="dropdown-toggle" href="#">
454
                    <img src="${partnerTypeImage}" width="60px">
455
                    <span class="username" style="font-size:15px">  <span
456
                            style="color:red">$partnerType.getValue()</span></span>
457
                    <b class="caret"></b>
458
                </a>
459
                <ul class="dropdown-menu Partnerdropdiv">
460
                    <li class="eborder-top partnerTypeList">
461
                        <a href="javascript:void(0);" class="partnerGold">Rising Star - New</a>
462
                        <a href="javascript:void(0);" class="partnerBronze">Bronze+ - 0-2.99L</a>
463
                        <a href="javascript:void(0);" class="partnerSilver">Silver - 3L-7.99L</a>
464
                        <a href="javascript:void(0);" class="partnerGold">Gold - 8L-14.99L</a>
465
                        <a href="javascript:void(0);" class="partnerDiamond">Diamond - 15L-20.99L</a>
466
                        <a href="javascript:void(0);" class="partnerPlatinum">Platinum - 21L & ABOVE</a>
467
                    </li>
468
                </ul>
469
            </li>
470
        </ul>
471
    </header>
472
    <!--header end-->
473
 
474
    <!--sidebar start-->
475
    <aside>
476
        <div id="sidebar" class="nav-collapse ">
477
            <!-- sidebar menu start-->
478
            <ul class="sidebar-menu">
479
                <li class="active">
34505 ranu 480
                    <a href="${rc.contextPath}/analysisDashboard?fofoId=$fofoId">
34437 ranu 481
                        <i class="icon_house_alt"></i>
482
                        <span>#springMessage("dashboard.dashboard")</span>
483
                    </a>
484
                </li>
485
 
486
                <li class="sub-menu">
487
                    <a href="javascript:void(0);" class="">
488
                        <i class="icon_table"></i>
489
                        <span>#springMessage("menu.reports")</span>
490
                        <span class="menu-arrow arrow_carrot-right"></span>
491
                    </a>
492
                    <ul class="sub">
34509 ranu 493
                        <li><a class="analysis-partner-collection-summary" data-fofoid="$fofoId"
494
                               href="javascript:void(0);">#springMessage(
495
                                                    "submenu.reportsdailycollections")</a></li>
34505 ranu 496
                        <li><a class="analysis-franchise-sales" data-fofoid="$fofoId"
497
                               href="javascript:void(0);">#springMessage(
34437 ranu 498
                            "submenu.reportsmysales")</a></li>
34505 ranu 499
                        <li><a class="analysis-wallet_statement" data-fofoid="$fofoId"
500
                               href="javascript:void(0);">#springMessage(
34437 ranu 501
                            "submenu.reportswalletstatement")</a></li>
34505 ranu 502
                        <li><a class="analysis-loan-statement" data-fofoid="$fofoId" href="javascript:void(0);">Loan
503
                            Statement</a></li>
504
                        <li><a class="analysis-account-statement" data-fofoid="$fofoId" href="javascript:void(0);">Account
505
                            Statement</a></li>
34524 ranu 506
 
34507 ranu 507
                        <li><a class="analysis-scheme-payout-report" href="javascript:void(0);"
508
                               data-fofoid="$fofoId">#springMessage(
509
                                                    "submenu.reportsschemespayout")</a></li>
34437 ranu 510
 
34508 ranu 511
                        <li><a class="analysis-price-drop-report" href="javascript:void(0);"
512
                               data-fofoid="$fofoId">#springMessage(
513
                                                    "submenu.reportspricedrop")</a></li>
34509 ranu 514
 
515
                        <li><a class="analysis-credit-note" href="javascript:void(0);" data-fofoid="$fofoId">Credit
516
                            Note</a></li>
34437 ranu 517
 
518
                    </ul>
519
                </li>
34513 ranu 520
                <li class="sub-menu">
521
                    <a href="javascript:;">
522
                        <i class="icon_document_alt"></i>
523
                        <span>#springMessage("menu.margins")</span>
524
                        <span class="menu-arrow arrow_carrot-right"></span>
525
                    </a>
526
                    <ul class="sub">
34524 ranu 527
                        <li><a class="analysis-schemes" data-fofoid="$fofoId" href="javascript:void(0);">#springMessage(
34513 ranu 528
                            "submenu.marginsmodelwisemargin")</a></li>
34524 ranu 529
                        <li><a class="analysis-partner-price-circular" data-fofoid="$fofoId"
530
                               href="javascript:void(0);">#springMessage(
34513 ranu 531
                            "submenu.marginsnlcpriccecircular")</a></li>
532
 
533
                    </ul>
534
                </li>
34437 ranu 535
            </ul>
536
            <!-- sidebar menu end-->
537
        </div>
538
    </aside>
539
    <!--sidebar end-->
540
 
541
    <!--main content start-->
542
    <section id="main-content">
543
        <section class="wrapper">
544
            <!--overview start-->
545
            <div class="row">
546
                <div class="col-lg-12">
34490 ranu 547
                    <h3 class="page-header" style="position:relative"><i class="fa fa-laptop"></i> Dashboard</h3>
34437 ranu 548
 
549
                    <ol class="breadcrumb">
34505 ranu 550
                        <li><i class="fa fa-home"></i><a
551
                                href="${rc.contextPath}/analysisDashboard?fofoId=$fofoId">Home</a></li>
34437 ranu 552
                        <li><i class="fa fa-laptop"></i>Dashboard</li>
553
                    </ol>
554
 
555
 
556
                </div>
557
            </div>
558
            <!-- overview end -->
37160 ranu 559
 
560
            #if($staticScheme)
37427 ranu 561
                ## ================= Super Retailer Club 5 card =================
562
                #set($srcTierRewards = {
563
                    "Shuruaat": "1 GM GOLD COIN",
564
                    "Udaan":    "1 GM GOLD COIN",
565
                    "Raftaar":  "1 GM GOLD COIN",
566
                    "Tarakki":  "1 GM GOLD COIN",
567
                    "Vijeta":   "1 GM GOLD COIN",
568
                    "Maharaja": "1 GM GOLD COIN"
569
                })
570
                #set($srcTierTrophies = {
571
                    "Shuruaat": "/resources/images/src-images/Shuruaat.png",
572
                    "Udaan":    "/resources/images/src-images/Udaan.png",
573
                    "Raftaar":  "/resources/images/src-images/Raftaar.png",
574
                    "Tarakki":  "/resources/images/src-images/Tarakki.png",
575
                    "Vijeta":   "/resources/images/src-images/Vijeta.png",
576
                    "Maharaja": "/resources/images/src-images/Maharaja.png"
577
                })
578
                #set($aimReward  = $srcTierRewards.get($aimingTier))
579
                #set($aimTrophy  = $srcTierTrophies.get($aimingTier))
580
                #set($barPct     = $achievementPercent)
581
                #if($barPct > 100) #set($barPct = 100) #end
582
 
37160 ranu 583
                <div class="row" style="margin: 0 0 15px 0;">
584
                    <div class="col-lg-12" style="padding: 0 15px;">
37427 ranu 585
                        <div style="background:#fff;border:1px solid #eee;border-radius:12px;
586
                                    box-shadow:0 1px 3px rgba(0,0,0,0.04);overflow:hidden;">
587
                            <div style="display:grid;
588
                                        grid-template-columns: 220px 220px 400px 1fr;
589
                                        align-items:start;gap:24px;padding:26px 26px 22px 26px;">
590
 
591
                                ## --- Col 1: SRC5 logo ---
592
                                <div style="display:flex;align-items:center;justify-content:center;min-height:170px;">
593
                                    <img src="/resources/images/src-images/Group%204.png"
594
                                         alt="Super Retailer Club 5"
595
                                         style="width:100%;max-width:220px;height:auto;">
596
                                </div>
597
 
598
                                ## --- Col 2: Total Target ---
599
                                <div style="border-left:1px solid #f0f0f0;padding-left:24px;">
600
                                    <div style="display:flex;align-items:center;gap:12px;margin-bottom:22px;white-space:nowrap;height:44px;">
601
                                        <span style="display:inline-flex;align-items:center;justify-content:center;
602
                                                     width:44px;height:44px;border-radius:50%;background:#fdecec;flex-shrink:0;">
603
                                            <img src="/resources/images/src-images/Target.png" alt=""
604
                                                 style="height:22px;">
605
                                        </span>
606
                                        <span style="font-weight:800;color:#1a1a1a;letter-spacing:0.6px;font-size:15px;">TOTAL TARGET</span>
607
                                    </div>
608
                                    <div style="font-size:34px;font-weight:800;color:#111;white-space:nowrap;">
609
                                        &#8377;$totalTargetDisplay
610
                                    </div>
611
                                </div>
612
 
613
                                ## --- Col 3: Total Achievement (with breakdown) ---
614
                                <div style="border-left:1px solid #f0f0f0;padding-left:24px;">
615
                                    <div style="display:flex;align-items:center;gap:12px;margin-bottom:14px;white-space:nowrap;height:44px;">
616
                                        <span style="display:inline-flex;align-items:center;justify-content:center;
617
                                                     width:44px;height:44px;border-radius:50%;background:#fdecec;flex-shrink:0;">
618
                                            <img src="/resources/images/src-images/TOTAL%20ACHIEVEMENT.png" alt=""
619
                                                 style="height:22px;">
620
                                        </span>
621
                                        <span style="font-weight:800;color:#1a1a1a;letter-spacing:0.6px;font-size:15px;">TOTAL ACHIEVEMENT</span>
622
                                    </div>
623
                                    <div style="font-size:30px;font-weight:800;color:#d32f2f;margin-bottom:8px;white-space:nowrap;">
624
                                        &#8377;$schemeAchievementDisplay
625
                                    </div>
626
                                    <div style="display:flex;align-items:center;gap:12px;margin-bottom:10px;">
627
                                        <div style="flex:1;height:12px;background:#f2f2f2;border-radius:6px;overflow:hidden;">
628
                                            <div style="width:${barPct}%;height:100%;background:#d32f2f;border-radius:6px;"></div>
629
                                        </div>
630
                                        <div style="font-weight:800;color:#1a1a1a;min-width:50px;text-align:right;font-size:17px;">
631
                                            ${achievementPercent}%
632
                                        </div>
633
                                    </div>
634
                                    <button type="button" id="srcAchToggle"
635
                                            style="display:inline-flex;align-items:center;gap:8px;margin-bottom:6px;
636
                                                   background:none;border:none;padding:4px 0;cursor:pointer;
637
                                                   color:#5b2b8c;font-weight:700;font-size:13px;letter-spacing:0.3px;">
638
                                        <span id="srcAchToggleText">Click to expand</span>
639
                                        <span id="srcAchToggleIcon"
640
                                              style="display:inline-flex;transition:transform 0.2s ease;">
641
                                            <i class="fa fa-chevron-down"></i>
642
                                        </span>
643
                                    </button>
644
                                    <div id="srcAchBreakdown" style="display:none;">
645
                                        <div style="display:flex;align-items:center;justify-content:space-between;padding:8px 0;">
646
                                            <div style="display:flex;align-items:center;gap:14px;color:#1a1a1a;">
647
                                                <span style="display:inline-flex;align-items:center;justify-content:center;
648
                                                             width:44px;height:44px;border-radius:50%;background:#fdecec;flex-shrink:0;">
649
                                                    <img src="/resources/images/src-images/Mobile%20And%20tv.png" alt=""
650
                                                         style="height:24px;">
651
                                                </span>
652
                                                <span style="font-weight:700;font-size:17px;">Mobiles &amp; LEDs</span>
653
                                            </div>
654
                                            <div style="font-weight:800;color:#d32f2f;white-space:nowrap;font-size:17px;">
655
                                                &#8377;$mobileLedAchievementDisplay</div>
656
                                        </div>
657
                                        <div style="display:flex;align-items:center;justify-content:space-between;padding:8px 0;">
658
                                            <div style="display:flex;align-items:center;gap:14px;color:#1a1a1a;">
659
                                                <span style="display:inline-flex;align-items:center;justify-content:center;
660
                                                             width:44px;height:44px;border-radius:50%;background:#efe4fc;flex-shrink:0;">
661
                                                    <img src="/resources/images/src-images/accessories.png" alt=""
662
                                                         style="height:24px;">
663
                                                </span>
664
                                                <span style="font-weight:700;font-size:17px;">Accessories</span>
665
                                            </div>
666
                                            <div style="font-weight:800;color:#d32f2f;white-space:nowrap;font-size:17px;">
667
                                                &#8377;$accessoriesAchievementDisplay</div>
668
                                        </div>
669
                                    </div>
670
                                </div>
671
 
672
                                ## --- Col 4: Currently Aiming For + trophy ---
673
                                <div style="border-left:1px solid #f0f0f0;padding-left:24px;
674
                                            display:flex;align-items:center;gap:18px;">
675
                                    <div style="flex:1;min-width:0;">
676
                                        <div style="display:flex;align-items:center;gap:12px;margin-bottom:14px;white-space:nowrap;height:44px;">
677
                                            <span style="display:inline-flex;align-items:center;justify-content:center;
678
                                                         width:44px;height:44px;border-radius:50%;background:#efe4fc;flex-shrink:0;">
679
                                                <img src="/resources/images/src-images/CURRENTLY%20AIMING%20FOR.png"
680
                                                     alt="" style="height:22px;">
681
                                            </span>
682
                                            <span style="font-weight:800;color:#1a1a1a;letter-spacing:0.6px;font-size:15px;">CURRENTLY AIMING FOR</span>
683
                                        </div>
684
                                        <div style="font-size:34px;font-weight:900;color:#5b2b8c;text-transform:uppercase;margin-bottom:14px;white-space:nowrap;letter-spacing:0.5px;">
685
                                            $!aimingTier
686
                                        </div>
687
                                        #if($aimReward)
688
                                            <div style="display:inline-flex;align-items:center;gap:10px;
689
                                                        border:1px solid #e5d1f2;border-radius:28px;
690
                                                        padding:10px 16px;background:#faf5ff;white-space:nowrap;">
691
                                                <img src="/resources/images/src-images/1%20GM%20Gold%20Coin.png" alt=""
692
                                                     style="height:22px;">
693
                                                <span style="font-weight:800;color:#5b2b8c;font-size:14px;letter-spacing:0.4px;">$aimReward</span>
694
                                            </div>
695
                                        #end
696
                                    </div>
697
                                    #if($aimTrophy)
698
                                        <div style="flex:0 0 280px;display:flex;align-items:center;justify-content:flex-end;">
699
                                            <img src="$aimTrophy" alt="$!aimingTier trophy"
700
                                                 style="max-height:280px;max-width:100%;width:100%;height:auto;">
701
                                        </div>
702
                                    #end
703
                                </div>
37160 ranu 704
                            </div>
37427 ranu 705
 
706
                            ## --- Footer: scheme period + download ---
707
                            <div style="display:grid;grid-template-columns:1fr auto 1fr;align-items:center;
708
                                        padding:16px 26px;border-top:1px solid #f0f0f0;background:#fafafa;gap:16px;">
709
                                <div style="display:flex;align-items:center;gap:12px;color:#1a1a1a;white-space:nowrap;font-size:15px;">
710
                                    <span style="display:inline-flex;align-items:center;justify-content:center;
711
                                                 width:36px;height:36px;border-radius:50%;background:#fdecec;flex-shrink:0;">
712
                                        <img src="/resources/images/src-images/calendar_.png" alt=""
713
                                             style="height:20px;">
714
                                    </span>
715
                                    <span style="font-weight:800;"><strong>Scheme Period:</strong> $!schemePeriodDisplay</span>
716
                                </div>
717
                                <div style="color:#1a1a1a;font-size:15px;text-align:center;font-weight:700;">
718
                                    Refer to the Scheme Letter for complete Terms &amp; Conditions.
719
                                </div>
720
                                <a href="/resources/images/super-retailer-club-scheme.pdf" download
721
                                   style="display:inline-flex;align-items:center;gap:10px;justify-self:end;
722
                                          color:#d32f2f;font-weight:900;text-decoration:none;font-size:16px;">
723
                                    <img src="/resources/images/src-images/download.png" alt="" style="height:20px;">
724
                                    Download Scheme Letter
725
                                </a>
726
                            </div>
727
                        </div>
37160 ranu 728
                    </div>
729
                </div>
37427 ranu 730
                <script>
731
                    (function () {
732
                        var toggle = document.getElementById('srcAchToggle');
733
                        var panel = document.getElementById('srcAchBreakdown');
734
                        var label = document.getElementById('srcAchToggleText');
735
                        var icon = document.getElementById('srcAchToggleIcon');
736
                        if (!toggle || !panel) return;
737
                        toggle.addEventListener('click', function (e) {
738
                            e.preventDefault();
739
                            var isOpen = panel.style.display !== 'none';
740
                            panel.style.display = isOpen ? 'none' : 'block';
741
                            if (label) label.textContent = isOpen ? 'Click to expand' : 'Click to collapse';
742
                            if (icon) icon.style.transform = isOpen ? 'rotate(0deg)' : 'rotate(180deg)';
743
                        });
744
                    })();
745
                </script>
37160 ranu 746
            #end
747
 
34437 ranu 748
            <div class="row">
749
                <div class="col-lg-6">
750
                    <div class="row">
751
                        <div class="col-lg-7">
752
                            <div class="info-box blue-bg">
753
                                <i class="fa fa-chart-line"></i>
754
                                <h4 style="margin-top:-2px;margin-bottom:12px"><strong>#springMessage(
755
                                    "dashboard.sale")</strong>
756
                                    <span>   <a href="#videoModal" class="btn btn-danger" data-toggle="modal"
757
                                                data-src="GQziSgeI3ZM"><span
758
                                            class="glyphicon glyphicon-play-circle"></span> Play Video</a> </span>
759
 
760
 
761
                                </h4>
762
                                <div class="row">
763
                                    <div class="col-lg-4 row">
764
                                        <div style="margin-top:0px" class="count currency">$nf.format($salesMap.get(
765
                                            "lmtdSale"))</div>
766
                                        <div class="title">LMTD</div>
767
                                    </div>
768
                                    <div class="col-lg-4 row">
769
                                        <div style="margin-top:0px" class="count currency">$nf.format($salesMap.get(
770
                                            "mtdSale"))</div>
771
                                        <div class="title">MTD</div>
772
                                    </div>
773
                                    <div class="col-lg-3 row">
774
                                        <div style="margin-top:0px" class="count currency">$nf.format($salesMap.get(
775
                                            "todaySale"))</div>
776
                                        <div class="title">Today&apos;s</div>
777
                                    </div>
778
 
779
                                    <div class="col-lg-1 row" style="margin-left: -20px;margin-top: 20px;">
780
                                        <i class="fk_more fa fa-angle-double-down" id="blue-dropdown"
781
                                           style="cursor:pointer;font-size: 27px;width: 27px;height: 27px;margin-top: 0px;color: rgba(255, 255, 255, 0.75);line-height: 27px;"></i>
782
                                    </div>
783
                                </div>
784
 
785
                                <div class="row monthsaleContainer" style="margin:5px">
786
                                </div>
787
                            </div>
788
                        </div>
789
 
790
                        <div class="col-lg-5 row">
791
                            <div class="info-box brown-bg">
792
 
793
                                <div class="row">
794
                                    <div class="col-lg-6">
795
                                        <h4 style="margin-top:-2px;margin-bottom:3px"><strong>Current Rate</strong></h4>
796
                                        <div style="margin-top:0px" class="count">
797
                                            <span class="currency">$nf.format($salesMap.get("currentRate"))</span>/day
798
                                        </div>
799
                                        <img src="${salesMap.get('currentTypeImage')}" width="60px"
800
                                             class="target-slide1">
801
                                    </div>
802
                                    <div class="col-lg-6">
803
                                        <h4 style="margin-top:-2px;margin-bottom:3px"><strong>Reqd Rate</strong></h4>
804
                                        <div style="margin-top:0px" class="count currency">
805
                                            <span class="currency">$nf.format($salesMap.get("requiredRate"))</span>/day
806
                                        </div>
807
                                        <img src="${salesMap.get('requiredTypeImage')}" width="60px"
808
                                             class="target-slide1">
809
                                    </div>
810
                                </div>
811
                            </div>
812
                        </div>
813
                        <div class="col-lg-7">
814
                            <div class="info-box purple-bg">
815
                                <div class="col-lg-12 row">
816
                                    <i class="fa fa-coins"></i>
817
                                    <h4 style="margin-top:-2px;margin-bottom:12px"><strong>#springMessage(
818
                                        "dashboard.investment")</strong></h4>
819
                                    <div class="row">
820
                                        <div class="col-lg-3">
821
                                            <div class="row">
822
                                                <div style="margin-top:0px" class="count currency">$investments.get(
823
                                                    "today")</div>
824
                                                <div class="title">#springMessage("dashboard.current")</div>
825
                                                <div class="col-lg-1" style="margin-left: -20px;margin-top: -6px;">
826
                                                    <i class="fk_more fa fa-angle-double-down flash"
827
                                                       id="purple-dropdown"
828
                                                       style="cursor:pointer;font-size: 27px;width: 145px;height: 27px;margin-top: 0px;color: rgba(255, 255, 255, 0.75);line-height: 4px; margin-left: 25px;"></i>
829
                                                </div>
830
                                            </div>
831
                                        </div>
832
 
833
                                        <div class="col-lg-3">
834
                                            <div style="margin-top:0px" class="count">$investments.get("minimum")</div>
835
                                            <div class="title">min</div>
836
                                        </div>
837
                                        <div class="col-lg-3 row"
838
                                            #if(!$isInvestmentOk)
839
                                             style="color:red; background: white;"
840
                                            #end
841
                                        >
842
                                            #if($investments.get("short")<=0)
843
                                                <div style="margin-top:0px" class="count">100%</div>
844
                                                <div class="title">OK</div>
845
                                            #else
846
                                                <div style="margin-top:0px" class="count">$investments.get("short")%
847
                                                </div>
848
                                                <div class="title">short</div>
849
                                            #end
850
                                        </div>
851
                                    </div>
852
                                    <div class="row investmentContainer" style="margin:5px">
853
                                    </div>
854
                                </div>
855
                            </div>
856
                        </div>
857
                        <div class="col-lg-5 row">
37160 ranu 858
                            ## Scheme moved to full-width banner at the top of the dashboard.
859
                            ## This slot always shows the online-sales tile now.
34437 ranu 860
                                <div class="info-box orange-bg"
861
                                     style="background-image: linear-gradient(#ff7f50 ,orange); box-shadow: 6px 5px 6px #ff7f50;">
862
                                    <i class="fa fa-chart-line"></i>
863
                                    <h4 style="margin-top:-2px;margin-bottom:12px"><strong>#springMessage(
864
                                        "dashboard.onlinesale")</strong></h4>
865
                                    <div class="row">
866
                                        <div class="col-lg-3" style="margin:5px">
867
                                            <div style="margin-top:0px; margin-left:24px;"
868
                                                 class="count currency">$countOrder</div>
869
                                            <button class="btn-warning">
870
                                                <div class="title pending_order_dashboard"
871
                                                     style="cursor: pointer; color:black;">
872
                                                    #springMessage("dashboard.pendingorder")
873
                                                </div>
874
                                            </button>
875
                                        </div>
876
 
877
                                        <div class="col-lg-4 row" style="margin:5px">
878
                                            #if($onlineDeliveredOrderSum)
879
                                                <div style="margin-top:0px; margin-left:37px;"
880
                                                     class="count currency">$onlineDeliveredOrderSum</div>
881
                                            #else
882
                                                <div style="margin-top:0px; margin-left:20px;" class="count currency">
883
 
884
                                                </div>
885
                                            #end
886
                                            <button class="btn-warning">
887
                                                <div class="title total_sale_dashboard"
888
                                                     style="cursor: pointer; color:black;">Online Sales
889
                                                </div>
890
                                            </button>
891
                                        </div>
892
                                    </div>
893
                                </div>
894
                        </div>
895
                    </div>
896
 
897
 
898
                    <div class="row">
899
                        <div class="col-lg-9">
900
                            <div class="info-box pink-bg" style="height: 160px;">
901
                                <h4 style="margin-top:-2px;margin-bottom:12px"><strong>Order Summary</strong></h4>
902
 
903
                                <div class="col-lg-3 row">
904
                                    <h4 style="margin-top:-2px;margin-bottom:12px;"><strong
905
                                            style="font-size: 16px; cursor:pointer; margin-left: 9px;"
906
                                            class="pndg-status">Pending</strong></h4>
907
                                    #if($submittedCount && $submittedValue)
908
                                        <div class="col-lg-3">
909
                                            <div style="margin-top:0px" class="count currency">$submittedCount</div>
910
                                            <div class="title">Qty</div>
911
                                        </div>
912
                                        <div class="col-lg-4">
913
                                            <div style="margin-top:0px" class="count currency">$submittedValue</div>
914
                                            <div class="title" style="margin-left:5px;">Value</div>
915
                                        </div>
916
                                    #else
917
                                        <div class="col-lg-3">
918
                                            <div style="margin-top:0px" class="count currency">0</div>
919
                                            <div class="title">Qty</div>
920
                                        </div>
921
                                        <div class="col-lg-4">
922
                                            <div style="margin-top:0px" class="count currency">0</div>
923
                                            <div class="title" style="margin-left:5px;">Value</div>
924
                                        </div>
925
 
926
                                    #end
927
 
928
 
929
                                </div>
930
 
931
                                <div class="col-lg-3">
932
                                    <h4 style="margin-top:-2px;margin-bottom:12px"><strong
933
                                            style="font-size: 19px; cursor:pointer; margin-left: 15px;"
934
                                            class="billed-status">#springMessage("dashboard.billed")</strong></h4>
935
 
936
                                    #if($billedCount && $billedValue)
937
                                        <div class="col-lg-3">
938
                                            <div style="margin-top:0px" class="count currency">$billedCount</div>
939
                                            <div class="title">Qty</div>
940
                                        </div>
941
                                        <div class="col-lg-4">
942
                                            <div style="margin-top:0px" class="count currency">$billedValue</div>
943
                                            <div class="title" style="margin-left:5px;">Value</div>
944
                                        </div>
945
                                    #else
946
                                        <div class="col-lg-3">
947
                                            <div style="margin-top:0px" class="count currency">0</div>
948
                                            <div class="title">Qty</div>
949
                                        </div>
950
                                        <div class="col-lg-4">
951
                                            <div style="margin-top:0px" class="count currency">0</div>
952
                                            <div class="title" style="margin-left:5px;">Value</div>
953
                                        </div>
954
 
955
                                    #end
956
                                </div>
957
 
958
                                <div class="col-lg-3">
959
                                    <h4 style="margin-top:-2px;margin-bottom:12px"><strong
960
                                            style="font-size: 19px;  cursor:pointer; margin-left: 15px;"
961
                                            class="shipped-status">#springMessage("dashboard.dispatched")</strong></h4>
962
 
963
                                    #if($shippedCount && $shippedValue)
964
                                        <div class="col-lg-3">
965
                                            <div style="margin-top:0px" class="count currency">$shippedCount</div>
966
                                            <div class="title">Qty</div>
967
                                        </div>
968
                                        <div class="col-lg-4">
969
                                            <div style="margin-top:0px" class="count currency">$shippedValue</div>
970
                                            <div class="title" style="margin-left:5px;">Value</div>
971
                                        </div>
972
                                    #else
973
                                        <div class="col-lg-3">
974
                                            <div style="margin-top:0px" class="count">0</div>
975
                                            <div class="title">Qty</div>
976
                                        </div>
977
                                        <div class="col-lg-4">
978
                                            <div style="margin-top:0px" class="count">0</div>
979
                                            <div class="title" style="margin-left:5px;">Value</div>
980
                                        </div>
981
 
982
                                    #end
983
                                </div>
984
 
985
                                <div class="col-lg-3">
986
                                    <h4 style="margin-top:-2px;margin-bottom:12px"><strong
987
                                            style="font-size: 19px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;  cursor:pointer;"
988
                                            class="grn-status">#springMessage("dashboard.grnpending")</strong></h4>
989
 
990
                                    #if($grnPendingCount &&  $grnPendingValue )
991
                                        <div class="col-lg-3">
992
                                            <div style="margin-top:0px"
993
                                                 class="count currency">$grnPendingCount</div>
994
                                            <div class="title">Qty</div>
995
                                        </div>
996
                                        <div class="col-lg-4">
997
                                            <div style="margin-top:0px"
998
                                                 class="count currency">$grnPendingValue</div>
999
                                            <div class="title" style="margin-left:5px;">Value</div>
1000
                                        </div>
1001
                                    #else
1002
                                        <div class="col-lg-3">
1003
                                            <div style="margin-top:0px" class="count currency">0</div>
1004
                                            <div class="title">Qty</div>
1005
                                        </div>
1006
                                        <div class="col-lg-4">
1007
                                            <div style="margin-top:0px" class="count currency">0</div>
1008
                                            <div class="title" style="margin-left:5px;">Value</div>
1009
                                        </div>
1010
 
1011
                                    #end
1012
                                </div>
1013
                            </div>
1014
                        </div>
1015
                        <div class="col-lg-3 row" style="height: 190px;">
1016
                            <div class="info-box green-bg" style="min-height: 160px;">
1017
                                <i class="fa fa-cubes"></i>
1018
                                <div class="count currency">$investments.get("inStock")</div>
1019
                                <div class="title">#springMessage("dashboard.totalstock")</div>
1020
                            </div>
1021
                        </div>
1022
                    </div>
1023
                    <div class="row">
1024
 
1025
                        <div class="col-lg-8 partnerIncomeContainer"></div>
1026
 
1027
                        <div class="col-lg-4">
1028
                            <div class="info-box green-bg" style="height: 145px;">
1029
                                <h4 style="margin-top:-2px;margin-bottom:12px"><strong>#springMessage(
1030
                                    "dashboard.monthlytarget")</strong></h4>
1031
 
1032
                                <div class="col-lg-6">
1033
                                    <h4 style="margin-top:-2px;margin-bottom:12px;">
1034
                                        <strong style="cursor:pointer; margin-left: 9px;">Sale</strong>
1035
                                    </h4>
1036
                                    <div class="col-lg-6">
1037
                                        #if($monthlyTarget && $monthlyTarget.getSaleTarget() >0)
1038
                                            <div style="margin-top:0px"
1039
                                                 class="count currency">$monthlyTarget.getSaleTarget()</div>
1040
                                        #else
1041
                                            <div style="margin-top:0px" class="count currency">-</div>
1042
                                        #end
1043
                                    </div>
1044
                                </div>
1045
 
1046
                                <div class="col-lg-6">
1047
                                    <h4 style="margin-top:-2px;margin-bottom:12px;"><strong
1048
                                            style="font-size: 16px; cursor:pointer; margin-left: 9px;"
1049
                                    >#springMessage("dashboard.purchase")</strong></h4>
1050
                                    <div class="col-lg-6">
1051
                                        #if($monthlyTarget && $monthlyTarget.getPurchaseTarget() > 0)
1052
                                            <div style="margin-top:0px"
1053
                                                 class="count currency">$monthlyTarget.getPurchaseTarget()</div>
1054
 
1055
                                        #else
1056
                                            <div style="margin-top:0px" class="count currency"> -</div>
1057
 
1058
                                        #end
1059
                                    </div>
1060
                                </div>
1061
                            </div>
1062
 
1063
                        </div>
1064
                    </div>
1065
 
1066
                    <div class="row">
1067
                        <div class="Mobile">
1068
                            #foreach($brandStockPrice in $brandStockPrices)
1069
 
1070
                                <div class="col-lg-3">
1071
                                    <div class="card card-default">
1072
							<span class="card-body" style="padding-bottom:0px">
1073
								<table>
1074
									<thead>
1075
										<tr><td colspan="2">Current Stock</td></tr>
1076
									</thead>
1077
									<tbody>
1078
										<tr><th>Qty</th><td>$brandStockPrice.getTotalQty()pc</td></tr>
1079
										<tr><th>Value</th><td><span
1080
                                                class="currency">$brandStockPrice.getTotalValue()</span></td></tr>
1081
									</tbody>
1082
								</table>
1083
                                #if($brandStockPrice.getAgedValue()>0)
1084
                                    <p style="color:#d15a57;font-weight:700" title="Focus Stock">
1085
									<span class="currency">$brandStockPrice.getAgedValue()</span> / $brandStockPrice.getAgedQty()
1086
								</p>
1087
                                #else
1088
                                    <p>&nbsp;</p>
1089
                                #end
1090
							</span>
1091
                                        <span class="card-img" style="text-align:center">
1092
							<img src="${brandStockPrice.getBrandUrl()}" data-stockbrand="$brandStockPrice.getBrand()"
1093
                                 class="cover $brandStockPrice.getBrand()" id="stockcatalog"
1094
                                 class="$brandStockPrice.getBrand()">
1095
							</span></span>
1096
                                    </div>
1097
                                </div>
1098
                            #end
1099
                        </div>
1100
                        <div class="row">
1101
 
1102
                            <div class="col-lg-3">
1103
                                <div class="card card-default">
1104
							<span class="card-body" style="padding-bottom:38px;">
1105
								<table>
1106
									<thead>
1107
										<tr><td colspan="2">Current Stock</td></tr>
1108
									</thead>
1109
									<tbody>
1110
										<tr><th>Value</th><td><span class="currency">$accesoriesStock</span></td></tr>
1111
									</tbody>
1112
								</table>
1113
							</span>
1114
                                    <span class="card-img">
1115
								<img src="resources/images/accessories.jpg" id="accesoriesStock"
1116
                                     class="accesoriesClass">
1117
							</span>
1118
                                </div>
1119
                            </div>
1120
 
1121
                        </div>
1122
                    </div>
1123
 
1124
 
1125
                </div>
1126
 
1127
                <div class="col-lg-6">
1128
                    <div class="row">
1129
 
1130
                        <div class="form-group">
1131
                            <label class="control-label col-lg-4" for="months">#springMessage(
1132
                                "dashboard.offerforthemonth")</label>
1133
                            <div class="col-lg-2">
1134
                                <select class="form-control input-sm" id="mk_offer_brand_filter" name="offerBrandFilter"
1135
                                        placeholder="brand" style="margin:auto;">
1136
                                    <option value="" disabled selected>Select Brand</option>
1137
                                    <option value="">All</option>
1138
                                    #foreach($brand in $brands)
1139
                                        <option value="$brand">$brand</option>
1140
                                    #end
1141
                                </select>
1142
                            </div>
1143
                            <div class="col-lg-4">
1144
                                <select class="form-control input-sm" id="offer-months" name="months"
1145
                                        placeholder="months" style="margin:auto;">
1146
                                    <option value="" disabled selected>Month</option>
1147
                                    #foreach($mVM in $monthValueMap.entrySet())
1148
                                        #if($mVM.getKey()== $month )
1149
                                            <option value="$mVM.getKey()" selected>$mVM.getValue()</option>
1150
                                        #else
1151
                                            <option value="$mVM.getKey()">$mVM.getValue()</option>
1152
                                        #end
1153
                                    #end
1154
                                </select>
1155
                            </div>
1156
                            <div class="col-lg-2">
1157
                                <!--Training Video -->
1158
                                <a href="#videoModal" class="btn btn-danger" data-toggle="modal"
1159
                                   data-src="Nv7J2L_BPCU"><span
1160
                                        class="glyphicon glyphicon-play-circle"></span> Play Video</a>
1161
                            </div>
1162
                        </div>
1163
                    </div>
1164
                    <div id="offer-container">
1165
                        #parse("published-offers.vm")
1166
                    </div>
1167
                    <div class="offer-margin-container">
1168
                        <div class="modal  text-center" id="offerDescription">
1169
                            <div class="modal-dialog modal-lg modal-dialog-scrollable">
1170
                                <div class="modal-content">
1171
                                </div>
1172
                            </div>
1173
                        </div>
1174
                    </div>
1175
 
1176
                    <div class="row col-lg-12 info-box white-bg" id="performanceContainer">
1177
                        #parse("performance.vm")
1178
                    </div>
1179
                    <!--<div class="row col-lg-12 info-box white-bg" id="performanceContainer">
1180
                        ##parse("performance-weekly.vm")
1181
                    </div>-->
1182
                    #if($activatedImeis > 0)
1183
                        <div class="row col-lg-12 info-box white-bg">
34525 ranu 1184
                            #parse("analysis-dashboard-activated-imeis.vm")
34437 ranu 1185
                        </div>
1186
                    #end
1187
                    #if($imeiActivationPendingCount > 0)
1188
                        <div class="row col-lg-12 info-box white-bg">
1189
                            #parse("dashboard-grn-pending-activated-imeis.vm")
1190
                        </div>
1191
                    #end
1192
                    <div class="row col-lg-12">
1193
                        <ul class="nav nav-tabs">
34528 ranu 1194
                            <li class="analysis_bar_chart" data-fofoid="$fofoId"><a class="ba">Sale</a></li>
1195
                            <li class="analysis_lms_line_chart" data-fofoid="$fofoId"><a class="la">#springMessage(
1196
                                "dashboard.monthlysale")</a></li>
1197
                            <li class="analysis_purchase_line_chart" data-fofoid="$fofoId"><a class="pa">#springMessage(
34437 ranu 1198
                                "dashboard.monthlypurchase")</a></li>
34528 ranu 1199
                            <li class="analysis_priceDrop_chart" data-fofoid="$fofoId"><a class="pd">#springMessage(
1200
                                "dashboard.pricedrop")</a></li>
1201
                            <li class="analysis_pending_activation_chart" data-fofoid="$fofoId"><a class="pac">Pending
1202
                                Activation</a></li>
34437 ranu 1203
 
1204
                        </ul>
1205
                        <div style="float:left;margin-top: 2% ; font-size: 20px ;margin-left: 5%" id="dateRangeDiv">
1206
                            From:
1207
                            <input type="date" name="from" id="chartForm" value="">
1208
                            To:
1209
                            <input type="date" name="to" id="chartTo" value="">
1210
 
1211
                            <select name="quantityType" id="quantity_type_id">
1212
                                <option value="false" selected>Value</option>
1213
                                <option value="true">Quantity</option>
1214
                            </select>
34528 ranu 1215
                            <button id="analysis_viewSaleBarChart" data-fofoid="$fofoId" class="btn-success">
34437 ranu 1216
                                Veiw Chart
1217
                            </button>
1218
                        </div>
1219
                        <br>
1220
                        <div class="row ChartContainer" style="margin:5px;margin-top: 4%">
1221
 
1222
                        </div>
1223
 
1224
 
1225
                    </div>
1226
                    <div class="clearfix"></div>
1227
                    <div class="model_charbar_container">
1228
 
1229
                    </div>
1230
 
1231
 
1232
                </div>
1233
            </div>
1234
            </div>
1235
        </section>
1236
        <div class="text-center">
1237
            <div id="like_button_container"></div>
1238
            <div class="credits">
1239
                <p>All rights reserved.&copy;2017, Smart Dukaan</p>
1240
            </div>
1241
        </div>
1242
 
1243
    </section>
34528 ranu 1244
    <div class="modal fade" id="modelChartModal" tabindex="-1" role="dialog"
1245
         aria-labelledby="modelChartModalLabel" aria-hidden="true">
1246
        <div class="modal-dialog modal-xl" role="document"> <!-- modal-lg for large modal -->
1247
            <div class="modal-content">
1248
                <div class="modal-header">
1249
                    <h3 class="modal-title" id="modelChartModalLabel">Model-wise Chart
1250
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
1251
                            <span aria-hidden="true">&times;</span>
1252
                        </button>
1253
                    </h3>
1254
                </div>
1255
                <div class="modal-body model_charbar_container">
1256
                    <!-- Chart will be injected here -->
1257
                </div>
1258
            </div>
1259
        </div>
1260
    </div>
34437 ranu 1261
    <script type="text/javascript">
1262
        context = "${rc.contextPath}";
1263
        webApiScheme = "$webApiScheme";
1264
        webApiRoot = "$webApiRoot";
1265
        webApiHost = "$webApiHost";
1266
        webApiPort = "$webApiPort";
1267
    </script>
1268
    #parse("include-scripts.vm")
1269
 
1270
    <script type="text/javascript">
1271
        $(document).ready(function () {
1272
            $("#offerDescription").modal({backdrop: "static", keyboard: true, focus: true, show: false});
1273
            var salesCloseFlag = true;
1274
            $("#blue-dropdown").click(function () {
1275
                // console.log("clicked");
1276
                if (salesCloseFlag) {
1277
                    var containerWidth = $(".blue-bg").width()
1278
                    doGetAjaxRequestHandler(context + "/getMonthSale", function (response) {
1279
                        $('.monthsaleContainer').html(response);
1280
 
1281
                        $(".blue-bg").css({"position": "absolute", "z-index": "10"}).width(containerWidth);
1282
                    });
1283
                } else {
1284
                    $(".blue-bg").removeAttr('style');
1285
                    $('.monthsaleContainer').html('');
1286
                }
1287
                salesCloseFlag = !salesCloseFlag;
1288
            });
1289
 
34528 ranu 1290
            $(".analysis_bar_chart").click();
34437 ranu 1291
 
1292
            var month = 0;
1293
            doGetAjaxRequestHandler(context + "/partnerTotalIncomeByMonth/" + month, function (response) {
1294
                console.log(response);
1295
                $(".partnerIncomeContainer").html(response);
1296
            });
1297
 
1298
            var investmentCloseFlag = true;
1299
            $("#purple-dropdown").click(function () {
1300
                console.log('hello');
1301
                $(".flash").stop();
1302
                // console.log("clicked");
1303
                if (investmentCloseFlag) {
1304
                    var containerWidth = $(".purple-bg").width()
1305
                    doGetAjaxRequestHandler(context + "/investmentDetails", function (response) {
1306
                        $('.investmentContainer').html(response);
1307
                        $(".purple-bg").css({"position": "absolute", "z-index": "10"}).width(containerWidth);
1308
                    });
1309
                } else {
1310
                    $(".purple-bg").removeAttr('style');
1311
                    $('.investmentContainer').html('');
1312
                }
1313
                investmentCloseFlag = !investmentCloseFlag;
1314
            });
1315
        });
1316
 
1317
        function sleep(delay) {
1318
            var start = new Date().getTime();
1319
            while (new Date().getTime() < start + delay) ;
1320
        }
1321
 
34528 ranu 1322
        $(document).on("click", ".analysis_priceDrop_chart",
34437 ranu 1323
                function () {
1324
                    $(".pd").css("color", "blue");
1325
                    $(".pd").css("background-color", "white");
1326
                    $(".ba").css("color", "white");
1327
                    $(".ba").css("background-color", "#C0C0C0");
1328
                    $(".pa").css("color", "white");
1329
                    $(".pa").css("background-color", "#C0C0C0");
1330
                    $(".la").css("color", "white");
1331
                    $(".la").css("background-color", "#C0C0C0");
1332
 
1333
                    $(".pac").css("color", "white");
1334
                    $(".pac").css("background-color", "#C0C0C0");
1335
 
1336
 
1337
                    $(".puo").css("color", "white");
1338
                    $(".puo").css("background-color", "#C0C0C0");
1339
 
34528 ranu 1340
                    var fofoId = $(this).data("fofoid")
34437 ranu 1341
                    sleep(500);
34528 ranu 1342
                    doGetAjaxRequestHandler(context + "/getMonthlyPriceDrop?fofoId=" + fofoId, function (response) {
34437 ranu 1343
 
1344
                        $('.ChartContainer').html(response);
1345
                    });
1346
                });
1347
 
1348
 
34528 ranu 1349
        $(document).on("click", ".analysis_pending_activation_chart",
34437 ranu 1350
                function () {
1351
                    $(".pac").css("color", "blue");
1352
                    $(".pac").css("background-color", "white");
1353
 
1354
                    $(".pd").css("color", "white");
1355
                    $(".pd").css("background-color", "#C0C0C0");
1356
                    $(".ba").css("color", "white");
1357
                    $(".ba").css("background-color", "#C0C0C0");
1358
                    $(".pa").css("color", "white");
1359
                    $(".pa").css("background-color", "#C0C0C0");
1360
                    $(".la").css("color", "white");
1361
                    $(".la").css("background-color", "#C0C0C0");
1362
 
1363
                    $(".puo").css("color", "white");
1364
                    $(".puo").css("background-color", "#C0C0C0");
34528 ranu 1365
                    var fofoId = $(this).data("fofoid")
34437 ranu 1366
                    sleep(500);
34528 ranu 1367
                    doGetAjaxRequestHandler(context + "/getMonthlyActivation?fofoId=" + fofoId, function (response) {
34437 ranu 1368
 
1369
                        $('.ChartContainer').html(response);
1370
                    });
1371
                });
1372
 
34528 ranu 1373
        $(document).on("click", ".analysis_purchase_line_chart",
34437 ranu 1374
                function () {
1375
                    $(".pa").css("color", "blue");
1376
                    $(".pa").css("background-color", "white");
1377
                    $(".ba").css("color", "white");
1378
                    $(".ba").css("background-color", "#C0C0C0");
1379
                    $(".pd").css("color", "white");
1380
                    $(".pd").css("background-color", "#C0C0C0");
1381
                    $(".la").css("color", "white");
1382
                    $(".la").css("background-color", "#C0C0C0");
1383
 
1384
                    $(".pac").css("color", "white");
1385
                    $(".pac").css("background-color", "#C0C0C0");
1386
 
1387
                    $(".puo").css("color", "white");
1388
                    $(".puo").css("background-color", "#C0C0C0");
34528 ranu 1389
                    var fofoId = $(this).data("fofoid")
1390
                    doGetAjaxRequestHandler(context + "/getMonthlyPurchaseLineChart?fofoId=" + fofoId, function (response) {
34437 ranu 1391
                        $('.ChartContainer').html(response);
1392
                    });
1393
                });
1394
 
34528 ranu 1395
        $(document).on("click", ".analysis_lms_line_chart",
34437 ranu 1396
                function () {
1397
 
1398
                    $(".ba").css("color", "white");
1399
                    $(".ba").css("background-color", "#C0C0C0");
1400
                    $(".pa").css("color", "white");
1401
                    $(".pa").css("background-color", "#C0C0C0");
1402
                    $(".la").css("color", "blue");
1403
                    $(".la").css("background-color", "white");
1404
                    $(".pd").css("color", "white");
1405
                    $(".pd").css("background-color", "#C0C0C0");
1406
 
1407
                    $(".pac").css("color", "white");
1408
                    $(".pac").css("background-color", "#C0C0C0");
1409
 
1410
                    $(".puo").css("color", "white");
1411
                    $(".puo").css("background-color", "#C0C0C0");
34528 ranu 1412
                    var fofoId = $(this).data("fofoid")
1413
                    doGetAjaxRequestHandler(context + "/getlmsLineChart?fofoId=" + fofoId, function (response) {
34437 ranu 1414
                        $('.ChartContainer').html(response);
1415
                    });
1416
                });
1417
 
34528 ranu 1418
        $(document).on("click", ".analysis_bar_chart",
34437 ranu 1419
                function () {
1420
                    $(".ba").css("color", "blue");
1421
                    $(".ba").css("background-color", "white");
1422
                    $(".la").css("color", "white");
1423
                    $(".la").css("background-color", "#C0C0C0");
1424
                    $(".pa").css("color", "white");
1425
                    $(".pa").css("background-color", "#C0C0C0");
1426
                    $(".pd").css("color", "white");
1427
                    $(".pd").css("background-color", "#C0C0C0");
1428
 
1429
                    $(".pac").css("color", "white");
1430
                    $(".pac").css("background-color", "#C0C0C0");
1431
 
1432
                    $(".puo").css("color", "white");
1433
                    $(".puo").css("background-color", "#C0C0C0");
1434
 
34528 ranu 1435
                    var fofoId = $(this).data("fofoid")
1436
                    doGetAjaxRequestHandler(context + "/analysis/getBarChart?fofoId=" + fofoId, function (response) {
34437 ranu 1437
                        $('.ChartContainer').html(response);
1438
                    });
1439
                });
1440
 
1441
 
1442
        $(document).on("click", ".pending_upgrade_offer",
1443
                function () {
1444
 
1445
                    $(".puo").css("color", "blue");
1446
                    $(".puo").css("background-color", "white");
1447
 
1448
                    $(".ba").css("color", "white");
1449
                    $(".ba").css("background-color", "#C0C0C0");
1450
                    $(".la").css("color", "white");
1451
                    $(".la").css("background-color", "#C0C0C0");
1452
                    $(".pa").css("color", "white");
1453
                    $(".pa").css("background-color", "#C0C0C0");
1454
                    $(".pd").css("color", "white");
1455
                    $(".pd").css("background-color", "#C0C0C0");
1456
 
1457
                    $(".pac").css("color", "white");
1458
                    $(".pac").css("background-color", "#C0C0C0");
1459
 
1460
                    doGetAjaxRequestHandler(context + "/getMonthlySamsungUpgradeOffer", function (response) {
1461
                        $('.ChartContainer').html(response);
1462
                    });
1463
                });
1464
 
1465
 
35675 amit 1466
        $(document).on("click", ".description-offer",
34437 ranu 1467
                function (e) {
1468
                    var offerid = $(this).data('offerid');
1469
                    console.log(offerid);
1470
                    doGetAjaxRequestHandler(context + "/getOfferMargins?offerId="
1471
                            + offerid, function (response) {
1472
                        $('.offer-margin-container .modal-content').html(response);
1473
                        $("#offerDescription").modal('handleUpdate');
1474
                        $("#offerDescription").modal('show');
1475
                    });
1476
                });
1477
 
1478
 
1479
        $(document).on("click", ".cancel-description",
1480
                function (e) {
1481
                    $("#descriptionMenu").empty();
1482
                });
1483
 
1484
 
1485
        $(document).on("click", "#cancel-model", function (e) {
1486
            $("#descriptionMenu").empty();
1487
        });
1488
 
1489
        $(document).on('change', "#month-wise-total-income", function () {
1490
 
1491
            var month = $(this).val();
1492
            console.log(month);
1493
 
1494
            doGetAjaxRequestHandler(context + "/partnerTotalIncomeByMonth/" + month, function (response) {
1495
                console.log(response);
1496
                $(".partnerIncomeContainer").html(response);
1497
            });
1498
        });
1499
 
1500
 
1501
        $(document).on('change', "#performance-months", function () {
1502
 
1503
            var month = $("#performance-months").val();
1504
            console.log(month);
1505
 
1506
            doGetAjaxRequestHandler(context + "/getMonthsInvestment?month=" + month, function (response) {
1507
                console.log(response);
1508
                $("#performanceContainer").html(response);
1509
 
1510
            });
1511
        });
1512
 
1513
 
1514
        $(document).on('change', "#offer-months,#mk_offer_brand_filter", function () {
1515
            var monthSearch = $('#offer-months').val();
1516
            var brandFilter = $('#mk_offer_brand_filter').val();
1517
            console.log("monthSearch - ", monthSearch)
1518
            console.log("brandFilter - ", brandFilter)
1519
            var url;
1520
            if (!brandFilter) {
1521
                url = `${context}/published-offers?yearMonth=${monthSearch}`;
1522
            } else {
1523
                url = `${context}/published-offers?yearMonth=${monthSearch}&brandFilter=${brandFilter}`;
1524
            }
1525
            console.log("url - ", url);
1526
            doGetAjaxRequestHandler(url, function (response) {
1527
                $("#offer-container").html(response);
1528
            });
1529
        });
1530
 
1531
 
1532
        $(document).on("click", ".pndg-status", function () {
1533
            console.log("Hello");
1534
            pendingOrderStatus("main-content");
1535
        });
1536
 
1537
        function pendingOrderStatus(domId) {
1538
            doGetAjaxRequestHandler(context + "/getPendingOrderStatus", function (response) {
1539
                console.log(response);
1540
                $('#' + domId).html(response);
1541
            });
1542
        }
1543
 
1544
        $(document).on("click", ".billed-status", function () {
1545
            console.log("Hello");
1546
            billedOrderStatus("main-content");
1547
        });
1548
 
1549
        function billedOrderStatus(domId) {
1550
            doGetAjaxRequestHandler(context + "/getBilledOrderStatus", function (response) {
1551
                console.log(response);
1552
                $('#' + domId).html(response);
1553
            });
1554
        }
1555
 
1556
        $(document).on("click", ".shipped-status", function () {
1557
            console.log("Hello");
1558
            shippedOrderStatus("main-content");
1559
        });
1560
 
1561
        function shippedOrderStatus(domId) {
1562
            doGetAjaxRequestHandler(context + "/getShippedOrderStatus", function (response) {
1563
                console.log(response);
1564
                $('#' + domId).html(response);
1565
            });
1566
        }
1567
 
1568
        $(document).on("click", ".grn-status", function () {
1569
            console.log("Hello");
1570
            grnOrderStatus("main-content");
1571
        });
1572
 
1573
        function grnOrderStatus(domId) {
1574
            doGetAjaxRequestHandler(context + "/getGrnPendingOrderStatus", function (response) {
1575
                console.log(response);
1576
                $('#' + domId).html(response);
1577
            });
1578
        }
1579
 
1580
        function lastMonthCreditIncome(domId) {
1581
            let monthVal = $("#month-wise-total-income").val();
1582
            doGetAjaxRequestHandler(`${context}/monthWisePartnerIncome/${monthVal}`, function (response) {
1583
                console.log(response);
1584
                $('#' + domId).html(response);
1585
            });
1586
        }
1587
 
1588
        $(document).on("click", ".pending-income", function () {
1589
            console.log("Hello");
1590
            lastMonthCreditIncome("main-content");
1591
        });
1592
 
1593
        $(document).on("click", ".total-income-calc", function () {
1594
            console.log("Hello");
1595
            lastMonthCreditIncome("main-content");
1596
        });
1597
 
1598
 
1599
    </script>
1600
    <script>
1601
 
1602
        //knob
1603
        $(function () {
1604
            /*$(".knob").knob({
1605
              'draw' : function () {
1606
                $(this.i).val(this.cv + '%')
1607
              }
1608
            });*/
1609
            $.fn.dataTable.moment('DD/MM/YYYY');
1610
            $.fn.dataTable.moment('DD/MM/YYYY hh:mm');
1611
            $('.currency').each(function (index, ele) {
1612
                if (!isNaN(parseInt($(ele).html()))) {
1613
                    $(ele).html(numberToComma($(ele).html()));
1614
                }
1615
            });
1616
        });
1617
 
1618
        $(function () {
1619
            var profile = localStorage.getItem('profile');
1620
            if (profile) {
1621
                $("#photo").attr("src", JSON.parse(profile).image_url);
1622
                $("#fofo_name").text(JSON.parse(profile).name);
1623
            } else {
1624
                $("#photo").attr("src", "");
1625
                $("#fofo_name").text("Welcome, User");
1626
            }
1627
        });
1628
 
1629
        $(function () {
1630
            var bag = localStorage.getItem('bag');
1631
            console.log(bag);
1632
            if (bag) {
1633
                console.log("yes");
1634
                //$("#cart_bar").find('span').text(10);
1635
                $("#cart_bar").find('span').text(Object.keys(JSON.parse(bag)).length);
1636
            } else {
1637
                $("#cart_bar").find('span').text(0);
1638
            }
1639
        });
1640
 
1641
        $("#logout").click(function () {
1642
            localStorage.profile = undefined;
1643
        });
1644
            #set($partnerInvestment = $investments.get("investment"))
1645
        saleAmount = numberToComma($partnerInvestment.getSalesAmount());
1646
        minimumInvestmentAmount = numberToComma($partnerInvestment.getMinInvestment());
1647
        totalInvestedAmount = numberToComma($partnerInvestment.getTotalInvestment());
1648
        shortPercentage = numberToComma($partnerInvestment.getShortPercentage());
1649
        grnPendingStockAmount = numberToComma($partnerInvestment.getGrnPendingAmount());
1650
        unbilledStockAmount = numberToComma($partnerInvestment.getUnbilledAmount());
1651
        inStockAmount = numberToComma($partnerInvestment.getInStockAmount());
1652
        walletAmount = numberToComma($partnerInvestment.getWalletAmount());
1653
        shortAmount = numberToComma($partnerInvestment.getShortInvestment());
1654
        minAmountToBeAdded = numberToComma($partnerInvestment.getMinAmountToBeAdded());
1655
        isInvestmentOk = $isInvestmentOk;
1656
        starTotal = 5;
1657
        /*ratings = {
1658
            current: $currentMonthRating,
1659
            last: $lastMonthRating,
1660
            tilldate: $ratingTillDate
1661
        };
1662
        for (const rating in ratings) {
1663
            // 2
1664
            const starPercentage = (ratings[rating] / starTotal) * 100;
1665
            // 3
1666
            const starPercentageRounded = `${starPercentage}%`;
1667
            // 4
1668
            document.querySelector(`.${rating} .stars-inner`).style.width = starPercentageRounded;
1669
        }*/
1670
 
1671
        hasGift =$hasGift;
1672
        giftItemId = $giftItemId;
1673
        monthDays =$monthDays;
1674
        dayOfMonth = $dayOfMonth;
1675
 
1676
        function showAttendanceModal() {
1677
            var today = new Date().getTime();
1678
            if ($.cookie("punchIn") == undefined) {
1679
                document.cookie = "punchIn=" + today;
1680
            }
1681
            if (today >= parseInt($.cookie("punchIn"))) {
1682
                doGetAjaxRequestHandler(context + "/getPunchInOutForModel", function (response) {
1683
                    if (response == 'true') {
1684
                        $('#punchInOutModal').modal('hide');
1685
                        clearInterval(stopInterval);
1686
                    } else {
1687
                        $("#punch-in-out-model").html(response);
1688
                        $('#punchInOutModal').modal('show');
1689
                        var time = today + 30 * 60 * 1000
1690
                        document.cookie = "punchIn=" + time;
1691
                    }
1692
                });
1693
            }
1694
        }
1695
 
1696
        var stopInterval;
1697
        $(document).ready(function () {
1698
            stopInterval = setInterval(showAttendanceModal, 100000000);
1699
 
1700
            $('div.message-filter').on('click', 'button', function () {
1701
 
1702
                messageType = $(this).data("messagetype");
1703
                notifyTypeChange(messageType, $(this));
1704
 
1705
            });
1706
        });
1707
 
1708
 
1709
        $(function () {
1710
            if (navigator.geolocation) {
1711
                navigator.geolocation.getCurrentPosition(showPosition);
1712
            } else {
1713
                console.log("Geolocation is not supported by browser.");
1714
            }
1715
            loaderDialogObj = bootbox.dialog({
1716
                message: '<div class="container text-center"><i class="fa fa-spin fa-spinner"></i>Loading...</div>',
1717
                show: false
1718
            });
1719
 
1720
            /* Assign empty url value to the iframe src attribute when
1721
                modal hide, which stop the video playing */
1722
            $("#videoModal").on('hide.bs.modal', function () {
1723
                $("#trainingVideo").attr('src', '');
1724
            });
1725
 
1726
            /* Assign the initially stored url back to the iframe src
1727
            attribute when modal is displayed again */
1728
            $("#videoModal").on('show.bs.modal', function (event) {
1729
                let button = $(event.relatedTarget);
1730
                let youtubeUrl = button.data("src");
1731
                $("#trainingVideo").attr('src', `//www.youtube.com/embed/${youtubeUrl}?autoplay=1`);
1732
            });
1733
 
1734
        });
1735
    </script>
1736
    <div id="punchInOutModal" class="modal" role="dialog">
1737
        <div class="modal-dialog">
1738
 
1739
            <!-- Modal content-->
1740
            <div class="modal-content">
1741
                <div class="modal-header">
1742
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
1743
                    <h4 class="modal-title">Punch In Out</h4>
1744
                </div>
1745
                <div class="modal-body">
1746
                    <div id="punch-in-out-model">
1747
 
1748
                    </div>
1749
                </div>
1750
            </div>
1751
        </div>
1752
    </div>
1753
</section>
1754
</body>
1755
 
1756
<!-- Modal HTML -->
1757
<div id="videoModal" class="modal fade">
1758
    <div class="modal-dialog">
1759
        <div class="modal-content">
1760
            <div class="modal-body">
1761
                <div class="embed-responsive embed-responsive-16by9">
35620 vikas 1762
                    <iframe id="trainingVideo" referrerpolicy="strict-origin-when-cross-origin" class="embed-responsive-item" width="560" height="315"
34437 ranu 1763
                            allowfullscreen allow="autoplay"></iframe>
1764
                </div>
1765
            </div>
1766
        </div>
1767
    </div>
1768
</div>
1769
</html>
1770
<style>
1771
 
1772
 
1773
    .popover2 {
1774
        min-width: 30em;
1775
        height: 410px;
1776
        overflow: auto;
1777
        padding: 8px 5px;
1778
        overflow-x: hidden;
1779
 
1780
    }
1781
 
1782
    .popover1 {
1783
        min-width: 30em;
1784
 
1785
 
1786
    }
1787
 
1788
    .mark {
1789
        font-size: 13px;
1790
        padding: 5px 6px;
1791
        border: solid 3px red;
1792
        margin-bottom: -14px;
1793
        color: red;
1794
 
1795
    }
1796
 
1797
    .mark.btn-pressed {
1798
        color: black;
1799
        background: white;
1800
        font-size: 17px;
1801
        border-radius: 3px;
1802
        border: solid 2px black;
1803
    }
1804
 
1805
    .price {
1806
        padding: 5px 6px;
1807
        font-size: 13px;
1808
        border: solid 1px black;
1809
        border: solid 3px red;
1810
        margin-bottom: -14px;
1811
        color: red;
1812
 
1813
    }
1814
 
1815
    .price.btn-pressed {
1816
        color: black;
1817
        background: white;
1818
        font-size: 17px;
1819
        border: solid 2px black;
1820
    }
1821
 
1822
    .schem {
1823
        color: red;
1824
        padding: 5px 6px;
1825
        font-size: 13px;
1826
        border: solid 3px red;
1827
        margin-bottom: -14px;
1828
 
1829
    }
1830
 
1831
    .schem.btn-pressed {
1832
        color: black;
1833
        background: white;
1834
        font-size: 17px;
1835
        border: solid 2px black;
1836
    }
1837
 
1838
    .notify-messages {
1839
        min-height: 65px;
1840
    }
1841
 
1842
    .notifi {
1843
        padding: 5px 6px;
1844
        font-size: 13px;
1845
        margin-bottom: -14px;
1846
 
1847
        color: red;
1848
        border: solid 3px red;
1849
    }
1850
 
1851
    .notifi.btn-pressed {
1852
        color: black;
1853
        font-size: 17px;
1854
        border: solid 2px black;
1855
        background: white;
1856
    }
1857
 
1858
    #offer-container {
1859
        overflow-y: auto;
1860
        max-height: 367px;
1861
    }
1862
 
1863
 
1864
    canvas {
1865
        -moz-user-select: none;
1866
        -webkit-user-select: none;
1867
        -ms-user-select: none;
1868
    }
1869
</style>
1870
</script>
1871
 
1872
 
1873
<script type="text/javascript">
1874
    window.onload = function () {
1875
        if (window.innerWidth < 1920) document.body.style.zoom = "80%";
1876
        var options = $chartMap;
1877
        var ctx = document.getElementById('barchart').getContext('2d');
1878
        window.bar = new Chart1(ctx, options);
1879
    };
1880
</script>
1881
 
1882
 
1883
<script>
1884
    function makeAjaxRequest() {
1885
        $.ajax({
1886
            url: 'https://partners.smartdukaan.com/psi/auth-endpoint',
1887
            method: 'GET',
1888
            dataType: 'xml', // Assuming the response is in XML format
1889
            success: function (responseXml) {
1890
                var responseUrl = $(responseXml).find('response').text();
1891
                if (responseUrl) {
1892
                    // Open a new tab with the response URL
1893
                    window.open(responseUrl, '_blank');
1894
                } else {
1895
                    console.error('Response URL not found in the XML');
1896
                }
1897
            },
1898
            error: function (jqXHR, textStatus, errorThrown) {
1899
                console.error('AJAX Request Failed:', textStatus, errorThrown);
1900
            }
1901
        });
1902
    }
1903
 
1904
 
34528 ranu 1905
    $(document).on('click', '#analysis_viewSaleBarChart', function () {
1906
        let partnerId = $(this).data("fofoid");
34437 ranu 1907
        let from = $('#chartForm').val();
1908
        let to = $('#chartTo').val();
1909
        let quantity_type = $('select[name="quantityType"]').val();
1910
        console.log("from - ", from);
1911
        console.log("to - ", to);
1912
        console.log("tquantity_typeo - ", quantity_type);
34528 ranu 1913
        console.log("fofoId - ", partnerId);
34437 ranu 1914
 
34528 ranu 1915
        doGetAjaxRequestHandler(`${context}/analysis/getBarChart?fofoId=${partnerId}&from=${from}&to=${to}&isQuantity=${quantity_type}`, function (response) {
34437 ranu 1916
            console.log("res - ", response);
1917
            $('.model_charbar_container').html("");
1918
            $('.ChartContainer').html(response);
1919
        });
1920
    });
1921
</script>