diff --git a/package-lock.json b/package-lock.json index b3c201c..88ac434 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7378,10 +7378,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.defaultsdeep": { "version": "4.6.1", diff --git a/package.json b/package.json index d6842c2..8a3dc22 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "dayjs": "^1.10.3", "es6-promise": "^4.2.6", "localforage": "^1.9.0", + "lodash": "^4.17.21", "vue": "^2.6.10", "vue-autosuggest": "^2.2.0", "vue-multiselect": "^2.1.6", diff --git a/src/components/clients/ClientForm.vue b/src/components/clients/ClientForm.vue index 50e1f61..46b9e78 100644 --- a/src/components/clients/ClientForm.vue +++ b/src/components/clients/ClientForm.vue @@ -41,8 +41,8 @@ label="Currency" field="currency" :errors="errors" class="col-sm-4"/> - + + + + + + + + + diff --git a/src/components/invoices/InvoiceForm.vue b/src/components/invoices/InvoiceForm.vue index 0190ebc..2102c2e 100644 --- a/src/components/invoices/InvoiceForm.vue +++ b/src/components/invoices/InvoiceForm.vue @@ -20,26 +20,11 @@
- - - - - - - - - + - - - +
ItemQuantityUnitPriceSum
- - -
@@ -64,11 +49,13 @@ import InvoiceContactDetails from '@/components/invoices/InvoiceContactDetails'; import InvoiceHeader from '@/components/invoices/InvoiceHeader'; import InvoiceTotals from '@/components/invoices/InvoiceTotals'; import AppEditable from '@/components/form/AppEditable'; -import AppError from '@/components/form/AppError'; import TeamLogo from '@/components/team/TeamLogo'; +import InvoiceRowsHeader from '@/components/invoices/InvoiceRowsHeader'; +import InvoiceAddRowBtn from '@/components/invoices/InvoiceAddRowBtn'; export default { components: { + InvoiceAddRowBtn, TeamLogo, InvoiceTotals, InvoiceHeader, @@ -76,9 +63,9 @@ export default { InvoiceBankDetails, InvoiceCompanyDetails, InvoiceRow, + InvoiceRowsHeader, InvoiceClientDetails, AppEditable, - AppError, }, computed: { ...mapState({ @@ -106,9 +93,6 @@ export default { invoiceId: this.invoice.id, }); }, - addRow() { - this.$store.dispatch('invoiceRows/addRow', this.invoice.id); - }, }, }; diff --git a/src/components/invoices/InvoiceRow.vue b/src/components/invoices/InvoiceRow.vue index efab2d9..f580d5a 100644 --- a/src/components/invoices/InvoiceRow.vue +++ b/src/components/invoices/InvoiceRow.vue @@ -28,6 +28,14 @@ placeholder="Enter price" @change="updateProp({ price: $event })"/> + + + {{ (row.quantity * row.price) | currency }}