test
This commit is contained in:
@@ -14,7 +14,7 @@ import { SearchBar } from '@shared/components/search-bar/search-bar';
|
||||
import { Modal } from '@shared/components/modal/modal';
|
||||
import { ZardCardComponent } from '@shared/components/card/card.component';
|
||||
import { ZardButtonComponent } from '@shared/components/button/button.component';
|
||||
import { Course as CourseType } from 'src/app/core/interfaces/course';
|
||||
import { CourseStatut, Course as CourseType } from 'src/app/core/interfaces/course';
|
||||
import { SortDir } from '@shared/paging/paging';
|
||||
import { CourseApiResponse, CourseService } from 'src/app/core/services/course';
|
||||
import { ResultatService } from 'src/app/core/services/resultat';
|
||||
@@ -210,9 +210,11 @@ export class Course {
|
||||
next: (res) => {
|
||||
this.rows.set(res.content);
|
||||
this.total.set(res.totalElements);
|
||||
this.totalRunning.set(0);
|
||||
this.totalClosed.set(0);
|
||||
this.totalByType.set({});
|
||||
this.totalRunning.set(res.content.filter(c=> c.statut === String(CourseStatut.OUVERT)).length);
|
||||
this.totalClosed.set(res.content.filter(c=>c.statut === String(CourseStatut.FERME)).length);
|
||||
this.totalByType.set({
|
||||
|
||||
});
|
||||
|
||||
// Fetch resultats for all courses in parallel
|
||||
const courseIds = res.content.map((c) => c.id);
|
||||
@@ -465,7 +467,10 @@ export class Course {
|
||||
}
|
||||
|
||||
// For now, validation is just an update. In the future, you might add a statut field
|
||||
this.resultatService.update(resultat.id, {}).subscribe({
|
||||
this.resultatService.update(resultat.id, {
|
||||
...resultat,
|
||||
statut: ResultatStatut.PROVISOIRE
|
||||
}).subscribe({
|
||||
next: () => {
|
||||
this.closeResultatModal();
|
||||
this.fetch({
|
||||
@@ -495,7 +500,10 @@ export class Course {
|
||||
}
|
||||
|
||||
// For now, confirmation is just an update. In the future, you might add a statut field
|
||||
this.resultatService.update(resultat.id, {}).subscribe({
|
||||
this.resultatService.update(resultat.id, {
|
||||
...resultat,
|
||||
statut: ResultatStatut.OFFICIEL
|
||||
}).subscribe({
|
||||
next: () => {
|
||||
this.closeResultatModal();
|
||||
this.fetch({
|
||||
|
||||
Reference in New Issue
Block a user