From 6e58f29854671c192e965f2c2077641886c32df5 Mon Sep 17 00:00:00 2001 From: "benguozakinci@gmail.com" Date: Fri, 2 Jul 2021 16:01:19 +0300 Subject: [PATCH] Correct indentation --- resources/assets/js/views/common/items.js | 102 +++++++++++----------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/resources/assets/js/views/common/items.js b/resources/assets/js/views/common/items.js index eb886bc42..6da8dcaa4 100644 --- a/resources/assets/js/views/common/items.js +++ b/resources/assets/js/views/common/items.js @@ -4,71 +4,71 @@ * building robust, powerful web applications using Vue and Laravel. */ - require('./../../bootstrap'); +require('./../../bootstrap'); - import Vue from 'vue'; +import Vue from 'vue'; - import DashboardPlugin from './../../plugins/dashboard-plugin'; +import DashboardPlugin from './../../plugins/dashboard-plugin'; - import Global from './../../mixins/global'; +import Global from './../../mixins/global'; - import Form from './../../plugins/form'; - import BulkAction from './../../plugins/bulk-action'; +import Form from './../../plugins/form'; +import BulkAction from './../../plugins/bulk-action'; - // plugin setup - Vue.use(DashboardPlugin); +// plugin setup +Vue.use(DashboardPlugin); - const app = new Vue({ - el: '#app', +const app = new Vue({ + el: '#app', - mixins: [ - Global - ], - - data: function () { - return { - form: new Form('item'), - bulk_action: new BulkAction('items'), - regex_condition: [ - '..', - '.,', - ',.', - ',,' - ], - splice_value: null - } - }, + mixins: [ + Global + ], + + data: function () { + return { + form: new Form('item'), + bulk_action: new BulkAction('items'), + regex_condition: [ + '..', + '.,', + ',.', + ',,' + ], + splice_value: null + } + }, - watch: { - 'form.sale_price': function (newVal, oldVal) { - if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') == -1) { - this.form.sale_price = oldVal; - } + watch: { + 'form.sale_price': function (newVal, oldVal) { + if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') == -1) { + this.form.sale_price = oldVal; + } - if (newVal.search('^(?=.*?[0-9])[0-9.,]+$') == 0) { - for (let item of this.regex_condition) { - if (this.form.sale_price.includes(item)) { + if (newVal.search('^(?=.*?[0-9])[0-9.,]+$') == 0) { + for (let item of this.regex_condition) { + if (this.form.sale_price.includes(item)) { this.splice_value = this.form.sale_price.replace(item, ''); this.form.sale_price = this.splice_value; - } - } - } - }, - - 'form.purchase_price': function (newVal, oldVal) { - if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') == -1) { - this.form.purchase_price = oldVal; - } - - if (newVal.search('^(?=.*?[0-9])[0-9.,]+$') == 0) { - for (let item of this.regex_condition) { - if (this.form.purchase_price.includes(item)) { - this.splice_value = this.form.purchase_price.replace(item, ''); - this.form.purchase_price = this.splice_value; } } } - } + }, + + 'form.purchase_price': function (newVal, oldVal) { + if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') == -1) { + this.form.purchase_price = oldVal; + } + + if (newVal.search('^(?=.*?[0-9])[0-9.,]+$') == 0) { + for (let item of this.regex_condition) { + if (this.form.purchase_price.includes(item)) { + this.splice_value = this.form.purchase_price.replace(item, ''); + this.form.purchase_price = this.splice_value; + } + } + } + } }, }); \ No newline at end of file