akaunting 3.0 (the last dance)
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
@ -10,11 +9,14 @@ require('./../../bootstrap');
|
||||
import Vue from 'vue';
|
||||
|
||||
import DashboardPlugin from './../../plugins/dashboard-plugin';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
import Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import CardForm from './../../components/CreditCard/CardForm';
|
||||
import Swiper, { Navigation, Pagination } from 'swiper';
|
||||
|
||||
Swiper.use([Navigation, Pagination]);
|
||||
|
||||
// plugin setup
|
||||
Vue.use(DashboardPlugin);
|
||||
@ -30,9 +32,22 @@ const app = new Vue({
|
||||
CardForm
|
||||
},
|
||||
|
||||
data: function () {
|
||||
data: function() {
|
||||
return {
|
||||
form: new Form('invoice-payment'),
|
||||
form: new Form('portal'),
|
||||
bulk_action: new BulkAction('portal'),
|
||||
|
||||
// for profile
|
||||
show_password: false,
|
||||
|
||||
// for payments
|
||||
connect: {
|
||||
show: false,
|
||||
currency: {},
|
||||
documents: [],
|
||||
},
|
||||
|
||||
// for invoices
|
||||
redirectForm: new Form('redirect-form'),
|
||||
method_show_html: '',
|
||||
formData: {
|
||||
@ -43,13 +58,65 @@ const app = new Vue({
|
||||
cardCvv: '',
|
||||
storeCard: false,
|
||||
card_id: 0,
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
mounted() {
|
||||
if (typeof this.form.password !== 'undefined') {
|
||||
this.form.password = '';
|
||||
}
|
||||
|
||||
new Swiper(".swiper-links", {
|
||||
loop: false,
|
||||
slidesPerView: 3,
|
||||
pagination: {
|
||||
el: ".swiper-pagination",
|
||||
clickable: true
|
||||
},
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev",
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
// for profile
|
||||
onChangePassword(event) {
|
||||
if (this.show_password == false) {
|
||||
event.target.closest('.grid-rows-4').classList.replace('grid-rows-4', 'grid-rows-5');
|
||||
event.target.closest('.grid-rows-5').nextElementSibling.classList.replace('grid-rows-4', 'grid-rows-5');
|
||||
|
||||
this.show_password = true;
|
||||
} else {
|
||||
event.target.closest('.grid-rows-5').classList.replace('grid-rows-5', 'grid-rows-4');
|
||||
event.target.closest('.grid-rows-4').nextElementSibling.classList.replace('grid-rows-5', 'grid-rows-4');
|
||||
|
||||
this.show_password = false;
|
||||
}
|
||||
},
|
||||
|
||||
// for payments
|
||||
onConnect(transaction, currency, documents) {
|
||||
this.connect.show = true;
|
||||
|
||||
this.connect.transaction = transaction;
|
||||
|
||||
this.connect.currency = {
|
||||
decimal_mark: currency.decimal_mark,
|
||||
precision: currency.precision,
|
||||
symbol: currency.symbol,
|
||||
symbol_first: currency.symbol_first,
|
||||
thousands_separator: currency.thousands_separator,
|
||||
};
|
||||
|
||||
this.connect.documents = documents;
|
||||
},
|
||||
|
||||
// for invoices
|
||||
onChangePaymentMethod(payment_method) {
|
||||
if (!payment_method) {
|
||||
if (! payment_method) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -59,7 +126,7 @@ const app = new Vue({
|
||||
|
||||
this.method_show_html = Vue.component('payment-method-confirm', function (resolve, reject) {
|
||||
resolve({
|
||||
template:'<div id="loading" class="description text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>'
|
||||
template:'<div id="loading" class="description text-center"><i class="submit-spin absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto"></i></div>'
|
||||
})
|
||||
});
|
||||
|
||||
@ -138,7 +205,7 @@ const app = new Vue({
|
||||
},
|
||||
|
||||
onChangePaymentMethodSigned(payment_method) {
|
||||
if (!payment_method) {
|
||||
if (! payment_method) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -150,7 +217,7 @@ const app = new Vue({
|
||||
|
||||
this.method_show_html = Vue.component('payment-method-confirm', function (resolve, reject) {
|
||||
resolve({
|
||||
template:'<div id="loading" class="description text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>'
|
||||
template:'<div id="loading" class="description text-center"><i class="submit-spin absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto"></i></div>'
|
||||
})
|
||||
});
|
||||
|
||||
@ -209,5 +276,5 @@ const app = new Vue({
|
||||
this.method_show_html = error.message;
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
});
|
62
resources/assets/js/views/portal/dashboard.js
vendored
62
resources/assets/js/views/portal/dashboard.js
vendored
@ -1,62 +0,0 @@
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
require('./../../bootstrap');
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
import DashboardPlugin from './../../plugins/dashboard-plugin';
|
||||
|
||||
import Global from './../../mixins/global';
|
||||
import {getQueryVariable} from './../../plugins/functions';
|
||||
import {DatePicker, Tooltip} from 'element-ui';
|
||||
|
||||
Vue.use(DatePicker, Tooltip);
|
||||
|
||||
// plugin setup
|
||||
Vue.use(DashboardPlugin, DatePicker, Tooltip);
|
||||
|
||||
const app = new Vue({
|
||||
el: '#main-body',
|
||||
|
||||
components: {
|
||||
[DatePicker.name]: DatePicker,
|
||||
[Tooltip.name]: Tooltip,
|
||||
},
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
filter_date: [],
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
let start_date = getQueryVariable('start_date');
|
||||
|
||||
if (start_date) {
|
||||
let end_date = getQueryVariable('end_date');
|
||||
|
||||
this.filter_date.push(start_date);
|
||||
this.filter_date.push(end_date);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// Global filter change date column
|
||||
onChangeFilterDate() {
|
||||
if (this.filter_date) {
|
||||
window.location.href = url + '/portal?start_date=' + this.filter_date[0] + '&end_date=' + this.filter_date[1];
|
||||
} else {
|
||||
window.location.href = url + '/portal';
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
25
resources/assets/js/views/portal/payments.js
vendored
25
resources/assets/js/views/portal/payments.js
vendored
@ -1,25 +0,0 @@
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
require('./../../bootstrap');
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
import DashboardPlugin from './../../plugins/dashboard-plugin';
|
||||
|
||||
import Global from './../../mixins/global';
|
||||
|
||||
// plugin setup
|
||||
Vue.use(DashboardPlugin);
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
});
|
34
resources/assets/js/views/portal/profile.js
vendored
34
resources/assets/js/views/portal/profile.js
vendored
@ -1,34 +0,0 @@
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
|
||||
require('./../../bootstrap');
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
import DashboardPlugin from './../../plugins/dashboard-plugin';
|
||||
|
||||
import Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
|
||||
// plugin setup
|
||||
Vue.use(DashboardPlugin);
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('profile'),
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user