[MonitorDashboard]: Fix a bug with alias Validator
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@57841 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
c1b316bee5
commit
897d6e857d
|
@ -189,7 +189,7 @@
|
|||
</div>
|
||||
<modal-alert #editStakeholderModal
|
||||
(alertOutput)="saveStakeholder()"
|
||||
[okDisabled]="stakeholderFb && (stakeholderFb.invalid || (!stakeholderFb.dirty && index !==-1))">
|
||||
[okDisabled]="stakeholderFb && (stakeholderFb.invalid || (stakeholderFb.pristine && index !==-1))">
|
||||
<div *ngIf="stakeholderFb" class="uk-padding-small" [formGroup]="stakeholderFb">
|
||||
<div dashboard-input class="uk-form-row" [formInput]="stakeholderFb.get('index_name')" label="Name"></div>
|
||||
<div class="uk-form-row uk-flex uk-flex-middle uk-child-width-1-3" uk-grid>
|
||||
|
|
|
@ -167,7 +167,9 @@ export class HomeComponent implements OnInit, OnDestroy {
|
|||
[
|
||||
Validators.required,
|
||||
this.stakeholderUtils.aliasValidator(
|
||||
(this.stakeholder.isDefaultProfile) ? this.defaultStakeholders : this.stakeholders
|
||||
(this.stakeholder.isDefaultProfile) ?
|
||||
this.defaultStakeholders.filter(stakeholder => stakeholder.alias !== this.stakeholder.alias):
|
||||
this.stakeholders.filter(stakeholder => stakeholder.alias !== this.stakeholder.alias)
|
||||
)]
|
||||
),
|
||||
isPublic: this.fb.control(this.stakeholder.isPublic),
|
||||
|
|
Loading…
Reference in New Issue