mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 15:47:35 +00:00
Renamed some of the goal fields to align with business logic
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
<button class="back-btn" (click)="onBack()">← Back</button>
|
||||
<span class="student-name">{{ studentIdentifier() }}</span>
|
||||
</div>
|
||||
<h2 class="goal-title">{{ goalTitle() }}</h2>
|
||||
<h2 class="goal-title">{{ goalCategory() }}</h2>
|
||||
|
||||
<!-- Error message -->
|
||||
@if (error()) {
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ export class AddProgressEvent {
|
||||
// ************************** Constructor **************************
|
||||
|
||||
constructor() {
|
||||
this.goalTitle.set(this.route.snapshot.queryParamMap.get('goalTitle') ?? '');
|
||||
this.goalCategory.set(this.route.snapshot.queryParamMap.get('goalCategory') ?? '');
|
||||
this.studentIdentifier.set(this.route.snapshot.queryParamMap.get('studentIdentifier') ?? '');
|
||||
this.studentId = this.route.snapshot.paramMap.get('studentId') ?? '';
|
||||
this.goalId = this.route.snapshot.paramMap.get('goalId') ?? '';
|
||||
@@ -32,7 +32,7 @@ export class AddProgressEvent {
|
||||
private readonly studentId: string;
|
||||
private readonly goalId: string;
|
||||
|
||||
protected readonly goalTitle = signal('');
|
||||
protected readonly goalCategory = signal('');
|
||||
protected readonly studentIdentifier = signal('');
|
||||
protected readonly notes = signal('');
|
||||
protected readonly error = signal<string | null>(null);
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<h2 class="section-heading">Goals</h2>
|
||||
<div class="goal-cards">
|
||||
@for (goal of data()?.goals; track goal.goalId) {
|
||||
<div class="goal-card" (click)="onGoalClick(goal.goalId, goal.title)">
|
||||
<span class="goal-title">{{ goal.title }}</span>
|
||||
<div class="goal-card" (click)="onGoalClick(goal.goalId, goal.category)">
|
||||
<span class="goal-title">{{ goal.category }}</span>
|
||||
<span class="event-count">{{ goal.progressEventCount }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ export class StudentGoals {
|
||||
// *****************************************************************
|
||||
// Navigates to the add-progress-event page for the selected goal.
|
||||
// *****************************************************************
|
||||
onGoalClick(goalId: string, goalTitle: string) {
|
||||
onGoalClick(goalId: string, goalCategory: string) {
|
||||
this.router.navigate(
|
||||
['students', this.studentId, 'goals', goalId, 'add-event'],
|
||||
{ queryParams: { goalTitle, studentIdentifier: this.data()?.studentIdentifier } },
|
||||
{ queryParams: { goalCategory, studentIdentifier: this.data()?.studentIdentifier } },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user