@hed-hog/core 0.0.299 → 0.0.300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/dashboard/dashboard.controller.d.ts +6 -0
- package/dist/dashboard/dashboard/dashboard.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard/dashboard.service.d.ts +6 -0
- package/dist/dashboard/dashboard/dashboard.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +2 -1
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.controller.js +6 -3
- package/dist/dashboard/dashboard-component/dashboard-component.controller.js.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +7 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.js +76 -33
- package/dist/dashboard/dashboard-component/dashboard-component.service.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +65 -0
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js +111 -0
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +69 -0
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.js +526 -19
- package/dist/dashboard/dashboard-core/dashboard-core.service.js.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts +2 -0
- package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts +2 -0
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts +2 -0
- package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts +2 -0
- package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts.map +1 -1
- package/hedhog/data/dashboard.yaml +12 -6
- package/hedhog/data/dashboard_component_role.yaml +66 -0
- package/hedhog/data/dashboard_role.yaml +2 -8
- package/hedhog/data/route.yaml +72 -0
- package/hedhog/frontend/app/dashboard/[slug]/dashboard-content.tsx.ejs +333 -128
- package/hedhog/frontend/app/dashboard/[slug]/widget-renderer.tsx.ejs +277 -53
- package/hedhog/frontend/app/dashboard/components/add-widget-selector-dialog.tsx.ejs +179 -231
- package/hedhog/frontend/app/dashboard/components/draggable-grid.tsx.ejs +64 -18
- package/hedhog/frontend/app/dashboard/dashboard-home-tabs.tsx.ejs +1389 -0
- package/hedhog/frontend/app/dashboard/dashboard.css.ejs +37 -0
- package/hedhog/frontend/app/dashboard/management/page.tsx.ejs +1 -1
- package/hedhog/frontend/app/dashboard/management/tabs/components-tab.tsx.ejs +6 -6
- package/hedhog/frontend/app/dashboard/management/tabs/dashboards-tab.tsx.ejs +8 -8
- package/hedhog/frontend/app/dashboard/management/tabs/items-tab.tsx.ejs +3 -3
- package/hedhog/frontend/app/dashboard/page.tsx.ejs +3 -25
- package/hedhog/frontend/messages/en.json +112 -2
- package/hedhog/frontend/messages/pt.json +111 -1
- package/hedhog/frontend/widgets/account-security.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/active-users-card.tsx.ejs +2 -2
- package/hedhog/frontend/widgets/activity-timeline.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/email-notifications.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/locale-config.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/login-history-chart.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/mail-config.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/mail-sent-card.tsx.ejs +2 -2
- package/hedhog/frontend/widgets/mail-sent-chart.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/menus-card.tsx.ejs +2 -2
- package/hedhog/frontend/widgets/oauth-config.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/permissions-card.tsx.ejs +2 -2
- package/hedhog/frontend/widgets/permissions-chart.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/profile-card.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/routes-card.tsx.ejs +2 -2
- package/hedhog/frontend/widgets/session-activity-chart.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/sessions-today-card.tsx.ejs +2 -2
- package/hedhog/frontend/widgets/stat-access-level.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/stat-actions-today.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/stat-consecutive-days.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/stat-online-time.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/storage-config.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/theme-config.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/user-growth-chart.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/user-roles.tsx.ejs +1 -1
- package/hedhog/frontend/widgets/user-sessions.tsx.ejs +1 -1
- package/hedhog/table/dashboard.yaml +6 -0
- package/package.json +5 -5
- package/src/dashboard/dashboard-component/dashboard-component.controller.ts +15 -2
- package/src/dashboard/dashboard-component/dashboard-component.service.ts +107 -43
- package/src/dashboard/dashboard-core/dashboard-core.controller.ts +112 -1
- package/src/dashboard/dashboard-core/dashboard-core.service.ts +674 -19
- package/hedhog/frontend/app/dashboard/components/widgets/core..gitkeep.ejs +0 -11
- package/hedhog/frontend/app/dashboard/components/widgets/core.account-security.tsx.ejs +0 -192
- package/hedhog/frontend/app/dashboard/components/widgets/core.active-users-card.tsx.ejs +0 -58
- package/hedhog/frontend/app/dashboard/components/widgets/core.activity-timeline.tsx.ejs +0 -223
- package/hedhog/frontend/app/dashboard/components/widgets/core.email-notifications.tsx.ejs +0 -226
- package/hedhog/frontend/app/dashboard/components/widgets/core.locale-config.tsx.ejs +0 -168
- package/hedhog/frontend/app/dashboard/components/widgets/core.login-history-chart.tsx.ejs +0 -115
- package/hedhog/frontend/app/dashboard/components/widgets/core.mail-config.tsx.ejs +0 -199
- package/hedhog/frontend/app/dashboard/components/widgets/core.mail-sent-card.tsx.ejs +0 -58
- package/hedhog/frontend/app/dashboard/components/widgets/core.mail-sent-chart.tsx.ejs +0 -149
- package/hedhog/frontend/app/dashboard/components/widgets/core.menus-card.tsx.ejs +0 -58
- package/hedhog/frontend/app/dashboard/components/widgets/core.oauth-config.tsx.ejs +0 -175
- package/hedhog/frontend/app/dashboard/components/widgets/core.permissions-card.tsx.ejs +0 -61
- package/hedhog/frontend/app/dashboard/components/widgets/core.permissions-chart.tsx.ejs +0 -156
- package/hedhog/frontend/app/dashboard/components/widgets/core.profile-card.tsx.ejs +0 -186
- package/hedhog/frontend/app/dashboard/components/widgets/core.routes-card.tsx.ejs +0 -58
- package/hedhog/frontend/app/dashboard/components/widgets/core.session-activity-chart.tsx.ejs +0 -183
- package/hedhog/frontend/app/dashboard/components/widgets/core.sessions-today-card.tsx.ejs +0 -62
- package/hedhog/frontend/app/dashboard/components/widgets/core.stat-access-level.tsx.ejs +0 -57
- package/hedhog/frontend/app/dashboard/components/widgets/core.stat-actions-today.tsx.ejs +0 -57
- package/hedhog/frontend/app/dashboard/components/widgets/core.stat-consecutive-days.tsx.ejs +0 -57
- package/hedhog/frontend/app/dashboard/components/widgets/core.stat-online-time.tsx.ejs +0 -57
- package/hedhog/frontend/app/dashboard/components/widgets/core.storage-config.tsx.ejs +0 -196
- package/hedhog/frontend/app/dashboard/components/widgets/core.theme-config.tsx.ejs +0 -213
- package/hedhog/frontend/app/dashboard/components/widgets/core.user-growth-chart.tsx.ejs +0 -210
- package/hedhog/frontend/app/dashboard/components/widgets/core.user-roles.tsx.ejs +0 -132
- package/hedhog/frontend/app/dashboard/components/widgets/core.user-sessions.tsx.ejs +0 -236
- package/hedhog/frontend/app/dashboard/components/widgets/finance.alerts.tsx.ejs +0 -108
- package/hedhog/frontend/app/dashboard/components/widgets/finance.cash-balance-kpi.tsx.ejs +0 -66
- package/hedhog/frontend/app/dashboard/components/widgets/finance.cash-flow-chart.tsx.ejs +0 -122
- package/hedhog/frontend/app/dashboard/components/widgets/finance.default-kpi.tsx.ejs +0 -63
- package/hedhog/frontend/app/dashboard/components/widgets/finance.payable-30d-kpi.tsx.ejs +0 -73
- package/hedhog/frontend/app/dashboard/components/widgets/finance.receivable-30d-kpi.tsx.ejs +0 -73
- package/hedhog/frontend/app/dashboard/components/widgets/finance.upcoming-payable.tsx.ejs +0 -123
- package/hedhog/frontend/app/dashboard/components/widgets/finance.upcoming-receivable.tsx.ejs +0 -118
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Card, CardContent } from '@/components/ui/card';
|
|
4
|
-
import { useWidgetData } from '@/hooks/use-widget-data';
|
|
5
|
-
import { TrendingUp } from 'lucide-react';
|
|
6
|
-
import { useTranslations } from 'next-intl';
|
|
7
|
-
import { WidgetWrapper } from '../widget-wrapper';
|
|
8
|
-
|
|
9
|
-
interface Receivable30dKpiProps {
|
|
10
|
-
widget?: { name?: string };
|
|
11
|
-
onRemove?: () => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface FinanceData {
|
|
15
|
-
kpis?: {
|
|
16
|
-
aReceber30dias: number;
|
|
17
|
-
aReceber7dias: number;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default function Receivable30dKpi({
|
|
22
|
-
widget,
|
|
23
|
-
onRemove,
|
|
24
|
-
}: Receivable30dKpiProps) {
|
|
25
|
-
const t = useTranslations('finance.DashboardPage');
|
|
26
|
-
|
|
27
|
-
const { data, isLoading, isAccessDenied, isError } =
|
|
28
|
-
useWidgetData<FinanceData>({
|
|
29
|
-
endpoint: '/finance/data',
|
|
30
|
-
queryKey: 'finance-kpi-receivable-30d',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const value = data?.kpis?.aReceber30dias ?? 0;
|
|
34
|
-
const sevenDays = data?.kpis?.aReceber7dias ?? 0;
|
|
35
|
-
const formatted = new Intl.NumberFormat('pt-BR', {
|
|
36
|
-
style: 'currency',
|
|
37
|
-
currency: 'BRL',
|
|
38
|
-
}).format(value);
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<WidgetWrapper
|
|
42
|
-
isLoading={isLoading}
|
|
43
|
-
isAccessDenied={isAccessDenied}
|
|
44
|
-
isError={isError}
|
|
45
|
-
widgetName={widget?.name || t('kpis.receivable30.title')}
|
|
46
|
-
onRemove={onRemove}
|
|
47
|
-
>
|
|
48
|
-
<Card className="h-full overflow-hidden transition-all duration-300 hover:shadow-md">
|
|
49
|
-
<CardContent className="flex h-full items-center gap-3 p-4">
|
|
50
|
-
<div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-green-50">
|
|
51
|
-
<TrendingUp className="h-5 w-5 text-green-600" />
|
|
52
|
-
</div>
|
|
53
|
-
<div className="flex min-w-0 flex-col">
|
|
54
|
-
<span className="text-[10px] font-medium uppercase tracking-wider text-muted-foreground">
|
|
55
|
-
{t('kpis.receivable30.title')}
|
|
56
|
-
</span>
|
|
57
|
-
<span className="truncate text-lg font-bold tracking-tight text-foreground">
|
|
58
|
-
{formatted}
|
|
59
|
-
</span>
|
|
60
|
-
<span className="text-[10px] text-muted-foreground">
|
|
61
|
-
{t('kpis.receivable30.sevenDays', {
|
|
62
|
-
value: new Intl.NumberFormat('pt-BR', {
|
|
63
|
-
style: 'currency',
|
|
64
|
-
currency: 'BRL',
|
|
65
|
-
}).format(sevenDays),
|
|
66
|
-
})}
|
|
67
|
-
</span>
|
|
68
|
-
</div>
|
|
69
|
-
</CardContent>
|
|
70
|
-
</Card>
|
|
71
|
-
</WidgetWrapper>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Card,
|
|
5
|
-
CardContent,
|
|
6
|
-
CardDescription,
|
|
7
|
-
CardHeader,
|
|
8
|
-
CardTitle,
|
|
9
|
-
} from '@/components/ui/card';
|
|
10
|
-
import { Money } from '@/components/ui/money';
|
|
11
|
-
import { StatusBadge } from '@/components/ui/status-badge';
|
|
12
|
-
import { useWidgetData } from '@/hooks/use-widget-data';
|
|
13
|
-
import { ArrowDownRight } from 'lucide-react';
|
|
14
|
-
import { useTranslations } from 'next-intl';
|
|
15
|
-
import Link from 'next/link';
|
|
16
|
-
import { WidgetWrapper } from '../widget-wrapper';
|
|
17
|
-
|
|
18
|
-
interface FinanceData {
|
|
19
|
-
titulosPagar?: Array<{
|
|
20
|
-
id: string;
|
|
21
|
-
status: string;
|
|
22
|
-
documento: string;
|
|
23
|
-
fornecedorId?: string;
|
|
24
|
-
parcelas: Array<{
|
|
25
|
-
status: string;
|
|
26
|
-
vencimento: string;
|
|
27
|
-
valor: number;
|
|
28
|
-
}>;
|
|
29
|
-
}>;
|
|
30
|
-
pessoas?: Array<{
|
|
31
|
-
id: string;
|
|
32
|
-
nome: string;
|
|
33
|
-
}>;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
interface UpcomingPayableProps {
|
|
37
|
-
widget?: { name?: string };
|
|
38
|
-
onRemove?: () => void;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function formatDate(value: string) {
|
|
42
|
-
return new Date(value).toLocaleDateString('pt-BR');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export default function UpcomingPayable({
|
|
46
|
-
widget,
|
|
47
|
-
onRemove,
|
|
48
|
-
}: UpcomingPayableProps) {
|
|
49
|
-
const t = useTranslations('finance.DashboardPage');
|
|
50
|
-
|
|
51
|
-
const { data, isLoading, isAccessDenied, isError } =
|
|
52
|
-
useWidgetData<FinanceData>({
|
|
53
|
-
endpoint: '/finance/data',
|
|
54
|
-
queryKey: 'finance-upcoming-payable',
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
const getPersonById = (id?: string) =>
|
|
58
|
-
(data?.pessoas || []).find((p) => p.id === id);
|
|
59
|
-
|
|
60
|
-
const approvedPayables = (data?.titulosPagar || []).filter(
|
|
61
|
-
(titulo) => titulo.status !== 'rascunho' && titulo.status !== 'cancelado'
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
const rows = approvedPayables
|
|
65
|
-
.flatMap((titulo) =>
|
|
66
|
-
titulo.parcelas
|
|
67
|
-
.filter((p) => p.status === 'aberto' || p.status === 'vencido')
|
|
68
|
-
.map((parcela) => ({
|
|
69
|
-
tituloId: titulo.id,
|
|
70
|
-
documento: titulo.documento,
|
|
71
|
-
person: getPersonById(titulo.fornecedorId)?.nome || '',
|
|
72
|
-
dueDate: parcela.vencimento,
|
|
73
|
-
value: parcela.valor,
|
|
74
|
-
status: parcela.status,
|
|
75
|
-
}))
|
|
76
|
-
)
|
|
77
|
-
.slice(0, 3);
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<WidgetWrapper
|
|
81
|
-
isLoading={isLoading}
|
|
82
|
-
isAccessDenied={isAccessDenied}
|
|
83
|
-
isError={isError}
|
|
84
|
-
widgetName={widget?.name || t('upcoming.payable')}
|
|
85
|
-
onRemove={onRemove}
|
|
86
|
-
>
|
|
87
|
-
<Card className="h-full">
|
|
88
|
-
<CardHeader>
|
|
89
|
-
<CardTitle className="flex items-center gap-2 text-base">
|
|
90
|
-
<ArrowDownRight className="h-4 w-4 text-red-500" />
|
|
91
|
-
{t('upcoming.payable')}
|
|
92
|
-
</CardTitle>
|
|
93
|
-
<CardDescription>{t('upcoming.nextDueDates')}</CardDescription>
|
|
94
|
-
</CardHeader>
|
|
95
|
-
<CardContent>
|
|
96
|
-
<div className="space-y-4">
|
|
97
|
-
{rows.map((item, index) => (
|
|
98
|
-
<Link
|
|
99
|
-
key={index}
|
|
100
|
-
href={`/finance/accounts-payable/installments/${item.tituloId}`}
|
|
101
|
-
className="-m-2 flex cursor-pointer items-center justify-between rounded-md p-2 transition-colors hover:bg-muted/50 active:bg-muted"
|
|
102
|
-
>
|
|
103
|
-
<div className="space-y-1">
|
|
104
|
-
<p className="text-sm font-medium">{item.documento}</p>
|
|
105
|
-
<p className="text-xs text-muted-foreground">{item.person}</p>
|
|
106
|
-
</div>
|
|
107
|
-
<div className="text-right">
|
|
108
|
-
<p className="text-sm font-medium">
|
|
109
|
-
<Money value={item.value} />
|
|
110
|
-
</p>
|
|
111
|
-
<p className="text-xs text-muted-foreground">
|
|
112
|
-
{formatDate(item.dueDate)}
|
|
113
|
-
</p>
|
|
114
|
-
</div>
|
|
115
|
-
<StatusBadge status={item.status as any} />
|
|
116
|
-
</Link>
|
|
117
|
-
))}
|
|
118
|
-
</div>
|
|
119
|
-
</CardContent>
|
|
120
|
-
</Card>
|
|
121
|
-
</WidgetWrapper>
|
|
122
|
-
);
|
|
123
|
-
}
|
package/hedhog/frontend/app/dashboard/components/widgets/finance.upcoming-receivable.tsx.ejs
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Card,
|
|
5
|
-
CardContent,
|
|
6
|
-
CardDescription,
|
|
7
|
-
CardHeader,
|
|
8
|
-
CardTitle,
|
|
9
|
-
} from '@/components/ui/card';
|
|
10
|
-
import { Money } from '@/components/ui/money';
|
|
11
|
-
import { StatusBadge } from '@/components/ui/status-badge';
|
|
12
|
-
import { useWidgetData } from '@/hooks/use-widget-data';
|
|
13
|
-
import { ArrowUpRight } from 'lucide-react';
|
|
14
|
-
import { useTranslations } from 'next-intl';
|
|
15
|
-
import Link from 'next/link';
|
|
16
|
-
import { WidgetWrapper } from '../widget-wrapper';
|
|
17
|
-
|
|
18
|
-
interface FinanceData {
|
|
19
|
-
titulosReceber?: Array<{
|
|
20
|
-
id: string;
|
|
21
|
-
documento: string;
|
|
22
|
-
clienteId?: string;
|
|
23
|
-
parcelas: Array<{
|
|
24
|
-
status: string;
|
|
25
|
-
vencimento: string;
|
|
26
|
-
valor: number;
|
|
27
|
-
}>;
|
|
28
|
-
}>;
|
|
29
|
-
pessoas?: Array<{
|
|
30
|
-
id: string;
|
|
31
|
-
nome: string;
|
|
32
|
-
}>;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface UpcomingReceivableProps {
|
|
36
|
-
widget?: { name?: string };
|
|
37
|
-
onRemove?: () => void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function formatDate(value: string) {
|
|
41
|
-
return new Date(value).toLocaleDateString('pt-BR');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export default function UpcomingReceivable({
|
|
45
|
-
widget,
|
|
46
|
-
onRemove,
|
|
47
|
-
}: UpcomingReceivableProps) {
|
|
48
|
-
const t = useTranslations('finance.DashboardPage');
|
|
49
|
-
|
|
50
|
-
const { data, isLoading, isAccessDenied, isError } =
|
|
51
|
-
useWidgetData<FinanceData>({
|
|
52
|
-
endpoint: '/finance/data',
|
|
53
|
-
queryKey: 'finance-upcoming-receivable',
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const getPersonById = (id?: string) =>
|
|
57
|
-
(data?.pessoas || []).find((p) => p.id === id);
|
|
58
|
-
|
|
59
|
-
const rows = (data?.titulosReceber || [])
|
|
60
|
-
.flatMap((titulo) =>
|
|
61
|
-
titulo.parcelas
|
|
62
|
-
.filter((p) => p.status === 'aberto' || p.status === 'vencido')
|
|
63
|
-
.map((parcela) => ({
|
|
64
|
-
tituloId: titulo.id,
|
|
65
|
-
documento: titulo.documento,
|
|
66
|
-
person: getPersonById(titulo.clienteId)?.nome || '',
|
|
67
|
-
dueDate: parcela.vencimento,
|
|
68
|
-
value: parcela.valor,
|
|
69
|
-
status: parcela.status,
|
|
70
|
-
}))
|
|
71
|
-
)
|
|
72
|
-
.slice(0, 3);
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<WidgetWrapper
|
|
76
|
-
isLoading={isLoading}
|
|
77
|
-
isAccessDenied={isAccessDenied}
|
|
78
|
-
isError={isError}
|
|
79
|
-
widgetName={widget?.name || t('upcoming.receivable')}
|
|
80
|
-
onRemove={onRemove}
|
|
81
|
-
>
|
|
82
|
-
<Card className="h-full">
|
|
83
|
-
<CardHeader>
|
|
84
|
-
<CardTitle className="flex items-center gap-2 text-base">
|
|
85
|
-
<ArrowUpRight className="h-4 w-4 text-green-500" />
|
|
86
|
-
{t('upcoming.receivable')}
|
|
87
|
-
</CardTitle>
|
|
88
|
-
<CardDescription>{t('upcoming.nextDueDates')}</CardDescription>
|
|
89
|
-
</CardHeader>
|
|
90
|
-
<CardContent>
|
|
91
|
-
<div className="space-y-4">
|
|
92
|
-
{rows.map((item, index) => (
|
|
93
|
-
<Link
|
|
94
|
-
key={index}
|
|
95
|
-
href={`/finance/accounts-receivable/installments/${item.tituloId}`}
|
|
96
|
-
className="-m-2 flex cursor-pointer items-center justify-between rounded-md p-2 transition-colors hover:bg-muted/50 active:bg-muted"
|
|
97
|
-
>
|
|
98
|
-
<div className="space-y-1">
|
|
99
|
-
<p className="text-sm font-medium">{item.documento}</p>
|
|
100
|
-
<p className="text-xs text-muted-foreground">{item.person}</p>
|
|
101
|
-
</div>
|
|
102
|
-
<div className="text-right">
|
|
103
|
-
<p className="text-sm font-medium">
|
|
104
|
-
<Money value={item.value} />
|
|
105
|
-
</p>
|
|
106
|
-
<p className="text-xs text-muted-foreground">
|
|
107
|
-
{formatDate(item.dueDate)}
|
|
108
|
-
</p>
|
|
109
|
-
</div>
|
|
110
|
-
<StatusBadge status={item.status as any} />
|
|
111
|
-
</Link>
|
|
112
|
-
))}
|
|
113
|
-
</div>
|
|
114
|
-
</CardContent>
|
|
115
|
-
</Card>
|
|
116
|
-
</WidgetWrapper>
|
|
117
|
-
);
|
|
118
|
-
}
|