|
128 | 128 | <form method="POST" action="?/update" class="mt-6 space-y-6"> |
129 | 129 | <div class="grid grid-cols-1 gap-6 sm:grid-cols-2"> |
130 | 130 | <div> |
131 | | - <label for="org-name" class="block text-sm font-medium text-gray-700 dark:text-gray-300"> |
132 | | - Organization Name |
| 131 | + <label for="org-name" class="block text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2"> |
| 132 | + Organization Name <span class="text-red-500">*</span> |
133 | 133 | </label> |
134 | | - <div class="mt-1 relative"> |
| 134 | + <div class="relative"> |
135 | 135 | <input |
136 | 136 | id="org-name" |
137 | 137 | name="name" |
138 | 138 | type="text" |
139 | 139 | bind:value={formOrg.name} |
140 | 140 | required |
141 | | - class="block w-full rounded-lg border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white pl-10 shadow-sm focus:border-blue-500 dark:focus:border-blue-400 focus:ring-blue-500 dark:focus:ring-blue-400 sm:text-sm" |
| 141 | + class="block w-full rounded-xl border-0 bg-white dark:bg-gray-700 py-3 pl-11 pr-4 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:ring-2 focus:ring-inset focus:ring-blue-600 dark:focus:ring-blue-500 hover:ring-gray-400 dark:hover:ring-gray-500 transition-all duration-200 sm:text-sm sm:leading-6" |
| 142 | + placeholder="Enter organization name" |
142 | 143 | /> |
143 | | - <Building2 class="absolute left-3 top-3 h-4 w-4 text-gray-400 dark:text-gray-500" /> |
| 144 | + <Building2 class="absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400 dark:text-gray-500" /> |
144 | 145 | </div> |
145 | 146 | </div> |
146 | 147 |
|
147 | 148 | <div> |
148 | | - <label for="org-domain" class="block text-sm font-medium text-gray-700 dark:text-gray-300"> |
| 149 | + <label for="org-domain" class="block text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2"> |
149 | 150 | Domain |
150 | 151 | </label> |
151 | | - <div class="mt-1 relative"> |
| 152 | + <div class="relative"> |
152 | 153 | <input |
153 | 154 | id="org-domain" |
154 | 155 | name="domain" |
155 | 156 | type="text" |
156 | 157 | bind:value={formOrg.domain} |
157 | 158 | placeholder="yourcompany.com" |
158 | | - class="block w-full rounded-lg border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white pl-10 shadow-sm focus:border-blue-500 dark:focus:border-blue-400 focus:ring-blue-500 dark:focus:ring-blue-400 sm:text-sm placeholder-gray-400 dark:placeholder-gray-500" |
| 159 | + class="block w-full rounded-xl border-0 bg-white dark:bg-gray-700 py-3 pl-11 pr-4 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:ring-2 focus:ring-inset focus:ring-blue-600 dark:focus:ring-blue-500 hover:ring-gray-400 dark:hover:ring-gray-500 transition-all duration-200 sm:text-sm sm:leading-6" |
159 | 160 | /> |
160 | | - <Globe class="absolute left-3 top-3 h-4 w-4 text-gray-400 dark:text-gray-500" /> |
| 161 | + <Globe class="absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400 dark:text-gray-500" /> |
161 | 162 | </div> |
162 | 163 | </div> |
163 | 164 | </div> |
164 | 165 |
|
165 | 166 | <div> |
166 | | - <label for="org-description" class="block text-sm font-medium text-gray-700 dark:text-gray-300"> |
| 167 | + <label for="org-description" class="block text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2"> |
167 | 168 | Description |
168 | 169 | </label> |
169 | 170 | <textarea |
170 | 171 | id="org-description" |
171 | 172 | name="description" |
172 | | - rows="3" |
| 173 | + rows="4" |
173 | 174 | bind:value={formOrg.description} |
174 | | - class="mt-1 block w-full rounded-lg border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow-sm focus:border-blue-500 dark:focus:border-blue-400 focus:ring-blue-500 dark:focus:ring-blue-400 sm:text-sm placeholder-gray-400 dark:placeholder-gray-500" |
175 | | - placeholder="Describe your organization" |
| 175 | + class="block w-full rounded-xl border-0 bg-white dark:bg-gray-700 py-3 px-4 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:ring-2 focus:ring-inset focus:ring-blue-600 dark:focus:ring-blue-500 hover:ring-gray-400 dark:hover:ring-gray-500 transition-all duration-200 sm:text-sm sm:leading-6 resize-none" |
| 176 | + placeholder="Describe your organization..." |
176 | 177 | ></textarea> |
177 | 178 | </div> |
178 | 179 |
|
179 | | - <div class="flex justify-end gap-3"> |
| 180 | + <div class="flex justify-end gap-3 pt-2"> |
180 | 181 | <button |
181 | 182 | type="button" |
182 | | - class="inline-flex items-center gap-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 shadow-sm hover:bg-gray-50 dark:hover:bg-gray-600" |
| 183 | + class="inline-flex items-center gap-2 rounded-xl border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-6 py-2.5 text-sm font-semibold text-gray-700 dark:text-gray-300 shadow-sm hover:bg-gray-50 dark:hover:bg-gray-600 hover:border-gray-400 dark:hover:border-gray-500 transition-all duration-200" |
183 | 184 | on:click={cancelEdit} |
184 | 185 | > |
185 | 186 | <X class="h-4 w-4" /> |
186 | 187 | Cancel |
187 | 188 | </button> |
188 | 189 | <button |
189 | 190 | type="submit" |
190 | | - class="inline-flex items-center gap-2 rounded-lg bg-blue-600 dark:bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-700 dark:hover:bg-blue-700" |
| 191 | + class="inline-flex items-center gap-2 rounded-xl bg-blue-600 dark:bg-blue-600 px-6 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-700 dark:hover:bg-blue-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600 dark:focus-visible:outline-blue-500 transition-all duration-200" |
191 | 192 | > |
192 | 193 | <Check class="h-4 w-4" /> |
193 | 194 | Save Changes |
|
211 | 212 | </div> |
212 | 213 |
|
213 | 214 | <!-- Add User Form --> |
214 | | - <div class="mt-6 rounded-lg bg-gray-50 dark:bg-gray-700/50 p-4"> |
215 | | - <h4 class="text-sm font-medium text-gray-900 dark:text-white mb-3">Add New Member</h4> |
216 | | - <form method="POST" action="?/add_user" class="flex flex-col gap-3 sm:flex-row sm:items-end"> |
| 215 | + <div class="mt-6 rounded-xl bg-gray-50 dark:bg-gray-700/50 p-6 border border-gray-100 dark:border-gray-600/50"> |
| 216 | + <h4 class="text-sm font-semibold text-gray-900 dark:text-white mb-4 flex items-center gap-2"> |
| 217 | + <Plus class="h-4 w-4" /> |
| 218 | + Add New Member |
| 219 | + </h4> |
| 220 | + <form method="POST" action="?/add_user" class="flex flex-col gap-4 sm:flex-row sm:items-end"> |
217 | 221 | <div class="flex-1"> |
218 | | - <label for="add-user-email" class="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1"> |
219 | | - Email Address |
| 222 | + <label for="add-user-email" class="block text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2"> |
| 223 | + Email Address <span class="text-red-500">*</span> |
220 | 224 | </label> |
221 | 225 | <input |
222 | 226 | id="add-user-email" |
223 | 227 | name="email" |
224 | 228 | type="email" |
225 | 229 | required |
226 | | - class="block w-full rounded-lg border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm shadow-sm focus:border-blue-500 dark:focus:border-blue-400 focus:ring-blue-500 dark:focus:ring-blue-400 placeholder-gray-400 dark:placeholder-gray-500" |
| 230 | + class="block w-full rounded-xl border-0 bg-white dark:bg-gray-800 py-3 px-4 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:ring-2 focus:ring-inset focus:ring-blue-600 dark:focus:ring-blue-500 hover:ring-gray-400 dark:hover:ring-gray-500 transition-all duration-200 sm:text-sm sm:leading-6" |
227 | 231 | placeholder="user@example.com" |
228 | 232 | /> |
229 | 233 | </div> |
230 | | - <div class="sm:w-32"> |
231 | | - <label for="add-user-role" class="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1"> |
| 234 | + <div class="sm:w-40"> |
| 235 | + <label for="add-user-role" class="block text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2"> |
232 | 236 | Role |
233 | 237 | </label> |
234 | 238 | <select |
235 | 239 | id="add-user-role" |
236 | 240 | name="role" |
237 | | - class="block w-full rounded-lg border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm shadow-sm focus:border-blue-500 dark:focus:border-blue-400 focus:ring-blue-500 dark:focus:ring-blue-400" |
| 241 | + class="block w-full rounded-xl border-0 bg-white dark:bg-gray-800 py-3 px-4 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 focus:ring-2 focus:ring-inset focus:ring-blue-600 dark:focus:ring-blue-500 hover:ring-gray-400 dark:hover:ring-gray-500 transition-all duration-200 sm:text-sm sm:leading-6" |
238 | 242 | > |
239 | 243 | <option value="USER">User</option> |
240 | 244 | <option value="ADMIN">Admin</option> |
241 | 245 | </select> |
242 | 246 | </div> |
243 | 247 | <button |
244 | 248 | type="submit" |
245 | | - class="inline-flex items-center gap-2 rounded-lg bg-blue-600 dark:bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-700 dark:hover:bg-blue-700" |
| 249 | + class="inline-flex items-center gap-2 rounded-xl bg-blue-600 dark:bg-blue-600 px-6 py-3 text-sm font-semibold text-white shadow-sm hover:bg-blue-700 dark:hover:bg-blue-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600 dark:focus-visible:outline-blue-500 transition-all duration-200" |
246 | 250 | > |
247 | 251 | <Plus class="h-4 w-4" /> |
248 | 252 | Add Member |
|
251 | 255 | </div> |
252 | 256 |
|
253 | 257 | <!-- Users Table --> |
254 | | - <div class="mt-6 overflow-hidden"> |
| 258 | + <div class="mt-8 overflow-hidden"> |
255 | 259 | <div class="overflow-x-auto"> |
256 | 260 | <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700"> |
257 | 261 | <thead class="bg-gray-50 dark:bg-gray-700/50"> |
|
313 | 317 | <select |
314 | 318 | id="role-select-{user.id}" |
315 | 319 | name="role" |
316 | | - class="rounded-lg border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-xs focus:border-blue-500 dark:focus:border-blue-400 focus:ring-blue-500 dark:focus:ring-blue-400" |
| 320 | + class="rounded-lg border-0 bg-white dark:bg-gray-700 py-2 px-3 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 focus:ring-2 focus:ring-inset focus:ring-blue-600 dark:focus:ring-blue-500 hover:ring-gray-400 dark:hover:ring-gray-500 transition-all duration-200 text-xs" |
317 | 321 | > |
318 | 322 | <option value="USER" selected={user.role === 'USER'}>User</option> |
319 | 323 | <option value="ADMIN" selected={user.role === 'ADMIN'}>Admin</option> |
|
323 | 327 | </select> |
324 | 328 | <button |
325 | 329 | type="submit" |
326 | | - class="rounded-lg bg-green-600 dark:bg-green-600 p-1.5 text-white hover:bg-green-700 dark:hover:bg-green-700" |
| 330 | + class="rounded-lg bg-green-600 dark:bg-green-600 p-2 text-white hover:bg-green-700 dark:hover:bg-green-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600 dark:focus-visible:outline-green-500 transition-all duration-200 shadow-sm" |
327 | 331 | title="Save" |
328 | 332 | > |
329 | 333 | <Check class="h-3.5 w-3.5" /> |
330 | 334 | </button> |
331 | 335 | <button |
332 | 336 | type="button" |
333 | | - class="rounded-lg bg-gray-600 dark:bg-gray-600 p-1.5 text-white hover:bg-gray-700 dark:hover:bg-gray-700" |
| 337 | + class="rounded-lg bg-gray-600 dark:bg-gray-600 p-2 text-white hover:bg-gray-700 dark:hover:bg-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-600 dark:focus-visible:outline-gray-500 transition-all duration-200 shadow-sm" |
334 | 338 | on:click={() => { users[i].editingRole = false }} |
335 | 339 | title="Cancel" |
336 | 340 | > |
|
340 | 344 | {:else} |
341 | 345 | <button |
342 | 346 | type="button" |
343 | | - class="inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-medium transition-colors {roleColors[user.role]} hover:bg-opacity-80 dark:hover:bg-opacity-80" |
| 347 | + class="inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-medium transition-all duration-200 {roleColors[user.role]} hover:bg-opacity-80 dark:hover:bg-opacity-80 hover:shadow-sm" |
344 | 348 | on:click={() => { users[i].editingRole = true }} |
345 | 349 | title="Click to edit role" |
346 | 350 | > |
|
0 commit comments