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"> <script setup lang="ts">
import type { ColumnType } from 'nocodb-sdk' import type { ColumnType } from 'nocodb-sdk'
import { isCreatedTimeOrUpdatedTimeCol, isSystemColumn } from 'nocodb-sdk' import { isSystemColumn } from 'nocodb-sdk'
import { import {
ActiveCellInj, ActiveCellInj,
ColumnInj, ColumnInj,

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

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

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

@ -115,7 +115,10 @@ onUnmounted(() => {
<LazyVirtualCellBarcode v-else-if="isBarcode(column)" /> <LazyVirtualCellBarcode v-else-if="isBarcode(column)" />
<LazyVirtualCellCount v-else-if="isCount(column)" /> <LazyVirtualCellCount v-else-if="isCount(column)" />
<LazyVirtualCellLookup v-else-if="isLookup(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> </template>
</div> </div>
</template> </template>

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

@ -1,5 +1,3 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ColumnReqType, ColumnType } from 'nocodb-sdk' import type { ColumnReqType, ColumnType } from 'nocodb-sdk'
import { ColumnInj, IsExpandedFormOpenInj, IsFormInj, IsKanbanInj, inject, provide, ref, toRef, useRoles } from '#imports' 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( .filter(
(uiType) => (uiType) =>
!isVirtualCol(UITypes[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) => ({ .map<Option>((uiType) => ({
value: 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 Filter from '~/models/Filter';
import generateLookupSelectQuery from '~/db/generateLookupSelectQuery'; import generateLookupSelectQuery from '~/db/generateLookupSelectQuery';
import { getAliasGenerator } from '~/utils'; import { getAliasGenerator } from '~/utils';
import {getRefColumnIfAlias} from "~/helpers"; import { getRefColumnIfAlias } from '~/helpers';
// tod: tobe fixed // tod: tobe fixed
// extend(customParseFormat); // extend(customParseFormat);

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

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

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

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

Loading…
Cancel
Save