Ajout de drag'n drop là ou c'est possible ; ajout de l'import des ennemis depuis foundryVTT
All checks were successful
Build & Push Images / build (brain) (push) Successful in 1m24s
Build & Push Images / build (web) (push) Successful in 1m56s
Build & Push Images / build (core) (push) Successful in 3m33s
Build & Push Images / build-switcher (push) Successful in 17s

This commit is contained in:
2026-06-25 15:21:25 +02:00
parent 18f5a260b0
commit 9bd66613b6
34 changed files with 439 additions and 21 deletions

View File

@@ -17,6 +17,8 @@ export interface Enemy {
keyValueValues?: Record<string, Record<string, string>>;
campaignId: string;
order?: number;
/** UUID de l'acteur de compendium Foundry d'origine (monstre importé). Null sinon. */
foundryRef?: string | null;
}
export interface EnemyCreate {

View File

@@ -36,4 +36,18 @@ export class EnemyService {
search(q: string): Observable<Enemy[]> {
return this.http.get<Enemy[]>(`${this.apiUrl}/search`, { params: { q } });
}
/**
* Importe un catalogue de monstres Foundry (exporté par le module) dans le
* bestiaire de la campagne. Upsert par référence côté backend.
*/
importFoundryMonsters(campaignId: string, catalog: unknown): Observable<MonsterImportResult> {
return this.http.post<MonsterImportResult>(
`/api/campaigns/${campaignId}/import-foundry-monsters`, catalog);
}
}
export interface MonsterImportResult {
created: number;
updated: number;
}