Subversion Repositories SmartDukaan

Rev

Rev 28556 | Rev 29685 | 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()">
101
                        <td>$offer.getId()</td>
102
                        <td><a class="mk_offer_detail" href="javascript:void(0)">$offer.getName()</a></td>
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>
113
                        <td><a class="download_offer" href="javascript:void(0)">Download Report</a></td>
114
                    </tr>
115
                    #end
116
                    #else
117
                    <tr>
118
                        <td colspan="13" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
119
                    </tr>
120
                    #end
121
                    </tbody>
122
                </table>
123
            </div>
26719 tejbeer 124
        </div>
26674 tejbeer 125
    </div>
27875 amit.gupta 126
 
127
	<div  class="modal" id="offerDescription">
128
		<div class="modal-dialog modal-lg">
129
		    <div class="modal-content" >
130
		    </div>
26719 tejbeer 131
	    </div>
27875 amit.gupta 132
	</div>
133
</section>
134
 
135
<script type="text/javascript">
136
	$(function(){
137
		$("#offerDescription").modal('hide');
138
		$('#offerDescription').on('hide.bs.modal', function () {
139
		  $(this).find(".modal-content").html("");
140
		});
29680 amit.gupta 141
		$("#offer-file-submit").on('click', function(){
142
			var fileSelector = $('#offer-file')[0];
143
			if (fileSelector != undefined && fileSelector.files[0] != undefined) {
144
				if (confirm("Confirm Upload?")) {
145
					doAjaxUploadRequestHandler(context + "/offers/upload",
146
								"POST", fileSelector.files[0], function(
147
										response) {
148
									if (response) {
149
										alert("Offer added successfully");
150
										loadOfferHistory('#main-content', 0);
151
									}
152
								});
153
				}
154
			} else {
155
				alert("Please upload file");
156
			}
157
		});
27875 amit.gupta 158
	});
159
</script>
160
 
26719 tejbeer 161
 
162