RED-6074: fix license view
This commit is contained in:
parent
55cfc60a09
commit
4ede90d41c
@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ConfigService } from '@services/config.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
@ -20,7 +20,7 @@ import { User } from '@red/domain';
|
||||
templateUrl: './license-screen.component.html',
|
||||
styleUrls: ['./license-screen.component.scss'],
|
||||
})
|
||||
export class LicenseScreenComponent implements OnInit {
|
||||
export class LicenseScreenComponent {
|
||||
readonly roles = ROLES;
|
||||
readonly currentUser = getCurrentUser<User>();
|
||||
readonly currentYear = new Date().getFullYear();
|
||||
@ -48,10 +48,6 @@ export class LicenseScreenComponent implements OnInit {
|
||||
_loadingService.start();
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
await this.licenseService.loadLicenseData();
|
||||
}
|
||||
|
||||
getAnalysisPercentageOfLicense() {
|
||||
const totalLicensedNumberOfPages = this.licenseService.totalLicensedNumberOfPages;
|
||||
const numberOfAnalyzedPages = this.licenseService.currentInfo.numberOfAnalyzedPages;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { inject, NgModule } from '@angular/core';
|
||||
import { LicenseScreenComponent } from './license-screen/license-screen.component';
|
||||
import { LicenseSelectComponent } from './license-select/license-select.component';
|
||||
import { LicenseChartComponent } from './license-chart/license-chart.component';
|
||||
@ -10,11 +10,15 @@ import { NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
import { ComboChartComponent, ComboSeriesVerticalComponent, YAxisComponent } from './combo-chart';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { LicenseService } from '@services/license.service';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: LicenseScreenComponent,
|
||||
resolve: {
|
||||
licenseData: () => inject(LicenseService).loadLicenseData(),
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ import dayjs from 'dayjs';
|
||||
import { IDateRange } from '@red/domain';
|
||||
|
||||
export function toDate(month: number, year: number) {
|
||||
return dayjs(`01-${month}-${year}`, 'DD-M-YYYY').toDate();
|
||||
return dayjs(`${month}-01-${year}`, 'MM-DD-YYYY').toDate();
|
||||
}
|
||||
|
||||
export function isCurrentMonth(month: number, year: number) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user