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

Created page for blocking non-members from bookings #719

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 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
5 changes: 4 additions & 1 deletion client/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const config: StorybookConfig = {
core: {
builder: "@storybook/builder-webpack5"
},
webpackFinal: async (config) => {
webpackFinal: async (config, options) => {
const imageRule = config.module?.rules?.find((rule) => {
const test = (rule as { test: RegExp }).test

Expand All @@ -41,6 +41,9 @@ const config: StorybookConfig = {
use: ["@svgr/webpack"]
})

//@ts-expect-error
options!.cache!.set = () => Promise.resolve()

return config
}
}
Expand Down
1 change: 1 addition & 0 deletions client/package.json
Kartik-M24 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@stripe/react-stripe-js": "^2.7.3",
"@stripe/stripe-js": "^4.1.0",
"@tanstack/react-query": "^5.50.1",
"client": "file:",
"firebase": "^10.12.3",
"next": "14.2.4",
"next-sanity": "^9.4.2",
Expand Down
9 changes: 9 additions & 0 deletions client/src/assets/icons/Lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion client/src/assets/icons/lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 25 additions & 15 deletions client/src/components/generic/SignUpNotif/SignUpNotif.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useRouter } from "next/navigation"
import Button from "../FigmaButtons/FigmaButton"
import LockIcon from "@/assets/icons/lock.svg"

interface ISignUpNotif {
/**
Expand All @@ -21,21 +22,30 @@ export const SignUpNotif = ({ signedIn }: ISignUpNotif) => {
}

return (
<div
className="text-dark-blue-100 border-gray-3 flex flex-col items-center justify-center
gap-4 rounded-md border bg-white py-8"
>
<h2 className="text-center italic">Currently unavailable</h2>
<h4 className="max-h-[87px] max-w-[386px] text-center">
Only paid members can access bookings. Please sign up or wait until your
membership payment has been proccessed.
</h4>
<span className="flex w-full max-w-80 gap-2">
{!signedIn && <Button onClick={() => goToLogin()}>Log in</Button>}
<Button onClick={() => goToRegister()}>
{signedIn ? "Join Now" : "Sign up"}
</Button>
</span>
<div className="bg-gray-1 absolute inset-0 flex h-screen w-full justify-center overflow-hidden bg-opacity-70 px-4 py-2">
Kartik-M24 marked this conversation as resolved.
Show resolved Hide resolved
<div className="border-gray-3 mt-12 h-fit rounded-md border-2 bg-white p-5">
<div className="flex items-center justify-center">
<LockIcon />
</div>
<h2 className="xxs:mb-5 mb-10 mt-5 text-center font-bold text-black">
Sorry!
</h2>
<h4 className="text-center text-black">
Bookings are only available for UASC members.
</h4>
<h4 className="xxs:mb-5 mb-10 mt-1 text-center text-black">
Please sign up or wait until your membership payment has been
processed.
</h4>
<div className="mb-2 flex justify-center">
<span className="flex w-full max-w-80 gap-2">
{!signedIn && <Button onClick={() => goToLogin()}>Log in</Button>}
<Button onClick={() => goToRegister()}>
{signedIn ? "Join Now" : "Sign up"}
</Button>
</span>
</div>
</div>
</div>
)
}
1 change: 1 addition & 0 deletions server/package.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert changes here

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"helmet": "^7.1.0",
"nodemailer": "^6.9.14",
"pug": "^3.0.3",
"server": "file:",
Kartik-M24 marked this conversation as resolved.
Show resolved Hide resolved
"stripe": "^14.22.0",
"supertest": "^6.3.4",
"swagger-jsdoc": "^6.2.8",
Expand Down
6 changes: 4 additions & 2 deletions yarn.lock
Kartik-M24 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

Original file line number Diff line number Diff line change
Expand Up @@ -10904,7 +10904,7 @@ __metadata:
languageName: node
linkType: hard

"client@workspace:client":
"client@file:, client@workspace:client":
version: 0.0.0-use.local
resolution: "client@workspace:client"
dependencies:
Expand Down Expand Up @@ -10934,6 +10934,7 @@ __metadata:
"@types/react-csv": "npm:^1.1.10"
"@types/react-dom": "npm:^18"
"@types/scheduler": "npm:^0"
client: "file:"
eslint: "npm:~8.57.0"
firebase: "npm:^10.12.3"
jest: "npm:^29.7.0"
Expand Down Expand Up @@ -21585,7 +21586,7 @@ __metadata:
languageName: node
linkType: hard

"server@workspace:server":
"server@file:, server@workspace:server":
version: 0.0.0-use.local
resolution: "server@workspace:server"
dependencies:
Expand All @@ -21610,6 +21611,7 @@ __metadata:
nodemailer: "npm:^6.9.14"
nodemon: "npm:^3.1.0"
pug: "npm:^3.0.3"
server: "file:"
stripe: "npm:^14.22.0"
supertest: "npm:^6.3.4"
swagger-jsdoc: "npm:^6.2.8"
Expand Down
Loading