Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add modal to edit player roles #250

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"solid-js": "^1.7.7",
"solid-markdown": "^1.2.2",
"style-loader": "^3.3.3",
"tailwindcss": "^3.3.2",
"tailwindcss": "^3.4.0",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Accreditation.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const Accreditation = () => {
</tbody>
</table>
<button
class="my-4 block w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="my-4 block w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
onClick={() => setEdit(!edit())}
>
<Icon
Expand Down Expand Up @@ -252,7 +252,7 @@ const Accreditation = () => {
)}
</Field>
<div
class="mx-10 my-0 mb-4 rounded-lg bg-blue-50 p-4 px-8 text-sm text-blue-800 dark:bg-gray-800 dark:text-blue-400 lg:px-10"
class="mx-10 my-0 mb-4 rounded-lg bg-blue-50 p-4 px-8 text-sm text-blue-800 lg:px-10 dark:bg-gray-800 dark:text-blue-400"
role="alert"
>
<details>
Expand Down Expand Up @@ -286,7 +286,7 @@ const Accreditation = () => {
</div>
<button
type="submit"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Submit
</button>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function App() {
<Header />
<section class="grow">
<div class="mx-auto max-w-screen-xl px-4 py-8 lg:px-6 lg:py-16">
<div class="text-gray-500 dark:text-gray-400 sm:text-lg">
<div class="text-gray-500 sm:text-lg dark:text-gray-400">
<Routes>
{/* Simple pages */}
<Route path="/" component={Home} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Breadcrumbs = props => {
<Show
when={page.url}
fallback={
<span class="ml-1 text-sm font-medium text-gray-500 dark:text-gray-400 md:ml-2">
<span class="ml-1 text-sm font-medium text-gray-500 md:ml-2 dark:text-gray-400">
{page.name}
</span>
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ContactForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ const ContactForm = props => {
</Field>
<button
type="submit"
class="rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
disabled={contactForm.submitting}
>
Submit
</button>
<a
class="mx-2.5 rounded-lg bg-gray-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-gray-800 focus:outline-none focus:ring-4 focus:ring-gray-300 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800 sm:w-auto"
class="mx-2.5 rounded-lg bg-gray-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-gray-800 focus:outline-none focus:ring-4 focus:ring-gray-300 sm:w-auto dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800"
disabled={contactForm.submitting}
href="#"
onClick={props.close}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/FileInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const FileInput = props => {
/>
<label
class={clsx(
"relative flex min-h-[96px] w-full items-center justify-center rounded-2xl border-[3px] border-dashed border-slate-200 p-8 text-center focus-within:border-sky-600/50 hover:border-slate-300 dark:border-slate-800 dark:focus-within:border-sky-400/50 dark:hover:border-slate-700 md:min-h-[112px] md:text-lg lg:min-h-[128px] lg:p-10 lg:text-xl",
"relative flex min-h-[96px] w-full items-center justify-center rounded-2xl border-[3px] border-dashed border-slate-200 p-8 text-center focus-within:border-sky-600/50 hover:border-slate-300 md:min-h-[112px] md:text-lg lg:min-h-[128px] lg:p-10 lg:text-xl dark:border-slate-800 dark:focus-within:border-sky-400/50 dark:hover:border-slate-700",
!getFiles().length && "text-slate-500"
)}
>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export default function Footer() {
<div>
<footer class="m-4 rounded-lg bg-white shadow dark:bg-gray-800">
<div class="mx-auto w-full max-w-screen-xl p-4 md:flex md:items-center md:justify-between">
<span class="text-sm text-gray-500 dark:text-gray-400 sm:text-center">
<span class="text-sm text-gray-500 sm:text-center dark:text-gray-400">
©{" "}
<A href="/" class="hover:underline">
UPAI & FDSF(I)
</A>
</span>
<ul class="mt-3 flex flex-wrap items-center text-sm font-medium text-gray-500 dark:text-gray-400 sm:mt-0">
<ul class="mt-3 flex flex-wrap items-center text-sm font-medium text-gray-500 sm:mt-0 dark:text-gray-400">
<li>
<A href="/about" class="mr-4 hover:underline md:mr-6 ">
About
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/GroupMembership.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const PlayerSearchDropdown = props => {
<div class="flex flex-wrap p-3">
<select
id="countries"
class="mb-4 mr-5 block w-1/4 min-w-fit rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500 md:mb-0"
class="mb-4 mr-5 block w-1/4 min-w-fit rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 md:mb-0 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
onChange={e => setSelectedTeam(e.target.value)}
value={selectedTeam()}
>
Expand Down Expand Up @@ -398,7 +398,7 @@ const GroupMembership = () => {
</Match>
<Match when={paymentSuccess()}>
<button
class={`my-2 w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto ${
class={`my-2 w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 ${
payDisabled() ? "cursor-not-allowed" : ""
} `}
onClick={() => {
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function Header() {
<div>
<button
type="button"
class="inline-flex h-10 w-10 items-center justify-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600 md:hidden"
class="inline-flex h-10 w-10 items-center justify-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none md:hidden dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
onClick={toggleTheme}
>
<Show
Expand All @@ -68,7 +68,7 @@ export default function Header() {
<button
data-collapse-toggle="navbar-solid-bg"
type="button"
class="inline-flex h-10 w-10 items-center justify-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600 md:hidden"
class="inline-flex h-10 w-10 items-center justify-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 md:hidden dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
aria-controls="navbar-solid-bg"
aria-expanded="false"
>
Expand All @@ -77,7 +77,7 @@ export default function Header() {
</button>
</div>
<div class="hidden w-full md:block md:w-auto" id="navbar-solid-bg">
<ul class="mt-4 flex flex-col rounded-lg bg-gray-50 font-medium dark:border-gray-700 dark:bg-gray-800 md:mt-0 md:flex-row md:space-x-8 md:border-0 md:bg-transparent md:dark:bg-transparent">
<ul class="mt-4 flex flex-col rounded-lg bg-gray-50 font-medium md:mt-0 md:flex-row md:space-x-8 md:border-0 md:bg-transparent dark:border-gray-700 dark:bg-gray-800 md:dark:bg-transparent">
<li>
<A
href="/"
Expand Down Expand Up @@ -114,15 +114,15 @@ export default function Header() {
fallback={
<A
href="/login"
class="block rounded py-2 pl-3 pr-4 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:border-0 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
class="block rounded py-2 pl-3 pr-4 text-gray-900 hover:bg-gray-100 md:border-0 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
>
Login
</A>
}
>
<A
href=""
class="block rounded py-2 pl-3 pr-4 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:border-0 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
class="block rounded py-2 pl-3 pr-4 text-gray-900 hover:bg-gray-100 md:border-0 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
onClick={logout}
>
Logout
Expand All @@ -132,7 +132,7 @@ export default function Header() {
<li>
<button
type="button"
class="hidden rounded py-2 pl-3 pr-4 text-gray-900 focus:outline-none dark:text-white md:block md:border-0 md:p-0 md:hover:text-blue-700 md:dark:hover:text-blue-500"
class="hidden rounded py-2 pl-3 pr-4 text-gray-900 focus:outline-none md:block md:border-0 md:p-0 md:hover:text-blue-700 dark:text-white md:dark:hover:text-blue-500"
onClick={toggleTheme}
>
<Show
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/HelpButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const HelpButton = () => {
return (
<Show when={store?.userFetched && store?.data?.username}>
<button
class="fixed bottom-6 right-4 me-2 inline-flex items-center rounded-full bg-blue-700 p-2 text-center text-sm font-medium text-white transition-all duration-300 ease-in-out hover:bg-blue-800 focus:outline-none dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 md:bottom-6 md:right-8"
class="fixed bottom-6 right-4 me-2 inline-flex items-center rounded-full bg-blue-700 p-2 text-center text-sm font-medium text-white transition-all duration-300 ease-in-out hover:bg-blue-800 focus:outline-none md:bottom-6 md:right-8 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
onClick={toggleOpen}
>
<svg
Expand All @@ -29,7 +29,7 @@ const HelpButton = () => {
<span class="sr-only">Help</span>
</button>
{isOpen() && (
<div class="fixed bottom-20 right-4 w-80 rounded-lg border border-blue-400 bg-white p-4 shadow dark:bg-gray-900 md:right-8 md:w-96">
<div class="fixed bottom-20 right-4 w-80 rounded-lg border border-blue-400 bg-white p-4 shadow md:right-8 md:w-96 dark:bg-gray-900">
<ContactForm close={() => setIsOpen(false)} />
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/InputError.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const InputError = props => {
return (
<div
class="pt-4 text-sm text-red-500 dark:text-red-400 md:text-base lg:pt-5 lg:text-lg"
class="pt-4 text-sm text-red-500 md:text-base lg:pt-5 lg:text-lg dark:text-red-400"
id={`${props.name}-error`}
>
{props.error}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const PasswordLogin = props => {
</div>
<button
type="submit"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Login
</button>
Expand Down Expand Up @@ -247,7 +247,7 @@ const SendEmailOTP = props => {
id="send-otp-button"
onClick={sendOTPEmail}
disabled={loading()}
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
<Show when={loading()} fallback={"Send OTP"}>
<Spinner />
Expand All @@ -258,7 +258,7 @@ const SendEmailOTP = props => {
<button
id="validate-otp-button"
onClick={validateOTP}
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Confirm OTP
</button>
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Player = props => {
</p>
<button
type="submit"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
onClick={e => navUltimateCentral(e, props.player?.id)}
>
Link profile
Expand Down Expand Up @@ -114,7 +114,7 @@ const Player = props => {
</p>
<button
type="submit"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
onClick={e => navMembership(e, props.player?.id)}
>
Renew
Expand All @@ -138,7 +138,7 @@ const Player = props => {
<Match when={!props.player?.membership.waiver_valid}>
<button
type="submit"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
onClick={e => navWaiver(e, props.player?.id)}
>
Sign Waiver
Expand All @@ -163,7 +163,7 @@ const Player = props => {
</p>
<button
type="submit"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
onClick={e => navMembership(e, props.player?.id)}
>
Enroll
Expand All @@ -186,7 +186,7 @@ const Player = props => {
<p class="mb-4">Your vaccination information is not complete</p>
<button
type="submit"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:w-auto"
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 sm:w-auto dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
onClick={e => navVaccination(e, props.player?.id)}
>
Update
Expand Down
Loading
Loading