[Library | Trunk]: Notification form change condition if environment !== production

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60753 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-03-31 09:34:41 +00:00
parent 494ee446e7
commit d5d2589365
2 changed files with 5 additions and 6 deletions

View File

@ -36,7 +36,8 @@ import {properties} from "../../../../environments/environment";
</div> </div>
<div *ngIf="available.collectedName"> <div *ngIf="available.collectedName">
<span>Provider: </span> <span>Provider: </span>
<a *ngIf="available.collectedId" [routerLink]="dataProviderUrl" [queryParams]="{datasourceId: available.collectedId}"> <a *ngIf="available.collectedId" [routerLink]="dataProviderUrl"
[queryParams]="{datasourceId: available.collectedId}">
{{available.collectedName}} {{available.collectedName}}
</a> </a>
</div> </div>
@ -103,10 +104,8 @@ export class AvailableOnComponent {
} }
public removeUnknown(value: string): string { public removeUnknown(value: string): string {
if(properties.environment === 'production') { if (value.toLowerCase() === 'unknown') {
if (value.toLowerCase() === 'unknown') { return null;
return null;
}
} }
return value; return value;
} }

View File

@ -99,7 +99,7 @@ export class NotifyFormComponent implements OnInit, OnDestroy {
reset(message: string = null) { reset(message: string = null) {
if (!this.availableGroups) { if (!this.availableGroups) {
this.form = this.fb.group({ this.form = this.fb.group({
notify: this.fb.control(properties.environment === 'development'), notify: this.fb.control(properties.environment !== 'production'),
message: this.fb.control(message) message: this.fb.control(message)
}); });
this.subscriptions.push(this.form.get('notify').valueChanges.subscribe(value => { this.subscriptions.push(this.form.get('notify').valueChanges.subscribe(value => {