mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-06-10 07:16:01 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cbdddb12e |
@@ -5,6 +5,13 @@ Todas as mudanças notáveis deste projeto serão documentadas neste arquivo.
|
|||||||
O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.1.0/),
|
O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.1.0/),
|
||||||
e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/).
|
e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/).
|
||||||
|
|
||||||
|
## [2.7.4] - 2026-06-09
|
||||||
|
|
||||||
|
Esta versão corrige o fluxo de revisão de lançamentos compartilhados para que o acesso somente leitura proteja os dados originais sem impedir que a pessoa copie movimentos para a própria conta.
|
||||||
|
|
||||||
|
### Corrigido
|
||||||
|
- Pessoas: lançamentos de uma pessoa compartilhada em modo somente leitura agora podem ser selecionados e importados para a conta do usuário logado, tanto individualmente quanto em lote, mantendo edição e remoção bloqueadas no lançamento original.
|
||||||
|
|
||||||
## [2.7.3] - 2026-06-05
|
## [2.7.3] - 2026-06-05
|
||||||
|
|
||||||
Esta versão melhora pequenos pontos de leitura e configuração para o uso diário e self-hosted. As faturas pagas ficam mais fáceis de identificar na lista de cartões, a configuração de origins confiáveis do Better Auth passa a ficar documentada para Docker e túneis, o dashboard corrige a leitura de tempo dos pré-lançamentos e as dependências seguem atualizadas sem quebrar o build da imagem.
|
Esta versão melhora pequenos pontos de leitura e configuração para o uso diário e self-hosted. As faturas pagas ficam mais fáceis de identificar na lista de cartões, a configuração de origins confiáveis do Better Auth passa a ficar documentada para Docker e túneis, o dashboard corrige a leitura de tempo dos pré-lançamentos e as dependências seguem atualizadas sem quebrar o build da imagem.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
> **Não há versão online hospedada.** Você precisa clonar o repositório e rodar localmente ou no seu próprio servidor.
|
> **Não há versão online hospedada.** Você precisa clonar o repositório e rodar localmente ou no seu próprio servidor.
|
||||||
|
|
||||||
[](CHANGELOG.md)
|
[](CHANGELOG.md)
|
||||||
[](https://nextjs.org/)
|
[](https://nextjs.org/)
|
||||||
[](https://www.typescriptlang.org/)
|
[](https://www.typescriptlang.org/)
|
||||||
[](https://www.postgresql.org/)
|
[](https://www.postgresql.org/)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "openmonetis",
|
"name": "openmonetis",
|
||||||
"version": "2.7.3",
|
"version": "2.7.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@11.1.3",
|
"packageManager": "pnpm@11.1.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export function TransactionActionsMenu({
|
|||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{!item.readonly && !isOwnData ? (
|
{!isOwnData ? (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onSelect={() => onImport?.(item)}
|
onSelect={() => onImport?.(item)}
|
||||||
disabled={!onImport}
|
disabled={!onImport}
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ function buildColumns({
|
|||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={row.getIsSelected()}
|
checked={row.getIsSelected()}
|
||||||
|
disabled={!row.getCanSelect()}
|
||||||
onCheckedChange={(value) => row.toggleSelected(!!value)}
|
onCheckedChange={(value) => row.toggleSelected(!!value)}
|
||||||
aria-label="Selecionar linha"
|
aria-label="Selecionar linha"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -175,7 +175,10 @@ export function TransactionsTable({
|
|||||||
: getPaginationRowModel(),
|
: getPaginationRowModel(),
|
||||||
manualPagination: isServerPaginated,
|
manualPagination: isServerPaginated,
|
||||||
pageCount: serverPagination?.totalPages,
|
pageCount: serverPagination?.totalPages,
|
||||||
enableRowSelection: (row) => !row.original.readonly,
|
enableRowSelection: (row) =>
|
||||||
|
row.original.userId === currentUserId
|
||||||
|
? !row.original.readonly
|
||||||
|
: Boolean(onBulkImport),
|
||||||
});
|
});
|
||||||
|
|
||||||
const rowModel = table.getRowModel();
|
const rowModel = table.getRowModel();
|
||||||
@@ -184,11 +187,21 @@ export function TransactionsTable({
|
|||||||
? (serverPagination?.totalItems ?? 0)
|
? (serverPagination?.totalItems ?? 0)
|
||||||
: table.getCoreRowModel().rows.length;
|
: table.getCoreRowModel().rows.length;
|
||||||
const selectedRows = table.getFilteredSelectedRowModel().rows;
|
const selectedRows = table.getFilteredSelectedRowModel().rows;
|
||||||
|
const selectedOwnRows = selectedRows.filter(
|
||||||
|
(row) => row.original.userId === currentUserId,
|
||||||
|
);
|
||||||
|
const selectedImportRows = selectedRows.filter(
|
||||||
|
(row) => row.original.userId !== currentUserId,
|
||||||
|
);
|
||||||
const selectedCount = selectedRows.length;
|
const selectedCount = selectedRows.length;
|
||||||
const selectedTotal = selectedRows.reduce(
|
const selectedTotal = selectedRows.reduce(
|
||||||
(total, row) => total + (row.original.amount ?? 0),
|
(total, row) => total + (row.original.amount ?? 0),
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
|
const selectedImportTotal = selectedImportRows.reduce(
|
||||||
|
(total, row) => total + (row.original.amount ?? 0),
|
||||||
|
0,
|
||||||
|
);
|
||||||
const currentPage = isServerPaginated
|
const currentPage = isServerPaginated
|
||||||
? (serverPagination?.page ?? 1)
|
? (serverPagination?.page ?? 1)
|
||||||
: table.getState().pagination.pageIndex + 1;
|
: table.getState().pagination.pageIndex + 1;
|
||||||
@@ -211,8 +224,8 @@ export function TransactionsTable({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleBulkImport = () => {
|
const handleBulkImport = () => {
|
||||||
if (onBulkImport && selectedCount > 0) {
|
if (onBulkImport && selectedImportRows.length > 0) {
|
||||||
onBulkImport(selectedRows.map((row) => row.original));
|
onBulkImport(selectedImportRows.map((row) => row.original));
|
||||||
setRowSelection({});
|
setRowSelection({});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -326,7 +339,7 @@ export function TransactionsTable({
|
|||||||
|
|
||||||
{selectedCount > 0 &&
|
{selectedCount > 0 &&
|
||||||
onBulkDelete &&
|
onBulkDelete &&
|
||||||
selectedRows.every((row) => row.original.userId === currentUserId) ? (
|
selectedOwnRows.length === selectedCount ? (
|
||||||
<TransactionsBulkBar
|
<TransactionsBulkBar
|
||||||
selectedCount={selectedCount}
|
selectedCount={selectedCount}
|
||||||
selectedTotal={selectedTotal}
|
selectedTotal={selectedTotal}
|
||||||
@@ -335,12 +348,10 @@ export function TransactionsTable({
|
|||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{selectedCount > 0 &&
|
{selectedCount > 0 && onBulkImport && selectedImportRows.length > 0 ? (
|
||||||
onBulkImport &&
|
|
||||||
selectedRows.some((row) => row.original.userId !== currentUserId) ? (
|
|
||||||
<TransactionsBulkBar
|
<TransactionsBulkBar
|
||||||
selectedCount={selectedCount}
|
selectedCount={selectedImportRows.length}
|
||||||
selectedTotal={selectedTotal}
|
selectedTotal={selectedImportTotal}
|
||||||
mode="import"
|
mode="import"
|
||||||
onAction={handleBulkImport}
|
onAction={handleBulkImport}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user