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 __parent = useContext(BlockRequestContext);
|
||||
|
||||
return (
|
||||
return !userJob.status || values ? (
|
||||
<CollectionProvider collection={props.collection}>
|
||||
<RecordProvider record={values} parent={false}>
|
||||
<BlockRequestContext.Provider value={{ block: 'form', props, field, service, resource, __parent }}>
|
||||
@ -71,5 +71,5 @@ export function FormBlockProvider(props) {
|
||||
</BlockRequestContext.Provider>
|
||||
</RecordProvider>
|
||||
</CollectionProvider>
|
||||
);
|
||||
) : null;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ function CustomFormBlockProvider(props) {
|
||||
[values],
|
||||
);
|
||||
|
||||
return (
|
||||
return !userJob.status || values ? (
|
||||
<CollectionProvider
|
||||
collection={{
|
||||
...props.collection,
|
||||
@ -59,7 +59,7 @@ function CustomFormBlockProvider(props) {
|
||||
</FormBlockContext.Provider>
|
||||
</RecordProvider>
|
||||
</CollectionProvider>
|
||||
);
|
||||
) : null;
|
||||
}
|
||||
|
||||
function CustomFormBlockInitializer({ insert, ...props }) {
|
||||
@ -104,10 +104,6 @@ function CustomFormBlockInitializer({ insert, ...props }) {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
layout: 'one-column',
|
||||
style: {
|
||||
marginTop: '1.5em',
|
||||
flexWrap: 'wrap',
|
||||
},
|
||||
},
|
||||
'x-initializer': 'AddActionButton',
|
||||
properties: {
|
||||
|
Loading…
Reference in New Issue
Block a user