|
|
@ -11,9 +11,9 @@ import { |
|
|
|
defineAsyncComponent, |
|
|
|
defineAsyncComponent, |
|
|
|
inject, |
|
|
|
inject, |
|
|
|
ref, |
|
|
|
ref, |
|
|
|
useProject, |
|
|
|
|
|
|
|
useProvideLTARStore, |
|
|
|
useProvideLTARStore, |
|
|
|
useSmartsheetRowStoreOrThrow, |
|
|
|
useSmartsheetRowStoreOrThrow, |
|
|
|
|
|
|
|
useUIPermission, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
|
import MdiArrowExpand from '~icons/mdi/arrow-expand' |
|
|
|
import MdiArrowExpand from '~icons/mdi/arrow-expand' |
|
|
|
import MdiPlus from '~icons/mdi/plus' |
|
|
|
import MdiPlus from '~icons/mdi/plus' |
|
|
@ -36,11 +36,12 @@ const readOnly = inject(ReadonlyInj, false) |
|
|
|
|
|
|
|
|
|
|
|
const isLocked = inject(IsLockedInj) |
|
|
|
const isLocked = inject(IsLockedInj) |
|
|
|
|
|
|
|
|
|
|
|
const { isSharedBase } = useProject() |
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
|
|
const listItemsDlg = ref(false) |
|
|
|
const listItemsDlg = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const { state, isNew, removeLTARRef } = useSmartsheetRowStoreOrThrow() |
|
|
|
const { state, isNew, removeLTARRef } = useSmartsheetRowStoreOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
const { loadRelatedTableMeta, relatedTablePrimaryValueProp, unlink } = useProvideLTARStore( |
|
|
|
const { loadRelatedTableMeta, relatedTablePrimaryValueProp, unlink } = useProvideLTARStore( |
|
|
|
column as Ref<Required<ColumnType>>, |
|
|
|
column as Ref<Required<ColumnType>>, |
|
|
|
row, |
|
|
|
row, |
|
|
@ -77,7 +78,10 @@ const unlinkRef = async (rec: Record<string, any>) => { |
|
|
|
<ItemChip :item="value" :value="value[relatedTablePrimaryValueProp]" @unlink="unlinkRef(value)" /> |
|
|
|
<ItemChip :item="value" :value="value[relatedTablePrimaryValueProp]" @unlink="unlinkRef(value)" /> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="!readOnly && !isLocked && !isSharedBase" class="flex-1 flex justify-end gap-1 min-h-[30px] align-center"> |
|
|
|
<div |
|
|
|
|
|
|
|
v-if="!readOnly && !isLocked && isUIAllowed('xcDatatableEditable')" |
|
|
|
|
|
|
|
class="flex-1 flex justify-end gap-1 min-h-[30px] align-center" |
|
|
|
|
|
|
|
> |
|
|
|
<component |
|
|
|
<component |
|
|
|
:is="addIcon" |
|
|
|
:is="addIcon" |
|
|
|
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 select-none group-hover:(text-gray-500) nc-plus" |
|
|
|
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 select-none group-hover:(text-gray-500) nc-plus" |
|
|
|