Compare commits
2 Commits
327fe64293
...
2bfd744ab8
Author | SHA1 | Date |
---|---|---|
argirok | 2bfd744ab8 | |
argirok | b0df5c0f31 |
|
@ -102,6 +102,7 @@ export class CommunityService {
|
||||||
community.claim = resData.claim;
|
community.claim = resData.claim;
|
||||||
community.membership = resData.membership;
|
community.membership = resData.membership;
|
||||||
community.type = resData.type;
|
community.type = resData.type;
|
||||||
|
community.plan = resData.plan?resData.plan:"Default";
|
||||||
community.otherZenodoCommunities = resData.otherZenodoCommunities;
|
community.otherZenodoCommunities = resData.otherZenodoCommunities;
|
||||||
if (resData.hasOwnProperty('status')) {
|
if (resData.hasOwnProperty('status')) {
|
||||||
community.status = resData.status;
|
community.status = resData.status;
|
||||||
|
|
|
@ -24,7 +24,7 @@ export class CommunityInfo {
|
||||||
fos: string[] = [];
|
fos: string[] = [];
|
||||||
sdg: string[] = []
|
sdg: string[] = []
|
||||||
selectionCriteria: SelectionCriteria;
|
selectionCriteria: SelectionCriteria;
|
||||||
plan: "starter" | "extended";
|
plan: "Standard" | "Advanced" | "Premium" | "National" | "Default" ;
|
||||||
|
|
||||||
public static checkIsUpload(response: CommunityInfo | CommunityInfo[]): any | any[] {
|
public static checkIsUpload(response: CommunityInfo | CommunityInfo[]): any | any[] {
|
||||||
if (Array.isArray(response)) {
|
if (Array.isArray(response)) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div *ngIf="!community " class="uk-text-meta uk-text-center">
|
<div *ngIf="!community " class="uk-text-meta uk-text-center">
|
||||||
No community info available
|
No community info available
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-section uk-container ">
|
<div class="uk-section uk-container" *ngIf="community ">
|
||||||
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1@s ">
|
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1@s ">
|
||||||
|
|
||||||
<div *ngIf="portal && community" class="">
|
<div *ngIf="portal && community" class="">
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {PluginGraphInfo} from "./plugin-graph-info.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'plugin-graph-info-form',
|
selector: 'plugin-graph-info-form',
|
||||||
template: `N
|
template: `
|
||||||
<div *ngIf="pluginObject" class="uk-padding-xsmall">
|
<div *ngIf="pluginObject" class="uk-padding-xsmall">
|
||||||
<plugin-field-edit [value]="pluginObject.title"
|
<plugin-field-edit [value]="pluginObject.title"
|
||||||
type="text" field="title" (changed)="valueChanged($event)"></plugin-field-edit>
|
type="text" field="title" (changed)="valueChanged($event)"></plugin-field-edit>
|
||||||
|
|
|
@ -143,7 +143,7 @@
|
||||||
class="uk-heading-divider uk-h6 uk-margin-left uk-padding-remove-left uk-text-capitalize ">{{placement.value}}</div>
|
class="uk-heading-divider uk-h6 uk-margin-left uk-padding-remove-left uk-text-capitalize ">{{placement.value}}</div>
|
||||||
<ng-container *ngFor="let pluginGroup of pluginsByPlacement.get(placement.value) ; let i=index">
|
<ng-container *ngFor="let pluginGroup of pluginsByPlacement.get(placement.value) ; let i=index">
|
||||||
<ng-container *ngIf="(pluginGroup.template.portalSpecific.length == 0 || pluginGroup.template.portalSpecific.indexOf(communityInfo.communityId) != -1 ) &&
|
<ng-container *ngIf="(pluginGroup.template.portalSpecific.length == 0 || pluginGroup.template.portalSpecific.indexOf(communityInfo.communityId) != -1 ) &&
|
||||||
(pluginGroup.template.plan == 'starter'|| pluginGroup.template.plan == communityInfo.plan )">
|
(pluginGroup.template.plan == 'Standard' || pluginGroup.template.plan == 'Default' || pluginGroup.template.plan == communityInfo.plan )">
|
||||||
<div class="uk-card uk-card-default uk-margin-bottom">
|
<div class="uk-card uk-card-default uk-margin-bottom">
|
||||||
<div class="uk-card-body uk-flex">
|
<div class="uk-card-body uk-flex">
|
||||||
<div class="uk-width-expand uk-text-small">
|
<div class="uk-width-expand uk-text-small">
|
||||||
|
|
|
@ -58,8 +58,8 @@
|
||||||
<h6>{{template.name}}</h6>
|
<h6>{{template.name}}</h6>
|
||||||
<div class="uk-margin-small-bottom">
|
<div class="uk-margin-small-bottom">
|
||||||
<span class="uk-label uk-padding-xsmall uk-text-capitalize"
|
<span class="uk-label uk-padding-xsmall uk-text-capitalize"
|
||||||
[class.uk-label-success]="template.plan !='extended'"
|
[class.uk-label-success]="template.plan =='Standard'"
|
||||||
[class.uk-label-danger]="template.plan =='extended'">Plan: {{template.plan}} </span>
|
[class.uk-label-danger]="template.plan !='Standard'">Plan: {{template.plan}} </span>
|
||||||
<span *ngIf="template.portalSpecific && template.portalSpecific.length > 0"
|
<span *ngIf="template.portalSpecific && template.portalSpecific.length > 0"
|
||||||
class="uk-label uk-label-primary uk-padding-xsmall uk-text-capitalize uk-margin-left">Communities: {{template.portalSpecific.join(', ')}} </span>
|
class="uk-label uk-label-primary uk-padding-xsmall uk-text-capitalize uk-margin-left">Communities: {{template.portalSpecific.join(', ')}} </span>
|
||||||
<span *ngIf="template.defaultIsActive"
|
<span *ngIf="template.defaultIsActive"
|
||||||
|
|
|
@ -196,7 +196,7 @@ export class PluginTemplatesComponent implements OnInit {
|
||||||
_id: this._fb.control(null),
|
_id: this._fb.control(null),
|
||||||
name: this._fb.control(''),
|
name: this._fb.control(''),
|
||||||
code: this._fb.control('', Validators.required),
|
code: this._fb.control('', Validators.required),
|
||||||
plan: this._fb.control('starter', Validators.required),
|
plan: this._fb.control('standard', Validators.required),
|
||||||
description: this._fb.control(''),
|
description: this._fb.control(''),
|
||||||
page: this._fb.control(this.page?this.getPageById(this.page):'', Validators.required),
|
page: this._fb.control(this.page?this.getPageById(this.page):'', Validators.required),
|
||||||
portalType: this._fb.control('community', Validators.required),
|
portalType: this._fb.control('community', Validators.required),
|
||||||
|
|
|
@ -46,8 +46,11 @@ export class PluginUtils{
|
||||||
{label:"Left", value:"left"},
|
{label:"Left", value:"left"},
|
||||||
];
|
];
|
||||||
public planOptions: Option[] = [
|
public planOptions: Option[] = [
|
||||||
{value: 'starter', label: 'Starter'},
|
{value: 'Default', label: 'Default'},
|
||||||
{value: 'extended', label: 'Extended'}
|
{value: 'Standard', label: 'Standard'},
|
||||||
|
{value: 'Advanced', label: 'Advanced'},
|
||||||
|
{value: 'Premium', label: 'Premium'},
|
||||||
|
{value: 'National', label: 'National'}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue