Skip to content

Commit

Permalink
fix: correct date representations
Browse files Browse the repository at this point in the history
all dates are day based - so strip timezone details as they cause issues.
  • Loading branch information
macite committed Feb 28, 2022
1 parent 92fe194 commit 655c512
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h4 class="panel-title">Breaks</h4>
</thead>
<tbody>
<tr ng-repeat="break in teachingPeriod.breaks | orderBy:sortOrder:reverse">
<td>{{break.start_date | date: 'EEE d MMM' : '+0000'}}</td>
<td>{{break.start_date | date: 'EEE d MMM'}}</td>
<td>{{break.number_of_weeks}} week</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h4 class="panel-title">Teaching Periods</h4>
<tbody>
<tr ng-repeat="teachingperiod in filteredTeachingPeriods = (teachingPeriods.loadedPeriods | filter:search) | orderBy:sortOrder:reverse | startFrom:(currentPage - 1) * pageSize | limitTo: pageSize" ui-sref="admin/teachingperiods/edit({teachingPeriodId: teachingperiod.id})" >
<td>{{teachingperiod.name()}}</td>
<td>{{teachingperiod.start_date | date: 'EEE d MMM' : '+0000'}}</td>
<td>{{teachingperiod.end_date | date: 'EEE d MMM' : '+0000'}}</td>
<td>{{teachingperiod.active_until | date: 'EEE d MMM' : '+0000'}}</td>
<td>{{teachingperiod.start_date | date: 'EEE d MMM'}}</td>
<td>{{teachingperiod.end_date | date: 'EEE d MMM'}}</td>
<td>{{teachingperiod.active_until | date: 'EEE d MMM'}}</td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions src/app/admin/states/units/units.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ <h4 class="panel-title">Units</h4>
<td>{{(unit.unitRole.role | ucfirst) || "N/A"}}</td>
<td ng-if="unit.teachingPeriod">{{unit.teachingPeriod.name()}}</td>
<td ng-if="!unit.teachingPeriod">Custom</td>
<td>{{unit.start_date | date : 'EEE d MMM y' : '+0000'}}</td>
<td>{{unit.end_date | date : 'EEE d MMM y' : '+0000'}}</td>
<td>{{unit.start_date | date : 'EEE d MMM y'}}</td>
<td>{{unit.end_date | date : 'EEE d MMM y'}}</td>
<td ng-if="unit.teachingPeriod">
<i ng-if="unit.teachingPeriod.active() && unit.active" class="fa fa-check"></i>
<i ng-if="!unit.teachingPeriod.active() || !unit.active" class="fa fa-times"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ <h4 class="panel-title">Units</h4>
<td>{{project.unit_name}}</td>
<td ng-if="project.teachingPeriod()">{{(project.teachingPeriod().name())}}</td>
<td ng-if="!project.teachingPeriod()">Custom</td>
<td>{{project.start_date | date : 'EEE d MMM' : '+0000'}}</td>
<td>{{project.end_date | date : 'EEE d MMM' : '+0000'}}</td>
<td>{{project.start_date | date : 'EEE d MMM'}}</td>
<td>{{project.end_date | date : 'EEE d MMM'}}</td>
<td ng-if="project.teachingPeriod()">
<i ng-if="project.teachingPeriod().active() && project.active" class="fa fa-check"></i>
<i ng-if="!project.teachingPeriod().active() || !project.active" class="fa fa-times"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</li>
<li>
<strong>Start Date</strong>
&mdash; Aim to start this task by <strong>{{ startDate() | date: 'EEE d MMM':'+0000' }}</strong
&mdash; Aim to start this task by <strong>{{ startDate() | date: 'EEE d MMM' }}</strong
>.
</li>
<li [hidden]="!task?.extensions || task?.extensions <= 0">
Expand All @@ -21,7 +21,7 @@
</li>
<li>
<strong>Due Date</strong>
&mdash; Aim to complete by <strong>{{ dueDate() | date: 'EEE d MMM':'+0000' }}</strong
&mdash; Aim to complete by <strong>{{ dueDate() | date: 'EEE d MMM' }}</strong
>.
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ <h4 class="panel-title">Units</h4>
<td>{{(unitRole.role | ucfirst) || "N/A"}}</td>
<td ng-if="unitRole.teachingPeriod()">{{(unitRole.teachingPeriod().name())}}</td>
<td ng-if="!unitRole.teachingPeriod()">Custom</td>
<td>{{unitRole.start_date | date : 'EEE d MMM' : '+0000'}}</td>
<td>{{unitRole.end_date | date : 'EEE d MMM' : '+0000'}}</td>
<td>{{unitRole.start_date | date : 'EEE d MMM'}}</td>
<td>{{unitRole.end_date | date : 'EEE d MMM'}}</td>
<td ng-if="unitRole.teachingPeriod()">
<i ng-if="unitRole.teachingPeriod().active() && unitRole.active" class="fa fa-check"></i>
<i ng-if="!unitRole.teachingPeriod().active() || !unitRole.active" class="fa fa-times"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ <h3 class="panel-title">
<tr ng-repeat="taskDef in filteredTaskDefs = (allTaskDefs = ( unit.task_definitions ) | filter:taskAdminPager.search) | orderBy:taskAdminPager.sortOrder:taskAdminPager.reverse | startFrom:(taskAdminPager.currentPage - 1) * taskAdminPager.pageSize | limitTo: taskAdminPager.pageSize" ng-click="editTask(unit, taskDef)" ng-class="{'info': taskAdminData.selectedTask == taskDef}">
<td><strong>{{taskDef.abbreviation}}</strong> - {{taskDef.name}}</td>
<td>{{grades[taskDef.target_grade]}}</td>
<td>{{taskDef.start_date | date : 'EEE d MMM' : '+0000'}}</td>
<td>{{taskDef.target_date | date : 'EEE d MMM' : '+0000'}}</td>
<td><span ng-show="taskDef.due_date">{{taskDef.due_date | date : 'EEE d MMM' : '+0000'}}</span><span ng-hide="taskDef.due_date">None</span></td>
<td>{{taskDef.start_date | date : 'EEE d MMM'}}</td>
<td>{{taskDef.target_date | date : 'EEE d MMM'}}</td>
<td><span ng-show="taskDef.due_date">{{taskDef.due_date | date : 'EEE d MMM' }}</span><span ng-hide="taskDef.due_date">None</span></td>
<td ng-show="unit.hasGroupwork()">{{groupSetName(taskDef.group_set_id)}}</td>
<td ng-show="unit.hasStreams()">{{taskDef.tutorial_stream}}</td>
<td>{{taskDef.upload_requirements.length}}</td>
Expand Down

0 comments on commit 655c512

Please sign in to comment.