From 0976b1fe11b290be6f5fda91912e60199850efc9 Mon Sep 17 00:00:00 2001
From: potts99
Date: Wed, 28 Feb 2024 23:23:01 +0000
Subject: [PATCH] fix save issue
---
apps/client/pages/ticket/[id].tsx | 71 +++++++++++++------------------
1 file changed, 29 insertions(+), 42 deletions(-)
diff --git a/apps/client/pages/ticket/[id].tsx b/apps/client/pages/ticket/[id].tsx
index 73c7df5ac..c0c42d513 100644
--- a/apps/client/pages/ticket/[id].tsx
+++ b/apps/client/pages/ticket/[id].tsx
@@ -336,54 +336,43 @@ export default function Ticket() {
-
-
-
-
-
- setEdit(!edit)}
- >
- {!edit ? t("edit-btn") : "save"}
-
- {user.isAdmin && (
+ {!edit && (
+
+
+
+
+
hide(!data.ticket.hidden)}
+ className="min-w-[176px] capitalize hover:cursor-pointer"
+ onClick={() => setEdit(!edit)}
>
- {data.ticket.hidden ? "Show Global" : "Hide Ticket"}
+ {!edit ? t("edit-btn") : "save"}
- )}
-
-
- {user.isAdmin && (
-
+
+ {user.isAdmin && (
+ hide(!data.ticket.hidden)}
+ >
+ {data.ticket.hidden
+ ? "Show Global"
+ : "Hide Ticket"}
+
+ )}
+
+
)}
- {!edit ? (
-
- ) : (
-
+ save
+
)}
@@ -442,8 +431,6 @@ export default function Ticket() {
: n
? n.name
: t("select_new_user")}
-
- {n ? n.name : t("select_new_user")}