From 02e55181206c11b0b6abc2987c08165c9ef030c8 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Thu, 24 Apr 2025 17:40:28 +0530 Subject: [PATCH 1/3] Edit page pagination reset : GWM --- app/Views/configlisting.php | 14 +++++++++++++- app/Views/costListing.php | 14 +++++++++++++- app/Views/departmentListing.php | 15 ++++++++++++++- app/Views/editconfig.php | 16 ++++++++++++++-- app/Views/factoryMachineMasterDetails.php | 14 +++++++++++++- app/Views/supplierListing.php | 14 +++++++++++++- app/Views/transporterListing.php | 16 ++++++++++++++-- app/Views/userListing.php | 23 ++++++++++++++++++++--- 8 files changed, 114 insertions(+), 12 deletions(-) diff --git a/app/Views/configlisting.php b/app/Views/configlisting.php index 0796b75a..aec8b2ad 100755 --- a/app/Views/configlisting.php +++ b/app/Views/configlisting.php @@ -172,7 +172,7 @@ isActive == 1 ? 'Active' : 'InActive'; ?> - ; // Default to 1 if not set diff --git a/app/Views/costListing.php b/app/Views/costListing.php index a6a70462..7d49da7e 100755 --- a/app/Views/costListing.php +++ b/app/Views/costListing.php @@ -134,7 +134,7 @@     -    - \ No newline at end of file diff --git a/app/Views/factoryMachineMasterDetails.php b/app/Views/factoryMachineMasterDetails.php index a3545514..4b752a24 100644 --- a/app/Views/factoryMachineMasterDetails.php +++ b/app/Views/factoryMachineMasterDetails.php @@ -170,7 +170,7 @@ - @@ -241,6 +241,18 @@ e.preventDefault(); table.draw(); }); + + $('#datatable').on('click', '.edit-btn', function () { + const pageInfo = table.page.info(); // Now this works + sessionStorage.setItem("datatablePage", pageInfo.page); + }); + + // Restore page + let startPage = sessionStorage.getItem("datatablePage"); + if (startPage !== null) { + table.page(parseInt(startPage)).draw('page'); + sessionStorage.removeItem("datatablePage"); + } }); diff --git a/app/Views/supplierListing.php b/app/Views/supplierListing.php index 7500691f..e0df865e 100755 --- a/app/Views/supplierListing.php +++ b/app/Views/supplierListing.php @@ -155,7 +155,7 @@ -     -    + class="fa fa-edit edit-btn">       @@ -351,6 +351,18 @@ } }); + $('#transporter_list').on('click', '.edit-btn', function () { + const pageInfo = table.page.info(); // Now this works + sessionStorage.setItem("datatablePage", pageInfo.page); + }); + + // Restore page + let startPage = sessionStorage.getItem("datatablePage"); + if (startPage !== null) { + table.page(parseInt(startPage)).draw('page'); + sessionStorage.removeItem("datatablePage"); + } + // Date range filter function $.fn.dataTable.ext.search.push( function (settings, data, dataIndex) { diff --git a/app/Views/userListing.php b/app/Views/userListing.php index 1150bddd..77693d12 100755 --- a/app/Views/userListing.php +++ b/app/Views/userListing.php @@ -151,7 +151,7 @@ isDeleted == 1) { ?> - @@ -160,7 +160,7 @@ - + @@ -207,6 +207,8 @@ var answer = confirm(" Do you want to delete the user from the List?") if (answer) {return;}else{event.preventDefault();} } + + @@ -303,4 +318,6 @@ console.log("Checkbox changed, submitting form..."); $("#archiveFormId").submit(); }); - \ No newline at end of file + + + From 088afd3479892e6a5274e455a5b46796d3bab460 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Thu, 24 Apr 2025 17:43:24 +0530 Subject: [PATCH 2/3] stock changes 24-04-2025 --- app/Views/stock/CoatingMachineDetail.php | 2 +- app/Views/stock/bagStockDetails.php | 2 +- app/Views/stock/dieselStockDetails.php | 2 +- app/Views/stock/drierMachineDetails.php | 6 +++--- app/Views/stock/dustAndRoughStockDetails.php | 2 +- app/Views/stock/gasStockDetails.php | 2 +- app/Views/stock/incomingSilicaSandDetails.php | 2 +- app/Views/stock/powerConsumptionDetails.php | 2 +- app/Views/stock/resinStockDetails.php | 2 +- app/Views/stock/trpProductionStockDetails.php | 2 +- app/Views/stock/trpSandUseStockDetails.php | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Views/stock/CoatingMachineDetail.php b/app/Views/stock/CoatingMachineDetail.php index 1d1a29a4..fd4a2cb9 100644 --- a/app/Views/stock/CoatingMachineDetail.php +++ b/app/Views/stock/CoatingMachineDetail.php @@ -181,7 +181,7 @@ /*background-color: #fff;*/ /* */ border: 1px solid #ccc; - padding: 10px 4px; + padding: 5px 6px; min-width: 120px; max-width: 120px; } diff --git a/app/Views/stock/bagStockDetails.php b/app/Views/stock/bagStockDetails.php index b1b523d5..151f6031 100644 --- a/app/Views/stock/bagStockDetails.php +++ b/app/Views/stock/bagStockDetails.php @@ -183,7 +183,7 @@ /* */ text-align: center; border: 1px solid #ccc; - padding: 10px 6px; + padding: 5px 6px; } diff --git a/app/Views/stock/dieselStockDetails.php b/app/Views/stock/dieselStockDetails.php index f5b2da8f..f6b90cf8 100644 --- a/app/Views/stock/dieselStockDetails.php +++ b/app/Views/stock/dieselStockDetails.php @@ -187,7 +187,7 @@ /* */ text-align: center; border: 1px solid #ccc; - padding: 10px 6px; + padding: 5px 6px; } diff --git a/app/Views/stock/drierMachineDetails.php b/app/Views/stock/drierMachineDetails.php index e990901d..5d2a39d8 100644 --- a/app/Views/stock/drierMachineDetails.php +++ b/app/Views/stock/drierMachineDetails.php @@ -184,7 +184,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); /*background-color: #fff;*/ /* */ border: 1px solid #ccc; - padding: 10px 4px; + padding: 5px 6px; min-width: 120px; max-width: 120px; } @@ -452,7 +452,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');