Cards limits totals
Component: <pcp-limit-totals>
Preview:

Description
This component provides a summary of the total limits of all company cards. It categorizes the cards into three groups: "total limit", "total used limit", "total available limit".
Usage
import { PcpLimitsTotalsComponent } from '@celerofinancas/pcp-client-ui';
<pcp-limit-totals
[title]="Limites"
[cardsOptions]="cardsOption"
[tooltip]="Total de cartões por conta da empresa"
/>
Example of cardsOptions acceptable input format:
const cardsOption = new Map([
[
CARD_LIMITS_TYPE.total,
{
label: 'Limite total de todos os cartões',
borderColor: 'c-primary-500',
value: 0,
},
],
[
CARD_LIMITS_TYPE.available,
{
label: 'Limite disponível de todos os cartões',
borderColor: 'c-info-500',
value: 0,
},
],
[
CARD_LIMITS_TYPE.used,
{
label: 'Limite total utilizado dos cartões',
borderColor: 'c-danger-500',
value: 0,
},
],
]);
Inputs
| Name | Type | Default | Description | Required |
|---|---|---|---|---|
title | string | Cartões | The main title of the component | NO |
cardsOptions | Map<CARDS_SUMMARY_TYPE, { label: string, total: number }> | cardsTotalsMap | The mapping of cards values and labels | NO |
tooltip | string | Tooltip text displayed in info icon on mouse hover | NO |
Dependencies
- @celerofinancas/class-utils
- @celerofinancas/ui-loaders
- @celerofinancas/ui-directives
Notes
The value in the cardOptions map is just a initial reference, it will be updated when the request to pcp api is completed, with the correct values of the cards limits for the current company.