Subversion Repositories SmartDukaan

Rev

Rev 34392 | Rev 34890 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
25979 tejbeer 1
<script type="text/javascript">
30601 amit.gupta 2
    $(function () {
27605 tejbeer 3
 
30601 amit.gupta 4
        var object = {
5
            timePicker: true,
6
            locale: {
7
                format: 'DD/MM/YYYY hh A'
8
            }
9
        };
28200 tejbeer 10
 
30601 amit.gupta 11
        $('input[name="scheduleTime"]').daterangepicker(
12
                $.extend(getSingleDatePicker(), object));
28200 tejbeer 13
 
30601 amit.gupta 14
        $('input[name="editScheduleTime"]').daterangepicker(
15
                $.extend(getSingleDatePicker(), object));
16
    });
25979 tejbeer 17
 
30601 amit.gupta 18
    $(".lead-request").click(function () {
19
        $("#newEntryLeadModal").modal({
20
            backdrop: false
21
        });
28200 tejbeer 22
 
30601 amit.gupta 23
    });
28200 tejbeer 24
 
30601 amit.gupta 25
    $(".lead-edit-request").click(function () {
26
        $("#editLeadData").modal({
27
            backdrop: false
28
        });
28200 tejbeer 29
 
30601 amit.gupta 30
    });
28200 tejbeer 31
 
30601 amit.gupta 32
    $('#statusFilter').multiselect({
33
        includeSelectAllOption: true,
34
        multiple: true,
35
        maxHeight: 200,
36
        buttonWidth: '180px',
37
        numberDisplayed: 1,
38
        nonSelectedText: 'Status',
39
        nSelectedText: ' - Status Selected',
40
        allSelectedText: 'All Status Selected',
41
        enableFiltering: true,
42
        enableCaseInsensitiveFiltering: true
43
    });
28200 tejbeer 44
 
30601 amit.gupta 45
    $('#colorFilter').multiselect({
46
        includeSelectAllOption: true,
47
        multiple: true,
48
        maxHeight: 200,
49
        buttonWidth: '180px',
50
        numberDisplayed: 1,
51
        nonSelectedText: 'Color Status',
52
        nSelectedText: ' - Color Selected',
53
        allSelectedText: 'All Status Selected',
54
        enableFiltering: true,
55
        enableCaseInsensitiveFiltering: true
56
    });
25979 tejbeer 57
</script>
58
 
59
 
60
<section class="wrapper">
30601 amit.gupta 61
    <div class="row">
62
        <div class="col-lg-12">
63
            <h3 class="page-header">
64
                <i class="icon_document_alt"></i>LEAD DASHBOARD
65
            </h3>
66
            <ol class="breadcrumb">
67
                <li><i class="fa fa-home"></i><a
68
                        href="${rc.contextPath}/dashboard">Home</a></li>
69
                <li><i class="icon_document_alt"></i>Lead</li>
70
                <li>
71
                    <button class="btn btn-primary newLead" data-toggle="modal"
72
                            data-target="#newEntryLeadModal" type="button">New
73
                    </button>
74
                </li>
75
            </ol>
76
        </div>
77
    </div>
28200 tejbeer 78
 
30601 amit.gupta 79
    <table style="Width: 100%">
80
        <tr>
81
            <td align="left" style="Width: 20%">
82
                <div class="row">
83
                    <div class="col-lg-2 form-group" style="width: 12%;">
84
                        <select id="statusFilter" name="statusFilter" placeholder="Status"
85
                                class="form-control input-sm">
86
                            <option value="" disabled selected>Status</option> #foreach($ls
87
                        in $leadStatus) #if($ls == $selectedLeadStatus)
88
                            <option value="$ls" selected>$ls</option> #else
89
                            <option value="$ls">$ls</option> #end #end
90
                        </select>
91
                    </div>
28200 tejbeer 92
 
30601 amit.gupta 93
                    <div class="col-lg-2">
94
                        <button class="btn btn-primary show-lead" type="button"
95
                        >Submit
96
                        </button>
97
                    </div>
28200 tejbeer 98
 
30601 amit.gupta 99
                    <div class="col-lg-2">
28200 tejbeer 100
 
30601 amit.gupta 101
                        #if($leadDate)
102
                            <input type="date" id="dateWiseLead" placeholder=""
103
                                   value="$leadDate" name="">
104
                        #else
105
                            <input type="date" id="dateWiseLead" placeholder="" name="">
106
                        #end
29268 manish 107
 
30601 amit.gupta 108
                        <button type="button" class="btn btn-default submitDateWiseLead">
109
                            submit
110
                        </button>
34650 aman.kumar 111
                        <button type="button" class="btn btn-default downloadDateWiseLead">
112
                            Download
113
                        </button>
