Merge branch 'master' of https://github.com/brkcvn/akaunting into code-clean
This commit is contained in:
4
resources/assets/js/mixins/global.js
vendored
4
resources/assets/js/mixins/global.js
vendored
@@ -710,9 +710,9 @@ export default {
|
||||
Promise.resolve(window.axios.get(url))
|
||||
.then(response => {
|
||||
if (response.data.success) {
|
||||
modal.title = response.data.title;
|
||||
modal.title = response.data.data.title;
|
||||
modal.html = response.data.html;
|
||||
modal.buttons = response.data.buttons;
|
||||
modal.buttons = response.data.data.buttons;
|
||||
|
||||
this.component = Vue.component('add-new-component', (resolve, reject) => {
|
||||
resolve({
|
||||
|
||||
@@ -12,7 +12,15 @@
|
||||
<div class="flex flex-col justify-between">
|
||||
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5 menu-scroll gap-10">
|
||||
<div class="sm:col-span-6">
|
||||
<base-input not-required :label="translations.company.api_key" name="api_key" data-name="api_key" :placeholder="translations.company.api_key" v-model="company.api_key"/>
|
||||
<base-input
|
||||
not-required
|
||||
:label="translations.company.api_key"
|
||||
name="api_key"
|
||||
data-name="api_key"
|
||||
:placeholder="translations.company.api_key"
|
||||
v-model="company.api_key"
|
||||
:error="onFailErrorGet('api_key')"
|
||||
/>
|
||||
|
||||
<div class="mt-2">
|
||||
<small>
|
||||
@@ -23,30 +31,45 @@
|
||||
</div>
|
||||
|
||||
<div class="sm:col-span-3">
|
||||
<base-input not-required type="text" :label="translations.company.tax_number" name="tax_number" data-name="tax_number" :placeholder="translations.company.tax_number" v-model="company.tax_number"/>
|
||||
<base-input
|
||||
not-required
|
||||
type="text"
|
||||
:label="translations.company.tax_number"
|
||||
name="tax_number"
|
||||
data-name="tax_number"
|
||||
:placeholder="translations.company.tax_number"
|
||||
v-model="company.tax_number"
|
||||
:error="onFailErrorGet('tax_number')"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="sm:col-span-3">
|
||||
<akaunting-date not-required :title="translations.company.financial_start" data-name="financial_start" :placeholder="translations.company.financial_start" icon="calendar_today"
|
||||
<akaunting-date
|
||||
not-required
|
||||
:title="translations.company.financial_start"
|
||||
data-name="financial_start"
|
||||
:placeholder="translations.company.financial_start"
|
||||
icon="calendar_today"
|
||||
:date-config="{
|
||||
dateFormat: 'd-m',
|
||||
allowInput: false,
|
||||
altInput: true,
|
||||
altFormat: 'j F'
|
||||
dateFormat: 'd-m',
|
||||
allowInput: false,
|
||||
altInput: true,
|
||||
altFormat: 'j F'
|
||||
}"
|
||||
v-model="company.financial_start"
|
||||
:form-error="onFailErrorGet('financial_start')"
|
||||
></akaunting-date>
|
||||
</div>
|
||||
|
||||
<div class="sm:col-span-3 grid gap-10">
|
||||
<div class="sm:col-span-3">
|
||||
<base-input not-required :label="translations.company.address">
|
||||
<base-input not-required :label="translations.company.address" :error="onFailErrorGet('address')">
|
||||
<textarea class="w-full text-sm px-3 py-2.5 mt-1 rounded-lg border border-light-gray text-black placeholder-light-gray bg-white disabled:bg-gray-200 focus:outline-none focus:ring-transparent focus:border-purple" name="address" data-name="address" rows="3" :placeholder="translations.company.address" v-model="company.address"></textarea>
|
||||
</base-input>
|
||||
</div>
|
||||
|
||||
<div class="sm:col-span-3">
|
||||
<base-input not-required :label="translations.company.country">
|
||||
<base-input not-required :label="translations.company.country" :error="onFailErrorGet('country')">
|
||||
<el-select v-model="company.country" filterable>
|
||||
<el-option
|
||||
v-for="(country, index) in sortedCountries"
|
||||
@@ -63,24 +86,31 @@
|
||||
</div>
|
||||
|
||||
<div class="sm:col-span-3">
|
||||
<label class="text-black text-sm font-medium">{{ translations.company.logo }}</label>
|
||||
<label class="text-black text-sm font-medium">
|
||||
{{ translations.company.logo }}
|
||||
</label>
|
||||
|
||||
<akaunting-dropzone-file-upload ref="dropzoneWizard" class="form-file dropzone-column w-2/5" style="height:12.2rem" preview-classes="single" :attachments="logo" :v-model="logo">
|
||||
</akaunting-dropzone-file-upload>
|
||||
|
||||
<div v-if="onFailErrorGet('logo')" class="text-red text-sm mt-1 block" v-html="onFailErrorGet('logo')"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-center mt-5 gap-x-10">
|
||||
<base-button class="w-1/2 flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100" @click="next()">{{ translations.company.skip }}</base-button>
|
||||
<base-button class="w-1/2 flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100" @click="next()">
|
||||
{{ translations.company.skip }}
|
||||
</base-button>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
id="button"
|
||||
:disabled="button_loading"
|
||||
:disabled="button_loading_company"
|
||||
class="w-1/2 relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
|
||||
@click="onEditSave($event)"
|
||||
>
|
||||
<i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading}]">
|
||||
<i v-if="button_loading_company" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading_company}]">
|
||||
{{ translations.company.save }}
|
||||
</span>
|
||||
</button>
|
||||
@@ -156,6 +186,7 @@ export default {
|
||||
real_date: "",
|
||||
lang_data: '',
|
||||
sorted_countries: [],
|
||||
button_loading_company: false
|
||||
};
|
||||
},
|
||||
|
||||
@@ -250,6 +281,7 @@ export default {
|
||||
size: company.logo.size,
|
||||
downloadPath: false,
|
||||
}];
|
||||
|
||||
this.logo.push(logo_arr);
|
||||
}
|
||||
}
|
||||
@@ -257,6 +289,8 @@ export default {
|
||||
|
||||
onEditSave(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.button_loading_company = true;
|
||||
|
||||
FormData.prototype.appendRecursive = function (data, wrapper = null) {
|
||||
for (var name in data) {
|
||||
@@ -331,8 +365,11 @@ export default {
|
||||
this.onSuccessMessage(response);
|
||||
|
||||
this.$router.push("/wizard/currencies");
|
||||
this.button_loading_company = false;
|
||||
}, this)
|
||||
.catch((error) => {
|
||||
this.onFailError(error);
|
||||
this.button_loading_company = false;
|
||||
}, this);
|
||||
},
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
<td class="w-full p-0 current-tab" v-if="current_tab == index">
|
||||
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 py-3">
|
||||
<base-input name="name" data-name="name"
|
||||
form-classes="sm:col-span-2"
|
||||
v-model="model.name"
|
||||
:error="onFailErrorGet('name')"
|
||||
form-classes="sm:col-span-2"
|
||||
v-model="model.name"
|
||||
:error="onFailErrorGet('name')"
|
||||
/>
|
||||
|
||||
<base-input class="sm:col-span-2" :error="onFailErrorGet('code')">
|
||||
@@ -79,9 +79,9 @@
|
||||
</base-input>
|
||||
|
||||
<base-input name="rate" data-name="rate" :placeholder="translations.currencies.rate"
|
||||
form-classes="sm:col-span-2"
|
||||
v-model="model.rate"
|
||||
:error="onFailErrorGet('rate')"
|
||||
form-classes="sm:col-span-2"
|
||||
v-model="model.rate"
|
||||
:error="onFailErrorGet('rate')"
|
||||
/>
|
||||
|
||||
<div class="flex justify-end items-center sm:col-span-6">
|
||||
|
||||
@@ -15,23 +15,28 @@
|
||||
<h1 class="sm:col-span-6 text-black-300 mb-2">
|
||||
{{ translations.finish.recommended_apps }}
|
||||
</h1>
|
||||
|
||||
<div v-for="(item, index) in modules" :key="index" class="sm:col-span-6 mb-6">
|
||||
<a :href="route_url + '/apps/' + item.slug" class="flex items-center">
|
||||
<div class="w-1/4">
|
||||
<img v-for="(file, indis) in item.files" :key="indis" v-if="file.media_type == 'image' && file.pivot.zone == 'thumbnail'"
|
||||
:src="file.path_string"
|
||||
:alt="item.name"
|
||||
class="rounded-lg object-cover"
|
||||
:src="file.path_string"
|
||||
:alt="item.name"
|
||||
class="rounded-lg object-cover"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="w-3/4 ltr:pl-8 rtl:pr-8">
|
||||
<span class="font-medium">{{ item.name }}</span>
|
||||
<div class="text-black-300 text-sm my-2 line-clamp-2 h-10"
|
||||
v-html="item.description"></div>
|
||||
<span class="font-medium">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
|
||||
<div class="text-black-300 text-sm my-2 line-clamp-2 h-10" v-html="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lg:hidden">
|
||||
<base-button class="btn flex items-center justify-center text-base disabled:opacity-50 relative mt-5 mx-auto bg-green hover:bg-gray-100 text-white rounded-md py-3 px-5 font-semibold" @click="finish()">
|
||||
{{ translations.finish.create_first_invoice }}
|
||||
@@ -44,14 +49,16 @@
|
||||
<div class="w-48 text-white rtl:float-left rtl:text-left text-2xl font-semibold leading-9">
|
||||
{{ translations.finish.apps_managing }}
|
||||
</div>
|
||||
|
||||
<div style="width:372px; height:372px;"></div>
|
||||
|
||||
<img :src="image_src" class="absolute top-0 right-2" alt="" />
|
||||
</div>
|
||||
|
||||
<base-button class="flex items-center justify-center text-base rounded-lg disabled:opacity-50 relative m-auto bottom-48 bg-white hover:bg-gray-100 text-purple rounded-md py-3 px-5 font-semibold btn-default" @click="finish()">
|
||||
{{ translations.finish.create_first_invoice }}
|
||||
</base-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,9 +130,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@media only screen and (max-width: 991px) {
|
||||
[modal-container] {
|
||||
height: 100% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 991px) {
|
||||
[modal-container] {
|
||||
height: 100% !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,72 +1,88 @@
|
||||
<template>
|
||||
<div>
|
||||
<nav aria-label="Progress">
|
||||
<ol role="list" class="flex mb-10">
|
||||
<li class="w-1/4">
|
||||
<span class="pr-6 flex flex-col">
|
||||
<span
|
||||
:class="[{'bg-purple': active_state > 0}, {'bg-purple': active_state == 0}]"
|
||||
class="w-full h-1 bg-gray-300 rounded-xl text-transparent">Text</span>
|
||||
<span :class="[{'font-bold': active_state == 0}, {'font-bold': active_state > 0}]" class="text-sm font-normal mt-2">{{ translations.company.title }}</span>
|
||||
</span>
|
||||
</li>
|
||||
<div>
|
||||
<nav aria-label="Progress">
|
||||
<ol role="list" class="flex mb-10">
|
||||
<li class="w-1/4">
|
||||
<span class="pr-6 flex flex-col">
|
||||
<span
|
||||
:class="[{'bg-purple': active_state > 0}, {'bg-purple': active_state == 0}]"
|
||||
class="w-full h-1 bg-gray-300 rounded-xl text-transparent"
|
||||
>Text</span>
|
||||
|
||||
<li class="w-1/4">
|
||||
<span class="px-3 flex flex-col">
|
||||
<span
|
||||
:class="[{'bg-purple': active_state > 1}, {'bg-purple': active_state == 1}]"
|
||||
class="w-full h-1 bg-gray-300 rounded-xl text-transparent">Text</span>
|
||||
<span :class="[{'font-bold': active_state == 1}, {'font-bold': active_state > 1}]" class="text-sm font-normal mt-2">{{ translations.currencies.title }}</span>
|
||||
</span>
|
||||
</li>
|
||||
<span :class="[{'font-bold': active_state == 0}, {'font-bold': active_state > 0}]" class="text-sm font-normal mt-2">
|
||||
{{ translations.company.title }}
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li class="w-1/4">
|
||||
<span class="px-3 flex flex-col">
|
||||
<span
|
||||
:class="[{'bg-purple': active_state > 2}, {'bg-purple': active_state == 2}]"
|
||||
class="w-full h-1 bg-gray-300 rounded-xl text-transparent">Text</span>
|
||||
<span :class="[{'font-bold': active_state == 2}, {'font-bold': active_state > 2}]" class="text-sm font-normal mt-2">{{ translations.taxes.title }}</span>
|
||||
</span>
|
||||
</li>
|
||||
<li class="w-1/4">
|
||||
<span class="px-3 flex flex-col">
|
||||
<span
|
||||
:class="[{'bg-purple': active_state > 1}, {'bg-purple': active_state == 1}]"
|
||||
class="w-full h-1 bg-gray-300 rounded-xl text-transparent"
|
||||
>Text</span>
|
||||
|
||||
<li class="w-1/4">
|
||||
<span class="pl-6 flex flex-col">
|
||||
<span
|
||||
:class="[{'bg-purple': active_state == 3}]"
|
||||
class="w-full h-1 bg-gray-300 rounded-xl text-transparent">Text</span>
|
||||
<span :class="[{'font-bold': active_state == 3}]" class="text-sm font-normal mt-2">{{ translations.finish.title }}</span>
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
<span :class="[{'font-bold': active_state == 1}, {'font-bold': active_state > 1}]" class="text-sm font-normal mt-2">
|
||||
{{ translations.currencies.title }}
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li class="w-1/4">
|
||||
<span class="px-3 flex flex-col">
|
||||
<span
|
||||
:class="[{'bg-purple': active_state > 2}, {'bg-purple': active_state == 2}]"
|
||||
class="w-full h-1 bg-gray-300 rounded-xl text-transparent"
|
||||
>Text</span>
|
||||
|
||||
<span :class="[{'font-bold': active_state == 2}, {'font-bold': active_state > 2}]" class="text-sm font-normal mt-2">
|
||||
{{ translations.taxes.title }}
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li class="w-1/4">
|
||||
<span class="pl-6 flex flex-col">
|
||||
<span
|
||||
:class="[{'bg-purple': active_state == 3}]"
|
||||
class="w-full h-1 bg-gray-300 rounded-xl text-transparent"
|
||||
>Text</span>
|
||||
|
||||
<span :class="[{'font-bold': active_state == 3}]" class="text-sm font-normal mt-2">
|
||||
{{ translations.finish.title }}
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Steps",
|
||||
export default {
|
||||
name: "Steps",
|
||||
|
||||
components: {},
|
||||
components: {},
|
||||
|
||||
props: {
|
||||
active_state: {
|
||||
type: [Boolean, String, Number],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
active_state: {
|
||||
type: [Boolean, String, Number],
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.translations = wizard_translations;
|
||||
},
|
||||
created() {
|
||||
this.translations = wizard_translations;
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
translations: {
|
||||
company: {},
|
||||
currencies: {},
|
||||
taxes: {},
|
||||
finish: {},
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
data() {
|
||||
return {
|
||||
translations: {
|
||||
company: {},
|
||||
currencies: {},
|
||||
taxes: {},
|
||||
finish: {},
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -87,6 +87,13 @@ L\'actualització de :alias des de :current_version a :new_version ha fallat al
|
||||
|
||||
],
|
||||
|
||||
'import_failed' => [
|
||||
|
||||
'subject' => 'Ha fallat la importació',
|
||||
'description' => 'No s\'ha pogut importar l\'arxiu per vàries raons. Pots mirar el teu correu per tenir-ne més detalls.',
|
||||
|
||||
],
|
||||
|
||||
'new_apps' => [
|
||||
|
||||
'title' => 'Nova App',
|
||||
|
||||
@@ -2,27 +2,36 @@
|
||||
<div class="flex items-center">
|
||||
@if ($file->aggregate_type == 'image')
|
||||
<span class="material-icons text-base">image</span>
|
||||
@else
|
||||
<span class="material-icons text-base">attach_file</span>
|
||||
@else
|
||||
<span class="material-icons text-base">attach_file</span>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-col text-gray-500 ltr:ml-3 rtl:mr-3 gap-y-1">
|
||||
<span class="w-64 text-sm truncate">{{ $file->basename }}</span>
|
||||
<span class="text-xs mb-0">{{ $file->readableSize() }}</span>
|
||||
<span class="w-64 text-sm truncate">
|
||||
{{ $file->basename }}
|
||||
</span>
|
||||
|
||||
<span class="text-xs mb-0">
|
||||
{{ $file->readableSize() }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row lg:flex-col gap-x-1">
|
||||
@can('delete-common-uploads')
|
||||
<x-link href="javascript:void();" id="remove-{{ $column_name }}" @click="onDeleteFile('{{ $file->id }}', '{{ route('uploads.destroy', $file->id) }}', '{{ trans('general.title.delete', ['type' => $column_name]) }}', '{{ trans('general.delete_confirm', ['name' => $file->basename, 'type' => $column_name]) }} ', '{{ trans('general.cancel') }}', '{{ trans('general.delete') }}')" type="button" class="group" override="class">
|
||||
<span class="material-icons text-base text-red px-1.5 py-1 rounded-lg group-hover:bg-gray-100">delete</span>
|
||||
</x-link>
|
||||
</x-link>
|
||||
|
||||
@if ($options)
|
||||
<input type="hidden" name="page_{{ $file->id}}" id="file-page-{{ $file->id}}" value="{{ $options['page'] }}" />
|
||||
<input type="hidden" name="key_{{ $file->id}}" id="file-key-{{ $file->id}}" value="{{ $options['key'] }}" />
|
||||
<input type="hidden" name="value_{{ $file->id}}" id="file-value-{{ $file->id}}" value="{{ $file->id }}" />
|
||||
@endif
|
||||
<x-link href="{{ route('uploads.download', $file->id) }}" type="button" class="group" override="class">
|
||||
<span class="material-icons text-base text-purple px-1.5 py-1 rounded-lg group-hover:bg-gray-100">download</span>
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
<x-link href="{{ route('uploads.download', $file->id) }}" type="button" class="group" override="class">
|
||||
<span class="material-icons text-base text-purple px-1.5 py-1 rounded-lg group-hover:bg-gray-100">download</span>
|
||||
</x-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user