From bc53605f3fc97e6ae25f6794c5f7bd8ecfe33ccb Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Wed, 2 Oct 2019 15:15:13 +0100 Subject: [PATCH] Handle inactive/no-building view/edit combinations --- app/src/frontend/building/data-container.tsx | 28 +++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index 7aa42f93..988906b9 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -213,7 +213,7 @@ const withCopyEdit = (WrappedComponent) => { onSubmit={this.handleSubmit}> { - (this.props.mode === 'edit' && this.props.inactive) ? + (this.props.inactive) ? @@ -240,14 +240,36 @@ const withCopyEdit = (WrappedComponent) => { type="submit" className="btn btn-primary"> Save - + } : null } - : + : +
+ { + (this.props.inactive)? + + + + + : + + } +
} );