From cfa699d6acc5289ebbfef7d92af41e166f5fe728 Mon Sep 17 00:00:00 2001 From: yoganandhan Date: Wed, 21 Jan 2026 15:07:58 +0530 Subject: [PATCH] changes in facilitywise login --- .../templates/modules/swm/biogas.html | 62 ----------------- .../templates/modules/swm/gwtcwaste.html | 67 ------------------- .../templates/modules/swm/incinerator.html | 65 ------------------ .../resources/templates/modules/swm/mcc.html | 63 ----------------- .../resources/templates/modules/swm/mrf.html | 62 ----------------- .../templates/modules/swm/plastingbaling.html | 65 ------------------ .../templates/modules/swm/windrow.html | 63 ----------------- 7 files changed, 447 deletions(-) diff --git a/src/main/resources/templates/modules/swm/biogas.html b/src/main/resources/templates/modules/swm/biogas.html index 732e866..a3ba5a3 100644 --- a/src/main/resources/templates/modules/swm/biogas.html +++ b/src/main/resources/templates/modules/swm/biogas.html @@ -752,68 +752,6 @@ - - function submitRdoDecision(status) { - - let date = ($("#date").val() || "").trim(); - let = $("#detailsModal").data("refid"); - let approvedBy = $("#userName").val(); // 🔥 FROM HIDDEN INPUT - - if (!remarks) { - Swal.fire({ - icon: 'warning', - title: 'Remarks Required', - text: 'Please enter remarks before submitting' - }); - return; - } - - Swal.fire({ - title: `Are you sure?`, - text: `You want to ${status.toLowerCase()} this request`, - icon: status === 'APPROVED' ? 'success' : 'error', - showCancelButton: true, - confirmButtonColor: status === 'APPROVED' ? '#28a745' : '#dc3545', - cancelButtonColor: '#6c757d', - confirmButtonText: `Yes, ${status}` - }).then((result) => { - - if (!result.isConfirmed) return; - - $.ajax({ - url: "/gcc/api/flagpoleregistration/rdo/updateDecision", - type: "POST", - data: { - refid: refid, - status: status, - remarks: remarks, - approvedBy: approvedBy // 🔥 PASS TO BACKEND - }, - success: function (res) { - - Swal.fire({ - icon: 'success', - title: status === 'APPROVED' ? 'Approved!' : 'Rejected!', - text: res.message || `Request has been ${status.toLowerCase()}`, - timer: 2000, - showConfirmButton: false - }); - - $("#detailsModal").modal("hide"); - $("#QaqcDatatable").DataTable().ajax.reload(null, false); - }, - error: function () { - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to update decision' - }); - } - }); - }); - } - - diff --git a/src/main/resources/templates/modules/swm/gwtcwaste.html b/src/main/resources/templates/modules/swm/gwtcwaste.html index 9d64aa4..67964cc 100644 --- a/src/main/resources/templates/modules/swm/gwtcwaste.html +++ b/src/main/resources/templates/modules/swm/gwtcwaste.html @@ -436,73 +436,6 @@ }); - - - - - - - function submitRdoDecision(status) { - - let date = ($("#date").val() || "").trim(); - let = $("#detailsModal").data("refid"); - let approvedBy = $("#userName").val(); // 🔥 FROM HIDDEN INPUT - - if (!remarks) { - Swal.fire({ - icon: 'warning', - title: 'Remarks Required', - text: 'Please enter remarks before submitting' - }); - return; - } - - Swal.fire({ - title: `Are you sure?`, - text: `You want to ${status.toLowerCase()} this request`, - icon: status === 'APPROVED' ? 'success' : 'error', - showCancelButton: true, - confirmButtonColor: status === 'APPROVED' ? '#28a745' : '#dc3545', - cancelButtonColor: '#6c757d', - confirmButtonText: `Yes, ${status}` - }).then((result) => { - - if (!result.isConfirmed) return; - - $.ajax({ - url: "/gcc/api/flagpoleregistration/rdo/updateDecision", - type: "POST", - data: { - refid: refid, - status: status, - remarks: remarks, - approvedBy: approvedBy // 🔥 PASS TO BACKEND - }, - success: function (res) { - - Swal.fire({ - icon: 'success', - title: status === 'APPROVED' ? 'Approved!' : 'Rejected!', - text: res.message || `Request has been ${status.toLowerCase()}`, - timer: 2000, - showConfirmButton: false - }); - - $("#detailsModal").modal("hide"); - $("#QaqcDatatable").DataTable().ajax.reload(null, false); - }, - error: function () { - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to update decision' - }); - } - }); - }); - } - - diff --git a/src/main/resources/templates/modules/swm/incinerator.html b/src/main/resources/templates/modules/swm/incinerator.html index 03d2477..329ad20 100644 --- a/src/main/resources/templates/modules/swm/incinerator.html +++ b/src/main/resources/templates/modules/swm/incinerator.html @@ -418,71 +418,6 @@ }); - - - - - function submitRdoDecision(status) { - - let date = ($("#date").val() || "").trim(); - let = $("#detailsModal").data("refid"); - let approvedBy = $("#userName").val(); // 🔥 FROM HIDDEN INPUT - - if (!remarks) { - Swal.fire({ - icon: 'warning', - title: 'Remarks Required', - text: 'Please enter remarks before submitting' - }); - return; - } - - Swal.fire({ - title: `Are you sure?`, - text: `You want to ${status.toLowerCase()} this request`, - icon: status === 'APPROVED' ? 'success' : 'error', - showCancelButton: true, - confirmButtonColor: status === 'APPROVED' ? '#28a745' : '#dc3545', - cancelButtonColor: '#6c757d', - confirmButtonText: `Yes, ${status}` - }).then((result) => { - - if (!result.isConfirmed) return; - - $.ajax({ - url: "/gcc/api/flagpoleregistration/rdo/updateDecision", - type: "POST", - data: { - refid: refid, - status: status, - remarks: remarks, - approvedBy: approvedBy // 🔥 PASS TO BACKEND - }, - success: function (res) { - - Swal.fire({ - icon: 'success', - title: status === 'APPROVED' ? 'Approved!' : 'Rejected!', - text: res.message || `Request has been ${status.toLowerCase()}`, - timer: 2000, - showConfirmButton: false - }); - - $("#detailsModal").modal("hide"); - $("#QaqcDatatable").DataTable().ajax.reload(null, false); - }, - error: function () { - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to update decision' - }); - } - }); - }); - } - - diff --git a/src/main/resources/templates/modules/swm/mcc.html b/src/main/resources/templates/modules/swm/mcc.html index 26dabf0..ae7fbe8 100644 --- a/src/main/resources/templates/modules/swm/mcc.html +++ b/src/main/resources/templates/modules/swm/mcc.html @@ -420,69 +420,6 @@ - - - function submitRdoDecision(status) { - - let date = ($("#date").val() || "").trim(); - let = $("#detailsModal").data("refid"); - let approvedBy = $("#userName").val(); // 🔥 FROM HIDDEN INPUT - - if (!remarks) { - Swal.fire({ - icon: 'warning', - title: 'Remarks Required', - text: 'Please enter remarks before submitting' - }); - return; - } - - Swal.fire({ - title: `Are you sure?`, - text: `You want to ${status.toLowerCase()} this request`, - icon: status === 'APPROVED' ? 'success' : 'error', - showCancelButton: true, - confirmButtonColor: status === 'APPROVED' ? '#28a745' : '#dc3545', - cancelButtonColor: '#6c757d', - confirmButtonText: `Yes, ${status}` - }).then((result) => { - - if (!result.isConfirmed) return; - - $.ajax({ - url: "/gcc/api/flagpoleregistration/rdo/updateDecision", - type: "POST", - data: { - refid: refid, - status: status, - remarks: remarks, - approvedBy: approvedBy // 🔥 PASS TO BACKEND - }, - success: function (res) { - - Swal.fire({ - icon: 'success', - title: status === 'APPROVED' ? 'Approved!' : 'Rejected!', - text: res.message || `Request has been ${status.toLowerCase()}`, - timer: 2000, - showConfirmButton: false - }); - - $("#detailsModal").modal("hide"); - $("#QaqcDatatable").DataTable().ajax.reload(null, false); - }, - error: function () { - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to update decision' - }); - } - }); - }); - } - - diff --git a/src/main/resources/templates/modules/swm/mrf.html b/src/main/resources/templates/modules/swm/mrf.html index 77bf524..c473739 100644 --- a/src/main/resources/templates/modules/swm/mrf.html +++ b/src/main/resources/templates/modules/swm/mrf.html @@ -418,68 +418,6 @@ }); - - function submitRdoDecision(status) { - - let date = ($("#date").val() || "").trim(); - let = $("#detailsModal").data("refid"); - let approvedBy = $("#userName").val(); // 🔥 FROM HIDDEN INPUT - - if (!remarks) { - Swal.fire({ - icon: 'warning', - title: 'Remarks Required', - text: 'Please enter remarks before submitting' - }); - return; - } - - Swal.fire({ - title: `Are you sure?`, - text: `You want to ${status.toLowerCase()} this request`, - icon: status === 'APPROVED' ? 'success' : 'error', - showCancelButton: true, - confirmButtonColor: status === 'APPROVED' ? '#28a745' : '#dc3545', - cancelButtonColor: '#6c757d', - confirmButtonText: `Yes, ${status}` - }).then((result) => { - - if (!result.isConfirmed) return; - - $.ajax({ - url: "/gcc/api/flagpoleregistration/rdo/updateDecision", - type: "POST", - data: { - refid: refid, - status: status, - remarks: remarks, - approvedBy: approvedBy // 🔥 PASS TO BACKEND - }, - success: function (res) { - - Swal.fire({ - icon: 'success', - title: status === 'APPROVED' ? 'Approved!' : 'Rejected!', - text: res.message || `Request has been ${status.toLowerCase()}`, - timer: 2000, - showConfirmButton: false - }); - - $("#detailsModal").modal("hide"); - $("#QaqcDatatable").DataTable().ajax.reload(null, false); - }, - error: function () { - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to update decision' - }); - } - }); - }); - } - - diff --git a/src/main/resources/templates/modules/swm/plastingbaling.html b/src/main/resources/templates/modules/swm/plastingbaling.html index b489ef5..588759c 100644 --- a/src/main/resources/templates/modules/swm/plastingbaling.html +++ b/src/main/resources/templates/modules/swm/plastingbaling.html @@ -409,71 +409,6 @@ }); }); - - - - - function submitRdoDecision(status) { - - let date = ($("#date").val() || "").trim(); - let = $("#detailsModal").data("refid"); - let approvedBy = $("#userName").val(); // 🔥 FROM HIDDEN INPUT - - if (!remarks) { - Swal.fire({ - icon: 'warning', - title: 'Remarks Required', - text: 'Please enter remarks before submitting' - }); - return; - } - - Swal.fire({ - title: `Are you sure?`, - text: `You want to ${status.toLowerCase()} this request`, - icon: status === 'APPROVED' ? 'success' : 'error', - showCancelButton: true, - confirmButtonColor: status === 'APPROVED' ? '#28a745' : '#dc3545', - cancelButtonColor: '#6c757d', - confirmButtonText: `Yes, ${status}` - }).then((result) => { - - if (!result.isConfirmed) return; - - $.ajax({ - url: "/gcc/api/flagpoleregistration/rdo/updateDecision", - type: "POST", - data: { - refid: refid, - status: status, - remarks: remarks, - approvedBy: approvedBy // 🔥 PASS TO BACKEND - }, - success: function (res) { - - Swal.fire({ - icon: 'success', - title: status === 'APPROVED' ? 'Approved!' : 'Rejected!', - text: res.message || `Request has been ${status.toLowerCase()}`, - timer: 2000, - showConfirmButton: false - }); - - $("#detailsModal").modal("hide"); - $("#QaqcDatatable").DataTable().ajax.reload(null, false); - }, - error: function () { - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to update decision' - }); - } - }); - }); - } - - diff --git a/src/main/resources/templates/modules/swm/windrow.html b/src/main/resources/templates/modules/swm/windrow.html index 382ed56..b39511a 100644 --- a/src/main/resources/templates/modules/swm/windrow.html +++ b/src/main/resources/templates/modules/swm/windrow.html @@ -410,69 +410,6 @@ - - - function submitRdoDecision(status) { - - let date = ($("#date").val() || "").trim(); - let = $("#detailsModal").data("refid"); - let approvedBy = $("#userName").val(); // 🔥 FROM HIDDEN INPUT - - if (!remarks) { - Swal.fire({ - icon: 'warning', - title: 'Remarks Required', - text: 'Please enter remarks before submitting' - }); - return; - } - - Swal.fire({ - title: `Are you sure?`, - text: `You want to ${status.toLowerCase()} this request`, - icon: status === 'APPROVED' ? 'success' : 'error', - showCancelButton: true, - confirmButtonColor: status === 'APPROVED' ? '#28a745' : '#dc3545', - cancelButtonColor: '#6c757d', - confirmButtonText: `Yes, ${status}` - }).then((result) => { - - if (!result.isConfirmed) return; - - $.ajax({ - url: "/gcc/api/flagpoleregistration/rdo/updateDecision", - type: "POST", - data: { - refid: refid, - status: status, - remarks: remarks, - approvedBy: approvedBy // 🔥 PASS TO BACKEND - }, - success: function (res) { - - Swal.fire({ - icon: 'success', - title: status === 'APPROVED' ? 'Approved!' : 'Rejected!', - text: res.message || `Request has been ${status.toLowerCase()}`, - timer: 2000, - showConfirmButton: false - }); - - $("#detailsModal").modal("hide"); - $("#QaqcDatatable").DataTable().ajax.reload(null, false); - }, - error: function () { - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to update decision' - }); - } - }); - }); - } - -