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

Cart Pickup Event Picker Changes #232

Merged
merged 20 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a67ebee
Added complete and cancel buttons to PickupEvent Edit Page
WishingWell13 Mar 31, 2024
e173424
Added buttons to admin pickup home page
WishingWell13 Mar 31, 2024
899feed
Merge branch 'main' into andy/completeCancelPickupEvents
WishingWell13 Mar 31, 2024
4844025
Moved complete and edit buttons to single pickup event page
WishingWell13 Apr 1, 2024
c238b2b
Merge branch 'main' into andy/completeCancelPickupEvents
WishingWell13 Apr 1, 2024
e1c433e
Removed unnecessary CSS
WishingWell13 Apr 1, 2024
11cee94
Merge branch 'andy/completeCancelPickupEvents' of https://github.com/…
WishingWell13 Apr 1, 2024
c76771b
Merge branch 'main' into andy/completeCancelPickupEvents
WishingWell13 Apr 9, 2024
ba8679e
Fixed bug with linkedEventUuid not found edge case
WishingWell13 Apr 9, 2024
242eabc
Made admin pickup events sort by start date
WishingWell13 Apr 10, 2024
bc7bfcd
Removed console.log
WishingWell13 Apr 10, 2024
4eda486
Refactored code to eliminate creation of new variable
WishingWell13 Apr 12, 2024
c745347
Added checks to make weird dates not break code
WishingWell13 Apr 12, 2024
266390e
Use instanceof instead of === for error check
WishingWell13 Apr 13, 2024
7ea90e6
Added function to parse props
WishingWell13 Apr 13, 2024
ec1b24f
Make full pickup events not show on cart page
WishingWell13 Apr 16, 2024
6ef1325
Styled create pickup event button
WishingWell13 Apr 16, 2024
13b65da
Made the border on the pickup event card in cart page not glow
WishingWell13 Apr 16, 2024
9f49655
Merge branch 'main' into andy/completeCancelPickupEvents
WishingWell13 Apr 16, 2024
5d96fa1
Addressed nits on PR
WishingWell13 Apr 17, 2024
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 src/components/events/EventCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ const EventCard = ({
<Link
href={`${config.eventsRoute}/${uuid}`}
data-community={community}
className={`${styles.container} ${borderless ? '' : styles.bordered} ${className || ''}`}
data-disabled={borderless ? 'true' : 'false'}
className={`${styles.container} ${borderless ? 'disabled' : styles.bordered} ${
className || ''
}`}
WishingWell13 marked this conversation as resolved.
Show resolved Hide resolved
onClick={e => {
e.preventDefault();
setExpanded(true);
Expand Down
2 changes: 1 addition & 1 deletion src/components/events/EventCard/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
border-radius: 10px;
}

&:not([disabled]):hover {
&:not([data-disabled='true']):hover {
outline-width: 4px;
transform: scale(0.975);

Expand Down
17 changes: 9 additions & 8 deletions src/pages/admin/store/pickup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ const AdminPickupPage = ({ futurePickupEvents, pastPickupEvents }: AdminPickupPa
<Typography variant="h1/bold" style={{ marginRight: 'auto' }}>
Manage Pickup Events
</Typography>

<button
type="button"
className={`${styles.displayButton} ${display === 'future' && styles.active}`}
onClick={() => router.push(`${config.admin.store.pickupCreate}`)}
>
<Typography variant="h5/bold">Create New Pickup Event</Typography>
</button>
<div className={styles.displayButtons}>
<button
type="button"
className={`${styles.displayButton} ${styles.active}`}
onClick={() => router.push(`${config.admin.store.pickupCreate}`)}
>
<Typography variant="h5/bold">Create New Pickup Event</Typography>
</button>
</div>

<div className={styles.displayButtons}>
<button
Expand Down
6 changes: 5 additions & 1 deletion src/pages/store/cart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ const getServerSidePropsFunc: GetServerSideProps = async ({ req, res }) => {

const savedCartPromise = CartService.getCart({ req, res });
const pickupEventsPromise = getFutureOrderPickupEvents(AUTH_TOKEN).then(events =>
events.filter(event => event.status !== 'CANCELLED')
events
.filter(event => event.status !== 'CANCELLED')
.filter(
event => (event.orders?.length ?? 0) <= (event?.orderLimit ?? Number.MAX_SAFE_INTEGER)
WishingWell13 marked this conversation as resolved.
Show resolved Hide resolved
)
);
const userPromise = getCurrentUserAndRefreshCookie(AUTH_TOKEN, { req, res });

Expand Down
Loading