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

Remove TeacherCon from cohort view #26761

Merged
merged 8 commits into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from 6 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
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,6 @@ export default class AdminCohortViewTable extends React.Component {
cell: {
format: this.formatBoolean
}
}, {
property: 'teachercon_assigned_at_registration',
header: {
label: 'Teachercon Assigned at Registration',
transforms: [sortable]
}
}, {
property: 'accepted_teachercon',
header: {
label: 'Accepted Teachercon',
transforms: [sortable]
}
}, {
property: 'assigned_fit',
header: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,6 @@ export class CohortViewTable extends React.Component {
}
});

if ([WorkshopTypes["teachercon"], WorkshopTypes["both"]].includes(this.workshopType)) {
columns.push({
property: 'accepted_teachercon',
header: {
label: 'Accepted Teachercon',
transforms: [sortable]
}
});
}

if ([WorkshopTypes["local_summer"], WorkshopTypes["both"]].includes(this.workshopType)) {
columns.push({
property: 'registered_workshop',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export default storybook => {
school_name: 'Hogwarts',
email: 'nurse@hogwarts.edu',
notified: 'Yes',
assigned_workshop: 'TeacherCon Chicago',
accepted_teachercon: 'Yes'
assigned_workshop: 'Chicago Summer Workshop 6/1'
},
{
id: 2,
Expand All @@ -32,8 +31,7 @@ export default storybook => {
school_name: 'Hogwarts',
email: 'short@hogwarts.edu',
notified: 'Yes',
assigned_workshop: 'TeacherCon Chicago',
accepted_teachercon: 'No'
assigned_workshop: 'Chicago Summer Workshop 6/1'
}
]}
viewType="teacher"
Expand All @@ -48,7 +46,7 @@ export default storybook => {
workshop_type: WorkshopTypes.local_summer
},{
id: 2,
workshop_type: WorkshopTypes.teachercon
workshop_type: WorkshopTypes.local_summer
}
]}
/>
Expand Down Expand Up @@ -97,7 +95,7 @@ export default storybook => {
workshop_type: WorkshopTypes.local_summer
},{
id: 2,
workshop_type: WorkshopTypes.teachercon
workshop_type: WorkshopTypes.local_summer
}
]}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,8 @@ def get_csv_text(applications, role)
].join
end

# TODO: remove remaining teachercon references
def get_optional_columns(_regional_partner_value)
{accepted_teachercon: false, registered_workshop: false}
{registered_workshop: false}
end

def prefetch_and_serialize(applications, role: nil, serializer:, scope: {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class Api::V1::Pd::FitCohortViewSerializer < ActiveModel::Serializer
:email,
:assigned_workshop,
:registered_workshop,
:accepted_teachercon,
:assigned_fit,
:registered_fit,
:accepted_fit,
Expand Down Expand Up @@ -38,14 +37,6 @@ def registered_workshop
object.try(:registered_workshop?)
end

def teachercon_assigned_at_registration
tc_registration.try(:teachercon_city)
end

def accepted_teachercon
tc_registration.try(:accepted_seat_simplified)
end

def assigned_fit
object.try(:fit_workshop_date_and_location)
end
Expand Down Expand Up @@ -79,15 +70,7 @@ def locked
end

def form_data
if @scope[:view] == 'teachercon'
if object.is_a? Pd::Teachercon1819Registration
object.form_data_hash
else
object.try(:pd_teachercon1819_registration).try(:form_data_hash)
end
else # fit
object.try(:pd_fit_weekend1819_registration).try(:form_data_hash)
end
object.try(:pd_fit_weekend1819_registration).try(:form_data_hash)
end

private
Expand Down