114
 
30601 amit.gupta 115
                    </div>
29268 manish 116
 
117
 
30601 amit.gupta 118
                </div>
119
            </td>
120
        </tr>
29268 manish 121
 
30601 amit.gupta 122
        <tr>
123
            <td align="left" style="Width: 20%">
124
                <div class="row">
125
                    <div class="col-lg-2 form-group" style="width: 12%;">
29268 manish 126
 
30601 amit.gupta 127
                        <select id="colorFilter" name="colorFilter" placeholder="Status"
128
                                class="form-control input-sm">
129
                            <option value="" disabled selected>Status</option>
29268 manish 130
 
30601 amit.gupta 131
                            #if($colors.contains("All") && $colors.contains("yellow") && $colors.contains("green"))
28200 tejbeer 132
 
30601 amit.gupta 133
                                <option value="All" selected>All</option>
28200 tejbeer 134
 
30601 amit.gupta 135
                            #else
136
                                <option value="All">All</option>
137
                            #end
28200 tejbeer 138
 
30601 amit.gupta 139
                            #if($colors.contains("yellow")&& !$colors.contains("green"))
25979 tejbeer 140
 
30601 amit.gupta 141
                                <option value="yellow" selected>yellow</option>
28200 tejbeer 142
 
30601 amit.gupta 143
                            #else
144
                                <option value="yellow">yellow</option>
28200 tejbeer 145
 
30601 amit.gupta 146
                            #end
28200 tejbeer 147
 
30601 amit.gupta 148
                            #if($colors.contains("green") && !$colors.contains("yellow"))
149
                                <option value="green" selected>green</option>
150
                            #else
151
                                <option value="green">green</option>
152
                            #end
28200 tejbeer 153
 
154
 
30601 amit.gupta 155
                        </select>
156
                    </div>
28200 tejbeer 157
 
30601 amit.gupta 158
                    <div class="col-lg-1">
159
                        <button class="btn btn-primary show-colowise-lead" type="button"
160
                        >Submit
161
                        </button>
162
                    </div>
28200 tejbeer 163
 
30601 amit.gupta 164
                    <div class="row col-lg-5" style="width:518px;height:272px; margin-left: 650px;">
165
                        <canvas id="chart-leadstatus" style="width:auto"></canvas>
28200 tejbeer 166
 
30601 amit.gupta 167
                        <canvas id="chart-lead-search" class="" style="width:auto"></canvas>
28200 tejbeer 168
 
30601 amit.gupta 169
                    </div>
170
                </div>
171
            </td>
172
        </tr>
173
        <tr>
174
            <td align="left">
175
                <div class="row">
176
                    <div class="col-lg-10">
177
                        <table class="table table-border table-condensed table-bordered" id="lead-weakwise-table"
178
                               style="width:100%">
28200 tejbeer 179
 
30601 amit.gupta 180
                            <thead class="row htable" style="background:#F5F5F5;">
28200 tejbeer 181
 
30601 amit.gupta 182
                            <tr style="color:black;">
183
                                <th></th>
184
                                <th>Week 4</th>
185
                                <th>Week 3</th>
186
                                <th>Week 2</th>
187
                                <th colspan="7">Week</th>
188
                                <th></th>
189
                            </tr>
28200 tejbeer 190
 
30601 amit.gupta 191
                            <tr style="color:black;">
192
                                <th>Created By</th>
193
                                <th>$weekDates.get(0) - $weekDates.get(1)</th>
194
                                <th>$weekDates.get(2) - $weekDates.get(3)</th>
195
                                <th>$weekDates.get(4) - $weekDates.get(5)</th>
28200 tejbeer 196
 
30601 amit.gupta 197
                                #foreach($lwDay in $lwDays )
198
                                    <th>$lwDay.getMonth().format($dateMonthChYear)</th>
199
                                #end
28200 tejbeer 200
 
30601 amit.gupta 201
                                <th>Result</th>
202
                            </tr>
203
                            </thead>
204
                            <tbody>
205
                                #foreach($leadCreator in $leadCreators)
206
                                <tr>
28200 tejbeer 207
 
30601 amit.gupta 208
                                    <td>
209
                                        $leadCreator
210
                                    </td>
211
                                    #if($leadLasts.get($leadCreator))
212
                                        <td>
213
                                            $leadLasts.get($leadCreator)
214
                                        </td>
215
                                    #else
34269 tejus.loha 216
                                        <td style="background:rgba(255,153,153,0.55);"> 0
30601 amit.gupta 217
                                        </td>
218
                                    #end
219
                                    #if($leadThirds.get($leadCreator))
220
                                        <td>
221
                                            $leadThirds.get($leadCreator)
222
                                        </td>
223
                                    #else
34269 tejus.loha 224
                                        <td style="background:#FF99998B;"> 0
30601 amit.gupta 225
                                        </td>
226
                                    #end
227
                                    #if( $leadSeconds.get($leadCreator))
228
                                        <td>
229
                                            $leadSeconds.get($leadCreator)
230
                                        </td>
231
                                    #else
34269 tejus.loha 232
                                        <td style="background:#FF99998B;">0</td>
30601 amit.gupta 233
                                    #end
28200 tejbeer 234
 
235
 
30601 amit.gupta 236
                                    #foreach($lwDay in $lwDays )
28200 tejbeer 237
 
30601 amit.gupta 238
                                        #if($leadFirsts.get($leadCreator).get($lwDay.getMonth()))
239
                                            <td>
240
                                                $leadFirsts.get($leadCreator).get($lwDay.getMonth())
28200 tejbeer 241
 
30601 amit.gupta 242
                                            </td>
243
                                        #else
34269 tejus.loha 244
                                            <td style="background:#FF99998B;">0</td>
30601 amit.gupta 245
                                        #end
28200 tejbeer 246
 
30601 amit.gupta 247
                                    #end
28200 tejbeer 248
 
30601 amit.gupta 249
                                    #if($leadFirsts.get($leadCreator).get($lastDate))
28200 tejbeer 250
 
34269 tejus.loha 251
                                        #if($leadFirsts.get($leadCreator).get($lastDate) >= 8)
30601 amit.gupta 252
                                            <td style="color:green;">Appreciate</td>
28200 tejbeer 253
 
30601 amit.gupta 254
                                        #else
28200 tejbeer 255
 
30601 amit.gupta 256
                                            <td>Meet more prospects</td>
257
                                        #end
258
                                    #else
259
                                        <td style="color:red;">
260
                                            No leads created yesterday
261
                                        </td>
262
                                    #end
28200 tejbeer 263
 
30601 amit.gupta 264
                                </tr>
265
 
266
                                #end
267
                            </tbody>
268
 
269
                        </table>
270
                    </div>
271
                </div>
272
 
273
 
274
                </div>
275
            </td>
276
        </tr>
277
    </table>
278
 
279
 
280
    <div id="lead-request-table">
281
        <div class="row">
282
            <div class="col-lg-12">
283
                <table class="table table-border table-condensed table-bordered"
284
                       id="lead-table">
285
                    <thead>
286
                    <tr>
287
                        <th>Source</th>
34265 ranu 288
                        <th>Partner Name</th>
34392 tejus.loha 289
                        <th>Outlet Name</th>
34265 ranu 290
                        <th>Potential</th>
30601 amit.gupta 291
                        <th>Mobile</th>
292
                        <th>Address</th>
293
                        <th>City</th>
294
                        <th>State</th>
295
                        <th>Created By</th>
296
                        <th>Status</th>
297
                        <th>Created On</th>
298
                        <th>Updated On</th>
299
                        <th>ScheduleTimestamp</th>
300
                        <th>Closure Timestamp</th>
301
                        <th>Assign To</th>
302
                        <th>view</th>
303
                        <th>Action</th>
304
                        <th></th>
305
                    </tr>
306
                    </thead>
307
                    <tbody>
33222 amit.gupta 308
                        #if(!$leads.isEmpty())
309
                            #foreach( $lead in $leads )
30601 amit.gupta 310
 
33222 amit.gupta 311
                                #if($lead.getColor() == "Green")
312
                                <tr class="open-lead" bgcolor="#98FB98" data="$lead.getId()">
30601 amit.gupta 313
 
314
                                #else
33222 amit.gupta 315
                                <tr class="open-lead" bgcolor="$lead.getColor()"
316
                                    data="$lead.getId()">
30601 amit.gupta 317
 
318
                                #end
319
                                #parse("edit-lead.vm")
320
 
321
                            </tr>
322
 
323
                            #end
324
 
325
                        #else
326
                        <tr>
327
                            <td colspan="12" style="text-align: center;">NO MATCHING
328
                                DATA FOUND FOR CRITERIA
329
                            </td>
330
                        </tr>
331
                        #end
332
                    </tbody>
333
                </table>
334
            </div>
335
        </div>
336
    </div>
337
 
338
 
339
    <div id="fetchLeadActivityData" class="modal" role="dialog">
340
        <div class="modal-dialog">
341
            <div class="modal-content"></div>
342
        </div>
343
    </div>
344
 
345
 
346
    <div id="editLeadData" class="modal" role="dialog">
347
        <div class="modal-dialog">
348
            <div class="modal-content">
349
                <div class="modal-header">
350
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
351
                    <h4 class="modal-title">Edit Lead</h4>
352
                </div>
31371 tejbeer 353
                <div class="modal-body" style="height:500px; overflow:auto">
30601 amit.gupta 354
                    <div id="lead-edit-request">
31371 tejbeer 355
 
356
 
31409 tejbeer 357
                         <div class="row" id = "lead-detail-view">
30601 amit.gupta 358
                            <div class="col-lg-3">
32464 tejbeer 359
                             <label style="font-weight:bold">Outlet Name</label>
360
 
30601 amit.gupta 361
                                <div class="input-group">
31371 tejbeer 362
									 <input placeholder="Outlet Name" id="outletName" name="outletName"
363
									          type="text" value="" class="form-control input-sm">                             
364
 
365
                                </div>
366
                            </div>
367
 
368
                            <div class="col-lg-4 form-group">
369
                            <label style="font-weight:bold">Front</label>
370
                                 <input type="hidden" class="frontp" value="">
371
			                            <input type="file" class="frontp" placeholder="Front" id = "frontp" name="frontp"
372
			                                   value="">
373
                            </div>
374
 
375
                            <div class="col-lg-4 form-group">
376
                             <label style="font-weight:bold">Internal With Market</label>
377
 
378
                                 <input type="hidden" class="internalMarket" value="">
379
			                            <input type="file" class="internalMarket" placeholder="Internal With Market" id = "internalMarket"  name="internalMarket"
380
			                                   value="">
381
                            </div>
382
 
383
                           <div class="col-lg-4 form-group">
384
                            <label style="font-weight:bold">Internal Long Shot</label>
385
 
386
                                 <input type="hidden" class="leftShot" value="">
387
			                            <input type="file" class="leftShot" placeholder="Internal Long Shot"   id = "leftShot"  name="leftShot"
388
			                                   value="">
389
                            </div>
390
 
391
                             <div class="col-lg-4 form-group">
392
                               <label style="font-weight:bold">Internal Left Wall</label>
393
                                 <input type="hidden" class="leftWall" value="">
394
			                            <input type="file" class="leftWall" placeholder="Internal Left Wall" id = "leftWall"   name="leftWall"
395
			                                   value="">
396
                            </div>
397
 
398
 
399
 
400
                           <div class="col-lg-4 form-group">
401
                            <label style="font-weight:bold">Internal Right Wall</label>
402
 
403
                                 <input type="hidden" class="rightWall" value="">
404
			                            <input type="file" class="rightWall" placeholder="Internal Right Wall" id = "rightWall"   name="rightWall"
405
			                                   value="">
406
                            </div>
407
 
408
 
409
 
410
 
411
                            <div class="col-lg-3 form-group">
412
                                <input id="counterSize" placeholder="Counter Size"
413
                                       name="counterSize" type="text" value=""
414
                                       class="form-control input-sm">
415
                            </div>
416
 
417
                           <div class="col-lg-5 form-group">
418
 
32471 tejbeer 419
		                       <table class="table table-border table-condensed table-bordered" id = "editbrandtable">
420
			                        <tr>
421
			                          <th>Brand</th>
422
			                          <th>Value</th>
423
			                        </tr>
424
 
425
		                          #foreach($brand in $brandsDisplays)
426
		                          <tr>
427
		                          <td>$brand.getName()</td>
428
		                          <td>     <input type="number" class="$brand.getName()" placeholder="Value"  name="$brand.getName()"
429
				                                   value="0"> </td>
430
		                          </tr>
431
 
432
 
433
		                           #end
434
		                        </table>
435
		                           </div>
31371 tejbeer 436
                                <div class="col-lg-2 form-group">
437
 
438
                               <button type="button" class="btn btn-default lead-detail-entry">Submit</button>
439
                               </div>
440
 
441
                        </div>
442
                       <div class="row">
443
                            <div class="col-lg-3">
444
                                <div class="input-group">
30601 amit.gupta 445
                                    <select class="form-control input-sm" id="assignTo"
446
                                            name="assignTo" placeholder="Assign">
447
                                        <option value="" disabled selected>Assign To</option>
448
                                        #foreach($authUser in $authUsers)
449
                                            <option value="$authUser.getId()">$authUser.getFirstName() $authUser.getLastName()</option>
450
                                        #end
451
                                    </select>
452
                                </div>
453
                            </div>
454
 
455
                            <div class="col-lg-3 form-group">
456
                                <input placeholder="Remark" id="remark" name="remark"
457
                                       type="text" value="" class="form-control input-sm">
458
                            </div>
459
 
460
                            <div class="col-lg-3 form-group">
461
                                <select id="reason" name="reason" placeholder="Reason"
462
                                        class="form-control input-sm">
463
                                    <option value="" disabled selected>Reason</option>
464
                                    <option value="No budget">No budget</option>
465
                                    <option value="No authority to take decision">No
466
                                        authority to take decision
467
                                    </option>
468
                                    <option value="No need for new business">No need for
469
                                        new business
470
                                    </option>
471
                                    <option value="Not ready in near future">Not ready in
472
                                        near future
473
                                    </option>
474
                                    <option value="No store availability">No store
475
                                        availability
476
                                    </option>
477
                                    <option value="Duplicate Number"> Duplicate Number</option>
478
                                </select>
479
                            </div>
480
 
481
                            <div class="col-lg-3 form-group">
482
                                <select id="editStatus" name="editStatus" placeholder="Status"
483
                                        class="form-control input-sm" onchange="editStatusAction()">
484
                                    <option value="" disabled selected>Status</option>
485
                                    <option value="followUp">Follow Up</option>
486
                                    <option value="notInterested">Not Interested</option>
487
                                    <option value="finalized">Finalized</option>
488
                                </select>
489
                            </div>
490
 
491
                            <div class="col-lg-3 form-group">
492
                                <input id="editScheduleTime" placeholder="scheduleTime"
493
                                       name="editScheduleTime" type="text" value=""
494
                                       class="form-control input-sm">
495
                            </div>
31249 tejbeer 496
 
497
                                  <div class="col-lg-3 form-group">
498
                                <select class="form-control input-sm" id="communicationType" name="communicationType"
499
                                        placeholder="Communication Type">
500
                                    <option value="" disabled selected>Communication Type</option>
501
                                    #foreach($communicationType in $communicationTypes)
502
                                        <option value="$communicationType">$communicationType</option> #end
503
                                </select>
504
                                    </div>
32471 tejbeer 505
 
506
 
507
                                      <div class="col-lg-3 form-group">
508
                                <select class="form-control input-sm" id="conversionprobability"
509
                                        name="conversionprobability" placeholder="Conversion Probability">
510
                                    <option value="" disabled selected>Conversion Probability</option>
511
                                    <option value="false">Low</option>
512
                                    <option value="true">High</option>
513
 
514
                                </select>
515
                            </div>
31249 tejbeer 516
 
30601 amit.gupta 517
                        </div>
518
                    </div>
519
                </div>
520
 
521
                <div class="modal-footer">
522
                    <button type="button" data-dismiss="modal"
523
                            class="btn btn-default cancel-lead-request">Cancel
524
                    </button>
525
                    <button type="button" class="btn btn-default lead-edit-request">Submit</button>
526
 
527
                </div>
528
 
529
            </div>
530
        </div>
531
    </div>
532
 
533
 
534
    <div id="newEntryLeadModal" class="modal">
535
        <div class="modal-dialog">
536
 
537
            <!-- Modal content-->
538
            <div class="modal-content">
539
                <div class="modal-header">
540
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
541
                    <h4 class="modal-title">Create Lead</h4>
542
                </div>
32464 tejbeer 543
                <div class="modal-body" style="height:500px; overflow:auto">
30601 amit.gupta 544
                    <div id="lead-request">
545
                        <div class="row">
546
                            <div class="col-lg-3">
547
                                <div class="input-group">
548
                                    <input placeholder="First Name" name="firstName" id="firstName"
549
                                           type="text" class="form-control input-sm">
550
                                </div>
551
                            </div>
552
 
553
                            <div class="col-lg-3 form-group">
554
                                <input placeholder="Last Name" id="lastName" name="lastName"
555
                                       type="text" value="" class="form-control input-sm">
556
                            </div>
557
 
558
                            <div class="col-lg-3 form-group">
559
                                <input placeholder="mobile" id="mobile" name="mobile"
560
                                       type="number" value="" class="form-control input-sm">
561
                            </div>
562
                        </div>
563
 
564
                        <div class="row">
565
                            <div class="col-lg-3 form-group">
566
                                <input id="address" name="address" placeholder="address"
567
                                       id="address" type="text" value="" class="form-control input-sm">
568
                            </div>
569
                            <div class="col-lg-3 form-group">
570
                                <input id="city" name="city" placeholder="city" type="text"
571
                                       value="" class="form-control input-sm">
572
                            </div>
573
                            <div class="col-lg-3 form-group">
574
                                <select class="form-control input-sm" id="state" name="state"
575
                                        placeholder="State">
576
                                    <option value="" disabled selected>State</option>
577
                                    #foreach($stateName in $stateNames)
578
                                        <option value="$stateName">$stateName</option> #end
579
                                </select>
580
                            </div>
581
                        </div>
582
 
583
                        <div class="row">
584
 
585
                            <div class="col-lg-3 form-group">
586
                                <select id="status" name="status" placeholder="Status"
587
                                        class="form-control input-sm" onchange="statusAction()">
588
                                    <option value="" disabled selected>Status</option>
589
                                    <option value="followUp">Follow Up</option>
590
                                    <option value="notInterested">Not Interested</option>
591
                                    <option value="finalized">Finalized</option>
592
                                </select>
593
                            </div>
594
 
595
                            <div class="col-lg-3 form-group">
596
                                <input id="scheduleTime" placeholder="scheduleTime"
597
                                       name="scheduleTime" type="text" value=""
598
                                       class="form-control input-sm">
599
                            </div>
600
 
601
                            <div class="col-lg-3 form-group">
602
                                <input id="createRemark" name="createRemark"
603
                                       placeholder="Remark" type="text" value=""
604
                                       class="form-control input-sm">
605
                            </div>
606
                        </div>
607
 
608
                        <div class="row">
31249 tejbeer 609
 
610
                           <div class="col-lg-3 form-group">
611
                                <select class="form-control input-sm" id="communicationTye" name="communicationType"
612
                                        placeholder="Communication Type">
613
                                    <option value="" disabled selected>Communication Type</option>
614
                                    #foreach($communicationType in $communicationTypes)
615
                                        <option value="$communicationType">$communicationType</option> #end
616
                                </select>
617
                            </div>
618
 
30601 amit.gupta 619
                            <div class="col-lg-3 form-group">
620
                                <select class="form-control input-sm" id="createAssignTo"
621
                                        name="createAssignTo" placeholder="Assign">
622
                                    <option value="" disabled selected>Assign To</option>
623
                                    #foreach($authUser in $authUsers)
624
                                        <option value="$authUser.getId()">$authUser.getFirstName() $authUser.getLastName()</option>
625
                                    #end
626
                                </select>
627
                            </div>
628
 
629
                            <div class="col-lg-3 form-group">
630
                                <select class="form-control input-sm" id="leadSource"
631
                                        name="leadSource" placeholder="Source">
632
                                    <option value="" disabled selected>Source</option>
633
                                    <option value="SELF">SELF</option>
634
                                    <option value="NEWSPAPER">NEWSPAPER</option>
635
                                    <option value="INTERNET">INTERNET</option>
636
                                    <option value="PARTNER">PARTNER</option>
637
                                </select>
638
                            </div>
32471 tejbeer 639
 
640
                              <div class="col-lg-3 form-group">
32476 tejbeer 641
                                <select class="form-control input-sm" id="conversionprobabilit"
32471 tejbeer 642
                                        name="conversionprobability" placeholder="Conversion Probability">
643
                                    <option value="" disabled selected>Conversion Probability</option>
644
                                    <option value="false">Low</option>
645
                                    <option value="true">High</option>
646
 
647
                                </select>
648
                            </div>
30601 amit.gupta 649
                        </div>
32464 tejbeer 650
 
651
 
652
 
653
                           <div class="row">
654
                            <div class="col-lg-3">
655
                             <label style="font-weight:bold">Outlet Name</label>
656
 
657
                                <div class="input-group">
658
									 <input placeholder="Outlet Name" id="outletName" name="leadoutletName"
659
									          type="text" value="" class="form-control input-sm">                             
660
 
661
                                </div>
662
                            </div>
30601 amit.gupta 663
 
32464 tejbeer 664
                            <div class="col-lg-4 form-group">
665
                            <label style="font-weight:bold">Front</label>
666
                                 <input type="hidden" class="frontph" value="">
667
			                            <input type="file" class="frontp" placeholder="Front" id = "frontp" name="frontp"
668
			                                   value="">
669
                            </div>
670
 
671
                            <div class="col-lg-4 form-group">
672
                             <label style="font-weight:bold">Internal With Market</label>
673
 
674
                                 <input type="hidden" class="internalMarketh" value="">
675
			                            <input type="file" class="internalMarket" placeholder="Internal With Market" id = "internalMarket"  name="internalMarket"
676
			                                   value="">
677
                            </div>
678
 
679
                           <div class="col-lg-4 form-group">
680
                            <label style="font-weight:bold">Internal Long Shot</label>
681
 
682
                                 <input type="hidden" class="leftShoth" value="">
683
			                            <input type="file" class="leftShot" placeholder="Internal Long Shot"   id = "leftShot"  name="leftShot"
684
			                                   value="">
685
                            </div>
686
 
687
                             <div class="col-lg-4 form-group">
688
                               <label style="font-weight:bold">Internal Left Wall</label>
689
                                 <input type="hidden" class="leftWallh" value="">
690
			                            <input type="file" class="leftWall" placeholder="Internal Left Wall" id = "leftWall"   name="leftWall"
691
			                                   value="">
692
                            </div>
693
 
694
 
695
 
696
                           <div class="col-lg-4 form-group">
