avicenna/service/app-hub/dashboard/src/app/pages/ticket-system/ticket-lane/ticket-lane-footer.componen...

41 lines
1.6 KiB
TypeScript

import { AsyncPipe, CurrencyPipe, NgIf } from '@angular/common';
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { TicketStateMeta } from '../../../core/data-access/graphql/generated/generated';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'dks-ticket-lane-footer',
template: `<span *ngIf="withTicketCount" class="text-left text-xs">
{{ ticketStateMeta.count }} Tickets
</span>
<span *ngIf="withApprovalRequiredCount" class="text-left text-xs">
{{ ticketStateMeta.approvalRequiredCount }} davon genehmigungspflichtig
</span>
<span *ngIf="withApprovalUnknownCount" class="text-left text-xs">
{{ ticketStateMeta.approvalUnknownCount }} davon auf Genehmigungspflicht
zu prüfen
</span>
<span *ngIf="withApprovalNotCompanyCount" class="text-left text-xs">
{{ ticketStateMeta.approvalNotCompanyCount }} davon fehlende Genehmigung
</span>
<span *ngIf="withTdNotCompanyCount" class="text-left text-xs">
{{ ticketStateMeta.tdNotCompanyCount }} davon fehlender Transportschein
</span> `,
styles: [
`
:host {
@apply flex flex-col items-center justify-center p-2;
}
`,
],
imports: [NgIf, AsyncPipe, CurrencyPipe]
})
export class TicketLaneFooterComponent {
@Input() ticketStateMeta!: TicketStateMeta;
@Input() withTicketCount = true;
@Input() withApprovalUnknownCount = false;
@Input() withApprovalRequiredCount = false;
@Input() withTdNotCompanyCount = false;
@Input() withApprovalNotCompanyCount = false;
}