mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 15:47:35 +00:00
organized types into one place
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component, inject, input } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { StudentCardDto } from '../../../shared/models/dto/student-card.dto';
|
||||
import { StudentCardDto } from '../../../shared/classes/student-card.dto';
|
||||
|
||||
@Component({
|
||||
selector: 'app-student-card',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { DummyMobileHomeMeta, MobileHomeMeta } from '../../../shared/services/dummy-mobile-home-meta.service';
|
||||
import { DummyMobileHomeMeta } from '../../../shared/services/dummy-mobile-home-meta.service';
|
||||
import { MobileHomeMeta } from '../../../shared/classes/mobile-home-meta';
|
||||
import { Auth } from '../../../shared/services/auth';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { DummyStudentGoalService, StudentGoalSummary } from '../../../shared/services/dummy-student-goal.service';
|
||||
import { DummyStudentGoalService } from '../../../shared/services/dummy-student-goal.service';
|
||||
import { StudentGoalSummary } from '../../../shared/classes/student-goal';
|
||||
|
||||
@Component({
|
||||
selector: 'app-student-goals',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { StudentCard } from '../../components/student-card/student-card';
|
||||
import { StudentService } from '../../../shared/services/student.service';
|
||||
import { StudentCardDto } from '../../../shared/models/dto/student-card.dto';
|
||||
import { StudentService } from '../../../shared/services/dummy-student.service';
|
||||
import { StudentCardDto } from '../../../shared/classes/student-card.dto';
|
||||
|
||||
@Component({
|
||||
selector: 'app-students',
|
||||
@@ -22,6 +22,8 @@ export class Students {
|
||||
private readonly studentService = inject(StudentService);
|
||||
protected readonly students = signal<StudentCardDto[]>([]);
|
||||
|
||||
public errorMessage = signal<String | null>(null);
|
||||
|
||||
// ************************** Properties ***************************
|
||||
|
||||
// ************************ Public Methods *************************
|
||||
@@ -34,8 +36,16 @@ export class Students {
|
||||
// Loads the list of students assigned to the current user.
|
||||
// *****************************************************************
|
||||
private loadStudents() {
|
||||
this.studentService.getDummyStudentsForUser().subscribe(data => {
|
||||
this.students.set(data);
|
||||
this.studentService.getDummyStudentsForUser().then(data => {
|
||||
|
||||
if (!data.success)
|
||||
{
|
||||
this.errorMessage.set(data.message);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.students.set(data.payload || []);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user