| Line 1... |
Line 1... |
| 1 |
$(document).on('click', 'a.list-group-item', function() {
|
1 |
$(document).on('click', 'a.list-group-item', function() {
|
| 2 |
startDate=undefined;
|
- |
|
| 3 |
endDate=undefined;
|
- |
|
| 4 |
reportTitle = $(this).find('h4').html();
|
2 |
reportTitle = $(this).find('h4').html();
|
| 5 |
reportUrl = this.href;
|
3 |
reportUrl = this.href;
|
| 6 |
$reportModal = $('#report-modal');
|
4 |
$reportModal = $('#report-modal');
|
| 7 |
$reportModal.find('h4.modal-title').html(reportTitle);
|
5 |
$reportModal.find('h4.modal-title').html(reportTitle);
|
| 8 |
if($(this).data("paramslist") == undefined) {
|
6 |
if($(this).data("paramslist") == undefined) {
|
| Line 213... |
Line 211... |
| 213 |
bootbox.alert(`${param.displayName} is required`);
|
211 |
bootbox.alert(`${param.displayName} is required`);
|
| 214 |
validated = false;
|
212 |
validated = false;
|
| 215 |
return false;
|
213 |
return false;
|
| 216 |
}
|
214 |
}
|
| 217 |
if(param.type=='DATE') {
|
215 |
if(param.type=='DATE') {
|
| 218 |
reportParams[`MANUAL_${inputName}`] = startDate;
|
216 |
reportParams[`MANUAL_${inputName}`] = getReporticoDatesFromPicker(inputElement).startDate;
|
| 219 |
} else if(param.type=='DATE_RANGE') {
|
217 |
} else if(param.type=='DATE_RANGE') {
|
| 220 |
reportParams[`MANUAL_${inputName}_FROMDATE`] = startDate;
|
218 |
reportParams[`MANUAL_${inputName}_FROMDATE`] = getReporticoDatesFromPicker(inputElement).startDate;
|
| 221 |
reportParams[`MANUAL_${inputName}_TODATE`] = endDate;
|
219 |
reportParams[`MANUAL_${inputName}_TODATE`] = getReporticoDatesFromPicker(inputElement).endDate;
|
| 222 |
} else {
|
220 |
} else {
|
| 223 |
if(['code', 'warehouseId'].indexOf(param.name) >= 0) {
|
221 |
if(['code', 'warehouseId'].indexOf(param.name) >= 0) {
|
| 224 |
if(typeof $(inputElement).val() == "string") {
|
222 |
if(typeof $(inputElement).val() == "string") {
|
| 225 |
reportParams[`${inputName}`] = $(inputElement).val();
|
223 |
reportParams[`${inputName}`] = $(inputElement).val();
|
| 226 |
} else {
|
224 |
} else {
|
| Line 255... |
Line 253... |
| 255 |
case "DATE": {
|
253 |
case "DATE": {
|
| 256 |
$inputContainer.append(`<div class="form-group">
|
254 |
$inputContainer.append(`<div class="form-group">
|
| 257 |
<label>${param.displayText}</label>
|
255 |
<label>${param.displayText}</label>
|
| 258 |
<input name="${param.name}" type="text" value="" class="param form-control input-sm">
|
256 |
<input name="${param.name}" type="text" value="" class="param form-control input-sm">
|
| 259 |
</div>`);
|
257 |
</div>`);
|
| 260 |
$inputContainer.find(`input[name="${param.name}"]`).daterangepicker(getSingleDatePicker(),reporticoDRCallback);
|
258 |
$inputContainer.find(`input[name="${param.name}"]`).daterangepicker(getSingleDatePicker());
|
| 261 |
reporticoDRCallback(moment(), moment());
|
- |
|
| 262 |
return;
|
259 |
return;
|
| 263 |
}
|
260 |
}
|
| 264 |
case "DATE_RANGE" : {
|
261 |
case "DATE_RANGE" : {
|
| 265 |
$inputContainer.append(`<div class="form-group">
|
262 |
$inputContainer.append(`<div class="form-group">
|
| 266 |
<label>${param.displayText}</label>
|
263 |
<label>${param.displayText}</label>
|
| 267 |
<input name="${param.name}" type="text" value="" class="param form-control input-sm">
|
264 |
<input name="${param.name}" type="text" value="" class="param form-control input-sm">
|
| 268 |
</div>`);
|
265 |
</div>`);
|
| 269 |
$inputContainer.find(`input[name="${param.name}"]`).daterangepicker(getRangedDatePicker(true),reporticoDRCallback);
|
266 |
$inputContainer.find(`input[name="${param.name}"]`).daterangepicker(getRangedDatePicker(true));
|
| 270 |
reporticoDRCallback(moment(), moment());
|
- |
|
| 271 |
return;
|
267 |
return;
|
| 272 |
}
|
268 |
}
|
| 273 |
case "STRING": {
|
269 |
case "STRING": {
|
| 274 |
if(param.name=="authId") {
|
270 |
if(param.name=="authId") {
|
| 275 |
$inputContainer.append(`
|
271 |
$inputContainer.append(`
|