Invoice & Clients sorting

This commit is contained in:
Peter Papp
2021-05-11 10:09:50 +02:00
parent 1ea8f2ce60
commit a6db642db7
16 changed files with 195 additions and 98 deletions

View File

@@ -1,10 +1,26 @@
import i18n from '@/i18n/index'
import {debounce} from 'lodash'
import {events} from './bus'
import store from "./store";
const OasisHelpers = {
install(Vue) {
Vue.prototype.$getInvoiceDataByLocation = function () {
let currentLocation = store.getters.currentFolder && store.getters.currentFolder.location
? store.getters.currentFolder.location
: undefined
let actions = {
'regular-invoice': 'getRegularInvoices',
'advance-invoice': 'getAdvanceInvoices',
'clients': 'getClients',
}
this.$store.dispatch(actions[currentLocation])
}
Vue.prototype.$shareInvoice = function (entry) {
events.$emit('popup:open', {
name: 'share-invoice',