mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 11:07:41 +00:00
UI bug fixes
This commit is contained in:
+1
@@ -82,6 +82,7 @@ export class BenchmarkCardFull implements OnDestroy {
|
||||
if (result.success) {
|
||||
this.successMessage.set('Benchmark created.');
|
||||
this.savedBenchmarkText = this.benchmarkText;
|
||||
this.studentService.notifyDataChanged();
|
||||
if (result.payload?.benchmarkId) {
|
||||
this.router.navigate(['/students', this.studentId, 'goals', this.goalId, 'benchmarks', result.payload.benchmarkId]);
|
||||
}
|
||||
|
||||
+5
-4
@@ -15,8 +15,8 @@
|
||||
@if (loaded()) {
|
||||
<div class="detail-card">
|
||||
<div class="field">
|
||||
<label class="field-label" for="baseline">Baseline</label>
|
||||
<input id="baseline" class="field-input" type="text" [(ngModel)]="baseline" />
|
||||
<label class="field-label" for="category">Category</label>
|
||||
<input id="category" class="field-input" type="text" [(ngModel)]="category" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="field-label" for="description">Description</label>
|
||||
@@ -24,8 +24,9 @@
|
||||
placeholder="Enter description..."></textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="field-label" for="category">Category</label>
|
||||
<input id="category" class="field-input" type="text" [(ngModel)]="category" />
|
||||
<label class="field-label" for="baseline">Baseline</label>
|
||||
<textarea id="baseline" class="field-input field-textarea" [(ngModel)]="baseline" rows="3"
|
||||
placeholder="Enter baseline..."></textarea>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button class="toolbar-btn" (click)="onCancel()" [disabled]="!hasChanges()">Cancel</button>
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ export class GoalCardFull implements OnDestroy {
|
||||
}
|
||||
|
||||
onBenchmarks() {
|
||||
this.router.navigate(['/students', this.studentId, 'benchmarks']);
|
||||
this.router.navigate(['/students', this.studentId, 'goals', this.goalId, 'benchmarks']);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
@@ -50,6 +50,7 @@ export class GoalList implements OnDestroy {
|
||||
this.goals.update(list => [...list, goal]);
|
||||
this.showAddModal.set(false);
|
||||
this.studentService.notifyDataChanged();
|
||||
this.router.navigate(['/students', this.studentId, 'goals', goal.goalId]);
|
||||
}
|
||||
|
||||
onModalCancelled() {
|
||||
|
||||
+3
@@ -1,4 +1,5 @@
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { StudentCard } from '../student-card/student-card';
|
||||
import { AddStudentModal } from '../add-student-modal/add-student-modal';
|
||||
import { DummyStudentService } from '../../../shared/services/dummy-student.service';
|
||||
@@ -24,6 +25,7 @@ export class StudentCardList {
|
||||
// ************************** Declarations *************************
|
||||
|
||||
private readonly studentService = inject(StudentService);
|
||||
private readonly router = inject(Router);
|
||||
protected readonly students = signal<StudentCardDto[]>([]);
|
||||
protected readonly displayMode = signal<DisplayMode>('card');
|
||||
protected readonly showAddModal = signal(false);
|
||||
@@ -45,6 +47,7 @@ export class StudentCardList {
|
||||
this.students.update(list => this.sortByIdentifier([...list, student]));
|
||||
this.showAddModal.set(false);
|
||||
this.studentService.notifyDataChanged();
|
||||
this.router.navigate(['/students', student.studentId]);
|
||||
}
|
||||
|
||||
onModalCancelled() {
|
||||
|
||||
@@ -153,6 +153,7 @@ export class Home implements OnDestroy {
|
||||
.filter(b => b.goalId === goalId)
|
||||
.map(b => ({
|
||||
label: b.benchmark,
|
||||
routerLink: ['/students', studentId, 'goals', goalId, 'benchmarks', b.benchmarkId],
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user