Remove laravel pagination from contract table / ClientCase view and used replacing it with client pagination
This commit is contained in:
@@ -489,7 +489,7 @@ const availableSegmentsCount = computed(() => {
|
||||
:empty-icon="faFolderOpen"
|
||||
empty-text="Ni pogodb"
|
||||
empty-description="Za ta primer še ni ustvarjenih pogodb. Ustvarite novo pogodbo za začetek."
|
||||
:show-pagination="false"
|
||||
:show-pagination="true"
|
||||
:show-toolbar="true"
|
||||
:hoverable="true"
|
||||
>
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
const props = defineProps({
|
||||
client: Object,
|
||||
client_case: Object,
|
||||
contracts: Object, // Resource Collection with data/links/meta
|
||||
contracts: { type: Array, default: () => [] }, // Resource Collection with data/links/meta
|
||||
activities: Object, // Resource Collection with data/links/meta
|
||||
contract_types: Array,
|
||||
account_types: { type: Array, default: () => [] },
|
||||
@@ -46,7 +46,7 @@ const props = defineProps({
|
||||
|
||||
// Extract contracts array from Resource Collection
|
||||
const contractsArray = computed(() => {
|
||||
return props.contracts?.data || [];
|
||||
return props.contracts || [];
|
||||
});
|
||||
|
||||
// Contracts are always paginated now (Resource Collection)
|
||||
@@ -356,19 +356,6 @@ const submitAttachSegment = () => {
|
||||
@create="openDrawerCreateContract"
|
||||
@attach-segment="openAttachSegment"
|
||||
/>
|
||||
<div v-if="contractsPaginated" class="border-t border-gray-200 p-4">
|
||||
<Pagination
|
||||
:links="contracts.links"
|
||||
:from="contracts.from"
|
||||
:to="contracts.to"
|
||||
:total="contracts.total"
|
||||
:per-page="contracts.per_page || 50"
|
||||
:last-page="contracts.last_page"
|
||||
:current-page="contracts.current_page"
|
||||
per-page-param="contracts_per_page"
|
||||
page-param="contracts_page"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user