From 8a68673a4853a651a90e1d62c8e41ee96bd1090e Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Fri, 24 Jul 2026 16:12:57 +0200 Subject: [PATCH] promote breaks feature in sidebar banner --- e2e/organization.spec.ts | 2 +- e2e/time.spec.ts | 2 +- .../Components/UpdateSidebarNotification.vue | 31 ++++++++++++++----- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/e2e/organization.spec.ts b/e2e/organization.spec.ts index edbf599e..9e2a46b2 100644 --- a/e2e/organization.spec.ts +++ b/e2e/organization.spec.ts @@ -4,7 +4,7 @@ import { PLAYWRIGHT_BASE_URL, TEST_USER_PASSWORD } from '../playwright/config'; async function goToOrganizationSettings(page) { await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard'); await page.locator('[data-testid="organization_switcher"]:visible').click(); - await page.getByText('Organization Settings').click(); + await page.getByRole('menuitem', { name: 'Organization Settings' }).click(); } async function createTimeEntry(page, duration: string) { diff --git a/e2e/time.spec.ts b/e2e/time.spec.ts index 91986602..f8315b7f 100644 --- a/e2e/time.spec.ts +++ b/e2e/time.spec.ts @@ -50,7 +50,7 @@ async function goToTimeOverview(page: Page) { async function goToOrganizationSettings(page: Page) { await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard'); await page.locator('[data-testid="organization_switcher"]:visible').click(); - await page.getByText('Organization Settings').click(); + await page.getByRole('menuitem', { name: 'Organization Settings' }).click(); } async function createEmptyTimeEntry(page: Page) { diff --git a/resources/js/Components/UpdateSidebarNotification.vue b/resources/js/Components/UpdateSidebarNotification.vue index 934f4b2a..87831ff7 100644 --- a/resources/js/Components/UpdateSidebarNotification.vue +++ b/resources/js/Components/UpdateSidebarNotification.vue @@ -2,10 +2,17 @@ import { BellAlertIcon, XMarkIcon } from '@heroicons/vue/20/solid'; import { SecondaryButton } from '@/packages/ui/src'; import { useStorage } from '@vueuse/core'; -const showReleaseInfo = useStorage('showReleaseInfo-desktop', true); +import { router } from '@inertiajs/vue3'; +import { getCurrentOrganizationId } from '@/utils/useUser'; +import { canUpdateOrganization } from '@/utils/permissions'; +const showReleaseInfo = useStorage('showReleaseInfo-breaks', true); -function openDesktopGithubRepo() { - window.open('https://github.com/solidtime-io/solidtime-desktop', '_blank')?.focus(); +function openOrganizationSettings() { + router.visit(route('organizations.show', getCurrentOrganizationId())); +} + +function openBreaksDocs() { + window.open('https://docs.solidtime.io/user-guide/breaks', '_blank')?.focus(); } @@ -16,7 +23,7 @@ function openDesktopGithubRepo() {
- New Update + New Feature