From ac89822f256adbc4761a908e16c52f74073757ec Mon Sep 17 00:00:00 2001 From: SelmaBergstrand Date: Mon, 21 Oct 2024 15:46:13 +0200 Subject: [PATCH] fix(organizations): add missing revalidatepath on org settings --- .../(admin)/organizations/components/DefaultColumns/actions.ts | 2 ++ .../app/(admin)/organizations/components/FontSelect/actions.ts | 2 ++ .../components/MemberAdministration/CountiesSelect/actions.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tavla/app/(admin)/organizations/components/DefaultColumns/actions.ts b/tavla/app/(admin)/organizations/components/DefaultColumns/actions.ts index a99eb20a3..b98435d9a 100644 --- a/tavla/app/(admin)/organizations/components/DefaultColumns/actions.ts +++ b/tavla/app/(admin)/organizations/components/DefaultColumns/actions.ts @@ -4,6 +4,7 @@ import { userCanEditOrganization, } from 'app/(admin)/utils/firebase' import { firestore } from 'firebase-admin' +import { revalidatePath } from 'next/cache' import { redirect } from 'next/navigation' import { TColumn } from 'types/column' import { TOrganizationID } from 'types/settings' @@ -17,4 +18,5 @@ export async function saveColumns(oid: TOrganizationID, columns: TColumn[]) { await firestore().collection('organizations').doc(oid).update({ 'defaults.columns': columns, }) + revalidatePath(`/organizations/${oid}`) } diff --git a/tavla/app/(admin)/organizations/components/FontSelect/actions.ts b/tavla/app/(admin)/organizations/components/FontSelect/actions.ts index 09076f878..60b819aa0 100644 --- a/tavla/app/(admin)/organizations/components/FontSelect/actions.ts +++ b/tavla/app/(admin)/organizations/components/FontSelect/actions.ts @@ -4,6 +4,7 @@ import { userCanEditOrganization, } from 'app/(admin)/utils/firebase' import { firestore } from 'firebase-admin' +import { revalidatePath } from 'next/cache' import { redirect } from 'next/navigation' import { TFontSize } from 'types/meta' import { TOrganizationID } from 'types/settings' @@ -17,4 +18,5 @@ export async function setFontSize(oid: TOrganizationID, fontSize: TFontSize) { await firestore().collection('organizations').doc(oid).update({ 'defaults.font': fontSize, }) + revalidatePath(`/organizations/${oid}`) } diff --git a/tavla/app/(admin)/organizations/components/MemberAdministration/CountiesSelect/actions.ts b/tavla/app/(admin)/organizations/components/MemberAdministration/CountiesSelect/actions.ts index c3d787f95..e67fec3c4 100644 --- a/tavla/app/(admin)/organizations/components/MemberAdministration/CountiesSelect/actions.ts +++ b/tavla/app/(admin)/organizations/components/MemberAdministration/CountiesSelect/actions.ts @@ -4,6 +4,7 @@ import { userCanEditOrganization, } from 'app/(admin)/utils/firebase' import { firestore } from 'firebase-admin' +import { revalidatePath } from 'next/cache' import { redirect } from 'next/navigation' import { TCountyID, TOrganizationID } from 'types/settings' @@ -19,4 +20,5 @@ export async function setCounties( await firestore().collection('organizations').doc(oid).update({ 'defaults.counties': countiesList, }) + revalidatePath(`/organizations/${oid}`) }