mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-27 18:40:39 +00:00
Edit invoice
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<!--Invoice-->
|
||||
<div v-show="isInvoice" class="menu-options" id="menu-list">
|
||||
<OptionGroup class="menu-option-group">
|
||||
<Option @click.native="" title="Edit Invoice" icon="rename" />
|
||||
<Option @click.native="editItem" 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="deleteItem" :title="$t('context_menu.delete')" icon="trash" />
|
||||
@@ -95,9 +95,12 @@ export default {
|
||||
// Show panel if is not open
|
||||
this.$store.dispatch('fileInfoToggle', true)
|
||||
},
|
||||
editItem() {
|
||||
this.$router.push({name: 'EditInvoice', params: {id: this.item.id}})
|
||||
},
|
||||
deleteItem() {
|
||||
events.$emit('confirm:open', {
|
||||
title: `Are you sure you want to delete invoice number ${this.item.invoiceNumber}?`,
|
||||
title: `Are you sure you want to delete invoice number ${this.item.invoice_number}?`,
|
||||
message: 'Your invoice will be permanently deleted.',
|
||||
buttonColor: 'danger-solid',
|
||||
action: {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<!--Invoice Controls-->
|
||||
<ToolbarGroup v-if="! $isMobile()">
|
||||
<ToolbarButton @click.native="shareInvoice" :class="{'is-inactive': canActiveInView }" source="send" :action="$t('actions.share')" />
|
||||
<ToolbarButton @click.native="shareInvoice" :class="{'is-inactive': canActiveInView }" source="rename" :action="$t('actions.share')" />
|
||||
<ToolbarButton @click.native="editInvoice" :class="{'is-inactive': canActiveInView }" source="rename" :action="$t('actions.share')" />
|
||||
<ToolbarButton @click.native="deleteInvoice" :class="{'is-inactive': canActiveInView }" source="trash" :action="$t('actions.delete')" />
|
||||
</ToolbarGroup>
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
if (this.clipboard.length > 0) {
|
||||
|
||||
events.$emit('confirm:open', {
|
||||
title: `Are you sure you want to delete invoice number ${this.clipboard[0].invoiceNumber}?`,
|
||||
title: `Are you sure you want to delete invoice number ${this.clipboard[0].invoice_number}?`,
|
||||
message: 'Your invoice will be permanently deleted.',
|
||||
buttonColor: 'danger-solid',
|
||||
action: {
|
||||
@@ -144,6 +144,9 @@
|
||||
shareInvoice() {
|
||||
alert('Send Invoice')
|
||||
},
|
||||
editInvoice() {
|
||||
this.$router.push({name: 'EditInvoice', params: {id: this.clipboard[0].id}})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -60,8 +60,8 @@
|
||||
<div v-if="isSingleFile && !isEmpty" class="info-headline">
|
||||
<TitlePreview
|
||||
icon="file-text"
|
||||
:title="singleFile.clientName"
|
||||
:subtitle="'Invoice - ' + singleFile.invoiceNumber"
|
||||
:title="singleFile.client_name"
|
||||
:subtitle="'Invoice - ' + singleFile.invoice_number"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<ListInfoItem
|
||||
title="Invoice Number"
|
||||
:content="singleFile.invoiceNumber"
|
||||
:content="singleFile.invoice_number"
|
||||
/>
|
||||
|
||||
<ListInfoItem
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
<ListInfoItem
|
||||
title="Client"
|
||||
:content="singleFile.clientName"
|
||||
:content="singleFile.client_name"
|
||||
/>
|
||||
|
||||
<!--Created At-->
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<div class="item-name">
|
||||
|
||||
<b :ref="item.id" class="name">
|
||||
{{ item.clientName }} - {{ item.total }}
|
||||
{{ item.client_name }} - {{ item.total }}
|
||||
</b>
|
||||
|
||||
<div class="item-info">
|
||||
<span class="item-size">
|
||||
{{ item.created_at }}, n. {{ item.invoiceNumber }}
|
||||
{{ item.created_at }}, n. {{ item.invoice_number }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
class="headline"
|
||||
icon="file-text"
|
||||
:title="clipboard[0].name"
|
||||
:subtitle="'Invoice - ' + clipboard[0].invoiceNumber"
|
||||
:subtitle="'Invoice - ' + clipboard[0].invoice_number"
|
||||
/>
|
||||
|
||||
<!--Trash location-->
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
},
|
||||
deleteInvoice() {
|
||||
events.$emit('confirm:open', {
|
||||
title: `Are you sure you want to delete invoice number ${this.clipboard[0].invoiceNumber}?`,
|
||||
title: `Are you sure you want to delete invoice number ${this.clipboard[0].invoice_number}?`,
|
||||
message: 'Your invoice will be permanently deleted.',
|
||||
buttonColor: 'danger-solid',
|
||||
action: {
|
||||
|
||||
Reference in New Issue
Block a user