Fix a bug when you are saving a topic, etc., this triggers transition. Add dev condition for resources menu item
This commit is contained in:
parent
26cb6eace9
commit
ea613919c3
|
@ -52,7 +52,12 @@ const routes: Routes = [
|
||||||
activeMenuItem: "manage"
|
activeMenuItem: "manage"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{path: 'theme', loadChildren: () => import('./openaireLibrary/utils/theme/theme.module').then(m => m.ThemeModule)},
|
{
|
||||||
|
path: 'theme',
|
||||||
|
loadChildren: () => import('./openaireLibrary/utils/theme/theme.module').then(m => m.ThemeModule),
|
||||||
|
canActivateChild: [AdminLoginGuard],
|
||||||
|
data: {hasSidebar: false, hasHeader: false, monitorCurator: true, monitorManager: true}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
loadChildren: () => import('./monitor/monitor.module').then(m => m.MonitorModule),
|
loadChildren: () => import('./monitor/monitor.module').then(m => m.MonitorModule),
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<loading [full]="true"></loading>
|
<loading [full]="true"></loading>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!loading" [class.monitor]="isFrontPage">
|
<div *ngIf="!loading" [class.monitor]="isFrontPage">
|
||||||
<div id="container" class="sidebar_main_swipe" [class.sidebar_main_active]="open && (hasSidebar || hasAdminMenu)"
|
<div id="container" class="sidebar_main_swipe uk-background-default" [class.sidebar_main_active]="open && (hasSidebar || hasAdminMenu)"
|
||||||
[class.sidebar_mini]="!open && hasSidebar && (!hasAdminMenu || hasAdminMenu)">
|
[class.sidebar_mini]="!open && hasSidebar && (!hasAdminMenu || hasAdminMenu)">
|
||||||
<div id="modal-container"></div>
|
<div id="modal-container"></div>
|
||||||
<navbar *ngIf="hasHeader" portal="monitor_dashboard" [header]="menuHeader" [dark]="isFrontPage"
|
<navbar *ngIf="hasHeader" portal="monitor_dashboard" [header]="menuHeader" [dark]="isFrontPage"
|
||||||
|
|
|
@ -16,6 +16,7 @@ import {Option} from "./openaireLibrary/sharedComponents/input/input.component";
|
||||||
import {StakeholderUtils} from "./utils/indicator-utils";
|
import {StakeholderUtils} from "./utils/indicator-utils";
|
||||||
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
|
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
|
||||||
import {ConnectHelper} from "./openaireLibrary/connect/connectHelper";
|
import {ConnectHelper} from "./openaireLibrary/connect/connectHelper";
|
||||||
|
import {ResourcesService} from "./openaireLibrary/monitor/services/resources.service";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -64,7 +65,9 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
private layoutService: LayoutService,
|
private layoutService: LayoutService,
|
||||||
private smoothScroll: SmoothScroll,
|
private smoothScroll: SmoothScroll,
|
||||||
private stakeholderService: StakeholderService,
|
private stakeholderService: StakeholderService,
|
||||||
private cdr: ChangeDetectorRef, private configurationService: ConfigurationService) {
|
private cdr: ChangeDetectorRef,
|
||||||
|
private configurationService: ConfigurationService,
|
||||||
|
private resourcesService: ResourcesService) {
|
||||||
this.subscriptions.push(this.router.events.subscribe(event => {
|
this.subscriptions.push(this.router.events.subscribe(event => {
|
||||||
if (event instanceof NavigationEnd) {
|
if (event instanceof NavigationEnd) {
|
||||||
let r = this.route;
|
let r = this.route;
|
||||||
|
@ -282,20 +285,19 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
null, null, null, null),
|
null, null, null, null),
|
||||||
items: []
|
items: []
|
||||||
});
|
});
|
||||||
let indicatorsPage = {
|
if(this.properties.environment === 'development') {
|
||||||
rootItem: new MenuItem('resources', 'Resources', '', '', false, [], null, {}),
|
this.resourcesService.setResourcesDeprecated(this.menuItems, "/" + this.stakeholder.alias);
|
||||||
items: [
|
} else {
|
||||||
new MenuItem("methodology", "Methodology", "", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}),
|
this.menuItems.push({
|
||||||
]
|
rootItem: new MenuItem("methodology", "Methodology",
|
||||||
};
|
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}), items: [
|
||||||
this.configurationService.isPageEnabled('monitor', "/indicators/" + this.stakeholder.type, 'monitor').subscribe(isEnabled => {
|
new MenuItem("methodology", "Terminology and construction",
|
||||||
if(isEnabled) {
|
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}),
|
||||||
indicatorsPage.items.push(
|
new MenuItem("methodology", "See how it works",
|
||||||
new MenuItem("indicators-page", "Indicators", "", "/" + this.stakeholder.alias + "/indicators", false, [], null, {})
|
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}, null, "how"),
|
||||||
);
|
]
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
this.menuItems.push(indicatorsPage);
|
|
||||||
if (this.stakeholder.type === "funder") {
|
if (this.stakeholder.type === "funder") {
|
||||||
this.menuItems.push({
|
this.menuItems.push({
|
||||||
rootItem: new MenuItem("develop", "Develop",
|
rootItem: new MenuItem("develop", "Develop",
|
||||||
|
@ -356,6 +358,10 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
"https://" + (this.properties.environment == 'beta' ? 'beta.' : '') + 'monitor.openaire.eu/browse', "", false, [], null, {}, null, null, null, null, "_self"),
|
"https://" + (this.properties.environment == 'beta' ? 'beta.' : '') + 'monitor.openaire.eu/browse', "", false, [], null, {}, null, null, null, null, "_self"),
|
||||||
items: []
|
items: []
|
||||||
});
|
});
|
||||||
|
if(this.properties.environment === 'development') {
|
||||||
|
// @ts-ignore
|
||||||
|
this.resourcesService.setResourcesDeprecated(this.menuItems, '', "https://" + (this.properties.environment === 'beta' ? 'beta.' : '') + 'monitor.openaire.eu');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.userMenuItems.push(new MenuItem("", "User information", "", "/admin/user-info", false, [], [], {}));
|
this.userMenuItems.push(new MenuItem("", "User information", "", "/admin/user-info", false, [], [], {}));
|
||||||
this.menuHeader = {
|
this.menuHeader = {
|
||||||
|
|
|
@ -1,465 +0,0 @@
|
||||||
import {Component, OnDestroy, OnInit} from "@angular/core";
|
|
||||||
import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service";
|
|
||||||
import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder";
|
|
||||||
import {Subscription} from "rxjs";
|
|
||||||
import {Meta, Title} from "@angular/platform-browser";
|
|
||||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
|
||||||
import {properties} from "../../environments/environment";
|
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
|
||||||
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'methodology',
|
|
||||||
template: `
|
|
||||||
<div class="uk-section">
|
|
||||||
<div class="uk-container uk-container-large">
|
|
||||||
<h1>Terminology and <br> construction<span class="uk-text-primary">.</span></h1>
|
|
||||||
</div>
|
|
||||||
<div class="uk-section uk-container uk-container-large">
|
|
||||||
<ul class="uk-tab" uk-tab>
|
|
||||||
<li>
|
|
||||||
<a>Entities</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a>Inherited and Inferred Attributes</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a>Constructed Attributes</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul class="uk-switcher">
|
|
||||||
<li>
|
|
||||||
<dl class="uk-description-list uk-description-list-divider">
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1 uk-text-primary">{{openaireEntities.RESULTS}}</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<div>There are currently four different types of {{openaireEntities.RESULTS | lowercase}} in the OpenAIRE Research <br> Graph:</div>
|
|
||||||
<ul class="uk-list uk-list-bullet uk-list-primary">
|
|
||||||
<li>{{openaireEntities.PUBLICATIONS}}</li>
|
|
||||||
<li>{{openaireEntities.DATASETS}}</li>
|
|
||||||
<li>{{openaireEntities.SOFTWARE}}</li>
|
|
||||||
<li>{{openaireEntities.OTHER}}.</li>
|
|
||||||
</ul>
|
|
||||||
<div class="uk-margin-small-top">
|
|
||||||
OpenAIRE deduplicates (merges) different records of {{openaireEntities.RESULTS | lowercase}} and keeps the <br> metadata of all instances.
|
|
||||||
</div>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">{{openaireEntities.PUBLICATION}}</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
{{openaireEntities.RESULTS}} intended for human reading (published articles, pre-prints, conference <br> papers, presentations, technical reports, etc.)
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">{{openaireEntities.DATASET}}</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<!-- <div>{{openaireEntities.DATASET}}</div>-->
|
|
||||||
<div>Granularity is not defined by OpenAIRE, it reflects the granularity supported by
|
|
||||||
the sources <br> from which the description of the {{openaireEntities.DATASET | lowercase}} has been collected.</div>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">{{openaireEntities.SOFTWARE_SINGULAR}}</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
Source code or software package developed and/or used in a research context
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">{{openaireEntities.OTHER_SINGULAR}}</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
Anything that does not fall in the previous categories (e.g. workflow, methods, protocols)
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
</dl>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="uk-text-center uk-padding">
|
|
||||||
The attributes of entities listed below are either inherited via entries in the harvested metadata records or automatically generated by our inference (text and data mining) algorithms.
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<dl class="uk-description-list uk-description-list-divider">
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">{{openaireEntities.ORGANIZATION}}</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<p><span class="uk-text-bold">For {{openaireEntities.RESULTS | lowercase}},</span> this refers to the affiliated organizations of its authors</p>
|
|
||||||
<p><span class="uk-text-bold">For {{openaireEntities.PROJECTS | lowercase}}:</span> the {{openaireEntities.ORGANIZATIONS | lowercase}} participating in the {{openaireEntities.PROJECT | lowercase}}
|
|
||||||
(i.e. beneficiaries of the grant)</p>
|
|
||||||
<p>The OpenAIRE research graph is in the process of improving the {{openaireEntities.ORGANIZATION | lowercase}} database (disambiguation) with the newly developed <a href="https://www.openaire.eu/blogs/openorgs-bridging-registries-of-research-organisations" target="_blank">OpenOrgs</a> tool.</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Country</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<p>The country of the {{openaireEntities.ORGANIZATION | lowercase}}. </p>
|
|
||||||
<p>
|
|
||||||
<span class="uk-text-bold">Country code mapping: </span>
|
|
||||||
<a href="https://api.openaire.eu/vocabularies/dnet:countries" target="_blank">
|
|
||||||
https://api.openaire.eu/vocabularies/dnet:countries</a>
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Funder</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<p>Funders that have joined OpenAIRE, i.e. their {{openaireEntities.PROJECT | lowercase}} data have gone through a validation process.</p>
|
|
||||||
<p>You can visit <a class="https://explore.openaire.eu/search/find" target="_blank">https://explore.openaire.eu/search/find</a> if you would like to explore the {{openaireEntities.RESULTS | lowercase}} and {{openaireEntities.PROJECTS | lowercase}} of all funders in OpenAIRE (the list of funders can be seen under the "Funder" Filter shown on the left side of the page).</p>
|
|
||||||
<p><span class="uk-text-bold">To join: </span><a href="https://www.openaire.eu/funders-how-to-join-guide" target="_blank">https://www.openaire.eu/funders-how-to-join-guide</a></p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Type</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<p>The sub-type of a {{openaireEntities.RESULT | lowercase}} (e.g., a {{openaireEntities.PUBLICATION | lowercase}} can be a pre-print, conference proceeding,
|
|
||||||
article,
|
|
||||||
etc.)</p>
|
|
||||||
<p><span class="uk-text-bold">Resource type mapping: </span>
|
|
||||||
<a href="https://api.openaire.eu/vocabularies/dnet:result_typologies" target="_blank">https://api.openaire.eu/vocabularies/dnet:result_typologies</a>
|
|
||||||
(click on the code to see the specific types for each result type)
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Access mode or access rights</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<p>The best available (across all instances) access rights of a {{openaireEntities.RESULT | lowercase}}</p>
|
|
||||||
<p>Types: open, restricted, closed, embargo (= closed for a specific period of time, then open)</p>
|
|
||||||
<p><span class="uk-text-bold">Note:</span> definition of <span class="uk-text-bold">restricted</span>
|
|
||||||
may vary by data source, it may refer to access rights being given to registered users, potentially behind a paywall.</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">CC license</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<p>A Creative Commons copyright license <a href="(https://creativecommons.org/)" target="_blank">(https://creativecommons.org/)</a></p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">PID (persistent identifier)</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<p>A long-lasting reference to a resource</p>
|
|
||||||
<p><span class="uk-text-bold">Types: </span> <a
|
|
||||||
href="http://api.openaire.eu/vocabularies/dnet:pid_types" target="_blank">http://api.openaire.eu/vocabularies/dnet:pid_types</a>
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Context</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
Related {{openaireEntities.COMMUNITY | lowercase}}, initiative or infrastructure.
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Journal</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
The scientific journal an article is published in.
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Publisher</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
The publisher of the venue (journal, book, etc.) of a {{openaireEntities.RESULT | lowercase}}.
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1 uk-text-primary">{{openaireEntities.DATASOURCES}}</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
<p>The different data sources ingested in the OpenAIRE Research Graph.</p>
|
|
||||||
<div class="uk-text-bold">Data Source Types:</div>
|
|
||||||
<ul class="uk-list uk-list-disc">
|
|
||||||
<li>Repositories</li>
|
|
||||||
<li>Open Access Publishers & Journals</li>
|
|
||||||
<li>Aggregators</li>
|
|
||||||
<li>Entity Registries</li>
|
|
||||||
<li>Journal Aggregators</li>
|
|
||||||
<li>CRIS (Current Research Information System)</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Repositories</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
Information systems where scientists upload the bibliographic metadata and payloads of their
|
|
||||||
{{openaireEntities.RESULTS | lowercase}} (e.g. PDFs of their scientific articles, CSVs of their data, archive with their
|
|
||||||
software), due to obligations from their {{openaireEntities.ORGANIZATIONS | lowercase}}, their funders, or due to community practices
|
|
||||||
(e.g. ArXiv, Europe PMC, Zenodo).
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Open Access Publishers & Journals</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
Information systems of open access publishers or relative journals, which offer bibliographic
|
|
||||||
metadata and PDFs of their published articles.
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Aggregators</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
Information systems that collect descriptive metadata about {{openaireEntities.RESULTS | lowercase}} from multiple sources
|
|
||||||
in order to enable cross-data source discovery of given {{openaireEntities.RESULTS | lowercase}} (e,g, DataCite,
|
|
||||||
BASE, DOAJ).
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">Entity Registries</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
Information systems created with the intent of maintaining authoritative registries of given
|
|
||||||
entities in the scholarly communication, such as OpenDOAR for the institutional repositories, re3data
|
|
||||||
for the data repositories, CORDA and other funder databases for {{openaireEntities.PROJECTS | lowercase}} and funding information.
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-5@m uk-width-1-1">CRIS (Current Research Information System)</dt>
|
|
||||||
<dd class="uk-width-expand">
|
|
||||||
Information systems adopted by research and academic {{openaireEntities.ORGANIZATIONS | lowercase}} to keep track of their research
|
|
||||||
administration records and relative results; examples of CRIS content are articles or {{openaireEntities.DATASETS | lowercase}} funded
|
|
||||||
by {{openaireEntities.PROJECTS | lowercase}}, their principal investigators, facilities acquired thanks to funding, etc.
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
</dl>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="uk-text-center uk-padding">
|
|
||||||
The attributes of entities under this tab are constructed following the methodology described below.
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<dl class="uk-description-list uk-description-list-divider">
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Attribute</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1 uk-text-bold">Definition</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1 uk-text-bold">Construction</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-padding-small uk-text-bold uk-text-primary">
|
|
||||||
Journal Business Models
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Fully Open Access (OA)</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>A journal that publishes only in open access.</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>We construct the list of fully OA journals using Unpaywall data. </p>
|
|
||||||
<p>In brief, a journal is fully OA if </p>
|
|
||||||
<ol>
|
|
||||||
<li>It is in the Directory of Open Access Journals (DOAJ) </li>
|
|
||||||
<li>It has a known (curated list) fully OA Publisher. </li>
|
|
||||||
<li>It only publishes OA articles. </li>
|
|
||||||
</ol>
|
|
||||||
<p><a href="https://support.unpaywall.org/support/solutions/articles/44001792752-how-do-we-decide-if-a-given-journal-is-fully-oa-" target="_blank">More information</a></p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Subscription</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>A journal that charges for access to its articles.</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>Journals without any open access articles.</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Hybrid</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>A subscription journal where some of its articles are open access.</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>Journals with open access articles that are not fully OA journals are hybrid.</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Transformative</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>"A Transformative Journal is a subscription/hybrid journal that is actively committed to transitioning to a fully Open Access journal.</p>
|
|
||||||
<p>In addition, a Transformative Journal must:</p>
|
|
||||||
<ul>
|
|
||||||
<li>gradually increase the share of Open Access content; and</li>
|
|
||||||
<li>offset subscription income from payments for publishing services (to avoid double payments)."</li>
|
|
||||||
</ul>
|
|
||||||
<p>Source:</p>
|
|
||||||
<p><a href="https://www.coalition-s.org/transformative-journals-faq/" target="_blank">https://www.coalition-s.org/transformative-journals-faq/</a></p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>Transformative Journals are identified by ISSN matching with the publicly available Transformative Journals data (<a href="https://journalcheckertool.org/transformative-journals/" target="_blank">https://journalcheckertool.org/transformative-journals/</a>)</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-padding-small uk-text-bold uk-text-primary">
|
|
||||||
Journal APC Business Models
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Diamond OA</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>A fully OA journal that does not charge article processing charges (APCs).</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>APC information is obtained from DOAJ using DOAJ’s exportable version of the journal metadata (<a href="https://doaj.org/docs/public-data-dump/" target="_blank">https://doaj.org/docs/public-data-dump/</a>). We used it to determine whether a particular fully OA journal charges APCs. </p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-padding-small uk-text-bold uk-text-primary">
|
|
||||||
Routes to Open Access (OA)
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Green OA</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>An open access scientific publication deposited in a repository</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>As in definition</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Gold OA</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>A scientific publication published in a fully OA journal.</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>Fully OA journals are defined above.</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Hybrid OA</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>An open access scientific publication published in a hybrid journal with an open license.</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>Hybrid journals are defined above.</p>
|
|
||||||
<p>At this point we consider only CC licenses “open”, we are currently working on cleaning non-CC licenses as well to identify other open ones.</p>
|
|
||||||
<p>In principle, this means that we may be underestimating the number of hybrid OA articles and overestimating the number of bronze.</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Bronze OA</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>An open access scientific publication published in a hybrid journal without an open license.</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-padding-small uk-text-bold uk-text-primary">
|
|
||||||
Miscellaneous
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="uk-grid uk-padding-small" uk-grid>
|
|
||||||
<dt class="uk-width-1-3@m uk-width-1-1">Downloads</dt>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>The number of downloads of a publication’s full text in a specific time frame, from a given set of data sources.</p>
|
|
||||||
</dd>
|
|
||||||
<dd class="uk-width-1-3@m uk-width-1-1">
|
|
||||||
<p>Data for downloads is taken from OpenAIRE’s Usage Counts service that harvests it from a set of repositories. The time range of available downloads varies for each repository.</p>
|
|
||||||
<p>
|
|
||||||
<a href="https://www.openaire.eu/guides-usage-counts" target="_blank">More information</a>
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
</dl>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class="uk-margin-medium-top">
|
|
||||||
<icon name="graph" customClass="text-graph"></icon>
|
|
||||||
<span class="uk-margin-small-left uk-text-meta">More information for </span>
|
|
||||||
<a href="https://graph.openaire.eu" class="text-graph">OpenAIRE Research Graph</a>
|
|
||||||
<span class="uk-text-meta">.</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="how" class="uk-container uk-container-large uk-section uk-section-small uk-margin-large-top">
|
|
||||||
<h2 class="uk-h1">
|
|
||||||
Inclusion, transparency, <br> quality, state of the art <br> technology<span class="uk-text-primary">.</span>
|
|
||||||
</h2>
|
|
||||||
<div class="uk-margin-large-top uk-card uk-card-default uk-card-body">
|
|
||||||
<p class="uk-margin-top">Our methodological approach is based on the following operational quality criteria:</p>
|
|
||||||
<ul>
|
|
||||||
<li><span class="uk-text-bold">Openness and transparency:</span> Methodological assumptions are openly and clearly presented.</li>
|
|
||||||
<li><span class="uk-text-bold">Coverage and accuracy:</span> As detailed in <a href="https://graph.openaire.eu/" target="_blank">graph.openaire.eu</a>
|
|
||||||
multiple data sources are ingested in the OpenAIRE research graph for coverage to the fullest extent possible, in order to provide meaningful indicators.</li>
|
|
||||||
<li><span class="uk-text-bold">Clarity and replicability:</span> We describe our construction methodology in detail, so that
|
|
||||||
it can be verified and used by the scholarly communication community to create ongoing updates to our proposed statistics and indicators.</li>
|
|
||||||
<li><span class="uk-text-bold">Readiness and timeliness:</span> The methodology is built around well-established open databases
|
|
||||||
and already tested knowledge extraction technologies - natural language processing (NLP)/machine-learning (ML) - using operational
|
|
||||||
workflows in OpenAIRE to warrant timely results.</li>
|
|
||||||
<li><span class="uk-text-bold">Trust and robustness:</span> Our methodology also strives to be reliable, robust, and aligned
|
|
||||||
to other assessment methods so that it can be operationalized, used and reused, in conjunction with other assessment methods.</li>
|
|
||||||
</ul>
|
|
||||||
<div class="uk-text-small uk-text-italic uk-text-right">The text above is modified from <a href="https://op.europa.eu/en/publication-detail/-/publication/56cc104f-0ebb-11ec-b771-01aa75ed71a1"
|
|
||||||
target="_blank">this report</a> (DOI: 10.2777/268348).</div>
|
|
||||||
</div>
|
|
||||||
<div class="uk-margin-large-top uk-padding-small">
|
|
||||||
<h3 class="uk-h4">Step-by-step</h3>
|
|
||||||
<how></how>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
})
|
|
||||||
export class MethodologyComponent implements OnInit, OnDestroy {
|
|
||||||
public stakeholder: Stakeholder;
|
|
||||||
public tab: 'entities' | 'attributes' = 'entities';
|
|
||||||
private subscriptions: any[] = [];
|
|
||||||
public openaireEntities = OpenaireEntities;
|
|
||||||
|
|
||||||
constructor(private stakeholderService: StakeholderService,
|
|
||||||
private seoService: SEOService,
|
|
||||||
private _meta: Meta,
|
|
||||||
private _router: Router,
|
|
||||||
private route: ActivatedRoute,
|
|
||||||
private _title: Title) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
|
||||||
this.stakeholder = stakeholder;
|
|
||||||
if (this.stakeholder) {
|
|
||||||
/* Metadata */
|
|
||||||
const url = properties.domain + properties.baseLink + this._router.url;
|
|
||||||
this.seoService.createLinkForCanonicalURL(url, false);
|
|
||||||
this._meta.updateTag({content: url}, "property='og:url'");
|
|
||||||
const description = "Methodology | " + this.stakeholder.name;
|
|
||||||
const title = "Methodology | " + this.stakeholder.name;
|
|
||||||
this._meta.updateTag({content: description}, "name='description'");
|
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
|
||||||
this._meta.updateTag({content: title}, "property='og:title'");
|
|
||||||
this._title.setTitle(title);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.subscriptions.forEach(subscription => {
|
|
||||||
if (subscription instanceof Subscription) {
|
|
||||||
subscription.unsubscribe();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
import {NgModule} from "@angular/core";
|
|
||||||
import {CommonModule} from "@angular/common";
|
|
||||||
import {MethodologyComponent} from "./methodology.component";
|
|
||||||
import {RouterModule} from "@angular/router";
|
|
||||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
|
||||||
import {PageContentModule} from "../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
|
|
||||||
import {HowModule} from "../openaireLibrary/monitor/how/how.module";
|
|
||||||
import {TabsModule} from "../openaireLibrary/utils/tabs/tabs.module";
|
|
||||||
import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
|
|
||||||
import {IconsService} from "../openaireLibrary/utils/icons/icons.service";
|
|
||||||
import {graph} from "../openaireLibrary/utils/icons/icons";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [MethodologyComponent],
|
|
||||||
imports: [CommonModule, RouterModule.forChild([
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
component: MethodologyComponent,
|
|
||||||
canDeactivate: [PreviousRouteRecorder]
|
|
||||||
},
|
|
||||||
]), PageContentModule, HowModule, TabsModule, IconsModule],
|
|
||||||
exports: [MethodologyComponent]
|
|
||||||
})
|
|
||||||
export class MethodologyModule {
|
|
||||||
constructor(private iconsService: IconsService) {
|
|
||||||
this.iconsService.registerIcons([graph]);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -17,7 +17,7 @@ import {OpenaireErrorPageComponent} from "../error/errorPage.component";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':stakeholder/indicators',
|
path: ':stakeholder/indicators/:type',
|
||||||
loadChildren: () => import('../openaireLibrary/monitor/indicators/indicators.module').then(m => m.IndicatorsModule),
|
loadChildren: () => import('../openaireLibrary/monitor/indicators/indicators.module').then(m => m.IndicatorsModule),
|
||||||
canDeactivate: [PreviousRouteRecorder],
|
canDeactivate: [PreviousRouteRecorder],
|
||||||
data: {
|
data: {
|
||||||
|
@ -34,7 +34,7 @@ import {OpenaireErrorPageComponent} from "../error/errorPage.component";
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':stakeholder/methodology',
|
path: ':stakeholder/methodology',
|
||||||
loadChildren: () => import('../methodology/methodology.module').then(m => m.MethodologyModule),
|
loadChildren: () => import('../openaireLibrary/monitor/methodology/methodology.module').then(m => m.MethodologyModule),
|
||||||
canDeactivate: [PreviousRouteRecorder],
|
canDeactivate: [PreviousRouteRecorder],
|
||||||
data: {
|
data: {
|
||||||
hasSidebar: false
|
hasSidebar: false
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit e04d825c03fbb3114a88cd7b4de426b4976238bf
|
Subproject commit 5cb7bc7cca50cb067820e6fb9281f350e2ef0397
|
|
@ -29,7 +29,7 @@
|
||||||
class="uk-width-expand uk-text-truncate uk-margin-small-left">
|
class="uk-width-expand uk-text-truncate uk-margin-small-left">
|
||||||
{{topic.name}}
|
{{topic.name}}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="open" class="uk-invisible-hover" [class.uk-invisible-hover]="topicIndex !== i"
|
<span *ngIf="open" class="uk-invisible-hover uk-margin-xsmall-left" [class.uk-invisible-hover]="topicIndex !== i"
|
||||||
(click)="$event.stopPropagation();$event.preventDefault()">
|
(click)="$event.stopPropagation();$event.preventDefault()">
|
||||||
<a class="uk-link-reset uk-flex uk-flex-middle">
|
<a class="uk-link-reset uk-flex uk-flex-middle">
|
||||||
<icon [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(topic.visibility)"
|
<icon [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(topic.visibility)"
|
||||||
|
|
|
@ -17,7 +17,6 @@ import {properties} from "../../environments/environment";
|
||||||
import {Session, User} from "../openaireLibrary/login/utils/helper.class";
|
import {Session, User} from "../openaireLibrary/login/utils/helper.class";
|
||||||
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
|
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
|
||||||
import {TransitionGroupComponent} from "../openaireLibrary/utils/transition-group/transition-group.component";
|
import {TransitionGroupComponent} from "../openaireLibrary/utils/transition-group/transition-group.component";
|
||||||
import {error} from "protractor";
|
|
||||||
import {NotificationHandler} from "../openaireLibrary/utils/notification-handler";
|
import {NotificationHandler} from "../openaireLibrary/utils/notification-handler";
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
@ -85,40 +84,23 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
private layoutService: LayoutService,
|
private layoutService: LayoutService,
|
||||||
private cdr: ChangeDetectorRef) {
|
private cdr: ChangeDetectorRef) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit() {
|
public ngOnInit() {
|
||||||
let subscription: Subscription;
|
let subscription: Subscription;
|
||||||
this.subscriptions.push(this.topicIndexSubject.asObservable().subscribe(index => {
|
this.subscriptions.push(this.topicIndexSubject.asObservable().subscribe(index => {
|
||||||
if(this.categories) {
|
this.topicChanged(() => {
|
||||||
this.categories.disable();
|
this.topicIndex = index;
|
||||||
if(this.subCategories) {
|
});
|
||||||
this.subCategories.disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.topicIndex = index;
|
|
||||||
this.cdr.detectChanges();
|
|
||||||
if(this.categories) {
|
|
||||||
this.categories.init();
|
|
||||||
this.categories.enable();
|
|
||||||
if(this.subCategories) {
|
|
||||||
this.subCategories.init();
|
|
||||||
this.subCategories.enable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
this.subscriptions.push(this.categoryIndexSubject.asObservable().subscribe(index => {
|
this.subscriptions.push(this.categoryIndexSubject.asObservable().subscribe(index => {
|
||||||
if(this.subCategories) {
|
this.categoryChanged(() => {
|
||||||
this.subCategories.disable();
|
this.categoryIndex = index;
|
||||||
}
|
});
|
||||||
this.categoryIndex = index;
|
|
||||||
this.cdr.detectChanges();
|
|
||||||
if(this.subCategories) {
|
|
||||||
this.subCategories.init();
|
|
||||||
this.subCategories.enable();
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
this.subscriptions.push(this.subCategoryIndexSubject.asObservable().subscribe(index => {
|
this.subscriptions.push(this.subCategoryIndexSubject.asObservable().subscribe(index => {
|
||||||
this.subCategoryIndex = index;
|
this.subCategoryChanged(() => {
|
||||||
this.cdr.detectChanges();
|
this.subCategoryIndex = index;
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
this.subscriptions.push(this.route.params.subscribe(params => {
|
this.subscriptions.push(this.route.params.subscribe(params => {
|
||||||
if (subscription) {
|
if (subscription) {
|
||||||
|
@ -193,10 +175,6 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public closeDeleteModal() {
|
|
||||||
// this.deleteModal.cancel();
|
|
||||||
// }
|
|
||||||
|
|
||||||
public deleteElement() {
|
public deleteElement() {
|
||||||
if (this.type === "topic") {
|
if (this.type === "topic") {
|
||||||
this.deleteTopic();
|
this.deleteTopic();
|
||||||
|
@ -211,6 +189,34 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
this.topicIndexSubject.next(topicIndex);
|
this.topicIndexSubject.next(topicIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
topicChanged(callback: Function, save: boolean = false) {
|
||||||
|
if(this.topics && save) {
|
||||||
|
this.topics.disable();
|
||||||
|
}
|
||||||
|
if(this.categories) {
|
||||||
|
this.categories.disable();
|
||||||
|
}
|
||||||
|
if(this.subCategories) {
|
||||||
|
this.subCategories.disable();
|
||||||
|
}
|
||||||
|
if(callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
if(this.topics && save) {
|
||||||
|
this.topics.init();
|
||||||
|
this.topics.enable();
|
||||||
|
}
|
||||||
|
if(this.categories) {
|
||||||
|
this.categories.init();
|
||||||
|
this.categories.enable();
|
||||||
|
}
|
||||||
|
if(this.subCategories) {
|
||||||
|
this.subCategories.init();
|
||||||
|
this.subCategories.enable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private buildTopic(topic: Topic) {
|
private buildTopic(topic: Topic) {
|
||||||
let topics = this.stakeholder.topics.filter(element => element._id !== topic._id);
|
let topics = this.stakeholder.topics.filter(element => element._id !== topic._id);
|
||||||
this.form = this.fb.group({
|
this.form = this.fb.group({
|
||||||
|
@ -254,12 +260,13 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
if (!this.form.invalid) {
|
if (!this.form.invalid) {
|
||||||
let path = [this.stakeholder._id];
|
let path = [this.stakeholder._id];
|
||||||
let callback = (topic: Topic): void => {
|
let callback = (topic: Topic): void => {
|
||||||
if (this.index === -1) {
|
this.topicChanged(() => {
|
||||||
this.stakeholder.topics.push(topic);
|
if (this.index === -1) {
|
||||||
this.topics.init();
|
this.stakeholder.topics.push(topic);
|
||||||
} else {
|
} else {
|
||||||
this.stakeholder.topics[this.index] = HelperFunctions.copy(topic);
|
this.stakeholder.topics[this.index] = HelperFunctions.copy(topic);
|
||||||
}
|
}
|
||||||
|
}, true);
|
||||||
};
|
};
|
||||||
if (this.index === -1) {
|
if (this.index === -1) {
|
||||||
this.save('Topic has been successfully created', path, this.form.value, callback);
|
this.save('Topic has been successfully created', path, this.form.value, callback);
|
||||||
|
@ -320,6 +327,27 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
this.chooseSubcategory(0);
|
this.chooseSubcategory(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
categoryChanged(callback: Function, save: boolean = false) {
|
||||||
|
if(this.categories && save) {
|
||||||
|
this.categories.disable();
|
||||||
|
}
|
||||||
|
if(this.subCategories) {
|
||||||
|
this.subCategories.disable();
|
||||||
|
}
|
||||||
|
if(callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
if(this.categories && save) {
|
||||||
|
this.categories.init();
|
||||||
|
this.categories.enable();
|
||||||
|
}
|
||||||
|
if(this.subCategories) {
|
||||||
|
this.subCategories.init();
|
||||||
|
this.subCategories.enable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private buildCategory(category: Category) {
|
private buildCategory(category: Category) {
|
||||||
let categories = this.stakeholder.topics[this.topicIndex].categories.filter(element => element._id !== category._id);
|
let categories = this.stakeholder.topics[this.topicIndex].categories.filter(element => element._id !== category._id);
|
||||||
this.form = this.fb.group({
|
this.form = this.fb.group({
|
||||||
|
@ -362,12 +390,14 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
if (!this.form.invalid) {
|
if (!this.form.invalid) {
|
||||||
let path = [this.stakeholder._id, this.stakeholder.topics[this.topicIndex]._id];
|
let path = [this.stakeholder._id, this.stakeholder.topics[this.topicIndex]._id];
|
||||||
let callback = (category: Category): void => {
|
let callback = (category: Category): void => {
|
||||||
if (this.index === -1) {
|
this.categoryChanged(() => {
|
||||||
this.stakeholder.topics[this.topicIndex].categories.push(category);
|
if (this.index === -1) {
|
||||||
this.categories.init();
|
this.stakeholder.topics[this.topicIndex].categories.push(category);
|
||||||
} else {
|
this.categories.init();
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.index] = HelperFunctions.copy(category);
|
} else {
|
||||||
}
|
this.stakeholder.topics[this.topicIndex].categories[this.index] = HelperFunctions.copy(category);
|
||||||
|
}
|
||||||
|
}, true);
|
||||||
};
|
};
|
||||||
if (this.index === -1) {
|
if (this.index === -1) {
|
||||||
this.save('Category has been successfully created', path, this.form.value, callback);
|
this.save('Category has been successfully created', path, this.form.value, callback);
|
||||||
|
@ -426,6 +456,24 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chooseSubcategory(subcategoryIndex: number) {
|
||||||
|
this.subCategoryIndexSubject.next(subcategoryIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
subCategoryChanged(callback: Function, save: boolean = false) {
|
||||||
|
if(this.subCategories && save) {
|
||||||
|
this.subCategories.disable();
|
||||||
|
}
|
||||||
|
if(callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
if(this.subCategories && save) {
|
||||||
|
this.subCategories.init();
|
||||||
|
this.subCategories.enable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private buildSubcategory(subCategory: SubCategory) {
|
private buildSubcategory(subCategory: SubCategory) {
|
||||||
let subCategories = this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories.filter(element => element._id !== subCategory._id);
|
let subCategories = this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories.filter(element => element._id !== subCategory._id);
|
||||||
this.form = this.fb.group({
|
this.form = this.fb.group({
|
||||||
|
@ -473,11 +521,13 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id
|
||||||
];
|
];
|
||||||
let callback = (subCategory: SubCategory): void => {
|
let callback = (subCategory: SubCategory): void => {
|
||||||
if (this.index === -1) {
|
this.subCategoryChanged(() => {
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories.push(subCategory);
|
if (this.index === -1) {
|
||||||
} else {
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories.push(subCategory);
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index] = HelperFunctions.copy(subCategory);
|
} else {
|
||||||
}
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index] = HelperFunctions.copy(subCategory);
|
||||||
|
}
|
||||||
|
}, true);
|
||||||
};
|
};
|
||||||
if (this.index === -1) {
|
if (this.index === -1) {
|
||||||
this.save('Subcategory has been successfully created', path, this.form.value, callback);
|
this.save('Subcategory has been successfully created', path, this.form.value, callback);
|
||||||
|
@ -619,10 +669,6 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
chooseSubcategory(subcategoryIndex: number) {
|
|
||||||
this.subCategoryIndexSubject.next(subcategoryIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getPluralTypeName(): string {
|
public getPluralTypeName(): string {
|
||||||
if (this.type == "topic") {
|
if (this.type == "topic") {
|
||||||
return "Topics";
|
return "Topics";
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0423644810480f58ec31522e744d1589530657f9
|
Subproject commit d6befee58de8fcb89e27d0c3403fd937b2e1552c
|
Loading…
Reference in New Issue