Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
33092 tejus.loha 1
<section class="wrapper">
2
    <div class="row">
3
        <div class="col-lg-12">
4
            <h3 class="page-header"><i class="icon_document_alt"></i>#springMessage("reportspricedrop.pricedrops")
5
            </h3>
6
            <ol class="breadcrumb">
7
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">#springMessage(
8
                    "reportspricedrop.home")</a></li>
9
                <li><i class="icon_document_alt"></i>#springMessage("reportspricedrop.pricedrops")
10
                </li>
11
            </ol>
12
        </div>
13
    </div>
14
 
15
 
34066 aman.kumar 16
 
33092 tejus.loha 17
    #if($isAdmin)
34066 aman.kumar 18
        #if($isRBM)
19
            <div style="padding: 5px 10px; margin-top: 2px"
20
                 class="col-lg-2 form-group">
21
                <select class="form-control input-sm" id="fofo-users" name="Item" placeholder="Partners">
22
                    <option value="" disabled selected>Partners</option>
23
                    #foreach($fofoId in $customRetailersMap.keySet())
24
                        <option value="$fofoId"
25
                                data-email="$customRetailersMap.get($fofoId).getEmail()">$customRetailersMap.get($fofoId).getBusinessName()</option>
26
                    #end
27
                </select>
28
            </div>
29
        #else
33092 tejus.loha 30
        <div class="row col-lg-12" style="float: right;">
31
            <div class="col-lg-2">
32
                <div class="input-group">
33
                    <input placeholder="Enter Partner Name" type="text" class="typeahead form-control"
34
                           id="typeaheadpartner"
35
                           name="Item" data-provide="typeahead" autocomplete="off"
36
                           style="margin-bottom: 10px;margin-left: 22px"> <input id="partnerId"
37
                                                                                 type="hidden">
38
                    <br>
39
                </div>
40
            </div>
41
        </div>
42
    #end
34066 aman.kumar 43
    #end
44
    <br>
33092 tejus.loha 45
    <div class="row col-lg-12" style="float: right;">
46
 
47
 
48
        #springMessage("reportspricedrop.from") <input type="date" id="startDate-price-drop-report" placeholder=""
49
                                                       name="" value="$startDate">
50
 
51
        #springMessage("reportspricedrop.to") <input type="date" id="endDate-price-drop-report" placeholder=""
52
                                                     value="$endDate">
33067 shampa 53
        <button type="submit" class="price-drop-fetch-report">Fetch Report</button>
33092 tejus.loha 54
        <button type="submit" class="download-price-drop-report">#springMessage(
55
            "reportspricedrop.downloadreport") </button>
33067 shampa 56
 
33092 tejus.loha 57
    </div>
30164 manish 58
    <div class="col-lg-12">
59
        <table class="table table-border table-condensed table-bordered" id="priceDropReportTbl" style="width:100%">
60
 
61
            <thead class="row htable" style="background:#F5F5F5;">
62
            <tr style="color:black;">
33092 tejus.loha 63
 
64
                <th>#springMessage("reportspricedrop.code")</th>
65
                <th>#springMessage("reportspricedrop.pricedropid")</th>
66
                <th>#springMessage("reportspricedrop.brand")</th>
67
                <th>#springMessage("reportspricedrop.modelname")</th>
68
 
69
                <th>#springMessage("reportspricedrop.modelnumber")</th>
70
                <th>#springMessage("reportspricedrop.affectedon")</th>
71
                <th>#springMessage("reportspricedrop.amount")</th>
33143 tejus.loha 72
                <th>Credit Date</th>
33092 tejus.loha 73
 
74
                <th>#springMessage("reportspricedrop.imei")</th>
75
                <th>#springMessage("reportspricedrop.status")</th>
33143 tejus.loha 76
                <th>Rejected date</th>
77
                <th>Rejected Reason</th>
33092 tejus.loha 78
 
79
 
80
            </tr>
30164 manish 81
            </thead>
82
            <tbody>
83
                #foreach($pdr in $priceDropReports )
33092 tejus.loha 84
                <tr>
30164 manish 85
                    <td>$pdr.getCode()</td>
86
                    <td>$pdr.getId()</td>
87
                    <td>$pdr.getBrand()</td>
33092 tejus.loha 88
                    <td>$pdr.getModelName()</td>
89
 
30164 manish 90
                    <td>$pdr.getModelNumber()</td>
33143 tejus.loha 91
 
92
                    <td>$pdr.getAffectedOn().format($dateFormatter)</td>
30164 manish 93
                    <td>$pdr.getAmount()</td>
33143 tejus.loha 94
                    #if($pdr.getCreditTimestamp())
95
                        <td>$pdr.getCreditTimestamp().format($dateTimeFormatter)</td>
96
                    #else
97
                        <td>--</td>
98
                    #end
33092 tejus.loha 99
 
33143 tejus.loha 100
 
30164 manish 101
                    <td>$pdr.getImei()</td>
102
                    <td>$pdr.getStatus()</td>
32976 shampa 103
 
33092 tejus.loha 104
 
33143 tejus.loha 105
                    #if($pdr.getRejectedTimestamp())
106
                        <td>$pdr.getRejectedTimestamp().format($dateTimeFormatter)</td>
30164 manish 107
                    #else
33092 tejus.loha 108
                        <td>--</td>
30164 manish 109
                    #end
33092 tejus.loha 110
 
30164 manish 111
                    #if($pdr.getRejectionReason())
33092 tejus.loha 112
                        <td>$pdr.getRejectionReason()</td>
113
 
30164 manish 114
                    #else
33092 tejus.loha 115
                        <td>--</td>
30164 manish 116
                    #end
33092 tejus.loha 117
 
118
                </tr>
30164 manish 119
                #end
120
 
121
            </tbody>
122
 
123
        </table>
124
    </div>
33092 tejus.loha 125
 
30164 manish 126
</section>
127
 
128
 
129
<script>
130
 
33092 tejus.loha 131
    var dtable = $('#priceDropReportTbl').DataTable(
132
            {
133
                "scrollX": true,
134
                "bPaginate": true,
135
                "bLengthChange": true,
136
                "bFilter": true,
137
                "bInfo": false,
138
                "bAutoWidth": false,
139
 
140
 
141
            });
142
 
143
 
144
</script>
145
#if($isAdmin)
146
<script type="text/javascript">
147
    $(function () {
148
        getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
149
            partnerId = selectedPartner.partnerId;
150
 
151
            console.log(partnerId);
152
        });
153
    });
34066 aman.kumar 154
    $(function () {
155
        $('#fofo-users').on('change', function () {
156
            var selectedFofoId = $(this).val();
157
            if (selectedFofoId) {
158
                partnerId = selectedFofoId;
159
                console.log("Partner ID set to:", partnerId);
160
            } else {
161
                alert("Please select a valid Fofo ID.");
162
            }
163
        });
164
    });
33092 tejus.loha 165
</script>
166
+#end
30164 manish 167