Browse Source

chore: lint

pull/7304/head
Pranav C 10 months ago
parent
commit
8532bb1bf8
  1. 2
      packages/nc-gui/components/smartsheet/Cell.vue
  2. 23
      packages/nc-gui/components/smartsheet/Form.vue
  3. 5
      packages/nc-gui/components/smartsheet/VirtualCell.vue
  4. 2
      packages/nc-gui/components/smartsheet/header/Cell.vue
  5. 11
      packages/nc-gui/components/template/Editor.vue
  6. 2
      packages/nocodb/src/db/conditionV2.ts
  7. 2
      packages/nocodb/src/db/sortV2.ts
  8. 4
      packages/nocodb/src/services/columns.service.ts

2
packages/nc-gui/components/smartsheet/Cell.vue

@ -1,6 +1,6 @@
<script setup lang="ts">
import type { ColumnType } from 'nocodb-sdk'
import { isCreatedTimeOrUpdatedTimeCol, isSystemColumn } from 'nocodb-sdk'
import { isSystemColumn } from 'nocodb-sdk'
import {
ActiveCellInj,
ColumnInj,

23
packages/nc-gui/components/smartsheet/Form.vue

@ -1,23 +1,23 @@
<script setup lang="ts">
import Draggable from 'vuedraggable'
import {getSystemColumns, isLinksOrLTAR, isVirtualCol, RelationTypes, UITypes, ViewTypes} from 'nocodb-sdk'
import type {Permission} from '#imports'
import { RelationTypes, UITypes, ViewTypes, getSystemColumns, isLinksOrLTAR, isVirtualCol } from 'nocodb-sdk'
import type { Permission } from '#imports'
import {
ActiveViewInj,
IsFormInj,
IsGalleryInj,
MetaInj,
ReloadViewDataHookInj,
computed,
createEventHook,
extractSdkResponseErrorMsg,
iconMap,
inject,
IsFormInj,
IsGalleryInj,
message,
MetaInj,
onClickOutside,
provide,
reactive,
ref,
ReloadViewDataHookInj,
useDebounceFn,
useGlobal,
useI18n,
@ -34,7 +34,16 @@ provide(IsGalleryInj, ref(false))
// todo: generate hideCols based on default values
const hiddenCols = ['created_at', 'updated_at']
const hiddenColTypes = [UITypes.Rollup, UITypes.Lookup, UITypes.Formula, UITypes.QrCode, UITypes.Barcode, UITypes.SpecificDBType, UITypes.CreatedTime, UITypes.LastModifiedTime]
const hiddenColTypes = [
UITypes.Rollup,
UITypes.Lookup,
UITypes.Formula,
UITypes.QrCode,
UITypes.Barcode,
UITypes.SpecificDBType,
UITypes.CreatedTime,
UITypes.LastModifiedTime,
]
const { isMobileMode, user } = useGlobal()

5
packages/nc-gui/components/smartsheet/VirtualCell.vue

@ -115,7 +115,10 @@ onUnmounted(() => {
<LazyVirtualCellBarcode v-else-if="isBarcode(column)" />
<LazyVirtualCellCount v-else-if="isCount(column)" />
<LazyVirtualCellLookup v-else-if="isLookup(column)" />
<LazyCellReadOnlyDateTimePicker v-else-if="isCreatedTimeOrUpdatedTimeCol(column)" :model-value="row && row.row && row.row[column.title]" />
<LazyCellReadOnlyDateTimePicker
v-else-if="isCreatedTimeOrUpdatedTimeCol(column)"
:model-value="row && row.row && row.row[column.title]"
/>
</template>
</div>
</template>

2
packages/nc-gui/components/smartsheet/header/Cell.vue

@ -1,5 +1,3 @@
<script setup lang="ts">
import type { ColumnReqType, ColumnType } from 'nocodb-sdk'
import { ColumnInj, IsExpandedFormOpenInj, IsFormInj, IsKanbanInj, inject, provide, ref, toRef, useRoles } from '#imports'

11
packages/nc-gui/components/template/Editor.vue

@ -100,9 +100,14 @@ const uiTypeOptions = ref<Option[]>(
.filter(
(uiType) =>
!isVirtualCol(UITypes[uiType]) &&
![UITypes.ForeignKey, UITypes.ID, UITypes.CreatedTime, UITypes.LastModifiedTime, UITypes.Barcode, UITypes.Button].includes(
UITypes[uiType],
),
![
UITypes.ForeignKey,
UITypes.ID,
UITypes.CreatedTime,
UITypes.LastModifiedTime,
UITypes.Barcode,
UITypes.Button,
].includes(UITypes[uiType]),
)
.map<Option>((uiType) => ({
value: uiType,

2
packages/nocodb/src/db/conditionV2.ts

@ -21,7 +21,7 @@ import { sanitize } from '~/helpers/sqlSanitize';
import Filter from '~/models/Filter';
import generateLookupSelectQuery from '~/db/generateLookupSelectQuery';
import { getAliasGenerator } from '~/utils';
import {getRefColumnIfAlias} from "~/helpers";
import { getRefColumnIfAlias } from '~/helpers';
// tod: tobe fixed
// extend(customParseFormat);

2
packages/nocodb/src/db/sortV2.ts

@ -8,7 +8,7 @@ import genRollupSelectv2 from '~/db/genRollupSelectv2';
import { sanitize } from '~/helpers/sqlSanitize';
import { Base, BaseUser, Sort } from '~/models';
import generateLookupSelectQuery from '~/db/generateLookupSelectQuery';
import {getRefColumnIfAlias} from "~/helpers";
import { getRefColumnIfAlias } from '~/helpers';
export default async function sortV2(
baseModelSqlv2: BaseModelSqlv2,

4
packages/nocodb/src/services/columns.service.ts

@ -1701,7 +1701,9 @@ export class ColumnsService {
if (!existingColumn) {
columnName =
colBody.uidt === UITypes.CreatedTime ? 'created_at' : 'updated_at';
colBody.uidt === UITypes.CreatedTime
? 'created_at'
: 'updated_at';
// const sqlClient = await reuseOrSave('sqlClient', reuse, async () =>
// NcConnectionMgrv2.getSqlClient(source),
// );

Loading…
Cancel
Save