Subversion Repositories SmartDukaan

Rev

Rev 34066 | 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;">
34508 ranu 46
        #if(!$isAnalysis)
33092 tejus.loha 47
        #springMessage("reportspricedrop.from") <input type="date" id="startDate-price-drop-report" placeholder=""
48
                                                       name="" value="$startDate">
49
 
50
        #springMessage("reportspricedrop.to") <input type="date" id="endDate-price-drop-report" placeholder=""
51
                                                     value="$endDate">
33067 shampa 52
        <button type="submit" class="price-drop-fetch-report">Fetch Report</button>
33092 tejus.loha 53
        <button type="submit" class="download-price-drop-report">#springMessage(
34508 ranu 54
                "reportspricedrop.downloadreport") </button>
55
        #else
56
            #springMessage("reportspricedrop.from") <input type="date" id="analysis-startDate-price-drop-report"
57
                                                           placeholder=""
58
                                                           name="" value="$startDate">
33067 shampa 59
 
34508 ranu 60
            #springMessage("reportspricedrop.to") <input type="date" id="analysis-endDate-price-drop-report"
61
                                                         placeholder=""
62
                                                         value="$endDate">
63
            <button type="submit" class="analysis-price-drop-fetch-report" data-fofoid="$fofoId">Fetch Report</button>
64
            <button type="submit" class="analysis-download-price-drop-report" data-fofoid="$fofoId">#springMessage(
65
                "reportspricedrop.downloadreport") </button>
66
        #end
67
 
33092 tejus.loha 68
    </div>
30164 manish 69
    <div class="col-lg-12">
70
        <table class="table table-border table-condensed table-bordered" id="priceDropReportTbl" style="width:100%">
71
 
72
            <thead class="row htable" style="background:#F5F5F5;">
73
            <tr style="color:black;">
33092 tejus.loha 74
 
75
                <th>#springMessage("reportspricedrop.code")</th>
76
                <th>#springMessage("reportspricedrop.pricedropid")</th>
77
                <th>#springMessage("reportspricedrop.brand")</th>
78
                <th>#springMessage("reportspricedrop.modelname")</th>
79
 
80
                <th>#springMessage("reportspricedrop.modelnumber")</th>
81
                <th>#springMessage("reportspricedrop.affectedon")</th>
82
                <th>#springMessage("reportspricedrop.amount")</th>
33143 tejus.loha 83
                <th>Credit Date</th>
33092 tejus.loha 84
 
85
                <th>#springMessage("reportspricedrop.imei")</th>
86
                <th>#springMessage("reportspricedrop.status")</th>
33143 tejus.loha 87
                <th>Rejected date</th>
88
                <th>Rejected Reason</th>
33092 tejus.loha 89
 
90
 
91
            </tr>
30164 manish 92
            </thead>
93
            <tbody>
94
                #foreach($pdr in $priceDropReports )
33092 tejus.loha 95
                <tr>
30164 manish 96
                    <td>$pdr.getCode()</td>
97
                    <td>$pdr.getId()</td>
98
                    <td>$pdr.getBrand()</td>
33092 tejus.loha 99
                    <td>$pdr.getModelName()</td>
100
 
30164 manish 101
                    <td>$pdr.getModelNumber()</td>
33143 tejus.loha 102
 
103
                    <td>$pdr.getAffectedOn().format($dateFormatter)</td>
30164 manish 104
                    <td>$pdr.getAmount()</td>
33143 tejus.loha 105
                    #if($pdr.getCreditTimestamp())
106
                        <td>$pdr.getCreditTimestamp().format($dateTimeFormatter)</td>
107
                    #else
108
                        <td>--</td>
109
                    #end
33092 tejus.loha 110
 
33143 tejus.loha 111
 
30164 manish 112
                    <td>$pdr.getImei()</td>
113
                    <td>$pdr.getStatus()</td>
32976 shampa 114
 
33092 tejus.loha 115
 
33143 tejus.loha 116
                    #if($pdr.getRejectedTimestamp())
117
                        <td>$pdr.getRejectedTimestamp().format($dateTimeFormatter)</td>
30164 manish 118
                    #else
33092 tejus.loha 119
                        <td>--</td>
30164 manish 120
                    #end
33092 tejus.loha 121
 
30164 manish 122
                    #if($pdr.getRejectionReason())
33092 tejus.loha 123
                        <td>$pdr.getRejectionReason()</td>
124
 
30164 manish 125
                    #else
33092 tejus.loha 126
                        <td>--</td>
30164 manish 127
                    #end
33092 tejus.loha 128
 
129
                </tr>
30164 manish 130
                #end
131
 
132
            </tbody>
133
 
134
        </table>
135
    </div>
33092 tejus.loha 136
 
30164 manish 137
</section>
138
 
139
 
140
<script>
141
 
33092 tejus.loha 142
    var dtable = $('#priceDropReportTbl').DataTable(
143
            {
144
                "scrollX": true,
145
                "bPaginate": true,
146
                "bLengthChange": true,
147
                "bFilter": true,
148
                "bInfo": false,
149
                "bAutoWidth": false,
150
 
151
 
152
            });
153
 
154
 
155
</script>
156
#if($isAdmin)
157
<script type="text/javascript">
158
    $(function () {
159
        getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
160
            partnerId = selectedPartner.partnerId;
161
 
162
            console.log(partnerId);
163
        });
164
    });
34066 aman.kumar 165
    $(function () {
166
        $('#fofo-users').on('change', function () {
167
            var selectedFofoId = $(this).val();
168
            if (selectedFofoId) {
169
                partnerId = selectedFofoId;
170
                console.log("Partner ID set to:", partnerId);
171
            } else {
172
                alert("Please select a valid Fofo ID.");
173
            }
174
        });
175
    });
33092 tejus.loha 176
</script>
177
+#end
30164 manish 178