Skip to content

Commit

Permalink
Merge pull request #22 from CougarCS/tutor-signup-dev
Browse files Browse the repository at this point in the history
Tutor signup hotfix 1
  • Loading branch information
mellophone authored Aug 25, 2023
2 parents 771a825 + f2ca08f commit a17656d
Showing 1 changed file with 19 additions and 16 deletions.
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

0 comments on commit a17656d

Please sign in to comment.