Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
26674 tejbeer 1
<style>
27875 amit.gupta 2
    .table-striped > tbody > tr:nth-child(odd) > td {
3
        background: white;
4
        background-color: white;
5
    }
6
 
7
    .table-striped > tbody > tr:nth-child(even) > td {
8
        background: white;
9
        background-color: white;
10
    }
11
 
12
    .table-striped > tbody > tr:hover > td,
13
    .table-striped > tbody > tr:hover {
14
        background-color: #e98c8f;
15
        color: white;
16
    }
17
 
18
    .btn:hover {
19
        color: grey;
20
        text-decoration: none;
21
    }
22
 
23
    .btn-primary:hover {
24
        color: grey;
25
        text-decoration: none;
26
    }
27
 
28
    .sale-details {
29
        cursor: pointer;
30
    }
26674 tejbeer 31
</style>
32
 
33
<section class="wrapper">
27875 amit.gupta 34
    <div class="row">
35
        <div class="col-lg-12">
36
            <h3 class="page-header"><i class="icon_document_alt"></i>OFFERS</h3>
37
            <ol class="breadcrumb">
38
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
39
                <li><i class="icon_document_alt"></i>LISTINGS</li>
40
            </ol>
41
        </div>
42
    </div>
43
 
44
    <table style="Width:100%">
45
 
46
        <td align="left" style="Width:20%">
26719 tejbeer 47
        </td>
27875 amit.gupta 48
 
49
 
26719 tejbeer 50
        <td style="Width:80%">
27875 amit.gupta 51
 
52
            <div id="offer-search">
53
                <div class="row">
54
                    <div class="col-lg-12">
55
                        <div class="col-md-3 col-sm-3 col-xs-12 form-group pull-right top_search">
56
                            <div class="input-group">
29680 amit.gupta 57
                                <input type="file" class="form-control" id="offer-file"
58
                                       placeholder="Uploat Target Offers" />
59
                                <span class="input-group-btn">
60
                      				<button class="btn btn-primary submit" id="offer-file-submit" type="button">Add Offers Using Targets</button>
61
                    			</span>
62
                            </div>
63
                        </div>
64
                        <div class="col-md-3 col-sm-3 col-xs-12 form-group pull-right top_search">
65
                            <div class="input-group">
27875 amit.gupta 66
                                <input type="month" class="form-control" id="yearmonth"
67
                                       placeholder="YYYY-MM" />
68
                                <span class="input-group-btn">
29680 amit.gupta 69
                      				<button class="btn btn-primary submit" id="yearmonth-submit" type="button">Go!</button>
70
                    			</span>
27875 amit.gupta 71
                            </div>
72
                        </div>
73
                    </div>
26719 tejbeer 74
                </div>
27875 amit.gupta 75
            </div>
76
        </td>
77
    </table>
78
    <div id="offer-listings-table">
79
        <div class="row">
80
            <div class="col-lg-12">
81
                <table class="table table-striped table-advance table-hover">
82
                    <tbody>
83
                    <tr>
84
                        <th>Id</th>
85
                        <th>Name</th>
86
                        <th>Target Type</th>
28556 amit.gupta 87
                        <th>Payout Type</th>
27875 amit.gupta 88
                        <th>Scheme Type</th>
89
                        <th>Brand %</th>
90
                        <th>Sellin %</th>
91
                        <th>Partner Criteria</th>
92
                        <th>Item Criteria</th>
93
                        <th>Start</th>
94
                        <th>End</th>
95
                        <th>Created</th>
96
                        <th>Actions</th>
97
                    </tr>
98
                    #if(!$offers.isEmpty())
99
                    #foreach( $offer in $offers )
100
                    <tr class="offer-details" data-offerid="$offer.getId()">
29791 amit.gupta 101
                        <td><a class="mk_offer_detail" href="javascript:void(0)">$offer.getId()</td>
29685 amit.gupta 102
                        <td><a class="mk_partner_view" href="javascript:void(0)">$offer.getName()</a></td>
27875 amit.gupta 103
                        <td>$offer.getTargetType()</td>
28556 amit.gupta 104
                        <td>$offer.getPayoutType()</td>
27875 amit.gupta 105
                        <td>$offer.getSchemeType()</td>
106
                        <td>$offer.getBrandShareTerms()</td>
107
                        <td>$offer.getSellinPercentage()</td>
108
                        <td>$offer.getPartnerCriteriaString()</td>
109
                        <td>$offer.getItemCriteriaString()</td>
110
                        <td>$offer.getStartDate().format($dateFormatter)</td>
111
                        <td>$offer.getEndDate().format($dateFormatter)</td>
112
                        <td>$offer.getCreatedOn().format($dateTimeFormatter)</td>
29908 amit.gupta 113
                        <td>
114
                        	<ul>
115
                        		<li>
116
                        			#if($offer.isActive())
29914 amit.gupta 117
									<a class="mk_offer_inative" href="javascript:void(0)">Mark Inactive</a>
29908 amit.gupta 118
									#else
29914 amit.gupta 119
									<a class="mk_offer_active" href="javascript:void(0)">Mark Active</a>
29908 amit.gupta 120
									#end
121
								</li>
122
                        		<li><a class="download_offer" href="javascript:void(0)">Download Report</a></li>
123
                        	</ul>
124
                        </td>
27875 amit.gupta 125
                    </tr>
126
                    #end
127
                    #else
128
                    <tr>
129
                        <td colspan="13" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
130
                    </tr>
131
                    #end
132
                    </tbody>
133
                </table>
134
            </div>
26719 tejbeer 135
        </div>
26674 tejbeer 136
    </div>
27875 amit.gupta 137
 
138
	<div  class="modal" id="offerDescription">
139
		<div class="modal-dialog modal-lg">
140
		    <div class="modal-content" >
141
		    </div>
26719 tejbeer 142
	    </div>
27875 amit.gupta 143
	</div>
144
</section>
145
 
146
<script type="text/javascript">
147
	$(function(){
148
		$("#offerDescription").modal('hide');
149
		$('#offerDescription').on('hide.bs.modal', function () {
150
		  $(this).find(".modal-content").html("");
151
		});
29680 amit.gupta 152
		$("#offer-file-submit").on('click', function(){
153
			var fileSelector = $('#offer-file')[0];
154
			if (fileSelector != undefined && fileSelector.files[0] != undefined) {
155
				if (confirm("Confirm Upload?")) {
156
					doAjaxUploadRequestHandler(context + "/offers/upload",
157
								"POST", fileSelector.files[0], function(
158
										response) {
159
									if (response) {
160
										alert("Offer added successfully");
29685 amit.gupta 161
										loadOfferHistory('#main-content', moment(new Date()).format("YYYY-MM"));
29680 amit.gupta 162
									}
163
								});
164
				}
165
			} else {
166
				alert("Please upload file");
167
			}
168
		});
27875 amit.gupta 169
	});
170
</script>
171
 
26719 tejbeer 172
 
173