| Line 163... |
Line 163... |
| 163 |
schemeObject['type'] = $("#schemeType option:selected").val();
|
163 |
schemeObject['type'] = $("#schemeType option:selected").val();
|
| 164 |
schemeObject['amountType'] = $("#amountType option:selected").val();
|
164 |
schemeObject['amountType'] = $("#amountType option:selected").val();
|
| 165 |
schemeObject['amount'] = $('#schemeAmount').val();
|
165 |
schemeObject['amount'] = $('#schemeAmount').val();
|
| 166 |
schemeObject['partnerType'] = $('#retailerType').val();
|
166 |
schemeObject['partnerType'] = $('#retailerType').val();
|
| 167 |
schemeObject['cashback'] = $("#cashbackScheme").is(":checked")
|
167 |
schemeObject['cashback'] = $("#cashbackScheme").is(":checked")
|
| 168 |
schemeObject['startDate'] = startDate;
|
168 |
schemeObject['startDate'] = $("#schemeDuration").data().startDate.format(moment.HTML5_FMT.DATETIME_LOCAL_SECONDS);
|
| 169 |
schemeObject['endDate'] = endDate;
|
169 |
schemeObject['endDate'] = $("#schemeDuration").data().endDate.format(moment.HTML5_FMT.DATETIME_LOCAL_SECONDS);
|
| 170 |
schemeObject['itemIds'] = [];
|
170 |
schemeObject['itemIds'] = [];
|
| 171 |
var itemIds = $("select.tagListingItemsDescription").val();
|
171 |
var itemIds = $("select.tagListingItemsDescription").val();
|
| 172 |
//var itemIds = itemIdsString.substring(1, itemIdsString.length - 1).split(",");
|
172 |
//var itemIds = itemIdsString.substring(1, itemIdsString.length - 1).split(",");
|
| 173 |
for(var i = 0; i < itemIds.length; i++){
|
173 |
for (var i = 0; i < itemIds.length; i++) {
|
| 174 |
schemeObject['itemIds'].push(parseInt(itemIds[i]));
|
174 |
schemeObject['itemIds'].push(parseInt(itemIds[i]));
|
| 175 |
}
|
175 |
}
|
| 176 |
return JSON.stringify(schemeObject);
|
176 |
return JSON.stringify(schemeObject);
|
| 177 |
}
|
177 |
}
|
| 178 |
|
178 |
|