Merge branch 'master' of github.com:akaunting/akaunting
# Conflicts: # resources/views/banking/reconciliations/create.blade.php
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
{'disabled': disabled},
|
||||
formClasses
|
||||
]"
|
||||
:error="formError"
|
||||
:footer-error="formError"
|
||||
:prependIcon="icon"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
|
@ -1,42 +1,45 @@
|
||||
<template>
|
||||
<SlideYUpTransition :duration="animationDuration">
|
||||
<div class="modal fade"
|
||||
@click.self="closeModal"
|
||||
:class="[{'show d-block': show}, {'d-none': !show}]"
|
||||
v-show="show"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
:aria-hidden="!show">
|
||||
<div class="modal-dialog">
|
||||
<slot name="modal-content">
|
||||
<div class="modal-content">
|
||||
<div class="card-header pb-2">
|
||||
<slot name="card-header">
|
||||
<h4 class="float-left"> {{ title }} </h4>
|
||||
<button type="button" class="close" @click="onCancel" aria-hidden="true">×</button>
|
||||
</slot>
|
||||
</div>
|
||||
<slot name="modal-body">
|
||||
<div class="modal-body" v-html="message">
|
||||
<div class="modal fade"
|
||||
@click.self="closeModal"
|
||||
:class="[{'show d-block': show}, {'d-none': !show}]"
|
||||
v-show="show"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
:aria-hidden="!show">
|
||||
<div class="modal-dialog" :class="modalDialogClass">
|
||||
<slot name="modal-content">
|
||||
<div class="modal-content">
|
||||
<div class="card-header pb-2">
|
||||
<slot name="card-header">
|
||||
<h4 class="float-left"> {{ title }} </h4>
|
||||
|
||||
<button type="button" class="close" @click="onCancel" aria-hidden="true">×</button>
|
||||
</slot>
|
||||
</div>
|
||||
|
||||
<slot name="modal-body">
|
||||
<div class="modal-body" v-html="message">
|
||||
</div>
|
||||
</slot>
|
||||
|
||||
<div class="card-footer border-top-0 pt-0">
|
||||
<slot name="card-footer">
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-outline-secondary" @click="onCancel">
|
||||
{{ button_cancel }}
|
||||
</button>
|
||||
|
||||
<button :disabled="form.loading" type="button" class="btn btn-danger button-submit" @click="onConfirm">
|
||||
<div class="aka-loader"></div><span>{{ button_delete }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</slot>
|
||||
<div class="card-footer border-top-0 pt-0">
|
||||
<slot name="card-footer">
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-outline-secondary" @click="onCancel">
|
||||
{{ button_cancel }}
|
||||
</button>
|
||||
|
||||
<button :disabled="form.loading" type="button" class="btn btn-danger button-submit" @click="onConfirm">
|
||||
<div class="aka-loader"></div><span>{{ button_delete }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</SlideYUpTransition>
|
||||
</template>
|
||||
|
||||
@ -60,6 +63,11 @@ export default {
|
||||
|
||||
props: {
|
||||
show: Boolean,
|
||||
modalDialogClass: {
|
||||
type: String,
|
||||
default: '',
|
||||
description: "Modal Body size Class"
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
@ -145,4 +153,8 @@ export default {
|
||||
.modal.show {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.modal-md {
|
||||
max-width: 650px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,46 +1,48 @@
|
||||
<template>
|
||||
<SlideYUpTransition :duration="animationDuration">
|
||||
<div class="modal modal-add-new fade"
|
||||
@click.self="closeModal"
|
||||
:class="[{'show d-block': show}, {'d-none': !show}]"
|
||||
v-show="show"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
:aria-hidden="!show">
|
||||
<div class="modal-dialog" :class="modalDialogClass">
|
||||
<slot name="modal-content">
|
||||
<div class="modal-content">
|
||||
<div class="card-header pb-2">
|
||||
<slot name="card-header">
|
||||
<h4 class="float-left"> {{ title }} </h4>
|
||||
<button type="button" class="close" @click="onCancel" aria-hidden="true">×</button>
|
||||
</slot>
|
||||
</div>
|
||||
<slot name="modal-body">
|
||||
<div class="modal-body pb-0" v-if="!is_component" v-html="message">
|
||||
</div>
|
||||
<div class="modal-body pb-0" v-else>
|
||||
<form id="form-create" method="POST" action="#"/>
|
||||
<component v-bind:is="component"></component>
|
||||
<div class="modal modal-add-new fade"
|
||||
@click.self="closeModal"
|
||||
:class="[{'show d-block': show}, {'d-none': !show}]"
|
||||
v-show="show"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
:aria-hidden="!show">
|
||||
<div class="modal-dialog" :class="modalDialogClass">
|
||||
<slot name="modal-content">
|
||||
<div class="modal-content">
|
||||
<div class="card-header pb-2">
|
||||
<slot name="card-header">
|
||||
<h4 class="float-left"> {{ title }} </h4>
|
||||
<button type="button" class="close" @click="onCancel" aria-hidden="true">×</button>
|
||||
</slot>
|
||||
</div>
|
||||
|
||||
<slot name="modal-body">
|
||||
<div class="modal-body pb-0" v-if="!is_component" v-html="message">
|
||||
</div>
|
||||
<div class="modal-body pb-0" v-else>
|
||||
<form id="form-create" method="POST" action="#"/>
|
||||
<component v-bind:is="component"></component>
|
||||
</div>
|
||||
</slot>
|
||||
|
||||
<div class="card-footer border-top-0 pt-0">
|
||||
<slot name="card-footer">
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-outline-secondary" :class="buttons.cancel.class" @click="onCancel">
|
||||
{{ buttons.cancel.text }}
|
||||
</button>
|
||||
|
||||
<button :disabled="form.loading" type="button" class="btn button-submit" :class="buttons.confirm.class" @click="onSubmit">
|
||||
<div class="aka-loader"></div><span>{{ buttons.confirm.text }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</slot>
|
||||
<div class="card-footer border-top-0 pt-0">
|
||||
<slot name="card-footer">
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-outline-secondary" :class="buttons.cancel.class" @click="onCancel">
|
||||
{{ buttons.cancel.text }}
|
||||
</button>
|
||||
|
||||
<button :disabled="form.loading" type="button" class="btn button-submit" :class="buttons.confirm.class" @click="onSubmit">
|
||||
<div class="aka-loader"></div><span>{{ buttons.confirm.text }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</SlideYUpTransition>
|
||||
</template>
|
||||
|
||||
@ -262,4 +264,8 @@ export default {
|
||||
.modal.show {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.modal-md {
|
||||
max-width: 650px;
|
||||
}
|
||||
</style>
|
||||
|
@ -126,6 +126,8 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
//this.model = this.value;
|
||||
|
||||
this.$emit('interface', this.model);
|
||||
},
|
||||
|
||||
@ -136,6 +138,7 @@ export default {
|
||||
|
||||
this.$emit('input', this.model);
|
||||
},
|
||||
|
||||
input(event) {
|
||||
this.model = event;
|
||||
|
||||
@ -161,9 +164,11 @@ export default {
|
||||
masked: this.masked
|
||||
};
|
||||
},
|
||||
|
||||
value: function (value) {
|
||||
this.model = value;
|
||||
},
|
||||
|
||||
model: function (model) {
|
||||
this.$emit('change', this.model);
|
||||
this.$emit('interface', this.model);
|
||||
|
@ -1127,6 +1127,10 @@ export default {
|
||||
this.$emit('new', response.data.data);
|
||||
|
||||
this.change();
|
||||
|
||||
let documentClasses = document.body.classList;
|
||||
|
||||
documentClasses.remove("modal-open");
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@ -1142,6 +1146,10 @@ export default {
|
||||
this.add_new.show = false;
|
||||
this.add_new.html = null;
|
||||
this.add_new_html = null;
|
||||
|
||||
let documentClasses = document.body.classList;
|
||||
|
||||
documentClasses.remove("modal-open");
|
||||
},
|
||||
|
||||
addModal() {
|
||||
|
@ -825,6 +825,10 @@ export default {
|
||||
this.$emit('new', response.data.data);
|
||||
|
||||
this.change();
|
||||
|
||||
let documentClasses = document.body.classList;
|
||||
|
||||
documentClasses.remove("modal-open");
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@ -840,6 +844,10 @@ export default {
|
||||
this.add_new.show = false;
|
||||
this.add_new.html = null;
|
||||
this.add_new_html = null;
|
||||
|
||||
let documentClasses = document.body.classList;
|
||||
|
||||
documentClasses.remove("modal-open");
|
||||
},
|
||||
|
||||
addModal() {
|
||||
|
@ -52,6 +52,11 @@
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
<slot name="error">
|
||||
<div v-if="footerError" class="invalid-feedback d-block"
|
||||
v-html="footerError">
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -84,6 +89,10 @@
|
||||
type: String,
|
||||
description: "Input error (below input)"
|
||||
},
|
||||
footerError: {
|
||||
type: String,
|
||||
description: "Input error (below input)"
|
||||
},
|
||||
successMessage: {
|
||||
type: String,
|
||||
description: "Input success message",
|
||||
|
4
resources/assets/js/mixins/global.js
vendored
4
resources/assets/js/mixins/global.js
vendored
@ -184,10 +184,10 @@ export default {
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.currency = response.data;
|
||||
|
||||
this.form.currency_code = response.data.currency_code;
|
||||
this.form.currency_rate = response.data.currency_rate;
|
||||
|
||||
this.currency = response.data;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
|
33
resources/assets/js/views/install/update.js
vendored
33
resources/assets/js/views/install/update.js
vendored
@ -57,9 +57,10 @@ const app = new Vue({
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChangelog() {
|
||||
axios.get(url + '/install/updates/changelog')
|
||||
.then(response => {
|
||||
async onChangelog() {
|
||||
let changelog_promise = Promise.resolve(axios.get(url + '/install/updates/changelog'));
|
||||
|
||||
changelog_promise.then(response => {
|
||||
this.changelog.show = true;
|
||||
this.changelog.html = response.data;
|
||||
})
|
||||
@ -71,14 +72,15 @@ const app = new Vue({
|
||||
});
|
||||
},
|
||||
|
||||
steps() {
|
||||
async steps() {
|
||||
let name = document.getElementById('name').value;
|
||||
|
||||
axios.post(url + '/install/updates/steps', {
|
||||
let steps_promise = Promise.resolve(axios.post(url + '/install/updates/steps', {
|
||||
name: name,
|
||||
version: version
|
||||
})
|
||||
.then(response => {
|
||||
}));
|
||||
|
||||
steps_promise.then(response => {
|
||||
if (response.data.error) {
|
||||
this.update.status = 'exception';
|
||||
this.update.html = '<div class="text-danger">' + response.data.message + '</div>';
|
||||
@ -96,7 +98,7 @@ const app = new Vue({
|
||||
});
|
||||
},
|
||||
|
||||
next() {
|
||||
async next() {
|
||||
let data = this.update.steps.shift();
|
||||
|
||||
let name = document.getElementById('name').value;
|
||||
@ -105,18 +107,19 @@ const app = new Vue({
|
||||
let installed = document.getElementById('installed').value;
|
||||
|
||||
if (data) {
|
||||
this.update.total = (100 - ((this.update.steps.length / this.update.steps_total) * 100)).toFixed(0);
|
||||
this.update.total = parseInt((100 - ((this.update.steps.length / this.update.steps_total) * 100)).toFixed(0));
|
||||
|
||||
this.update.html = '<span class="text-default"><i class="fa fa-spinner fa-spin update-spin"></i> ' + data['text'] + '</span> </br>';
|
||||
|
||||
axios.post(data.url, {
|
||||
let step_promise = Promise.resolve(axios.post(data.url, {
|
||||
name: name,
|
||||
alias: alias,
|
||||
version: version,
|
||||
installed: installed,
|
||||
path: this.update.path,
|
||||
})
|
||||
.then(response => {
|
||||
}));
|
||||
|
||||
step_promise.then(response => {
|
||||
if (response.data.error) {
|
||||
this.update.status = 'exception';
|
||||
this.update.html = '<div class="text-danger"><i class="fa fa-times update-error"></i> ' + response.data.message + '</div>';
|
||||
@ -131,11 +134,9 @@ const app = new Vue({
|
||||
}
|
||||
|
||||
if (!response.data.error && !response.data.redirect) {
|
||||
let self = this;
|
||||
|
||||
setTimeout(function() {
|
||||
self.next();
|
||||
}, 800);
|
||||
this.next();
|
||||
}.bind(this), 800);
|
||||
}
|
||||
|
||||
if (response.data.redirect) {
|
||||
|
2
resources/assets/js/views/modules/apps.js
vendored
2
resources/assets/js/views/modules/apps.js
vendored
@ -34,7 +34,7 @@ const app = new Vue({
|
||||
onChangeCategory(category) {
|
||||
let path = document.getElementById('category_page').value;
|
||||
|
||||
if (category) {
|
||||
if (category != '*') {
|
||||
path += '/' + encodeURIComponent(category);
|
||||
} else {
|
||||
path = app_home;
|
||||
|
57
resources/assets/js/views/modules/item.js
vendored
57
resources/assets/js/views/modules/item.js
vendored
@ -32,12 +32,19 @@ const app = new Vue({
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.onGetReviews('', 1);
|
||||
this.onReviews(1);
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
reviews: '',
|
||||
reviews: {
|
||||
status: false,
|
||||
html: '',
|
||||
pagination: {
|
||||
current_page: 1,
|
||||
last_page: 1
|
||||
}
|
||||
},
|
||||
faq: false,
|
||||
installation: {
|
||||
show: false,
|
||||
@ -56,7 +63,7 @@ const app = new Vue({
|
||||
onChangeCategory(category) {
|
||||
let path = document.getElementById('category_page').value;
|
||||
|
||||
if (category) {
|
||||
if (category != '*') {
|
||||
path += '/' + encodeURIComponent(category);
|
||||
} else {
|
||||
path = app_home;
|
||||
@ -65,13 +72,19 @@ const app = new Vue({
|
||||
location = path;
|
||||
},
|
||||
|
||||
onGetReviews (path, page) {
|
||||
axios.post(url + '/apps/' + app_slug + '/reviews', {
|
||||
patth: path,
|
||||
async onReviews(page) {
|
||||
let reviews_promise = Promise.resolve(window.axios.post(url + '/apps/' + app_slug + '/reviews', {
|
||||
page: page
|
||||
})
|
||||
.then(response => {
|
||||
this.reviews = response.data.html;
|
||||
}));
|
||||
|
||||
reviews_promise.then(response => {
|
||||
if (response.data.success) {
|
||||
this.reviews.status= true;
|
||||
this.reviews.html = response.data.html;
|
||||
|
||||
this.reviews.pagination.current_page = page;
|
||||
this.reviews.pagination.last_page = response.data.data.last_page;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
@ -81,17 +94,18 @@ const app = new Vue({
|
||||
this.faq = true;
|
||||
},
|
||||
|
||||
onInstall(path, name, version) {
|
||||
async onInstall(path, name, version) {
|
||||
this.installation.show = true;
|
||||
this.installation.total = 0;
|
||||
this.installation.path = path;
|
||||
this.installation.version = version;
|
||||
|
||||
axios.post(url + '/apps/steps', {
|
||||
let steps_promise = Promise.resolve(axios.post(url + '/apps/steps', {
|
||||
name: name,
|
||||
version: version
|
||||
})
|
||||
.then(response => {
|
||||
}));
|
||||
|
||||
steps_promise.then(response => {
|
||||
if (response.data.error) {
|
||||
this.installation.status = 'exception';
|
||||
this.installation.html = '<div class="text-danger">' + response.data.message + '</div>';
|
||||
@ -109,19 +123,20 @@ const app = new Vue({
|
||||
});
|
||||
},
|
||||
|
||||
next() {
|
||||
async next() {
|
||||
let data = this.installation.steps.shift();
|
||||
|
||||
if (data) {
|
||||
this.installation.total = (100 - ((this.installation.steps.length / this.installation.steps_total) * 100)).toFixed(0);
|
||||
this.installation.total = parseInt((100 - ((this.installation.steps.length / this.installation.steps_total) * 100)).toFixed(0));
|
||||
|
||||
this.installation.html = '<span class="text-default"><i class="fa fa-spinner fa-spin update-spin"></i> ' + data['text'] + '</span> </br>';
|
||||
|
||||
axios.post(data.url, {
|
||||
let step_promise = Promise.resolve(axios.post(data.url, {
|
||||
version: this.installation.version,
|
||||
path: this.installation.path,
|
||||
})
|
||||
.then(response => {
|
||||
}));
|
||||
|
||||
step_promise.then(response => {
|
||||
if (response.data.error) {
|
||||
this.installation.status = 'exception';
|
||||
this.installation.html = '<div class="text-danger"><i class="fa fa-times update-error"></i> ' + response.data.message + '</div>';
|
||||
@ -136,11 +151,9 @@ const app = new Vue({
|
||||
}
|
||||
|
||||
if (!response.data.error && !response.data.redirect) {
|
||||
let self = this;
|
||||
|
||||
setTimeout(function() {
|
||||
self.next();
|
||||
}, 800);
|
||||
this.next();
|
||||
}.bind(this), 800);
|
||||
}
|
||||
|
||||
if (response.data.redirect) {
|
||||
|
Reference in New Issue
Block a user