Compare commits

...

2 Commits

Author SHA1 Message Date
argirok 2bfd744ab8 [plugins-functionality | DONE | CHANGED ] update plan values 2024-05-09 10:23:42 +03:00
argirok b0df5c0f31 [plugins-functionality | DONE | FIX ] minor fixes in plugins 2024-05-09 10:22:19 +03:00
8 changed files with 13 additions and 9 deletions

View File

@ -102,6 +102,7 @@ export class CommunityService {
community.claim = resData.claim;
community.membership = resData.membership;
community.type = resData.type;
community.plan = resData.plan?resData.plan:"Default";
community.otherZenodoCommunities = resData.otherZenodoCommunities;
if (resData.hasOwnProperty('status')) {
community.status = resData.status;

View File

@ -24,7 +24,7 @@ export class CommunityInfo {
fos: string[] = [];
sdg: string[] = []
selectionCriteria: SelectionCriteria;
plan: "starter" | "extended";
plan: "Standard" | "Advanced" | "Premium" | "National" | "Default" ;
public static checkIsUpload(response: CommunityInfo | CommunityInfo[]): any | any[] {
if (Array.isArray(response)) {

View File

@ -1,7 +1,7 @@
<div *ngIf="!community " class="uk-text-meta uk-text-center">
No community info available
</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 *ngIf="portal && community" class="">

View File

@ -4,7 +4,7 @@ import {PluginGraphInfo} from "./plugin-graph-info.component";
@Component({
selector: 'plugin-graph-info-form',
template: `N
template: `
<div *ngIf="pluginObject" class="uk-padding-xsmall">
<plugin-field-edit [value]="pluginObject.title"
type="text" field="title" (changed)="valueChanged($event)"></plugin-field-edit>

View File

@ -143,7 +143,7 @@
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 *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-body uk-flex">
<div class="uk-width-expand uk-text-small">

View File

@ -58,8 +58,8 @@
<h6>{{template.name}}</h6>
<div class="uk-margin-small-bottom">
<span class="uk-label uk-padding-xsmall uk-text-capitalize"
[class.uk-label-success]="template.plan !='extended'"
[class.uk-label-danger]="template.plan =='extended'">Plan: {{template.plan}} </span>
[class.uk-label-success]="template.plan =='Standard'"
[class.uk-label-danger]="template.plan !='Standard'">Plan: {{template.plan}} </span>
<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>
<span *ngIf="template.defaultIsActive"

View File

@ -196,7 +196,7 @@ export class PluginTemplatesComponent implements OnInit {
_id: this._fb.control(null),
name: this._fb.control(''),
code: this._fb.control('', Validators.required),
plan: this._fb.control('starter', Validators.required),
plan: this._fb.control('standard', Validators.required),
description: this._fb.control(''),
page: this._fb.control(this.page?this.getPageById(this.page):'', Validators.required),
portalType: this._fb.control('community', Validators.required),

View File

@ -46,8 +46,11 @@ export class PluginUtils{
{label:"Left", value:"left"},
];
public planOptions: Option[] = [
{value: 'starter', label: 'Starter'},
{value: 'extended', label: 'Extended'}
{value: 'Default', label: 'Default'},
{value: 'Standard', label: 'Standard'},
{value: 'Advanced', label: 'Advanced'},
{value: 'Premium', label: 'Premium'},
{value: 'National', label: 'National'}
];