Project

General

Profile

« Previous | Next » 

Revision 61152

[Library | Angular 11]: Fix portal type for admin tool pages

View differences:

modules/uoa-services-library/branches/angular-11/ng-openaire-library/src/app/dashboard/helpTexts/page-help-content-form.component.ts
36 36
  ngOnInit() {
37 37
    this.subs.push(this.route.params.subscribe(params => {
38 38
      this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
39
      ConnectHelper.setPortalTypeFromPid(this.portal);
39
      if(this.route.snapshot.data.portal) {
40
        properties.adminToolsPortalType = this.route.snapshot.data.portal;
41
      }
40 42
      this.subs.push(this.route.queryParams.subscribe(params => {
41 43
        HelperFunctions.scroll();
42 44
        this.pageId = params['pageId'];
modules/uoa-services-library/branches/angular-11/ng-openaire-library/src/app/dashboard/helpTexts/page-help-contents.component.ts
60 60
    }));
61 61
    this.subscriptions.push(this.route.params.subscribe(params => {
62 62
      this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
63
      ConnectHelper.setPortalTypeFromPid(this.portal);
63
      if(this.route.snapshot.data.portal) {
64
        properties.adminToolsPortalType = this.route.snapshot.data.portal;
65
      }
64 66
      this.subscriptions.push(this.route.queryParams.subscribe(params => {
65 67
        HelperFunctions.scroll();
66 68
        this.selectedPageId = params['pageId'];
modules/uoa-services-library/branches/angular-11/ng-openaire-library/src/app/dashboard/divhelpcontent/class-help-content-form.component.ts
44 44
    this.properties = properties;
45 45
    this.subs.push(this.route.params.subscribe(params => {
46 46
      this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
47
      ConnectHelper.setPortalTypeFromPid(this.portal);
47
      if(this.route.snapshot.data.portal) {
48
        properties.adminToolsPortalType = this.route.snapshot.data.portal;
49
      }
48 50
      this.subs.push(this.route.queryParams.subscribe(params => {
49 51
        HelperFunctions.scroll();
50 52
        this.pageId = params['pageId'];
modules/uoa-services-library/branches/angular-11/ng-openaire-library/src/app/dashboard/divhelpcontent/class-help-contents.component.ts
51 51
  public community: Portal;
52 52

  
53 53
  public page: Page;
54
  public properties: EnvProperties = null;
54
  public properties: EnvProperties = properties;
55 55

  
56 56
  public showLoading: boolean = true;
57 57
  public errorMessage: string = '';
......
71 71
    this.subscriptions.push(this.selectForm.valueChanges.subscribe(value => {
72 72
      this.filterByPage(value);
73 73
    }));
74

  
75
    this.properties = properties;
76 74
    this.subscriptions.push(this.route.params.subscribe(params => {
77 75
      this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
78
      ConnectHelper.setPortalTypeFromPid(this.portal);
76
      if(this.route.snapshot.data.portal) {
77
        properties.adminToolsPortalType = this.route.snapshot.data.portal;
78
      }
79 79
      this.subscriptions.push(this.route.queryParams.subscribe(params => {
80 80
        HelperFunctions.scroll();
81 81
        this.selectedPageId = params['pageId'];
modules/uoa-services-library/branches/angular-11/ng-openaire-library/src/app/dashboard/entity/entities.component.ts
73 73
    }));
74 74
    this.userManagementService.getUserInfo().subscribe(user => {
75 75
      this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
76
      ConnectHelper.setPortalTypeFromPid(this.portal);
76
      if(this.route.snapshot.data.portal) {
77
        properties.adminToolsPortalType = this.route.snapshot.data.portal;
78
      }
77 79
      if (this.route.snapshot.data.portal) {
78 80
        this.title.setTitle(StringUtils.capitalize(this.portal) + ' | Entities');
79 81
      } else if (this.route.snapshot.params[this.route.snapshot.data.param]) {
modules/uoa-services-library/branches/angular-11/ng-openaire-library/src/app/dashboard/page/pages.component.ts
92 92
        this.filterForm.get('type').setValue(params['type']);
93 93
      }
94 94
      this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
95
      ConnectHelper.setPortalTypeFromPid(this.portal);
95
      if(this.route.snapshot.data.portal) {
96
        properties.adminToolsPortalType = this.route.snapshot.data.portal;
97
      }
96 98
      if (this.route.snapshot.data.portal) {
97 99
        this.title.setTitle(StringUtils.capitalize(this.portal) + ' | Pages');
98 100
      } else if (this.route.snapshot.params[this.route.snapshot.data.param]) {

Also available in: Unified diff