Browse Source

Merge branch 'develop' into fix/frm

pull/6500/head
WK Wong 1 year ago
parent
commit
9a6b34483a
  1. 6
      packages/nc-gui/components/smartsheet/grid/newFile.ts
  2. 5
      packages/nc-gui/composables/useViewFilters.ts
  3. 10
      packages/nc-gui/composables/useViewGroupBy.ts
  4. 5
      packages/nc-gui/pages/reset/[id].vue
  5. 3
      packages/nocodb/src/db/BaseModelSqlv2.ts

6
packages/nc-gui/components/smartsheet/grid/newFile.ts

@ -1,4 +1,4 @@
import { JsonExpandInj, provide } from '#imports';
import { isJsonExpand } from './Table.vue';
import { isJsonExpand } from './Table.vue'
import { JsonExpandInj, provide } from '#imports'
provide(JsonExpandInj, isJsonExpand);
provide(JsonExpandInj, isJsonExpand)

5
packages/nc-gui/composables/useViewFilters.ts

@ -1,7 +1,7 @@
import type { ColumnType, FilterType, LinkToAnotherRecordType, LookupType, ViewType } from 'nocodb-sdk'
import type { ComputedRef, Ref } from 'vue'
import type { SelectProps } from 'ant-design-vue'
import { RelationTypes, UITypes, isSystemColumn } from 'nocodb-sdk'
import { UITypes, isSystemColumn } from 'nocodb-sdk'
import {
ActiveViewInj,
IsPublicInj,
@ -440,10 +440,9 @@ export function useViewFilters(
for (const col of meta.value?.columns || []) {
if (col.uidt !== UITypes.Lookup) continue
let nextCol = col
let btLookup = true
// check all the relation of nested lookup columns is bt or not
// include the column only if all only if all relations are bt
while (btLookup && nextCol && nextCol.uidt === UITypes.Lookup) {
while (nextCol && nextCol.uidt === UITypes.Lookup) {
const lookupRelation = (await getMeta(nextCol.fk_model_id))?.columns?.find(
(c) => c.id === (nextCol.colOptions as LookupType).fk_relation_column_id,
)

10
packages/nc-gui/composables/useViewGroupBy.ts

@ -164,7 +164,7 @@ export const useViewGroupBy = (view: Ref<ViewType | undefined>, where?: Computed
const groupby = groupBy.value[group.nestedIn.length]
const nestedWhere = calculateNestedWhere(group.nestedIn, where?.value)
if (!groupby || !(groupby.column.title)) return
if (!groupby || !groupby.column.title) return
if (isPublic.value && !sharedView.value?.uuid) {
return
@ -203,16 +203,16 @@ export const useViewGroupBy = (view: Ref<ViewType | undefined>, where?: Computed
}
if (groupby.column.title && groupby.column.uidt) {
acc.push({
key: valueToTitle(curr[(groupby.column.title)!], groupby.column),
key: valueToTitle(curr[groupby.column.title!], groupby.column),
column: groupby.column,
count: +curr.count,
color: findKeyColor(curr[(groupby.column.title)!], groupby.column),
color: findKeyColor(curr[groupby.column.title!], groupby.column),
nestedIn: [
...group!.nestedIn,
{
title: groupby.column.title,
column_name: (groupby.column.title)!,
key: valueToTitle(curr[(groupby.column.title)!], groupby.column),
column_name: groupby.column.title!,
key: valueToTitle(curr[groupby.column.title!], groupby.column),
column_uidt: groupby.column.uidt,
},
],

5
packages/nc-gui/pages/reset/[id].vue

@ -8,7 +8,6 @@ import {
reactive,
ref,
useApi,
useI18n,
useRoute,
useRouter,
} from '#imports'
@ -27,8 +26,6 @@ const form = reactive({
newPassword: '',
})
const { t } = useI18n()
const formValidator = ref()
async function resetPassword() {
@ -71,13 +68,11 @@ function resetError() {
<div class="self-center flex flex-col justify-center items-center text-center gap-2">
<h1 class="prose-2xl font-bold my-4 w-full">{{ $t('title.resetPassword') }}</h1>
<template>
<div class="prose-sm text-success flex items-center leading-8 gap-2">
{{ $t('msg.info.passwordRecovery.success') }} <ClaritySuccessLine />
</div>
<nuxt-link to="/signin">{{ $t('general.signIn') }}</nuxt-link>
</template>
</div>
<a-form ref="formValidator" layout="vertical" :model="form" no-style @finish="resetPassword">

3
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -692,7 +692,7 @@ class BaseModelSqlv2 {
);
groupBySelectors.push(sanitize(column.title));
break;
case UITypes.Formula:
case UITypes.Formula: {
let selectQb;
try {
const _selectQb = await this.getSelectQueryBuilderForFormula(
@ -714,6 +714,7 @@ class BaseModelSqlv2 {
selectors.push(selectQb);
groupBySelectors.push(column.title);
break;
}
case UITypes.Lookup:
{
const _selectQb = await generateBTLookupSelectQuery({

Loading…
Cancel
Save