@hed-hog/finance 0.0.330 → 0.0.332

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.
@@ -768,7 +768,7 @@ function NovoTituloSheet({
768
768
  }
769
769
 
770
770
  if (extracted.descricao) {
771
- form.setValue('descricao', extracted.descricao, {
771
+ form.setValue('descricao', extracted.descricao, {
772
772
  shouldValidate: true,
773
773
  });
774
774
  }
@@ -1284,7 +1284,7 @@ function NovoTituloSheet({
1284
1284
  >
1285
1285
  <FormField
1286
1286
  control={form.control}
1287
- name="descricao"
1287
+ name="descricao"
1288
1288
  render={({ field }) => (
1289
1289
  <FormItem>
1290
1290
  <FormLabel>{t('fields.description')}</FormLabel>
@@ -1885,7 +1885,7 @@ function EditarTituloSheet({
1885
1885
  }
1886
1886
 
1887
1887
  if (extracted.descricao) {
1888
- form.setValue('descricao', extracted.descricao, {
1888
+ form.setValue('descricao', extracted.descricao, {
1889
1889
  shouldValidate: true,
1890
1890
  });
1891
1891
  }
@@ -2399,7 +2399,7 @@ function EditarTituloSheet({
2399
2399
  >
2400
2400
  <FormField
2401
2401
  control={form.control}
2402
- name="descricao"
2402
+ name="descricao"
2403
2403
  render={({ field }) => (
2404
2404
  <FormItem>
2405
2405
  <FormLabel>{t('fields.description')}</FormLabel>
@@ -186,11 +186,11 @@ export default function TituloReceberDetalhePage() {
186
186
  className: 'bg-orange-100 text-orange-700',
187
187
  },
188
188
  debito_automatico: {
189
- label: 'D\u00e9bito autom\u00e1tico',
189
+ label: t('channels.debitAutomatico'),
190
190
  className: 'bg-emerald-100 text-emerald-700',
191
191
  },
192
192
  debito_em_conta: {
193
- label: 'D\u00e9bito em conta',
193
+ label: t('channels.debitEmConta'),
194
194
  className: 'bg-cyan-100 text-cyan-700',
195
195
  },
196
196
  };
@@ -748,7 +748,7 @@ function NovoTituloSheet({
748
748
  }
749
749
 
750
750
  if (extracted.descricao) {
751
- form.setValue('descricao', extracted.descricao, {
751
+ form.setValue('descricao', extracted.descricao, {
752
752
  shouldValidate: true,
753
753
  });
754
754
  }
@@ -1236,10 +1236,10 @@ function NovoTituloSheet({
1236
1236
  {t('channels.transfer')}
1237
1237
  </SelectItem>
1238
1238
  <SelectItem value="debito_automatico">
1239
- D&#233;bito autom&#225;tico
1239
+ {t('channels.debitAutomatico')}
1240
1240
  </SelectItem>
1241
1241
  <SelectItem value="debito_em_conta">
1242
- D&#233;bito em conta
1242
+ {t('channels.debitEmConta')}
1243
1243
  </SelectItem>
1244
1244
  </SelectContent>
1245
1245
  </Select>
@@ -1256,7 +1256,7 @@ function NovoTituloSheet({
1256
1256
  >
1257
1257
  <FormField
1258
1258
  control={form.control}
1259
- name="descricao"
1259
+ name="descricao"
1260
1260
  render={({ field }) => (
1261
1261
  <FormItem>
1262
1262
  <FormLabel>{t('fields.description')}</FormLabel>
@@ -1807,7 +1807,7 @@ function EditarTituloSheet({
1807
1807
  }
1808
1808
 
1809
1809
  if (extracted.descricao) {
1810
- form.setValue('descricao', extracted.descricao, {
1810
+ form.setValue('descricao', extracted.descricao, {
1811
1811
  shouldValidate: true,
1812
1812
  });
1813
1813
  }
@@ -2342,10 +2342,10 @@ function EditarTituloSheet({
2342
2342
  {t('channels.transfer')}
2343
2343
  </SelectItem>
2344
2344
  <SelectItem value="debito_automatico">
2345
- D&#233;bito autom&#225;tico
2345
+ {t('channels.debitAutomatico')}
2346
2346
  </SelectItem>
2347
2347
  <SelectItem value="debito_em_conta">
2348
- D&#233;bito em conta
2348
+ {t('channels.debitEmConta')}
2349
2349
  </SelectItem>
2350
2350
  </SelectContent>
2351
2351
  </Select>
@@ -2362,7 +2362,7 @@ function EditarTituloSheet({
2362
2362
  >
2363
2363
  <FormField
2364
2364
  control={form.control}
2365
- name="descricao"
2365
+ name="descricao"
2366
2366
  render={({ field }) => (
2367
2367
  <FormItem>
2368
2368
  <FormLabel>{t('fields.description')}</FormLabel>
@@ -2734,7 +2734,7 @@ export default function TitulosReceberPage() {
2734
2734
  <FinancePageSection variant="flat">
2735
2735
  {titulosReceber.length > 0 ? (
2736
2736
  <div className="overflow-x-auto">
2737
- <Table className="min-w-[760px]">
2737
+ <Table className="min-w-190">
2738
2738
  <TableHeader>
2739
2739
  <TableRow>
2740
2740
  <TableHead>{t('table.headers.document')}</TableHead>
@@ -2746,7 +2746,7 @@ export default function TitulosReceberPage() {
2746
2746
  </TableHead>
2747
2747
  <TableHead>{t('table.headers.channel')}</TableHead>
2748
2748
  <TableHead>{t('table.headers.status')}</TableHead>
2749
- <TableHead className="w-[50px]" />
2749
+ <TableHead className="w-12.5" />
2750
2750
  </TableRow>
2751
2751
  </TableHeader>
2752
2752
  <TableBody>
@@ -4,6 +4,7 @@ import { Page, PageHeader, PaginationFooter } from '@/components/entity-list';
4
4
  import { Badge } from '@/components/ui/badge';
5
5
  import { Button } from '@/components/ui/button';
6
6
  import { Input } from '@/components/ui/input';
7
+ import { usePersistedPageSize } from '@/hooks/use-persisted-page-size';
7
8
  import {
8
9
  Select,
9
10
  SelectContent,
@@ -52,7 +53,11 @@ export default function AuditLogsPage() {
52
53
  const { request } = useApp();
53
54
 
54
55
  const [page, setPage] = useState(1);
55
- const [pageSize, setPageSize] = useState(10);
56
+ const [pageSize, setPageSize] = usePersistedPageSize({
57
+ storageKey: 'pagination:finance-audit-logs:pageSize',
58
+ defaultValue: 10,
59
+ allowedValues: [10, 20, 30, 40, 50],
60
+ });
56
61
  const [search, setSearch] = useState('');
57
62
  const [action, setAction] = useState('all');
58
63
  const [entityTable, setEntityTable] = useState('all');
@@ -125,7 +130,7 @@ export default function AuditLogsPage() {
125
130
  />
126
131
 
127
132
  <div className="flex flex-col gap-4 xl:flex-row xl:flex-wrap xl:items-center">
128
- <div className="relative min-w-[260px] flex-1">
133
+ <div className="relative min-w-65 flex-1">
129
134
  <Search className="pointer-events-none absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
130
135
  <Input
131
136
  placeholder={t('filters.searchPlaceholder')}
@@ -145,7 +150,7 @@ export default function AuditLogsPage() {
145
150
  setPage(1);
146
151
  }}
147
152
  >
148
- <SelectTrigger className="w-full sm:w-[180px]">
153
+ <SelectTrigger className="w-full sm:w-45">
149
154
  <SelectValue placeholder={t('filters.action')} />
150
155
  </SelectTrigger>
151
156
  <SelectContent>
@@ -169,7 +174,7 @@ export default function AuditLogsPage() {
169
174
  setActorUserId(event.target.value);
170
175
  setPage(1);
171
176
  }}
172
- className="w-full sm:w-[220px]"
177
+ className="w-full sm:w-55"
173
178
  />
174
179
 
175
180
  <Select
@@ -179,7 +184,7 @@ export default function AuditLogsPage() {
179
184
  setPage(1);
180
185
  }}
181
186
  >
182
- <SelectTrigger className="w-full sm:w-[180px]">
187
+ <SelectTrigger className="w-full sm:w-45">
183
188
  <SelectValue placeholder={t('filters.entity')} />
184
189
  </SelectTrigger>
185
190
  <SelectContent>
@@ -198,7 +203,7 @@ export default function AuditLogsPage() {
198
203
  setFrom(event.target.value);
199
204
  setPage(1);
200
205
  }}
201
- className="w-full sm:w-[220px]"
206
+ className="w-full sm:w-55"
202
207
  />
203
208
 
204
209
  <Input
@@ -208,7 +213,7 @@ export default function AuditLogsPage() {
208
213
  setTo(event.target.value);
209
214
  setPage(1);
210
215
  }}
211
- className="w-full sm:w-[220px]"
216
+ className="w-full sm:w-55"
212
217
  />
213
218
 
214
219
  <Button
@@ -35,6 +35,7 @@ import {
35
35
  TableRow,
36
36
  } from '@/components/ui/table';
37
37
  import { useFormDraft } from '@/hooks/use-form-draft';
38
+ import { usePersistedPageSize } from '@/hooks/use-persisted-page-size';
38
39
  import { formatDateTime } from '@/lib/format-date';
39
40
  import { useApp, useQuery } from '@hed-hog/next-app-provider';
40
41
  import { zodResolver } from '@hookform/resolvers/zod';
@@ -324,7 +325,11 @@ export default function PeriodClosePage() {
324
325
 
325
326
  const [sheetOpen, setSheetOpen] = useState(false);
326
327
  const [page, setPage] = useState(1);
327
- const [pageSize, setPageSize] = useState(10);
328
+ const [pageSize, setPageSize] = usePersistedPageSize({
329
+ storageKey: 'pagination:finance-period-close:pageSize',
330
+ defaultValue: 10,
331
+ allowedValues: [10, 20, 30, 40, 50],
332
+ });
328
333
  const [search, setSearch] = useState('');
329
334
  const [status, setStatus] = useState('all');
330
335
  const [user, setUser] = useState('');
@@ -432,7 +437,7 @@ export default function PeriodClosePage() {
432
437
  setUser(event.target.value);
433
438
  setPage(1);
434
439
  }}
435
- className="w-full sm:w-[220px]"
440
+ className="w-full sm:w-55"
436
441
  />
437
442
 
438
443
  <Input
@@ -442,7 +447,7 @@ export default function PeriodClosePage() {
442
447
  setFrom(event.target.value);
443
448
  setPage(1);
444
449
  }}
445
- className="w-full sm:w-[220px]"
450
+ className="w-full sm:w-55"
446
451
  />
447
452
 
448
453
  <Input
@@ -452,7 +457,7 @@ export default function PeriodClosePage() {
452
457
  setTo(event.target.value);
453
458
  setPage(1);
454
459
  }}
455
- className="w-full sm:w-[220px]"
460
+ className="w-full sm:w-55"
456
461
  />
457
462
 
458
463
  <Button
@@ -874,7 +874,7 @@ function NovaContaSheet({
874
874
 
875
875
  <FormField
876
876
  control={form.control}
877
- name="descricao"
877
+ name="descricao"
878
878
  render={({ field }) => (
879
879
  <FormItem>
880
880
  <FormLabel>{t('fields.description')}</FormLabel>
@@ -126,7 +126,9 @@ const createStatementEntrySchema = (t: ReturnType<typeof useTranslations>) =>
126
126
  amount: z.number().min(0.01, t('formErrors.amountMustBePositive')),
127
127
  });
128
128
 
129
- type StatementEntryFormValues = z.infer<ReturnType<typeof createStatementEntrySchema>>;
129
+ type StatementEntryFormValues = z.infer<
130
+ ReturnType<typeof createStatementEntrySchema>
131
+ >;
130
132
 
131
133
  const createBankAccountFormSchema = (
132
134
  tBank: ReturnType<typeof useTranslations>
@@ -156,8 +158,12 @@ const createImportStatementSchema = (t: ReturnType<typeof useTranslations>) =>
156
158
  ),
157
159
  });
158
160
 
159
- type ImportStatementFormValues = z.infer<ReturnType<typeof createImportStatementSchema>>;
160
- type BankAccountFormValues = z.infer<ReturnType<typeof createBankAccountFormSchema>>;
161
+ type ImportStatementFormValues = z.infer<
162
+ ReturnType<typeof createImportStatementSchema>
163
+ >;
164
+ type BankAccountFormValues = z.infer<
165
+ ReturnType<typeof createBankAccountFormSchema>
166
+ >;
161
167
 
162
168
  type StatementBankAccountDraftPayload = {
163
169
  values: BankAccountFormValues;
@@ -471,7 +477,7 @@ function NovaContaBancariaSheet({
471
477
 
472
478
  <FormField
473
479
  control={form.control}
474
- name="descricao"
480
+ name="descricao"
475
481
  render={({ field }) => (
476
482
  <FormItem>
477
483
  <FormLabel>{tBank('fields.description')}</FormLabel>
@@ -8,13 +8,13 @@
8
8
  "upcoming": {
9
9
  "payable": "To Pay",
10
10
  "receivable": "To Receive",
11
- "messages": {
12
- "selectBankAccount": "Select a bank account",
13
- "createAdjustmentSuccess": "Adjustment created successfully",
14
- "createAdjustmentError": "Could not create the adjustment",
15
- "reconcileSuccess": "Reconciliation completed successfully",
16
- "reconcileError": "Could not reconcile the records"
17
- },
11
+ "messages": {
12
+ "selectBankAccount": "Select a bank account",
13
+ "createAdjustmentSuccess": "Adjustment created successfully",
14
+ "createAdjustmentError": "Could not create the adjustment",
15
+ "reconcileSuccess": "Reconciliation completed successfully",
16
+ "reconcileError": "Could not reconcile the records"
17
+ },
18
18
  "nextDueDates": "Upcoming due dates"
19
19
  },
20
20
  "alerts": {
@@ -141,7 +141,7 @@
141
141
  "title": "All good!",
142
142
  "description": "There are no pending approvals.",
143
143
  "refresh": "Refresh"
144
- }
144
+ },
145
145
  "messages": {
146
146
  "invalidTitleForApproval": "Invalid title for approval",
147
147
  "approveSuccess": "Title approved successfully",
@@ -149,6 +149,7 @@
149
149
  "invalidTitleForRejection": "Invalid title for rejection",
150
150
  "rejectSuccess": "Title rejected successfully",
151
151
  "rejectError": "Could not reject the title"
152
+ }
152
153
  },
153
154
  "FinanceEntityFieldWithCreate": {
154
155
  "validation": {
@@ -804,7 +805,9 @@
804
805
  "channels": {
805
806
  "boleto": "Bank Slip",
806
807
  "card": "Card",
807
- "transfer": "Transfer"
808
+ "transfer": "Transfer",
809
+ "debitAutomatico": "Automatic debit",
810
+ "debitEmConta": "Account debit"
808
811
  },
809
812
  "notFound": {
810
813
  "title": "Title not found",
@@ -790,7 +790,9 @@
790
790
  "channels": {
791
791
  "boleto": "Boleto",
792
792
  "card": "Cartão",
793
- "transfer": "Transferência"
793
+ "transfer": "Transferência",
794
+ "debitAutomatico": "Débito automático",
795
+ "debitEmConta": "Débito em conta"
794
796
  },
795
797
  "notFound": {
796
798
  "title": "Título não encontrado",
@@ -1790,6 +1792,10 @@
1790
1792
  "positive": "Positivo",
1791
1793
  "negative": "Negativo",
1792
1794
  "withGrowth": "Com crescimento de {value}%"
1795
+ },
1796
+ "messages": {
1797
+ "saveSuccess": "Cenário salvo com sucesso",
1798
+ "saveError": "Erro ao salvar cenário"
1793
1799
  }
1794
1800
  },
1795
1801
  "OverviewResultsReportPage": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/finance",
3
- "version": "0.0.330",
3
+ "version": "0.0.332",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -10,13 +10,13 @@
10
10
  "@nestjs/jwt": "^11",
11
11
  "@nestjs/mapped-types": "*",
12
12
  "@hed-hog/api": "0.0.8",
13
- "@hed-hog/contact": "0.0.330",
14
- "@hed-hog/api-prisma": "0.0.6",
15
- "@hed-hog/api-locale": "0.0.14",
13
+ "@hed-hog/contact": "0.0.332",
16
14
  "@hed-hog/api-pagination": "0.0.7",
15
+ "@hed-hog/api-locale": "0.0.14",
17
16
  "@hed-hog/api-types": "0.0.1",
18
- "@hed-hog/core": "0.0.330",
19
- "@hed-hog/tag": "0.0.330"
17
+ "@hed-hog/api-prisma": "0.0.6",
18
+ "@hed-hog/tag": "0.0.332",
19
+ "@hed-hog/core": "0.0.332"
20
20
  },
21
21
  "exports": {
22
22
  ".": {