mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-21 09:12:14 +00:00
Invoice & Clients sorting
This commit is contained in:
16
resources/js/oasis-helpers.js
vendored
16
resources/js/oasis-helpers.js
vendored
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user