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