From b1580b38512593ca3b816e2b7c2985ac52e40a65 Mon Sep 17 00:00:00 2001 From: flipvanhaaren Date: Wed, 5 Mar 2025 15:39:26 +0100 Subject: [PATCH 1/2] hotfix: enable imado and sync in prod --- config/default.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/default.ts b/config/default.ts index 8ac477d77..dc5036d7f 100644 --- a/config/default.ts +++ b/config/default.ts @@ -112,10 +112,10 @@ export const config = { // Optional settings has: { pwa: true, // Progressive Web App support for preloading static assets and offline support - sync: false, // Realtime updates and sync using Electric Sync + sync: true, // Realtime updates and sync using Electric Sync registrationEnabled: true, // Allow users to sign up. If disabled, the app is by invitation only waitlist: false, // Suggest a waitlist for unknown emails when sign up is disabled, - imado: false, // Imado fully configured, if false, files will be stored in local browser (indexedDB) + imado: true, // Imado fully configured, if false, files will be stored in local browser (indexedDB) }, /** From d3ee89eae5449ede56d8bea60e933d55e9405849 Mon Sep 17 00:00:00 2001 From: David Hordiienko Date: Wed, 5 Mar 2025 16:40:18 +0200 Subject: [PATCH 2/2] fixes --- backend/src/modules/entities/hc.ts | 2 +- backend/src/modules/system/hc.ts | 2 +- .../attachments/table/table-wrapper.tsx | 2 +- frontend/src/modules/common/sse/provider.tsx | 2 +- .../members-table/table-wrapper.tsx | 36 ++++++++++++------- frontend/src/modules/navigation/search.tsx | 2 +- .../organizations/table/table-wrapper.tsx | 1 + .../src/modules/requests/table/table-bar.tsx | 10 +----- .../modules/requests/table/table-wrapper.tsx | 1 + .../src/modules/users/table/table-wrapper.tsx | 1 + 10 files changed, 32 insertions(+), 27 deletions(-) diff --git a/backend/src/modules/entities/hc.ts b/backend/src/modules/entities/hc.ts index 923108efb..3a633645a 100644 --- a/backend/src/modules/entities/hc.ts +++ b/backend/src/modules/entities/hc.ts @@ -4,4 +4,4 @@ import type routes from './handlers'; const client = hc(''); type Client = typeof client; -export const entitiesHc = createHc('/'); +export const entitiesHc = createHc('/entities'); diff --git a/backend/src/modules/system/hc.ts b/backend/src/modules/system/hc.ts index d002398eb..9882ffb9a 100644 --- a/backend/src/modules/system/hc.ts +++ b/backend/src/modules/system/hc.ts @@ -4,4 +4,4 @@ import type routes from './handlers'; const client = hc(''); type Client = typeof client; -export const systemHc = createHc('/'); +export const systemHc = createHc('/system'); diff --git a/frontend/src/modules/attachments/table/table-wrapper.tsx b/frontend/src/modules/attachments/table/table-wrapper.tsx index ca2b922fa..cfaa2658b 100644 --- a/frontend/src/modules/attachments/table/table-wrapper.tsx +++ b/frontend/src/modules/attachments/table/table-wrapper.tsx @@ -57,7 +57,7 @@ const AttachmentsTable = ({ organization, canUpload = true, isSheet = false }: A }; const openRemoveDialog = () => { - dialog(, { + dialog(, { className: 'max-w-xl', title: t('common:remove_resource', { resource: t('common:attachment').toLowerCase() }), description: t('common:confirm.delete_resources', { resources: t('common:attachments').toLowerCase() }), diff --git a/frontend/src/modules/common/sse/provider.tsx b/frontend/src/modules/common/sse/provider.tsx index 0cfa16ea0..4a64a0a20 100644 --- a/frontend/src/modules/common/sse/provider.tsx +++ b/frontend/src/modules/common/sse/provider.tsx @@ -23,7 +23,7 @@ export const SSEProvider: FC = ({ children }) => { }; const createSource = (reconnectAttempt = false) => { - const source = new EventSource(`${config.backendUrl}/sse`, { + const source = new EventSource(`${config.backendUrl}/me/sse`, { withCredentials: true, }); diff --git a/frontend/src/modules/memberships/members-table/table-wrapper.tsx b/frontend/src/modules/memberships/members-table/table-wrapper.tsx index 4c4fb57b3..176fba79b 100644 --- a/frontend/src/modules/memberships/members-table/table-wrapper.tsx +++ b/frontend/src/modules/memberships/members-table/table-wrapper.tsx @@ -76,19 +76,29 @@ const MembersTable = ({ entity: baseEntity, isSheet = false }: MembersTableProps }; const openRemoveDialog = () => { - dialog(, { - className: 'max-w-xl', - title: t('common:remove_resource', { resource: t('common:member').toLowerCase() }), - description: ( - member.email).join(', '), - }} - /> - ), - }); + dialog( + , + { + className: 'max-w-xl', + title: t('common:remove_resource', { resource: t('common:member').toLowerCase() }), + description: ( + member.email).join(', '), + }} + /> + ), + }, + ); }; const handleNewInvites = (emails: string[]) => { diff --git a/frontend/src/modules/navigation/search.tsx b/frontend/src/modules/navigation/search.tsx index bba2abf58..55a854fd5 100644 --- a/frontend/src/modules/navigation/search.tsx +++ b/frontend/src/modules/navigation/search.tsx @@ -15,7 +15,7 @@ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, Command import { ScrollArea } from '~/modules/ui/scroll-area'; import { getEntityRoute, suggestionSections } from '~/nav-config'; import { useNavigationStore } from '~/store/navigation'; -import type { entitySuggestionSchema } from '#/modules/general/schema'; +import type { entitySuggestionSchema } from '#/modules/entities/schema'; export type SuggestionType = z.infer; diff --git a/frontend/src/modules/organizations/table/table-wrapper.tsx b/frontend/src/modules/organizations/table/table-wrapper.tsx index 3c8baf2a5..e191157d6 100644 --- a/frontend/src/modules/organizations/table/table-wrapper.tsx +++ b/frontend/src/modules/organizations/table/table-wrapper.tsx @@ -57,6 +57,7 @@ const OrganizationsTable = () => { callback={(organizations) => { toaster(t('common:success.delete_resources', { resources: t('common:organizations') }), 'success'); mutateQuery.remove(organizations); + clearSelection(); }} dialog />, diff --git a/frontend/src/modules/requests/table/table-bar.tsx b/frontend/src/modules/requests/table/table-bar.tsx index e2fb6c34f..1801e8033 100644 --- a/frontend/src/modules/requests/table/table-bar.tsx +++ b/frontend/src/modules/requests/table/table-bar.tsx @@ -1,5 +1,5 @@ import { config } from 'config'; -import { Handshake, Mail, Trash, XSquare } from 'lucide-react'; +import { Handshake, Trash, XSquare } from 'lucide-react'; import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import ColumnsView from '~/modules/common/data-table/columns-view'; @@ -37,7 +37,6 @@ export const RequestsTableBar = ({ const { t } = useTranslation(); const selectedToWaitlist = useMemo(() => selected.filter((r) => r.type === 'waitlist' && !r.tokenId), [selected]); - const selectedContact = useMemo(() => selected.filter((r) => r.type !== 'waitlist'), [selected]); const isFiltered = !!q; // Drop selected Rows on search @@ -58,13 +57,6 @@ export const RequestsTableBar = ({ {selected.length > 0 && ( <> - {selectedContact.length > 0 && ( - - )} {selectedToWaitlist.length > 0 && (