From 36d2f7ba593f0a25a4483affe1fc63ae7e7915b6 Mon Sep 17 00:00:00 2001 From: Pontus Abrahamsson Date: Fri, 4 Oct 2024 15:06:57 +0200 Subject: [PATCH] Updates --- .../tables/transactions/data-table.tsx | 4 ++-- .../components/tables/transactions/index.tsx | 2 +- .../src/components/team-dropdown.tsx | 4 ++-- apps/engine/tasks/download-gocardless.ts | 24 +++++++++++++++++++ 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 apps/engine/tasks/download-gocardless.ts diff --git a/apps/dashboard/src/components/tables/transactions/data-table.tsx b/apps/dashboard/src/components/tables/transactions/data-table.tsx index 2b0f92efc6..94a79bac73 100644 --- a/apps/dashboard/src/components/tables/transactions/data-table.tsx +++ b/apps/dashboard/src/components/tables/transactions/data-table.tsx @@ -282,10 +282,10 @@ export function DataTable({ {hasNextPage && (
- +
)} diff --git a/apps/dashboard/src/components/tables/transactions/index.tsx b/apps/dashboard/src/components/tables/transactions/index.tsx index 62d383fa63..4b1b94831a 100644 --- a/apps/dashboard/src/components/tables/transactions/index.tsx +++ b/apps/dashboard/src/components/tables/transactions/index.tsx @@ -24,7 +24,7 @@ export async function Table({ filter, page, sort, query }: Props) { // NOTE: When we have a filter we want to show all results so users can select // And handle all in once (export etc) const transactions = await getTransactions({ - to: hasFilters ? maxItems : pageSize, + to: hasFilters ? maxItems : page > 0 ? pageSize : pageSize - 1, from: 0, filter, sort, diff --git a/apps/dashboard/src/components/team-dropdown.tsx b/apps/dashboard/src/components/team-dropdown.tsx index 2bb8c06f76..26ae84a6c0 100644 --- a/apps/dashboard/src/components/team-dropdown.tsx +++ b/apps/dashboard/src/components/team-dropdown.tsx @@ -30,7 +30,7 @@ export function TeamDropdown({ selectedTeamId: initialId, teams }: Props) { const [isOpen, onOpenChange] = useState(false); const changeTeam = useAction(changeTeamAction); - const sortedTeams = [...teams, { team: { id: "add" } }].sort((a, b) => { + const sortedTeams = teams.sort((a, b) => { if (a.team.id === selectedId) return -1; if (b.team.id === selectedId) return 1; @@ -46,7 +46,7 @@ export function TeamDropdown({ selectedTeamId: initialId, teams }: Props) { return ( - {sortedTeams.map(({ team }, index) => ( + {[...sortedTeams, { team: { id: "add" } }].map(({ team }, index) => ( { + const fileName = `${institution.id}.${getFileExtension(institution.logo)}`; + + return saveImageFromURL(`${GO_CARDLESS_CDN}/${fileName}`, fileName); + }); + + await batchPromises(tasks); +} + +main();