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

Tutor signup hotfix 1 #22

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Changes from all commits
Commits
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
35 changes: 19 additions & 16 deletions src/components/TutorSignupForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,34 +75,28 @@ export default class TutorSignupForm {

if (isModalButton) {
await this.onModalButton(interaction);
console.log(this.formData);
return;
}

if (isModalSubmit) {
await this.onModalSubmit(interaction);
console.log(this.formData);
return;
}

if (isSelectMenu) {
await this.onDropdownSubmit(interaction);
console.log(this.formData);
return;
}

if (isSubmitButton) {
console.log(this.formData);
await this.onFormSubmit(interaction);
}

if (isAcceptButton) {
console.log(this.formData);
await this.onAcceptTutor(interaction);
}

if (isRejectButton) {
console.log(this.formData);
await this.onRejectTutor(interaction);
}
};
Expand Down Expand Up @@ -414,9 +408,7 @@ export default class TutorSignupForm {
.setEmoji("❌")
.setValue("< 3 Hours")
)
.setPlaceholder(
"Have you completed 3 or more hours of CS course credit? *"
);
.setPlaceholder("CS credit hours completed *");

private passedCourses = new StringSelectMenuBuilder()
.setCustomId(this.dropdownIds.passedCourses)
Expand All @@ -430,23 +422,19 @@ export default class TutorSignupForm {
.setEmoji("❌")
.setValue("Not Passed")
)
.setPlaceholder(
"Have you passed all the courses that you've applied for? *"
);
.setPlaceholder("Selected courses passed *");

private tosAgreement = new StringSelectMenuBuilder()
.setCustomId(this.dropdownIds.tosAgreement)
.setOptions(
new StringSelectMenuOptionBuilder()
.setLabel("I will abide to the CougarCS TOS and Code of Conduct")
.setEmoji("✅")
.setValue("Passed")
.setValue("Agreed")
)
.setMinValues(1)
.setMaxValues(1)
.setPlaceholder(
"By submitting, you agree to abide by the CougarCS TOS and Code of Conduct. *"
);
.setPlaceholder("CougarCS TOS agreement *");

private formSubmitButton = new ButtonBuilder()
.setCustomId(this.uniqueId("form-submit"))
Expand Down Expand Up @@ -698,6 +686,21 @@ export default class TutorSignupForm {
value: this.formData.coursesTutoring.join(", ") || " ",
inline: true,
},
{
name: "Passed Courses",
value: this.formData.passedCourses || " ",
inline: true,
},
{
name: "CS Hours",
value: this.formData.threeCourseHours || " ",
inline: true,
},
{
name: "TOS",
value: this.formData.tosAgreement || " ",
inline: true,
},
{
name: "Reason",
value: this.formData.reason || " ",
Expand Down