chore: fix prettier

Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
mertmit
2022-07-24 18:13:28 +03:00
parent 718499846a
commit bb861efe97
6 changed files with 18 additions and 32 deletions

View File

@@ -64,7 +64,9 @@
<date-time-picker-cell v-else-if="isDateTime" v-model="localState" ignore-focus v-on="parentListeners" />
<enum-cell
v-else-if="isEnum && ((!isForm && !active) || isLocked || (isPublic && !isForm) || !_isUIAllowed('tableRowUpdate'))"
v-else-if="
isEnum && ((!isForm && !active) || isLocked || (isPublic && !isForm) || !_isUIAllowed('tableRowUpdate'))
"
v-model="localState"
:column="column"
v-on="parentListeners"

View File

@@ -17,14 +17,12 @@ export default {
props: ['value', 'column'],
computed: {
enumValues() {
const opts = (this.column.colOptions)
? this.column.colOptions.options.filter(el => el.title !== '') || []
: [];
const opts = this.column.colOptions ? this.column.colOptions.options.filter(el => el.title !== '') || [] : [];
for (const op of opts.filter(el => el.order === null)) {
op.title = op.title.replace(/^'/, '').replace(/'$/, '');
}
return opts;
}
},
},
};
</script>

View File

@@ -19,9 +19,7 @@ export default {
props: ['value', 'column'],
computed: {
setValues() {
const opts = (this.column.colOptions)
? this.column.colOptions.options.filter(el => el.title !== '') || []
: [];
const opts = this.column.colOptions ? this.column.colOptions.options.filter(el => el.title !== '') || [] : [];
for (const op of opts.filter(el => el.order === null)) {
op.title = op.title.replace(/^'/, '').replace(/'$/, '');
}

View File

@@ -54,7 +54,7 @@ export default {
this.options = this.copyOptions(this.column.colOptions?.options) || [];
// Support for older options
for (const op of this.options.filter(el => el.order === null)) {
op.title = op.title.replace(/^'/, '').replace(/'$/, '')
op.title = op.title.replace(/^'/, '').replace(/'$/, '');
}
},
methods: {
@@ -88,9 +88,7 @@ export default {
};
await this.$api.dbTableColumn.create(this.meta.id, selectCol);
if (this.column.colOptions) {
this.$store
.dispatch('meta/ActLoadMeta', { force: true, id: this.column.fk_model_id })
.then(() => {});
this.$store.dispatch('meta/ActLoadMeta', { force: true, id: this.column.fk_model_id }).then(() => {});
}
this.$toast.success('Select column saved successfully').goAway(3000);
return true;
@@ -113,9 +111,7 @@ export default {
};
await this.$api.dbTableColumn.update(this.column.id, selectCol);
if (this.column.colOptions) {
this.$store
.dispatch('meta/ActLoadMeta', { force: true, id: this.column.fk_model_id })
.then(() => {});
this.$store.dispatch('meta/ActLoadMeta', { force: true, id: this.column.fk_model_id }).then(() => {});
}
return true;
}

View File

@@ -9,7 +9,7 @@
dense
flat
hide-details
:class="`mt-0 ${isForm ? 'form-select': ''}`"
:class="`mt-0 ${isForm ? 'form-select' : ''}`"
:clearable="!column.rqd"
v-on="parentListeners"
>
@@ -55,9 +55,7 @@ export default {
},
},
enumValues() {
const opts = (this.column.colOptions)
? this.column.colOptions.options.filter(el => el.title !== '') || []
: [];
const opts = this.column.colOptions ? this.column.colOptions.options.filter(el => el.title !== '') || [] : [];
for (const op of opts.filter(el => el.order === null)) {
op.title = op.title.replace(/^'/, '').replace(/'$/, '');
}
@@ -105,7 +103,7 @@ export default {
}
.form-select {
.v-select__selections {
border: 1px solid rgba(127,130,139,0.2);
border: 1px solid rgba(127, 130, 139, 0.2);
}
input {
z-index: -1;

View File

@@ -12,7 +12,7 @@
solo
hide-details
deletable-chips
:class="`text-center mt-0 ${isForm ? 'form-select': ''}`"
:class="`text-center mt-0 ${isForm ? 'form-select' : ''}`"
>
<template #selection="data">
<v-chip
@@ -27,15 +27,13 @@
</v-chip>
</template>
<template #item="{item}">
<template #item="{ item }">
<v-chip small :color="item.color">
{{ item.title }}
</v-chip>
</template>
<template #append>
<v-icon small class="mt-1">
mdi-menu-down
</v-icon>
<v-icon small class="mt-1"> mdi-menu-down </v-icon>
</template>
</v-select>
</div>
@@ -59,9 +57,7 @@ export default {
},
},
setValues() {
const opts = (this.column.colOptions)
? this.column.colOptions.options.filter(el => el.title !== '') || []
: [];
const opts = this.column.colOptions ? this.column.colOptions.options.filter(el => el.title !== '') || [] : [];
for (const op of opts.filter(el => el.order === null)) {
op.title = op.title.replace(/^'/, '').replace(/'$/, '');
}
@@ -91,7 +87,6 @@ export default {
</script>
<style scoped lang="scss">
::v-deep {
.v-select {
min-width: 150px;
@@ -99,7 +94,7 @@ export default {
min-height: 38px !important;
}
}
.v-input__slot{
.v-input__slot {
padding-right: 0 !important;
}
.v-input__icon.v-input__icon--clear {
@@ -114,14 +109,13 @@ export default {
}
.form-select {
.v-select__selections {
border: 1px solid rgba(127,130,139,0.2);
border: 1px solid rgba(127, 130, 139, 0.2);
}
input {
z-index: -1;
}
}
}
</style>
<!--
/**