Refactoring data model
This commit is contained in:
@@ -11,16 +11,16 @@
|
||||
<th>Sunday</th>
|
||||
<th>Total Milage</th>
|
||||
</tr>
|
||||
@for (week of examplePlan.workouts; track $index) {
|
||||
@for (planWeek of examplePlan.planDetials; track $index) {
|
||||
<tr>
|
||||
<td>
|
||||
<div>Week {{$index + 1}}</div>
|
||||
<div>Week {{planWeek.week}}</div>
|
||||
</td>
|
||||
@for (day of week; track $index) {
|
||||
@for (workout of planWeek.workouts; track $index) {
|
||||
<td class="hoverOverWorkout">
|
||||
<div>{{day.type}}</div>
|
||||
<div>{{day.totalDistance == 0 ? '' : day.totalDistance + ' miles'}}</div>
|
||||
<div>{{day.description}}</div>
|
||||
<div>{{workout.type}}</div>
|
||||
<div>{{workout.totalDistance == 0 ? '' : workout.totalDistance + ' miles'}}</div>
|
||||
<div>{{workout.description}}</div>
|
||||
</td>
|
||||
}
|
||||
<td>43</td>
|
||||
|
||||
@@ -6,5 +6,10 @@ export interface Plan {
|
||||
startDate: Date,
|
||||
endDate: Date,
|
||||
numWeeks: number,
|
||||
workouts: Workout[][]
|
||||
planDetials: Week[]
|
||||
}
|
||||
|
||||
export interface Week {
|
||||
week: number,
|
||||
workouts: Workout[]
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
export interface Workout {
|
||||
week: number
|
||||
day: number,
|
||||
type: WorkoutType,
|
||||
totalDistance: number,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user