Browse Source

chore(gui-v2): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2991/head
Pranav C 2 years ago
parent
commit
6ec63d9f9b
  1. 7
      packages/nc-gui-v2/components/smartsheet-header/CellIcon.vue
  2. 4
      packages/nc-gui-v2/components/smartsheet/Cell.vue
  3. 2
      packages/nc-gui-v2/composables/useColumnCreateStore.ts

7
packages/nc-gui-v2/components/smartsheet-header/CellIcon.vue

@ -11,11 +11,10 @@ import WebIcon from '~icons/mdi/web'
import TextAreaIcon from '~icons/mdi/card-text-outline' import TextAreaIcon from '~icons/mdi/card-text-outline'
import StringIcon from '~icons/mdi/alpha-a-box-outline' import StringIcon from '~icons/mdi/alpha-a-box-outline'
import BooleanIcon from '~icons/mdi/check-box-outline' import BooleanIcon from '~icons/mdi/check-box-outline'
import YearIcon from '~icons/mdi/calendar' import CalendarIcon from '~icons/mdi/calendar'
import SingleSelectIcon from '~icons/mdi/radiobox-marked' import SingleSelectIcon from '~icons/mdi/radiobox-marked'
import MultiSelectIcon from '~icons/mdi/checkbox-multiple-marked' import MultiSelectIcon from '~icons/mdi/checkbox-multiple-marked'
import DatetimeIcon from '~icons/mdi/calendar-clock' import DatetimeIcon from '~icons/mdi/calendar-clock'
import DateIcon from '~icons/mdi/calendar'
import RatingIcon from '~icons/mdi/star' import RatingIcon from '~icons/mdi/star'
import GenericIcon from '~icons/mdi/square-rounded' import GenericIcon from '~icons/mdi/square-rounded'
import NumericIcon from '~icons/mdi/numeric' import NumericIcon from '~icons/mdi/numeric'
@ -37,7 +36,7 @@ const icon = computed(() => {
} else if (additionalColMeta.isJSON) { } else if (additionalColMeta.isJSON) {
return JSONIcon return JSONIcon
} else if (additionalColMeta.isDate) { } else if (additionalColMeta.isDate) {
return DateIcon return CalendarIcon
} else if (additionalColMeta.isDateTime) { } else if (additionalColMeta.isDateTime) {
return DatetimeIcon return DatetimeIcon
} else if (additionalColMeta.isSet) { } else if (additionalColMeta.isSet) {
@ -51,7 +50,7 @@ const icon = computed(() => {
} else if (additionalColMeta.isEmail) { } else if (additionalColMeta.isEmail) {
return EmailIcon return EmailIcon
} else if (additionalColMeta.isYear) { } else if (additionalColMeta.isYear) {
return YearIcon return CalendarIcon
} else if (additionalColMeta.isTime) { } else if (additionalColMeta.isTime) {
return ClockIcon return ClockIcon
} else if (additionalColMeta.isRating) { } else if (additionalColMeta.isRating) {

4
packages/nc-gui-v2/components/smartsheet/Cell.vue

@ -21,12 +21,10 @@ const emit = defineEmits(['update:modelValue', 'save'])
provide(ColumnInj, column) provide(ColumnInj, column)
provide(EditModeInj, toRef(props, 'editEnabled')) provide(EditModeInj, toRef(props, 'editEnabled'))
let changed = $ref(false) let changed = $ref(false)
const syncValue = useDebounceFn(function() { const syncValue = useDebounceFn(function () {
emit('save') emit('save')
}, 1000) }, 1000)

2
packages/nc-gui-v2/composables/useColumnCreateStore.ts

@ -89,7 +89,6 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
formState.value = { meta: {}, ...sqlUi.value.getNewColumn((meta.value.columns?.length || 0) + 1) } formState.value = { meta: {}, ...sqlUi.value.getNewColumn((meta.value.columns?.length || 0) + 1) }
} }
const onUidtOrIdTypeChange = () => { const onUidtOrIdTypeChange = () => {
const { isCurrency } = useColumn(formState.value as ColumnType) const { isCurrency } = useColumn(formState.value as ColumnType)
@ -174,7 +173,6 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
} }
const addOrUpdate = async (onSuccess: () => {}) => { const addOrUpdate = async (onSuccess: () => {}) => {
try { try {
console.log(formState, validators) console.log(formState, validators)
if (!(await validate())) return if (!(await validate())) return

Loading…
Cancel
Save