bug fixes

This commit is contained in:
Peter Papp
2021-05-14 10:29:46 +02:00
parent b4e6561134
commit 722eceb0c1
23 changed files with 172 additions and 137 deletions

View File

@@ -45,10 +45,11 @@
"nunomaduro/collision": "^5.3.0",
"phpunit/phpunit": "^9.5.2"
},
"repositories": [{
"type": "path",
"url": "../vuefilemanager-invoicing"
}
"repositories": [
{
"type": "path",
"url": "../vuefilemanager-invoicing"
}
],
"config": {
"optimize-autoloader": true,

3
composer.lock generated
View File

@@ -3754,7 +3754,7 @@
"dist": {
"type": "path",
"url": "../vuefilemanager-invoicing",
"reference": "7f653076b230177b3bade06d99f182d42b5467ab"
"reference": "0af0ee5b9407e2fd237aecb2e91b240a133c61b8"
},
"require": {
"barryvdh/laravel-snappy": "^0.4.8",
@@ -3763,6 +3763,7 @@
"intervention/image": "^2.5",
"kyslik/column-sortable": "^6.4",
"laravel/cashier": "^12.13",
"laravel/sanctum": "^2.11",
"php": "^8.0",
"spatie/laravel-package-tools": "^1.4.3",
"teamtnt/laravel-scout-tntsearch-driver": "^11.3"

View File

@@ -8,7 +8,7 @@
"/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/~56ae6336.js": "/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/~56ae6336.js?id=3500df10c19053acd77b",
"/chunks/admin~chunks/files~chunks/oasis/invoices~chunks/oasis/invoices/list~chunks/platform~chunks/sh~d177b2e8.js": "/chunks/admin~chunks/files~chunks/oasis/invoices~chunks/oasis/invoices/list~chunks/platform~chunks/sh~d177b2e8.js?id=a387d2c725058d00da7d",
"/chunks/admin~chunks/files~chunks/oasis/invoices~chunks/settings~chunks/shared/file-browser.js": "/chunks/admin~chunks/files~chunks/oasis/invoices~chunks/settings~chunks/shared/file-browser.js?id=e15b67406596821c2be9",
"/chunks/admin~chunks/oasis/invoices~chunks/platform.js": "/chunks/admin~chunks/oasis/invoices~chunks/platform.js?id=6b26b3e293cd0f376a73",
"/chunks/admin~chunks/oasis/invoices~chunks/platform.js": "/chunks/admin~chunks/oasis/invoices~chunks/platform.js?id=0b44da7d555996319bfb",
"/chunks/admin~chunks/oasis/invoices~chunks/platform~chunks/shared.js": "/chunks/admin~chunks/oasis/invoices~chunks/platform~chunks/shared.js?id=1ca47708816a4be47a0a",
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=1c320a815afcc355bae7",
"/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~262a2a36.js": "/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~262a2a36.js?id=e6505b93727b56256f92",
@@ -50,16 +50,16 @@
"/chunks/invoices.js": "/chunks/invoices.js?id=733a4a9b02203923e96b",
"/chunks/not-found-shared.js": "/chunks/not-found-shared.js?id=7fc7f9b6f10bdfac770e",
"/chunks/oasis/homepage.js": "/chunks/oasis/homepage.js?id=a1885dd8814f9eb63a1c",
"/chunks/oasis/invoices.js": "/chunks/oasis/invoices.js?id=03f1f33852cd4740a50a",
"/chunks/oasis/invoices/client.js": "/chunks/oasis/invoices/client.js?id=623ba4eec8721013b36f",
"/chunks/oasis/invoices/client-detail.js": "/chunks/oasis/invoices/client-detail.js?id=e2db934f6fcb045adcfd",
"/chunks/oasis/invoices/client-invoices.js": "/chunks/oasis/invoices/client-invoices.js?id=7a4df8827b626c83d872",
"/chunks/oasis/invoices/create-client.js": "/chunks/oasis/invoices/create-client.js?id=a27824905ee00e5b9d5e",
"/chunks/oasis/invoices/create-invoice.js": "/chunks/oasis/invoices/create-invoice.js?id=221a21718a601c348fff",
"/chunks/oasis/invoices/edit-invoice.js": "/chunks/oasis/invoices/edit-invoice.js?id=e4331fd98837a9c86634",
"/chunks/oasis/invoices/list.js": "/chunks/oasis/invoices/list.js?id=687fecc3ed7edb42ac8d",
"/chunks/oasis/invoices/profile.js": "/chunks/oasis/invoices/profile.js?id=10e92b844417cc78d45e",
"/chunks/oasis/invoices~chunks/platform~chunks/shared.js": "/chunks/oasis/invoices~chunks/platform~chunks/shared.js?id=14c791d5a02c82b747e9",
"/chunks/oasis/invoices.js": "/chunks/oasis/invoices.js?id=d9b77bfe0d40609784cd",
"/chunks/oasis/invoices/client.js": "/chunks/oasis/invoices/client.js?id=aab4464638dbfbd88399",
"/chunks/oasis/invoices/client-detail.js": "/chunks/oasis/invoices/client-detail.js?id=90d38e5b50c2679caaf3",
"/chunks/oasis/invoices/client-invoices.js": "/chunks/oasis/invoices/client-invoices.js?id=fe89e062ae89e89d7a4f",
"/chunks/oasis/invoices/create-client.js": "/chunks/oasis/invoices/create-client.js?id=731882fbca0ee52144e2",
"/chunks/oasis/invoices/create-invoice.js": "/chunks/oasis/invoices/create-invoice.js?id=3c29dcda0627e719aa96",
"/chunks/oasis/invoices/edit-invoice.js": "/chunks/oasis/invoices/edit-invoice.js?id=43c087194da7de411122",
"/chunks/oasis/invoices/list.js": "/chunks/oasis/invoices/list.js?id=d4b753e23ebb965d2cbb",
"/chunks/oasis/invoices/profile.js": "/chunks/oasis/invoices/profile.js?id=eac3a90d7aad9c5da0bc",
"/chunks/oasis/invoices~chunks/platform~chunks/shared.js": "/chunks/oasis/invoices~chunks/platform~chunks/shared.js?id=0b3bb29f6c38487be5d6",
"/chunks/oasis/platba.js": "/chunks/oasis/platba.js?id=791bf891bb4a384c0890",
"/chunks/oasis/platba~chunks/oasis/upgrade-billing~chunks/oasis/upgrade-plan~chunks/upgrade-billing~ch~6880400b.js": "/chunks/oasis/platba~chunks/oasis/upgrade-billing~chunks/oasis/upgrade-plan~chunks/upgrade-billing~ch~6880400b.js?id=0c8d1c3cca084baa177f",
"/chunks/oasis/sign-up.js": "/chunks/oasis/sign-up.js?id=e53eeb48ebabae259f9c",
@@ -98,7 +98,7 @@
"/chunks/subscription-service.js": "/chunks/subscription-service.js?id=7011390fa6d368070d72",
"/chunks/upgrade-billing.js": "/chunks/upgrade-billing.js?id=3541c0262320aeaf0749",
"/chunks/upgrade-plan.js": "/chunks/upgrade-plan.js?id=e9c46003e82194e85439",
"/chunks/user.js": "/chunks/user.js?id=3090bfd5b85dd1b200ec",
"/chunks/user.js": "/chunks/user.js?id=d4bd406e20aacad37588",
"/chunks/user-create.js": "/chunks/user-create.js?id=d4c1fc74ca50973925b3",
"/chunks/user-delete.js": "/chunks/user-delete.js?id=9b2354c223ea128603d6",
"/chunks/user-detail.js": "/chunks/user-detail.js?id=84eada5c23af5d5a22d5",
@@ -111,17 +111,48 @@
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~66c4fa45.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~66c4fa45.js?id=accf0be7f09c1000b571",
"/vendors~chunks/files~chunks/oasis/invoices~chunks/platform~chunks/shared~chunks/shared/file-browser~~b42d96c6.js": "/vendors~chunks/files~chunks/oasis/invoices~chunks/platform~chunks/shared~chunks/shared/file-browser~~b42d96c6.js?id=a564e3b9054e42dda63f",
"/vendors~chunks/oasis/invoices~chunks/platform~chunks/shared.js": "/vendors~chunks/oasis/invoices~chunks/platform~chunks/shared.js?id=03d3cf785cbafa4d31f0",
"/chunks/oasis/invoices/client.53ce91dbe0456380b75f.hot-update.js": "/chunks/oasis/invoices/client.53ce91dbe0456380b75f.hot-update.js",
"/chunks/oasis/invoices/list.04fa29863bc8da8deeef.hot-update.js": "/chunks/oasis/invoices/list.04fa29863bc8da8deeef.hot-update.js",
"/js/main.1ef1efa38a60d177a7cd.hot-update.js": "/js/main.1ef1efa38a60d177a7cd.hot-update.js",
"/chunks/oasis/invoices/client-detail.1ef1efa38a60d177a7cd.hot-update.js": "/chunks/oasis/invoices/client-detail.1ef1efa38a60d177a7cd.hot-update.js",
"/chunks/oasis/invoices/profile.e3ab9ff4d63ed78a8428.hot-update.js": "/chunks/oasis/invoices/profile.e3ab9ff4d63ed78a8428.hot-update.js",
"/chunks/oasis/invoices.f9aa0151452c385ab22f.hot-update.js": "/chunks/oasis/invoices.f9aa0151452c385ab22f.hot-update.js",
"/chunks/oasis/invoices/client.f9aa0151452c385ab22f.hot-update.js": "/chunks/oasis/invoices/client.f9aa0151452c385ab22f.hot-update.js",
"/chunks/oasis/invoices/client-invoices.f9aa0151452c385ab22f.hot-update.js": "/chunks/oasis/invoices/client-invoices.f9aa0151452c385ab22f.hot-update.js",
"/chunks/oasis/invoices/edit-invoice.696137eb8832304e3bb4.hot-update.js": "/chunks/oasis/invoices/edit-invoice.696137eb8832304e3bb4.hot-update.js",
"/chunks/oasis/invoices.c72f8b81b400bfa88d98.hot-update.js": "/chunks/oasis/invoices.c72f8b81b400bfa88d98.hot-update.js",
"/chunks/oasis/invoices/create-invoice.c72f8b81b400bfa88d98.hot-update.js": "/chunks/oasis/invoices/create-invoice.c72f8b81b400bfa88d98.hot-update.js",
"/chunks/oasis/invoices/profile.c72f8b81b400bfa88d98.hot-update.js": "/chunks/oasis/invoices/profile.c72f8b81b400bfa88d98.hot-update.js",
"/chunks/oasis/invoices/create-invoice.4b1592ddd121ceb23b97.hot-update.js": "/chunks/oasis/invoices/create-invoice.4b1592ddd121ceb23b97.hot-update.js"
"/chunks/oasis/invoices/client-invoices.e345016c51ccc35cf25f.hot-update.js": "/chunks/oasis/invoices/client-invoices.e345016c51ccc35cf25f.hot-update.js",
"/js/main.31353567af235851950e.hot-update.js": "/js/main.31353567af235851950e.hot-update.js",
"/chunks/oasis/invoices/edit-invoice.5f288ab82f4066cd368d.hot-update.js": "/chunks/oasis/invoices/edit-invoice.5f288ab82f4066cd368d.hot-update.js",
"/chunks/oasis/invoices/profile.55bcbc2edc20eb16370c.hot-update.js": "/chunks/oasis/invoices/profile.55bcbc2edc20eb16370c.hot-update.js",
"/chunks/oasis/invoices/profile.65ebd8ed726ff778e406.hot-update.js": "/chunks/oasis/invoices/profile.65ebd8ed726ff778e406.hot-update.js",
"/chunks/oasis/invoices/profile.e6805cd2d95e6885dc9f.hot-update.js": "/chunks/oasis/invoices/profile.e6805cd2d95e6885dc9f.hot-update.js",
"/chunks/oasis/invoices/list.75615ef00e2b57164cf0.hot-update.js": "/chunks/oasis/invoices/list.75615ef00e2b57164cf0.hot-update.js",
"/chunks/oasis/invoices/list.751b7a6f6dd297011923.hot-update.js": "/chunks/oasis/invoices/list.751b7a6f6dd297011923.hot-update.js",
"/chunks/oasis/invoices/list.7ff9e42be78b7a0ee176.hot-update.js": "/chunks/oasis/invoices/list.7ff9e42be78b7a0ee176.hot-update.js",
"/js/main.6b9381afd214305ed774.hot-update.js": "/js/main.6b9381afd214305ed774.hot-update.js",
"/js/main.73c8e1e59322459241fe.hot-update.js": "/js/main.73c8e1e59322459241fe.hot-update.js",
"/js/main.bb2cdd478d893ed716db.hot-update.js": "/js/main.bb2cdd478d893ed716db.hot-update.js",
"/js/main.5af3802f3f685dcf87d9.hot-update.js": "/js/main.5af3802f3f685dcf87d9.hot-update.js",
"/js/main.3615a05fa2584e2e1d76.hot-update.js": "/js/main.3615a05fa2584e2e1d76.hot-update.js",
"/js/main.90b181c01c5f31af7b74.hot-update.js": "/js/main.90b181c01c5f31af7b74.hot-update.js",
"/chunks/oasis/invoices/client-detail.feadb28a24caa20b1468.hot-update.js": "/chunks/oasis/invoices/client-detail.feadb28a24caa20b1468.hot-update.js",
"/chunks/oasis/invoices/client-detail.967c61aeb363e0d4527f.hot-update.js": "/chunks/oasis/invoices/client-detail.967c61aeb363e0d4527f.hot-update.js",
"/chunks/oasis/invoices/client-detail.8d0358c6251b77e6bfc6.hot-update.js": "/chunks/oasis/invoices/client-detail.8d0358c6251b77e6bfc6.hot-update.js",
"/chunks/oasis/invoices/client-detail.0f06026e37a09fe48870.hot-update.js": "/chunks/oasis/invoices/client-detail.0f06026e37a09fe48870.hot-update.js",
"/chunks/oasis/invoices/client-detail.7db92ce07ec8ddc04845.hot-update.js": "/chunks/oasis/invoices/client-detail.7db92ce07ec8ddc04845.hot-update.js",
"/chunks/oasis/invoices/client-detail.94d0d84b9dc916015462.hot-update.js": "/chunks/oasis/invoices/client-detail.94d0d84b9dc916015462.hot-update.js",
"/js/main.77004143ab22823c699d.hot-update.js": "/js/main.77004143ab22823c699d.hot-update.js",
"/js/main.514d34f03e45c5e86ab8.hot-update.js": "/js/main.514d34f03e45c5e86ab8.hot-update.js",
"/js/main.e8e38a5c5dde5fa0a9ab.hot-update.js": "/js/main.e8e38a5c5dde5fa0a9ab.hot-update.js",
"/chunks/oasis/invoices/create-invoice.e43abf807e7f9d797004.hot-update.js": "/chunks/oasis/invoices/create-invoice.e43abf807e7f9d797004.hot-update.js",
"/js/main.24a5f59c417be446ed54.hot-update.js": "/js/main.24a5f59c417be446ed54.hot-update.js",
"/js/main.b4bd1043de639c6ce9fa.hot-update.js": "/js/main.b4bd1043de639c6ce9fa.hot-update.js",
"/js/main.4ebc86671610be5a27eb.hot-update.js": "/js/main.4ebc86671610be5a27eb.hot-update.js",
"/js/main.0ec9124dd6bf865e6719.hot-update.js": "/js/main.0ec9124dd6bf865e6719.hot-update.js",
"/chunks/oasis/invoices/create-invoice.2f8894b4b4bbc4c7d5e3.hot-update.js": "/chunks/oasis/invoices/create-invoice.2f8894b4b4bbc4c7d5e3.hot-update.js",
"/js/main.b5c77e10cfc72083096b.hot-update.js": "/js/main.b5c77e10cfc72083096b.hot-update.js",
"/chunks/oasis/invoices/create-invoice.7648932797cf0df17c57.hot-update.js": "/chunks/oasis/invoices/create-invoice.7648932797cf0df17c57.hot-update.js",
"/chunks/oasis/invoices/create-invoice.c751d88009747c8575bf.hot-update.js": "/chunks/oasis/invoices/create-invoice.c751d88009747c8575bf.hot-update.js",
"/js/main.f261f1a1ca6d62e99e10.hot-update.js": "/js/main.f261f1a1ca6d62e99e10.hot-update.js",
"/js/main.8637bde7b07a5ef545e6.hot-update.js": "/js/main.8637bde7b07a5ef545e6.hot-update.js",
"/js/main.3784279d6690123b962a.hot-update.js": "/js/main.3784279d6690123b962a.hot-update.js",
"/chunks/oasis/invoices/create-invoice.bce3e7050f728ccd5225.hot-update.js": "/chunks/oasis/invoices/create-invoice.bce3e7050f728ccd5225.hot-update.js",
"/chunks/oasis/invoices.8b33530fe40c3ce45fdc.hot-update.js": "/chunks/oasis/invoices.8b33530fe40c3ce45fdc.hot-update.js",
"/chunks/oasis/invoices.672bca5597218815debf.hot-update.js": "/chunks/oasis/invoices.672bca5597218815debf.hot-update.js",
"/chunks/oasis/invoices/client.d5aa1a68caef406b9a70.hot-update.js": "/chunks/oasis/invoices/client.d5aa1a68caef406b9a70.hot-update.js",
"/chunks/oasis/invoices/client.9e7f1da881c3e4d7f4b4.hot-update.js": "/chunks/oasis/invoices/client.9e7f1da881c3e4d7f4b4.hot-update.js",
"/chunks/user.65b8dcb8584f61fa5fff.hot-update.js": "/chunks/user.65b8dcb8584f61fa5fff.hot-update.js",
"/chunks/user.37531ac8c4249865849e.hot-update.js": "/chunks/user.37531ac8c4249865849e.hot-update.js",
"/chunks/oasis/invoices/client.b2f4fd9a12cd4dbaf6ac.hot-update.js": "/chunks/oasis/invoices/client.b2f4fd9a12cd4dbaf6ac.hot-update.js"
}

View File

@@ -16,14 +16,14 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_logo') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="logo" v-slot="{ errors }">
<ImageInput @input="$updateImage('/invoices/profile', 'logo', profile.logo)" :image="$getImage(profile.logo)" v-model="profile.logo" :error="errors[0]" />
<ImageInput @input="$updateImage('/v1/invoicing/profile', 'logo', profile.logo)" :image="$getImage(profile.logo)" v-model="profile.logo" :error="errors[0]" />
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>{{ $t('in.form.company_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="company" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'company', profile.company)" v-model="profile.company" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'company', profile.company)" v-model="profile.company" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -35,7 +35,7 @@
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="registration_notes" rules="required" v-slot="{ errors }">
<textarea
rows="2"
@input="$updateText('/invoices/profile', 'registration_notes', profile.registration_notes)"
@input="$updateText('/v1/invoicing/profile', 'registration_notes', profile.registration_notes)"
v-model="profile.registration_notes"
placeholder=""
:class="{'is-error': errors[0]}"
@@ -55,7 +55,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.ico') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ico" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'ico', profile.ico)" v-model="profile.ico" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'ico', profile.ico)" v-model="profile.ico" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -64,7 +64,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.dic') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="dic" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'dic', profile.dic)" v-model="profile.dic" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'dic', profile.dic)" v-model="profile.dic" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -73,7 +73,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.ic_dph') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ic_dph" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'ic_dph', profile.ic_dph)" v-model="profile.ic_dph" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'ic_dph', profile.ic_dph)" v-model="profile.ic_dph" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -87,7 +87,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_address') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="address" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'address', profile.address)" v-model="profile.address" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'address', profile.address)" v-model="profile.address" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -97,7 +97,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_city') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="city" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'city', profile.city)" v-model="profile.city" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'city', profile.city)" v-model="profile.city" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -106,7 +106,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_postal_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="postal_code" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'postal_code', profile.postal_code)" v-model="profile.postal_code" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'postal_code', profile.postal_code)" v-model="profile.postal_code" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -116,7 +116,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_country') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="country" rules="required" v-slot="{ errors }">
<SelectInput @input="$updateText('/invoices/profile', 'country', profile.country)" v-model="profile.country" :default="profile.country" :options="countries" placeholder="" :isError="errors[0]"/>
<SelectInput @input="$updateText('/v1/invoicing/profile', 'country', profile.country)" v-model="profile.country" :default="profile.country" :options="countries" placeholder="" :isError="errors[0]"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
@@ -129,7 +129,7 @@
<div class="block-wrapper">
<label>{{ $t('in.form.bank_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="bank" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'bank', profile.bank)" v-model="profile.bank" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'bank', profile.bank)" v-model="profile.bank" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -138,7 +138,7 @@
<div class="block-wrapper">
<label>{{ $t('in.form.iban') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="iban" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'iban', profile.iban)" v-model="profile.iban" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'iban', profile.iban)" v-model="profile.iban" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -147,7 +147,7 @@
<div class="block-wrapper">
<label>{{ $t('in.form.swift_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="swift" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'swift', profile.swift)" v-model="profile.swift" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'swift', profile.swift)" v-model="profile.swift" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -161,7 +161,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_phone') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="phone" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'phone', profile.phone)" v-model="profile.phone" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'phone', profile.phone)" v-model="profile.phone" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -170,7 +170,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_email') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="email" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'email', profile.email)" v-model="profile.email" placeholder="" type="email"
<input @input="$updateText('/v1/invoicing/profile', 'email', profile.email)" v-model="profile.email" placeholder="" type="email"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -179,7 +179,7 @@
<div class="block-wrapper">
<label>{{ $t('in.form.author_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="author" rules="required" v-slot="{ errors }">
<input @input="$updateText('/invoices/profile', 'author', profile.author)" v-model="profile.author" placeholder="" type="text"
<input @input="$updateText('/v1/invoicing/profile', 'author', profile.author)" v-model="profile.author" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
@@ -188,7 +188,7 @@
<div class="block-wrapper">
<label>{{ $t('in.form.stamp') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="stamp" v-slot="{ errors }">
<ImageInput @input="$updateImage('/invoices/profile', 'stamp', profile.stamp)" :image="$getImage(profile.stamp)" v-model="profile.stamp" :error="errors[0]" />
<ImageInput @input="$updateImage('/v1/invoicing/profile', 'stamp', profile.stamp)" :image="$getImage(profile.stamp)" v-model="profile.stamp" :error="errors[0]" />
</ValidationProvider>
</div>
</div>
@@ -265,7 +265,7 @@
},
methods: {},
created() {
axios.get('/api/invoices/profile')
axios.get('/api/v1/invoicing/profile')
.then(response => {
this.profile = response.data.data.attributes
})

View File

@@ -156,7 +156,7 @@
<p>{{ $t('in.form.some_issues') }}</p>
</InfoBox>
<div class="block-wrapper">
<ButtonBase @click.native="createBillingProfile" :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" style="margin-bottom: 35px">
<ButtonBase @click.native="createBillingProfile" :disabled="isLoading" :loading="isLoading" button-style="theme" class="submit-button" type="submit" style="margin-bottom: 35px">
{{ $t('in.button.store_bill_profile') }}
</ButtonBase>
</div>
@@ -260,7 +260,7 @@
// Send request to get user token
axios
.post('/api/invoices/profile', formData, {
.post('/api/v1/invoicing/profile', formData, {
headers: {
'Content-Type': 'multipart/form-data',
}
@@ -273,7 +273,7 @@
})
this.$store.dispatch('getAppData')
this.$router.push({name: 'BillingProfile'})
this.$goToInvoice()
})
.catch(error => {
this.isError = true
@@ -310,4 +310,10 @@
max-width: 100%;
}
@media only screen and (max-width: 960px) {
.submit-button {
width: 100%;
}
}
</style>

View File

@@ -74,7 +74,7 @@
},
methods: {
fetchUser() {
axios.get(`/api/clients/${this.$route.params.id}`)
axios.get(`/api/v1/invoicing/clients/${this.$route.params.id}`)
.then(response => {
this.client = response.data
})
@@ -97,8 +97,6 @@
display: flex;
align-items: center;
cursor: pointer;
padding-bottom: 10px;
padding-top: 15px;
.avatar {
margin-right: 20px;

View File

@@ -209,7 +209,7 @@
// Send request to get user token
axios
.post('/api/oasis/clients', formData, {
.post('/api/v1/invoicing/clients', formData, {
headers: {
'Content-Type': 'multipart/form-data',
}

View File

@@ -5,13 +5,13 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_logo') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="avatar" v-slot="{ errors }">
<ImageInput @input="$updateImage(`/clients/${client.id}`, 'avatar', client.avatar)" v-model="client.avatar" :image="client.avatar" :error="errors[0]" />
<ImageInput @input="$updateImage(`/v1/invoicing/clients/${client.id}`, 'avatar', client.avatar)" v-model="client.avatar" :image="client.avatar" :error="errors[0]" />
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>{{ $t('in_editor.company_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="name" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'name', client.name)" v-model="client.name" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'name', client.name)" v-model="client.name" :placeholder="$t('in_editor.plac.client_company')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
@@ -21,21 +21,21 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.ico') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ico" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'ico', client.ico)" v-model="client.ico" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'ico', client.ico)" v-model="client.ico" :placeholder="$t('in_editor.plac.client_ico')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>{{ $t('in_editor.dic') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="dic" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'dic', client.dic)" v-model="client.dic" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'dic', client.dic)" v-model="client.dic" :placeholder="$t('in_editor.plac.client_dic')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>{{ $t('in_editor.ic_dph') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ic_dph" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'ic_dph', client.ic_dph)" v-model="client.ic_dph" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'ic_dph', client.ic_dph, true)" v-model="client.ic_dph" :placeholder="$t('in_editor.plac.client_ic_dph')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
@@ -45,28 +45,28 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_address') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="address" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'address', client.address)" v-model="client.address" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'address', client.address)" v-model="client.address" :placeholder="$t('in_editor.plac.client_address')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>{{ $t('in_editor.client_city') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="city" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'city', client.city)" v-model="client.city" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'city', client.city)" v-model="client.city" :placeholder="$t('in_editor.plac.client_city')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>{{ $t('in_editor.client_postal_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="postal_code" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'postal_code', client.postal_code)" v-model="client.postal_code" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'postal_code', client.postal_code)" v-model="client.postal_code" :placeholder="$t('in_editor.plac.client_postal_code')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>{{ $t('in_editor.client_country') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="country" rules="required" v-slot="{ errors }">
<SelectInput @input="$updateText(`/clients/${client.id}`, 'country', client.country)" v-model="client.country" :default="client.country" :options="countries" placeholder="" :isError="errors[0]" />
<SelectInput @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'country', client.country)" v-model="client.country" :default="client.country" :options="countries" :placeholder="$t('in_editor.plac.client_country')" :isError="errors[0]" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
@@ -76,14 +76,14 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client_phone') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="phone_number" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'phone_number', client.phone_number)" v-model="client.phone_number" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'phone_number', client.phone_number, true)" v-model="client.phone_number" :placeholder="$t('in_editor.plac.client_phone')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>{{ $t('in_editor.client_email') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="email" v-slot="{ errors }">
<input @input="$updateText(`/clients/${client.id}`, 'email', client.email)" v-model="client.email" placeholder="" type="email" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input @input="$updateText(`/v1/invoicing/clients/${client.id}`, 'email', client.email, true)" v-model="client.email" :placeholder="$t('in_editor.plac.client_email')" type="email" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>

View File

@@ -3,7 +3,7 @@
<PageTabGroup>
<DatatableWrapper
@init="isLoading = false"
:api="`/api/clients/${$route.params.id}/invoices`"
:api="`/api/v1/invoicing/clients/${$route.params.id}/invoices`"
:paginator="false"
:columns="columns"
class="table"

View File

@@ -18,7 +18,7 @@
<MobileNavigation />
<SidebarNavigation />
<div id="viewport">
<div id="viewport" :class="{'is-scaled-down': isScaledDown}">
<!--Sidebar navigation-->
<ContentSidebar>
@@ -60,7 +60,7 @@
</ContentGroup>
</ContentSidebar>
<router-view :class="{'is-scaled-down': isScaledDown}" />
<router-view />
</div>
</div>
</template>
@@ -150,7 +150,7 @@
events.$on('action:confirmed', data => {
if (data.operation === 'delete-invoice') {
axios.delete(`/api/invoices/${data.id}`)
axios.delete(`/api/v1/invoicing/invoices/${data.id}`)
.then(() => this.goTo(this.currentFolder.location))
.catch(() => this.$isSomethingWrong())
}
@@ -159,7 +159,7 @@
events.$on('action:confirmed', data => {
if (data.operation === 'delete-client') {
axios.delete(`/api/clients/${data.id}`)
axios.delete(`/api/v1/invoicing/clients/${data.id}`)
.then(() => this.goTo(this.currentFolder.location))
.catch(() => this.$isSomethingWrong())
}

View File

@@ -308,7 +308,7 @@
</div>
</div>
<ButtonBase :disabled="isLoading" :loading="isLoading" @click.native="createInvoice" button-style="theme-solid" class="next-submit">
<ButtonBase :disabled="isLoading" :loading="isLoading" @click.native="createInvoice" button-style="theme" class="next-submit">
{{ $t('in_editor.submit') }}
</ButtonBase>
<p class="error-message" v-if="isError">
@@ -615,7 +615,7 @@
// Send request to get user token
axios
.post('/api/invoices', formData, {
.post('/api/v1/invoicing/invoices', formData, {
headers: {
'Content-Type': 'multipart/form-data',
}
@@ -690,7 +690,7 @@
mounted() {
this.invoice.invoice_type = this.$route.query.type
axios.get('/api/invoices/editor')
axios.get('/api/v1/invoicing/editor')
.then(response => {
this.isVatPayer = response.data.isVatPayer
this.clients = response.data.clients

View File

@@ -50,7 +50,7 @@
<div class="block-wrapper">
<label>{{ $t('in_editor.client') }}:</label>
<div class="input-wrapper">
<input v-model.number="invoice.client['name']" type="text" disabled />
<input v-model.number="client['name']" type="text" disabled />
</div>
</div>
</PageTabGroup>
@@ -412,9 +412,6 @@
this.invoice.discount_type = null
}
},
'invoice.invoice_number': function (val) {
this.invoice.variable_number = val
},
},
data() {
return {
@@ -442,9 +439,9 @@
],
discount_type: undefined,
discount_rate: undefined,
client: '',
send_invoice: false,
},
client: '',
discountTypeList: [
{
label: this.$t('in_editor.discount_type_percent'),
@@ -493,25 +490,14 @@
// Start loading
this.isLoading = true
// Create form
let formData = new FormData()
let payload = this.invoice
// Append data to form
Object.keys(this.invoice).forEach(key => {
if (key === 'items') {
formData.append(key, JSON.stringify(this.invoice[key]))
} else {
if (this.invoice[key])
formData.append(key, this.invoice[key])
}
})
//payload.items = JSON.stringify(this.invoice.items)
// Send request to get user token
axios
.post(`/api/invoices/${this.$route.params.id}`, formData)
.put(`/api/v1/invoicing/invoices/${this.$route.params.id}`, payload)
.then(() => {
events.$emit('toaster', {
type: 'success',
message: this.$t('in_toaster.success_invoice_edition'),
@@ -560,12 +546,12 @@
}
},
mounted() {
axios.get('/api/invoices/editor')
axios.get('/api/v1/invoicing/editor')
.then(response => {
this.isVatPayer = response.data.isVatPayer
})
axios.get(`/api/invoices/${this.$route.params.id}`)
axios.get(`/api/v1/invoicing/invoices/${this.$route.params.id}`)
.then(response => {
this.invoice.invoice_number = response.data.data.attributes.invoice_number
this.invoice.variable_number = response.data.data.attributes.variable_number
@@ -574,7 +560,8 @@
this.invoice.items = response.data.data.attributes.items
this.invoice.discount_type = response.data.data.attributes.discount_type
this.invoice.discount_rate = response.data.data.attributes.discount_rate
this.invoice.client = response.data.data.attributes.client
this.client = response.data.data.attributes.client
if (this.invoice.discount_type && this.invoice.discount_rate) {
this.isDiscount = true

View File

@@ -33,7 +33,7 @@
</div>
<!--Billing Profile Message-->
<div class="text-content" v-if="! hasBillingProfile">
<div class="text-content" v-if="! hasBillingProfile && ! isLoading">
<h1 class="title">
{{ $t('in.empty.bill_profile_title') }}
</h1>

View File

@@ -12,10 +12,10 @@
>
<MobileToolbar />
<SearchBar v-model="query" @reset-query="query = ''" class="mobile-search" :placeholder="searchPlaceholder" />
<SearchBar v-if="hasBillingProfile" v-model="query" @reset-query="query = ''" class="mobile-search" :placeholder="searchPlaceholder" />
<!--Mobile Actions-->
<InvoiceActionsMobile />
<InvoiceActionsMobile v-if="hasBillingProfile" />
<!--Item previews list-->
<div class="file-list-wrapper">
@@ -95,6 +95,7 @@
'clipboard',
'isLoading',
'entries',
'user',
]),
searchPlaceholder() {
return this.currentFolder && ['regular-invoice', 'advance-invoice'].includes(this.currentFolder.location)
@@ -112,6 +113,9 @@
if (this.clipboard.includes(this.draggingId)) {
return this.clipboard
}
},
hasBillingProfile() {
return this.user && this.user.data.attributes.has_billing_profile
}
},
watch: {

View File

@@ -86,7 +86,7 @@ export default {
// Send request to get share link
axios
.post(`/api/invoices/${this.pickedItem.id}/share`,
.post(`/api/v1/invoicing/invoices/${this.pickedItem.id}/share`,
this.shareOptions
)
.then(() => {

View File

@@ -1,7 +1,7 @@
<template>
<button class="button-base" :class="buttonStyle" type="button">
<div v-if="loading" class="icon">
<refresh-cw-icon size="16" class="sync-alt" />
<refresh-cw-icon size="16" class="sync-alt" :class="{'text-theme': buttonStyle === 'theme'}" />
</div>
<div class="content">
<slot v-if="! loading"></slot>
@@ -41,6 +41,10 @@
.icon {
line-height: 1;
margin-right: 10px;
polyline, path {
color: inherit;
}
}
&:active {
@@ -52,6 +56,11 @@
.content {
color: white;
}
polyline, path {
color: white;
stroke: white;
}
}
&.danger {
@@ -63,6 +72,7 @@
polyline, path {
stroke: $danger;
color: $danger;
}
}
@@ -75,6 +85,7 @@
polyline, path {
stroke: white;
color: white;
}
}
@@ -87,6 +98,7 @@
polyline, path {
stroke: $text;
color: $text;
}
}
}

View File

@@ -24,7 +24,7 @@
<PopoverItem v-if="isInvoice" name="file-preview-contextmenu" side="right">
<OptionGroup class="menu-option-group">
<Option @click.native="$editInvoice(clipboard[0])" :title="$t('in.menu.edit_invoice')" icon="rename" />
<Option @click.native="" :title="$t('in.menu.send_invoice')" icon="send" />
<Option @click.native="$shareInvoice(clipboard[0])" :title="$t('in.menu.send_invoice')" icon="send" />
<Option @click.native="$goToCompany(clipboard[0])" :title="$t('in.menu.show_company')" icon="user" />
<Option @click.native="$deleteInvoice(clipboard[0])" :title="$t('context_menu.delete')" icon="trash" />
</OptionGroup>

View File

@@ -16,7 +16,7 @@
<!--Main navigation-->
<OptionGroup v-if="!clickedSubmenu">
<Option @click.native="goToFiles" :title="$t('menu.files')" icon="hard-drive" is-hover-disabled="true"/>
<Option @click.native="goToInvoices" :title="$t('in.nav.invoices')" icon="file-text" is-hover-disabled="true" />
<Option @click.native="$goToInvoice" :title="$t('in.nav.invoices')" icon="file-text" is-hover-disabled="true" />
<Option @click.native.stop="showSubmenu('settings')" :title="$t('menu.settings')" icon="user" arrow="right" is-hover-disabled="true"/>
<Option v-if="isAdmin" @click.native.stop="showSubmenu('admin')" :title="$t('menu.admin')" icon="settings" arrow="right" is-hover-disabled="true"/>
</OptionGroup>
@@ -95,9 +95,6 @@
}
},
methods: {
goToInvoices() {
this.$router.push({name: 'InvoicesList'})
},
goToRoute(route) {
this.$router.push({name: route})
this.clickedSubmenu = undefined

View File

@@ -14,7 +14,7 @@
</div>
</router-link>
<a @click="goToInvoice" :title="$t('in.nav.invoices')" :class="{'is-active': $isThisRoute($route, invoiceRoutes)}" class="icon-navigation-item invoice">
<a @click="$goToInvoice" :title="$t('in.nav.invoices')" :class="{'is-active': $isThisRoute($route, invoiceRoutes)}" class="icon-navigation-item invoice">
<div class="button-icon">
<file-text-icon size="19" />
</div>
@@ -121,19 +121,6 @@
]
}
},
methods: {
goToInvoice() {
this.$router.push({name: 'InvoicesList'})
this.$store.commit('STORE_CURRENT_FOLDER', {
name: 'Invoices',
id: undefined,
location: 'regular-invoice',
})
this.$store.dispatch('getRegularInvoices')
}
},
mounted() {
this.$store.dispatch('getAppData')
}

View File

@@ -2,10 +2,23 @@ import i18n from '@/i18n/index'
import {debounce} from 'lodash'
import {events} from './bus'
import store from "./store";
import router from "./router";
const OasisHelpers = {
install(Vue) {
Vue.prototype.$goToInvoice = function () {
router.push({name: 'InvoicesList'})
store.commit('STORE_CURRENT_FOLDER', {
name: 'Invoices',
id: undefined,
location: 'regular-invoice',
})
store.dispatch('getRegularInvoices')
}
Vue.prototype.$getInvoiceDataByLocation = function () {
let currentLocation = store.getters.currentFolder && store.getters.currentFolder.location
@@ -18,7 +31,7 @@ const OasisHelpers = {
'clients': 'getClients',
}
this.$store.dispatch(actions[currentLocation])
store.dispatch(actions[currentLocation])
}
Vue.prototype.$shareInvoice = function (entry) {
@@ -29,7 +42,7 @@ const OasisHelpers = {
}
Vue.prototype.$editInvoice = function (entry) {
this.$router.push({name: 'EditInvoice', params: {id: entry.id}})
router.push({name: 'EditInvoice', params: {id: entry.id}})
events.$emit('file-preview:hide')
}
@@ -62,7 +75,7 @@ const OasisHelpers = {
}
Vue.prototype.$goToCompany = function (entry) {
this.$router.push({name: 'ClientDetail', params: {id: entry.client_id ?? entry.id}})
router.push({name: 'ClientDetail', params: {id: entry.client_id ?? entry.id}})
events.$emit('file-preview:hide')
}
@@ -71,10 +84,10 @@ const OasisHelpers = {
if (value !== '' && typeof value !== 'undefined') {
if (['regular-invoice', 'advance-invoice'].includes(this.$store.getters.currentFolder.location)) {
this.$store.dispatch('getSearchResultForInvoices', value)
if (['regular-invoice', 'advance-invoice'].includes(store.getters.currentFolder.location)) {
store.dispatch('getSearchResultForInvoices', value)
} else {
this.$store.dispatch('getSearchResultForClients', value)
store.dispatch('getSearchResultForClients', value)
}
} else if (typeof value !== 'undefined') {
@@ -84,9 +97,9 @@ const OasisHelpers = {
'clients': 'getClients',
}
this.$store.dispatch(locations[this.$store.getters.currentFolder.location])
store.dispatch(locations[store.getters.currentFolder.location])
this.$store.commit('CHANGE_SEARCHING_STATE', false)
store.commit('CHANGE_SEARCHING_STATE', false)
}
}, 300)
}

View File

@@ -20,7 +20,7 @@ const actions = {
})
axios
.get('/api/invoices/regular' + getters.invoiceSorting.URI)
.get('/api/v1/invoicing/invoices/regular' + getters.invoiceSorting.URI)
.then(response => {
commit('LOADING_STATE', {loading: false, data: response.data})
})
@@ -41,7 +41,7 @@ const actions = {
})
axios
.get('/api/invoices/advance' + getters.invoiceSorting.URI)
.get('/api/v1/invoicing/invoices/advance' + getters.invoiceSorting.URI)
.then(response => {
commit('LOADING_STATE', {loading: false, data: response.data})
})
@@ -62,7 +62,7 @@ const actions = {
})
axios
.get('/api/clients' + getters.invoiceSorting.URI)
.get('/api/v1/invoicing/clients' + getters.invoiceSorting.URI)
.then(response => {
commit('LOADING_STATE', {loading: false, data: response.data})
})
@@ -78,7 +78,7 @@ const actions = {
commit('CHANGE_SEARCHING_STATE', true)
axios
.get('/api/invoices/search', {
.get('/api/v1/invoicing/invoices/search', {
params: {
query: query,
type: getters.currentFolder.location,
@@ -94,7 +94,7 @@ const actions = {
commit('CHANGE_SEARCHING_STATE', true)
axios
.get('/api/clients/search', {
.get('/api/v1/invoicing/clients/search', {
params: {query: query}
})
.then(response => {

View File

@@ -152,8 +152,6 @@
display: flex;
align-items: center;
cursor: pointer;
padding-bottom: 10px;
padding-top: 15px;
.avatar {
margin-right: 20px;

4
webpack.mix.js vendored
View File

@@ -34,12 +34,12 @@ mix.js('resources/js/main.js', 'public/js')
clientLogLevel: 'none'
}
})
/*.options({
.options({
hmrOptions: {
host: '192.168.1.198',
port: '8080'
},
})*/
})
.disableNotifications();
if (mix.inProduction()) {