Skip to content

Commit 09e068e

Browse files
committed
feat: resistration duration
1 parent ce60c40 commit 09e068e

File tree

4 files changed

+36
-24
lines changed

4 files changed

+36
-24
lines changed

back/routes/registration.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ router.get("/advisor_sign", async (req, res) => {
103103
order: [["recent_edit", "DESC"]],
104104
});
105105

106-
const signed =
107-
latestSign &&
108-
(!latestEdit || latestSign.sign_time > latestEdit.recent_edit);
106+
const signed = latestSign ? true : false;
107+
// (!latestEdit || latestSign.sign_time > latestEdit.recent_edit);
109108

110109
res.json({ signed });
111110
} catch (error) {

back/server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ app.use(
4040
store: sessionStore,
4141
resave: false,
4242
saveUninitialized: false,
43+
rolling: true,
4344
cookie: {
4445
httpOnly: true,
4546
secure: process.env.NODE_ENV === "production", // HTTPS 환경에서만 true
46-
// maxAge: 1000 * 60 * 60 * 24 // 예: 24시간
47+
maxAge: 1000 * 60 * 60 * 3, // 예: 24시간
4748
},
4849
})
4950
);

back/utils/duration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ async function checkRegistrationDuration() {
150150
) {
151151
responseCode = 1;
152152
} else if (
153-
duration.duration_name === "MemberRegistration" &&
153+
duration.duration_name === "ClubRegistrationModify" &&
154154
currentDate >= startDate &&
155155
currentDate <= endDate
156156
) {

front/src/pages/registration/ClubRegistration/ClubRegistration.tsx

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,21 @@ export const ClubRegistration = (): JSX.Element => {
8383
</p>
8484
<div className="frame-12">
8585
<div className="frame-14">
86-
<div
87-
className="frame-15"
88-
style={{ cursor: "pointer" }}
89-
onClick={() =>
90-
navigate("/add_club_registration/provisional")
91-
}
92-
>
93-
<div className="text-wrapper-11">등록 신청</div>
94-
</div>
86+
{durationStatus === 1 ? (
87+
<div
88+
className="frame-15"
89+
style={{ cursor: "pointer" }}
90+
onClick={() =>
91+
navigate("/add_club_registration/provisional")
92+
}
93+
>
94+
<div className="text-wrapper-11">등록 신청</div>
95+
</div>
96+
) : (
97+
<div className="frame-15">
98+
<div className="text-wrapper-11">등록 불가</div>
99+
</div>
100+
)}
95101
</div>
96102
</div>
97103
</div>
@@ -110,15 +116,21 @@ export const ClubRegistration = (): JSX.Element => {
110116
</p>
111117
<div className="frame-12">
112118
<div className="frame-14">
113-
<div
114-
className="frame-15"
115-
style={{ cursor: "pointer" }}
116-
onClick={() =>
117-
navigate("/add_club_registration/promotional")
118-
}
119-
>
120-
<div className="text-wrapper-11">등록 신청</div>
121-
</div>
119+
{durationStatus === 1 ? (
120+
<div
121+
className="frame-15"
122+
style={{ cursor: "pointer" }}
123+
onClick={() =>
124+
navigate("/add_club_registration/promotional")
125+
}
126+
>
127+
<div className="text-wrapper-11">등록 신청</div>
128+
</div>
129+
) : (
130+
<div className="frame-15">
131+
<div className="text-wrapper-11">등록 불가</div>
132+
</div>
133+
)}
122134
</div>
123135
</div>
124136
</div>
@@ -132,7 +144,7 @@ export const ClubRegistration = (): JSX.Element => {
132144
</p>
133145
<div className="frame-12">
134146
<div className="frame-14">
135-
{typeId ? (
147+
{typeId && durationStatus === 1 ? (
136148
<div
137149
className="frame-15"
138150
style={{ cursor: "pointer" }}

0 commit comments

Comments
 (0)