From 2bfd744ab8d019a0186304710cad728f58c7b61e Mon Sep 17 00:00:00 2001 From: argirok Date: Thu, 9 May 2024 10:23:42 +0300 Subject: [PATCH] [plugins-functionality | DONE | CHANGED ] update plan values --- connect/community/community.service.ts | 1 + connect/community/communityInfo.ts | 2 +- dashboard/plugins/plugins.component.html | 2 +- dashboard/plugins/templates/pluginTemplates.component.html | 4 ++-- dashboard/plugins/templates/pluginTemplates.component.ts | 2 +- dashboard/plugins/utils/pluginUtils.ts | 7 +++++-- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/connect/community/community.service.ts b/connect/community/community.service.ts index 06d222e0..a4cb9ee4 100644 --- a/connect/community/community.service.ts +++ b/connect/community/community.service.ts @@ -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; diff --git a/connect/community/communityInfo.ts b/connect/community/communityInfo.ts index f17b257c..72ac70fc 100644 --- a/connect/community/communityInfo.ts +++ b/connect/community/communityInfo.ts @@ -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)) { diff --git a/dashboard/plugins/plugins.component.html b/dashboard/plugins/plugins.component.html index 3e7be5b7..1993e1bb 100644 --- a/dashboard/plugins/plugins.component.html +++ b/dashboard/plugins/plugins.component.html @@ -143,7 +143,7 @@ class="uk-heading-divider uk-h6 uk-margin-left uk-padding-remove-left uk-text-capitalize ">{{placement.value}} + (pluginGroup.template.plan == 'Standard' || pluginGroup.template.plan == 'Default' || pluginGroup.template.plan == communityInfo.plan )">
diff --git a/dashboard/plugins/templates/pluginTemplates.component.html b/dashboard/plugins/templates/pluginTemplates.component.html index ddc8a396..6b2f71d5 100644 --- a/dashboard/plugins/templates/pluginTemplates.component.html +++ b/dashboard/plugins/templates/pluginTemplates.component.html @@ -58,8 +58,8 @@
{{template.name}}
Plan: {{template.plan}} + [class.uk-label-success]="template.plan =='Standard'" + [class.uk-label-danger]="template.plan !='Standard'">Plan: {{template.plan}} Communities: {{template.portalSpecific.join(', ')}}