From 8fb55ce5f1c601c77bdc7d040a9ec44c1899b5ec Mon Sep 17 00:00:00 2001
From: vishwab1 <vishwanath@navadhiti.com>
Date: Wed, 29 Oct 2025 21:28:02 +0530
Subject: [PATCH 1/2] fix:casesheet signature

---
 .../employeemaster/EmployeeSignatureController.java   | 11 ++++++++++-
 .../repo/employeemaster/EmployeeSignatureRepo.java    |  2 +-
 .../employeemaster/EmployeeSignatureServiceImpl.java  |  6 +++++-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/iemr/admin/controller/employeemaster/EmployeeSignatureController.java b/src/main/java/com/iemr/admin/controller/employeemaster/EmployeeSignatureController.java
index 79f7f72..deb1bba 100644
--- a/src/main/java/com/iemr/admin/controller/employeemaster/EmployeeSignatureController.java
+++ b/src/main/java/com/iemr/admin/controller/employeemaster/EmployeeSignatureController.java
@@ -42,6 +42,7 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.google.gson.JsonObject;
 import com.iemr.admin.data.employeemaster.EmployeeSignature;
 import com.iemr.admin.service.employeemaster.EmployeeSignatureServiceImpl;
 import com.iemr.admin.utils.response.OutputResponse;
@@ -125,7 +126,15 @@ public String existFile(@PathVariable("userID") Long userID) throws Exception {
 		try {
 
 			Boolean userSignID = employeeSignatureServiceImpl.existSignature(userID);
-			response.setResponse(userSignID.toString());
+			Boolean signatureActive = employeeSignatureServiceImpl.isSignatureActive(userID);
+
+			// Create JSON response with both fields
+			JsonObject responseData = new JsonObject();
+			responseData.addProperty("response", userSignID.toString());
+			responseData.addProperty("signStatus", signatureActive.toString());
+
+			// Set the response (existing setResponse method will handle it)
+			response.setResponse(responseData.toString());
 
 		} catch (Exception e) {
 			logger.error("Unexpected error:", e);
diff --git a/src/main/java/com/iemr/admin/repo/employeemaster/EmployeeSignatureRepo.java b/src/main/java/com/iemr/admin/repo/employeemaster/EmployeeSignatureRepo.java
index 06a89f1..6463ff5 100644
--- a/src/main/java/com/iemr/admin/repo/employeemaster/EmployeeSignatureRepo.java
+++ b/src/main/java/com/iemr/admin/repo/employeemaster/EmployeeSignatureRepo.java
@@ -39,6 +39,6 @@ public interface EmployeeSignatureRepo extends CrudRepository<EmployeeSignature,
 
 	Long countByUserIDAndSignatureNotNull(Long userID);
 
-
+	Long countByUserIDAndSignatureNotNullAndDeletedFalse(Long userID);
 
 }
diff --git a/src/main/java/com/iemr/admin/service/employeemaster/EmployeeSignatureServiceImpl.java b/src/main/java/com/iemr/admin/service/employeemaster/EmployeeSignatureServiceImpl.java
index c8de33b..fd4a047 100644
--- a/src/main/java/com/iemr/admin/service/employeemaster/EmployeeSignatureServiceImpl.java
+++ b/src/main/java/com/iemr/admin/service/employeemaster/EmployeeSignatureServiceImpl.java
@@ -65,7 +65,11 @@ public EmployeeSignature fetchSignature(Long userSignID) {
 
 	public Boolean existSignature(Long userID) {
 		// TODO Auto-generated method stub
-		return employeeSignatureRepo.countByUserIDAndSignatureNotNull(userID)>0;
+		return employeeSignatureRepo.countByUserIDAndSignatureNotNull(userID) > 0;
+	}
+
+	public Boolean isSignatureActive(Long userID) {
+		return employeeSignatureRepo.countByUserIDAndSignatureNotNullAndDeletedFalse(userID) > 0;
 	}
 
 	@Override

From 45250ea7489047e7ff7a3c9ad39dd545f3c2cd74 Mon Sep 17 00:00:00 2001
From: vishwab1 <vishwanath@navadhiti.com>
Date: Thu, 30 Oct 2025 11:07:01 +0530
Subject: [PATCH 2/2] fix:pom file change

---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index c74cc29..04c5c88 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,8 +4,8 @@
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>com.iemr.admin</groupId>
-	<artifactId>adminapi</artifactId>
-	<version>v3.1.0</version>
+	<artifactId>admin-api</artifactId>
+	<version>3.6.0</version>
 	<packaging>war</packaging>
 	<name>Admin-API</name>
 	<description>Admin Page</description>
