diff --git a/app/(marketing)/_components/site-navigation.tsx b/app/(marketing)/_components/site-navigation.tsx
index f4e235c..a7e28f0 100644
--- a/app/(marketing)/_components/site-navigation.tsx
+++ b/app/(marketing)/_components/site-navigation.tsx
@@ -22,10 +22,6 @@ const links = {
label: 'marketing:documentation',
path: '/docs',
},
- Pricing: {
- label: 'marketing:pricing',
- path: '/pricing',
- },
FAQ: {
label: 'marketing:faq',
path: '/faq',
diff --git a/app/auth/membership-confirmation/_components/membership-confirmation-notification.tsx b/app/auth/membership-confirmation/_components/membership-confirmation-notification.tsx
index ad1e446..bd681a5 100644
--- a/app/auth/membership-confirmation/_components/membership-confirmation-notification.tsx
+++ b/app/auth/membership-confirmation/_components/membership-confirmation-notification.tsx
@@ -25,7 +25,7 @@ const MembershipConfirmationNotification: React.FC<{
descriptionKey="account:membershipConfirmation:successDescription"
buttonProps={{
buttonTitleKey: 'account:membershipConfirmation:successButton',
- href: pathsConfig.app.selectPackage,
+ href: pathsConfig.app.home,
}}
/>
);
diff --git a/app/auth/membership-confirmation/page.tsx b/app/auth/membership-confirmation/page.tsx
index 43c0f2c..3cf00c8 100644
--- a/app/auth/membership-confirmation/page.tsx
+++ b/app/auth/membership-confirmation/page.tsx
@@ -8,7 +8,7 @@ import { withI18n } from '~/lib/i18n/with-i18n';
import MembershipConfirmationNotification from './_components/membership-confirmation-notification';
-async function UpdateAccountSuccess() {
+async function MembershipConfirmation() {
const client = getSupabaseServerClient();
const {
@@ -22,4 +22,4 @@ async function UpdateAccountSuccess() {
return ;
}
-export default withI18n(UpdateAccountSuccess);
+export default withI18n(MembershipConfirmation);
diff --git a/app/join/page.tsx b/app/join/page.tsx
index 1c1b061..5237a6a 100644
--- a/app/join/page.tsx
+++ b/app/join/page.tsx
@@ -108,7 +108,7 @@ async function JoinTeamAccountPage(props: JoinTeamAccountPageProps) {
const signOutNext = `${pathsConfig.auth.signIn}?invite_token=${token}`;
// once the user accepts the invitation, we redirect them to the account home page
- const accountHome = pathsConfig.app.home;
+ const membershipConfirmation = pathsConfig.auth.membershipConfirmation;
const email = auth.data.email ?? '';
@@ -120,7 +120,7 @@ async function JoinTeamAccountPage(props: JoinTeamAccountPageProps) {
invitation={invitation}
paths={{
signOutNext,
- accountHome,
+ membershipConfirmation,
}}
/>
diff --git a/app/sitemap.xml/route.ts b/app/sitemap.xml/route.ts
index 33db9e9..9c6fb67 100644
--- a/app/sitemap.xml/route.ts
+++ b/app/sitemap.xml/route.ts
@@ -30,7 +30,6 @@ function getPaths() {
'/faq',
'/blog',
'/docs',
- '/pricing',
'/contact',
'/cookie-policy',
'/terms-of-service',
diff --git a/packages/features/notifications/src/components/notifications-popover.tsx b/packages/features/notifications/src/components/notifications-popover.tsx
index 946dfcb..16abbd1 100644
--- a/packages/features/notifications/src/components/notifications-popover.tsx
+++ b/packages/features/notifications/src/components/notifications-popover.tsx
@@ -222,12 +222,13 @@ export function NotificationsPopover(params: {
-
+
diff --git a/packages/features/team-accounts/src/components/invitations/accept-invitation-container.tsx b/packages/features/team-accounts/src/components/invitations/accept-invitation-container.tsx
index 8cc49d1..0af6042 100644
--- a/packages/features/team-accounts/src/components/invitations/accept-invitation-container.tsx
+++ b/packages/features/team-accounts/src/components/invitations/accept-invitation-container.tsx
@@ -1,5 +1,6 @@
import Image from 'next/image';
+import { useDismissNotification } from '@kit/notifications/hooks';
import { Heading } from '@kit/ui/heading';
import { If } from '@kit/ui/if';
import { Separator } from '@kit/ui/separator';
@@ -25,7 +26,7 @@ export function AcceptInvitationContainer(props: {
paths: {
signOutNext: string;
- accountHome: string;
+ membershipConfirmation: string;
};
}) {
return (
@@ -42,36 +43,36 @@ export function AcceptInvitationContainer(props: {
{(url) => (
)}
-
+
-
diff --git a/supabase/migrations/20250730091700_fix_company_invitations.sql b/supabase/migrations/20250730091700_fix_company_invitations.sql
index ffaebb0..7b82ce6 100644
--- a/supabase/migrations/20250730091700_fix_company_invitations.sql
+++ b/supabase/migrations/20250730091700_fix_company_invitations.sql
@@ -1,4 +1,4 @@
-drop function if exists medreport.add_invitations_to_account(text, medreport.invitation[]);
+drop function if exists medreport.add_invitations_to_account(text, invitation[]);
drop type if exists medreport.invitation;
diff --git a/supabase/migrations/20253107112400_invitation_email_webhook.sql b/supabase/migrations/20250731112400_invitation_email_webhook.sql
similarity index 100%
rename from supabase/migrations/20253107112400_invitation_email_webhook.sql
rename to supabase/migrations/20250731112400_invitation_email_webhook.sql
diff --git a/supabase/migrations/20250804132600_fix_employee_invitations.sql b/supabase/migrations/20250804132600_fix_employee_invitations.sql
new file mode 100644
index 0000000..e4c4c28
--- /dev/null
+++ b/supabase/migrations/20250804132600_fix_employee_invitations.sql
@@ -0,0 +1,45 @@
+grant
+ execute on function medreport.accept_invitation (text, uuid) to service_role;
+
+
+CREATE OR REPLACE FUNCTION medreport.accept_invitation(token text, user_id uuid)
+ RETURNS uuid
+ LANGUAGE plpgsql
+ SET search_path TO ''
+AS $function$declare
+ target_account_id uuid;
+ target_role varchar(50);
+begin
+ select
+ account_id,
+ role into target_account_id,
+ target_role
+ from
+ medreport.invitations
+ where
+ invite_token = token
+ and expires_at > now();
+
+ if not found then
+ raise exception 'Invalid or expired invitation token';
+ end if;
+
+ insert into medreport.accounts_memberships(
+ user_id,
+ account_id,
+ account_role)
+ values (
+ accept_invitation.user_id,
+ target_account_id,
+ target_role);
+
+ delete from medreport.invitations
+ where invite_token = token;
+
+ update medreport.notifications
+ set dismissed = true
+ where link ilike '%' || token || '%';
+
+ return target_account_id;
+end;$function$
+;
\ No newline at end of file
diff --git a/supabase/sql/analysis.sql b/supabase/sql/analysis.sql
index 8f2fe5d..21b96d9 100644
--- a/supabase/sql/analysis.sql
+++ b/supabase/sql/analysis.sql
@@ -1,4 +1,4 @@
--- Create analysis for /home/analysis-results
+-- CREATE NEW ANALYSIS START
INSERT INTO medreport.analysis_groups (
id,
original_id,
@@ -68,10 +68,10 @@ VALUES (
1 -- parent_analysis_element_id
);
+-- CREATE NEW ANALYSIS END
-
-
+-- CREATE NEW ANALYSIS RESPONSE START
INSERT INTO medreport.analysis_orders (
analysis_element_ids,
@@ -101,12 +101,6 @@ VALUES (
'COMPLETED',
'8dcb4354-77be-4915-a2cd-8fc573e675d6'
)
-ON CONFLICT (order_number)
-DO UPDATE SET
- analysis_order_id = EXCLUDED.analysis_order_id,
- order_status = EXCLUDED.order_status,
- user_id = EXCLUDED.user_id
-RETURNING id;
INSERT INTO medreport.analysis_response_elements (
id,
@@ -144,3 +138,5 @@ VALUES
NOW(),
'Hematokrit'
);
+
+-- CREATE NEW ANALYSIS RESPONSE END
\ No newline at end of file