Bug 38201: Restore subscriptions and allow appendToShow to ignore panes where required
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
023e6f31bb
commit
d8452a72d9
|
|
@ -150,11 +150,19 @@ export default {
|
|||
resource: resource.value,
|
||||
additionalProps: additionalProps.value,
|
||||
})
|
||||
?.filter(field => field.hidden(resource.value))
|
||||
?.filter(
|
||||
field =>
|
||||
!field.hidden ||
|
||||
(field.hidden && field.hidden(resource.value))
|
||||
)
|
||||
.map(field => {
|
||||
return {
|
||||
name: field.name,
|
||||
fields: [field],
|
||||
...(props.instancedResource.showGroupsDisplayMode ===
|
||||
"splitScreen"
|
||||
? { splitPane: field.splitPane }
|
||||
: {}),
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,12 @@
|
|||
</template>
|
||||
</template>
|
||||
<template v-else-if="attribute?.type === 'component'">
|
||||
<template v-if="attribute.hidden && attribute.hidden(resource)">
|
||||
<template
|
||||
v-if="
|
||||
!attribute.hidden ||
|
||||
(attribute.hidden && attribute.hidden(resource))
|
||||
"
|
||||
>
|
||||
<label v-if="attribute.label">{{ attribute.label }}:</label>
|
||||
<component
|
||||
:is="requiredComponent"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="row">
|
||||
<div class="row" style="margin-bottom: 0.9em">
|
||||
<div class="col-sm-6">
|
||||
<slot
|
||||
name="splitPane"
|
||||
|
|
@ -13,6 +13,12 @@
|
|||
></slot>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="determineGroupsForPane(null).length > 0">
|
||||
<slot
|
||||
name="splitPane"
|
||||
:paneFieldList="determineGroupsForPane(null)"
|
||||
></slot>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -957,11 +957,11 @@ export default {
|
|||
value: $__("contracts"),
|
||||
},
|
||||
},
|
||||
splitPane: null,
|
||||
},
|
||||
{
|
||||
type: "component",
|
||||
name: $__("Subscription details"),
|
||||
hidden: vendor => vendor.subscriptions_count,
|
||||
componentPath:
|
||||
"@koha-vue/components/Vendors/VendorSubscriptions.vue",
|
||||
componentProps: {
|
||||
|
|
@ -969,6 +969,7 @@ export default {
|
|||
type: "resource",
|
||||
},
|
||||
},
|
||||
splitPane: "right",
|
||||
},
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -480,6 +480,9 @@ export function useBaseResource(resourceConfig) {
|
|||
);
|
||||
if (splitScreenGrouping) {
|
||||
groupInfo.splitPane = splitScreenGrouping.pane;
|
||||
} else {
|
||||
// Default to left
|
||||
groupInfo.splitPane = "left";
|
||||
}
|
||||
}
|
||||
if (component === "Show" && resource) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue