mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-28 00:11:08 -04:00
logo update
This commit is contained in:
@ -4,8 +4,12 @@
|
|||||||
<div class="row mb-5">
|
<div class="row mb-5">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<img v-if="team.logo_url"
|
<img v-if="team.logo_url"
|
||||||
|
v-b-modal.team_logo_url
|
||||||
:src="team.logo_url" style="width:100%; max-width:200px;">
|
:src="team.logo_url" style="width:100%; max-width:200px;">
|
||||||
<!-- TODO: logo url input -->
|
<!-- TODO: logo url input -->
|
||||||
|
<button class="btn btn-sm" v-b-modal.team_logo_url v-else>
|
||||||
|
<i class="material-icons material-icons-round md-36">file_upload</i>
|
||||||
|
</button>
|
||||||
<AppError :errors="errors" field="team.logos"/>
|
<AppError :errors="errors" field="team.logos"/>
|
||||||
</div>
|
</div>
|
||||||
<InvoiceHeader :invoice="invoice" :errors="errors" @update="updateProp"
|
<InvoiceHeader :invoice="invoice" :errors="errors" @update="updateProp"
|
||||||
@ -57,6 +61,19 @@
|
|||||||
class="col-4 text-right"/>
|
class="col-4 text-right"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<BModal id="team_logo_url"
|
||||||
|
centered
|
||||||
|
title="Insert logo url"
|
||||||
|
hide-footer
|
||||||
|
size="sm"
|
||||||
|
content-class="bg-base dp--24">
|
||||||
|
<AppInput :value="team.logo_url"
|
||||||
|
@change="updateTeam({ logo_url: $event })"
|
||||||
|
label="Logo url"
|
||||||
|
field="logo_url"
|
||||||
|
:errors="errors"
|
||||||
|
type="url"/>
|
||||||
|
</BModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -70,8 +87,13 @@ import InvoiceHeader from '@/components/invoices/InvoiceHeader';
|
|||||||
import InvoiceTotals from '@/components/invoices/InvoiceTotals';
|
import InvoiceTotals from '@/components/invoices/InvoiceTotals';
|
||||||
import AppEditable from '@/components/form/AppEditable';
|
import AppEditable from '@/components/form/AppEditable';
|
||||||
import AppError from '@/components/form/AppError';
|
import AppError from '@/components/form/AppError';
|
||||||
|
import { BModal, VBModal } from 'bootstrap-vue';
|
||||||
|
import AppInput from '@/components/form/AppInput';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
directives: {
|
||||||
|
'b-modal': VBModal,
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
InvoiceTotals,
|
InvoiceTotals,
|
||||||
InvoiceHeader,
|
InvoiceHeader,
|
||||||
@ -82,6 +104,8 @@ export default {
|
|||||||
InvoiceClientDetails,
|
InvoiceClientDetails,
|
||||||
AppEditable,
|
AppEditable,
|
||||||
AppError,
|
AppError,
|
||||||
|
AppInput,
|
||||||
|
BModal,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
@ -110,6 +134,9 @@ export default {
|
|||||||
addRow() {
|
addRow() {
|
||||||
this.$store.dispatch('invoices/addRow');
|
this.$store.dispatch('invoices/addRow');
|
||||||
},
|
},
|
||||||
|
updateTeam(props) {
|
||||||
|
this.$store.dispatch('teams/updateTeam', props);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 mb-4 d-flex justify-content-between">
|
<div class="col-12 mb-4 pr-0 d-flex justify-content-between">
|
||||||
<h4 class="mb-0">Invoices</h4>
|
<h4 class="mb-0">Invoices</h4>
|
||||||
<div>
|
<div>
|
||||||
|
<button class="btn btn-sm btn-outline-dark" @click="createNewInvoice">New invoice</button>
|
||||||
<b-dropdown variant="link" size="sm" no-caret right>
|
<b-dropdown variant="link" size="sm" no-caret right>
|
||||||
<template slot="button-content">
|
<template slot="button-content">
|
||||||
<i class="material-icons">more_vert</i>
|
<i class="material-icons">more_vert</i>
|
||||||
@ -11,7 +12,6 @@
|
|||||||
<b-dropdown-item @click="exportJson">Export</b-dropdown-item>
|
<b-dropdown-item @click="exportJson">Export</b-dropdown-item>
|
||||||
<b-dropdown-item @click="openImportModal">Import</b-dropdown-item>
|
<b-dropdown-item @click="openImportModal">Import</b-dropdown-item>
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
<button class="btn btn-sm btn-outline-dark" @click="createNewInvoice">New invoice</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user