Remove vuex
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
<script lang="ts">
|
||||
import { mapState } from "pinia"
|
||||
import { defineComponent } from "vue"
|
||||
import Currency from "../components/Currency.vue"
|
||||
import { useBudgetsStore } from "../stores/budget"
|
||||
import { useAccountStore } from "../stores/budget-account"
|
||||
import { useSettingsStore } from "../stores/settings"
|
||||
|
||||
export default defineComponent({
|
||||
props: ["budgetid", "accountid"],
|
||||
components: { Currency }
|
||||
components: { Currency },
|
||||
computed: {
|
||||
...mapState(useSettingsStore, ["ExpandMenu"]),
|
||||
...mapState(useBudgetsStore, ["CurrentBudgetName", "CurrentBudgetID"]),
|
||||
...mapState(useAccountStore, ["OnBudgetAccounts", "OnBudgetAccountsBalance", "OffBudgetAccounts", "OffBudgetAccountsBalance"])
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -12,44 +21,44 @@ export default defineComponent({
|
||||
<div class="flex flex-col">
|
||||
<span class="m-1 p-1 px-3 text-xl">
|
||||
<router-link to="/dashboard">⌂</router-link>
|
||||
{{$store.getters.CurrentBudgetName}}
|
||||
{{CurrentBudgetName}}
|
||||
</span>
|
||||
<span class="bg-orange-200 rounded-lg m-1 p-1 px-3 flex flex-col">
|
||||
<router-link :to="'/budget/'+budgetid+'/budgeting'">Budget</router-link><br />
|
||||
<!--<router-link :to="'/budget/'+$store.getters.CurrentBudgetID+'/reports'">Reports</router-link>-->
|
||||
<!--<router-link :to="'/budget/'+$store.getters.CurrentBudgetID+'/all-accounts'">All Accounts</router-link>-->
|
||||
<!--<router-link :to="'/budget/'+CurrentBudgetID+'/reports'">Reports</router-link>-->
|
||||
<!--<router-link :to="'/budget/'+CurrentBudgetID+'/all-accounts'">All Accounts</router-link>-->
|
||||
</span>
|
||||
<li class="bg-orange-200 rounded-lg m-1 p-1 px-3">
|
||||
<div class="flex flex-row justify-between font-bold">
|
||||
<span>On-Budget Accounts</span>
|
||||
<Currency :class="$store.state.ExpandMenu?'md:inline':'md:hidden'" :value="$store.getters.OnBudgetAccountsBalance" />
|
||||
<Currency :class="ExpandMenu?'md:inline':'md:hidden'" :value="OnBudgetAccountsBalance" />
|
||||
</div>
|
||||
<div v-for="account in $store.getters.OnBudgetAccounts" class="flex flex-row justify-between">
|
||||
<div v-for="account in OnBudgetAccounts" class="flex flex-row justify-between">
|
||||
<router-link :to="'/budget/'+budgetid+'/account/'+account.ID">{{account.Name}}</router-link>
|
||||
<Currency :class="$store.state.ExpandMenu?'md:inline':'md:hidden'" :value="account.Balance" />
|
||||
<Currency :class="ExpandMenu?'md:inline':'md:hidden'" :value="account.Balance" />
|
||||
</div>
|
||||
</li>
|
||||
<li class="bg-red-200 rounded-lg m-1 p-1 px-3">
|
||||
<div class="flex flex-row justify-between font-bold">
|
||||
<span>Off-Budget Accounts</span>
|
||||
<Currency :class="$store.state.ExpandMenu?'md:inline':'md:hidden'" :value="$store.getters.OffBudgetAccountsBalance" />
|
||||
<Currency :class="ExpandMenu?'md:inline':'md:hidden'" :value="OffBudgetAccountsBalance" />
|
||||
</div>
|
||||
<div v-for="account in $store.getters.OffBudgetAccounts" class="flex flex-row justify-between">
|
||||
<div v-for="account in OffBudgetAccounts" class="flex flex-row justify-between">
|
||||
<router-link :to="'/budget/'+budgetid+'/account/'+account.ID">{{account.Name}}</router-link>
|
||||
<Currency :class="$store.state.ExpandMenu?'md:inline':'md:hidden'" :value="account.Balance" />
|
||||
<Currency :class="ExpandMenu?'md:inline':'md:hidden'" :value="account.Balance" />
|
||||
</div>
|
||||
</li>
|
||||
<li class="bg-red-200 rounded-lg m-1 p-1 px-3">
|
||||
Closed Accounts
|
||||
</li>
|
||||
<!--<li>
|
||||
<router-link :to="'/budget/'+$store.getters.CurrentBudgetID+'/accounts'">Edit accounts</router-link>
|
||||
<router-link :to="'/budget/'+CurrentBudgetID+'/accounts'">Edit accounts</router-link>
|
||||
</li>-->
|
||||
<li class="bg-red-200 rounded-lg m-1 p-1 px-3">
|
||||
+ Add Account
|
||||
</li>
|
||||
<li class="bg-red-200 rounded-lg m-1 p-1 px-3">
|
||||
<router-link :to="'/budget/'+$store.getters.CurrentBudgetID+'/settings'">Budget-Settings</router-link>
|
||||
<router-link :to="'/budget/'+CurrentBudgetID+'/settings'">Budget-Settings</router-link>
|
||||
</li>
|
||||
<!--<li><router-link to="/admin">Admin</router-link></li>-->
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user