save result
This commit is contained in:
@@ -16,7 +16,7 @@ import { ZardCardComponent } from '@shared/components/card/card.component';
|
||||
import { ZardButtonComponent } from '@shared/components/button/button.component';
|
||||
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 { CourseApiResponse, CourseService, NonApiRequest } from 'src/app/core/services/course';
|
||||
import { ResultatService } from 'src/app/core/services/resultat';
|
||||
import { Resultat, ResultatStatut } from 'src/app/core/interfaces/resultat';
|
||||
import { A11yModule } from '@angular/cdk/a11y';
|
||||
@@ -347,8 +347,13 @@ export class Course {
|
||||
onNonPartantSave(payload: string[]) {
|
||||
const course = this.selectedCourse();
|
||||
if (!course) return;
|
||||
const reqPayload = {
|
||||
nonPartants: [
|
||||
...payload
|
||||
]
|
||||
}
|
||||
|
||||
this.api.setNonPartants(course.id, payload).subscribe({
|
||||
this.api.setNonPartants(course.id, reqPayload).subscribe({
|
||||
next: (updatedCourse) => {
|
||||
if (updatedCourse) {
|
||||
toast.success('Non-partants mis à jour avec succès');
|
||||
|
||||
Reference in New Issue
Block a user