post processing call from front
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
import {mammonAddCharacterUrl} from "@/mammon";
|
||||
import {storeToRefs} from "pinia";
|
||||
import {CharacterLabel, useCharactersStore} from "@/characters";
|
||||
import {ArrowPathIcon} from '@heroicons/vue/24/outline';
|
||||
|
||||
const {characters} = storeToRefs(useCharactersStore());
|
||||
const charactersStore = useCharactersStore()
|
||||
const {characters} = storeToRefs(charactersStore);
|
||||
const {reloadActivities} = charactersStore;
|
||||
|
||||
const addCharacter = () => {
|
||||
window.location.replace(mammonAddCharacterUrl);
|
||||
@@ -17,7 +20,8 @@ const addCharacter = () => {
|
||||
<button class="mb-2" @click="addCharacter">Add chacarcter</button>
|
||||
</div>
|
||||
<div v-for="character in characters" :key="character.characterId" class="flex items-center mb-2">
|
||||
<CharacterLabel :character="character" />
|
||||
<CharacterLabel class="grow" :character="character" />
|
||||
<button class="btn-icon" @click="reloadActivities(character.characterId)"><ArrowPathIcon /></button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -2,6 +2,7 @@
|
||||
import {RouterView} from 'vue-router';
|
||||
import {CreateLedgerModal} from "@/ledger";
|
||||
import {ref} from "vue";
|
||||
import {processingControllerApi} from "@/mammon";
|
||||
|
||||
const createLedgerModal = ref<typeof CreateLedgerModal>();
|
||||
</script>
|
||||
@@ -9,7 +10,8 @@ const createLedgerModal = ref<typeof CreateLedgerModal>();
|
||||
<template>
|
||||
<div class="mt-4">
|
||||
<div class="mb-4 border-b-1 flex justify-end">
|
||||
<button class="mb-2" @click="createLedgerModal?.open()">New Ledger</button>
|
||||
<button class="mb-2 ms-2" @click="processingControllerApi.processNewActivities()">Process Activities</button>
|
||||
<button class="mb-2 ms-2" @click="createLedgerModal?.open()">New Ledger</button>
|
||||
</div>
|
||||
<CreateLedgerModal ref="createLedgerModal" />
|
||||
<RouterView />
|
||||
|
||||
Reference in New Issue
Block a user