From 30a6ade9f6624e327052139a13be403bffd8e575 Mon Sep 17 00:00:00 2001 From: Eirene Date: Tue, 30 Jul 2024 21:18:35 +0800 Subject: [PATCH] ui: add page for edit Users & Access Management --- apps/front/src/app.css | 13 ++++ apps/front/src/routes/admin/+page.svelte | 2 +- .../src/routes/admin/1/edit/+page.svelte | 72 +++++++++++++++++++ .../src/routes/schedule/1/edit/+page.svelte | 4 +- 4 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 apps/front/src/routes/admin/1/edit/+page.svelte diff --git a/apps/front/src/app.css b/apps/front/src/app.css index 77e8302..670e9fb 100644 --- a/apps/front/src/app.css +++ b/apps/front/src/app.css @@ -52,6 +52,9 @@ .btn-primary { @apply bg-primary text-purple-50 hover:bg-purple-600 focus-visible:outline-purple-600; } + .btn-danger{ + @apply border border-red-600 text-red-600 hover:bg-red-700 hover:text-red-50 focus-visible:outline-red-700; + } .input{ @apply block w-full h-12 rounded-primary border border-gray-300 text-gray-900; @@ -59,6 +62,16 @@ @apply focus:border-purple-600 focus:ring-1 focus:ring-inset focus:ring-transparent; } + .select{ + @apply input; + } + + .textarea{ + @apply block w-full min-h-24 rounded-primary border border-gray-300 text-gray-900; + @apply placeholder:text-gray-500; + @apply focus:border-purple-600 focus:ring-1 focus:ring-inset focus:ring-transparent; + } + .label{ @apply block text-black text-sm; } diff --git a/apps/front/src/routes/admin/+page.svelte b/apps/front/src/routes/admin/+page.svelte index 97a98ff..82956f4 100644 --- a/apps/front/src/routes/admin/+page.svelte +++ b/apps/front/src/routes/admin/+page.svelte @@ -77,7 +77,7 @@ - Edit, {user.name} + Edit, {user.name} {/each} diff --git a/apps/front/src/routes/admin/1/edit/+page.svelte b/apps/front/src/routes/admin/1/edit/+page.svelte new file mode 100644 index 0000000..ac178d0 --- /dev/null +++ b/apps/front/src/routes/admin/1/edit/+page.svelte @@ -0,0 +1,72 @@ +
+

+ Edit +

+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+
+
+ + + Cancel + +
+
+
+ + +
diff --git a/apps/front/src/routes/schedule/1/edit/+page.svelte b/apps/front/src/routes/schedule/1/edit/+page.svelte index 188f48a..8fde613 100644 --- a/apps/front/src/routes/schedule/1/edit/+page.svelte +++ b/apps/front/src/routes/schedule/1/edit/+page.svelte @@ -9,7 +9,7 @@ const handleToggle = (newStatus: boolean) => { }; -
+

Edit

@@ -17,7 +17,7 @@ const handleToggle = (newStatus: boolean) => {
-
+