Fixed error with GroupId il list of groups

This commit is contained in:
2026-04-28 11:15:24 +01:00
parent 5e6b03356c
commit a9e13c3af3
2 changed files with 4 additions and 4 deletions
@@ -28,7 +28,7 @@ export class GroupFormComponent implements OnInit {
private toastCtrl = inject(ToastController);
friends = signal<GetFriendDto[]>([]);
newGroup = output<CreateGroupDto>();
newGroup = output<GetGroupDto>();
groupForm: FormGroup = new FormGroup({
label: new FormControl<string>(null, [Validators.required]),
@@ -92,8 +92,8 @@ export class GroupFormComponent implements OnInit {
};
try {
await firstValueFrom(this.groupsServices.createGroupEndpoint(createGroupDto));
this.newGroup.emit(createGroupDto);
const group = await firstValueFrom(this.groupsServices.createGroupEndpoint(createGroupDto));
this.newGroup.emit(group);
const toast = await this.toastCtrl.create({
message: 'Le groupe a été crée',
duration: 2000,
+1 -1
View File
@@ -140,7 +140,7 @@ export class HomeComponent implements OnInit {
this.isModalOpen = isOpen;
}
async updateGroup(newGroup: CreateGroupDto) {
async updateGroup(newGroup: GetGroupDto) {
this.groups.update(x => [...x, newGroup])
await this.setOpen(false, true);
}