@snksergio/design-system 0.62.0 → 0.63.0
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-lib/ai/blocos/chart/budget-breakdown.tsx +174 -0
- package/dist-lib/ai/blocos/indice.md +43 -0
- package/dist-lib/ai/blocos/paneldetail/detalhe-com-tabela.tsx +450 -0
- package/dist-lib/ai/blocos/paneldetail/detalhe-de-tarefa-com-abas.tsx +570 -0
- package/dist-lib/ai/blocos/paneldetail/detalhe-do-registro.tsx +555 -0
- package/dist-lib/ai/exemplos/app-shell/app-shell-example.tsx +140 -0
- package/dist-lib/ai/exemplos/app-shell/index.ts +3 -0
- package/dist-lib/ai/exemplos/app-shell/nav-data.ts +97 -0
- package/dist-lib/ai/exemplos/app-shell/routes.tsx +75 -0
- package/dist-lib/ai/exemplos/chat/chat-screen.tsx +152 -0
- package/dist-lib/ai/exemplos/chat/chat-v2-mocks.ts +171 -0
- package/dist-lib/ai/exemplos/chat/chat-v2.styles.ts +23 -0
- package/dist-lib/ai/exemplos/chat/chat-v2.types.ts +81 -0
- package/dist-lib/ai/exemplos/chat/components/ChannelDot/channel-dot.tsx +28 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationActionsMenu/conversation-actions-menu.tsx +83 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationActionsMenu/index.ts +4 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationColumn/conversation-column.styles.ts +22 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationColumn/conversation-column.tsx +203 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationColumn/conversation-column.types.ts +10 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationColumn/index.ts +2 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationListItem/conversation-list-item.styles.ts +55 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationListItem/conversation-list-item.tsx +52 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationListItem/conversation-list-item.types.ts +7 -0
- package/dist-lib/ai/exemplos/chat/components/ConversationListItem/index.ts +2 -0
- package/dist-lib/ai/exemplos/chat/components/DateSeparator/date-separator.tsx +18 -0
- package/dist-lib/ai/exemplos/chat/components/DetailField/detail-field.tsx +23 -0
- package/dist-lib/ai/exemplos/chat/components/DetailSection/detail-section.tsx +41 -0
- package/dist-lib/ai/exemplos/chat/components/DetailSection/index.ts +1 -0
- package/dist-lib/ai/exemplos/chat/components/DetailsColumn/details-column.styles.ts +30 -0
- package/dist-lib/ai/exemplos/chat/components/DetailsColumn/details-column.tsx +142 -0
- package/dist-lib/ai/exemplos/chat/components/DetailsColumn/details-column.types.ts +16 -0
- package/dist-lib/ai/exemplos/chat/components/DetailsColumn/index.ts +5 -0
- package/dist-lib/ai/exemplos/chat/components/FilterRow/filter-row.styles.ts +37 -0
- package/dist-lib/ai/exemplos/chat/components/FilterRow/filter-row.tsx +45 -0
- package/dist-lib/ai/exemplos/chat/components/FilterRow/index.ts +1 -0
- package/dist-lib/ai/exemplos/chat/components/FiltersColumn/filters-column.styles.ts +27 -0
- package/dist-lib/ai/exemplos/chat/components/FiltersColumn/filters-column.tsx +66 -0
- package/dist-lib/ai/exemplos/chat/components/FiltersColumn/filters-column.types.ts +13 -0
- package/dist-lib/ai/exemplos/chat/components/FiltersColumn/filters-rail.tsx +38 -0
- package/dist-lib/ai/exemplos/chat/components/FiltersColumn/index.ts +6 -0
- package/dist-lib/ai/exemplos/chat/components/MessageBubble/index.ts +2 -0
- package/dist-lib/ai/exemplos/chat/components/MessageBubble/message-bubble.styles.ts +37 -0
- package/dist-lib/ai/exemplos/chat/components/MessageBubble/message-bubble.tsx +29 -0
- package/dist-lib/ai/exemplos/chat/components/MessageBubble/message-bubble.types.ts +5 -0
- package/dist-lib/ai/exemplos/chat/components/PersonAvatar/index.ts +5 -0
- package/dist-lib/ai/exemplos/chat/components/PersonAvatar/person-avatar.tsx +31 -0
- package/dist-lib/ai/exemplos/chat/components/QueueColumn/index.ts +2 -0
- package/dist-lib/ai/exemplos/chat/components/QueueColumn/queue-column.styles.ts +19 -0
- package/dist-lib/ai/exemplos/chat/components/QueueColumn/queue-column.tsx +140 -0
- package/dist-lib/ai/exemplos/chat/components/QueueColumn/queue-column.types.ts +13 -0
- package/dist-lib/ai/exemplos/chat/components/RailItem/index.ts +1 -0
- package/dist-lib/ai/exemplos/chat/components/RailItem/rail-item.styles.ts +30 -0
- package/dist-lib/ai/exemplos/chat/components/RailItem/rail-item.tsx +42 -0
- package/dist-lib/ai/exemplos/chat/hooks/use-resizable.ts +98 -0
- package/dist-lib/ai/exemplos/chat/index.ts +1 -0
- package/dist-lib/ai/exemplos/clientes/_table-data.ts +59 -0
- package/dist-lib/ai/exemplos/clientes/clientes-screen.tsx +505 -0
- package/dist-lib/ai/exemplos/clientes/clientes-showcase-mocks.ts +117 -0
- package/dist-lib/ai/exemplos/clientes/clientes-showcase.styles.ts +13 -0
- package/dist-lib/ai/exemplos/clientes/clientes-showcase.types.ts +16 -0
- package/dist-lib/ai/exemplos/clientes/components/DetailDrawer/detail-drawer.styles.ts +28 -0
- package/dist-lib/ai/exemplos/clientes/components/DetailDrawer/detail-drawer.tsx +303 -0
- package/dist-lib/ai/exemplos/clientes/components/DetailDrawer/detail-drawer.types.ts +14 -0
- package/dist-lib/ai/exemplos/clientes/components/DetailDrawer/index.ts +2 -0
- package/dist-lib/ai/exemplos/clientes/components/NovoClienteDrawer/index.ts +2 -0
- package/dist-lib/ai/exemplos/clientes/components/NovoClienteDrawer/novo-cliente-drawer.tsx +207 -0
- package/dist-lib/ai/exemplos/clientes/index.ts +1 -0
- package/dist-lib/ai/exemplos/edit-page/components/StepNav.tsx +81 -0
- package/dist-lib/ai/exemplos/edit-page/components/section-card.tsx +85 -0
- package/dist-lib/ai/exemplos/edit-page/edit-page-screen.tsx +234 -0
- package/dist-lib/ai/exemplos/edit-page/index.ts +1 -0
- package/dist-lib/ai/exemplos/finance/_table-data.ts +57 -0
- package/dist-lib/ai/exemplos/finance/clientes-financeiro-mocks.ts +227 -0
- package/dist-lib/ai/exemplos/finance/clientes-financeiro.types.ts +75 -0
- package/dist-lib/ai/exemplos/finance/clientes-showcase-mocks.ts +117 -0
- package/dist-lib/ai/exemplos/finance/clientes-showcase.styles.ts +13 -0
- package/dist-lib/ai/exemplos/finance/clientes-showcase.types.ts +16 -0
- package/dist-lib/ai/exemplos/finance/components/EditarFinanceDrawer/editar-finance-drawer.tsx +241 -0
- package/dist-lib/ai/exemplos/finance/components/EditarFinanceDrawer/index.ts +5 -0
- package/dist-lib/ai/exemplos/finance/components/ExtratoExpansion/extrato-expansion.tsx +172 -0
- package/dist-lib/ai/exemplos/finance/components/ExtratoExpansion/index.ts +1 -0
- package/dist-lib/ai/exemplos/finance/components/FinanceDetailPanel/finance-detail-panel.tsx +241 -0
- package/dist-lib/ai/exemplos/finance/components/FinanceDetailPanel/index.ts +2 -0
- package/dist-lib/ai/exemplos/finance/components/NovoClienteDrawer/index.ts +2 -0
- package/dist-lib/ai/exemplos/finance/components/NovoClienteDrawer/novo-cliente-drawer.tsx +207 -0
- package/dist-lib/ai/exemplos/finance/components/SacarDialog/index.ts +2 -0
- package/dist-lib/ai/exemplos/finance/components/SacarDialog/sacar-dialog.tsx +346 -0
- package/dist-lib/ai/exemplos/finance/finance-screen.tsx +821 -0
- package/dist-lib/ai/exemplos/finance/index.ts +1 -0
- package/dist-lib/ai/exemplos/gantt/_gantt-data.tsx +402 -0
- package/dist-lib/ai/exemplos/gantt/gantt-screen.tsx +512 -0
- package/dist-lib/ai/exemplos/gantt/index.ts +1 -0
- package/dist-lib/ai/exemplos/login/index.ts +1 -0
- package/dist-lib/ai/exemplos/login/login-screen.tsx +246 -0
- package/dist-lib/ai/exemplos/mapa-rede/components/ConsultorDetailPanel/consultor-detail-panel.tsx +158 -0
- package/dist-lib/ai/exemplos/mapa-rede/components/ConsultorDetailPanel/index.ts +2 -0
- package/dist-lib/ai/exemplos/mapa-rede/index.ts +1 -0
- package/dist-lib/ai/exemplos/mapa-rede/mapa-de-rede-mocks.ts +655 -0
- package/dist-lib/ai/exemplos/mapa-rede/mapa-de-rede.types.ts +53 -0
- package/dist-lib/ai/exemplos/mapa-rede/mapa-rede-screen.tsx +227 -0
- package/dist-lib/ai/exemplos/order-detail/components/ActivityTab.tsx +77 -0
- package/dist-lib/ai/exemplos/order-detail/components/AttachmentsTab.tsx +45 -0
- package/dist-lib/ai/exemplos/order-detail/components/CommentsTab.tsx +111 -0
- package/dist-lib/ai/exemplos/order-detail/components/DetailsTab.tsx +189 -0
- package/dist-lib/ai/exemplos/order-detail/components/OverviewTab.tsx +200 -0
- package/dist-lib/ai/exemplos/order-detail/components/section-card.tsx +85 -0
- package/dist-lib/ai/exemplos/order-detail/index.ts +1 -0
- package/dist-lib/ai/exemplos/order-detail/order-detail-screen.tsx +119 -0
- package/dist-lib/ai/exemplos/order-detail/order-mocks.ts +186 -0
- package/dist-lib/ai/exemplos/order-detail/order.types.ts +118 -0
- package/dist-lib/ai/indice.json +30 -15
- package/dist-lib/ai/manifest.json +31 -5
- package/dist-lib/ai/roteiros/app-builder/roteiro.md +155 -0
- package/dist-lib/ai/roteiros/auth-builder/roteiro.md +42 -0
- package/dist-lib/ai/roteiros/cards/roteiro.md +34 -0
- package/dist-lib/ai/roteiros/charts/roteiro.md +32 -0
- package/dist-lib/ai/roteiros/chat/roteiro.md +31 -0
- package/dist-lib/ai/roteiros/crud-builder/blueprint.md +63 -0
- package/dist-lib/ai/roteiros/crud-builder/entrevista.md +139 -0
- package/dist-lib/ai/roteiros/crud-builder/geracao.md +113 -0
- package/dist-lib/ai/roteiros/crud-builder/roteiro.md +89 -0
- package/dist-lib/ai/roteiros/drawers/roteiro.md +41 -0
- package/dist-lib/ai/roteiros/list-builder/blueprint.md +94 -0
- package/dist-lib/ai/roteiros/list-builder/entrevista.md +188 -0
- package/dist-lib/ai/roteiros/list-builder/geracao.md +63 -0
- package/dist-lib/ai/roteiros/list-builder/roteiro.md +91 -0
- package/dist-lib/ai/roteiros/module-replicator/roteiro.md +56 -0
- package/dist-lib/ai/roteiros/page-detail/roteiro.md +32 -0
- package/dist-lib/ai/roteiros/page-edit/roteiro.md +31 -0
- package/dist-lib/ai/roteiros/screen-composer/roteiro.md +95 -0
- package/package.json +1 -1
- /package/dist-lib/ai/roteiros/{dashboard → dashboard-builder}/blueprint.md +0 -0
- /package/dist-lib/ai/roteiros/{dashboard → dashboard-builder}/entrevista.md +0 -0
- /package/dist-lib/ai/roteiros/{dashboard → dashboard-builder}/geracao.md +0 -0
- /package/dist-lib/ai/roteiros/{dashboard → dashboard-builder}/roteiro.md +0 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { useRef, useState } from "react";
|
|
2
|
+
import { CreditCard, MapPin, Package, User } from "lucide-react";
|
|
3
|
+
import { Button } from "@/components/ui/Button/button";
|
|
4
|
+
import { ChipGroup, ChipGroupItem } from "@/components/ui/Chip";
|
|
5
|
+
import { PageHeader } from "@/components/ui/PageHeader";
|
|
6
|
+
import {
|
|
7
|
+
FormField,
|
|
8
|
+
FormFieldInput,
|
|
9
|
+
FormFieldSelect,
|
|
10
|
+
} from "@/components/ui/FormField";
|
|
11
|
+
import {
|
|
12
|
+
Select,
|
|
13
|
+
SelectContent,
|
|
14
|
+
SelectItem,
|
|
15
|
+
SelectTrigger,
|
|
16
|
+
SelectValue,
|
|
17
|
+
} from "@/components/shadcn/select";
|
|
18
|
+
import { Input } from "@/components/shadcn/input";
|
|
19
|
+
import { SectionCard } from "./components/section-card";
|
|
20
|
+
import { StepNav, type Step } from "./components/StepNav";
|
|
21
|
+
|
|
22
|
+
const STEPS: Step[] = [
|
|
23
|
+
{
|
|
24
|
+
id: "produtos",
|
|
25
|
+
icon: Package,
|
|
26
|
+
title: "Selecionar produtos",
|
|
27
|
+
description: "Adicione produtos à lista de compra.",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "cliente",
|
|
31
|
+
icon: User,
|
|
32
|
+
title: "Dados do cliente",
|
|
33
|
+
description: "Nome, e-mail e telefone do cliente.",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "endereco",
|
|
37
|
+
icon: MapPin,
|
|
38
|
+
title: "Endereço",
|
|
39
|
+
description: "Informe o endereço de entrega.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "pagamento",
|
|
43
|
+
icon: CreditCard,
|
|
44
|
+
title: "Pagamento",
|
|
45
|
+
description: "Método e dados do pagamento.",
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const COUNTRY_OPTIONS = [
|
|
50
|
+
{ value: "br", label: "Brasil" },
|
|
51
|
+
{ value: "pt", label: "Portugal" },
|
|
52
|
+
{ value: "us", label: "Estados Unidos" },
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
const PAYMENT_OPTIONS = [
|
|
56
|
+
{ value: "card", label: "Cartão de crédito/débito" },
|
|
57
|
+
{ value: "pix", label: "PIX" },
|
|
58
|
+
{ value: "boleto", label: "Boleto" },
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const DDI_OPTIONS = ["+55", "+1", "+351"];
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* EditPageScreen — tela de edição de pedido (formulário em etapas). Mesmo
|
|
65
|
+
* modelo de design da OrderDetail (SectionCard) + nav lateral (stepper).
|
|
66
|
+
* Toggle de layout: 1 coluna (igual à referência) ou 2 colunas. Domínio
|
|
67
|
+
* iGreen (energia solar).
|
|
68
|
+
*/
|
|
69
|
+
export function EditPageScreen() {
|
|
70
|
+
const [cols, setCols] = useState<"one" | "two">("one");
|
|
71
|
+
const [activeStep, setActiveStep] = useState("produtos");
|
|
72
|
+
|
|
73
|
+
const sectionRefs = useRef<Record<string, HTMLDivElement | null>>({});
|
|
74
|
+
|
|
75
|
+
const goTo = (id: string) => {
|
|
76
|
+
setActiveStep(id);
|
|
77
|
+
sectionRefs.current[id]?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const setRef = (id: string) => (el: HTMLDivElement | null) => {
|
|
81
|
+
sectionRefs.current[id] = el;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
// Conteúdo da página (sem shell). Embrulhe no seu AppShell/layout — o
|
|
86
|
+
// parent precisa dar altura (h-full/flex) pra página preencher.
|
|
87
|
+
<div className="flex flex-col h-full min-h-0 gap-gp-2xl">
|
|
88
|
+
<PageHeader
|
|
89
|
+
title="Editar pedido"
|
|
90
|
+
description="Pedido #84021 · atualize produtos, cliente, entrega e pagamento."
|
|
91
|
+
hideTextOnMobile={false}
|
|
92
|
+
actions={
|
|
93
|
+
<ChipGroup
|
|
94
|
+
type="single"
|
|
95
|
+
value={cols}
|
|
96
|
+
onValueChange={(v) => v && setCols(v as "one" | "two")}
|
|
97
|
+
size="sm"
|
|
98
|
+
ariaLabel="Layout das colunas"
|
|
99
|
+
>
|
|
100
|
+
<ChipGroupItem value="one">1 coluna</ChipGroupItem>
|
|
101
|
+
<ChipGroupItem value="two">2 colunas</ChipGroupItem>
|
|
102
|
+
</ChipGroup>
|
|
103
|
+
}
|
|
104
|
+
/>
|
|
105
|
+
|
|
106
|
+
<div className="grid grid-cols-1 items-start gap-gp-4xl pb-pad-6xl lg:grid-cols-[260px_1fr]">
|
|
107
|
+
{/* Nav lateral */}
|
|
108
|
+
<StepNav
|
|
109
|
+
steps={STEPS}
|
|
110
|
+
activeId={activeStep}
|
|
111
|
+
onSelect={goTo}
|
|
112
|
+
className="lg:sticky lg:top-gp-2xl"
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
{/* Seções do formulário */}
|
|
116
|
+
<div
|
|
117
|
+
className={
|
|
118
|
+
cols === "two"
|
|
119
|
+
? "grid grid-cols-1 items-start gap-gp-4xl xl:grid-cols-2"
|
|
120
|
+
: "flex flex-col gap-gp-4xl"
|
|
121
|
+
}
|
|
122
|
+
>
|
|
123
|
+
<div ref={setRef("produtos")} className="scroll-mt-gp-2xl">
|
|
124
|
+
<SectionCard title="Selecionar produtos">
|
|
125
|
+
<FormFieldInput
|
|
126
|
+
label="Buscar produto"
|
|
127
|
+
placeholder="Busque por nome ou SKU..."
|
|
128
|
+
/>
|
|
129
|
+
</SectionCard>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<div ref={setRef("cliente")} className="scroll-mt-gp-2xl">
|
|
133
|
+
<SectionCard title="Dados do cliente">
|
|
134
|
+
<div className="flex flex-col gap-form-gap">
|
|
135
|
+
<div className="grid grid-cols-1 gap-form-gap sm:grid-cols-2">
|
|
136
|
+
<FormFieldInput label="Nome" placeholder="Nome" />
|
|
137
|
+
<FormFieldInput label="Usuário" placeholder="Nome de usuário" />
|
|
138
|
+
</div>
|
|
139
|
+
<FormFieldInput
|
|
140
|
+
label="Email"
|
|
141
|
+
type="email"
|
|
142
|
+
placeholder="email@exemplo.com"
|
|
143
|
+
/>
|
|
144
|
+
<FormField label="Telefone">
|
|
145
|
+
{({ id }) => (
|
|
146
|
+
<div className="flex gap-gp-sm">
|
|
147
|
+
<Select defaultValue="+55">
|
|
148
|
+
<SelectTrigger className="w-24 shrink-0">
|
|
149
|
+
<SelectValue />
|
|
150
|
+
</SelectTrigger>
|
|
151
|
+
<SelectContent>
|
|
152
|
+
{DDI_OPTIONS.map((d) => (
|
|
153
|
+
<SelectItem key={d} value={d}>
|
|
154
|
+
{d}
|
|
155
|
+
</SelectItem>
|
|
156
|
+
))}
|
|
157
|
+
</SelectContent>
|
|
158
|
+
</Select>
|
|
159
|
+
<Input
|
|
160
|
+
id={id}
|
|
161
|
+
type="tel"
|
|
162
|
+
placeholder="Número de telefone"
|
|
163
|
+
className="flex-1"
|
|
164
|
+
/>
|
|
165
|
+
</div>
|
|
166
|
+
)}
|
|
167
|
+
</FormField>
|
|
168
|
+
</div>
|
|
169
|
+
</SectionCard>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div ref={setRef("endereco")} className="scroll-mt-gp-2xl">
|
|
173
|
+
<SectionCard title="Endereço">
|
|
174
|
+
<div className="flex flex-col gap-form-gap">
|
|
175
|
+
<FormFieldSelect
|
|
176
|
+
label="País"
|
|
177
|
+
placeholder="Selecione o país"
|
|
178
|
+
options={COUNTRY_OPTIONS}
|
|
179
|
+
/>
|
|
180
|
+
<FormFieldInput label="Endereço" placeholder="Rua, número" />
|
|
181
|
+
<div className="grid grid-cols-1 gap-form-gap sm:grid-cols-2">
|
|
182
|
+
<FormFieldInput label="Cidade" placeholder="Cidade" />
|
|
183
|
+
<FormFieldInput label="CEP" placeholder="00000-000" />
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</SectionCard>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<div ref={setRef("pagamento")} className="scroll-mt-gp-2xl">
|
|
190
|
+
<SectionCard title="Pagamento">
|
|
191
|
+
<div className="flex flex-col gap-form-gap">
|
|
192
|
+
<FormFieldSelect
|
|
193
|
+
label="Método de pagamento"
|
|
194
|
+
defaultValue="card"
|
|
195
|
+
options={PAYMENT_OPTIONS}
|
|
196
|
+
/>
|
|
197
|
+
<FormFieldInput
|
|
198
|
+
label="Nome no cartão"
|
|
199
|
+
placeholder="Nome impresso no cartão"
|
|
200
|
+
/>
|
|
201
|
+
<FormFieldInput
|
|
202
|
+
label="Número do cartão"
|
|
203
|
+
placeholder="0000 0000 0000 0000"
|
|
204
|
+
inputMode="numeric"
|
|
205
|
+
/>
|
|
206
|
+
<div className="grid grid-cols-1 gap-form-gap sm:grid-cols-2">
|
|
207
|
+
<FormFieldInput label="Validade" placeholder="MM/AA" />
|
|
208
|
+
<FormFieldInput label="CVV" placeholder="123" />
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
</SectionCard>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
{/* Footer de ações */}
|
|
215
|
+
<div
|
|
216
|
+
className={
|
|
217
|
+
"flex items-center justify-end gap-gp-md" +
|
|
218
|
+
(cols === "two" ? " xl:col-span-2" : "")
|
|
219
|
+
}
|
|
220
|
+
>
|
|
221
|
+
<Button variant="outline" color="secondary" size="md">
|
|
222
|
+
Cancelar
|
|
223
|
+
</Button>
|
|
224
|
+
<Button variant="filled" color="primary" size="md">
|
|
225
|
+
Salvar pedido
|
|
226
|
+
</Button>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export default EditPageScreen;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EditPageScreen, default } from "./edit-page-screen";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dados base compartilhados (extraídos do showcase TableDoc do DS).
|
|
3
|
+
* Mantém o exemplo autossuficiente — sem dependência da infra de preview.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const STATUSES: Record<string, { label: string; color: string }> = {
|
|
7
|
+
active: { label: "Ativo", color: "var(--color-fg-success)" },
|
|
8
|
+
pending: { label: "Pendente", color: "var(--color-fg-warning)" },
|
|
9
|
+
paused: { label: "Pausado", color: "var(--color-fg-info)" },
|
|
10
|
+
inactive: { label: "Inativo", color: "var(--color-fg-muted)" },
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type CategoryKind = "warning" | "info" | "success" | "neutral";
|
|
14
|
+
export const CATEGORIES: Record<string, { label: string; kind: CategoryKind }> = {
|
|
15
|
+
royal: { label: "Royal", kind: "warning" },
|
|
16
|
+
licenciado: { label: "Licenciado", kind: "info" },
|
|
17
|
+
lead: { label: "Lead", kind: "success" },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const AGENTS: Record<string, { name: string; initials: string; color: string }> = {
|
|
21
|
+
you: { name: "Voce", initials: "VC", color: "#0a3a2e" },
|
|
22
|
+
aline: { name: "Aline Castro", initials: "AC", color: "#f59e0b" },
|
|
23
|
+
carlos: { name: "Carlos Souza", initials: "CS", color: "#8754ec" },
|
|
24
|
+
maria: { name: "Maria Lima", initials: "ML", color: "#ef4444" },
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type ClientRow = {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
initials: string;
|
|
31
|
+
avatarColor: string;
|
|
32
|
+
email: string;
|
|
33
|
+
phone: string;
|
|
34
|
+
statusId: keyof typeof STATUSES;
|
|
35
|
+
categoryId: keyof typeof CATEGORIES;
|
|
36
|
+
location: string;
|
|
37
|
+
value: number;
|
|
38
|
+
agentId: keyof typeof AGENTS;
|
|
39
|
+
createdAt: number;
|
|
40
|
+
lastContact: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const BASE_DATE = new Date("2026-04-15T12:00:00Z").getTime();
|
|
44
|
+
const DAY_MS = 86400000;
|
|
45
|
+
|
|
46
|
+
export const CLIENTS_MOCK: ClientRow[] = [
|
|
47
|
+
{ id: "CLI-2401", name: "Maria Silva", initials: "MS", avatarColor: "#f59e0b", email: "maria.silva@example.com", phone: "+55 11 91234-5678", statusId: "active", categoryId: "royal", location: "São Paulo, SP", value: 4800, agentId: "you", createdAt: BASE_DATE - 65 * DAY_MS, lastContact: BASE_DATE - 2 * DAY_MS },
|
|
48
|
+
{ id: "CLI-2402", name: "João Santos", initials: "JS", avatarColor: "#0a3a2e", email: "joao.santos@example.com", phone: "+55 11 92345-6789", statusId: "pending", categoryId: "licenciado", location: "Rio de Janeiro, RJ", value: 12300, agentId: "aline", createdAt: BASE_DATE - 58 * DAY_MS, lastContact: BASE_DATE - 5 * DAY_MS },
|
|
49
|
+
{ id: "CLI-2403", name: "Carlos Oliveira", initials: "CO", avatarColor: "#8754ec", email: "carlos.oliveira@example.com", phone: "+55 11 93456-7890", statusId: "active", categoryId: "lead", location: "Belo Horizonte, MG", value: 2150, agentId: "carlos", createdAt: BASE_DATE - 51 * DAY_MS, lastContact: BASE_DATE - 1 * DAY_MS },
|
|
50
|
+
{ id: "CLI-2404", name: "Ana Costa", initials: "AC", avatarColor: "#1cb280", email: "ana.costa@example.com", phone: "+55 11 94567-8901", statusId: "paused", categoryId: "royal", location: "Porto Alegre, RS", value: 8900, agentId: "maria", createdAt: BASE_DATE - 44 * DAY_MS, lastContact: BASE_DATE - 12 * DAY_MS },
|
|
51
|
+
{ id: "CLI-2405", name: "Pedro Pereira", initials: "PP", avatarColor: "#ef4444", email: "pedro.pereira@example.com", phone: "+55 11 95678-9012", statusId: "inactive", categoryId: "lead", location: "Curitiba, PR", value: 1100, agentId: "you", createdAt: BASE_DATE - 37 * DAY_MS, lastContact: BASE_DATE - 30 * DAY_MS },
|
|
52
|
+
{ id: "CLI-2406", name: "Lúcia Almeida", initials: "LA", avatarColor: "#f9a47a", email: "lucia.almeida@example.com", phone: "+55 11 96789-0123", statusId: "active", categoryId: "licenciado", location: "Recife, PE", value: 6750, agentId: "aline", createdAt: BASE_DATE - 30 * DAY_MS, lastContact: BASE_DATE - 3 * DAY_MS },
|
|
53
|
+
{ id: "CLI-2407", name: "Roberto Souza", initials: "RS", avatarColor: "#0088cc", email: "roberto.souza@example.com", phone: "+55 11 97890-1234", statusId: "pending", categoryId: "royal", location: "São Paulo, SP", value: 15200, agentId: "carlos", createdAt: BASE_DATE - 23 * DAY_MS, lastContact: BASE_DATE - 7 * DAY_MS },
|
|
54
|
+
{ id: "CLI-2408", name: "Fernanda Lima", initials: "FL", avatarColor: "#e1306c", email: "fernanda.lima@example.com", phone: "+55 11 98901-2345", statusId: "active", categoryId: "lead", location: "Rio de Janeiro, RJ", value: 3400, agentId: "maria", createdAt: BASE_DATE - 16 * DAY_MS, lastContact: BASE_DATE - 1 * DAY_MS },
|
|
55
|
+
{ id: "CLI-2409", name: "Bruno Rodrigues", initials: "BR", avatarColor: "#70c748", email: "bruno.rodrigues@example.com", phone: "+55 11 99012-3456", statusId: "paused", categoryId: "licenciado", location: "Belo Horizonte, MG", value: 5600, agentId: "you", createdAt: BASE_DATE - 9 * DAY_MS, lastContact: BASE_DATE - 6 * DAY_MS },
|
|
56
|
+
{ id: "CLI-2410", name: "Camila Ribeiro", initials: "CR", avatarColor: "#8754ec", email: "camila.ribeiro@example.com", phone: "+55 11 90123-4567", statusId: "active", categoryId: "royal", location: "Porto Alegre, RS", value: 9800, agentId: "aline", createdAt: BASE_DATE - 2 * DAY_MS, lastContact: BASE_DATE },
|
|
57
|
+
];
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { CLIENTS_87 } from "./clientes-showcase-mocks";
|
|
2
|
+
import type {
|
|
3
|
+
AccountStatus,
|
|
4
|
+
BankAccount,
|
|
5
|
+
BankId,
|
|
6
|
+
FinanceClientRow,
|
|
7
|
+
FinanceTransaction,
|
|
8
|
+
PaymentMethod,
|
|
9
|
+
} from "./clientes-financeiro.types";
|
|
10
|
+
|
|
11
|
+
/* ── Banks (lookup com nome + cor temática) ─────────────────────── */
|
|
12
|
+
|
|
13
|
+
export const BANKS: Record<BankId, { name: string; color: string; initials: string }> = {
|
|
14
|
+
bb: { name: "Banco do Brasil", color: "#FAE128", initials: "BB" },
|
|
15
|
+
itau: { name: "Itaú", color: "#EC7000", initials: "IT" },
|
|
16
|
+
nubank: { name: "Nubank", color: "#820AD1", initials: "NU" },
|
|
17
|
+
santander: { name: "Santander", color: "#EC0000", initials: "SA" },
|
|
18
|
+
bradesco: { name: "Bradesco", color: "#CC092F", initials: "BR" },
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const BANK_IDS: BankId[] = ["bb", "itau", "nubank", "santander", "bradesco"];
|
|
22
|
+
|
|
23
|
+
/** Contas mocadas pra o modal Sacar — opções fixas. */
|
|
24
|
+
export const SACAR_ACCOUNT_OPTIONS: BankAccount[] = [
|
|
25
|
+
{ bank: "bb", bankName: "Banco do Brasil", agency: "0001", account: "12345-6" },
|
|
26
|
+
{ bank: "nubank", bankName: "Nubank", agency: "0001", account: "98765-4" },
|
|
27
|
+
{ bank: "itau", bankName: "Itaú", agency: "1234", account: "55555-1" },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/* ── Helpers de geração ─────────────────────────────────────────── */
|
|
31
|
+
|
|
32
|
+
/** Gera dado bancário pseudo-determinístico baseado no índice do cliente. */
|
|
33
|
+
function makeAccount(idx: number): BankAccount {
|
|
34
|
+
const bank = BANK_IDS[idx % BANK_IDS.length];
|
|
35
|
+
const agency = String(1000 + (idx * 37) % 9000).padStart(4, "0");
|
|
36
|
+
const accountSeq = String(10000 + (idx * 113) % 89999).padStart(5, "0");
|
|
37
|
+
const dv = (idx * 7) % 10;
|
|
38
|
+
return {
|
|
39
|
+
bank,
|
|
40
|
+
bankName: BANKS[bank].name,
|
|
41
|
+
agency,
|
|
42
|
+
account: `${accountSeq}-${dv}`,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Saldo pseudo-determinístico — varia entre R$ 150 e R$ 25.000. */
|
|
47
|
+
function makeBalance(idx: number): number {
|
|
48
|
+
const base = 150 + (idx * 317) % 24850;
|
|
49
|
+
// arredonda pra 2 casas
|
|
50
|
+
return Math.round(base * 100) / 100;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Razão social pseudo-determinística — combina nome do contato + sufixo. */
|
|
54
|
+
const COMPANY_SUFFIXES = [
|
|
55
|
+
"Solar Energy LTDA",
|
|
56
|
+
"Energia Renovável ME",
|
|
57
|
+
"Eco Solutions S.A.",
|
|
58
|
+
"Green Power LTDA",
|
|
59
|
+
"Solar Tech ME",
|
|
60
|
+
"Energy Brasil S.A.",
|
|
61
|
+
];
|
|
62
|
+
function makeCompanyName(idx: number, contactName: string): string {
|
|
63
|
+
// Pega o primeiro nome do contato e combina com sufixo PJ
|
|
64
|
+
const firstName = contactName.split(" ")[0];
|
|
65
|
+
const suffix = COMPANY_SUFFIXES[idx % COMPANY_SUFFIXES.length];
|
|
66
|
+
return `${firstName} ${suffix}`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** CNPJ pseudo-determinístico — gera formato XX.XXX.XXX/0001-XX baseado no idx. */
|
|
70
|
+
function makeCNPJ(idx: number): string {
|
|
71
|
+
// Bloco 1: 2 dígitos
|
|
72
|
+
const b1 = String(10 + (idx * 13) % 89).padStart(2, "0");
|
|
73
|
+
// Bloco 2: 3 dígitos
|
|
74
|
+
const b2 = String(100 + (idx * 71) % 899).padStart(3, "0");
|
|
75
|
+
// Bloco 3: 3 dígitos
|
|
76
|
+
const b3 = String(100 + (idx * 127) % 899).padStart(3, "0");
|
|
77
|
+
// DV: 2 dígitos
|
|
78
|
+
const dv = String(10 + (idx * 53) % 89).padStart(2, "0");
|
|
79
|
+
return `${b1}.${b2}.${b3}/0001-${dv}`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* ── Situação da conta (badge + eixo do Kanban) ─────────────────── */
|
|
83
|
+
|
|
84
|
+
export const ACCOUNT_STATUS: Record<
|
|
85
|
+
AccountStatus,
|
|
86
|
+
{ label: string; color: "warning" | "success" | "info" | "danger" }
|
|
87
|
+
> = {
|
|
88
|
+
pendente: { label: "Pendente", color: "warning" },
|
|
89
|
+
ativo: { label: "Ativo", color: "success" },
|
|
90
|
+
negociacao: { label: "Em negociação", color: "info" },
|
|
91
|
+
bloqueado: { label: "Bloqueado", color: "danger" },
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const ACCOUNT_STATUS_IDS: AccountStatus[] = [
|
|
95
|
+
"ativo",
|
|
96
|
+
"ativo",
|
|
97
|
+
"pendente",
|
|
98
|
+
"ativo",
|
|
99
|
+
"negociacao",
|
|
100
|
+
"ativo",
|
|
101
|
+
"bloqueado",
|
|
102
|
+
]; // distribuição enviesada p/ "ativo" (realista) via módulo do índice
|
|
103
|
+
|
|
104
|
+
const PAYMENT_METHOD_SETS: PaymentMethod[][] = [
|
|
105
|
+
["pix"],
|
|
106
|
+
["pix", "ted"],
|
|
107
|
+
["pix", "boleto"],
|
|
108
|
+
["pix", "ted", "boleto"],
|
|
109
|
+
["ted", "boleto"],
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
const TRANSACTION_DESCRIPTIONS: Record<"in" | "out", string[]> = {
|
|
113
|
+
in: ["Comissão de venda", "Bônus de meta", "Repasse de royalty", "Estorno"],
|
|
114
|
+
out: ["Saque para conta", "Taxa de serviço", "Antecipação", "Ajuste de saldo"],
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const NOW = new Date("2026-06-10T12:00:00Z").getTime();
|
|
118
|
+
const DAY = 86400000;
|
|
119
|
+
|
|
120
|
+
/** Status pseudo-determinístico baseado no índice. */
|
|
121
|
+
function makeAccountStatus(idx: number): AccountStatus {
|
|
122
|
+
return ACCOUNT_STATUS_IDS[idx % ACCOUNT_STATUS_IDS.length];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** Volume mensal pseudo-determinístico — R$ 2k a R$ 80k. */
|
|
126
|
+
function makeMonthlyVolume(idx: number): number {
|
|
127
|
+
return Math.round((2000 + ((idx * 911) % 78000)) * 100) / 100;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Taxa de comissão 4%–14% (1 casa). */
|
|
131
|
+
function makeCommissionRate(idx: number): number {
|
|
132
|
+
return Math.round((4 + ((idx * 37) % 100) / 10) * 10) / 10;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** Última movimentação — entre 0 e ~45 dias atrás. */
|
|
136
|
+
function makeLastMovement(idx: number): number {
|
|
137
|
+
return NOW - ((idx * 53) % 45) * DAY - ((idx * 17) % 24) * 3600000;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Extrato pseudo-determinístico — 4 a 6 movimentações recentes. */
|
|
141
|
+
function makeTransactions(idx: number, lastMovement: number): FinanceTransaction[] {
|
|
142
|
+
const count = 4 + (idx % 3);
|
|
143
|
+
return Array.from({ length: count }, (_, i) => {
|
|
144
|
+
const type: "in" | "out" = (idx + i) % 3 === 0 ? "out" : "in";
|
|
145
|
+
const pool = TRANSACTION_DESCRIPTIONS[type];
|
|
146
|
+
return {
|
|
147
|
+
id: `TX-${idx}-${i}`,
|
|
148
|
+
date: lastMovement - i * (2 * DAY + ((idx * 7) % 5) * DAY),
|
|
149
|
+
type,
|
|
150
|
+
amount: Math.round((120 + ((idx * 211 + i * 67) % 9800)) * 100) / 100,
|
|
151
|
+
description: pool[(idx + i) % pool.length],
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* ── Dataset financeiro — 87 clientes com banco + saldo ─────────── */
|
|
157
|
+
|
|
158
|
+
export const FINANCE_CLIENTS: FinanceClientRow[] = CLIENTS_87.map((c, idx) => {
|
|
159
|
+
const lastMovement = makeLastMovement(idx);
|
|
160
|
+
return {
|
|
161
|
+
...c,
|
|
162
|
+
// Force categoria "licenciado" pra tema financeiro (afiliados/parceiros PJ)
|
|
163
|
+
categoryId: "licenciado",
|
|
164
|
+
bankAccount: makeAccount(idx),
|
|
165
|
+
availableBalance: makeBalance(idx),
|
|
166
|
+
monthlyVolume: makeMonthlyVolume(idx),
|
|
167
|
+
commissionRate: makeCommissionRate(idx),
|
|
168
|
+
accountStatus: makeAccountStatus(idx),
|
|
169
|
+
autoWithdraw: idx % 3 !== 0, // ~2/3 com saque automático
|
|
170
|
+
paymentMethods: PAYMENT_METHOD_SETS[idx % PAYMENT_METHOD_SETS.length],
|
|
171
|
+
lastMovement,
|
|
172
|
+
transactions: makeTransactions(idx, lastMovement),
|
|
173
|
+
cnpj: makeCNPJ(idx),
|
|
174
|
+
companyName: makeCompanyName(idx, c.name),
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
/* ── Formatters ─────────────────────────────────────────────────── */
|
|
179
|
+
|
|
180
|
+
export function formatBRL(value: number): string {
|
|
181
|
+
return new Intl.NumberFormat("pt-BR", {
|
|
182
|
+
style: "currency",
|
|
183
|
+
currency: "BRL",
|
|
184
|
+
}).format(value);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function formatBankAccountShort(acc: BankAccount): string {
|
|
188
|
+
// Ex: "BB · Ag 0001 · 12345-6"
|
|
189
|
+
return `${BANKS[acc.bank].initials} · Ag ${acc.agency} · ${acc.account}`;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* ── Estatísticas agregadas (KPIs do header da página) ──────────── */
|
|
193
|
+
|
|
194
|
+
export const FINANCE_KPIS = {
|
|
195
|
+
/** Total disponível pra saque em todos os clientes. */
|
|
196
|
+
totalAvailable: FINANCE_CLIENTS.reduce((sum, c) => sum + c.availableBalance, 0),
|
|
197
|
+
/** Quantidade de clientes com saldo > R$ 5.000 (pra destacar high-value). */
|
|
198
|
+
highValueCount: FINANCE_CLIENTS.filter((c) => c.availableBalance > 5000).length,
|
|
199
|
+
/** Saldo médio. */
|
|
200
|
+
averageBalance: 0,
|
|
201
|
+
/** Contas em risco (negociação + bloqueado) — alinha com a preset "Inadimplentes". */
|
|
202
|
+
atRiskCount: FINANCE_CLIENTS.filter(
|
|
203
|
+
(c) => c.accountStatus === "negociacao" || c.accountStatus === "bloqueado",
|
|
204
|
+
).length,
|
|
205
|
+
};
|
|
206
|
+
FINANCE_KPIS.averageBalance =
|
|
207
|
+
FINANCE_KPIS.totalAvailable / FINANCE_CLIENTS.length;
|
|
208
|
+
|
|
209
|
+
/** Label curto pra movimentação relativa ("hoje", "há 3 dias"). */
|
|
210
|
+
export function formatRelativeDays(ts: number): string {
|
|
211
|
+
const days = Math.floor((NOW - ts) / DAY);
|
|
212
|
+
if (days <= 0) return "hoje";
|
|
213
|
+
if (days === 1) return "ontem";
|
|
214
|
+
if (days < 30) return `há ${days} dias`;
|
|
215
|
+
const months = Math.floor(days / 30);
|
|
216
|
+
return months === 1 ? "há 1 mês" : `há ${months} meses`;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Data curta "09 fev" / "09 fev, 14:30" pro extrato. */
|
|
220
|
+
export function formatDateTimeShort(ts: number): string {
|
|
221
|
+
return new Date(ts).toLocaleString("pt-BR", {
|
|
222
|
+
day: "2-digit",
|
|
223
|
+
month: "short",
|
|
224
|
+
hour: "2-digit",
|
|
225
|
+
minute: "2-digit",
|
|
226
|
+
});
|
|
227
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types do ClientesFinanceiroShowcase — extensão financeira do ClientesShowcase.
|
|
3
|
+
*
|
|
4
|
+
* Reaproveita estrutura de cliente mas adiciona dados bancários + saldo
|
|
5
|
+
* disponível pra suportar a action de Saque.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ClientRow } from "./_table-data";
|
|
9
|
+
|
|
10
|
+
/** Banco suportado nos mocks (com logo/cor próprios). */
|
|
11
|
+
export type BankId = "bb" | "itau" | "nubank" | "santander" | "bradesco";
|
|
12
|
+
|
|
13
|
+
export type BankAccount = {
|
|
14
|
+
bank: BankId;
|
|
15
|
+
bankName: string;
|
|
16
|
+
agency: string; // ex: "1234"
|
|
17
|
+
account: string; // ex: "98765-4"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Situação financeira da conta (pipeline) — vira coluna `badge` (chip colorido)
|
|
22
|
+
* E o eixo do board Kanban. Fluxo: pendente → ativo → negociação → bloqueado.
|
|
23
|
+
*/
|
|
24
|
+
export type AccountStatus = "pendente" | "ativo" | "negociacao" | "bloqueado";
|
|
25
|
+
|
|
26
|
+
/** Método de recebimento aceito pelo licenciado (coluna `tags`). */
|
|
27
|
+
export type PaymentMethod = "pix" | "ted" | "boleto";
|
|
28
|
+
|
|
29
|
+
/** Movimentação financeira — usada no extrato da row expansion. */
|
|
30
|
+
export type FinanceTransaction = {
|
|
31
|
+
id: string;
|
|
32
|
+
/** Timestamp (ms) da movimentação. */
|
|
33
|
+
date: number;
|
|
34
|
+
/** Entrada (crédito) ou saída (saque/débito). */
|
|
35
|
+
type: "in" | "out";
|
|
36
|
+
/** Valor em BRL (sempre positivo; `type` define o sinal). */
|
|
37
|
+
amount: number;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** Cliente com dados financeiros — estende ClientRow. */
|
|
42
|
+
export type FinanceClientRow = ClientRow & {
|
|
43
|
+
/** Saldo disponível pra saque (BRL). */
|
|
44
|
+
availableBalance: number;
|
|
45
|
+
/** Volume financeiro movimentado no mês (BRL). */
|
|
46
|
+
monthlyVolume: number;
|
|
47
|
+
/** Taxa de comissão do licenciado (0–100, editável inline). */
|
|
48
|
+
commissionRate: number;
|
|
49
|
+
/** Situação da conta — chip + eixo do Kanban. */
|
|
50
|
+
accountStatus: AccountStatus;
|
|
51
|
+
/** Saque automático habilitado (boolean editável inline). */
|
|
52
|
+
autoWithdraw: boolean;
|
|
53
|
+
/** Métodos de recebimento aceitos (tags). */
|
|
54
|
+
paymentMethods: PaymentMethod[];
|
|
55
|
+
/** Timestamp (ms) da última movimentação financeira. */
|
|
56
|
+
lastMovement: number;
|
|
57
|
+
/** Extrato das últimas movimentações (row expansion). */
|
|
58
|
+
transactions: FinanceTransaction[];
|
|
59
|
+
/** Dados bancários do cliente. */
|
|
60
|
+
bankAccount: BankAccount;
|
|
61
|
+
/** CNPJ do cliente (formato XX.XXX.XXX/0001-XX). */
|
|
62
|
+
cnpj: string;
|
|
63
|
+
/** Razão social da empresa (nome PJ). */
|
|
64
|
+
companyName: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Form data do modal Sacar — usuário escolhe valor + conta destino.
|
|
69
|
+
* `clientId` é injetado pelo trigger (row da action).
|
|
70
|
+
*/
|
|
71
|
+
export type SacarFormData = {
|
|
72
|
+
clientId: string;
|
|
73
|
+
amount: number;
|
|
74
|
+
selectedAccountBank: BankId;
|
|
75
|
+
};
|