Abstract footer to separate component. Abstract logo to separate component. Be able to edit team in modal. Add custom fields to team. Removed vat and reg no from team (replaced by custom fields). Custom fields are also stored on the invoice. When creating invoice add team custom fields to invoice as well. Be able to set default invoice due date, late fee, vat rate and currency.

This commit is contained in:
HenriT
2021-04-13 12:07:08 +03:00
parent dce73b5603
commit 580fd9aa5a
19 changed files with 523 additions and 137 deletions

View File

@ -6,63 +6,33 @@
<transition name="fade" mode="out-in">
<router-view/>
</transition>
<footer class="col-12 d-flex justify-content-between align-items-center text-secondary px-0 mt-3 d-print-none">
<button class="btn btn-sm text-secondary" @click="toggleTheme">
Lights {{ theme === 'dark' ? 'on' : 'off' }}
<i class="material-icons material-icons-round md-14 align-text-bottom ml-1">
{{ theme === 'dark' ? 'wb_sunny' : 'brightness_2' }}
</i>
</button>
<div>
<small v-b-tooltip.hover
title="All your data is saved in your browser and not on any server.
This application is truly serverless and only you have access to your data."
class="pointer">
What about my data?
</small>
<small class="pl-2">
Made with
<i class="material-icons material-icons-round md-14 align-text-bottom">favorite</i>
by
<a href="https://mokuapp.io/" class="text-secondary" target="_blank">Moku</a>.
</small>
<a href="https://github.com/mokuappio/serverless-invoices"
class="btn btn-sm btn--icon ml-2"
target="_blank">
<img src="@/assets/img/github.png"
alt="Serverless Invoices Github"
v-if="theme === 'dark'">
<img src="@/assets/img/github-dark.png"
alt="Serverless Invoices Github"
v-else>
</a>
<a href="https://app.mokuapp.io/"
class="btn btn-sm btn-primary ml-2"
target="_blank">Upgrade</a>
</div>
</footer>
<TheFooter/>
</div>
</div>
</div>
<ClientModal v-if="team"/>
<TeamModal v-if="team"/>
<BankAccountModal v-if="team"/>
<ImportModal/>
</div>
</template>
<script>
import { mapGetters, mapState } from 'vuex';
import { mapGetters } from 'vuex';
import ClientModal from '@/components/clients/ClientModal';
import BankAccountModal from '@/components/bank-accounts/BankAccountModal';
import { VBTooltip } from 'bootstrap-vue';
import TeamModal from '@/components/team/TeamModal';
import TheFooter from '@/components/TheFooter';
import ImportModal from '../../components/ImportModal';
export default {
directives: {
'b-tooltip': VBTooltip,
},
components: {
TheFooter,
TeamModal,
ImportModal,
BankAccountModal,
ClientModal,
@ -71,20 +41,6 @@ export default {
...mapGetters({
team: 'teams/team',
}),
...mapState({
theme: state => state.themes.theme,
}),
},
methods: {
toggleTheme() {
if (this.theme === 'light') {
this.$store.commit('themes/theme', 'dark');
} else {
this.$store.commit('themes/theme', 'light');
}
localStorage.setItem('theme', this.theme);
document.documentElement.setAttribute('data-theme', this.theme);
},
},
};
</script>