v2 first commit
This commit is contained in:
26
resources/assets/js/views/auth/forgot.js
vendored
Normal file
26
resources/assets/js/views/auth/forgot.js
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('item')
|
||||
}
|
||||
}
|
||||
});
|
44
resources/assets/js/views/auth/login.js
vendored
Normal file
44
resources/assets/js/views/auth/login.js
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('login')
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'form.response'(notify) {
|
||||
/*
|
||||
if (!notify.message) {
|
||||
return {};
|
||||
}
|
||||
|
||||
var type = (notify.success) ? 'success' : 'warning';
|
||||
|
||||
this.$notify({
|
||||
message: notify.message,
|
||||
timeout: 5000,
|
||||
icon: 'ni ni-bell-55',
|
||||
type
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/auth/permissions.js
vendored
Normal file
27
resources/assets/js/views/auth/permissions.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('permission'),
|
||||
bulk_action: new BulkAction('permissions')
|
||||
}
|
||||
}
|
||||
});
|
26
resources/assets/js/views/auth/reset.js
vendored
Normal file
26
resources/assets/js/views/auth/reset.js
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('item')
|
||||
}
|
||||
}
|
||||
});
|
112
resources/assets/js/views/auth/roles.js
vendored
Normal file
112
resources/assets/js/views/auth/roles.js
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
mounted() {
|
||||
if (!this.form.permissions.length) {
|
||||
this.form.permissions = [];
|
||||
}
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('role'),
|
||||
bulk_action: new BulkAction('roles'),
|
||||
permissions: {
|
||||
'all': $('input:checkbox').serializeAll().permissions,
|
||||
'read': $('#tab-read input:checkbox').serializeAll(),
|
||||
'create': $('#tab-create input:checkbox').serializeAll(),
|
||||
'update': $('#tab-update input:checkbox').serializeAll(),
|
||||
'delete': $('#tab-delete input:checkbox').serializeAll(),
|
||||
'read_admin_panel': $('#read-admin-panel').val(),
|
||||
'read_client_portal': $('#read-client-portal').val(),
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
permissionSelectAll() {
|
||||
var is_admin = false;
|
||||
var is_portal = false;
|
||||
|
||||
if (this.permissions.all.length) {
|
||||
for (var i = 0; i < this.permissions.all.length; i++) {
|
||||
var value = this.permissions.all[i];
|
||||
|
||||
if ((is_admin && value == this.permissions.read_client_portal) ||
|
||||
(is_portal && value == this.permissions.read_admin_panel)) {
|
||||
} else {
|
||||
this.form.permissions.push(value);
|
||||
}
|
||||
|
||||
if (value == this.permissions.read_admin_panel) {
|
||||
is_admin = true;
|
||||
} else if (value == this.permissions.read_client_portal) {
|
||||
is_portal = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
permissionUnselectAll() {
|
||||
this.form.permissions = [];
|
||||
},
|
||||
|
||||
select(type) {
|
||||
var is_admin = false;
|
||||
var is_portal = false;
|
||||
|
||||
var values = this.permissions[type].permissions;
|
||||
|
||||
if (values.length) {
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
var value = values[i];
|
||||
|
||||
if ((is_admin && value == this.permissions.read_client_portal) ||
|
||||
(is_portal && value == this.permissions.read_admin_panel)) {
|
||||
} else {
|
||||
this.form.permissions.push(value);
|
||||
}
|
||||
|
||||
if (value == this.permissions.read_admin_panel) {
|
||||
is_admin = true;
|
||||
} else if (value == this.permissions.read_client_portal) {
|
||||
is_portal = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
unselect(type) {
|
||||
var values = this.permissions[type].permissions;
|
||||
|
||||
if (values.length) {
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
var index = this.form.permissions.indexOf(values[i]);
|
||||
|
||||
if (index > -1) {
|
||||
this.form.permissions.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/auth/users.js
vendored
Normal file
27
resources/assets/js/views/auth/users.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('user'),
|
||||
bulk_action: new BulkAction('users')
|
||||
}
|
||||
}
|
||||
});
|
45
resources/assets/js/views/banking/accounts.js
vendored
Normal file
45
resources/assets/js/views/banking/accounts.js
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('account'),
|
||||
bulk_action: new BulkAction('accounts')
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
onChangeCurrency(currency_code) {
|
||||
axios.get(url + '/settings/currencies/currency', {
|
||||
params: {
|
||||
code: currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.money.decimal = response.data.decimal_mark;
|
||||
this.money.thousands = response.data.thousands_separator;
|
||||
this.money.prefix = (response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.suffix = !(response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.precision = response.data.precision;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/banking/reconciliations.js
vendored
Normal file
27
resources/assets/js/views/banking/reconciliations.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('reconciliation'),
|
||||
bulk_action: new BulkAction('reconciliations')
|
||||
}
|
||||
}
|
||||
});
|
25
resources/assets/js/views/banking/transactions.js
vendored
Normal file
25
resources/assets/js/views/banking/transactions.js
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/banking/transfers.js
vendored
Normal file
27
resources/assets/js/views/banking/transfers.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('transfer'),
|
||||
bulk_action: new BulkAction('transfers')
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/common/companies.js
vendored
Normal file
27
resources/assets/js/views/common/companies.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('company'),
|
||||
bulk_action: new BulkAction('companies')
|
||||
}
|
||||
}
|
||||
});
|
140
resources/assets/js/views/common/dashboard.js
vendored
Normal file
140
resources/assets/js/views/common/dashboard.js
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import AkauntingDashboard from './../../components/AkauntingDashboard';
|
||||
import AkauntingWidget from './../../components/AkauntingWidget';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#main-body',
|
||||
|
||||
components: {
|
||||
AkauntingDashboard,
|
||||
AkauntingWidget
|
||||
},
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
dashboard_modal: false,
|
||||
dashboard: {
|
||||
name: '',
|
||||
enabled: 1,
|
||||
type: 'create',
|
||||
dashboard_id: 0
|
||||
},
|
||||
widget_modal: false,
|
||||
widgets: {},
|
||||
widget: {
|
||||
name: '',
|
||||
type: '',
|
||||
width: '',
|
||||
action: 'create',
|
||||
sort: 0,
|
||||
widget_id: 0
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getWidgets();
|
||||
},
|
||||
|
||||
methods:{
|
||||
// Create Dashboard form open
|
||||
onCreateDashboard() {
|
||||
this.dashboard_modal = true;
|
||||
this.dashboard.name = '';
|
||||
this.dashboard.enabled = 1;
|
||||
this.dashboard.type = 'create';
|
||||
this.dashboard.dashboard_id = 0;
|
||||
},
|
||||
|
||||
// Edit Dashboard information
|
||||
onEditDashboard(dashboard_id) {
|
||||
var self = this;
|
||||
|
||||
axios.get(url + '/common/dashboards/' + dashboard_id + '/edit')
|
||||
.then(function (response) {
|
||||
self.dashboard.name = response.data.name;
|
||||
self.dashboard.enabled = response.data.enabled;
|
||||
self.dashboard.type = 'edit';
|
||||
self.dashboard.dashboard_id = dashboard_id;
|
||||
|
||||
self.dashboard_modal = true;
|
||||
})
|
||||
.catch(function (error) {
|
||||
self.dashboard_modal = false;
|
||||
});
|
||||
},
|
||||
|
||||
// Get All Widgets
|
||||
getWidgets() {
|
||||
var self = this;
|
||||
|
||||
axios.get(url + '/common/widgets')
|
||||
.then(function (response) {
|
||||
self.widgets = response.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
});
|
||||
},
|
||||
|
||||
// Add new widget on dashboard
|
||||
onCreateWidget() {
|
||||
this.widget_modal = true;
|
||||
},
|
||||
|
||||
// Edit Dashboard selected widget setting.
|
||||
onEditWidget(widget_id) {
|
||||
var self = this;
|
||||
|
||||
axios.get(url + '/common/widgets/' + widget_id + '/edit')
|
||||
.then(function (response) {
|
||||
self.widget.name = response.data.name;
|
||||
self.widget.type = response.data.widget_id;
|
||||
self.widget.width = response.data.settings.width;
|
||||
self.widget.action = 'edit';
|
||||
self.widget.sort = response.data.sort;
|
||||
self.widget.widget_id = widget_id;
|
||||
|
||||
self.widget_modal = true;
|
||||
})
|
||||
.catch(function (error) {
|
||||
self.widget_modal = false;
|
||||
});
|
||||
},
|
||||
|
||||
onCancel() {
|
||||
this.dashboard_modal = false;
|
||||
|
||||
this.dashboard.name = '';
|
||||
this.dashboard.enabled = 1;
|
||||
this.dashboard.type = 'create';
|
||||
this.dashboard.dashboard_id = 0;
|
||||
|
||||
this.widget_modal = false;
|
||||
|
||||
this.widget.name = '';
|
||||
this.widget.type = '';
|
||||
this.widget.width = '';
|
||||
this.widget.action = 'create';
|
||||
this.widget.sort = 0;
|
||||
this.widget.widget_id = 0;
|
||||
},
|
||||
}
|
||||
});
|
27
resources/assets/js/views/common/items.js
vendored
Normal file
27
resources/assets/js/views/common/items.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('item'),
|
||||
bulk_action: new BulkAction('items')
|
||||
}
|
||||
}
|
||||
});
|
48
resources/assets/js/views/common/reports.js
vendored
Normal file
48
resources/assets/js/views/common/reports.js
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('report'),
|
||||
bulk_action: new BulkAction('reports')
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChangeClass(class_name) {
|
||||
axios.get(url + '/common/reports/groups', {
|
||||
params: {
|
||||
class: class_name
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
let options = response.data.data;
|
||||
|
||||
this.$children.forEach(select => {
|
||||
if (select.name == 'group') {
|
||||
select.selectOptions = options;
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
61
resources/assets/js/views/common/search.js
vendored
Normal file
61
resources/assets/js/views/common/search.js
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
/**
|
||||
* 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 axios from 'axios';
|
||||
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
import NProgressAxios from './../../plugins/nprogress-axios';
|
||||
|
||||
import clickOutside from './../../directives/click-ouside.js';
|
||||
|
||||
Vue.directive('click-outside', clickOutside);
|
||||
|
||||
const search = new Vue({
|
||||
el: '#global-search',
|
||||
data: function () {
|
||||
return {
|
||||
show: false,
|
||||
count:0,
|
||||
keyword: '',
|
||||
items: {}
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
onChange() {
|
||||
this.show = false;
|
||||
|
||||
if (this.keyword.length) {
|
||||
axios.get(url + '/common/search', {
|
||||
params: {
|
||||
keyword: this.keyword
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.items = response.data;
|
||||
this.count = Object.keys(this.items).length;
|
||||
|
||||
if (this.count) {
|
||||
this.show = true;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
closeResult() {
|
||||
this.show = false;
|
||||
this.count = 0;
|
||||
this.items = {};
|
||||
}
|
||||
}
|
||||
});
|
253
resources/assets/js/views/expenses/bills.js
vendored
Normal file
253
resources/assets/js/views/expenses/bills.js
vendored
Normal file
@ -0,0 +1,253 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import Error from './../../plugins/error';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('bill'),
|
||||
bulk_action: new BulkAction('bills'),
|
||||
totals: {
|
||||
sub: 0,
|
||||
discount: '',
|
||||
discount_text: false,
|
||||
tax: 0,
|
||||
total: 0
|
||||
},
|
||||
transaction_form: new Form('transaction'),
|
||||
payment: {
|
||||
modal: false,
|
||||
amount: 0,
|
||||
title: '',
|
||||
message: '',
|
||||
html: '',
|
||||
errors: new Error()
|
||||
},
|
||||
transaction: [],
|
||||
items: '',
|
||||
discount: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.form.items = [];
|
||||
|
||||
if (this.form.method) {
|
||||
this.onAddItem();
|
||||
}
|
||||
|
||||
if (typeof invoice_items !== 'undefined') {
|
||||
let items = [];
|
||||
let currency_code = this.form.currency_code;
|
||||
|
||||
invoice_items.forEach(function(item) {
|
||||
items.push({
|
||||
show: false,
|
||||
currency: currency_code,
|
||||
item_id: item.item_id,
|
||||
name: item.name,
|
||||
price: (item.price).toFixed(2),
|
||||
quantity: item.quantity,
|
||||
tax_id: item.tax_id,
|
||||
total: (item.total).toFixed(2)
|
||||
});
|
||||
});
|
||||
|
||||
this.form.items = items;
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
onChangeContact(contact_id) {
|
||||
axios.get(url + '/expenses/vendors/' + contact_id + '/currency')
|
||||
.then(response => {
|
||||
this.form.contact_name = response.data.name;
|
||||
this.form.contact_email = response.data.email;
|
||||
this.form.contact_tax_number = response.data.tax_number;
|
||||
this.form.contact_phone = response.data.phone;
|
||||
this.form.contact_address = response.data.address;
|
||||
this.form.currency_code = response.data.currency_code;
|
||||
this.form.currency_rate = response.data.currency_rate;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onChangeCurrency(currency_code) {
|
||||
axios.get(url + '/settings/currencies/currency', {
|
||||
params: {
|
||||
code: currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.form.currency_code = response.data.currency_code;
|
||||
this.form.currency_rate = response.data.currency_rate;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onCalculateTotal() {
|
||||
axios.post(url + '/common/items/total', {
|
||||
items: this.form.items,
|
||||
discount: this.form.discount,
|
||||
currency_code: this.form.currency_code
|
||||
})
|
||||
.then(response => {
|
||||
let items = this.form.items;
|
||||
|
||||
response.data.items.forEach(function(value, index) {
|
||||
items[index].total = value;
|
||||
});
|
||||
|
||||
this.form.items = items;
|
||||
|
||||
this.totals.sub = response.data.sub_total;
|
||||
this.totals.discount = response.data.discount_total;
|
||||
this.totals.tax = response.data.tax_total;
|
||||
this.totals.total = response.data.grand_total;
|
||||
this.totals.discount_text = response.data.discount_text;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onAddItem() {
|
||||
let row = [];
|
||||
|
||||
let keys = Object.keys(this.form.item_backup[0]);
|
||||
let currency_code = this.form.currency_code;
|
||||
|
||||
keys.forEach(function(item) {
|
||||
if (item == 'currency') {
|
||||
row[item] = currency_code;
|
||||
} else {
|
||||
row[item] = '';
|
||||
}
|
||||
});
|
||||
|
||||
this.form.items.push(Object.assign({}, row));
|
||||
},
|
||||
|
||||
onGetItem(event, index) {
|
||||
let name = event.target.value;
|
||||
|
||||
axios.get(url + '/common/items/autocomplete', {
|
||||
params: {
|
||||
query: name,
|
||||
type: 'invoice',
|
||||
currency_code: this.form.currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.items = response.data;
|
||||
|
||||
if (this.items.length) {
|
||||
this.form.items[index].show = true;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onSelectItem(item, index) {
|
||||
this.form.items[index].item_id = item.id;
|
||||
this.form.items[index].name = item.name;
|
||||
this.form.items[index].price = (item.purchase_price).toFixed(2);
|
||||
this.form.items[index].quantity = 1;
|
||||
this.form.items[index].total = item.total;
|
||||
|
||||
this.form.items[index].show = false;
|
||||
},
|
||||
|
||||
onDeleteItem(index) {
|
||||
this.form.items.splice(index, 1);
|
||||
},
|
||||
|
||||
onAddDiscount() {
|
||||
let discount = document.getElementById('pre-discount').value;
|
||||
|
||||
this.form.discount = discount;
|
||||
this.discount = false;
|
||||
},
|
||||
|
||||
onPayment() {
|
||||
this.payment.modal = true;
|
||||
|
||||
let form = this.transaction_form;
|
||||
|
||||
this.transaction_form = new Form('transaction');
|
||||
|
||||
this.transaction_form.paid_at = form.paid_at;
|
||||
this.transaction_form.account_id = form.account_id;
|
||||
this.transaction_form.payment_method = form.payment_method;
|
||||
this.transaction_form.amount = form.amount;
|
||||
},
|
||||
|
||||
addPayment() {
|
||||
this.transaction_form.submit();
|
||||
|
||||
this.payment.errors = this.transaction_form.errors;
|
||||
},
|
||||
|
||||
closePayment() {
|
||||
this.payment = {
|
||||
modal: false,
|
||||
amount: 0,
|
||||
title: '',
|
||||
message: '',
|
||||
errors: this.transaction_form.errors
|
||||
};
|
||||
},
|
||||
|
||||
// Change bank account get money and currency rate
|
||||
onChangePaymentAccount(account_id) {
|
||||
axios.get(url + '/banking/accounts/currency', {
|
||||
params: {
|
||||
account_id: account_id
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.transaction_form.currency = response.data.currency_name;
|
||||
this.transaction_form.currency_code = response.data.currency_code;
|
||||
this.transaction_form.currency_rate = response.data.currency_rate;
|
||||
|
||||
this.money.decimal = response.data.decimal_mark;
|
||||
this.money.thousands = response.data.thousands_separator;
|
||||
this.money.prefix = (response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.suffix = !(response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.precision = response.data.precision;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onDeleteTransaction(form_id) {
|
||||
this.transaction = new Form(form_id);
|
||||
|
||||
this.confirm.url = this.transaction.action;
|
||||
this.confirm.title = this.transaction.title;
|
||||
this.confirm.message = this.transaction.message;
|
||||
this.confirm.button_cancel = this.transaction.cancel;
|
||||
this.confirm.button_delete = this.transaction.delete;
|
||||
this.confirm.show = true;
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/expenses/payments.js
vendored
Normal file
27
resources/assets/js/views/expenses/payments.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('payment'),
|
||||
bulk_action: new BulkAction('payments')
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/expenses/vendors.js
vendored
Normal file
27
resources/assets/js/views/expenses/vendors.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('vendor'),
|
||||
bulk_action: new BulkAction('vendors')
|
||||
}
|
||||
}
|
||||
});
|
92
resources/assets/js/views/incomes/customers.js
vendored
Normal file
92
resources/assets/js/views/incomes/customers.js
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('customer'),
|
||||
bulk_action: new BulkAction('customers'),
|
||||
can_login : false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.form.create_user = false;
|
||||
},
|
||||
|
||||
methods:{
|
||||
onCanLogin(event) {
|
||||
if (event.target.checked) {
|
||||
if (this.form.email) {
|
||||
axios.get(url + '/auth/users/autocomplete', {
|
||||
params: {
|
||||
column: 'email',
|
||||
value : this.form.email
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if (response.data.errors) {
|
||||
if (response.data.data) {
|
||||
this.form.errors.set('email', {
|
||||
0: response.data.data
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
this.can_login = true;
|
||||
this.form.create_user = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (response.data.success) {
|
||||
this.form.errors.set('email', {
|
||||
0: can_login_errors.email
|
||||
});
|
||||
|
||||
this.can_login = false;
|
||||
this.form.create_user = false;
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
} else {
|
||||
this.form.errors.set('email', {
|
||||
0: can_login_errors.valid
|
||||
});
|
||||
|
||||
this.can_login = false;
|
||||
this.form.create_user = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {
|
||||
this.form.errors.clear('email');
|
||||
|
||||
this.can_login = false;
|
||||
this.form.create_user = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
253
resources/assets/js/views/incomes/invoices.js
vendored
Normal file
253
resources/assets/js/views/incomes/invoices.js
vendored
Normal file
@ -0,0 +1,253 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import Error from './../../plugins/error';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('invoice'),
|
||||
bulk_action: new BulkAction('invoices'),
|
||||
totals: {
|
||||
sub: 0,
|
||||
discount: '',
|
||||
discount_text: false,
|
||||
tax: 0,
|
||||
total: 0
|
||||
},
|
||||
transaction_form: new Form('transaction'),
|
||||
payment: {
|
||||
modal: false,
|
||||
amount: 0,
|
||||
title: '',
|
||||
message: '',
|
||||
html: '',
|
||||
errors: new Error()
|
||||
},
|
||||
transaction: [],
|
||||
items: '',
|
||||
discount: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.form.items = [];
|
||||
|
||||
if (this.form.method) {
|
||||
this.onAddItem();
|
||||
}
|
||||
|
||||
if (typeof invoice_items !== 'undefined') {
|
||||
let items = [];
|
||||
let currency_code = this.form.currency_code;
|
||||
|
||||
invoice_items.forEach(function(item) {
|
||||
items.push({
|
||||
show: false,
|
||||
currency: currency_code,
|
||||
item_id: item.item_id,
|
||||
name: item.name,
|
||||
price: (item.price).toFixed(2),
|
||||
quantity: item.quantity,
|
||||
tax_id: item.tax_id,
|
||||
total: (item.total).toFixed(2)
|
||||
});
|
||||
});
|
||||
|
||||
this.form.items = items;
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
onChangeContact(contact_id) {
|
||||
axios.get(url + '/incomes/customers/' + contact_id + '/currency')
|
||||
.then(response => {
|
||||
this.form.contact_name = response.data.name;
|
||||
this.form.contact_email = response.data.email;
|
||||
this.form.contact_tax_number = response.data.tax_number;
|
||||
this.form.contact_phone = response.data.phone;
|
||||
this.form.contact_address = response.data.address;
|
||||
this.form.currency_code = response.data.currency_code;
|
||||
this.form.currency_rate = response.data.currency_rate;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onChangeCurrency(currency_code) {
|
||||
axios.get(url + '/settings/currencies/currency', {
|
||||
params: {
|
||||
code: currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.form.currency_code = response.data.currency_code;
|
||||
this.form.currency_rate = response.data.currency_rate;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onCalculateTotal() {
|
||||
axios.post(url + '/common/items/total', {
|
||||
items: this.form.items,
|
||||
discount: this.form.discount,
|
||||
currency_code: this.form.currency_code
|
||||
})
|
||||
.then(response => {
|
||||
let items = this.form.items;
|
||||
|
||||
response.data.items.forEach(function(value, index) {
|
||||
items[index].total = value;
|
||||
});
|
||||
|
||||
this.form.items = items;
|
||||
|
||||
this.totals.sub = response.data.sub_total;
|
||||
this.totals.discount = response.data.discount_total;
|
||||
this.totals.tax = response.data.tax_total;
|
||||
this.totals.total = response.data.grand_total;
|
||||
this.totals.discount_text = response.data.discount_text;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onAddItem() {
|
||||
let row = [];
|
||||
|
||||
let keys = Object.keys(this.form.item_backup[0]);
|
||||
let currency_code = this.form.currency_code;
|
||||
|
||||
keys.forEach(function(item) {
|
||||
if (item == 'currency') {
|
||||
row[item] = currency_code;
|
||||
} else {
|
||||
row[item] = '';
|
||||
}
|
||||
});
|
||||
|
||||
this.form.items.push(Object.assign({}, row));
|
||||
},
|
||||
|
||||
onGetItem(event, index) {
|
||||
let name = event.target.value;
|
||||
|
||||
axios.get(url + '/common/items/autocomplete', {
|
||||
params: {
|
||||
query: name,
|
||||
type: 'invoice',
|
||||
currency_code: this.form.currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.items = response.data;
|
||||
|
||||
if (this.items.length) {
|
||||
this.form.items[index].show = true;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onSelectItem(item, index) {
|
||||
this.form.items[index].item_id = item.id;
|
||||
this.form.items[index].name = item.name;
|
||||
this.form.items[index].price = (item.purchase_price).toFixed(2);
|
||||
this.form.items[index].quantity = 1;
|
||||
this.form.items[index].total = item.total;
|
||||
|
||||
this.form.items[index].show = false;
|
||||
},
|
||||
|
||||
onDeleteItem(index) {
|
||||
this.form.items.splice(index, 1);
|
||||
},
|
||||
|
||||
onAddDiscount() {
|
||||
let discount = document.getElementById('pre-discount').value;
|
||||
|
||||
this.form.discount = discount;
|
||||
this.discount = false;
|
||||
},
|
||||
|
||||
onPayment() {
|
||||
this.payment.modal = true;
|
||||
|
||||
let form = this.transaction_form;
|
||||
|
||||
this.transaction_form = new Form('transaction');
|
||||
|
||||
this.transaction_form.paid_at = form.paid_at;
|
||||
this.transaction_form.account_id = form.account_id;
|
||||
this.transaction_form.payment_method = form.payment_method;
|
||||
this.transaction_form.amount = form.amount;
|
||||
},
|
||||
|
||||
addPayment() {
|
||||
this.transaction_form.submit();
|
||||
|
||||
this.payment.errors = this.transaction_form.errors;
|
||||
},
|
||||
|
||||
closePayment() {
|
||||
this.payment = {
|
||||
modal: false,
|
||||
amount: 0,
|
||||
title: '',
|
||||
message: '',
|
||||
errors: this.transaction_form.errors
|
||||
};
|
||||
},
|
||||
|
||||
// Change bank account get money and currency rate
|
||||
onChangePaymentAccount(account_id) {
|
||||
axios.get(url + '/banking/accounts/currency', {
|
||||
params: {
|
||||
account_id: account_id
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.transaction_form.currency = response.data.currency_name;
|
||||
this.transaction_form.currency_code = response.data.currency_code;
|
||||
this.transaction_form.currency_rate = response.data.currency_rate;
|
||||
|
||||
this.money.decimal = response.data.decimal_mark;
|
||||
this.money.thousands = response.data.thousands_separator;
|
||||
this.money.prefix = (response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.suffix = !(response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.precision = response.data.precision;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onDeleteTransaction(form_id) {
|
||||
this.transaction = new Form(form_id);
|
||||
|
||||
this.confirm.url = this.transaction.action;
|
||||
this.confirm.title = this.transaction.title;
|
||||
this.confirm.message = this.transaction.message;
|
||||
this.confirm.button_cancel = this.transaction.cancel;
|
||||
this.confirm.button_delete = this.transaction.delete;
|
||||
this.confirm.show = true;
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/incomes/revenues.js
vendored
Normal file
27
resources/assets/js/views/incomes/revenues.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('revenue'),
|
||||
bulk_action: new BulkAction('revenues')
|
||||
}
|
||||
}
|
||||
});
|
125
resources/assets/js/views/install/Database.vue
Normal file
125
resources/assets/js/views/install/Database.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="card-body">
|
||||
<div role="alert" class="alert alert-danger d-none" :class="(form.response.error) ? 'show' : ''" v-if="form.response.error" v-html="form.response.message"></div>
|
||||
|
||||
<div class="row">
|
||||
<hr class="install-line">
|
||||
<div class="col-md-4 text-center">
|
||||
<router-link to='./language'>
|
||||
<button type="button" class="btn btn-secondary btn-lg wizard-steps wizard-steps-color-active rounded-circle">
|
||||
<span class="btn-inner--icon wizard-steps-inner"><i class="fa fa-check"></i></span>
|
||||
</button>
|
||||
<p class="mt-2 text-muted step-text">Language</p>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 text-center">
|
||||
<button type="button" class="btn btn-default btn-lg wizard-steps rounded-circle">
|
||||
<span class="btn-inner--icon wizard-steps-inner">2</span>
|
||||
</button>
|
||||
<p class="mt-2 after-step-text">Database</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 text-center">
|
||||
<button type="button" class="btn btn-secondary btn-lg wizard-steps rounded-circle steps">
|
||||
<span class="btn-inner--icon wizard-steps-inner wizard-steps-color">3</span>
|
||||
</button>
|
||||
<p class="mt-2 text-muted step-text">Admin</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 required" :class="[{'has-error': form.errors.get('hostname')}]">
|
||||
<label for="hostname" class="form-control-label">Hostname</label>
|
||||
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-server"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" data-name="hostname" data-value="localhost" @keydown="form.errors.clear('hostname')" v-model="form.hostname" required="required" name="hostname" type="text" value="localhost" id="hostname">
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback" style="display: block;" v-if="form.errors.has('hostname')" v-html="form.errors.get('hostname')"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 required" :class="[{'has-error': form.errors.get('username')}]">
|
||||
<label for="username" class="form-control-label">Username</label>
|
||||
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-user"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" data-name="username" @keydown="form.errors.clear('username')" v-model="form.username" required="required" name="username" type="text" id="username">
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback" style="display: block;" v-if="form.errors.has('username')" v-html="form.errors.get('username')"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12" :class="[{'has-error': form.errors.get('password')}]">
|
||||
<label for="password" class="form-control-label">Password</label>
|
||||
|
||||
<div class="input-group input-group-merge ">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-key"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" data-name="password" v-model="form.password" name="password" type="password" value="" id="password">
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback" style="display: block;" v-if="form.errors.has('password')" v-html="form.errors.get('password')"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 mb--2 required" :class="[{'has-error': form.errors.get('database')}]">
|
||||
<label for="database" class="form-control-label">Database</label>
|
||||
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-database"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" data-name="database" @keydown="form.errors.clear('database')" v-model="form.database" required="required" name="database" type="text" id="database">
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback" style="display: block;" v-if="form.errors.has('database')" v-html="form.errors.get('database')"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="float-right">
|
||||
<button v-on:click="onSubmit" :disabled="form.loading" type="submit" id="next-button" class="btn btn-success" data-loading-text="Loading...">
|
||||
<div class="aka-loader"></div>
|
||||
<span>Next
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import Form from './../../plugins/form';
|
||||
|
||||
export default {
|
||||
name: 'database',
|
||||
data() {
|
||||
return {
|
||||
form: new Form('form-install')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// Form Submit
|
||||
onSubmit() {
|
||||
this.form.submit();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
85
resources/assets/js/views/install/Language.vue
Normal file
85
resources/assets/js/views/install/Language.vue
Normal file
@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<hr class="install-line">
|
||||
<div class="col-md-4 text-center">
|
||||
<button type="button" class="btn btn-default btn-lg wizard-steps rounded-circle">
|
||||
<span class="btn-inner--icon wizard-steps-inner">1</span>
|
||||
</button>
|
||||
<p class="mt-2 after-step-text">Language</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 text-center">
|
||||
<button type="button" class="btn btn-secondary btn-lg wizard-steps rounded-circle steps">
|
||||
<span class="btn-inner--icon wizard-steps-inner wizard-steps-color">2</span>
|
||||
</button>
|
||||
<p class="mt-2 text-muted step-text">Database</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 text-center">
|
||||
<button type="button" class="btn btn-secondary btn-lg wizard-steps rounded-circle steps">
|
||||
<span class="btn-inner--icon wizard-steps-inner wizard-steps-color">3</span>
|
||||
</button>
|
||||
<p class="mt-2 text-muted step-text">Admin</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="form-group mb-0">
|
||||
<select v-model="form.lang" name="lang" id="lang" size="13" class="col-xl-12 form-control-label">
|
||||
<option
|
||||
v-for="(name, code) in languages"
|
||||
v-bind:value="code">
|
||||
{{ name }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="float-right">
|
||||
<button v-on:click="onSubmit" :disabled="form.loading" type="submit" id="next-button" class="btn btn-success" data-loading-text="Loading...">
|
||||
<div class="aka-loader"></div>
|
||||
<span>Next
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import Form from './../../plugins/form';
|
||||
|
||||
var base_path = url.replace(window.location.origin, '');
|
||||
|
||||
export default {
|
||||
name: 'language',
|
||||
mounted() {
|
||||
axios.get(base_path + '/install/language/getLanguages')
|
||||
.then(response => {
|
||||
this.languages = response.data.languages;
|
||||
this.form.lang = 'en-GB';
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: new Form('form-install'),
|
||||
languages: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// Form Submit
|
||||
onSubmit() {
|
||||
this.form.submit();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
3
resources/assets/js/views/install/Requirements.vue
Normal file
3
resources/assets/js/views/install/Requirements.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<p>This is the Database</p>
|
||||
</template>
|
126
resources/assets/js/views/install/Settings.vue
Normal file
126
resources/assets/js/views/install/Settings.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<hr class="install-line">
|
||||
<div class="col-md-4 text-center">
|
||||
<router-link to='./language'>
|
||||
<button type="button" class="btn btn-secondary btn-lg wizard-steps wizard-steps-color-active rounded-circle">
|
||||
<span class="btn-inner--icon wizard-steps-inner"><i class="fa fa-check"></i></span>
|
||||
</button>
|
||||
<p class="mt-2 text-muted step-text">Language</p>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 text-center">
|
||||
<router-link to='./database'>
|
||||
<button type="button" class="btn btn-secondary btn-lg wizard-steps wizard-steps-color-active rounded-circle">
|
||||
<span class="btn-inner--icon wizard-steps-inner"><i class="fa fa-check"></i></span>
|
||||
</button>
|
||||
<p class="mt-2 text-muted step-text">Database</p>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 text-center">
|
||||
<button type="button" class="btn btn-default btn-lg wizard-steps rounded-circle">
|
||||
<span class="btn-inner--icon wizard-steps-inner">3</span>
|
||||
</button>
|
||||
<p class="mt-2 after-step-text">Admin</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 required" :class="[{'has-error': form.errors.get('company_name')}]">
|
||||
<label for="company_name" class="form-control-label">Company Name</label>
|
||||
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-building"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" data-name="company_name" @keydown="form.errors.clear('company_name')" v-model="form.company_name" required="required" name="company_name" type="text" id="company_name">
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback" style="display: block;" v-if="form.errors.has('company_name')" v-html="form.errors.get('company_name')"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 required" :class="[{'has-error': form.errors.get('company_email')}]">
|
||||
<label for="company_email" class="form-control-label">Company Email</label>
|
||||
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" data-name="company_email" @keydown="form.errors.clear('company_email')" v-model="form.company_email" required="required" name="company_email" type="text" id="company_email">
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback" style="display: block;" v-if="form.errors.has('company_email')" v-html="form.errors.get('company_email')"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 required" :class="[{'has-error': form.errors.get('user_email')}]">
|
||||
<label for="user_email" class="form-control-label">Admin Email</label>
|
||||
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" data-name="user_email" @keydown="form.errors.clear('user_email')" v-model="form.user_email" required="required" name="user_email" type="text" id="user_email">
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback" style="display: block;" v-if="form.errors.has('user_email')" v-html="form.errors.get('user_email')"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 mb--2 required" :class="[{'has-error': form.errors.get('user_password')}]">
|
||||
<label for="user_password" class="form-control-label">Admin Password</label>
|
||||
|
||||
<div class="input-group input-group-merge ">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-key"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" data-name="user_password" @keydown="form.errors.clear('user_password')" v-model="form.user_password" required="required" name="user_password" type="password" value="" id="user_password">
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback" style="display: block;" v-if="form.errors.has('user_password')" v-html="form.errors.get('user_password')"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="float-right">
|
||||
<button v-on:click="onSubmit" :disabled="form.loading" type="submit" id="next-button" class="btn btn-success" data-loading-text="Loading...">
|
||||
<div class="aka-loader"></div>
|
||||
<span>Next
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import Form from './../../plugins/form';
|
||||
|
||||
export default {
|
||||
name: 'settings',
|
||||
data() {
|
||||
return {
|
||||
form: new Form('form-install'),
|
||||
languages: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// Form Submit
|
||||
onSubmit() {
|
||||
this.form.submit();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
48
resources/assets/js/views/modules/item.js
vendored
Normal file
48
resources/assets/js/views/modules/item.js
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* 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 Global from '../../mixins/global';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
mounted() {
|
||||
this.onGetReviews('', 1);
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
reviews: '',
|
||||
faq: false
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onGetReviews (path, page) {
|
||||
axios.post(url + '/apps/' + app_slug + '/reviews', {
|
||||
patth: path,
|
||||
page: page
|
||||
})
|
||||
.then(response => {
|
||||
this.reviews = response.data.html;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onShowFaq() {
|
||||
this.faq = true;
|
||||
}
|
||||
}
|
||||
});
|
28
resources/assets/js/views/portal/dashboard.js
vendored
Normal file
28
resources/assets/js/views/portal/dashboard.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
}
|
||||
}
|
||||
});
|
122
resources/assets/js/views/portal/invoices.js
vendored
Normal file
122
resources/assets/js/views/portal/invoices.js
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('invoice-payment'),
|
||||
redirectForm: new Form('redirect-form'),
|
||||
method_show_html: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
onChangePaymentMethod(event) {
|
||||
let method = event.split('.');
|
||||
|
||||
let path = url + '/portal/invoices/' + this.form.invoice_id + '/' + method[0];
|
||||
|
||||
//this.method_show_html = '<div id="loading" class="text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>';
|
||||
|
||||
axios.get(path)
|
||||
.then(response => {
|
||||
this.method_show_html = '';
|
||||
|
||||
if (response.data.redirect) {
|
||||
location = response.data.redirect;
|
||||
}
|
||||
|
||||
if (response.data.html) {
|
||||
this.method_show_html = Vue.component('payment-method-confirm', function (resolve, reject) {
|
||||
resolve({
|
||||
template: response.data.html,
|
||||
|
||||
methods: {
|
||||
onRedirectConfirm() {
|
||||
let redirect_form = new Form('redirect-form');
|
||||
|
||||
this.$emit('interface', redirect_form);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
this.method_show_html = error.message;
|
||||
});
|
||||
},
|
||||
|
||||
onRedirectConfirm() {
|
||||
this.redirectForm = new Form('redirect-form');
|
||||
|
||||
axios.post(this.redirectForm.action, this.redirectForm.data())
|
||||
.then(response => {
|
||||
if (response.data.redirect) {
|
||||
location = response.data.redirect;
|
||||
}
|
||||
|
||||
if (response.data.success) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
this.method_show_html = error.message;
|
||||
});
|
||||
},
|
||||
|
||||
onChangePaymentMethodSigned(event) {
|
||||
let method = event.split('.');
|
||||
|
||||
this.form.payment_action = event;
|
||||
|
||||
let payment_action = payment_action_path[event];
|
||||
|
||||
axios.get(payment_action)
|
||||
.then(response => {
|
||||
this.method_show_html = '';
|
||||
|
||||
if (response.data.redirect) {
|
||||
location = response.data.redirect;
|
||||
}
|
||||
|
||||
if (response.data.html) {
|
||||
this.method_show_html = Vue.component('payment-method-confirm', function (resolve, reject) {
|
||||
resolve({
|
||||
template: response.data.html,
|
||||
|
||||
methods: {
|
||||
onRedirectConfirm() {
|
||||
let redirect_form = new Form('redirect-form');
|
||||
|
||||
this.$emit('interface', redirect_form);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
this.method_show_html = error.message;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
28
resources/assets/js/views/portal/payments.js
vendored
Normal file
28
resources/assets/js/views/portal/payments.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
}
|
||||
}
|
||||
});
|
29
resources/assets/js/views/portal/profile.js
vendored
Normal file
29
resources/assets/js/views/portal/profile.js
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
}
|
||||
}
|
||||
});
|
28
resources/assets/js/views/portal/transactions.js
vendored
Normal file
28
resources/assets/js/views/portal/transactions.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
}
|
||||
}
|
||||
});
|
62
resources/assets/js/views/settings/categories.js
vendored
Normal file
62
resources/assets/js/views/settings/categories.js
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
import ColorPicker from 'element-ui';
|
||||
//import 'element-ui/lib/theme-default/index.css';
|
||||
|
||||
Vue.use(ColorPicker);
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
components: {
|
||||
ColorPicker
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.color = this.form.color;
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('category'),
|
||||
bulk_action: new BulkAction('categories'),
|
||||
color: '#6DA252',
|
||||
predefineColors: [
|
||||
'#3c3f72',
|
||||
'#55588b',
|
||||
'#e5e5e5',
|
||||
'#328aef',
|
||||
'#efad32',
|
||||
'#ef3232',
|
||||
'#efef32'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChangeColor() {
|
||||
this.form.color = this.color;
|
||||
},
|
||||
|
||||
onChangeColorInput() {
|
||||
this.color = this.form.color;
|
||||
}
|
||||
}
|
||||
});
|
50
resources/assets/js/views/settings/currencies.js
vendored
Normal file
50
resources/assets/js/views/settings/currencies.js
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('currency'),
|
||||
bulk_action: new BulkAction('currencies')
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
RateReplace(){
|
||||
this.form.rate = this.form.rate.replace(',', '.');
|
||||
},
|
||||
|
||||
onChangeCode(code) {
|
||||
axios.get(url + '/settings/currencies/config', {
|
||||
params: {
|
||||
code: code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.form.rate = response.data.rate;
|
||||
this.form.precision = response.data.precision;
|
||||
this.form.symbol = response.data.symbol;
|
||||
this.form.symbol_first = response.data.symbol_first;
|
||||
this.form.decimal_mark = response.data.decimal_mark;
|
||||
this.form.thousands_separator = response.data.thousands_separator;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
26
resources/assets/js/views/settings/modules.js
vendored
Normal file
26
resources/assets/js/views/settings/modules.js
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('module')
|
||||
}
|
||||
}
|
||||
});
|
27
resources/assets/js/views/settings/settings.js
vendored
Normal file
27
resources/assets/js/views/settings/settings.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('setting'),
|
||||
bulk_action: new BulkAction('settings')
|
||||
}
|
||||
}
|
||||
});
|
32
resources/assets/js/views/settings/taxes.js
vendored
Normal file
32
resources/assets/js/views/settings/taxes.js
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('tax'),
|
||||
bulk_action: new BulkAction('taxes')
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
taxRateReplace(){
|
||||
this.form.rate = this.form.rate.replace(',', '.');
|
||||
},
|
||||
}
|
||||
});
|
25
resources/assets/js/views/wizard/company.js
vendored
Normal file
25
resources/assets/js/views/wizard/company.js
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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 Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('company')
|
||||
}
|
||||
}
|
||||
});
|
97
resources/assets/js/views/wizard/currencies.js
vendored
Normal file
97
resources/assets/js/views/wizard/currencies.js
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
/**
|
||||
* 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 Global from '../../mixins/global';
|
||||
|
||||
import Form from '../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('currency'),
|
||||
bulk_action: new BulkAction(url + '/settings/currencies'),
|
||||
show: false,
|
||||
currency: {
|
||||
name: '',
|
||||
code: '',
|
||||
rate: '1',
|
||||
enabled: 1
|
||||
},
|
||||
submit_function: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onAddCurrency() {
|
||||
this.submit_function = 'onStoreCurrency';
|
||||
this.form.method = 'post';
|
||||
this.form.action = url + '/wizard/currencies';
|
||||
|
||||
this.form.name = '';
|
||||
this.form.code = '';
|
||||
this.form.rate = '';
|
||||
this.form.enabled = 1;
|
||||
this.form.precision = '';
|
||||
this.form.symbol = '';
|
||||
this.form.symbol_first = '';
|
||||
this.form.decimal_mark = '';
|
||||
this.form.thousands_separator = '';
|
||||
|
||||
this.show = true;
|
||||
},
|
||||
|
||||
onEditCurrency(currency_id) {
|
||||
this.submit_function = 'onUpdateCurrency';
|
||||
this.form.method = 'patch';
|
||||
this.form.action = url + '/wizard/currencies/' + currency_id;
|
||||
|
||||
currencies.forEach(currency => {
|
||||
if (currency.id == currency_id) {
|
||||
this.form.name = currency.name;
|
||||
this.form.code = currency.code;
|
||||
this.form.rate = currency.rate;
|
||||
this.form.enabled = currency.enabled;
|
||||
this.form.precision = currency.precision;
|
||||
this.form.symbol = currency.symbol;
|
||||
this.form.symbol_first = currency.symbol_first;
|
||||
this.form.decimal_mark = currency.decimal_mark;
|
||||
this.form.thousands_separator = currency.thousands_separator;
|
||||
}
|
||||
});
|
||||
|
||||
this.show = true;
|
||||
},
|
||||
|
||||
onChangeCode(code) {
|
||||
axios.get(url + '/settings/currencies/config', {
|
||||
params: {
|
||||
code: code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.form.rate = response.data.rate;
|
||||
this.form.precision = response.data.precision;
|
||||
this.form.symbol = response.data.symbol;
|
||||
this.form.symbol_first = response.data.symbol_first;
|
||||
this.form.decimal_mark = response.data.decimal_mark;
|
||||
this.form.thousands_separator = response.data.thousands_separator;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
69
resources/assets/js/views/wizard/taxes.js
vendored
Normal file
69
resources/assets/js/views/wizard/taxes.js
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
/**
|
||||
* 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 Global from '../../mixins/global';
|
||||
|
||||
import Form from '../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('tax'),
|
||||
bulk_action: new BulkAction(url + '/settings/taxes'),
|
||||
show: false,
|
||||
tax: {
|
||||
name: '',
|
||||
code: '',
|
||||
type: 'normal',
|
||||
enabled: 1
|
||||
},
|
||||
submit_function: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onAddTax() {
|
||||
this.submit_function = 'onStoreTax';
|
||||
this.form.method = 'post';
|
||||
this.form.action = url + '/wizard/taxes';
|
||||
|
||||
this.form.name = '';
|
||||
this.form.rate = '';
|
||||
this.form.type = 'normal';
|
||||
this.form.enabled = 1;
|
||||
|
||||
this.show = true;
|
||||
},
|
||||
|
||||
onEditTax(tax_id) {
|
||||
this.submit_function = 'onUpdateTax';
|
||||
this.form.method = 'patch';
|
||||
this.form.action = url + '/wizard/taxes/' + tax_id;
|
||||
|
||||
taxes.forEach(tax => {
|
||||
if (tax.id == tax_id) {
|
||||
this.form.name = tax.name;
|
||||
this.form.rate = tax.rate;
|
||||
this.form.type = tax.type;
|
||||
this.form.enabled = tax.enabled;
|
||||
}
|
||||
});
|
||||
|
||||
this.show = true;
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user