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

Add CSF district workshop #46544

Merged
merged 5 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/script/generateSharedConstants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def main
SUBJECT_NAMES
SUBJECTS
VIRTUAL_ONLY_SUBJECTS
HIDE_FEE_INFORMATION_SUBJECTS
HIDE_ON_WORKSHOP_MAP_SUBJECTS
MUST_SUPPRESS_EMAIL_SUBJECTS
ACADEMIC_YEAR_WORKSHOP_SUBJECTS
LEGACY_SUBJECTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import {
} from '../permission';
import {
Subjects,
HideFeeInformationSubjects,
HideOnWorkshopMapSubjects,
VirtualOnlySubjects,
NotFundedSubjects,
MustSuppressEmailSubjects
Expand Down Expand Up @@ -361,8 +363,14 @@ export class WorkshopForm extends React.Component {
renderWorkshopTypeOptions(validation) {
const isCsf = this.state.course === 'CS Fundamentals';
const isAdminCounselor = this.state.course === 'Admin/Counselor Workshop';
const showFeeInput = isCsf;
const showMapChoice = isCsf;
const showFeeInput =
isCsf &&
this.state.subject &&
!HideFeeInformationSubjects.includes(this.state.subject);
const showMapChoice =
isCsf &&
this.state.subject &&
!HideOnWorkshopMapSubjects.includes(this.state.subject);
const showFundedInput = !isAdminCounselor;

return (
Expand Down
10 changes: 10 additions & 0 deletions lib/cdo/shared_constants/pd/shared_workshop_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module SharedWorkshopConstants
SUBJECT_NAMES = {
SUBJECT_CSF_101: SUBJECT_CSF_101 = 'Intro'.freeze,
SUBJECT_CSF_201: SUBJECT_CSF_201 = 'Deep Dive'.freeze,
SUBJECT_CSF_DISTRICT: SUBJECT_CSF_DISTRICT = 'District'.freeze,
SUBJECT_FIT: SUBJECT_FIT = 'Code.org Facilitator Weekend'.freeze,
SUBJECT_SUMMER_WORKSHOP: SUBJECT_SUMMER_WORKSHOP = '5-day Summer'.freeze,
SUBJECT_VIRTUAL_KICKOFF: SUBJECT_VIRTUAL_KICKOFF = 'Virtual Workshop Kickoff'.freeze,
Expand Down Expand Up @@ -111,6 +112,7 @@ module SharedWorkshopConstants
COURSE_CSF => [
SUBJECT_CSF_101,
SUBJECT_CSF_201,
SUBJECT_CSF_DISTRICT,
SUBJECT_CSF_FIT = SUBJECT_FIT
],
COURSE_ADMIN_COUNSELOR => [
Expand All @@ -136,6 +138,14 @@ module SharedWorkshopConstants
SUBJECT_ADMIN_COUNSELOR_SLP_CALL4
].freeze

HIDE_FEE_INFORMATION_SUBJECTS = [
SUBJECT_CSF_DISTRICT
].freeze

HIDE_ON_WORKSHOP_MAP_SUBJECTS = [
SUBJECT_CSF_DISTRICT
].freeze

ACADEMIC_YEAR_WORKSHOP_SUBJECTS = [
SUBJECT_VIRTUAL_KICKOFF,
SUBJECT_WORKSHOP_1,
Expand Down