Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove space after function name
  • Loading branch information
nadim1992 committed Aug 7, 2019
1 parent a09eba8 commit ccba126
Show file tree
Hide file tree
Showing 110 changed files with 841 additions and 861 deletions.
11 changes: 6 additions & 5 deletions eslintrc.js
@@ -1,10 +1,11 @@
module.exports = {
extends: ['plugin:vue/essential', 'standard'],
rules : {
semi : ['error', 'always'],
indent : ['error', 4],
'no-multi-spaces': ['off'],
'key-spacing' : ['off'],
camelcase : ['off']
semi : ['error', 'always'],
indent : ['error', 4],
'no-multi-spaces' : ['off'],
'key-spacing' : ['off'],
'space-before-function-paren': ['error', 'never'],
camelcase : ['off']
}
};
2 changes: 1 addition & 1 deletion modules/accounting/assets/src/admin/bootstrap.js
Expand Up @@ -52,7 +52,7 @@ window.acct.libs['PieChart'] = PieChart;
window.acct.libs['VueClipboards'] = VueClipboards;

// get lib reference from window
window.acct_get_lib = function (lib) {
window.acct_get_lib = function(lib) {
return window.acct.libs[lib];
};

Expand Down
Expand Up @@ -81,7 +81,7 @@ export default {
ComboBox
},
data () {
data() {
return {
accounts: [],
actions: [
Expand All @@ -93,12 +93,12 @@ export default {
};
},
created () {
created() {
this.fetchAccounts();
},
methods: {
fetchAccounts () {
fetchAccounts() {
this.$store.dispatch('spinner/setSpinner', true);
HTTP.get('/accounts/bank-accounts').then((response) => {
Expand All @@ -110,7 +110,7 @@ export default {
});
},
transformBalance (val) {
transformBalance(val) {
if (val === 'undefined') {
val = 0;
}
Expand All @@ -122,7 +122,7 @@ export default {
return `Dr. ${this.moneyFormat(val)}`;
},
actionClicked (action, account) {
actionClicked(action, account) {
switch (action) {
case 'transfer':
this.$router.push({ name: 'NewTransfer',
Expand Down
Expand Up @@ -36,7 +36,7 @@ export default {
}
},
data () {
data() {
return {
pickerAttrs: [{
key: 'today',
Expand All @@ -53,7 +53,7 @@ export default {
},
watch: {
value (newVal) {
value(newVal) {
if (!newVal) {
this.selectedDate = this.getCurrentDate();
} else {
Expand All @@ -64,12 +64,12 @@ export default {
}
},
created () {
created() {
this.$emit('input', this.selectedDate);
},
methods: {
pickerSelect (day) {
pickerSelect(day) {
// add leading zero
const days = day.day < 10 ? `0${day.day}` : day.day;
const month = day.month < 10 ? `0${day.month}` : day.month;
Expand All @@ -80,7 +80,7 @@ export default {
this.$emit('input', this.selectedDate);
},
getCurrentDate () {
getCurrentDate() {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1;
Expand Down
26 changes: 13 additions & 13 deletions modules/accounting/assets/src/admin/components/base/Dropdown.vue
Expand Up @@ -39,14 +39,14 @@ export default {
}
},
data () {
data() {
return {
visible: false
};
},
watch: {
visible (newValue, oldValue) {
visible(newValue, oldValue) {
if (newValue !== oldValue) {
if (newValue) {
this.showMenu();
Expand All @@ -57,7 +57,7 @@ export default {
}
},
created () {
created() {
// Create non-reactive property
this._popper = null;
Expand All @@ -66,25 +66,25 @@ export default {
});
},
mounted () {
mounted() {
window.addEventListener('click', this.closeDropdown);
},
beforeDestroy () {
beforeDestroy() {
this.visible = false;
this.removePopper();
},
destroyed () {
destroyed() {
window.removeEventListener('click', this.closeDropdown);
},
methods: {
toggleDropdown () {
toggleDropdown() {
this.visible = !this.visible;
},
showMenu () {
showMenu() {
if (this.disabled) {
return;
}
Expand All @@ -93,27 +93,27 @@ export default {
this.createPopper(element);
},
hideMenu () {
hideMenu() {
this.$root.$emit('hidden');
this.removePopper();
},
createPopper (element) {
createPopper(element) {
this.removePopper();
this._popper = new Popper(element, this.$refs.menu, {
placement: this.placement
});
},
removePopper () {
removePopper() {
if (this._popper) {
// Ensure popper event listeners are removed cleanly
this._popper.destroy();
}
this._popper = null;
},
closeDropdown (e) {
closeDropdown(e) {
if (!this.$el || this.elementContains(this.$el, e.target) ||
!this._popper || this.elementContains(this._popper, e.target)
) {
Expand All @@ -123,7 +123,7 @@ export default {
this.visible = false;
},
elementContains (elm, otherElm) {
elementContains(elm, otherElm) {
if (typeof elm.contains === 'function') {
return elm.contains(otherElm);
}
Expand Down
20 changes: 10 additions & 10 deletions modules/accounting/assets/src/admin/components/base/FileUpload.vue
Expand Up @@ -23,7 +23,7 @@ const STATUS_FAILED = 3;
export default {
name: 'FileUpload',
data () {
data() {
return {
fileCount: 0,
isUploaded: false,
Expand All @@ -46,7 +46,7 @@ export default {
},
watch: {
value (newVal) {
value(newVal) {
this.uploadedFiles = this.value;
if (!newVal.length) {
Expand All @@ -57,30 +57,30 @@ export default {
},
computed: {
isInitial () {
isInitial() {
return this.currentStatus === STATUS_INITIAL;
},
isSaving () {
isSaving() {
return this.currentStatus === STATUS_SAVING;
},
isSuccess () {
isSuccess() {
return this.currentStatus === STATUS_SUCCESS;
},
isFailed () {
isFailed() {
return this.currentStatus === STATUS_FAILED;
}
},
methods: {
reset () {
reset() {
this.currentStatus = STATUS_INITIAL;
this.uploadedFiles = [];
this.uploadError = null;
},
filesChange (event) {
filesChange(event) {
const formData = new FormData();
const fieldName = event.target.name;
Expand All @@ -100,7 +100,7 @@ export default {
this.upload(formData);
},
upload (formData) {
upload(formData) {
/* global erp_acct_var */
const BASE_URL = erp_acct_var.site_url;
Expand All @@ -119,7 +119,7 @@ export default {
}
},
mounted () {
mounted() {
this.reset();
}
Expand Down

0 comments on commit ccba126

Please sign in to comment.