208208 </option>
209209 </select>
210210 </td>
211+ <td> <strong>
212+ <?php echo _translate ("Sample Test Date " ); ?> :
213+ </strong></td>
214+ <td>
215+ <input type="text" id="sampleTestDate" name="sampleTestDate" class="form-control" placeholder="<?php echo _translate ('Select Test Date ' ); ?> " readonly style="width:220px;background:#fff;" />
216+ </td>
211217 </tr>
212218 <tr>
213219 <td colspan="3"> <input type="button" onclick="searchVlRequestData();" value="<?= _translate ('Search ' ); ?> " class="btn btn-success btn-sm">
@@ -397,6 +403,14 @@ class="btn btn-success btn-block">
397403
398404
399405 $(document).ready(function() {
406+ $("#batchCode").select2({
407+ placeholder: "<?php echo _translate ("Select Batch Code " ); ?> ",
408+ allowClear: true
409+ });
410+ $("#sampleType").select2({
411+ placeholder: "<?php echo _translate ("Select Sample Type " ); ?> ",
412+ allowClear: true
413+ });
400414 $("#facilityName").selectize({
401415 plugins: ["restore_on_backspace", "remove_button", "clear_button"],
402416 });
@@ -414,6 +428,32 @@ class="btn btn-success btn-block">
414428 $("#reviewer").select2({
415429 placeholder: "<?php echo _translate ("Select reviewer " ); ?> "
416430 });
431+ $('#sampleTestDate').daterangepicker({
432+ locale: {
433+ cancelLabel: "<?= _translate ("Clear " , true ); ?> ",
434+ format: 'DD-MMM-YYYY',
435+ separator: ' to ',
436+ },
437+ showDropdowns: true,
438+ alwaysShowCalendars: false,
439+ startDate: moment().subtract(28, 'days'),
440+ endDate: moment(),
441+ maxDate: moment(),
442+ ranges: {
443+ 'Today': [moment(), moment()],
444+ 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
445+ 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
446+ 'This Month': [moment().startOf('month'), moment().endOf('month')],
447+ 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
448+ 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
449+ 'Last 90 Days': [moment().subtract(89, 'days'), moment()],
450+ 'Last 120 Days': [moment().subtract(119, 'days'), moment()],
451+ 'Last 180 Days': [moment().subtract(179, 'days'), moment()],
452+ 'Last 12 Months': [moment().subtract(12, 'month').startOf('month'), moment().endOf('month')],
453+ 'Previous Year': [moment().subtract(1, 'year').startOf('year'), moment().subtract(1, 'year').endOf('year')],
454+ 'Current Year To Date': [moment().startOf('year'), moment()]
455+ }
456+ });
417457 $('#sampleCollectionDate').daterangepicker({
418458 locale: {
419459 cancelLabel: "<?= _translate ("Clear " , true ); ?> ",
@@ -445,6 +485,7 @@ function(start, end) {
445485 endDate = end.format('YYYY-MM-DD');
446486 });
447487 $('#sampleCollectionDate').val("");
488+ $('#sampleTestDate').val("");
448489 loadVlRequestData();
449490 });
450491
@@ -519,6 +560,10 @@ function loadVlRequestData() {
519560 "name": "sampleCollectionDate",
520561 "value": $("#sampleCollectionDate").val()
521562 });
563+ aoData.push({
564+ "name": "sampleTestDate",
565+ "value": $("#sampleTestDate").val()
566+ });
522567 aoData.push({
523568 "name": "facilityName",
524569 "value": $("#facilityName").val()
0 commit comments