refactor(plugin-workflow): hide unused form in manual ui after done (#2526)
This commit is contained in:
parent
42acff6c75
commit
54692387d0
@ -47,7 +47,7 @@ export function FormBlockProvider(props) {
|
|||||||
const resource = api.resource(props.collection);
|
const resource = api.resource(props.collection);
|
||||||
const __parent = useContext(BlockRequestContext);
|
const __parent = useContext(BlockRequestContext);
|
||||||
|
|
||||||
return (
|
return !userJob.status || values ? (
|
||||||
<CollectionProvider collection={props.collection}>
|
<CollectionProvider collection={props.collection}>
|
||||||
<RecordProvider record={values} parent={false}>
|
<RecordProvider record={values} parent={false}>
|
||||||
<BlockRequestContext.Provider value={{ block: 'form', props, field, service, resource, __parent }}>
|
<BlockRequestContext.Provider value={{ block: 'form', props, field, service, resource, __parent }}>
|
||||||
@ -71,5 +71,5 @@ export function FormBlockProvider(props) {
|
|||||||
</BlockRequestContext.Provider>
|
</BlockRequestContext.Provider>
|
||||||
</RecordProvider>
|
</RecordProvider>
|
||||||
</CollectionProvider>
|
</CollectionProvider>
|
||||||
);
|
) : null;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ function CustomFormBlockProvider(props) {
|
|||||||
[values],
|
[values],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return !userJob.status || values ? (
|
||||||
<CollectionProvider
|
<CollectionProvider
|
||||||
collection={{
|
collection={{
|
||||||
...props.collection,
|
...props.collection,
|
||||||
@ -59,7 +59,7 @@ function CustomFormBlockProvider(props) {
|
|||||||
</FormBlockContext.Provider>
|
</FormBlockContext.Provider>
|
||||||
</RecordProvider>
|
</RecordProvider>
|
||||||
</CollectionProvider>
|
</CollectionProvider>
|
||||||
);
|
) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function CustomFormBlockInitializer({ insert, ...props }) {
|
function CustomFormBlockInitializer({ insert, ...props }) {
|
||||||
@ -104,10 +104,6 @@ function CustomFormBlockInitializer({ insert, ...props }) {
|
|||||||
'x-component': 'ActionBar',
|
'x-component': 'ActionBar',
|
||||||
'x-component-props': {
|
'x-component-props': {
|
||||||
layout: 'one-column',
|
layout: 'one-column',
|
||||||
style: {
|
|
||||||
marginTop: '1.5em',
|
|
||||||
flexWrap: 'wrap',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
'x-initializer': 'AddActionButton',
|
'x-initializer': 'AddActionButton',
|
||||||
properties: {
|
properties: {
|
||||||
|
Loading…
Reference in New Issue
Block a user