697
                            <label style="font-weight:bold">Internal Right Wall</label>
698
 
699
                                 <input type="hidden" class="rightWallh" value="">
700
			                            <input type="file" class="rightWall" placeholder="Internal Right Wall" id = "rightWall"   name="rightWall"
701
			                                   value="">
702
                            </div>
703
 
704
 
705
 
706
 
707
                            <div class="col-lg-3 form-group">
708
                                <input id="counterSize" placeholder="Counter Size"
709
                                       name="leadcounterSize" type="text" value=""
710
                                       class="form-control input-sm">
711
                            </div>
712
 
713
                           <div class="col-lg-5 form-group">
714
 
32471 tejbeer 715
                            <table class="table table-border table-condensed table-bordered" id="brandtable">
32464 tejbeer 716
                            <tr>
717
                              <th>Brand</th>
718
                            <th>Value</th>
719
                            </tr>
720
 
721
 
722
 
723
                               #foreach($brand in $brandsDisplays)
724
                              <tr>
725
                              <td>$brand.getName()</td>
726
                              <td>     <input type="number" class="$brand.getName()" placeholder="Value"  name="$brand.getName()"
727
			                                   value="0"> </td>
728
                              </tr>
729
                              #end
730
                               </table>
731
 
732
                        </div>
733
 
734
 
30601 amit.gupta 735
                        <form>
32464 tejbeer 736
                            <div class="row" style="margin-bottom: 12px; padding:12px">
30601 amit.gupta 737
                                <form class="form-horizontal">
32464 tejbeer 738
                                       <div class="col-lg-6">
739
                                        <labelfor="excelfile">Ivory Template:</label>
30601 amit.gupta 740
                                        <a class="btn btn-primary" id="uploadIvoryLead"> Download Template </a>
741
                                    </div>
742
                                </form>
32464 tejbeer 743
 
744
                               <div class="col-lg-6 form-group">
30601 amit.gupta 745
                                    <div class="input-group">
746
                                        <input type="file" class="form-control input-sm fileLeadGenerate"
747
                                               name="fileLeadGenerate" value="Upload CSv">
748
                                        <span class="input-group-btn">
749
				    		<button type="button" class="btn btn-primary submitLeadGenerate">
29445 manish 750
							    Uplaod
751
							</button>
32464 tejbeer 752
						  </span>
30601 amit.gupta 753
                                    </div>
754
                                </div>
755
                            </div>
28200 tejbeer 756
 
30601 amit.gupta 757
                        </form>
28200 tejbeer 758
 
30601 amit.gupta 759
                    </div>
760
                </div>
761
 
32464 tejbeer 762
 
763
            </div>
764
 
765
                 <div class="modal-footer">
30601 amit.gupta 766
                    <button type="button" data-dismiss="modal"
767
                            class="btn btn-default cancel-lead-request">Cancel
768
                    </button>
769
                    <button type="button" class="btn btn-default lead-request">Submit</button>
770
 
771
                </div>
772
        </div>
773
    </div>
28200 tejbeer 774
</section>
775
 
776
 
25979 tejbeer 777
<script type="text/javascript">
30601 amit.gupta 778
    var editor;
779
    var searchCount = 0;
780
    var ab;
781
    $(document)
782
            .ready(
783
                    function () {
31214 amit.gupta 784
                        let table = $('#lead-table').DataTable({
785
                            orderCellsTop: true,
32666 amit.gupta 786
                            "lengthMenu": [100, 250, 1000, -1],
28200 tejbeer 787
 
31214 amit.gupta 788
                            fixedHeader: true,
789
                            "bPaginate": true,
790
                            "bLengthChange": true,
791
                            "bFilter": true,
792
                            "bInfo": false,
793
                            "bAutoWidth": false,
28200 tejbeer 794
 
31214 amit.gupta 795
                            "columnDefs": [{
796
                                type: 'date-euro',
797
                                targets: 12
798
                            }, {
799
                                type: 'date-euro',
800
                                targets: 11
801
                            }, {
802
                                type: 'date-euro',
803
                                targets: 10
804
                            }, {
805
                                type: 'date-euro',
806
                                targets: 9
807
                            }
28200 tejbeer 808
 
31214 amit.gupta 809
                            ]
810
                        });
811
 
30601 amit.gupta 812
                        $('#lead-table thead tr').clone(true).appendTo(
813
                                '#lead-table thead');
814
                        $('#lead-table thead tr:eq(1) th')
815
                                .each(
816
                                        function (i) {
817
                                            var title = $(this).text();
818
                                            $(this).html(
819
                                                    '<input type="text"  class="search-lead" style = "width:60%;" placeholder="Search '
820
                                                    + title
821
                                                    + '" />');
28200 tejbeer 822
 
30601 amit.gupta 823
                                            $('input', this)
824
                                                    .on(
825
                                                            'keyup change',
826
                                                            function () {
827
                                                                if (table
828
                                                                        .column(
829
                                                                                i)
830
                                                                        .search() !== this.value) {
831
                                                                    table
832
                                                                            .column(
833
                                                                                    i)
834
                                                                            .search(
835
                                                                                    this.value)
836
                                                                            .draw();
837
                                                                }
838
                                                            });
31214 amit.gupta 839
                                        });
29268 manish 840
 
29478 manish 841
 
29268 manish 842
 
30601 amit.gupta 843
                        var myPieChart = null;
844
                        $(document).on("keyup", ".search-lead",
845
                                function (e) {
846
                                    console.log('Currently applied global search:');
847
                                    if (myPieChart != null) {
848
                                        myPieChart.destroy();
849
                                    }
29268 manish 850
 
851
 
30601 amit.gupta 852
                                    myFunction(searchCount);
29268 manish 853
 
30601 amit.gupta 854
 
855
                                });
856
 
857
                        function myFunction() {
858
                            if (searchCount == 0) {
859
                                ab = setTimeout(function () {
860
                                    datatableChart();
861
                                }, 3000);
862
                                searchCount++;
863
                            } else {
864
                                clearTimeout(ab);
865
                                ab = setTimeout(function () {
866
                                    datatableChart();
867
                                }, 3000);
868
                            }
869
                        }
870
 
871
 
872
                        function datatableChart() {
873
 
874
 
875
                            $('#chart-leadstatus').remove();
876
 
877
                            let count = 0;
878
                            let ni = 0;
879
 
880
                            let fwup = 0;
881
                            let htld = 0;
882
                            let pend = 0;
883
                            let final = 0;
884
 
885
                            table.rows({
886
                                "search": "applied"
887
                            }).every(function () {
888
                                var data = this.data();
889
                                var status = data[8];
890
                                var hotLeads = data[16];
891
 
892
                                console.log("status" + status);
893
 
894
                                if (hotLeads == "Green") {
895
                                    htld++;
896
                                }
897
 
898
                                if (status == "notInterested") {
899
                                    ni++;
900
                                } else if (status == "followUp") {
901
                                    fwup++;
902
                                } else if (status == "pending") {
903
 
904
                                    pend++;
905
                                } else if (status == "finalized") {
906
 
907
                                    final++;
908
                                }
909
                                var count = table.rows({search: 'applied'}).count();
910
 
911
                            });
912
                            var ctx = document.getElementById('chart-lead-search').getContext('2d');
913
 
33990 tejus.loha 914
                            myPieChart = new Chart1(ctx, {
30601 amit.gupta 915
                                "type": "pie",
916
                                "data": {
917
                                    "labels": [
918
                                        "notInterested",
919
                                        "followUp",
920
                                        "pending",
921
                                        "finalized",
922
                                        "HotLeads"
923
                                    ],
924
                                    "datasets": [
925
                                        {
926
                                            "data": [
927
                                                ni, fwup, pend, final, htld
928
                                            ],
929
                                            "backgroundColor": ["red", "#9ACD32", "pink", "blue", "green"],
930
                                            "label": "DataSet 1"
931
                                        }
932
                                    ]
933
                                },
934
                                "options": {
935
                                    "responsive": true,
936
                                    "legend": {
937
                                        "labels": {
938
                                            "fontColor": "black",
939
                                            "fontSize": 15
940
                                        },
941
                                        "position": "left"
942
                                    }
943
                                }
944
                            });
945
 
946
                            if (ni <= 0) {
947
                                myPieChart.getDatasetMeta(0).data[0].hidden = true;
948
                            }
949
                            if (fwup <= 0) {
950
                                myPieChart.getDatasetMeta(0).data[1].hidden = true;
951
                            }
952
                            if (pend <= 0) {
953
                                myPieChart.getDatasetMeta(0).data[2].hidden = true;
954
                            }
955
                            if (final <= 0) {
956
                                myPieChart.getDatasetMeta(0).data[3].hidden = true;
957
                            }
958
 
959
                            if (htld <= 0) {
960
                                myPieChart.getDatasetMeta(0).data[4].hidden = true;
961
                            }
962
 
963
                            myPieChart.update();
964
 
965
                        }
966
 
967
 
968
                    });
25979 tejbeer 969
</script>
29221 manish 970
 
29268 manish 971
<script type="text/javascript">
972
 
30601 amit.gupta 973
 
974
    var config = $chartLead;
975
 
976
    var ctx = document.getElementById('chart-leadstatus').getContext('2d');
33990 tejus.loha 977
    var bar = new Chart1(ctx, config);
29268 manish 978
</script>