diff --git a/backend/data/src/main/kotlin/io/tolgee/service/QuickStartService.kt b/backend/data/src/main/kotlin/io/tolgee/service/QuickStartService.kt index 9afe190b2d..71be4cb9c3 100644 --- a/backend/data/src/main/kotlin/io/tolgee/service/QuickStartService.kt +++ b/backend/data/src/main/kotlin/io/tolgee/service/QuickStartService.kt @@ -3,12 +3,12 @@ package io.tolgee.service import io.tolgee.component.demoProject.DemoProjectCreator import io.tolgee.dtos.cacheable.UserAccountDto import io.tolgee.dtos.queryResults.organization.QuickStartView +import io.tolgee.exceptions.NotFoundException import io.tolgee.model.Organization import io.tolgee.model.QuickStart import io.tolgee.model.UserAccount import io.tolgee.repository.QuickStartRepository import org.springframework.context.ApplicationContext -import org.springframework.data.crossstore.ChangeSetPersister import org.springframework.stereotype.Component @Component @@ -44,7 +44,7 @@ class QuickStartService( ): QuickStart { val quickStart = quickStartRepository.findByUserAccountId(userAccount.id) - ?: throw ChangeSetPersister.NotFoundException() + ?: throw NotFoundException() quickStart.finished = finished quickStartRepository.save(quickStart) return quickStart @@ -56,7 +56,7 @@ class QuickStartService( ): QuickStart { val quickStart = quickStartRepository.findByUserAccountId(userAccount.id) - ?: throw ChangeSetPersister.NotFoundException() + ?: throw NotFoundException() quickStart.open = open quickStartRepository.save(quickStart) return quickStart diff --git a/webapp/src/globalContext/useInitialDataService.ts b/webapp/src/globalContext/useInitialDataService.ts index 79289c6512..a4fdb07597 100644 --- a/webapp/src/globalContext/useInitialDataService.ts +++ b/webapp/src/globalContext/useInitialDataService.ts @@ -37,6 +37,7 @@ export const useInitialDataService = () => { const [announcement, setAnnouncement] = useState( initialDataLoadable.data?.announcement ); + const [quickStart, setQuickStart] = useState( initialDataLoadable.data?.preferredOrganization?.quickStart ); @@ -153,6 +154,7 @@ export const useInitialDataService = () => { // load new preferred organization const data = await preferredOrganizationLoadable.mutateAsync({}); + setQuickStart(data.quickStart); setOrganization(data); } finally { setOrganizationLoading(false);