Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
22860 ashik.ali 1
<h3 style="padding-left:3%;padding-top:2%;font-weight:bold;">Scheme Id : $scheme.getId()</h3>
36452 amit 2
<h5 style="padding-left:3%;font-weight:normal;">Reference : #if($scheme.getReference())$scheme.getReference()#else-#end</h5>
23914 govind 3
 
37493 amit 4
<div class="row" style="padding-left:3%;"
5
     data-scheme-id="$scheme.getId()"
6
     data-scheme-start="$scheme.getStartDateTime()"
7
     data-scheme-end="$scheme.getEndDateTime()">
30122 amit.gupta 8
    <div class="col-lg-12">
30017 amit.gupta 9
        <table>
10
            <tr>
11
                <td>
12
                    #if($scheme.getActiveTimestamp())
13
                        <span>Activated On : $scheme.getFormattedActiveTimestamp()</span>
14
                        <p></p>
15
                    #end
16
                    #if($scheme.getExpireTimestamp())
17
                        <span>Expired On : $scheme.getFormattedExpireTimestamp()</span>
18
                        <p></p>
19
                    #end
20
                </td>
21
                #if($isAdmin && $fullAccess)
22
                    <td>
23
                        <button class="btn btn-sm btn-primary add-scheme" data="$scheme.getId()"
36421 amit 24
                                style="width:100%;background-color:#007aff;color:white;padding-right: 10px">Add Item
30017 amit.gupta 25
                        </button>
26
                    </td>
27
                #end
28
            <tr>
29
        </table>
30
        <table class="table table-striped table-advance table-hover">
31
            <tbody>
32
            <tr>
30122 amit.gupta 33
                <th>Model ID</th>
34
                <th>Model Name</th>
36421 amit 35
                <th>Start Date</th>
36
                <th>End Date</th>
37
                <th>Updated By</th>
38
                <th>Updated On</th>
30017 amit.gupta 39
                #if($isAdmin && $fullAccess)
30122 amit.gupta 40
                    <th>Action</th>
30017 amit.gupta 41
                #end
42
            </tr>
36421 amit 43
                #if($schemeItems && $schemeItems.size()>0)
44
                    #foreach( $item in $schemeItems)
45
                    <tr data-schemeitemid="$item.getId()" data-catalogid="$item.getCatalogId()">
46
                        <td>$item.getCatalogId()</td>
47
                        <td>#if($scheme.getCatalogStringMap().containsKey($item.getCatalogId()))$scheme.getCatalogStringMap().get($item.getCatalogId())#else-#end</td>
48
                        <td>
49
                            <span class="date-display">#if($item.getStartDate())$dateFormatter.format($item.getStartDate())#else-#end</span>
50
                            <input type="text" class="form-control date-edit edit-start-date" style="display:none; width:160px" value="#if($item.getStartDate())$dateFormatter.format($item.getStartDate())#end">
51
                        </td>
52
                        <td>
53
                            <span class="date-display">#if($item.getEndDate())$dateFormatter.format($item.getEndDate())#else-#end</span>
54
                            <input type="text" class="form-control date-edit edit-end-date" style="display:none; width:160px" value="#if($item.getEndDate())$dateFormatter.format($item.getEndDate())#end">
55
                        </td>
56
                        <td>#if($item.getUpdatedBy())$item.getUpdatedBy()#else-#end</td>
57
                        <td>#if($item.getUpdatedOn())$dateTimeFormatter.format($item.getUpdatedOn())#else-#end</td>
58
                        #if($isAdmin && $fullAccess)
59
                        <td>
60
                            <button class="btn btn-xs btn-info edit-item-dates">Edit</button>
61
                            <button class="btn btn-xs btn-success save-item-dates" style="display:none">Save</button>
62
                            <button class="btn btn-xs btn-default cancel-item-dates" style="display:none">Cancel</button>
63
                            <button class="btn btn-xs btn-danger delete-schemes" data-schemeid="$scheme.getId()"
64
                                    data-catalogid="$item.getCatalogId()">Delete</button>
65
                        </td>
66
                        #end
67
                    </tr>
68
                    #end
69
                #elseif($scheme.getCatalogStringMap().size()>0)
30122 amit.gupta 70
                    #foreach( $catalogIdDescriptionEntry in $scheme.getCatalogStringMap().entrySet())
71
                    <tr data-catalogid="$catalogIdDescriptionEntry.getKey()">
72
                        <td>$catalogIdDescriptionEntry.getKey()</td>
30144 amit.gupta 73
                        <td>$catalogIdDescriptionEntry.getValue()</td>
36421 amit 74
                        <td colspan="4">-</td>
30017 amit.gupta 75
                        #if($isAdmin && $fullAccess)
76
                        <td>
77
                            <button class="btn btn-primary delete-schemes" data-schemeid="$scheme.getId()"
30122 amit.gupta 78
                                    data-catalogid="$catalogIdDescriptionEntry.getKey()">Delete
30017 amit.gupta 79
                            </button>
80
                        #end
81
                    </tr>
82
                    #end
83
                #else
84
                <tr>
85
                    <td colspan="12" style="text-align:center;">NO ITEM FOUND FOR SCHEME</td>
86
                </tr>
87
                #end
88
            </tbody>
89
        </table>
90
        <p></p>
29899 tejbeer 91
        #if($isAdmin && $fullAccess)
