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 total attendance column to workshop dashboard for local summer workshops #26828

Merged
merged 27 commits into from
Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
049c0ce
add total attendance column to workshop dashboard
Jan 31, 2019
d37db40
add unit tests
Jan 31, 2019
18368b9
Merge branch 'staging' into add-attendance-column
Feb 5, 2019
b80d3e5
Merge branch 'staging' into add-attendance-column
Feb 6, 2019
c2ad7db
WIP UI tests
Feb 7, 2019
f292241
Merge branch 'staging' into add-attendance-column
Feb 9, 2019
f0aef54
Merge branch 'staging' into add-attendance-column
Feb 14, 2019
b2e25fa
Merge branch 'staging' into add-attendance-column
Feb 20, 2019
22a822d
Merge branch 'staging' into add-attendance-column
Feb 20, 2019
20ead1b
undo changes to soundlibrary
Feb 22, 2019
5f843f9
Update package.json
Feb 21, 2019
fe97255
Merge branch 'staging' into add-attendance-column
Feb 22, 2019
d916f5a
Merge branch 'staging' into add-attendance-column
Feb 26, 2019
d58515f
Merge branch 'staging' into add-attendance-column
Mar 7, 2019
ff7f283
prettier changes
Mar 7, 2019
4a9b63b
add UI tests
Mar 8, 2019
78712f7
Merge branch 'staging' into add-attendance-column
Mar 12, 2019
598d9e7
remove column that has moved in staging, remove soundlibrary.json fro…
Mar 12, 2019
90b5600
fix tests
Mar 15, 2019
42f3233
Merge branch 'staging' into add-attendance-column
Mar 18, 2019
c21a524
Merge branch 'staging' into add-attendance-column
Mar 22, 2019
16e9c14
Merge branch 'staging' into add-attendance-column
Mar 26, 2019
e298989
fix factory
Mar 26, 2019
4982fd4
fix serializer test
Mar 26, 2019
c1840e4
remove breaking change to pd factory
Mar 27, 2019
e6ab338
Merge branch 'staging' into add-attendance-column
Mar 27, 2019
8e0ed38
Merge branch 'staging' into add-attendance-column
Apr 2, 2019
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
694 changes: 393 additions & 301 deletions apps/Gruntfile.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"pepjs": "^0.4.3",
"phantomjs-prebuilt": "^2.1.14",
"playground-io": "code-dot-org/playground-io#v0.6.0-cdo.0",
"prettier": "1.16.1",
"prettier": "1.16.4",
clareconstantine marked this conversation as resolved.
Show resolved Hide resolved
"progress-bar-webpack-plugin": "^1.8.0",
"pusher-js": "4.1.0",
"qtip2": "2.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ export default class WorkshopEnrollment extends React.Component {
enrollments: PropTypes.arrayOf(enrollmentShape).isRequired,
workshopId: PropTypes.string.isRequired,
workshopCourse: PropTypes.string.isRequired,
workshopSubject: PropTypes.string,
workshopSubject: PropTypes.string.isRequired,
workshopDate: PropTypes.string.isRequired,
numSessions: PropTypes.number.isRequired,
accountRequiredForAttendance: PropTypes.bool.isRequired,
onDelete: PropTypes.func.isRequired,
location: PropTypes.object,
Expand Down Expand Up @@ -59,6 +60,7 @@ export default class WorkshopEnrollment extends React.Component {
onDelete={this.props.onDelete}
workshopCourse={this.props.workshopCourse}
workshopSubject={this.props.workshopSubject}
numSessions={this.props.numSessions}
/>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {workshopEnrollmentStyles as styles} from '../workshop_enrollment_styles'
const CSF = 'CS Fundamentals';
const DEEP_DIVE = 'Deep Dive';
const NA = 'N/A';
const LOCAL_SUMMER = '5-day Summer';

export default class WorkshopEnrollmentSchoolInfo extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -87,6 +88,11 @@ export default class WorkshopEnrollmentSchoolInfo extends React.Component {
<td>{enrollment.email}</td>
<td>{enrollment.district_name}</td>
<td>{enrollment.school}</td>
{this.props.workshopSubject === LOCAL_SUMMER && (
<td>
{enrollment.attendances} / {this.props.numSessions}
</td>
)}
{this.props.workshopCourse === CSF && (
<td>{enrollment.role ? enrollment.role : NA}</td>
)}
Expand Down Expand Up @@ -160,6 +166,9 @@ export default class WorkshopEnrollmentSchoolInfo extends React.Component {
<th style={styles.th}>Email</th>
<th style={styles.th}>District</th>
<th style={styles.th}>School</th>
{this.props.workshopSubject === LOCAL_SUMMER && (
<th style={styles.th}>Total Attendance</th>
)}
{this.props.workshopCourse === CSF && (
<th style={styles.th}>Current Role</th>
)}
Expand Down Expand Up @@ -198,5 +207,6 @@ WorkshopEnrollmentSchoolInfo.propTypes = {
accountRequiredForAttendance: PropTypes.bool.isRequired,
onDelete: PropTypes.func.isRequired,
workshopCourse: PropTypes.string.isRequired,
workshopSubject: PropTypes.string
workshopSubject: PropTypes.string.isRequired,
numSessions: PropTypes.number.isRequired
};
1 change: 1 addition & 0 deletions apps/src/code-studio/pd/workshop_dashboard/workshop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ export class Workshop extends React.Component {
workshopCourse={this.state.workshop.course}
workshopSubject={this.state.workshop.subject}
workshopDate={firstSessionDate}
numSessions={this.state.workshop.sessions.length}
enrollments={this.state.enrollments}
onDelete={this.handleDeleteEnrollment}
accountRequiredForAttendance={
Expand Down