[Library | Trunk]: 1. Add some icons. 2. Fix members page. 3. Fix input dirty condition

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59735 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-11-02 14:45:20 +00:00
parent 66fb524a0a
commit f0a7488e3a
5 changed files with 24 additions and 7 deletions

View File

@ -93,7 +93,7 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges {
}
this.subscriptions.push(this.formControl.valueChanges.subscribe(value => {
value = (value === '')?null:value;
if(this.initValue === value) {
if(this.initValue === value || (this.initValue === '' && value === null)) {
this.formControl.markAsPristine();
}
}));

View File

@ -39,7 +39,7 @@ export class SideBarComponent implements OnInit {
if (subItem) {
return MenuItem.isTheActiveMenu(subItem, this.router.url.split('?')[0])
}
console.debug(item.route + " " + this.router.url.split('?')[0] + MenuItem.isTheActiveMenu(item,this.router.url.split('?')[0]))
//console.debug(item.route + " " + this.router.url.split('?')[0] + MenuItem.isTheActiveMenu(item,this.router.url.split('?')[0]))
return MenuItem.isTheActiveMenu(item,this.router.url.split('?')[0]);
}
}

View File

@ -1,5 +1,5 @@
<div page-content>
<div id="page_content_header">
<div header>
<div *ngIf="error" class="uk-alert uk-alert-danger uk-flex uk-flex-top">
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span>
<div>
@ -28,7 +28,7 @@
</div>
</div>
</div>
<div id="page_content_inner">
<div inner>
<div *ngIf="loadMembers || loadPending" class="uk-margin-large-top">
<loading></loading>
</div>

View File

@ -3,9 +3,10 @@ import {HttpClient} from "@angular/common/http";
import {BehaviorSubject, from, Observable} from "rxjs";
import {Indicator, Section, Stakeholder, StakeholderInfo, Visibility} from "../entities/stakeholder";
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {map} from "rxjs/operators";
import {catchError, map} from "rxjs/operators";
import {ActivatedRoute} from "@angular/router";
import {properties} from "../../../../environments/environment";
import {CustomOptions} from "../../services/servicesUtils/customOptions.class";
let maps: string[] = ['parameters', 'filters'];
@ -55,8 +56,14 @@ export class StakeholderService {
}));
}
getMyStakeholders(url: string, type: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
return this.http.get<Stakeholder[]>(url + '/my-stakeholder' + ((type)?('?type=' + type):''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
return this.formalize(stakeholders);
}));
}
getDefaultStakeholders(url: string, type: string = null): Observable<Stakeholder[]> {
return this.http.get<Stakeholder[]>(url + '/stakeholder/default' + ((type)?('?type=' + type):'')).pipe(map(stakeholders => {
return this.http.get<Stakeholder[]>(url + '/stakeholder/default' + ((type)?('?type=' + type):''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
return this.formalize(stakeholders);
}));
}

View File

@ -64,7 +64,7 @@ export const bullet: Icon = {
export const remove_circle_outline = {
name: 'remove_circle_outline',
data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>'
data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0V0z" fill="none" opacity=".87"/><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"/></svg>'
}
export const person_add = {
@ -96,3 +96,13 @@ export const search = {
name: 'search',
data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>'
}
export const refresh = {
name: 'refresh',
data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0z" fill="none"/><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>'
}
export const close = {
name: 'close',
data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/></svg>'
}