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 creation date from trial key
Inga Mai945745802e2b
diff --git a/app/controllers/enterprises_controller.rb b/app/controllers/enterprises_controller.rbindex 3410d12dded..2b3510db2b4 100644--- a/app/controllers/enterprises_controller.rb+++ b/app/controllers/enterprises_controller.rb@@ -96,7 +96,8 @@ class EnterprisesController < ApplicationController@trial_key = Token::EnterpriseTrialKey.find_by(user_id: User.system.id)if @trial_keygon.ee_trial_key = {- value: @trial_key.value+ value: @trial_key.value,+ created: @trial_key.created_on}endenddiff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex fc0b45d6198..d71da054498 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -187,7 +187,7 @@ en:confirmation: "Confirmation of email address"confirmation_info: >We sent you an email on %{date} to %{email}.- Please check your inbox and click the confirmation link provided to start your 14 days trial."+ Please check your inbox and click the confirmation link provided to start your 14 days trial.form:general_consent: >I agree with the <a target="_blank" href="%{link_terms}">terms of service</a>diff --git a/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts b/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.tsindex 719769a8803..f2175503b5b 100644--- a/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts+++ b/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts@@ -32,6 +32,7 @@ import {EnterpriseTrialData, EnterpriseTrialService} from "app/components/enterpimport {HttpClient} from "@angular/common/http";import {NotificationsService} from "core-app/modules/common/notifications/notifications.service";import {distinctUntilChanged} from "rxjs/operators";+import {GonService} from "core-app/modules/common/gon/gon.service";@Component({selector: 'enterprise-trial-waiting',@@ -39,9 +40,11 @@ import {distinctUntilChanged} from "rxjs/operators";styleUrls: ['./ee-trial-waiting.component.sass']})export class EETrialWaitingComponent implements OnInit {+ public created:string;+public text = {confirmation_info: this.I18n.t('js.admin.enterprise.trial.confirmation_info', {- date: '',+ date: this.created,email: this.eeTrialService.userData$.getValueOr({})}),resend: this.I18n.t('js.admin.enterprise.trial.resend_link'),@@ -57,11 +60,15 @@ export class EETrialWaitingComponent implements OnInit {readonly cdRef:ChangeDetectorRef,readonly I18n:I18nService,protected http:HttpClient,+ readonly Gon:GonService,protected notificationsService:NotificationsService,public eeTrialService:EnterpriseTrialService) {}ngOnInit() {+ let savedDateStr = (this.Gon.get('ee_trial_key') as any).created.split(' ')[0];+ this.created = new Date(savedDateStr).toLocaleDateString();+this.eeTrialService.userData$.values$().pipe(@@ -69,7 +76,7 @@ export class EETrialWaitingComponent implements OnInit {).subscribe(userForm => {this.text.confirmation_info = this.I18n.t('js.admin.enterprise.trial.confirmation_info', {- date: '',+ date: this.created,email: userForm.email});