|
|
@ -22,6 +22,7 @@ interface Prop { |
|
|
|
modelValue?: boolean |
|
|
|
modelValue?: boolean |
|
|
|
cellValue: any |
|
|
|
cellValue: any |
|
|
|
column: any |
|
|
|
column: any |
|
|
|
|
|
|
|
items: number |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<Prop>() |
|
|
|
const props = defineProps<Prop>() |
|
|
@ -135,6 +136,10 @@ onKeyStroke('Escape', () => { |
|
|
|
displayed |
|
|
|
displayed |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
const skeltonCount = computed(() => { |
|
|
|
const skeltonCount = computed(() => { |
|
|
|
|
|
|
|
if (props.items < 10 && childrenListPagination.page === 1) { |
|
|
|
|
|
|
|
return props.items |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (childrenListCount.value < 10 && childrenListPagination.page === 1) { |
|
|
|
if (childrenListCount.value < 10 && childrenListPagination.page === 1) { |
|
|
|
return childrenListCount.value || 10 |
|
|
|
return childrenListCount.value || 10 |
|
|
|
} |
|
|
|
} |
|
|
@ -146,6 +151,13 @@ const skeltonCount = computed(() => { |
|
|
|
return 10 |
|
|
|
return 10 |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const totalItemsToShow = computed(() => { |
|
|
|
|
|
|
|
if (isChildrenLoading) { |
|
|
|
|
|
|
|
return props.items |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return childrenListCount.value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const isDataExist = computed<boolean>(() => { |
|
|
|
const isDataExist = computed<boolean>(() => { |
|
|
|
return childrenList.value?.pageInfo?.totalRows || (isNew.value && state.value?.[colTitle.value]?.length) |
|
|
|
return childrenList.value?.pageInfo?.totalRows || (isNew.value && state.value?.[colTitle.value]?.length) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -283,7 +295,7 @@ const linkOrUnLink = (rowRef: Record<string, string>, id: string) => { |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex flex-row justify-between bg-white relative pt-1"> |
|
|
|
<div class="flex flex-row justify-between bg-white relative pt-1"> |
|
|
|
<div v-if="!isForm" class="flex items-center justify-center px-2 rounded-md text-gray-500 bg-brand-50"> |
|
|
|
<div v-if="!isForm" class="flex items-center justify-center px-2 rounded-md text-gray-500 bg-brand-50"> |
|
|
|
{{ childrenListCount || 0 }} {{ $t('objects.records') }} {{ childrenListCount !== 0 ? $t('general.are') : '' }} |
|
|
|
{{ totalItemsToShow || 0 }} {{ $t('objects.records') }} {{ totalItemsToShow !== 0 ? $t('general.are') : '' }} |
|
|
|
{{ $t('general.linked') }} |
|
|
|
{{ $t('general.linked') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else class="flex items-center justify-center px-2 rounded-md text-gray-500 bg-brand-50"> |
|
|
|
<div v-else class="flex items-center justify-center px-2 rounded-md text-gray-500 bg-brand-50"> |
|
|
|