fix missing change company

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing committed 2025-08-31 14:35:02 +02:00
1 parent a0a197a8d9
commit 9337ad64ea
2 files changed
+33 -11

No files matched your search

@@ -121,6 +121,12 @@
{context.companyName}
</p>
{/if}
<button
class="rounded-md h-3/4 px-8 text-white bg-indigo-500 hover:bg-cta-blue uppercase font-semibold mr-4"
on:click={toggleChangeCompanyModal}
>
Change company
</button>
{#if isUpdateAvailable}
<a
@@ -164,12 +170,17 @@
</div>
</div>
<button
class="flex w-14 mr-4 lg:hidden"
on:click={() => (isMobileMenuVisible = !isMobileMenuVisible)}
>
<img class="" src="/mob-menu-button.svg" alt="toggle mobile menu" />
</button>
<div class="flex lg:hidden items-center mr-4">
<button
class="rounded-md px-3 py-1 text-white bg-indigo-500 hover:bg-cta-blue uppercase font-semibold text-xs mr-3"
on:click={toggleChangeCompanyModal}
>
Change company
</button>
<button class="flex w-14" on:click={() => (isMobileMenuVisible = !isMobileMenuVisible)}>
<img class="" src="/mob-menu-button.svg" alt="toggle mobile menu" />
</button>
</div>
{/if}
</div>
@@ -115,15 +115,26 @@
<main class="flex flex-col h-full">
<!-- Company Selection Section -->
<div class="flex-grow p-6">
<!--
<h2 class="text-lg mb-4 text-pc-darkblue">
Viewing as: {context?.companyName ?? 'Shared'}
</h2>
-->
{#if isLoadingCompanies}
<div class="flex items-center justify-center py-8">
<div class="text-gray-500">Loading companies...</div>
</div>
{:else if companies.length === 0}
<div class="flex flex-col items-center justify-center py-8 text-center">
<div class="text-gray-500 mb-4">No companies found.</div>
<div class="text-sm text-gray-400 mb-4">
You need to create a company first before you can switch to it.
</div>
<a
href="/company/"
class="bg-cta-blue hover:bg-blue-700 text-sm uppercase font-bold px-4 py-2 text-white rounded-md"
on:click={() => {
visible = false;
}}
>
Create Company
</a>
</div>
{:else}
<TextFieldSelect id={'context'} bind:value={selectedCompany} options={companyNameList}>
Company