Skip to content
Merged

Dev #104

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
3631609
feat: added staff scan qr page
dhanavadh Jul 13, 2025
fe86339
Merge branch 'dev' into feat/firstdate/staff-qr
dhanavadh Jul 13, 2025
076210b
fix: firstdate staff bg
dhanavadh Jul 13, 2025
a25dc69
Merge branch 'dev' into feat/firstdate/staff-qr
dhanavadh Jul 14, 2025
2eb62c2
feat: add @yudiel/react-qr-scanner
dhanavadh Jul 14, 2025
4cbcbd3
Merge branch 'dev' into feat/firstdate/staff-qr
dhanavadh Jul 14, 2025
a70b642
Merge branch 'dev' into feat/firstdate/staff-qr
dhanavadh Jul 14, 2025
2fa23d2
Merge branch 'dev' into feat/firstdate/staff-qr
dhanavadh Jul 14, 2025
560d6a0
Feat: added staff-qr page
dhanavadh Jul 14, 2025
382c2c8
Merge branch 'dev' into feat/firstdate/staff-qr
neennera Jul 15, 2025
a5e278f
chore: fix middleware doesn't work
Dpyde Jul 16, 2025
9846fda
feat: Implement qr scan with api
Dpyde Jul 16, 2025
6b9742a
Merge branch 'dev' into feat/firstdate/staff-qr
dhanavadh Jul 16, 2025
9447040
fix: staff-qr code
dhanavadh Jul 16, 2025
d3ac27c
Merge branch 'feat/firstdate/staff-qr' of https://github.com/isd-sgcu…
neennera Jul 16, 2025
cd6e983
Merge branch 'dev' into feat/firstdate/staff-qr
neennera Jul 17, 2025
e53584f
fix: conflicts
MasterIceZ Jul 17, 2025
707f4a7
fix: qr scan error, body stream err, cannot send cookie to backend err
dhanavadh Jul 17, 2025
8395fc4
Fix: alternative form handle error
dhanavadh Jul 17, 2025
919a945
fix: no event active layout
dhanavadh Jul 17, 2025
9523a05
Merge branch 'dev' into feat/firstdate/staff-qr
dhanavadh Jul 17, 2025
7878eff
Merge branch 'feat/firstdate/staff-qr' of https://github.com/isd-sgcu…
neennera Jul 17, 2025
4104be7
[Fix] Staff-QR (#71)
dhanavadh Jul 17, 2025
80569df
feat: getGroupByInviteCode
BadLuckZ Jul 17, 2025
0b94782
fix: fest content
neennera Jul 17, 2025
e0c6a73
fix: qrcode in /events go to /firstdate/qrcode
neennera Jul 17, 2025
f6e264a
add : checkin not found & remove freshmennight
neennera Jul 17, 2025
d0acd9f
feat: joinGroup and leaveGroup
BadLuckZ Jul 17, 2025
09d2d67
add: fix event period
neennera Jul 17, 2025
1c252d1
fix: staff with navbar
neennera Jul 17, 2025
0bd0a31
Update Routes.ts
BadLuckZ Jul 17, 2025
82d9fc3
feat: add nonStartedRoutes time constraint whitelist
Taihenc Jul 17, 2025
c3c7d6a
fix : home & map unclickable
neennera Jul 17, 2025
8448136
fix: new Date()
neennera Jul 17, 2025
05e7123
Merge pull request #80 from isd-sgcu/fix/qr-code-not-scan
neennera Jul 17, 2025
dd16c0b
feat: getHousePref() + setHousePref()
BadLuckZ Jul 17, 2025
375308a
fix: qr load
Taihenc Jul 17, 2025
be3ec12
Merge branch 'main' into dev
Taihenc Jul 17, 2025
4657972
fix: adjust datatype
BadLuckZ Jul 18, 2025
366cf26
fix: check in not found event
neennera Jul 18, 2025
c56c4d6
fix: qa profile , firstdate register
neennera Jul 18, 2025
2b8d55e
Merge branch 'main' into dev
neennera Jul 18, 2025
b8cf671
Merge pull request #79 from isd-sgcu/feat/rpkm/groupAPI
RawSalmon69 Jul 18, 2025
05e413a
fix: Adjust data type again based on backend
BadLuckZ Jul 18, 2025
9646dcd
fix: Trust me - 0.5s delay can't avoid -1 people in the houses
BadLuckZ Jul 18, 2025
7e4ae70
Merge branch 'dev' into feat/rpkm/houseAPI
BadLuckZ Jul 18, 2025
81acaf5
feat: Can get housePref
BadLuckZ Jul 18, 2025
bce2b41
feat: Get Houses with API
BadLuckZ Jul 18, 2025
cee3abe
feat: Submit Houses
BadLuckZ Jul 18, 2025
35f12cb
feat: Loading Icon
BadLuckZ Jul 18, 2025
5e26cb2
fix: สำรองโคตรเล็ก พึ่งเห็น
BadLuckZ Jul 18, 2025
475d205
fix: Route.ts
BadLuckZ Jul 18, 2025
86c9d78
fix: edit profile
MasterIceZ Jul 18, 2025
3f2f88b
chore: remove ig
MasterIceZ Jul 18, 2025
aa7423e
Merge branch 'main' into dev
MasterIceZ Jul 18, 2025
750a5be
nothing: parse to <script>
BadLuckZ Jul 18, 2025
f54f419
Merge branch 'dev' into feat/rpkm/houseAPI
BadLuckZ Jul 18, 2025
800b2bb
fix: Custom Size's color not only black
BadLuckZ Jul 18, 2025
3637bed
fix: quest-3-x banner path
BadLuckZ Jul 18, 2025
5cf263b
fix: Change Card's gap
BadLuckZ Jul 18, 2025
1a0cd73
[Feat][RPKM] Houses (#84)
BadLuckZ Jul 18, 2025
8d6e30c
Merge branch 'main' into dev
RawSalmon69 Jul 18, 2025
f39eb56
Merge branch 'dev' into feat/rpkm/groupAPI
BadLuckZ Jul 18, 2025
02eb4cf
Merge branch 'feat/rpkm/houseAPI' into feat/rpkm/groupAPI
BadLuckZ Jul 18, 2025
65269ed
feat: Hidden Buttons for non-owner (Not sure for members)
BadLuckZ Jul 18, 2025
49270cb
fix: Bugs from PM
BadLuckZ Jul 18, 2025
72c2ba9
fix: Bugs Again
BadLuckZ Jul 18, 2025
83accf5
fix: Bugs Again...
BadLuckZ Jul 18, 2025
1a8d9b5
feat: Join Group
BadLuckZ Jul 18, 2025
95a5c7f
fix: Remove things
BadLuckZ Jul 18, 2025
138bdaf
feat: leaveGroup
BadLuckZ Jul 18, 2025
b2891b2
fix: Group UI
BadLuckZ Jul 18, 2025
4afd871
fix: Route.ts
BadLuckZ Jul 18, 2025
15edd80
Merge branch 'dev' into feat/rpkm/groupAPI
BadLuckZ Jul 18, 2025
fc70ce2
fix: reload
BadLuckZ Jul 18, 2025
f1e2b41
Merge branch 'feat/rpkm/groupAPI' of https://github.com/isd-sgcu/fdrp…
BadLuckZ Jul 18, 2025
1e6bfe7
fix: Show that members can't pick group
BadLuckZ Jul 19, 2025
2c4ea81
[Fix][RPKM] ฝันดีครับน้อง อุอิอิอา (#87)
BadLuckZ Jul 19, 2025
b5e2297
feat: added Freshmen night regis
dhanavadh Jul 19, 2025
07881af
feat: added FM night link in navbar
dhanavadh Jul 19, 2025
96e5daf
fix: qrcode
neennera Jul 19, 2025
6a6f02d
Merge branch 'dev' into feat/firstdate/staff-qr
neennera Jul 19, 2025
ac39a95
Merge branch 'feat/firstdate/staff-qr' into fix/qr-code-not-scan
neennera Jul 17, 2025
ac4b188
Merge remote-tracking branch 'origin/dev' into feat/rpkm/groupAPI
BadLuckZ Jul 19, 2025
2df5102
fix: EZ Quick Math
BadLuckZ Jul 19, 2025
becbb76
fix: fix middleware potential bug
Taihenc Jul 19, 2025
784401c
chore: update workshops data
Taihenc Jul 19, 2025
4da50d4
feat: update workshop components
Taihenc Jul 19, 2025
33138f5
feat: integrate workshops registration
Taihenc Jul 19, 2025
e260e3a
fix: fd bg to webp and staff home button
dhanavadh Jul 19, 2025
ec27317
feat: impl UI for user's registered workshops
Taihenc Jul 19, 2025
3cca08a
Merge pull request #89 from isd-sgcu/feat/rpkm/groupAPI
MasterIceZ Jul 19, 2025
9bd4c79
fix: changed to hardcoded event-period
dhanavadh Jul 19, 2025
a27d81a
feat: integrate get participant count from be
Taihenc Jul 19, 2025
3c840f9
fix: Changing By PM
BadLuckZ Jul 19, 2025
9a81506
fix: Route.ts
BadLuckZ Jul 19, 2025
3e7dc2e
Merge pull request #91 from isd-sgcu/feat/workshop-integrate-backend
MasterIceZ Jul 19, 2025
b44f991
Merge pull request #88 from isd-sgcu/feat/firstdate/fmnight
MasterIceZ Jul 19, 2025
4e1c296
Merge pull request #90 from isd-sgcu/fix/firstdate/bg
MasterIceZ Jul 19, 2025
cec92d3
chore: update rpkm date
Taihenc Jul 19, 2025
d2a4c26
feat: add workshop img, & minor stype fix
Taihenc Jul 19, 2025
10df88e
refactor: use .webp instead
Taihenc Jul 19, 2025
526e72f
Merge remote-tracking branch 'origin/dev' into feat/workshop-minor-st…
Taihenc Jul 19, 2025
cad26f0
feat: intagrate bottle of choice dialog
Taihenc Jul 19, 2025
8668389
refactor: fix typo
Taihenc Jul 19, 2025
c9d0c1c
Merge pull request #96 from isd-sgcu:feat/workshop-minor-style-fix
Taihenc Jul 19, 2025
5d4dc0b
Merge pull request #97 from isd-sgcu:feat/integrate-bottle-of-choice
Taihenc Jul 19, 2025
61254f2
feat: add shadow to divider component
Taihenc Jul 20, 2025
72451c1
Merge remote-tracking branch 'origin/main' into dev
Taihenc Jul 20, 2025
1ec5209
Merge branch 'main' into dev
Taihenc Jul 20, 2025
24cce65
hot: member visualization
BadLuckZ Jul 20, 2025
3dc52e8
Merge branch 'main' into dev
RawSalmon69 Jul 20, 2025
333dac8
fix: Remove *2
BadLuckZ Jul 20, 2025
da6da87
fix: update goback href navbar for rpkm home
Taihenc Jul 20, 2025
8bce893
feat: map error to message
Taihenc Jul 20, 2025
3939045
feat: change err msg to thai
Taihenc Jul 20, 2025
d553bb9
Merge remote-tracking branch 'origin/main' into dev
Taihenc Jul 20, 2025
e7adb11
chore: bro when is real final data?
RawSalmon69 Jul 21, 2025
ae88bf4
Merge branch 'main' into dev
RawSalmon69 Jul 21, 2025
1ac9488
[Feat][RPKM] House Display (#103)
BadLuckZ Jul 23, 2025
047dc2f
Merge branch 'main' into dev
RawSalmon69 Jul 23, 2025
8ff1681
fix: Remove YT
BadLuckZ Jul 23, 2025
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
62 changes: 59 additions & 3 deletions src/components/rpkm/components/group-picker.astro
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ const member2 = members.length > 1 ? members[1] : null;
import { AvatarMap } from "@rpkm/data/profile";
import { getProfile } from "@/lib/profileAPI";
import type { Group, User } from "@/types/common";
import { disablePickingDate } from "@rpkm/data/date";

const currentDate = new Date();
const isPickingDisabled = currentDate >= disablePickingDate;

document.addEventListener("DOMContentLoaded", async () => {
const userResponse = await getProfile();
Expand All @@ -380,8 +384,6 @@ const member2 = members.length > 1 ? members[1] : null;
const groupData = groupResponse.data.data as Group;

const isConfirmed = groupData ? groupData.isConfirmed : undefined;
const isOwner =
groupData && user ? groupData.ownerId === user.id : undefined;
const memberCount = groupData ? groupData.memberCount : -1;

const input = document.getElementById("room-id-insert") as HTMLInputElement;
Expand Down Expand Up @@ -490,6 +492,60 @@ const member2 = members.length > 1 ? members[1] : null;
}
}

if (isPickingDisabled) {
input.disabled = true;
input.placeholder = "ไม่สามารถกรอกเลขห้องได้";
headGroupBtn.disabled = true;
headGroupBtn.classList.add(
"cursor-not-allowed",
"opacity-50",
"brightness-75"
);
headGroupBtn.classList.remove("cursor-pointer");
backBtn?.classList.add("hidden");
exitButton?.classList.add("hidden");
submitGroupButton.disabled = true;
submitGroupButton.classList.add(
"cursor-not-allowed",
"opacity-50",
"brightness-75"
);
submitGroupButton.classList.remove("cursor-pointer");
joinGroupButton.disabled = true;
joinGroupButton.classList.add(
"cursor-not-allowed",
"opacity-50",
"brightness-75"
);
joinGroupButton.classList.remove("cursor-pointer");
} else {
input.disabled = false;
input.placeholder = "โปรดกรอกรหัสห้อง";
headGroupBtn.disabled = false;
headGroupBtn.classList.remove(
"cursor-not-allowed",
"opacity-50",
"brightness-75"
);
headGroupBtn.classList.add("cursor-pointer");
backBtn?.classList.remove("hidden");
exitButton?.classList.remove("hidden");
submitGroupButton.disabled = false;
submitGroupButton.classList.remove(
"cursor-not-allowed",
"opacity-50",
"brightness-75"
);
submitGroupButton.classList.add("cursor-pointer");
joinGroupButton.disabled = false;
joinGroupButton.classList.remove(
"cursor-not-allowed",
"opacity-50",
"brightness-75"
);
joinGroupButton.classList.add("cursor-pointer");
}

input?.addEventListener("input", toggleSubmitButton);
toggleSubmitButton();

Expand Down Expand Up @@ -726,7 +782,7 @@ const member2 = members.length > 1 ? members[1] : null;
}
});

if (isConfirmed) {
if (isConfirmed || isPickingDisabled) {
exitButton?.classList.add("hidden");
backBtn?.classList.add("hidden");
} else {
Expand Down
91 changes: 91 additions & 0 deletions src/components/rpkm/components/house-display.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
import Frame from "@/components/common/Frame.astro";
import { getGroupByGroupId } from "@/lib/groupAPI";
import { getProfile } from "@/lib/profileAPI";
import type { Group, User } from "@/types/common";

const token = Astro.cookies.get("token")?.value;

let groupData: Group | null = null;
let user: User | null = null;

if (token) {
let groupID = "";
const userResponse = await getProfile(token);
if (userResponse.success && userResponse.data) {
user = userResponse.data.user as User;
groupID = user.groupId ? user.groupId : "";
if (groupID) {
const groupResponse = await getGroupByGroupId(groupID, token);
if (groupResponse.success && groupResponse.data) {
groupData = groupResponse.data.data as Group;
} else {
return Astro.redirect("/login");
}
} else {
return Astro.redirect("/login");
}
} else {
console.error("Failed to fetch user data:", userResponse.error);
}
} else {
return Astro.redirect("/login");
}

if (!groupData || !user) {
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.
---

<div class="h-full w-full" id="view-house-final">
{
!assignedHouse ? (
<Frame size="xs" color="purple" contentContainerClass="!h-full">
{/* Title */}
<p class="text-2xl font-semibold text-white">
บ้านรับเพื่อนที่เลือกไว้
</p>

{/* Empty Houses */}
<div class="pt-8">
<p class="text-[28px] font-semibold text-white">คุณไม่ได้เลือกบ้าน</p>
</div>
</Frame>
) : (
<Frame
size="md"
color="purple"
contentContainerClass="!h-full !items-center !flex !flex-col"
>
{/* Title */}
<p class="text-2xl font-semibold text-white">บ้านรับเพื่อนที่ได้</p>

{/* House Image */}
<img
src="/images/rpkm/house-demo.png"
width={160}
height={160}
class="mt-5 border-4 border-white"
/>

{/* House Name */}
<p class="pt-5 text-3xl font-semibold text-white">บ้าน xxx</p>

{/* House Instagram */}
<a
id="house-instagram-link-final"
href="#"
target="_blank"
class="flex cursor-pointer items-center gap-1 pt-4 pb-8"
>
<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.
</p>
</a>
</Frame>
)
}
</div>
72 changes: 27 additions & 45 deletions src/components/rpkm/components/house-picker.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import { disablePickingDate } from "@rpkm/data/date";
import {
getHouses,
type HouseDisplayType,
Expand All @@ -16,6 +17,9 @@ import { getGroupByGroupId } from "@/lib/groupAPI";
import { getProfile } from "@/lib/profileAPI";
import type { Group, User } from "@/types/common";

const currentDate = new Date();
const isHousePickingDisabled = currentDate >= disablePickingDate;

const houseSizes = ["ทั้งหมด", "S", "M", "L", "XL", "XXL"];

let houseDisplayData: HouseDisplayType[] = [];
Expand Down Expand Up @@ -89,7 +93,13 @@ const isPickAllMainHouses =

<!-- Empty Houses -->
<div class="pt-5">
<p class="text-[28px] font-semibold text-white">คุณยังไม่ได้เลือกบ้าน</p>
<p class="text-[28px] font-semibold text-white">
{
!isHousePickingDisabled
? "คุณยังไม่ได้เลือกบ้าน"
: "คุณไม่ได้เลือกบ้าน"
}
</p>
</div>

<!-- Button -->
Expand Down Expand Up @@ -253,42 +263,6 @@ const isPickAllMainHouses =

<HouseConfirmPopup />

<!-- House Final Wrapper -->
<div class="hidden h-full w-full" id="view-house-final">
<Frame
size="md"
color="purple"
contentContainerClass="!h-full !items-center !flex !flex-col"
>
<!-- Title -->
<p class="text-2xl font-semibold text-white">บ้านรับเพื่อนที่ได้</p>

<!-- House Image -->
<img
src="/images/rpkm/house-demo.png"
width={160}
height={160}
class="mt-5 border-4 border-white"
/>

<!-- House Name -->
<p class="pt-5 text-3xl font-semibold text-white">บ้าน xxx</p>

<!-- House Instagram -->
<a
id="house-instagram-link-final"
href="https://youtu.be/dQw4w9WgXcQ?si=To9bwNaRw7cl03NT"
target="_blank"
class="flex cursor-pointer items-center gap-1 pt-4 pb-8"
>
<img src="/images/rpkm/instagram-icon.svg" width="20" height="20" />
<p id="house-instagram-final" class="font-medium text-white">
baan.something
</p>
</a>
</Frame>
</div>

<!-- Script -->
<script
define:vars={{
Expand All @@ -298,6 +272,7 @@ const isPickAllMainHouses =
token: token || "",
isConfirmed: isConfirmed,
isOwner: isOwner,
isHousePickingDisabled: isHousePickingDisabled,
}}
>
document.addEventListener("DOMContentLoaded", () => {
Expand All @@ -309,15 +284,17 @@ const isPickAllMainHouses =
const houseSearchInput = document.getElementById("house-search");
const houseSizeFilter = document.getElementById("house-size-filter");
const houseSizeOptions = document.querySelectorAll(".size-option");

const houseCardContainer = document.getElementById("house-card-container");
const closeBtn = document.getElementById("popup-close-btn");
if (!isOwner) {
if (!isOwner || isHousePickingDisabled) {
closeBtn.classList.add("hidden");
} else {
closeBtn.classList.remove("hidden");
}

const pickBtn = document.getElementById("btn-picking-house");
if (!isOwner) {
if (!isOwner || isConfirmed || isHousePickingDisabled) {
pickBtn.disabled = true;
pickBtn.classList.add("cursor-not-allowed", "opacity-50");
pickBtn.classList.remove("cursor-pointer", "opacity-100");
Expand All @@ -328,12 +305,14 @@ const isPickAllMainHouses =
pickBtn.classList.add("cursor-pointer", "opacity-100");
pickBtn.innerHTML = `<p class="text-xl text-white font-medium">เลือกบ้าน</p>`;
}

const submitBtn = document.getElementById("btn-submit-house");
if (!isOwner) {
if (!isOwner || isHousePickingDisabled || isConfirmed) {
submitBtn.classList.add("hidden");
} else {
submitBtn.classList.remove("hidden");
}

const notPickingView = document.getElementById("view-not-picking");
const pickingView = document.getElementById("view-picking");

Expand Down Expand Up @@ -676,7 +655,10 @@ const isPickAllMainHouses =
<p class="text-xs text-[#2B2D42] font-semibold text-center overflow-hidden whitespace-nowrap text-ellipsis">${house.nameThai}</p>
</div>
${
isOwner && !isConfirmed && !isSubmitted
isOwner &&
!isConfirmed &&
!isSubmitted &&
!isHousePickingDisabled
? `
<div class="flex justify-center">
<button class="cursor-pointer flex justify-center items-center">
Expand All @@ -691,9 +673,9 @@ const isPickAllMainHouses =
} else {
card.innerHTML = `
<button
class="relative h-[100px] w-[80px] border-dashed border-2 flex justify-center items-center border-[#D38DD8] ${isOwner && !isConfirmed && !isSubmitted ? "hover:bg-[#D38DD8]/20 transition-colors cursor-pointer" : "cursor-default"}"
class="relative h-[100px] w-[80px] border-dashed border-2 flex justify-center items-center border-[#D38DD8] ${isOwner && !isConfirmed && !isSubmitted && !isHousePickingDisabled ? "hover:bg-[#D38DD8]/20 transition-colors cursor-pointer" : "cursor-default"}"
data-rank="${rank}"
${!isOwner ? "disabled" : ""}
${!isOwner || isHousePickingDisabled ? "disabled" : ""}
>
<img
src="/images/rpkm/rank-${rank}.svg"
Expand All @@ -703,7 +685,7 @@ const isPickAllMainHouses =
/>
<img
src="/images/rpkm/plus-icon.svg"
class="w-5 h-5 ${isOwner && !isConfirmed && !isSubmitted ? "" : "hidden"}"
class="w-5 h-5 ${!isHousePickingDisabled && isOwner && !isConfirmed && !isSubmitted ? "" : "hidden"}"
/>
</button>
`;
Expand Down Expand Up @@ -877,7 +859,7 @@ const isPickAllMainHouses =
// Update instagram link
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.
}

// Update button texts
Expand Down
2 changes: 2 additions & 0 deletions src/components/rpkm/data/date.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const disablePickingDate = new Date("2025-07-24T00:00:00+07:00");
export const displayHouseDate = new Date("2025-07-27T00:00:00+07:00");
6 changes: 5 additions & 1 deletion src/components/rpkm/sample.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
import "@rpkm/styles/styles.css";
import GroupPicker from "@rpkm/components/group-picker.astro";
import HouseDisplay from "@rpkm/components/house-display.astro";
import HousePicker from "@rpkm/components/house-picker.astro";
import Profile from "@rpkm/components/profile.astro";
import { displayHouseDate } from "@rpkm/data/date";

const currentDate = new Date();
---

<div
Expand All @@ -12,7 +16,7 @@ import Profile from "@rpkm/components/profile.astro";
<Profile />

<!-- House -->
<HousePicker />
{currentDate >= displayHouseDate ? <HouseDisplay /> : <HousePicker />}

<!-- Group -->
<GroupPicker />
Expand Down
Loading