Skip to content

Commit

Permalink
chore(nc-gui): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshmane7218 committed May 10, 2024
1 parent 934ee8e commit acf46ac
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import type { VNodeRef } from '@vue/runtime-core'
import type { AuditType } from 'nocodb-sdk'
import { timeAgo } from 'nocodb-sdk'
import { Icon } from '@iconify/vue'
const props = defineProps<{
loading: boolean
Expand Down Expand Up @@ -32,7 +31,6 @@ const isCommentMode = ref(false)
const showCommentInputBoxShadow = ref(false)
const focusCommentInput: VNodeRef = (el) => {
if (el) {
if (parseInt((el.$el as HTMLTextAreaElement)?.style?.height ?? '') > 82) {
Expand Down Expand Up @@ -206,8 +204,8 @@ watch(commentsWrapperEl, () => {
</div>

<NcDropdown
placement="bottomRight"
v-if="log.user === user!.email && !editLog"
placement="bottomRight"
overlay-class-name="!min-w-[160px]"
>
<NcButton
Expand All @@ -225,6 +223,7 @@ watch(commentsWrapperEl, () => {
{{ $t('general.edit') }}
</div>
</NcMenuItem>
<!-- eslint-disable vue/no-constant-condition -->
<template v-if="false">
<NcDivider />
<NcMenuItem v-e="['c:row-expand:comment:delete']" class="!text-red-500 !hover:bg-red-50">
Expand Down
4 changes: 2 additions & 2 deletions packages/nc-gui/components/smartsheet/expanded-form/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
isVirtualCol,
} from 'nocodb-sdk'
import type { Ref } from 'vue'
import MdiChevronDown from '~icons/mdi/chevron-down'
import { Drawer } from 'ant-design-vue'
import NcModal from '../../nc/Modal.vue'
import MdiChevronDown from '~icons/mdi/chevron-down'
interface Props {
modelValue?: boolean
Expand Down Expand Up @@ -550,8 +550,8 @@ export default {
:width="commentsDrawer && isUIAllowed('commentList') ? 'min(80vw,1280px)' : 'min(80vw,1280px)'"
class="nc-drawer-expanded-form"
:size="isMobileMode ? 'medium' : 'small'"
@update:visible="onIsExpandedUpdate"
v-bind="modalProps"
@update:visible="onIsExpandedUpdate"
>
<div class="h-[85vh] xs:(max-h-full h-auto) max-h-215 flex flex-col">
<div v-if="isMobileMode" class="flex-none h-4 flex items-center justify-center">
Expand Down
2 changes: 1 addition & 1 deletion packages/nc-gui/components/smartsheet/header/Cell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const onClick = (e: Event) => {
:placement="isExpandedForm ? 'bottomLeft' : 'bottomRight'"
overlay-class-name="nc-dropdown-edit-column"
>
<div v-if="isExpandedForm" @dblclick.stop class="h-[1px]">&nbsp;</div>
<div v-if="isExpandedForm" class="h-[1px]" @dblclick.stop>&nbsp;</div>
<div v-else />

<template #overlay>
Expand Down
2 changes: 1 addition & 1 deletion packages/nc-gui/components/smartsheet/header/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const hideOrShowField = async () => {
},
undo: {
fn: async function undo(id: string, show: boolean) {
const promises = [$api.dbViewColumn.update(view.value!.id!, id, { show: show })]
const promises = [$api.dbViewColumn.update(view.value!.id!, id, { show })]
if (isExpandedForm.value) {
promises.push(getMeta(meta?.value?.id as string, true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const onClick = (e: Event) => {
:placement="isExpandedForm ? 'bottomLeft' : 'bottomRight'"
overlay-class-name="nc-dropdown-edit-column"
>
<div v-if="isExpandedForm" @dblclick.stop class="h-[1px]">&nbsp;</div>
<div v-if="isExpandedForm" class="h-[1px]" @dblclick.stop>&nbsp;</div>
<div v-else />
<template #overlay>
<SmartsheetColumnEditOrAddProvider
Expand Down
2 changes: 1 addition & 1 deletion packages/nc-gui/composables/useExpandedFormStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
// update only new/duplicated/renamed columns value if `onlyNewColumns` is true
if (onlyNewColumns) {
record = Object.keys(record).reduce((acc, curr) => {
if (!row.value.row?.hasOwnProperty(curr)) {
if (!Object.prototype.hasOwnProperty.call(row.value.row, curr)) {
acc[curr] = record[curr]
} else {
acc[curr] = row.value.row[curr]
Expand Down

0 comments on commit acf46ac

Please sign in to comment.