Subversion Repositories SmartDukaan

Rev

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