Merge branch 'main' into B2B-30

This commit is contained in:
devmc-ee
2025-07-01 23:27:59 +03:00
95 changed files with 2343 additions and 2297 deletions

View File

@@ -1,7 +1,12 @@
import { Trans } from '@kit/ui/trans';
import { cn } from '@kit/ui/utils';
import { AppLogo } from '~/components/app-logo';
import { ProfileAccountDropdownContainer } from '~/components/personal-account-dropdown-container';
import { Trans } from '@kit/ui/trans';
import { Search } from '~/components/ui/search';
import { SIDEBAR_WIDTH } from '../../../../packages/ui/src/shadcn/constants';
// home imports
import { UserNotifications } from '../_components/user-notifications';
import { type UserWorkspace } from '../_lib/server/load-user-workspace';
@@ -10,31 +15,33 @@ import { ShoppingCart } from 'lucide-react';
export function HomeMenuNavigation(props: { workspace: UserWorkspace }) {
const { workspace, user, accounts } = props.workspace;
return (
<div className={'flex w-full flex-1 justify-between'}>
<div className={'flex items-center space-x-8'}>
<div className={'flex w-full flex-1 items-center justify-between gap-3'}>
<div className={cn('flex items-center', `w-[${SIDEBAR_WIDTH}]`)}>
<AppLogo />
</div>
{/* searbar */}
<div className={'flex justify-end space-x-2.5 gap-2 items-center'}>
{/* TODO: implement account budget */}
<Button className='relative px-4 py-2 h-10 border-1 mr-0 cursor-pointer' variant={'ghost'}>
<span className='flex items-center text-nowrap'> 231,89</span>
</Button>
{/* TODO: implement cart */}
<Button className='relative px-4 py-2 h-10 border-1 mr-0 cursor-pointer gap-2' variant={'ghost'}>
<ShoppingCart size={16} />
<Search
className="flex grow"
startElement={<Trans i18nKey="common:search" values={{ end: '...' }} />}
/>
<Trans i18nKey="billing:cart.label" values={{ items: 0 }}/>
<div className="flex items-center justify-end gap-3">
<Button variant="ghost">
<ShoppingCart className="stroke-[1.5px]" />
<Trans i18nKey="common:shoppingCart" /> (0)
</Button>
<UserNotifications userId={user.id} />
<ProfileAccountDropdownContainer
user={user}
account={workspace}
accounts={accounts}
showProfileName={true}
/>
<div>
<ProfileAccountDropdownContainer
user={user}
account={workspace}
showProfileName
accounts={accounts}
/>
</div>
</div>
</div>
);