Skip to content

Commit e78ebc9

Browse files
committed
hide shop until membership to avoid confusing msg in the first place
1 parent 52197a5 commit e78ebc9

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

public/member/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ <h3>Log Attendance</h3>
179179
<button id="logActivityButton" class="submit-btn disabled" disabled>Log Activity</button>
180180
</div>
181181

182-
<div id="shopSection" class="shop-section">
182+
<div id="shopSection" class="shop-section hidden-until-membership">
183183
<h3>RAS Store</h3>
184184
<div id="shopTableContainer"></div>
185185

public/member/membershipForm.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ function submitMembershipForm(form, data, submitButton, originalButtonText) {
182182
// Get the EID from the form data
183183
const eid = data.EID;
184184

185+
// Show the shop section since membership is now filled
186+
const shopSection = document.getElementById('shopSection');
187+
if (shopSection) {
188+
shopSection.classList.remove('hidden-until-membership');
189+
}
190+
185191
// Hide the form after successful submission
186192
setTimeout(() => {
187193
form.style.display = 'none';
@@ -234,4 +240,14 @@ export function handleFormVisibility(memberExists, eid) {
234240
if (membershipForm) {
235241
membershipForm.style.display = memberExists ? 'none' : 'block';
236242
}
243+
244+
// Show/hide shop section based on member existence
245+
const shopSection = document.getElementById('shopSection');
246+
if (shopSection) {
247+
if (memberExists) {
248+
shopSection.classList.remove('hidden-until-membership');
249+
} else {
250+
shopSection.classList.add('hidden-until-membership');
251+
}
252+
}
237253
}

public/member/styles.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ input { padding: .55rem; box-sizing: border-box; margin-top: .6rem; }
224224
display: none;
225225
}
226226

227+
/* Container that's hidden until membership is filled */
228+
.hidden-until-membership {
229+
display: none;
230+
}
231+
227232
.form-toggle-btn {
228233
background-color: #bf5700; /* UT Austin burnt orange */
229234
color: white;

0 commit comments

Comments
 (0)