diff --git a/package-lock.json b/package-lock.json index 08d1f1a..fda1738 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "@ng-bootstrap/ng-bootstrap": "^12.1.2", "@popperjs/core": "^2.10.2", "@sniptt/monads": "^0.5.10", + "angular-bootstrap-autocomplete": "^1.0.1", "angular-material": "^1.2.5", "angular-mindmap": "^0.1.0", "bootstrap": "^5.1.3", @@ -3836,6 +3837,11 @@ "ajv": "^6.9.1" } }, + "node_modules/angular-bootstrap-autocomplete": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/angular-bootstrap-autocomplete/-/angular-bootstrap-autocomplete-1.0.1.tgz", + "integrity": "sha512-SIL3vVcztaBhgCMHR5FZEIIFKOH+GLMzbDKcKcY3JD+mMhRVXIU3tTE/CBoAfhPhiNRfVv5kGDkm/LkrkxkDMQ==" + }, "node_modules/angular-material": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/angular-material/-/angular-material-1.2.5.tgz", @@ -17974,6 +17980,11 @@ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true }, + "angular-bootstrap-autocomplete": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/angular-bootstrap-autocomplete/-/angular-bootstrap-autocomplete-1.0.1.tgz", + "integrity": "sha512-SIL3vVcztaBhgCMHR5FZEIIFKOH+GLMzbDKcKcY3JD+mMhRVXIU3tTE/CBoAfhPhiNRfVv5kGDkm/LkrkxkDMQ==" + }, "angular-material": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/angular-material/-/angular-material-1.2.5.tgz", diff --git a/package.json b/package.json index 53f5318..783068d 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@ng-bootstrap/ng-bootstrap": "^12.1.2", "@popperjs/core": "^2.10.2", "@sniptt/monads": "^0.5.10", + "angular-bootstrap-autocomplete": "^1.0.1", "angular-material": "^1.2.5", "angular-mindmap": "^0.1.0", "bootstrap": "^5.1.3", diff --git a/src/app/addhealthdata/addhealthdata.component.css b/src/app/addhealthdata/addhealthdata.component.css index 5708915..127dd2e 100644 --- a/src/app/addhealthdata/addhealthdata.component.css +++ b/src/app/addhealthdata/addhealthdata.component.css @@ -1,3 +1,6 @@ + .text-danger{ color: red; -} \ No newline at end of file + font-weight: bold; +} + diff --git a/src/app/addhealthdata/addhealthdata.component.html b/src/app/addhealthdata/addhealthdata.component.html index 0bc6532..a80ec39 100644 --- a/src/app/addhealthdata/addhealthdata.component.html +++ b/src/app/addhealthdata/addhealthdata.component.html @@ -9,7 +9,12 @@ name="txtText" formControlName="txtText" [(ngModel)]="addData.text" + list="symptomList" + (change)="onTextSelection($event)" /> + @@ -102,7 +107,7 @@ [(ngModel)]="addData.age_min" #txtAgeMin > - + @@ -116,7 +121,7 @@ [(ngModel)]="addData.age_max" #txtAgeMax > - + @@ -124,7 +129,7 @@ Max age must be greater than Min age
-diff --git a/src/app/edithealthdata/edithealthdata.component.ts b/src/app/edithealthdata/edithealthdata.component.ts index 69b0f3a..4370855 100644 --- a/src/app/edithealthdata/edithealthdata.component.ts +++ b/src/app/edithealthdata/edithealthdata.component.ts @@ -54,6 +54,17 @@ export class EdithealthdataComponent implements OnInit { this.negativeCondition = false; } } + + onTextSelection(e: any) { + if (e.target.value.toLowerCase() == 'Associated symptoms'.toLowerCase()) { + this.positiveCondition = true; + this.negativeCondition = true; + } else { + this.positiveCondition = false; + this.negativeCondition = false; + } + } + onSubmit() { this.onEdit.emit(this.healthdata); }