Ajout de 2 fonctionnalitées principales : import PDF que ce soit pour les règles ou les campagnes directement.
Fonctionnalité de comparaison PDF / campagne pour faire un mix et demander des conseils à l'IA
This commit is contained in:
@@ -13,7 +13,7 @@ import { AiChatDrawerComponent } from '../../../shared/ai-chat-drawer/ai-chat-dr
|
||||
|
||||
/**
|
||||
* Vue lecture seule "WorldAnvil" d'une fiche PJ.
|
||||
* Route : /campaigns/:campaignId/characters/:characterId
|
||||
* Route : /campaigns/:campaignId/playthroughs/:playthroughId/characters/:characterId
|
||||
*/
|
||||
@Component({
|
||||
selector: 'app-character-view',
|
||||
@@ -28,6 +28,7 @@ export class CharacterViewComponent implements OnInit {
|
||||
readonly Sparkles = Sparkles;
|
||||
|
||||
campaignId: string | null = null;
|
||||
playthroughId: string | null = null;
|
||||
characterId: string | null = null;
|
||||
|
||||
character: Character | null = null;
|
||||
@@ -48,6 +49,7 @@ export class CharacterViewComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
const params = this.route.snapshot.paramMap;
|
||||
this.campaignId = params.get('campaignId');
|
||||
this.playthroughId = params.get('playthroughId');
|
||||
this.characterId = params.get('characterId');
|
||||
if (this.characterId) {
|
||||
this.service.getById(this.characterId).subscribe({
|
||||
@@ -68,13 +70,15 @@ export class CharacterViewComponent implements OnInit {
|
||||
}
|
||||
|
||||
edit(): void {
|
||||
if (this.campaignId && this.characterId) {
|
||||
this.router.navigate(['/campaigns', this.campaignId, 'characters', this.characterId, 'edit']);
|
||||
if (this.campaignId && this.playthroughId && this.characterId) {
|
||||
this.router.navigate(['/campaigns', this.campaignId, 'playthroughs', this.playthroughId, 'characters', this.characterId, 'edit']);
|
||||
}
|
||||
}
|
||||
|
||||
back(): void {
|
||||
if (this.campaignId) {
|
||||
if (this.campaignId && this.playthroughId) {
|
||||
this.router.navigate(['/campaigns', this.campaignId, 'playthroughs', this.playthroughId]);
|
||||
} else if (this.campaignId) {
|
||||
this.router.navigate(['/campaigns', this.campaignId]);
|
||||
} else {
|
||||
this.router.navigate(['/campaigns']);
|
||||
|
||||
Reference in New Issue
Block a user