Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nc feat/links from existing cols #8367

Merged
merged 70 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
826905c
feat: custom link creation
pranavxc Jul 12, 2024
fa0f7f0
feat: custom relation
pranavxc Jul 12, 2024
6155444
feat: custom relation - WIP
pranavxc Jul 12, 2024
00ead02
fix: reload meta after link creation
pranavxc Jul 12, 2024
f338125
fix: avoid deleting foreign key when it's a custom link
pranavxc Jul 12, 2024
47b68a4
refactor: avoid nested blocks
pranavxc Jul 12, 2024
b2d8b9f
fix: move fk column delete inside condition block
pranavxc Jul 12, 2024
0ee27e7
feat: relation across bases
pranavxc Jul 12, 2024
fee1e95
fix: one-to-one excluded list issue
pranavxc Jul 12, 2024
4eb9260
fix: belongs to link delete issue
pranavxc Jul 12, 2024
3bcbc2c
fix: lookup - interbase link
pranavxc Jul 12, 2024
94f8651
fix: groupby - interbase link/lookup
pranavxc Jul 12, 2024
849c4a7
fix: extract base id from model meta since it can belongs to npn-acti…
pranavxc Jul 12, 2024
aa8aeb9
feat: update new data link api
pranavxc Jul 12, 2024
d4dbf97
fix(nc-gui): change relation type ui from edit column modal
rameshmane7218 Jul 12, 2024
16e13e1
feat(nc-gui): update relation type ui with new design
rameshmane7218 Jul 12, 2024
f54ef63
fix(nc-gui): add relation settings tables
rameshmane7218 Jul 12, 2024
ff06da8
feat(nc-gui): update advance link field modal with new design
rameshmane7218 Jul 12, 2024
e5eb471
fix(nc-gui): use grayscale base icon in relation settings field modal
rameshmane7218 Jul 12, 2024
1b04bac
fix(nc-gui): on toggle validate field error
rameshmane7218 Jul 12, 2024
1936d31
fix(nc-gui): optimize nc select component
rameshmane7218 Jul 12, 2024
6e9b5e9
fix(nc-gui): replace component a-select with NcSelect
rameshmane7218 Jul 12, 2024
817af0e
fix(nc-gui): add advance relation setting table connection line
rameshmane7218 Jul 12, 2024
e77fd0c
fix(nc-gui): remove unwanted file
rameshmane7218 Jul 12, 2024
53015b1
fix(nc-gui): relation settings tables changes
rameshmane7218 Jul 12, 2024
8df1ecd
fix(nc-gui): resize icons size to align with text size
rameshmane7218 Jul 12, 2024
66eeaaf
fix(nc-gui): update chevron icon size
rameshmane7218 Jul 12, 2024
fdf42d2
test: unit test
pranavxc Jul 12, 2024
ea7c0d2
test: playwright test - WIP
pranavxc Jul 12, 2024
a21c2fd
test: playwright test - WIP
pranavxc Jul 12, 2024
412def2
test: fix typo
dstala Jul 12, 2024
d967388
fix: check column is associated with any link before deleting
pranavxc Jul 12, 2024
0039658
fix: allow columns as foreign key when abstract types matches
pranavxc Jul 12, 2024
c48b3da
test: corrections
pranavxc Jul 12, 2024
757cd4e
test: unit test corrections
pranavxc Jul 12, 2024
ef1febb
fix: null handling
pranavxc Jul 12, 2024
4843a60
fix: delete custom relation on junction table delete/ fk column delete
pranavxc Jul 12, 2024
451bfa3
fix: show error while deleting junction table used in a custom relation
pranavxc Jul 12, 2024
8e62601
fix: show error while deleting column used in a custom relation
pranavxc Jul 12, 2024
a6d4108
fix: show error while deleting column used in a custom relation
pranavxc Jul 12, 2024
e3333f4
fix: disable duplicate option for custom link
pranavxc Jul 12, 2024
628c50e
fix: column deletion correction
pranavxc Jul 12, 2024
d4ba374
fix: column deletion correction
pranavxc Jul 12, 2024
540aa30
fix: include error code
pranavxc Jul 12, 2024
81c6232
fix: check column within same table first
pranavxc Jul 12, 2024
82c9719
fix: get relation column information properly
pranavxc Jul 12, 2024
90f2f3d
fix: proper use of xcCondition
pranavxc Jul 12, 2024
6e62578
fix: rebase corrections
pranavxc Jul 12, 2024
6826ceb
fix: delete column from related table, exclude system fields from option
pranavxc Jul 12, 2024
9b8e354
fix: handle null case
pranavxc Jul 12, 2024
3a048b3
refactor: cleanup
pranavxc Jul 12, 2024
bc1bbfa
test: disable advance options
dstala Jul 12, 2024
711ef06
test: fix mm-hm order
dstala Jul 12, 2024
9d93060
refactor: use `tables` reactive var and if not found then look in metas
pranavxc Jul 12, 2024
57c9ea3
chore: lint
pranavxc Jul 12, 2024
a789757
fix: import statement correction
pranavxc Jul 12, 2024
bce5ab6
feat: add warning slot
pranavxc Jul 12, 2024
2e5c4d0
chore: lint
pranavxc Jul 12, 2024
bc2fb97
fix: add context params wherever missing
pranavxc Jul 12, 2024
42d6241
fix: GUI corrections
pranavxc Jul 12, 2024
d1e43f6
test: add context in unit test
pranavxc Jul 12, 2024
ffc21cd
test: add context in unit test
pranavxc Jul 12, 2024
6759a2a
fix: pass proper context
pranavxc Jul 12, 2024
21c2ff8
fix: exclude unsupported columns
pranavxc Jul 12, 2024
9908e36
fix: MFE - custom link creation
pranavxc Jul 12, 2024
3eaa2d9
fix: link audit - handle if relation is between non-pk columns
pranavxc Jul 12, 2024
68b21e1
fix: link audit - handle if relation is between non-pk columns
pranavxc Jul 12, 2024
6fe6e00
fix: link audit - handle if relation is between non-pk columns
pranavxc Jul 12, 2024
d1dd7b0
refactor: coderabbit suggestions
pranavxc Jul 12, 2024
88668cb
chore: lint
pranavxc Jul 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/nc-gui/components/general/DeleteModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ onKeyStroke('Enter', () => {
</div>

<slot name="entity-preview"></slot>

<template v-if="$slots.warning">
<a-alert type="warning" show-icon>
<template #message>
<slot name="warning"></slot>
</template>
</a-alert>
</template>
<div class="flex flex-row gap-x-2 mt-2.5 pt-2.5 justify-end">
<NcButton type="secondary" size="small" @click="visible = false">
{{ $t('general.cancel') }}
Expand Down
46 changes: 23 additions & 23 deletions packages/nc-gui/components/nc/Select.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
<script lang="ts" setup>
const props = defineProps<{
value?: string | string[]
placeholder?: string
mode?: 'multiple' | 'tags'
size?: 'small' | 'middle' | 'large'
dropdownClassName?: string
showSearch?: boolean
// filterOptions is a function
filterOption?: (input: string, option: any) => boolean
dropdownMatchSelectWidth?: boolean
allowClear?: boolean
loading?: boolean
}>()
import type { iconMap } from '#imports'

const props = withDefaults(
defineProps<{
value?: string | string[]
placeholder?: string
mode?: 'multiple' | 'tags'
size?: 'small' | 'middle' | 'large'
dropdownClassName?: string
showSearch?: boolean
// filterOptions is a function
filterOption?: (input: string, option: any) => boolean
dropdownMatchSelectWidth?: boolean
allowClear?: boolean
loading?: boolean
suffixIcon?: keyof typeof iconMap
}>(),
{
suffixIcon: 'arrowDown',
},
)

const emits = defineEmits(['update:value', 'change'])

Expand All @@ -25,15 +33,7 @@ const dropdownClassName = computed(() => {
return className
})

const showSearch = computed(() => props.showSearch)

const filterOption = computed(() => props.filterOption)

const dropdownMatchSelectWidth = computed(() => props.dropdownMatchSelectWidth)

const loading = computed(() => props.loading)

const mode = computed(() => props.mode)
const { showSearch, filterOption, dropdownMatchSelectWidth, loading, mode } = toRefs(props)

const vModel = useVModel(props, 'value', emits)

Expand All @@ -60,7 +60,7 @@ const onChange = (value: string) => {
>
<template #suffixIcon>
<GeneralLoader v-if="loading" />
<GeneralIcon v-else class="text-gray-800 nc-select-expand-btn" icon="arrowDown" />
<GeneralIcon v-else class="text-gray-800 nc-select-expand-btn" :icon="suffixIcon" />
</template>
<slot />
</a-select>
Expand Down
6 changes: 5 additions & 1 deletion packages/nc-gui/components/smartsheet/Cell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ const { currentRow } = useSmartsheetRowStoreOrThrow()

const { sqlUis } = storeToRefs(useBase())

const sqlUi = ref(column.value?.source_id ? sqlUis.value[column.value?.source_id] : Object.values(sqlUis.value)[0])
const sqlUi = ref(
column.value?.source_id && sqlUis.value[column.value?.source_id]
? sqlUis.value[column.value?.source_id]
: Object.values(sqlUis.value)[0],
pranavxc marked this conversation as resolved.
Show resolved Hide resolved
)

const abstractType = computed(() => column.value && sqlUi.value.getAbstractType(column.value))

Expand Down
6 changes: 5 additions & 1 deletion packages/nc-gui/components/smartsheet/PlainCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ const { basesUser } = storeToRefs(basesStore)

const { isXcdbBase, isMssql, isMysql } = useBase()

const sqlUi = ref(column.value?.source_id ? sqlUis.value[column.value?.source_id] : Object.values(sqlUis.value)[0])
const sqlUi = ref(
column.value?.source_id && sqlUis.value[column.value?.source_id]
? sqlUis.value[column.value?.source_id]
: Object.values(sqlUis.value)[0],
)

const abstractType = computed(() => column.value && sqlUi.value.getAbstractType(column.value))

Expand Down
1 change: 1 addition & 0 deletions packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ const isFullUpdateAllowed = computed(() => {
'min-w-[500px]': formState.uidt === UITypes.LinkToAnotherRecord || formState.uidt === UITypes.Links,
'overflow-visible': formState.uidt === UITypes.Formula,
'!w-[600px]': formState.uidt === UITypes.LinkToAnotherRecord || formState.uidt === UITypes.Links,
'min-w-[422px] !w-full': isLinksOrLTAR(formState.uidt),
'shadow-lg shadow-gray-300 border-1 border-gray-200 rounded-xl p-5': !embedMode,
}"
@keydown="handleEscape"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts">
defineProps<{
value: any
}>()
</script>

<template>
<span></span>
</template>
Loading
Loading