rulebook name

This commit is contained in:
Sophie-Gaëlle CALLOCH
2026-06-09 18:00:25 +02:00
parent 4ae044dace
commit b2c97c1327
2 changed files with 28 additions and 7 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ import {isMain, Ledger, LedgerSelect, systemLedger, useLedgersStore} from "@/led
type Bindings = { [key: string]: Ledger; };
const ruleBookStore = useRuleBooksStore();
const {findById: findCharacterRuleBookById} = ruleBookStore;
const {findById: findRuleBookById} = ruleBookStore;
const {ruleBooks} = storeToRefs(ruleBookStore);
const {findById: findCharacterById} = useCharactersStore();
const {ledgers} = storeToRefs(useLedgersStore());
@@ -33,7 +33,7 @@ watchEffect(async () => {
if (characterId) {
const characterRuleBook = await findCharacterRuleBookByCharacterId(characterId);
ruleBook.value = findCharacterRuleBookById(characterRuleBook.ruleBookId);
ruleBook.value = findRuleBookById(characterRuleBook.ruleBookId);
bindings.value = Object.fromEntries(
Object.entries(characterRuleBook.bindings)
.map(([key, id]) => [key, ledgersToUse.value.find(l => l.ledgerId === id) ?? systemLedger])