master branch merge

This commit is contained in:
Cüneyt Şentürk
2020-05-29 14:04:34 +03:00
224 changed files with 3473 additions and 1549 deletions

View File

@@ -79,10 +79,17 @@ const app = new Vue({
}
});
cleared_amount = parseFloat(this.form.opening_balance) + parseFloat(income_total - expense_total);
let transaction_total = income_total - expense_total;
cleared_amount = parseFloat(this.form.opening_balance) + transaction_total;
}
difference = parseFloat(this.form.closing_balance) - cleared_amount;
if (cleared_amount > 0) {
difference = parseFloat(this.form.closing_balance) - parseFloat(cleared_amount);
} else {
difference = parseFloat(this.form.closing_balance) + parseFloat(cleared_amount);
}
if (difference != 0) {
this.difference = 'table-danger';
@@ -92,7 +99,7 @@ const app = new Vue({
this.reconcile = false;
}
this.totals.cleared_amount = cleared_amount;
this.totals.cleared_amount = parseFloat(cleared_amount);
this.totals.difference = difference;
},

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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) {