From 0b1d6c716d6e1ecca26d25c785bf0a3e1fb003a0 Mon Sep 17 00:00:00 2001 From: Muthukrishnanmatriot <76949556+muthukrishnanmatriot@users.noreply.github.com> Date: Mon, 15 Mar 2021 12:07:09 +0530 Subject: [PATCH] TMSS-213 - Implemented Find Object --- .../tmss_webapp/src/layout/components/FindObejct.js | 8 ++++++-- .../tmss_webapp/src/routes/Search/find.object.result.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/components/FindObejct.js b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/FindObejct.js index c3b4ead1163..4727b60e3d4 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/layout/components/FindObejct.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/FindObejct.js @@ -30,12 +30,16 @@ export class FindObejct extends Component { * @param {*} value */ setFindObject(value) { + let currentVal = this.state.objectid; if (value.name) { - this.setState({findObjectPlaceholder: value.name, objectid: this.state.objectid}) + this.setState({findObjectPlaceholder: value.name, objectid: ''}) } else if(this.state.findObjectPlaceholder === 'Project') { this.setState({objectid: value}); - } else if (!isNaN(value)) { + } else if (!isNaN(value)) { this.setState({objectid: value}); + } else{ + this.setState({objectid: currentVal}); + appGrowl.show({severity: 'info', summary: 'Information', detail: 'Enter valid object Id'}); } } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Search/find.object.result.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Search/find.object.result.js index 6b190a03e36..4ca6338a36f 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Search/find.object.result.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Search/find.object.result.js @@ -193,7 +193,7 @@ export class FindObjectResult extends Component{ render(){ return( <> - <PageHeader location={this.props.location} title={'Find Object'} + <PageHeader location={this.props.location} title={'Search Result'} actions={[]} /> {this.state.objNodes.length>0 && -- GitLab