Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
23914 govind 1
<script type="text/javascript">
30601 amit.gupta 2
    $('input[name="extendSchemeById"]').daterangepicker($.extend(getSingleDatePicker(), {
30017 amit.gupta 3
        "drops": "up",
30601 amit.gupta 4
    }));
5
    $('input[name="expireSchemeById"]').daterangepicker($.extend(getSingleDatePicker(), {
6
        "drops": "up",
7
    }));
30017 amit.gupta 8
 
9
    $(".add-scheme").click(function () {
23914 govind 10
        $("#newItemToSchemeModal").modal({backdrop: false});
11
    });
30017 amit.gupta 12
    $("#newItemToSchemeModal").on('hidden.bs.modal', function () {
13
        $("#addSchemeForm").trigger("reset");
14
    });
15
</script>
22860 ashik.ali 16
<h3 style="padding-left:3%;padding-top:2%;font-weight:bold;">Scheme Id : $scheme.getId()</h3>
23914 govind 17
 
22860 ashik.ali 18
<div class="row" style="padding-left:3%;">
30122 amit.gupta 19
    <div class="col-lg-12">
30017 amit.gupta 20
        <table>
21
            <tr>
22
                <td>
23
                    #if($scheme.getActiveTimestamp())
24
                        <span>Activated On : $scheme.getFormattedActiveTimestamp()</span>
25
                        <p></p>
26
                    #end
27
                    #if($scheme.getExpireTimestamp())
28
                        <span>Expired On : $scheme.getFormattedExpireTimestamp()</span>
29
                        <p></p>
30
                    #end
31
                </td>
32
                #if($isAdmin && $fullAccess)
33
                    <td>
34
                        <button class="btn btn-sm btn-primary add-scheme" data="$scheme.getId()"
35
                                style="width:100%;background-color:#007aff;color:white;padding-right: 10px"
36
                                data-toggle="modal" data-target="#newItemToSchemeModal">Add Item
37
                        </button>
38
                    </td>
39
                #end
40
            <tr>
41
        </table>
42
        <table class="table table-striped table-advance table-hover">
43
            <tbody>
44
            <tr>
30122 amit.gupta 45
                <th>Model ID</th>
46
                <th>Model Name</th>
30017 amit.gupta 47
                #if($isAdmin && $fullAccess)
30122 amit.gupta 48
                    <th>Action</th>
30017 amit.gupta 49
                #end
50
            </tr>
30122 amit.gupta 51
                #if($scheme.getCatalogStringMap().size()>0)
52
                    #foreach( $catalogIdDescriptionEntry in $scheme.getCatalogStringMap().entrySet())
53
                    <tr data-catalogid="$catalogIdDescriptionEntry.getKey()">
54
                        <td>$catalogIdDescriptionEntry.getKey()</td>
30144 amit.gupta 55
                        <td>$catalogIdDescriptionEntry.getValue()</td>
30017 amit.gupta 56
                        #if($isAdmin && $fullAccess)
57
                        <td>
58
                            <button class="btn btn-primary delete-schemes" data-schemeid="$scheme.getId()"
30122 amit.gupta 59
                                    data-catalogid="$catalogIdDescriptionEntry.getKey()">Delete
30017 amit.gupta 60
                            </button>
61
                        #end
62
                    </tr>
63
                    #end
64
                #else
65
                <tr>
66
                    <td colspan="12" style="text-align:center;">NO ITEM FOUND FOR SCHEME</td>
67
                </tr>
68
                #end
69
            </tbody>
70
        </table>
71
        <p></p>
29899 tejbeer 72
        #if($isAdmin && $fullAccess)
30017 amit.gupta 73
            <span>Created By : $scheme.getCreatedBy()</span>
74
            <p></p>
75
            #if((!$scheme.getActiveTimestamp()) && (!$scheme.getExpireTimestamp()))
76
                <div class="btn-group" style="width:40%">
77
                    <button class="btn active-scheme" data="$scheme.getId()"
78
                            style="width:100%;background-color:#e98c8f;color:white;">Active
79
                    </button>
80
                </div>
81
            #else
82
                #if(($scheme.getActiveTimestamp()) && (!$scheme.getExpireTimestamp()))
83
                    <table>
84
                        <td>
85
                            <div class="scheme-extend">
86
                                <div class="row">
87
                                    <div class="col-lg-12">
88
                                        <div class="input-group" style="width:80%">
89
                                            <input type="hidden" value="$scheme.getId()" id="schemeId">
30601 amit.gupta 90
                                            <input placeholder="Extend Date Time" id="extendSchemeById" type="text"
91
                                                   class="form-control" name="extendSchemeById">
92
                                            <span class="input-group-btn"> <button
93
                                                    class="btn btn-primary extendSchemeById"
94
                                                    id="extendScheme-button"
95
                                                    type="button">Extend</button></span>
30017 amit.gupta 96
                                        </div>
97
                                    </div>
98
                                </div>
99
                            </div>
100
                        </td>
101
                        <td>
102
                            <div class="input-group" style="width:80%">
103
                                <input type="hidden" value="$scheme.getId()" id="schemeId">
30601 amit.gupta 104
                                <input placeholder="Expire Time" type="text"
105
                                       class="form-control expireTime" id="exprireScheme" name="expireSchemeById">
30017 amit.gupta 106
                                <span class="input-group-btn">
25069 amit.gupta 107
								<button class="btn btn-primary expire-scheme" data="$scheme.getId()">Expire</button>
25068 amit.gupta 108
							</span>
30017 amit.gupta 109
                            </div>
110
                        </td>
111
                    </table>
112
                    <br><br>
113
                #end
114
            #end
115
        #end
116
    </div>
117
    <div id="newItemToSchemeModal" class="modal" role="dialog">
118
        <div class="modal-dialog">
119
 
120
            <!-- Modal content-->
121
            <div class="modal-content">
122
                <div class="modal-header">
123
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
124
                    <h4 class="modal-title"><b>Add Item To Scheme</b></h4>
125
                </div>
126
                <div class="modal-body">
127
                    <form id="addSchemeForm">
128
                        <div class="form-group row">
129
                            <div class="col-lg-4" style="display: none;">
130
                                <label for="schemeId">SchemeId</label>
131
                                <input type="number" class="form-control" value="$scheme.getId()" id="schemeids"
132
                                       readonly>
133
                            </div>
134
                            <div class="col-lg-4">
135
                                <label for="ItemId"><b>ItemId</b></label>
30122 amit.gupta 136
                                <input type="text" class="form-control" id="catalogids" placeholder="Item Id"/>
30017 amit.gupta 137
                            </div>
138
                        </div>
139
                    </form>
140
                </div>
141
                <div class="modal-footer">
142
                    <button type="button" class="btn btn-primary add-item">Add-Item</button>
143
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
144
                </div>
145
            </div>
146
 
147
        </div>
148
    </div>
22860 ashik.ali 149
</div>