Skip to content

Conversation

@RawSalmon69
Copy link
Member

No description provided.

dhanavadh and others added 30 commits July 13, 2025 22:27
-added staff scan qr page
added staff-qr page
- Fixed Staff-qr handling error
- Fix error type assertions in staff/event/index.astro
- Remove unused imports and variables
- Added auth functions getAuthToken() and getAuthHeaders() in api.ts
- Fixed body stream error when scan qr code
- Added handle error when user is not exist and when user scan wrong qr
- fix ButtonFd not send data
- Fixed no events active layout
* feat: added staff scan qr page

-added staff scan qr page

* fix: firstdate staff bg

* feat: add @yudiel/react-qr-scanner

* Feat: added staff-qr page

added staff-qr page

* chore: fix middleware doesn't work

* feat: Implement qr scan with api

* fix: staff-qr code

- Fixed Staff-qr handling error
- Fix error type assertions in staff/event/index.astro
- Remove unused imports and variables

* fix: qr scan error, body stream err, cannot send cookie to backend err

- Added auth functions getAuthToken() and getAuthHeaders() in api.ts
- Fixed body stream error when scan qr code
- Added handle error when user is not exist and when user scan wrong qr

* Fix: alternative form handle error

- fix ButtonFd not send data

* fix: no event active layout

- Fixed no events active layout

* fix: qrcode

---------

Co-authored-by: neennera <[email protected]>
Co-authored-by: Thukdanai Thaothawin <[email protected]>
Co-authored-by: Borworntat Dendumrongkul <[email protected]>
Copilot AI review requested due to automatic review settings July 23, 2025 12:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements time-based feature gating for an RPKM (house picking) system, introducing date-controlled transitions between house selection and display phases. The changes add configuration dates to control when house picking becomes disabled and when to switch from selection to display mode.

  • Adds date configuration constants to control feature availability
  • Implements conditional UI rendering based on current date vs configured dates
  • Updates Google Maps links for two shop entries

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/data/fest/quest2-shops.ts Updates Google Maps URLs for two shop entries
src/components/rpkm/sample.astro Adds conditional rendering to switch between HousePicker and HouseDisplay based on date
src/components/rpkm/data/date.ts Defines date constants for controlling picking and display phases
src/components/rpkm/components/house-picker.astro Implements date-based disabling of house picking functionality
src/components/rpkm/components/house-display.astro Creates new component for displaying house results after picking phase
src/components/rpkm/components/group-picker.astro Adds date-based disabling of group picking functionality

return Astro.redirect("/login");
}
const assignedHouse = null; // Replace with actual house attribute
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

The assignedHouse variable is hardcoded to null with a TODO comment. This will always render the 'no house selected' state regardless of actual data. The logic should be implemented to fetch the actual assigned house from the group data.

Suggested change
const assignedHouse = null; // Replace with actual house attribute
const assignedHouse = groupData?.assignedHouse || null; // Fetch assigned house from groupData

Copilot uses AI. Check for mistakes.
const instagramLink = housePopup?.querySelector("#house-instagram-link");
if (instagramLink) {
instagramLink.href = house.instagramURL;
instagramLink.href = house.instagram;
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

The property name changed from 'instagramURL' to 'instagram' without context. This could indicate an inconsistent API change that might cause runtime errors if the house object doesn't have an 'instagram' property.

Suggested change
instagramLink.href = house.instagram;
instagramLink.href = house.instagram || house.instagramURL || "#";

Copilot uses AI. Check for mistakes.
{/* House Instagram */}
<a
id="house-instagram-link-final"
href="https://youtu.be/dQw4w9WgXcQ?si=To9bwNaRw7cl03NT"
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

The Instagram link is hardcoded to a YouTube URL (appears to be a Rick Roll). This should be replaced with actual Instagram URL logic or removed if this is placeholder code.

Copilot uses AI. Check for mistakes.
>
<img src="/images/rpkm/instagram-icon.svg" width="20" height="20" />
<p id="house-instagram-final" class="font-medium text-white">
baan.something
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

The Instagram handle is hardcoded to 'baan.something' placeholder text. This should display the actual Instagram handle from the house data.

Suggested change
baan.something
{assignedHouse?.instagramHandle || "Instagram handle not available"}

Copilot uses AI. Check for mistakes.
MasterIceZ
MasterIceZ previously approved these changes Jul 23, 2025
Copy link
Member

@MasterIceZ MasterIceZ left a comment

Choose a reason for hiding this comment

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

positive

Copy link
Member

@MasterIceZ MasterIceZ left a comment

Choose a reason for hiding this comment

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

Jing P

@RawSalmon69 RawSalmon69 merged commit 2ab3a48 into main Jul 23, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants