dev
This commit is contained in:
@@ -100,7 +100,9 @@
|
||||
<div class="content">
|
||||
<div class="elevated separator-borders m-4 rounded">
|
||||
<div class="bottom-border flex place-content-between">
|
||||
<div class="p-3 font-semibold">Update User</div>
|
||||
<div class="p-3 font-semibold">
|
||||
Edit User {data.user.username}{data.user.fullName ? ` (${data.user.fullName})` : ''}
|
||||
</div>
|
||||
</div>
|
||||
<form method="POST" class="px-4" autocomplete="off" use:enhance>
|
||||
<div class="mt-4 text-sm font-semibold">
|
||||
@@ -112,10 +114,11 @@
|
||||
value={data.user?.username}
|
||||
placeholder="Username"
|
||||
class="w-full rounded font-normal"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="relative pt-4 text-sm font-semibold">
|
||||
Password
|
||||
New password (optional)
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
@@ -134,7 +137,19 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-4 text-sm font-semibold">
|
||||
Email (optional)
|
||||
Full name <span class="danger-color">*</span>
|
||||
<input
|
||||
type="text"
|
||||
name="fullName"
|
||||
id="fullName"
|
||||
value={data.user?.fullName}
|
||||
placeholder="Full name"
|
||||
class="w-full rounded font-normal"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="mt-4 text-sm font-semibold">
|
||||
Email <span class="danger-color">*</span>
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
@@ -142,6 +157,7 @@
|
||||
value={data.user?.email}
|
||||
placeholder="Email"
|
||||
class="w-full rounded font-normal"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="mt-4 text-sm font-semibold">
|
||||
@@ -156,17 +172,6 @@
|
||||
pattern="([0-9]\{3}) [0-9]\{3}-[0-9]\{3}"
|
||||
/>
|
||||
</div>
|
||||
<div class="mt-4 text-sm font-semibold">
|
||||
Full name (optional)
|
||||
<input
|
||||
type="text"
|
||||
name="fullName"
|
||||
id="fullName"
|
||||
value={data.user?.fullName}
|
||||
placeholder="Full name"
|
||||
class="w-full rounded font-normal"
|
||||
/>
|
||||
</div>
|
||||
<div class="mt-4 text-sm font-semibold">
|
||||
Company code (optional)
|
||||
<input
|
||||
@@ -195,7 +200,7 @@
|
||||
id="userPerms"
|
||||
class="select-all"
|
||||
checked={(perms & userPerms) === userPerms}
|
||||
indeterminate={(perms & userPerms) !== userPerms && (perms & userPerms) !== 0}
|
||||
indeterminate={(perms & userPerms) !== userPerms && (perms & userPerms) > 0}
|
||||
/></span
|
||||
>User Permissions
|
||||
</span>
|
||||
@@ -212,7 +217,7 @@
|
||||
name="view"
|
||||
id="view"
|
||||
class="permCheckbox mx-1"
|
||||
checked={(perms & PERMISSIONS.VIEW) !== 0}
|
||||
checked={(perms & PERMISSIONS.VIEW) > 0}
|
||||
/>
|
||||
<span class="ml-2">View access</span></label
|
||||
>
|
||||
@@ -224,7 +229,7 @@
|
||||
name="apply"
|
||||
id="apply"
|
||||
class="permCheckbox mx-1"
|
||||
checked={(perms & PERMISSIONS.APPLY_FOR_JOBS) !== 0}
|
||||
checked={(perms & PERMISSIONS.APPLY_FOR_JOBS) > 0}
|
||||
/>
|
||||
<span class="ml-2">Apply for jobs</span></label
|
||||
>
|
||||
@@ -246,7 +251,7 @@
|
||||
class="select-all"
|
||||
checked={(perms & employerPerms) === employerPerms}
|
||||
indeterminate={(perms & employerPerms) !== employerPerms &&
|
||||
(perms & employerPerms) !== 0}
|
||||
(perms & employerPerms) > 0}
|
||||
/></span
|
||||
>Company Permissions
|
||||
</span>
|
||||
@@ -262,7 +267,7 @@
|
||||
type="checkbox"
|
||||
name="submitPostings"
|
||||
id="submitPostings"
|
||||
checked={(perms & PERMISSIONS.SUBMIT_POSTINGS) !== 0}
|
||||
checked={(perms & PERMISSIONS.SUBMIT_POSTINGS) >= 0}
|
||||
class="permCheckbox mx-1"
|
||||
/>
|
||||
<span class="ml-2">Submit postings</span></label
|
||||
@@ -274,7 +279,7 @@
|
||||
type="checkbox"
|
||||
name="manageEmployers"
|
||||
id="manageEmployers"
|
||||
checked={(perms & PERMISSIONS.MANAGE_EMPLOYERS) !== 0}
|
||||
checked={(perms & PERMISSIONS.MANAGE_EMPLOYERS) > 0}
|
||||
class="permCheckbox mx-1"
|
||||
/>
|
||||
<span class="ml-2">Manage employers (within their company)</span></label
|
||||
@@ -296,7 +301,7 @@
|
||||
id="adminPerms"
|
||||
class="select-all"
|
||||
checked={(perms & adminPerms) === adminPerms}
|
||||
indeterminate={(perms & adminPerms) !== adminPerms && (perms & adminPerms) !== 0}
|
||||
indeterminate={(perms & adminPerms) !== adminPerms && (perms & adminPerms) > 0}
|
||||
/></span
|
||||
>Admin Permissions
|
||||
</span>
|
||||
@@ -312,7 +317,7 @@
|
||||
type="checkbox"
|
||||
name="manageTags"
|
||||
id="manageTags"
|
||||
checked={(perms & PERMISSIONS.MANAGE_TAGS) !== 0}
|
||||
checked={(perms & PERMISSIONS.MANAGE_TAGS) > 0}
|
||||
class="permCheckbox mx-1"
|
||||
/>
|
||||
<span class="ml-2">Manage tags</span></label
|
||||
@@ -324,7 +329,7 @@
|
||||
type="checkbox"
|
||||
name="managePostings"
|
||||
id="managePostings"
|
||||
checked={(perms & PERMISSIONS.MANAGE_POSTINGS) !== 0}
|
||||
checked={(perms & PERMISSIONS.MANAGE_POSTINGS) > 0}
|
||||
class="permCheckbox mx-1"
|
||||
/>
|
||||
<span class="ml-2">Manage postings</span></label
|
||||
@@ -336,7 +341,7 @@
|
||||
type="checkbox"
|
||||
name="manageUsers"
|
||||
id="manageUsers"
|
||||
checked={(perms & PERMISSIONS.MANAGE_USERS) !== 0}
|
||||
checked={(perms & PERMISSIONS.MANAGE_USERS) > 0}
|
||||
class="permCheckbox mx-1"
|
||||
/>
|
||||
<span class="ml-2">Manage users</span></label
|
||||
@@ -348,7 +353,7 @@
|
||||
type="checkbox"
|
||||
name="manageCompanies"
|
||||
id="manageCompanies"
|
||||
checked={(perms & PERMISSIONS.MANAGE_COMPANIES) !== 0}
|
||||
checked={(perms & PERMISSIONS.MANAGE_COMPANIES) > 0}
|
||||
class="permCheckbox mx-1"
|
||||
/>
|
||||
<span class="ml-2">Manage companies</span></label
|
||||
@@ -375,7 +380,7 @@
|
||||
<button
|
||||
class="dull-primary-bg-color mb-4 mt-2 rounded px-2 py-1"
|
||||
type="submit"
|
||||
formaction="?/submit">Update user</button
|
||||
formaction="?/submit">Save user</button
|
||||
>
|
||||
<button
|
||||
class="danger-bg-color mb-4 mt-2 rounded px-2 py-1"
|
||||
|
||||
Reference in New Issue
Block a user