Ajoute projet et migration milestone

Signed-off-by: Gato <cedric@goutailler-olivier.fr>
This commit is contained in:
2026-05-31 10:00:36 +02:00
parent 54d1534d4d
commit fe1c346eac
11 changed files with 108 additions and 89 deletions
+3 -3
View File
@@ -70,12 +70,12 @@ export class IssuesStore {
const normalized = this.normalizeIssue(issue);
if (!normalized.id) {
const { id: _id, ...body } = normalized;
const created = this.normalizeIssue(await firstValueFrom(this.api.create(body)));
const created = this.normalizeIssue(await firstValueFrom(this.api.create(this.currentProjectId!, body)));
this.data.update((issues) => [...issues, created]);
this.recalculateCalculatedIssues();
return created;
} else {
const apiResult = await firstValueFrom(this.api.update(normalized.id, normalized));
const apiResult = await firstValueFrom(this.api.update(this.currentProjectId!, normalized.id, normalized));
// L'API ne retourne pas linkedIssueIds dans les commentaires : on le restaure
// depuis les données envoyées pour ne pas perdre les liens.
if (Array.isArray(apiResult.comments) && Array.isArray(normalized.comments)) {
@@ -103,7 +103,7 @@ export class IssuesStore {
}
async deleteById(id: number): Promise<void> {
await firstValueFrom(this.api.remove(id));
await firstValueFrom(this.api.remove(this.currentProjectId!, id));
this.data.update((issues) =>
issues
.filter((i) => i.id !== id)