mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 00:42:16 +00:00
mobile optimization
This commit is contained in:
@@ -14,12 +14,11 @@
|
||||
<Option @click.native="" title="Edit Invoice" icon="rename" />
|
||||
<Option @click.native="" title="Send Invoice" icon="send" />
|
||||
<Option @click.native="goToCompany" title="Go to Company" icon="user" />
|
||||
<Option @click.native="" :title="$t('context_menu.delete')" icon="trash" />
|
||||
<Option @click.native="deleteInvoice" :title="$t('context_menu.delete')" icon="trash" />
|
||||
</OptionGroup>
|
||||
|
||||
<OptionGroup>
|
||||
<Option @click.native="" :title="$t('context_menu.detail')" icon="detail" />
|
||||
<Option @click.native="" :title="$t('context_menu.download')" icon="download" />
|
||||
<Option @click.native="downloadInvoice" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
</MenuMobileGroup>
|
||||
</MenuMobile>
|
||||
@@ -33,6 +32,7 @@ import OptionGroup from '@/components/FilesView/OptionGroup'
|
||||
import MenuMobile from '@/components/Mobile/MenuMobile'
|
||||
import Option from '@/components/FilesView/Option'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '@/bus'
|
||||
|
||||
export default {
|
||||
name: 'FileMenuMobile',
|
||||
@@ -56,8 +56,22 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadInvoice() {
|
||||
this.$downloadFile(this.clipboard[0].file_url, this.clipboard[0].name + '.' + this.clipboard[0].mimetype)
|
||||
},
|
||||
goToCompany() {
|
||||
this.$router.push({name: 'ClientDetail', params: {id: this.item.client_id}})
|
||||
this.$router.push({name: 'ClientDetail', params: {id: this.clipboard[0].client_id}})
|
||||
},
|
||||
deleteInvoice() {
|
||||
events.$emit('confirm:open', {
|
||||
title: `Are you sure you want to delete invoice number ${this.clipboard[0].invoiceNumber}?`,
|
||||
message: 'Your invoice will be permanently deleted.',
|
||||
buttonColor: 'danger-solid',
|
||||
action: {
|
||||
id: this.clipboard[0].id,
|
||||
operation: 'delete-invoice'
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user