Merge branch 'CI4-Application' of bitbucket.org:venbainformationtechnology/ria into CI4-Application
This commit is contained in:
commit
a6620b84e8
@ -1,43 +1,36 @@
|
|||||||
<style>
|
<style>
|
||||||
.pagination {
|
|
||||||
margin: 0px !important;
|
.Date-filter-form {
|
||||||
}
|
display: flex;
|
||||||
</style>
|
align-items: center;
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
|
gap: 10px; /* Adjust the gap as needed */
|
||||||
<!-- Latest DataTables Buttons CSS -->
|
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.3.4/css/buttons.dataTables.min.css">
|
|
||||||
<style>
|
|
||||||
.dataTables_wrapper .dataTables_length select {
|
|
||||||
background-color:white !important;
|
|
||||||
}
|
|
||||||
.dataTables_wrapper .dataTables_filter input {
|
|
||||||
background-color: white !important;
|
|
||||||
}
|
|
||||||
button.dt-button, div.dt-button, a.dt-button, input.dt-button {
|
|
||||||
background-color: white !important;
|
|
||||||
}
|
|
||||||
.dataTables_length, label{
|
|
||||||
display: flex !important;
|
|
||||||
}
|
|
||||||
.dataTables_wrapper .dataTables_filter {
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
.dataTables_wrapper .dataTables_length {
|
.Date-filter-form input, .Date-filter-form button {
|
||||||
float: left;
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.dataTables_wrapper .dt-buttons {
|
.Date-filter-form button {
|
||||||
float: right;
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.dataTables_wrapper .clear {
|
.Date-filter-form button:hover {
|
||||||
clear: both;
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
}
|
}
|
||||||
th, td {
|
th, td {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.dataTables_wrapper {
|
|
||||||
width: 100%;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
@ -77,6 +70,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
<!-- /.box-header -->
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter" >
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
|
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
@ -178,19 +183,84 @@
|
|||||||
<!-- /.content -->
|
<!-- /.content -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.content-wrapper -->
|
<!-- /.content-wrapper -->
|
||||||
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||||
<!-- Latest DataTables JS -->
|
<script>
|
||||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
$(document).ready(function() {
|
||||||
<!-- Latest DataTables Buttons JS -->
|
// Initialize the DataTable
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
|
var table = $('#dataTableHistoriek').DataTable({
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
|
"paging": true,
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
|
"lengthChange": true,
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
"searching": true,
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
"ordering": true,
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
"columnDefs": [{
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
|
"targets": 1,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[1, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
<script>
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[1]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- <script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||||
$('#dataTableHistoriek').DataTable({
|
$('#dataTableHistoriek').DataTable({
|
||||||
@ -225,4 +295,4 @@
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script> -->
|
||||||
@ -13,6 +13,34 @@
|
|||||||
th {
|
th {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px; /* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
.Date-filter-form input, .Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
@ -47,6 +75,18 @@
|
|||||||
<center><b><h3 class="box-title">View Inward Gate Register </h3></b></center>
|
<center><b><h3 class="box-title">View Inward Gate Register </h3></b></center>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter" >
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
@ -1483,72 +1523,85 @@ function deleteBill(Billno,i){
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm A');
|
// Initialize the DataTable
|
||||||
$('#Inwardgateregistertable').DataTable({
|
var table = $('#Inwardgateregistertable').DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"aaSorting": [[ 0, "desc" ]],
|
"columnDefs": [{
|
||||||
"order": [[0, "desc"]],
|
"targets": 1,
|
||||||
"pageLength": 10,
|
"type": "date-eu"
|
||||||
"lengthMenu": [5, 10, 20, 50, 100, 200, 500],
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[1, "desc"]
|
||||||
|
],
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
"dom": "<'row'<'col-sm-3'l><'col-sm-6 text-center'f><'col-sm-3 text-right'B>>" +
|
"pageLength": 10,
|
||||||
"<'row'<'col-sm-12'tr>>" +
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
|
||||||
"buttons": [
|
});
|
||||||
{
|
|
||||||
extend: 'excelHtml5',
|
// Initialize the datepickers
|
||||||
text: 'Export to Excel',
|
$("#fromDate").datepicker({
|
||||||
title: 'Inward Gate Register',
|
dateFormat: 'dd-mm-yy',
|
||||||
exportOptions: {
|
onSelect: function(selectedDate) {
|
||||||
columns: ':visible:not(:first-child):not(:last-child)' // Exclude first and last columns
|
var minDate = $(this).datepicker("getDate");
|
||||||
}
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
},
|
}
|
||||||
{
|
});
|
||||||
extend: 'pdfHtml5',
|
|
||||||
text: 'Export to PDF',
|
$("#toDate").datepicker({
|
||||||
title: 'Inward Gate Register',
|
dateFormat: 'dd-mm-yy',
|
||||||
customize: function (doc) {
|
onSelect: function(selectedDate) {
|
||||||
doc.content[1].margin = [ 10, 0, 10, 0 ]; // left, top, right, bottom
|
var maxDate = $(this).datepicker("getDate");
|
||||||
doc.pageSize = 'A4'; // Ensure it's A4
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
doc.pageOrientation = 'landscape'; // Set landscape orientation
|
}
|
||||||
doc.defaultStyle.fontSize = 10; // Set default font size
|
});
|
||||||
doc.styles.tableHeader.fontSize = 12; // Set font size for header
|
|
||||||
},
|
// Reset button functionality
|
||||||
exportOptions: {
|
$("#resetButton").click(function() {
|
||||||
columns: ':visible:not(:first-child):not(:last-child)' // Exclude first and last columns
|
$("#fromDate").datepicker("setDate", null);
|
||||||
}
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[1]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
}
|
}
|
||||||
]
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
.dataTables_wrapper .col-sm-3 .dataTables_length {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.dataTables_wrapper .col-sm-6 .dataTables_filter {
|
|
||||||
float: none;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.dataTables_wrapper .col-sm-3 .dt-buttons {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
<script>
|
||||||
function appendExistingFilesFileds(data){
|
function appendExistingFilesFileds(data){
|
||||||
const base_url = '<?php echo base_url(); ?>';
|
const base_url = '<?php echo base_url(); ?>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user