diff --git a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.html b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.html index 93d0288e9d..937e839d54 100644 --- a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.html +++ b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.html @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.sass b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.sass deleted file mode 100644 index 8b05a9313e..0000000000 --- a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.sass +++ /dev/null @@ -1,2 +0,0 @@ -.button - float: left \ No newline at end of file diff --git a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts index 8f7fc77a3f..679d00186d 100644 --- a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts +++ b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts @@ -42,10 +42,9 @@ export const freeTrialButtonSelector = 'free-trial-button'; @Component({ selector: freeTrialButtonSelector, templateUrl: './free-trial-button.component.html', - styleUrls: ['./free-trial-button.component.sass'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class FreeTrialButtonComponent implements OnInit { +export class FreeTrialButtonComponent { public text = { button_trial: this.I18n.t('js.admin.enterprise.upsale.button_start_trial'), }; @@ -55,16 +54,13 @@ export class FreeTrialButtonComponent implements OnInit { readonly injector:Injector, public eeTrialService:EnterpriseTrialService) { } - - ngOnInit() { - console.warn('HELLO'); - } - - public openTrialModal() { + public openTrialModal():void { // cancel request and open first modal window this.eeTrialService.cancelled = true; this.eeTrialService.modalOpen = true; this.opModalService.show(EnterpriseTrialModalComponent, this.injector); } - + public get noTrialRequested() { + return this.eeTrialService.status === undefined; + } } diff --git a/frontend/src/app/features/enterprise/openproject-enterprise.module.ts b/frontend/src/app/features/enterprise/openproject-enterprise.module.ts index 351acb2731..6e88418225 100644 --- a/frontend/src/app/features/enterprise/openproject-enterprise.module.ts +++ b/frontend/src/app/features/enterprise/openproject-enterprise.module.ts @@ -49,7 +49,7 @@ import { FreeTrialButtonComponent } from 'core-app/features/enterprise/free-tria providers: [ EnterpriseTrialService, ], - exports:[ + exports: [ FreeTrialButtonComponent, ], declarations: [