UI bug fixes

This commit is contained in:
ivan-pelly
2026-03-14 18:22:49 -07:00
parent 4d9b83c327
commit f431fb3e94
9 changed files with 32 additions and 6 deletions
@@ -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);
}
});
}