mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 14:37:34 +00:00
UI bug fixes
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
@if (loaded() && students().length === 0) {
|
||||
<div class="empty-state">
|
||||
<p>You don't currently have any students.</p>
|
||||
<p>Please log into the <strong>desktop app</strong> to add your students.</p>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="card-grid">
|
||||
@for (student of students(); track student.studentId) {
|
||||
<app-student-card [student]="student" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -6,4 +6,14 @@
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 1.5rem 1rem;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
font-size: 0.875rem;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
@@ -22,6 +22,7 @@ export class Students {
|
||||
|
||||
private readonly studentService = inject(StudentService);
|
||||
protected readonly students = signal<StudentCardDto[]>([]);
|
||||
protected readonly loaded = signal(false);
|
||||
|
||||
public errorMessage = signal<String | null>(null);
|
||||
|
||||
@@ -46,6 +47,7 @@ export class Students {
|
||||
else
|
||||
{
|
||||
this.students.set(data.payload || []);
|
||||
this.loaded.set(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user