Browse Source

fix: show inputs for formula type by default

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/743/head
Pranav C 3 years ago
parent
commit
36b29d4388
  1. 32
      packages/nc-gui/components/project/spreadsheet/components/editColumn.vue
  2. 13
      packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue

32
packages/nc-gui/components/project/spreadsheet/components/editColumn.vue

@ -109,9 +109,9 @@
class="pointer grey--text text-right caption nc-more-options" class="pointer grey--text text-right caption nc-more-options"
@click="advanceOptions = !advanceOptions" @click="advanceOptions = !advanceOptions"
> >
More options {{ advanceOptions ? 'Hide' : 'Show more' }} options
<v-icon small> <v-icon x-small color="grey">
mdi-menu-{{ advanceOptions ? 'up' : 'down' }} mdi-{{ advanceOptions ? 'minus' : 'plus' }}-circle-outline
</v-icon> </v-icon>
</div> </div>
</v-col> </v-col>
@ -368,18 +368,18 @@
v-on="$listeners" v-on="$listeners"
/> />
<!-- <v-autocomplete <!-- <v-autocomplete
label="Formula" label="Formula"
hide-details hide-details
class="caption formula-type" class="caption formula-type"
outlined outlined
dense dense
:items="formulas" :items="formulas"
> >
<template #item="{item}"> <template #item="{item}">
<span class="green&#45;&#45;text text&#45;&#45;darken-2 caption font-weight-regular">{{ item }}</span> <span class="green&#45;&#45;text text&#45;&#45;darken-2 caption font-weight-regular">{{ item }}</span>
</template> </template>
</v-autocomplete>--> </v-autocomplete>-->
</v-col> </v-col>
</template> </template>
</v-row> </v-row>
@ -449,7 +449,7 @@ export default {
}), }),
computed: { computed: {
accordion() { accordion() {
return ![UITypes.LinkToAnotherRecord, UITypes.Lookup, UITypes.Rollup, UITypes.SpecificDBType].includes(this.newColumn && this.newColumn.uidt) return ![UITypes.LinkToAnotherRecord, UITypes.Lookup, UITypes.Rollup, UITypes.SpecificDBType, UITypes.Formula].includes(this.newColumn && this.newColumn.uidt)
}, },
uiTypes() { uiTypes() {
return uiTypes.filter(t => !this.editColumn || !t.virtual) return uiTypes.filter(t => !this.editColumn || !t.virtual)

13
packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue

@ -243,6 +243,7 @@ import VirtualHeaderCell from '../components/virtualHeaderCell'
import colors from '@/mixins/colors' import colors from '@/mixins/colors'
import TableCell from '@/components/project/spreadsheet/components/cell' import TableCell from '@/components/project/spreadsheet/components/cell'
import DynamicStyle from '@/components/dynamicStyle' import DynamicStyle from '@/components/dynamicStyle'
import { UITypes } from '~/components/project/spreadsheet/helpers/uiTypes'
export default { export default {
name: 'XcGridView', name: 'XcGridView',
@ -512,12 +513,12 @@ export default {
} }
}, },
enableEditable(column) { enableEditable(column) {
return ((column && column.uidt === 'Attachment') || return ((column && column.uidt === UITypes.Attachment) ||
(column && column.uidt === 'SingleSelect') || (column && column.uidt === UITypes.SingleSelect) ||
(column && column.uidt === 'MultiSelect') || (column && column.uidt === UITypes.MultiSelect) ||
(column && column.uidt === 'DateTime') || (column && column.uidt === UITypes.DateTime) ||
(column && column.uidt === 'Date') || (column && column.uidt === UITypes.Date) ||
(column && column.uidt === 'Time') || (column && column.uidt === UITypes.Time) ||
(this.sqlUi && this.sqlUi.getAbstractType(column) === 'boolean') (this.sqlUi && this.sqlUi.getAbstractType(column) === 'boolean')
) )
}, },

Loading…
Cancel
Save