OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add attributes company and domain and a condition for older token structures
Inga Maif1bbe0bd78ca
diff --git a/app/views/enterprises/_current.html.erb b/app/views/enterprises/_current.html.erbindex 8685e9612c1..a65b6f4187d 100644--- a/app/views/enterprises/_current.html.erb+++ b/app/views/enterprises/_current.html.erb@@ -1,8 +1,11 @@-<enterprise-active-saved-trial data-subscriber="<%= @current_token.subscriber %>"- data-email="<%= @current_token.mail %>"- data-user-count="<%= @current_token.restrictions.nil? ? t('js.admin.enterprise.upsale.unlimited') : @current_token.restrictions[:active_user_count] %>"- data-starts-at="<%= format_date @current_token.starts_at %>"- data-expires-at="<%= (!@current_token.will_expire?) ? t('js.admin.enterprise.upsale.unlimited') : (format_date @current_token.expires_at) %>">+<enterprise-active-saved-trial+ data-subscriber="<%= @current_token.subscriber %>"+ data-email="<%= @current_token.mail %>"+ data-company="<%= @current_token.has_attribute?(:company) ? @current_token.company : nil %>"+ data-domain="<%= @current_token.has_attribute?(:domain) ? @current_token.domain : nil %>"+ data-user-count="<%= @current_token.restrictions.nil? ? t('js.admin.enterprise.upsale.unlimited') : @current_token.restrictions[:active_user_count] %>"+ data-starts-at="<%= format_date @current_token.starts_at %>"+ data-expires-at="<%= (!@current_token.will_expire?) ? t('js.admin.enterprise.upsale.unlimited') : (format_date @current_token.expires_at) %>"></enterprise-active-saved-trial><%= form_tag({}, method: :delete) do %>diff --git a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-saved-trial.component.tsindex e50e7624e85..fd37b249e6e 100644--- a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts+++ b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts@@ -40,11 +40,11 @@ export const enterpriseActiveSavedTrialSelector = 'enterprise-active-saved-trialexport class EEActiveSavedTrialComponent extends EEActiveTrialBase {public subscriber = this.elementRef.nativeElement.dataset['subscriber'];public email = this.elementRef.nativeElement.dataset['email'];+ public company = this.elementRef.nativeElement.dataset['company'];+ public domain = this.elementRef.nativeElement.dataset['domain'];public userCount = this.elementRef.nativeElement.dataset['userCount'];public startsAt = this.elementRef.nativeElement.dataset['startsAt'];public expiresAt = this.elementRef.nativeElement.dataset['expiresAt'];- public company:string;- public domain:string;constructor(readonly elementRef:ElementRef,readonly I18n:I18nService) {diff --git a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.tsindex 0bcd56ed46b..8b61b0069f0 100644--- a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts+++ b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts@@ -42,11 +42,11 @@ import {GonService} from "core-app/modules/common/gon/gon.service";export class EEActiveTrialComponent extends EEActiveTrialBase implements OnInit {public subscriber:string;public email:string;+ public company:string;+ public domain:string;public userCount:string;public startsAt:string;public expiresAt:string;- public company:string;- public domain:string;constructor(readonly elementRef:ElementRef,readonly cdRef:ChangeDetectorRef,