Subversion Repositories SmartDukaan

Rev

Rev 34671 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34671 Rev 35971
Line 8... Line 8...
8
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
8
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
9
                <li><i class="icon_document_alt"></i>Design TAT</li>
9
                <li><i class="icon_document_alt"></i>Design TAT</li>
10
            </ol>
10
            </ol>
11
        </div>
11
        </div>
12
    </div>
12
    </div>
-
 
13
 
-
 
14
    ## Filter and Search
-
 
15
    <div class="col-lg-12" style="margin-bottom: 15px;">
-
 
16
        <div class="row">
-
 
17
            <div class="col-lg-3">
-
 
18
                <label style="margin-right: 10px;"><strong>Filter:</strong></label>
-
 
19
                <select id="holdFilterSelect" class="form-control" style="width: 150px; display: inline-block;">
-
 
20
                    <option value="pending" #if($holdFilter == "pending") selected #end>Pending</option>
-
 
21
                    <option value="hold" #if($holdFilter == "hold") selected #end>On Hold</option>
-
 
22
                    <option value="all" #if($holdFilter == "all") selected #end>All</option>
-
 
23
                </select>
-
 
24
            </div>
-
 
25
            <div class="col-lg-6">
-
 
26
                <label style="margin-right: 10px;"><strong>Search:</strong></label>
-
 
27
                <input type="text" id="designTatSearch" class="form-control"
-
 
28
                       style="width: 250px; display: inline-block;"
-
 
29
                       placeholder="Outlet, Phone, Code, City..." value="$!search">
-
 
30
                <button type="button" class="btn btn-primary" id="designTatSearchBtn" style="margin-left: 5px;">
-
 
31
                    <i class="fa fa-search"></i> Search
-
 
32
                </button>
-
 
33
                #if($search && $search != "")
-
 
34
                    <button type="button" class="btn btn-default" id="clearDesignTatSearchBtn"
-
 
35
                            style="margin-left: 5px;">
-
 
36
                        Clear
-
 
37
                    </button>
-
 
38
                #end
-
 
39
            </div>
-
 
40
        </div>
-
 
41
    </div>
-
 
42
 
13
    <div class="col-lg-12">
43
    <div class="col-lg-12">
14
        <table class="table table-border table-condensed table-bordered" id="OnboardingDesign" style="width:100%">
44
        <table class="table table-border table-condensed table-bordered" id="OnboardingDesign" style="width:100%">
15
 
45
 
16
            <thead class="row htable" style="background:#F5F5F5;">
46
            <thead class="row htable" style="background:#F5F5F5;">
17
 
47
 
18
            <tr style="color:black;">
48
            <tr style="color:black;">
19
                <th>Id</th>
49
                <th>Id</th>
20
                <th>Outlet Name(SM)</th>
50
                <th>Outlet Name(SM)</th>
21
                <th>Created On</th>
51
                <th>Created On</th>
22
                <th>Acquired Date()</th>
52
                <th>Acquired Date()</th>
23
                
-
 
-
 
53
 
24
                <th>Phone </br>Number(SM)</th>
54
                <th>Phone </br>Number(SM)</th>
25
                
-
 
-
 
55
 
26
                <th>City (SM)</th>
56
                <th>City (SM)</th>
27
                <th>State Head(SM)</th>
57
                <th>State Head(SM)</th>
28
                <th>BDM (SM)</th>
58
                <th>BDM (SM)</th>
29
                <th>Agreed Brand fees(SM)</th>
59
                <th>Agreed Brand fees(SM)</th>
30
          
60
 
31
                <th>Inauguration Date(SM)</th>
61
                <th>Inauguration Date(SM)</th>
32
                <th>LOI(legal)</th>
62
                <th>LOI(legal)</th>
33
                <th>Kyc</th>
63
                <th>Kyc</th>
34
                <th>Code(legal)</th>
64
                <th>Code(legal)</th>
35
                <th>Recee </br> Planed(Vaibhav)</th>
65
                <th class="hidden-col">Recee Planed</th>
36
                <th>Recee  </br> Actual(Vaibhav)</th>
66
                <th>Recee Actual(Branding L1)</th>
37
                <th>Stock Payment(kamini)</th>
67
                <th class="hidden-col">Stock Payment</th>
38
                <th>2D with BOQ Planed(Vaibhav)</th>
68
                <th class="hidden-col">2D with BOQ Planed</th>
39
                <th>2D with BOQ Actual(Vaibhav)</th>
69
                <th>BOQ Actual(Branding L1)</th>
40
                <th>2D with BOQ(Vaibhav)</th>
70
                <th>BOQ Document(Branding L1)</th>
41
                <th>3D with BOQ Planed (Vaibhav)</th>
71
                <th class="hidden-col">3D with BOQ Planed</th>
42
                <th>3D with BOQ Actual (Vaibhav)</th>
72
                <th class="hidden-col">3D with BOQ Actual</th>
43
                <th>3D with BOQ (Vaibhav)</th>
73
                <th class="hidden-col">3D with BOQ</th>
44
                <th>PO To Vendor Planed(Vaibhav)</th>
74
                <th class="hidden-col">PO To Vendor Planed</th>
45
                <th>PO To Vendor Actual(Vaibhav)</th>
75
                <th class="hidden-col">PO To Vendor Actual</th>
46
 
76
 
47
                <th>Briefing Partner Date(Vaibhav)</th>
77
                <th class="hidden-col">Briefing Partner Date</th>
48
                <th>Briefing Partner Actual Date (Vaibhav)</th>
78
                <th class="hidden-col">Briefing Partner Actual Date</th>
49
                <th>Deployment Planed (Vaibhav)</th>
79
                <th class="hidden-col">Deployment Planed</th>
50
                <th>Deployment Actual (Vaibhav)</th>
80
                <th>Deployment Actual(Branding L1)</th>
51
                <th>Final Pics Of OutLets Planed(Vaibhav)</th>
81
                <th class="hidden-col">Final Pics Planed</th>
52
                <th>Final Pics Of OutLets Actual(Vaibhav)</th>
82
                <th>Final Pics Actual(Branding L1)</th>
53
                <th>Final Pics Of OutLets(Vaibhav)</th>
83
                <th>Final Pics(Branding L1)</th>
54
                <th>NOC Actual(Vaibhav)</th>
84
                <th class="hidden-col">NOC Actual</th>
55
                <th>NOC (Vaibhav)</th>
85
                <th class="hidden-col">NOC</th>
56
                <th>Submit</th>
86
                <th>Submit</th>
57
                 <th>Designing Done</th>
87
                 <th>Designing Done</th>
58
            </tr>
88
            </tr>
59
            </thead>
89
            </thead>
60
            <tbody>
90
            <tbody>
Line 77... Line 107...
77
 
107
 
78
            </tbody>
108
            </tbody>
79
 
109
 
80
        </table>
110
        </table>
81
    </div>
111
    </div>
-
 
112
 
-
 
113
    ## Pagination Controls (Bottom)
-
 
114
    <div class="col-lg-12" style="margin-top: 15px;">
-
 
115
        <div class="row">
-
 
116
            <div class="col-lg-12 text-center">
-
 
117
                #if($totalRecords > 0)
-
 
118
                    <span class="pagination-info">Showing $startRecord - $endRecord of $totalRecords</span>
-
 
119
                    <ul class="pagination pagination-sm" style="margin: 0 15px; display: inline-flex;">
-
 
120
                        #if($currentPage > 0)
-
 
121
                            <li><a href="javascript:void(0)" class="design-tat-page-link" data-page="0">First</a></li>
-
 
122
                            <li><a href="javascript:void(0)" class="design-tat-page-link" data-page="$prevPage">Prev</a>
-
 
123
                            </li>
-
 
124
                        #else
-
 
125
                            <li class="disabled"><span>First</span></li>
-
 
126
                            <li class="disabled"><span>Prev</span></li>
-
 
127
                        #end
-
 
128
 
-
 
129
                        <li class="active"><span>Page $currentPageDisplay of $totalPages</span></li>
-
 
130
 
-
 
131
                        #if($currentPage < $lastPage)
-
 
132
                            <li><a href="javascript:void(0)" class="design-tat-page-link" data-page="$nextPage">Next</a>
-
 
133
                            </li>
-
 
134
                            <li><a href="javascript:void(0)" class="design-tat-page-link" data-page="$lastPage">Last</a>
-
 
135
                            </li>
-
 
136
                        #else
-
 
137
                            <li class="disabled"><span>Next</span></li>
-
 
138
                            <li class="disabled"><span>Last</span></li>
-
 
139
                        #end
-
 
140
                    </ul>
-
 
141
                    <select class="form-control design-tat-page-size" style="width: 120px; display: inline-block;">
-
 
142
                        <option value="10" #if($pageSize==10)selected#end>10 per page</option>
-
 
143
                        <option value="25" #if($pageSize==25)selected#end>25 per page</option>
-
 
144
                        <option value="50" #if($pageSize==50)selected#end>50 per page</option>
-
 
145
                        <option value="100" #if($pageSize==100)selected#end>100 per page</option>
-
 
146
                    </select>
-
 
147
                #end
-
 
148
            </div>
-
 
149
        </div>
-
 
150
    </div>
82
</section>
151
</section>
83
 
152
 
84
 
153
 
85
<script type="text/javascript">
154
<script type="text/javascript">
86
 
155
 
87
    $(document).ready(function () {
156
    $(document).ready(function () {
-
 
157
 
-
 
158
        // Handle filter change
-
 
159
        $('#holdFilterSelect').on('change', function () {
-
 
160
            refreshDesignTatList(0);
88
    
161
        });
-
 
162
 
-
 
163
        // Search button click handler
-
 
164
        $('#designTatSearchBtn').on('click', function () {
-
 
165
            refreshDesignTatList(0);
-
 
166
        });
-
 
167
 
-
 
168
        // Search on Enter key
-
 
169
        $('#designTatSearch').on('keypress', function (e) {
-
 
170
            if (e.which === 13) {
-
 
171
                refreshDesignTatList(0);
-
 
172
            }
-
 
173
        });
-
 
174
 
-
 
175
        // Clear search button
-
 
176
        $('#clearDesignTatSearchBtn').on('click', function () {
-
 
177
            $('#designTatSearch').val('');
-
 
178
            refreshDesignTatList(0);
-
 
179
        });
-
 
180
 
-
 
181
        // Pagination link click handler
-
 
182
        $(document).on('click', '.design-tat-page-link', function (e) {
-
 
183
            e.preventDefault();
-
 
184
            refreshDesignTatList($(this).data('page'));
-
 
185
        });
-
 
186
 
-
 
187
        // Page size change handler
-
 
188
        $(document).on('change', '.design-tat-page-size', function () {
-
 
189
            refreshDesignTatList(0);
-
 
190
        });
-
 
191
 
-
 
192
        // Destroy existing DataTable if it exists
-
 
193
        if ($.fn.DataTable.isDataTable('#OnboardingDesign')) {
-
 
194
            $('#OnboardingDesign').DataTable().destroy();
89
    
195
        }
90
		
196
 
91
      var dtable = $('#OnboardingDesign').DataTable({
197
      var dtable = $('#OnboardingDesign').DataTable({
92
             "scrollX": true,
198
             "scrollX": true,
93
            "scrollY": "518px",
199
            "scrollY": "518px",
94
            scrollCollapse: true,
200
            scrollCollapse: true,
95
              "fixedHeader": true,
201
          "fixedHeader": true,
-
 
202
          "paging": false,
96
             
203
          "info": false,
-
 
204
          "bFilter": false,
-
 
205
 
97
        fixedColumns:   {
206
        fixedColumns:   {
98
            leftColumns: 2
207
            leftColumns: 2
99
        },
208
        },
100
        
209
 
101
          "columnDefs": [
210
          "columnDefs": [
102
                   { "targets": 1, "orderDataType":  "dom-text", "type":"string" },
211
                   { "targets": 1, "orderDataType":  "dom-text", "type":"string" },
103
                   { "targets": 2, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
212
                   { "targets": 2, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
104
                  
-
 
105
                   { "targets": 3, "orderDataType": "date-dd-mmm-yyyy", "type": "string" },
213
                   { "targets": 3, "orderDataType": "date-dd-mmm-yyyy", "type": "string" },
106
                   { "targets": 4, "orderDataType": "dom-text-numeric", "type":"number"},
214
                   { "targets": 4, "orderDataType": "dom-text-numeric", "type":"number"},
107
                  { "targets": 5, "orderDataType": "dom-text", "type": "string" },
215
              {"targets": 5, "orderDataType": "dom-text", "type": "string"},
108
                  { "targets": 6, "orderDataType": "dom-text", "type": "string" },
216
              {"targets": 6, "orderDataType": "dom-text", "type": "string"},
109
                  { "targets": 7, "orderDataType": "dom-text", "type": "string" },
217
              {"targets": 7, "orderDataType": "dom-text", "type": "string"},
110
                 
-
 
111
                 
-
 
112
                  
-
 
113
                  { "targets": 8, "orderDataType": "dom-text-numeric", "type":"number"},
-
 
114
                  
-
 
115
                  { "targets": 9, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
218
              {"targets": 9, "orderDataType": "date-dd-mmm-yyyy", "type": "string"},
116
          
-
 
117
                  { "targets": 12, "orderDataType": "dom-text", "type": "string" },
219
              {"targets": 12, "orderDataType": "dom-text", "type": "string"},
118
                 
-
 
119
                  { "targets": 13, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
-
 
120
                  { "targets": 14, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
220
              {"targets": 14, "orderDataType": "date-dd-mmm-yyyy", "type": "string"},
121
                     { "targets": 15, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
-
 
122
                       { "targets": 16, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
-
 
123
                  { "targets": 18, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
-
 
124
                  { "targets": 19, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
221
              {"targets": 17, "orderDataType": "date-dd-mmm-yyyy", "type": "string"},
125
    
-
 
126
                  { "targets": 21, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
-
 
127
                  { "targets": 22,"orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
-
 
128
                 { "targets": 23, "orderDataType": "date-dd-mmm-yyyy", "type": "string" },
222
              {"targets": 27, "orderDataType": "date-dd-mmm-yyyy", "type": "string"},
129
               { "targets": 24, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
223
              {"targets": 29, "orderDataType": "date-dd-mmm-yyyy", "type": "string"},
130
                 { "targets": 25, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
-
 
131
                 { "targets": 26, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
224
              ## Column hiding is done via CSS class="hidden-col" on <th>/<td> elements.
132
                { "targets": 27, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" },
225
              ## Do NOT use DataTables visible:false — it removes TDs from DOM,
133
                  { "targets": 28, "orderDataType": "date-dd-mmm-yyyy", "type": "string" },
226
              ## which breaks td:eq(N) selectors in panel-listing.js submit handler.
134
               
-
 
135
                { "targets": 30, "orderDataType":  "date-dd-mmm-yyyy", "type":"string" }
227
              {"targets": [13, 15, 16, 19, 20, 21, 22, 23, 24, 25, 26, 28, 31, 32], "className": "hidden-col"}
136
              
228
          ],
137
                        ], 
-
 
138
                       
-
 
139
     });   
-
 
140
     
229
 
141
     
230
      });
142
    });
231
    });
143
   
232
 
-
 
233
    // Function to refresh design tat list via AJAX
-
 
234
    function refreshDesignTatList(page) {
-
 
235
        var holdFilter = $('#holdFilterSelect').val() || 'pending';
-
 
236
        var pageSize = $('.design-tat-page-size').val() || '25';
-
 
237
        var search = $('#designTatSearch').val() || '';
-
 
238
        var url = context + '/partnerOnBoardingDesign?holdFilter=' + encodeURIComponent(holdFilter)
-
 
239
                + '&page=' + (page || 0)
-
 
240
                + '&pageSize=' + pageSize
-
 
241
                + '&search=' + encodeURIComponent(search);
-
 
242
        $.ajax({
-
 
243
            url: url,
-
 
244
            type: 'GET',
-
 
245
            success: function (response) {
-
 
246
                $('#main-content').html(response);
-
 
247
            }
-
 
248
        });
144
    
249
    }
-
 
250
 
145
</script>
251
</script>
146
 
252
 
147
<style>
253
<style>
148
  .design-hold td{
-
 
149
   
-
 
150
background-color: crimson !important;
-
 
151
   
-
 
152
   }
-
 
153
   </style> 
-
 
154
254
    .hidden-col {
-
 
255
        display: none !important;
-
 
256
    }
-
 
257
 
-
 
258
    td.hidden-col {
-
 
259
        display: none !important;
-
 
260
    }
-
 
261
 
-
 
262
    .pagination-info {
-
 
263
        margin-right: 15px;
-
 
264
        font-weight: bold;
-
 
265
    }
-
 
266
 
-
 
267
    .pagination {
-
 
268
        margin: 0;
-
 
269
    }
-
 
270
 
-
 
271
    .pagination li {
-
 
272
        display: inline-block;
-
 
273
        margin: 0 2px;
-
 
274
    }
-
 
275
 
-
 
276
    .pagination li a, .pagination li span {
-
 
277
        padding: 5px 10px;
-
 
278
        border: 1px solid #ddd;
-
 
279
        text-decoration: none;
-
 
280
        color: #333;
-
 
281
    }
-
 
282
 
-
 
283
    .pagination li.active span {
-
 
284
        background-color: #337ab7;
-
 
285
        color: white;
-
 
286
        border-color: #337ab7;
-
 
287
    }
-
 
288
 
-
 
289
    .pagination li.disabled span {
-
 
290
        color: #999;
-
 
291
        cursor: not-allowed;
-
 
292
    }
-
 
293
</style> 
-
 
294
155
295