30017 amit.gupta 92
            <span>Created By : $scheme.getCreatedBy()</span>
93
            <p></p>
94
            #if((!$scheme.getActiveTimestamp()) && (!$scheme.getExpireTimestamp()))
95
                <div class="btn-group" style="width:40%">
96
                    <button class="btn active-scheme" data="$scheme.getId()"
97
                            style="width:100%;background-color:#e98c8f;color:white;">Active
98
                    </button>
99
                </div>
100
            #else
101
                #if(($scheme.getActiveTimestamp()) && (!$scheme.getExpireTimestamp()))
102
                    <table>
103
                        <td>
104
                            <div class="scheme-extend">
105
                                <div class="row">
106
                                    <div class="col-lg-12">
107
                                        <div class="input-group" style="width:80%">
108
                                            <input type="hidden" value="$scheme.getId()" id="schemeId">
30601 amit.gupta 109
                                            <input placeholder="Extend Date Time" id="extendSchemeById" type="text"
110
                                                   class="form-control" name="extendSchemeById">
111
                                            <span class="input-group-btn"> <button
112
                                                    class="btn btn-primary extendSchemeById"
113
                                                    id="extendScheme-button"
114
                                                    type="button">Extend</button></span>
30017 amit.gupta 115
                                        </div>
116
                                    </div>
117
                                </div>
118
                            </div>
119
                        </td>
120
                        <td>
121
                            <div class="input-group" style="width:80%">
122
                                <input type="hidden" value="$scheme.getId()" id="schemeId">
30601 amit.gupta 123
                                <input placeholder="Expire Time" type="text"
124
                                       class="form-control expireTime" id="exprireScheme" name="expireSchemeById">
30017 amit.gupta 125
                                <span class="input-group-btn">
25069 amit.gupta 126
								<button class="btn btn-primary expire-scheme" data="$scheme.getId()">Expire</button>
25068 amit.gupta 127
							</span>
30017 amit.gupta 128
                            </div>
129
                        </td>
130
                    </table>
131
                    <br><br>
132
                #end
133
            #end
134
        #end
135
    </div>
36421 amit 136
    <div id="newItemToSchemeModal" class="modal fade" role="dialog" tabindex="-1">
137
        <div class="modal-dialog modal-lg">
30017 amit.gupta 138
            <div class="modal-content">
139
                <div class="modal-header">
140
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
36421 amit 141
                    <h4 class="modal-title"><b>Add Item To Scheme (ID: $scheme.getId())</b></h4>
30017 amit.gupta 142
                </div>
143
                <div class="modal-body">
144
                    <form id="addSchemeForm">
36421 amit 145
                        <input type="hidden" value="$scheme.getId()" id="schemeids">
146
                        <div class="row">
147
                            <div class="col-lg-4">
148
                                <div class="form-group">
149
                                    <label><b>Category</b> <span style="color:red">*</span></label>
150
                                    <select class="form-control input-sm" id="modal-category-list">
151
                                        #foreach($category in $categories)
152
                                            <option value="$category.getId()">$category.getLabel()</option>
153
                                        #end
154
                                    </select>
155
                                </div>
30017 amit.gupta 156
                            </div>
157
                            <div class="col-lg-4">
36421 amit 158
                                <div class="form-group">
159
                                    <label><b>Brands</b> <span style="color:red">*</span></label>
160
                                    <div id="modal-brand-list"></div>
161
                                </div>
30017 amit.gupta 162
                            </div>
36421 amit 163
                            <div class="col-lg-4">
164
                                <div class="form-group">
165
                                    <label><b>Models</b> <span style="color:red">*</span></label>
166
                                    <div id="modal-models-list">
167
                                        <select class="form-control modalCatalogItems" multiple="multiple"></select>
168
                                    </div>
169
                                </div>
170
                            </div>
30017 amit.gupta 171
                        </div>
36421 amit 172
                        <div class="row">
173
                            <div class="col-lg-6">
174
                                <div class="form-group">
175
                                    <label><b>Start Date</b> <small>(optional, defaults to scheme start: $dateFormatter.format($scheme.getStartDateTime()))</small></label>
176
                                    <input type="text" class="form-control" id="addItemStartDate" name="addItemStartDate" placeholder="dd/mm/yyyy"/>
177
                                </div>
178
                            </div>
179
                            <div class="col-lg-6">
180
                                <div class="form-group">
181
                                    <label><b>End Date</b> <small>(optional, defaults to scheme end: $dateFormatter.format($scheme.getEndDateTime()))</small></label>
182
                                    <input type="text" class="form-control" id="addItemEndDate" name="addItemEndDate" placeholder="dd/mm/yyyy"/>
183
                                </div>
184
                            </div>
185
                        </div>
186
                        <div class="alert alert-info" style="margin-top:5px; padding:8px;">
187
                            Item dates must be within scheme window: <b>$dateFormatter.format($scheme.getStartDateTime())</b> to <b>$dateFormatter.format($scheme.getEndDateTime())</b>.
188
                            Non-overlapping windows are enforced per model within this scheme.
189
                        </div>
30017 amit.gupta 190
                    </form>
191
                </div>
192
                <div class="modal-footer">
193
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
36421 amit 194
                    <button type="button" class="btn btn-primary add-item">Add Item</button>
30017 amit.gupta 195
                </div>
196
            </div>
197
        </div>
198
    </div>
22860 ashik.ali 199
</div>