Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
894 B

/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
import { AppDto, CallsUsageDto } from '@app/shared';
@Component({
selector: 'sqx-api-calls-summary-card[app][usage]',
styleUrls: ['./api-calls-summary-card.component.scss'],
templateUrl: './api-calls-summary-card.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ApiCallsSummaryCardComponent implements OnChanges {
@Input()
public app!: AppDto;
@Input()
public usage?: CallsUsageDto;
public callsMonth = 0;
public callsAllowed = 0;
public ngOnChanges() {
if (this.usage) {
this.callsMonth = this.usage.monthCalls;
this.callsAllowed = this.usage.allowedCalls;
}
}
}