Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
feat(erp): phone layout with an app bar, tab bar, compact lists, record headers and bottom-sheet menus and pickers
aashu39389b335bd8
diff --git a/apps/erp/app/components/AvatarMenu.tsx b/apps/erp/app/components/AvatarMenu.tsxindex 91a0fcfb3e..26ea60b3b5 100644--- a/apps/erp/app/components/AvatarMenu.tsx+++ b/apps/erp/app/components/AvatarMenu.tsx@@ -31,7 +31,8 @@ import type { ModePreference } from "@carbon/utils";import { Edition, modeValidator, themes } from "@carbon/utils";import { Trans, useLingui } from "@lingui/react/macro";import { useLocale } from "@react-aria/i18n";-import { useMemo, useState } from "react";+import type { ReactElement, ReactNode } from "react";+import { Fragment, useMemo, useState } from "react";import {LuCheck,LuCreditCard,@@ -54,7 +55,33 @@ import type { action } from "~/root";import { startModeTransition } from "~/utils/dom";import { path } from "~/utils/path";-const AvatarMenu = () => {+export type AccountMenuItem = {+ id:+ | "dashboard"+ | "apiDocs"+ | "appearance"+ | "theme"+ | "language"+ | "account"+ | "billing"+ | "legal"+ | "about"+ | "signOut";+ /** Items in the same group sit between the same separators. */+ group: number;+ kind: "link" | "external" | "action" | "submenu" | "mode";+ label: ReactNode;+ icon: ReactElement;+ to?: string;+ children?: { id: string; label: ReactNode; icon: ReactElement; to: string }[];+};++/**+ * The account menu's items, in desktop order, with every handler they need.+ * The desktop AvatarMenu and the compact Profile sheet both render from this,+ * so the two cannot drift.+ */+export function useAccountMenu() {const { t } = useLingui();const user = useUser();const name = `${user.firstName} ${user.lastName}`;@@ -86,7 +113,6 @@ const AvatarMenu = () => {}};const localeFetcher = useFetcher<{ ok?: boolean }>();- const [isOpen, setIsOpen] = useState(false);const [selectedTheme, setSelectedTheme] = useState<string | null>(null);const { locale } = useLocale();@@ -118,70 +144,210 @@ const AvatarMenu = () => {const itarDisclosure = useDisclosure();- return (- <>- <DropdownMenu open={isOpen} onOpenChange={setIsOpen}>- <DropdownMenuTrigger className="outline-none focus-visible:outline-none">- <Avatar path={user.avatarUrl} name={name} />- </DropdownMenuTrigger>- <DropdownMenuContent align="end" className="w-64">- <DropdownMenuLabel>{t`Signed in as ${name}`}</DropdownMenuLabel>- <DropdownMenuSeparator />+ const modeOptions = [+ { value: "light", label: <Trans>Light</Trans>, icon: <LuSun /> },+ { value: "dark", label: <Trans>Dark</Trans>, icon: <LuMoon /> },+ { value: "system", label: <Trans>System</Trans>, icon: <LuLaptop /> }+ ];++ const items: AccountMenuItem[] = [+ {+ id: "dashboard",+ group: 0,+ kind: "link",+ label: <Trans>Dashboard</Trans>,+ icon: <LuHouse />,+ to: path.to.authenticatedRoot+ },+ {+ id: "apiDocs",+ group: 1,+ kind: "external",+ label: <Trans>API Documentation</Trans>,+ icon: <LuFileText />,+ to: path.to.apiDocs+ },+ {+ id: "appearance",+ group: 2,+ kind: "mode",+ label: <Trans>Appearance</Trans>,+ icon: mode === "dark" ? <LuMoon /> : <LuSun />+ },+ {+ id: "theme",+ group: 2,+ kind: "submenu",+ label: <Trans>Theme Color</Trans>,+ icon: <LuPalette />+ },+ {+ id: "language",+ group: 3,+ kind: "submenu",+ label: <Trans>Language</Trans>,+ icon: <LuLanguages />+ },+ {+ id: "account",+ group: 4,+ kind: "link",+ label: <Trans>Account Settings</Trans>,+ icon: <LuUser />,+ to: path.to.profile+ },+ ...(edition === Edition.Cloud && isOwner()+ ? [+ {+ id: "billing",+ group: 4,+ kind: "link",+ label: <Trans>Manage Subscription</Trans>,+ icon: <LuCreditCard />,+ to: path.to.billing+ } satisfies AccountMenuItem+ ]+ : []),+ {+ id: "legal",+ group: 4,+ kind: "submenu",+ label: <Trans>Terms and Privacy</Trans>,+ icon: <LuFileText />,+ children: [+ {+ id: "terms",+ label: <Trans>Terms of Service</Trans>,+ icon: <LuFileText />,+ to: path.to.legal.termsAndConditions+ },+ {+ id: "privacy",+ label: <Trans>Privacy Policy</Trans>,+ icon: <LuShieldCheck />,+ to: path.to.legal.privacyPolicy+ }+ ]+ },+ ...(CONTROLLED_ENVIRONMENT+ ? [+ {+ id: "about",+ group: 5,+ kind: "action",+ label: <Trans>About</Trans>,+ icon: <LuShieldCheck />+ } satisfies AccountMenuItem+ ]+ : []),+ {+ id: "signOut",+ group: 5,+ kind: "action",+ label: <Trans>Sign Out</Trans>,+ icon: <LuLogOut />+ }+ ];++ return {+ user,+ name,+ signedInAs: t`Signed in as ${name}`,+ items,+ mode,+ modePreference,+ modeOptions,+ onModeChange,+ optimisticTheme,+ onThemeChange,+ languageOptions,+ resolvedLocale,+ localeFetcher,+ itarDisclosure+ };+}++const AvatarMenu = () => {+ const {+ user,+ name,+ signedInAs,+ items,+ mode,+ modePreference,+ modeOptions,+ onModeChange,+ optimisticTheme,+ onThemeChange,+ languageOptions,+ resolvedLocale,+ localeFetcher,+ itarDisclosure+ } = useAccountMenu();+ const [isOpen, setIsOpen] = useState(false);++ const renderItem = (item: AccountMenuItem) => {+ switch (item.id) {+ case "dashboard":+ case "account":+ return (<DropdownMenuItem asChild>- <Link to={path.to.authenticatedRoot}>- <DropdownMenuIcon icon={<LuHouse />} />- <Trans>Dashboard</Trans>+ <Link to={item.to!}>+ <DropdownMenuIcon icon={item.icon} />+ {item.label}</Link></DropdownMenuItem>- <DropdownMenuSeparator />-+ );+ case "billing":+ return (+ <DropdownMenuItem asChild>+ <Link to={item.to!}>+ <DropdownMenuIcon icon={item.icon} />+ <span>{item.label}</span>+ </Link>+ </DropdownMenuItem>+ );+ case "apiDocs":+ return (<DropdownMenuItem asChild>- <a href={path.to.apiDocs} target="_blank" rel="noreferrer">- <DropdownMenuIcon icon={<LuFileText />} />- <Trans>API Documentation</Trans>+ <a href={item.to} target="_blank" rel="noreferrer">+ <DropdownMenuIcon icon={item.icon} />+ {item.label}</a></DropdownMenuItem>- <DropdownMenuSeparator />+ );+ case "appearance":+ return (<DropdownMenuSub><DropdownMenuSubTrigger>- <DropdownMenuIcon- icon={mode === "dark" ? <LuMoon /> : <LuSun />}- />- <Trans>Appearance</Trans>+ <DropdownMenuIcon icon={item.icon} />+ {item.label}</DropdownMenuSubTrigger><DropdownMenuSubContent><DropdownMenuRadioGroupvalue={modePreference}onValueChange={onModeChange}>- <DropdownMenuRadioItem- value="light"- onSelect={(e) => e.preventDefault()}- >- <DropdownMenuIcon icon={<LuSun />} />- <Trans>Light</Trans>- </DropdownMenuRadioItem>- <DropdownMenuRadioItem- value="dark"- onSelect={(e) => e.preventDefault()}- >- <DropdownMenuIcon icon={<LuMoon />} />- <Trans>Dark</Trans>- </DropdownMenuRadioItem>- <DropdownMenuRadioItem- value="system"- onSelect={(e) => e.preventDefault()}- >- <DropdownMenuIcon icon={<LuLaptop />} />- <Trans>System</Trans>- </DropdownMenuRadioItem>+ {modeOptions.map((option) => (+ <DropdownMenuRadioItem+ key={option.value}+ value={option.value}+ onSelect={(e) => e.preventDefault()}+ >+ <DropdownMenuIcon icon={option.icon} />+ {option.label}+ </DropdownMenuRadioItem>+ ))}</DropdownMenuRadioGroup></DropdownMenuSubContent></DropdownMenuSub>+ );+ case "theme":+ return (<DropdownMenuSub><DropdownMenuSubTrigger>- <DropdownMenuIcon icon={<LuPalette />} />- <Trans>Theme Color</Trans>+ <DropdownMenuIcon icon={item.icon} />+ {item.label}</DropdownMenuSubTrigger><DropdownMenuSubContent><DropdownMenuRadioGroup@@ -210,11 +376,13 @@ const AvatarMenu = () => {</DropdownMenuRadioGroup></DropdownMenuSubContent></DropdownMenuSub>- <DropdownMenuSeparator />+ );+ case "language":+ return (<DropdownMenuSub><DropdownMenuSubTrigger disabled={localeFetcher.state !== "idle"}>- <DropdownMenuIcon icon={<LuLanguages />} />- <Trans>Language</Trans>+ <DropdownMenuIcon icon={item.icon} />+ {item.label}</DropdownMenuSubTrigger><DropdownMenuSubContent><localeFetcher.Form method="post" action="/api/locale">@@ -248,63 +416,63 @@ const AvatarMenu = () => {</localeFetcher.Form></DropdownMenuSubContent></DropdownMenuSub>- <DropdownMenuSeparator />- <DropdownMenuItem asChild>- <Link to={path.to.profile}>- <DropdownMenuIcon icon={<LuUser />} />- <Trans>Account Settings</Trans>- </Link>- </DropdownMenuItem>-- {edition === Edition.Cloud && isOwner() && (- <DropdownMenuItem asChild>- <Link to={path.to.billing}>- <DropdownMenuIcon icon={<LuCreditCard />} />- <span>- <Trans>Manage Subscription</Trans>- </span>- </Link>- </DropdownMenuItem>- )}-+ );+ case "legal":+ return (<DropdownMenuSub><DropdownMenuSubTrigger>- <DropdownMenuIcon icon={<LuFileText />} />- <Trans>Terms and Privacy</Trans>+ <DropdownMenuIcon icon={item.icon} />+ {item.label}</DropdownMenuSubTrigger><DropdownMenuSubContent>- <DropdownMenuItem asChild>- <a href={path.to.legal.termsAndConditions}>- <DropdownMenuIcon icon={<LuFileText />} />- <Trans>Terms of Service</Trans>- </a>- </DropdownMenuItem>- <DropdownMenuItem asChild>- <a href={path.to.legal.privacyPolicy}>- <DropdownMenuIcon icon={<LuShieldCheck />} />- <Trans>Privacy Policy</Trans>- </a>- </DropdownMenuItem>+ {item.children?.map((child) => (+ <DropdownMenuItem key={child.id} asChild>+ <a href={child.to}>+ <DropdownMenuIcon icon={child.icon} />+ {child.label}+ </a>+ </DropdownMenuItem>+ ))}</DropdownMenuSubContent></DropdownMenuSub>-- <DropdownMenuSeparator />- {CONTROLLED_ENVIRONMENT && (- <DropdownMenuItem onClick={itarDisclosure.onOpen}>- <DropdownMenuIcon icon={<LuShieldCheck />} />- <Trans>About</Trans>- </DropdownMenuItem>- )}+ );+ case "about":+ return (+ <DropdownMenuItem onClick={itarDisclosure.onOpen}>+ <DropdownMenuIcon icon={item.icon} />+ {item.label}+ </DropdownMenuItem>+ );+ case "signOut":+ return (<DropdownMenuItem asChild><Form method="post" action={path.to.logout}><button type="submit" className="w-full h-full flex items-center">- <DropdownMenuIcon icon={<LuLogOut />} />- <span>- <Trans>Sign Out</Trans>- </span>+ <DropdownMenuIcon icon={item.icon} />+ <span>{item.label}</span></button></Form></DropdownMenuItem>+ );+ }+ };++ return (+ <>+ <DropdownMenu open={isOpen} onOpenChange={setIsOpen}>+ <DropdownMenuTrigger className="outline-none focus-visible:outline-none">+ <Avatar path={user.avatarUrl} name={name} />+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end" className="w-64">+ <DropdownMenuLabel>{signedInAs}</DropdownMenuLabel>+ {items.map((item, index) => (+ <Fragment key={item.id}>+ {item.group !== items[index - 1]?.group && (+ <DropdownMenuSeparator />+ )}+ {renderItem(item)}+ </Fragment>+ ))}</DropdownMenuContent></DropdownMenu>{CONTROLLED_ENVIRONMENT && <ItarDisclosure disclosure={itarDisclosure} />}diff --git a/apps/erp/app/components/ChangelogPanel.tsx b/apps/erp/app/components/ChangelogPanel.tsxindex 16d84c6d3c..701c4f8c6b 100644--- a/apps/erp/app/components/ChangelogPanel.tsx+++ b/apps/erp/app/components/ChangelogPanel.tsx@@ -34,7 +34,7 @@ export default function ChangelogPanel({animate={{ opacity: 1, y: 0, scale: 1, filter: "blur(0px)" }}exit={{ opacity: 0, y: 10, scale: 0.95, filter: "blur(4px)" }}transition={{ duration: 0.3, ease: "easeOut" }}- className="fixed bottom-4 right-4 w-[calc(100vw-2rem)] max-w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden"+ className="fixed bottom-4 right-4 w-[calc(100vw-2rem)] max-w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden compact:inset-0 compact:z-[60] compact:w-full compact:max-w-none compact:overflow-y-auto compact:rounded-none compact:border-0 compact:pt-safe compact:pb-safe"><div className="px-4 pt-4 pb-3 space-y-2"><div className="flex items-center justify-between">diff --git a/apps/erp/app/components/Contact.tsx b/apps/erp/app/components/Contact.tsxindex 8a255264ff..6f464db831 100644--- a/apps/erp/app/components/Contact.tsx+++ b/apps/erp/app/components/Contact.tsx@@ -49,11 +49,14 @@ const Contact = ({ contact, url, user, actions }: ContactProps) => {<VStack spacing={0}><HStack>{url ? (- <Link to={url}>- <p className="text-sm font-bold">{name}</p>+ <Link+ to={url}+ className="compact:relative compact:after:absolute compact:after:-inset-y-3 compact:after:inset-x-0"+ >+ <p className="text-sm font-bold compact:font-semibold">{name}</p></Link>) : (- <p className="text-sm font-bold">{name}</p>+ <p className="text-sm font-bold compact:font-semibold">{name}</p>)}{userStatus === UserStatus.Active && (diff --git a/apps/erp/app/components/DateSelect.tsx b/apps/erp/app/components/DateSelect.tsxindex c391c40c24..0101e584d2 100644--- a/apps/erp/app/components/DateSelect.tsx+++ b/apps/erp/app/components/DateSelect.tsx@@ -17,7 +17,7 @@ import type { CalendarDate } from "@internationalized/date";import { useLingui } from "@lingui/react/macro";import type { DateRange } from "@react-types/datepicker";import { forwardRef, useMemo, useState } from "react";-import { LuCalendar } from "react-icons/lu";+import { LuCalendar, LuChevronDown } from "react-icons/lu";type DateSelectOption = {value: string;@@ -80,8 +80,17 @@ const DateSelect = forwardRef<HTMLDivElement, DateSelectProps>(>{/* Compact dropdown for small screens */}<Select value={value} onValueChange={onChange}>- <SelectTrigger className="md:hidden w-auto h-8 text-xs">+ {/* Phones: a period chip with a ⌄ picker indicator,+ 32pt visual with a 44pt hit area like its neighbouring buttons. */}+ <SelectTrigger+ hideIcon+ className={cn(+ "md:hidden w-auto h-8 text-xs",+ "compact:relative compact:h-8 compact:rounded-full compact:space-x-1 compact:text-sm compact:after:absolute compact:after:-inset-[max(0px,calc((44px-100%)/2))]"+ )}+ ><SelectValue />+ <LuChevronDown className="size-4 shrink-0 opacity-50" /></SelectTrigger><SelectContent>{allOptions.map((option) => (diff --git a/apps/erp/app/components/DefaultAttachmentsPanel.tsx b/apps/erp/app/components/DefaultAttachmentsPanel.tsxindex 04012a5ff4..5569341f19 100644--- a/apps/erp/app/components/DefaultAttachmentsPanel.tsx+++ b/apps/erp/app/components/DefaultAttachmentsPanel.tsx@@ -12,6 +12,7 @@ import {CardDescription,CardHeader,CardTitle,+ cn,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,@@ -149,7 +150,7 @@ export default function DefaultAttachmentsPanel({</CardHeader><CardContent><Table className="w-full table-fixed">- <Thead>+ <Thead className={cn(files.length === 0 && "compact:hidden")}><Tr><Th className="w-auto"><Trans>Name</Trans>diff --git a/apps/erp/app/components/DocumentHeader.tsx b/apps/erp/app/components/DocumentHeader.tsxindex 03305c1ba7..99d1fc1c6a 100644--- a/apps/erp/app/components/DocumentHeader.tsx+++ b/apps/erp/app/components/DocumentHeader.tsx@@ -5,6 +5,7 @@import {CardHeader,Copy,+ cn,DropdownMenu,DropdownMenuContent,DropdownMenuTrigger,@@ -12,53 +13,82 @@ import {HStack,IconButton} from "@carbon/react";+import { useLingui } from "@lingui/react/macro";import type { ReactNode } from "react";import { LuEllipsisVertical } from "react-icons/lu";+import {+ RecordHero,+ RecordPhoneChrome,+ recordHeroSlot+} from "./Layout/RecordHeader";type DocumentHeaderProps = {title: string;subtitle?: string;status?: ReactNode;menuItems?: ReactNode;+ /** The document's actions, each in a RecordAction. */actions?: ReactNode;+ /** Defaults to `title`. */+ copyValue?: string;+ className?: string;};+/**+ * A card form's header. Phones hide it: the hero shows at the page's+ * <RecordHeroTarget>, outside the card, and the actions move to the bottom+ * bar.+ */const DocumentHeader = ({title,subtitle,status,menuItems,- actions+ actions,+ copyValue = title,+ className}: DocumentHeaderProps) => {+ const { t } = useLingui();return (- <CardHeader className="flex-row items-center justify-between">- <div>- <HStack>- <Heading as="h1" size="h3" className="font-sans">- {title}- </Heading>- <Copy text={title} />- {menuItems && (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label="More options"- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>{menuItems}</DropdownMenuContent>- </DropdownMenu>- )}- {status}- </HStack>- {subtitle && (- <p className="text-sm text-muted-foreground">{subtitle}</p>+ <>+ <recordHeroSlot.Fill>+ <RecordHero subtitle={subtitle} status={status} />+ </recordHeroSlot.Fill>+ <RecordPhoneChrome menu={menuItems} copyValue={copyValue} />+ <CardHeader+ className={cn(+ "flex-row items-center justify-between compact:hidden",+ className)}- </div>- {actions && <HStack>{actions}</HStack>}- </CardHeader>+ >+ <div>+ <HStack>+ <Heading as="h1" size="h3" className="font-sans">+ {title}+ </Heading>+ <Copy text={copyValue} />+ {menuItems && (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton+ aria-label={t`More options`}+ icon={<LuEllipsisVertical />}+ variant="secondary"+ size="sm"+ />+ </DropdownMenuTrigger>+ <DropdownMenuContent>{menuItems}</DropdownMenuContent>+ </DropdownMenu>+ )}+ {status}+ </HStack>+ {subtitle && (+ <p className="text-sm text-muted-foreground">{subtitle}</p>+ )}+ </div>+ {actions && <HStack>{actions}</HStack>}+ </CardHeader>+ </>);};diff --git a/apps/erp/app/components/DocumentLineEditor/DocumentLineRow.tsx b/apps/erp/app/components/DocumentLineEditor/DocumentLineRow.tsxindex 0b191fbe45..9d77f5c32a 100644--- a/apps/erp/app/components/DocumentLineEditor/DocumentLineRow.tsx+++ b/apps/erp/app/components/DocumentLineEditor/DocumentLineRow.tsx@@ -137,7 +137,7 @@ const DocumentLineRow = ({variant="ghost"onClick={onDelete}isDisabled={!canDelete}- className="size-8 p-0 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0"+ className="size-8 p-0 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0 compact:opacity-100"/>)}</div>diff --git a/apps/erp/app/components/DocumentTemplateEditor/BlockList.tsx b/apps/erp/app/components/DocumentTemplateEditor/BlockList.tsxindex cf1a19c442..1912f3b28c 100644--- a/apps/erp/app/components/DocumentTemplateEditor/BlockList.tsx+++ b/apps/erp/app/components/DocumentTemplateEditor/BlockList.tsx@@ -63,7 +63,8 @@ import { path } from "~/utils/path";import {type AddableBlockType,FOOTER_BLOCK_ID,- useDocumentTemplate+ useDocumentTemplate,+ usePickBlock} from "./context";import { HEADER_LOGO_ID, useHeaderConfig } from "./useHeaderConfig";@@ -313,8 +314,9 @@ function AddMenuItem({}function BlockRow({ id }: { id: string }) {- const { blocks, sections, selectedId, select, toggleVisible, removeBlock } =+ const { blocks, sections, selectedId, toggleVisible, removeBlock } =useDocumentTemplate();+ const pickBlock = usePickBlock();const block = blocks.find((b) => b.id === id);const {attributes,@@ -347,7 +349,7 @@ function BlockRow({ id }: { id: string }) {transform: CSS.Translate.toString(transform),transition: transition ?? undefined}}- onClick={() => select(isSelected ? null : id)}+ onClick={() => pickBlock(id)}className={cn("group flex cursor-pointer items-center gap-1.5 rounded-md border px-1.5 py-2","transition-colors duration-150",@@ -368,7 +370,7 @@ function BlockRow({ id }: { id: string }) {>{/* Type icon normally; grip on hover to signal draggability. */}<span className="group-hover:opacity-0">{blockIcon(block.type)}</span>- <span className="absolute inset-0 opacity-0 group-hover:opacity-100">+ <span className="absolute inset-0 opacity-0 group-hover:opacity-100 compact:opacity-100"><LuGripVertical className="size-4" /></span></button>@@ -396,7 +398,7 @@ function BlockRow({ id }: { id: string }) {e.stopPropagation();removeBlock(id);}}- className="rounded p-1 text-muted-foreground opacity-0 transition-[opacity,color] hover:text-destructive group-hover:opacity-100"+ className="rounded p-1 text-muted-foreground opacity-0 transition-[opacity,color] hover:text-destructive group-hover:opacity-100 compact:opacity-100"><LuTrash2 className="size-4" /></button>@@ -442,8 +444,9 @@ function BlockRow({ id }: { id: string }) {* behavior as `BlockRow`, just without the drag handle.*/function NestedBlockRow({ id }: { id: string }) {- const { blocks, sections, selectedId, select, toggleVisible, removeBlock } =+ const { blocks, sections, selectedId, toggleVisible, removeBlock } =useDocumentTemplate();+ const pickBlock = usePickBlock();const block = blocks.find((b) => b.id === id);if (!block) return null;const meta = BLOCK_META[block.type];@@ -462,7 +465,7 @@ function NestedBlockRow({ id }: { id: string }) {return (<div className="ml-3 border-l border-border/60 pl-2"><div- onClick={() => select(isSelected ? null : id)}+ onClick={() => pickBlock(id)}className={cn("group flex cursor-pointer items-center gap-1.5 rounded-md border px-1.5 py-2","transition-colors duration-150",@@ -484,7 +487,7 @@ function NestedBlockRow({ id }: { id: string }) {e.stopPropagation();removeBlock(id);}}- className="rounded p-1 text-muted-foreground opacity-0 transition-[opacity,color] hover:text-destructive group-hover:opacity-100"+ className="rounded p-1 text-muted-foreground opacity-0 transition-[opacity,color] hover:text-destructive group-hover:opacity-100 compact:opacity-100"><LuTrash2 className="size-4" /></button>@@ -529,8 +532,9 @@ function NestedBlockRow({ id }: { id: string }) {* it opens the header config (a link to its global shared section).*/function HeaderRow({ id }: { id: string }) {- const { selectedId, select, headerSectionId, setHeaderSection } =+ const { selectedId, headerSectionId, setHeaderSection } =useDocumentTemplate();+ const pickBlock = usePickBlock();const isSelected = selectedId === id;const shown = headerSectionId !== null;@@ -540,7 +544,7 @@ function HeaderRow({ id }: { id: string }) {label="Header"isSelected={isSelected}shown={shown}- onSelect={() => select(isSelected ? null : id)}+ onSelect={() => pickBlock(id)}onToggle={() =>setHeaderSection(shown ? null : BUILT_IN_SECTION_IDS.header)}@@ -554,7 +558,8 @@ function HeaderRow({ id }: { id: string }) {* Only rendered while the header is shown. Eye toggles `showLogo`.*/function HeaderLogoRow() {- const { selectedId, select, headerSectionId } = useDocumentTemplate();+ const { selectedId, headerSectionId } = useDocumentTemplate();+ const pickBlock = usePickBlock();const { section, config, patch } = useHeaderConfig();// Hide the node when the header is off or its section isn't available.if (!section || headerSectionId === null) return null;@@ -564,7 +569,7 @@ function HeaderLogoRow() {return (<div className="ml-3 border-l border-border/60 pl-2"><div- onClick={() => select(isSelected ? null : HEADER_LOGO_ID)}+ onClick={() => pickBlock(HEADER_LOGO_ID)}className={cn("group flex cursor-pointer items-center gap-1.5 rounded-md border px-1.5 py-2","transition-colors duration-150",@@ -610,8 +615,9 @@ function HeaderLogoRow() {* footer config (page numbers, registration line).*/function FooterRow() {- const { footerSectionId, setFooterSection, selectedId, select } =+ const { footerSectionId, setFooterSection, selectedId } =useDocumentTemplate();+ const pickBlock = usePickBlock();const isSelected = selectedId === FOOTER_BLOCK_ID;const shown = footerSectionId !== null;@@ -621,7 +627,7 @@ function FooterRow() {label="Footer"isSelected={isSelected}shown={shown}- onSelect={() => select(isSelected ? null : FOOTER_BLOCK_ID)}+ onSelect={() => pickBlock(FOOTER_BLOCK_ID)}onToggle={() =>setFooterSection(shown ? null : BUILT_IN_SECTION_IDS.footer)}diff --git a/apps/erp/app/components/DocumentTemplateEditor/context.tsx b/apps/erp/app/components/DocumentTemplateEditor/context.tsxindex 4241fe3e8a..1a1d075d4b 100644--- a/apps/erp/app/components/DocumentTemplateEditor/context.tsx+++ b/apps/erp/app/components/DocumentTemplateEditor/context.tsx@@ -313,6 +313,20 @@ export function useEditorStore<T>(selector: (s: EditorState) => T): T {return useStore(useEditorContext().store, selector);}+const PickBlockContext = createContext<((id: string) => void) | null>(null);++/** Overrides what tapping a block row does (the compact editor's panes). */+export const PickBlockProvider = PickBlockContext.Provider;++/** Tapping a block row: toggles its selection unless a provider overrides it. */+export function usePickBlock() {+ const selectedId = useEditorStore((s) => s.selectedId);+ const select = useEditorStore((s) => s.select);+ const onPick = useContext(PickBlockContext);+ return (id: string) =>+ onPick ? onPick(id) : select(selectedId === id ? null : id);+}+export function DocumentTemplateProvider({children,...propsdiff --git a/apps/erp/app/components/DocumentTemplateEditor/index.tsx b/apps/erp/app/components/DocumentTemplateEditor/index.tsxindex 20cfc2b64a..73bf1f7b62 100644--- a/apps/erp/app/components/DocumentTemplateEditor/index.tsx+++ b/apps/erp/app/components/DocumentTemplateEditor/index.tsx@@ -12,6 +12,7 @@ import { getDocumentLabel } from "@carbon/documents/template";import type { JSONContent } from "@carbon/react";import {Button,+ cn,Heading,IconButton,ResizableHandle,@@ -27,18 +28,22 @@ import {Tabs,TabsContent,TabsList,- TabsTrigger+ TabsTrigger,+ useCompact} from "@carbon/react";import { labelSizes } from "@carbon/utils";-import { type ReactNode, useState } from "react";+import { Trans, useLingui } from "@lingui/react/macro";+import { type ReactNode, useCallback, useEffect, useState } from "react";import { LuArrowLeft, LuPalette, LuRefreshCw, LuType } from "react-icons/lu";import { Link } from "react-router";+import { CompactTabRow } from "~/components/Layout/CompactTabRow";import { path } from "~/utils/path";import { BlockConfig } from "./BlockConfig";import { AddBlockMenu, BlockList } from "./BlockList";import type { CustomFieldRef, PreviewEntity, SectionRef } from "./context";import {DocumentTemplateProvider,+ PickBlockProvider,useDocumentTemplate,useEditorStore} from "./context";@@ -94,59 +99,136 @@ export function DocumentTemplateEditor({hasWatermark={hasWatermark}initialLabelSizeId={initialLabelSizeId}>- <div className="flex h-full w-full min-w-0 flex-col bg-background">+ <div className="flex h-full w-full min-w-0 flex-col bg-background compact:h-[calc(100dvh-var(--topbar-height)-var(--content-inset,0px))]"><EditorToolbartitle={getDocumentLabel(documentType)}canEdit={canEdit}/><ConflictBanner documentType={documentType} />- <ResizablePanelGroup- direction="horizontal"- autoSaveId="document-template-editor"- className="flex-1 overflow-hidden"- >- {/* LEFT — blocks + theme */}- <ResizablePanel- id="rail"- order={1}- defaultSize={22}- minSize={16}- maxSize={34}- >- <ControlRail />- </ResizablePanel>+ <EditorPanes actionPath={actionPath} />+ </div>+ </DocumentTemplateProvider>+ );+}- <ResizableHandle withHandle />+/**+ * Desktop: rail / canvas / config side by side. Phones: one pane at a time+ * behind an underline tab row (the record-tabs pattern).+ */+function EditorPanes({ actionPath }: { actionPath: string }) {+ const isCompact = useCompact();+ if (isCompact) return <CompactEditorPanes actionPath={actionPath} />;- {/* CENTER — canvas */}- <ResizablePanel id="canvas" order={2} defaultSize={56} minSize={30}>- <div className="flex h-full min-w-0 flex-col bg-muted/40 p-6">- <TemplatePreview previewPath={`${actionPath}/preview`} />- </div>- </ResizablePanel>+ return (+ <ResizablePanelGroup+ direction="horizontal"+ autoSaveId="document-template-editor"+ className="flex-1 overflow-hidden"+ >+ {/* LEFT — blocks + theme */}+ <ResizablePanel+ id="rail"+ order={1}+ defaultSize={22}+ minSize={16}+ maxSize={34}+ >+ <ControlRail />+ </ResizablePanel>- <ResizableHandle withHandle />+ <ResizableHandle withHandle />- {/* RIGHT — contextual config, always present */}- <ResizablePanel- id="config"- order={3}- defaultSize={22}- minSize={16}- maxSize={34}- >- <ScrollArea className="h-full bg-card">- <div className="flex flex-col gap-1.5 p-3">- <Subheading as="h2" variant="heavy" className="block">- Configure- </Subheading>- <BlockConfig />- </div>- </ScrollArea>- </ResizablePanel>- </ResizablePanelGroup>+ {/* CENTER — canvas */}+ <ResizablePanel id="canvas" order={2} defaultSize={56} minSize={30}>+ <div className="flex h-full min-w-0 flex-col bg-muted/40 p-6">+ <TemplatePreview previewPath={`${actionPath}/preview`} />+ </div>+ </ResizablePanel>++ <ResizableHandle withHandle />++ {/* RIGHT — contextual config, always present */}+ <ResizablePanel+ id="config"+ order={3}+ defaultSize={22}+ minSize={16}+ maxSize={34}+ >+ <ScrollArea className="h-full bg-card">+ <div className="flex flex-col gap-1.5 p-3">+ <Subheading as="h2" variant="heavy" className="block">+ <Trans>Configure</Trans>+ </Subheading>+ <BlockConfig />+ </div>+ </ScrollArea>+ </ResizablePanel>+ </ResizablePanelGroup>+ );+}++type CompactPane = "canvas" | "rail" | "config";++function CompactEditorPanes({ actionPath }: { actionPath: string }) {+ const { t } = useLingui();+ const selectedId = useEditorStore((s) => s.selectedId);+ const select = useEditorStore((s) => s.select);+ const [pane, setPane] = useState<CompactPane>("canvas");++ // A newly added block opens its settings, as the desktop config rail does.+ useEffect(() => {+ if (selectedId) setPane("config");+ }, [selectedId]);+ // Tapping a row always opens its settings: the config sits on another tab,+ // so a second tap must not deselect it.+ const pickBlock = useCallback(+ (id: string) => {+ select(id);+ setPane("config");+ },+ [select]+ );++ const tabs: { id: CompactPane; label: string }[] = [+ { id: "canvas", label: t`Preview` },+ { id: "rail", label: t`Blocks` },+ { id: "config", label: t`Configure` }+ ];++ return (+ <div className="flex min-h-0 flex-1 flex-col">+ <CompactTabRow+ items={tabs.map((tab) => ({+ ...tab,+ active: pane === tab.id,+ onClick: () => setPane(tab.id)+ }))}+ />+ {/* Panes stay mounted (hidden) so the preview iframe keeps its state. */}+ <div className="relative min-h-0 flex-1">+ <div+ className={cn(+ "absolute inset-0 flex flex-col bg-muted/40 p-4",+ pane !== "canvas" && "hidden"+ )}+ >+ <TemplatePreview previewPath={`${actionPath}/preview`} />+ </div>+ <div className={cn("absolute inset-0", pane !== "rail" && "hidden")}>+ <PickBlockProvider value={pickBlock}>+ <ControlRail />+ </PickBlockProvider>+ </div>+ <div className={cn("absolute inset-0", pane !== "config" && "hidden")}>+ <ScrollArea className="h-full bg-card">+ <div className="flex flex-col gap-1.5 p-4">+ <BlockConfig />+ </div>+ </ScrollArea>+ </div></div>- </DocumentTemplateProvider>+ </div>);}@@ -171,7 +253,7 @@ function ControlRail() {{/* Fixed Blocks header with the inline add-block button. */}<div className="flex shrink-0 items-center justify-between px-3 pt-3 pb-1"><Subheading as="h2" variant="heavy" className="block">- Blocks+ <Trans>Blocks</Trans></Subheading><AddBlockMenu /></div>@@ -303,12 +385,12 @@ function EditorToolbar({const refreshPreview = useEditorStore((s) => s.refreshPreview);return (- <div className="flex items-center justify-between gap-3 border-b bg-card px-4 py-3">+ <div className="flex items-center justify-between gap-3 border-b bg-card px-4 py-3 compact:flex-wrap compact:gap-2"><div className="flex items-center gap-3"><Linkto={path.to.documentTemplates}aria-label="Back to documents"- className="flex size-8 items-center justify-center rounded-md border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"+ className="flex size-8 items-center justify-center rounded-md border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground compact:hidden"><LuArrowLeft className="size-4" /></Link>@@ -318,7 +400,7 @@ function EditorToolbar({</div></div>{previewEntities.length > 0 && (- <div className="flex min-w-0 max-w-[280px] flex-1 flex-col items-center gap-0.5 self-end">+ <div className="flex min-w-0 max-w-[280px] flex-1 flex-col items-center gap-0.5 self-end compact:order-last compact:basis-full compact:max-w-none compact:items-stretch compact:self-auto"><Subheading variant="heavy">Preview data</Subheading><Selectvalue={previewId ?? SAMPLE_DATA_VALUE}@@ -340,7 +422,7 @@ function EditorToolbar({</Select></div>)}- <div className="flex items-end gap-2">+ <div className="flex items-end gap-2 compact:ml-auto"><LabelSizePicker />{canEdit && (<>diff --git a/apps/erp/app/components/EditableNumberCell.tsx b/apps/erp/app/components/EditableNumberCell.tsxindex a71110c9c7..da5d9cdbb0 100644--- a/apps/erp/app/components/EditableNumberCell.tsx+++ b/apps/erp/app/components/EditableNumberCell.tsx@@ -72,7 +72,7 @@ function EditableNumberCell({className="group/edit flex w-full cursor-pointer items-center gap-1.5 text-left text-sm"><span>{display}</span>- <LuPencil className="size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/edit:opacity-100" />+ <LuPencil className="size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/edit:opacity-100 compact:opacity-100" /></button>);}diff --git a/apps/erp/app/components/Empty.tsx b/apps/erp/app/components/Empty.tsxindex 70bd9e2807..a1c48c6647 100644--- a/apps/erp/app/components/Empty.tsx+++ b/apps/erp/app/components/Empty.tsx@@ -17,8 +17,8 @@ export default function Empty({className={cn("w-full h-full justify-center items-center", className)}{...props}>- <LuCircleDashed className="size-8 text-muted-foreground" />- <h3 className="text-xs text-muted-foreground">+ <LuCircleDashed className="size-8 text-muted-foreground compact:size-[52px] compact:rounded-[14px] compact:bg-muted compact:p-3.5" />+ <h3 className="text-xs text-muted-foreground compact:mt-1 compact:text-[17px] compact:font-semibold compact:text-foreground"><Trans>Looks empty here</Trans> 👀</h3>{children}diff --git a/apps/erp/app/components/EnumerableGroup.tsx b/apps/erp/app/components/EnumerableGroup.tsxindex b94557502e..c0d8cfbd07 100644--- a/apps/erp/app/components/EnumerableGroup.tsx+++ b/apps/erp/app/components/EnumerableGroup.tsx@@ -7,7 +7,8 @@ import {cn,Popover,PopoverContent,- PopoverTrigger+ PopoverTrigger,+ useEnumerableAsText} from "@carbon/react";import { useLingui } from "@lingui/react/macro";import { Enumerable } from "./Enumerable";@@ -37,10 +38,21 @@ const EnumerableGroup = ({chipClassName}: EnumerableGroupProps) => {const { t } = useLingui();+ const asText = useEnumerableAsText();if (items.length === 0) return null;const visible = items.slice(0, limit);const overflow = items.slice(limit);+ // Phones, compact row context line: plain comma-joined text plus "+N".+ if (asText) {+ return (+ <span>+ {visible.map((item) => item.label).join(", ")}+ {overflow.length > 0 ? ` +${overflow.length}` : null}+ </span>+ );+ }+const renderChip = (item: EnumerableGroupItem) =>chip === "outline" ? (<Badgediff --git a/apps/erp/app/components/FileDropzone.tsx b/apps/erp/app/components/FileDropzone.tsxindex ac2b821411..ed2f991b39 100644--- a/apps/erp/app/components/FileDropzone.tsx+++ b/apps/erp/app/components/FileDropzone.tsx@@ -9,8 +9,8 @@ import {isHeic,MediaUploader} from "@carbon/files/media";-import { cn, toast } from "@carbon/react";-import { useLingui } from "@lingui/react/macro";+import { Button, cn, toast, useCompact } from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";import type React from "react";import { useState } from "react";import { useDropzone } from "react-dropzone";@@ -35,6 +35,7 @@ const FileDropzone: React.FC<FileDropzoneProps> = ({className = "mt-4"}) => {const { t } = useLingui();+ const isCompact = useCompact();const { carbon } = useCarbon();const { company } = useUser();const [isConverting, setIsConverting] = useState(false);@@ -65,13 +66,32 @@ const FileDropzone: React.FC<FileDropzoneProps> = ({};const isDisabled = disabled || isConverting;- const { getRootProps, getInputProps, isDragActive } = useDropzone({+ const { getRootProps, getInputProps, isDragActive, open } = useDropzone({onDrop: onDropWithConversion,accept,multiple,disabled: isDisabled});+ // Phones cannot drag files in: one Upload button opens the same picker.+ if (isCompact) {+ return (+ <div className={className}>+ <input {...getInputProps()} />+ <Button+ variant="secondary"+ size="lg"+ leftIcon={<LuCloudUpload />}+ isDisabled={isDisabled}+ className="w-full"+ onClick={() => open()}+ >+ <Trans>Upload</Trans>+ </Button>+ </div>+ );+ }+return (<div{...getRootProps()}diff --git a/apps/erp/app/components/Form/AddressAutocomplete.tsx b/apps/erp/app/components/Form/AddressAutocomplete.tsxindex 5d953bd574..d22713c464 100644--- a/apps/erp/app/components/Form/AddressAutocomplete.tsx+++ b/apps/erp/app/components/Form/AddressAutocomplete.tsx@@ -176,7 +176,7 @@ const AddressAutocomplete = ({className="bg-transparent"/>{open && suggestions.length > 0 && (- <CommandList className="absolute w-full top-10 z-[9999] rounded-md border bg-popover text-popover-foreground shadow-md p-0">+ <CommandList className="absolute w-full top-10 compact:top-11 z-[9999] rounded-md border bg-popover text-popover-foreground shadow-md p-0"><CommandEmpty>{loading ? t`Loading...` : t`No addresses found`}</CommandEmpty>diff --git a/apps/erp/app/components/Form/EmailRecipients.tsx b/apps/erp/app/components/Form/EmailRecipients.tsxindex 0dad2d0f5a..71d60103f0 100644--- a/apps/erp/app/components/Form/EmailRecipients.tsx+++ b/apps/erp/app/components/Form/EmailRecipients.tsx@@ -252,7 +252,7 @@ export default function EmailRecipients({<PopoverTrigger asChild><divclassName={cn(- "flex flex-wrap gap-1 min-h-10 w-full rounded-md border bg-transparent px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 cursor-text",+ "flex flex-wrap gap-1 min-h-10 w-full rounded-md border bg-transparent px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 cursor-text compact:min-h-11 compact:text-base",inputError ? "border-destructive" : "border-input")}onClick={(e) => {@@ -300,7 +300,7 @@ export default function EmailRecipients({placeholder={emails.length === 0 ? "Search or enter email..." : ""}- className="flex-1 min-w-[120px] bg-transparent outline-none placeholder:text-muted-foreground"+ className="flex-1 min-w-[120px] bg-transparent outline-none placeholder:text-muted-foreground compact:text-base"/></div></PopoverTrigger>diff --git a/apps/erp/app/components/Form/SequenceOrCustomId.tsx b/apps/erp/app/components/Form/SequenceOrCustomId.tsxindex b5857b0aa2..613f236c95 100644--- a/apps/erp/app/components/Form/SequenceOrCustomId.tsx+++ b/apps/erp/app/components/Form/SequenceOrCustomId.tsx@@ -79,7 +79,7 @@ const SequenceOrCustomId = forwardRef<<Buttonsize="md"variant="outline"- className="flex-grow bg-transparent text-muted-foreground justify-start pr-4 h-10 w-full hover:scale-100 focus-visible:scale-100"+ className="flex-grow bg-transparent text-muted-foreground justify-start pr-4 h-10 w-full hover:scale-100 focus-visible:scale-100 compact:h-11 compact:text-base">{placeholder}</Button>@@ -88,7 +88,8 @@ const SequenceOrCustomId = forwardRef<aria-label={t`Toggle`}className={cn("bg-card absolute right-0 top-0",- "flex-shrink-0 h-10 w-10 px-3 rounded-l-none before:rounded-l-none border-none -ml-px shadow-button-base"+ "flex-shrink-0 h-10 w-10 px-3 rounded-l-none before:rounded-l-none border-none -ml-px shadow-button-base",+ "compact:h-11 compact:w-11")}icon={isCustom ? <LuToggleLeft /> : <LuToggleRight />}variant="secondary"diff --git a/apps/erp/app/components/Gantt/Gantt.tsx b/apps/erp/app/components/Gantt/Gantt.tsxindex 46bfaf877f..4af1eb23b1 100644--- a/apps/erp/app/components/Gantt/Gantt.tsx+++ b/apps/erp/app/components/Gantt/Gantt.tsx@@ -25,6 +25,7 @@ import {Tooltip,TooltipContent,TooltipTrigger,+ useCompact,useDebounce,useShortcutKeys} from "@carbon/react";@@ -171,6 +172,7 @@ const Gantt = ({axisTickMs}: GanttProps) => {const { t } = useLingui();+ const isCompact = useCompact();const [filterText, setFilterText] = useState("");const [wipOnly, setWipOnly] = useState(false);const [showDurations, setShowDurations] = useState(false);@@ -232,11 +234,139 @@ const Gantt = ({}});+ // Defined once: desktop puts these in resizable panels, phones in a fixed row.+ const treePanel = (+ <div className="grid h-full grid-rows-[2rem_1fr] overflow-hidden">+ <div className="flex items-center pr-2">+ {parentReadableId && (+ <ShowParentLink ganttReadableId={parentReadableId} />+ )}+ <LiveReloadingStatus+ rootSpanCompleted={rootSpanStatus !== "inprogress"}+ />+ </div>+ <TreeView+ parentRef={parentRef}+ scrollRef={treeScrollRef}+ virtualizer={virtualizer}+ autoFocus+ tree={events}+ nodes={nodes}+ getNodeProps={getNodeProps}+ getTreeProps={getTreeProps}+ renderNode={({ node, state }) => (+ <>+ <div+ className={cn(+ "group flex h-8 cursor-pointer items-center overflow-hidden rounded-l-sm pr-2",+ state.selected ? "bg-muted" : "bg-transparent hover:bg-muted/60"+ )}+ onClick={() => {+ selectNode(node.id);+ }}+ >+ <div className="flex h-8 items-center">+ {Array.from({ length: node.level }).map((_, index) => (+ <LevelLine+ key={index}+ isError={node.data.isError}+ isSelected={state.selected}+ />+ ))}+ <div+ className={cn(+ "flex h-8 w-4 items-center",+ node.hasChildren && "hover:bg-muted"+ )}+ onClick={(e) => {+ e.stopPropagation();+ if (e.altKey) {+ if (state.expanded) {+ collapseAllBelowDepth(node.level);+ } else {+ expandAllBelowDepth(node.level);+ }+ } else {+ toggleExpandNode(node.id);+ }+ scrollToNode(node.id);+ }}+ >+ {node.hasChildren ? (+ state.expanded ? (+ <LuChevronDown className="size-4 text-muted-foreground" />+ ) : (+ <LuChevronRight className="size-4 text-muted-foreground" />+ )+ ) : (+ <div className="h-8 w-4" />+ )}+ </div>+ </div>++ <div className="flex w-full items-center justify-between gap-2 pl-1 compact:min-w-0">+ <div className="flex items-center gap-2 overflow-x-hidden compact:min-w-0">+ <GanttIcon+ name={node.data.style?.icon}+ className="size-4 min-h-4 min-w-4"+ />+ <NodeText node={node} />+ {node.data.isRoot && (+ <Badge variant="outline" className="text-xs">+ <Trans>Job</Trans>+ </Badge>+ )}+ </div>+ <div className="flex items-center gap-1">+ {renderNodeAside?.(node)}+ <span className="contents compact:hidden">+ <NodeStatusIcon node={node} />+ </span>+ </div>+ </div>+ </div>+ </>+ )}+ onScroll={(scrollTop) => {+ //sync the scroll to the tree+ if (timelineScrollRef.current) {+ timelineScrollRef.current.scrollTop = scrollTop;+ }+ }}+ />+ </div>+ );+ const timelinePanel = (+ <GanttTimeline+ totalDuration={totalDuration}+ scale={scale}+ events={events}+ rootSpanStatus={rootSpanStatus}+ rootStartedAt={rootStartedAt}+ axis={axis}+ windowStartMs={windowStartMs}+ formatAxisTick={formatAxisTick}+ nowMs={nowMs}+ nonWorkingIntervals={nonWorkingIntervals}+ tickIntervalMs={tickIntervalMs}+ axisTickMs={axisTickMs}+ parentRef={parentRef}+ timelineScrollRef={timelineScrollRef}+ nodes={nodes}+ getNodeProps={getNodeProps}+ getTreeProps={getTreeProps}+ showDurations={showDurations}+ treeScrollRef={treeScrollRef}+ virtualizer={virtualizer}+ toggleNodeSelection={toggleNodeSelection}+ />+ );+return (- <div className="grid h-full grid-rows-[2.5rem_1fr_3.25rem] overflow-hidden">- <div className="flex items-center justify-between gap-2 border-b border-border">+ <div className="grid h-full grid-rows-[2.5rem_1fr_3.25rem] overflow-hidden compact:grid-cols-[minmax(0,1fr)]">+ <div className="flex items-center justify-between gap-2 border-b border-border compact:overflow-x-auto compact:scroll-fade-x"><SearchField onChange={setFilterText} />- <div className="flex items-center gap-3 pr-2">+ <div className="flex items-center gap-3 pr-2 compact:shrink-0">{toolbarAccessory}<Switchvariant="small"@@ -244,16 +374,29 @@ const Gantt = ({checked={wipOnly}onCheckedChange={(e) => setWipOnly(e.valueOf())}/>- <Switch- variant="small"- label={t`Show Durations`}- checked={showDurations}- onCheckedChange={(e) => setShowDurations(e.valueOf())}- />+ {/* Phones have no hover, so their bars always show durations. */}+ {!isCompact && (+ <Switch+ variant="small"+ label={t`Show Durations`}+ checked={showDurations}+ onCheckedChange={(e) => setShowDurations(e.valueOf())}+ />+ )}</div></div><div ref={panelGroupRef} className="h-full w-full min-h-0">- {treeDefaultSize !== undefined && (+ {/* Phones: a fixed tree column beside the timeline, which keeps its+ own sideways scroll. */}+ {isCompact && (+ <div className="flex h-full w-full">+ <div className="h-full w-[118px] shrink-0 overflow-hidden border-r border-border pl-3">+ {treePanel}+ </div>+ <div className="h-full min-w-0 flex-1">{timelinePanel}</div>+ </div>+ )}+ {!isCompact && treeDefaultSize !== undefined && (<ResizablePanelGroupdirection="horizontal"onLayout={(layout) => {@@ -268,107 +411,7 @@ const Gantt = ({defaultSize={treeDefaultSize}className="pl-3">- <div className="grid h-full grid-rows-[2rem_1fr] overflow-hidden">- <div className="flex items-center pr-2">- {parentReadableId && (- <ShowParentLink ganttReadableId={parentReadableId} />- )}- <LiveReloadingStatus- rootSpanCompleted={rootSpanStatus !== "inprogress"}- />- </div>- <TreeView- parentRef={parentRef}- scrollRef={treeScrollRef}- virtualizer={virtualizer}- autoFocus- tree={events}- nodes={nodes}- getNodeProps={getNodeProps}- getTreeProps={getTreeProps}- renderNode={({ node, state }) => (- <>- <div- className={cn(- "group flex h-8 cursor-pointer items-center overflow-hidden rounded-l-sm pr-2",- state.selected- ? "bg-muted"- : "bg-transparent hover:bg-muted/60"- )}- onClick={() => {- selectNode(node.id);- }}- >- <div className="flex h-8 items-center">- {Array.from({ length: node.level }).map(- (_, index) => (- <LevelLine- key={index}- isError={node.data.isError}- isSelected={state.selected}- />- )- )}- <div- className={cn(- "flex h-8 w-4 items-center",- node.hasChildren && "hover:bg-muted"- )}- onClick={(e) => {- e.stopPropagation();- if (e.altKey) {- if (state.expanded) {- collapseAllBelowDepth(node.level);- } else {- expandAllBelowDepth(node.level);- }- } else {- toggleExpandNode(node.id);- }- scrollToNode(node.id);- }}- >- {node.hasChildren ? (- state.expanded ? (- <LuChevronDown className="size-4 text-muted-foreground" />- ) : (- <LuChevronRight className="size-4 text-muted-foreground" />- )- ) : (- <div className="h-8 w-4" />- )}- </div>- </div>-- <div className="flex w-full items-center justify-between gap-2 pl-1">- <div className="flex items-center gap-2 overflow-x-hidden">- <GanttIcon- name={node.data.style?.icon}- className="size-4 min-h-4 min-w-4"- />- <NodeText node={node} />- {node.data.isRoot && (- <Badge variant="outline" className="text-xs">- <Trans>Job</Trans>- </Badge>- )}- </div>- <div className="flex items-center gap-1">- {renderNodeAside?.(node)}- <NodeStatusIcon node={node} />- </div>- </div>- </div>- </>- )}- onScroll={(scrollTop) => {- //sync the scroll to the tree- if (timelineScrollRef.current) {- timelineScrollRef.current.scrollTop = scrollTop;- }- }}- />- </div>+ {treePanel}</ResizablePanel><ResizableHandle withHandle />{/* Timeline — takes whatever the tree leaves */}@@ -377,29 +420,7 @@ const Gantt = ({minSize={20}defaultSize={100 - treeDefaultSize}>- <GanttTimeline- totalDuration={totalDuration}- scale={scale}- events={events}- rootSpanStatus={rootSpanStatus}- rootStartedAt={rootStartedAt}- axis={axis}- windowStartMs={windowStartMs}- formatAxisTick={formatAxisTick}- nowMs={nowMs}- nonWorkingIntervals={nonWorkingIntervals}- tickIntervalMs={tickIntervalMs}- axisTickMs={axisTickMs}- parentRef={parentRef}- timelineScrollRef={timelineScrollRef}- nodes={nodes}- getNodeProps={getNodeProps}- getTreeProps={getTreeProps}- showDurations={showDurations}- treeScrollRef={treeScrollRef}- virtualizer={virtualizer}- toggleNodeSelection={toggleNodeSelection}- />+ {timelinePanel}</ResizablePanel></ResizablePanelGroup>)}@@ -414,7 +435,7 @@ const Gantt = ({setShowDurations={setShowDurations}/></div>- <div className="@[42rem]:hidden">+ <div className="@[42rem]:hidden compact:hidden"><Popover><PopoverTrigger className="text-sm"><Trans>Shortcuts</Trans>@@ -646,10 +667,12 @@ const GanttTimeline = ({// start hugs the left, one at the very end hugs the// right, everything between (e.g. a week's mid-week// day ticks, which don't reach the edge) is centered.+ // Phones drop the edge labels: ticks are too close+ // for them not to collide with their neighbours.tickMs <= 0- ? "ml-1"+ ? "ml-1 compact:hidden": tickMs >= duration * 0.98- ? "-ml-1 -translate-x-full"+ ? "-ml-1 -translate-x-full compact:hidden": "-translate-x-1/2")}>@@ -675,9 +698,9 @@ const GanttTimeline = ({className={cn("whitespace-nowrap",index === 0- ? "ml-1"+ ? "ml-1 compact:hidden": index === TICK_COUNT - 1- ? "-ml-1 -translate-x-full"+ ? "-ml-1 -translate-x-full compact:hidden": "-translate-x-1/2")}>@@ -929,7 +952,7 @@ const GanttTimeline = ({};function NodeText({ node }: { node: GanttEvent }) {- const className = "line-clamp-1";+ const className = "line-clamp-1 compact:min-w-0";return (<Paragraph variant="small" className={cn(className)}><SpanTitle {...node.data} size="small" />@@ -1179,7 +1202,7 @@ function SpanWithDuration({<divclassName={cn("sticky left-0 z-10 transition group-hover:opacity-100",- !showDuration && "opacity-0"+ !showDuration && "opacity-0 compact:opacity-100")}><div className="rounded-sm bg-black/40 px-1 py-0.5 text-xxs font-medium text-white tabular-nums">@@ -1362,7 +1385,10 @@ function SearchField({ onChange }: { onChange: (value: string) => void }) {};return (- <InputGroup insetRing className="border-transparent rounded-none ring-0">+ <InputGroup+ insetRing+ className="border-transparent rounded-none ring-0 compact:min-w-[140px] compact:w-[160px] compact:shrink-0"+ ><InputLeftElement><LuSearch className="h-4 w-4 text-muted-foreground" /></InputLeftElement>diff --git a/apps/erp/app/components/Gantt/components/SpanTitle.tsx b/apps/erp/app/components/Gantt/components/SpanTitle.tsxindex f84e48083e..51e586389e 100644--- a/apps/erp/app/components/Gantt/components/SpanTitle.tsx+++ b/apps/erp/app/components/Gantt/components/SpanTitle.tsx@@ -24,7 +24,7 @@ export function SpanTitle(event: SpanTitleProps) {eventTextClassName(event))}>- <span className="truncate">{event.message}</span>{" "}+ <span className="truncate compact:max-w-full">{event.message}</span>{" "}<SpanAccessory accessory={event.style.accessory} size={event.size} /></span>);@@ -55,7 +55,7 @@ function SpanAccessory({}default: {return (- <div className={cn("flex gap-1")}>+ <div className={cn("flex gap-1", "compact:min-w-0 compact:truncate")}>{accessory.items.map((item, index) => (<span key={index} className={cn("inline-flex items-center gap-1")}>{item.text}diff --git a/apps/erp/app/components/Grid/Grid.tsx b/apps/erp/app/components/Grid/Grid.tsxindex 0e03214f4d..aa33be6cb5 100644--- a/apps/erp/app/components/Grid/Grid.tsx+++ b/apps/erp/app/components/Grid/Grid.tsx@@ -346,7 +346,7 @@ const Grid = <T extends object>({<VStack spacing={0} className="h-full w-full"><divclassName={cn(- "w-full h-full overflow-x-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent",+ "w-full h-full overflow-x-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent compact:scroll-fade-x",contained ? "" : "relative")}ref={tableContainerRef}diff --git a/apps/erp/app/components/Hyperlink.tsx b/apps/erp/app/components/Hyperlink.tsxindex fdc40c347f..a4d74a2945 100644--- a/apps/erp/app/components/Hyperlink.tsx+++ b/apps/erp/app/components/Hyperlink.tsx@@ -23,12 +23,15 @@ const Hyperlink = ({<span className="contents"><PrefetchLinkclassName={cn(- "group/hyperlink text-foreground font-medium cursor-pointer flex flex-row items-center justify-start gap-3",+ "group/hyperlink text-foreground font-medium cursor-pointer flex flex-row items-center justify-start gap-3 compact:min-w-0",className)}{...props}>- <span className="flex flex-row items-center gap-1">{children}</span>+ {/* Phones: a block so long names end in an ellipsis (flex boxes clip). */}+ <span className="flex flex-row items-center gap-1 compact:block compact:min-w-0 compact:truncate">+ {children}+ </span>{props.to && props.to !== "#" && (<ButtonrightIcon={<LuPanelRight />}@@ -37,7 +40,7 @@ const Hyperlink = ({// click navigates in-tab, a Cmd/Ctrl (or middle) click opens a new tab.// A real <button> here would otherwise swallow the anchor's native// modifier-click behavior and always open in the same tab.- className="flex-shrink-0 opacity-0 transition-opacity duration-200 group-hover/hyperlink:opacity-100 no-underline pointer-events-none"+ className="flex-shrink-0 opacity-0 transition-opacity duration-200 group-hover/hyperlink:opacity-100 no-underline pointer-events-none compact:hidden compact:opacity-100"size="sm"tabIndex={-1}>diff --git a/apps/erp/app/components/Icons.tsx b/apps/erp/app/components/Icons.tsxindex 1f91c6d202..ddac69cc49 100644--- a/apps/erp/app/components/Icons.tsx+++ b/apps/erp/app/components/Icons.tsx@@ -179,7 +179,7 @@ export function MethodBadge({ type, text, to, className }: MethodBadgeProps) {<MethodIcon type={type} className="w-3 h-3 mr-1 " />{text}</Badge>- <span className="group-hover:opacity-100 opacity-0 transition-opacity duration-200 w-4 h-4 text-foreground">+ <span className="group-hover:opacity-100 opacity-0 transition-opacity duration-200 w-4 h-4 text-foreground compact:opacity-100"><LuExternalLink /></span></PrefetchLink>diff --git a/apps/erp/app/components/ItemThumbnail.tsx b/apps/erp/app/components/ItemThumbnail.tsxindex fb1d50964a..227a0c8e25 100644--- a/apps/erp/app/components/ItemThumbnail.tsx+++ b/apps/erp/app/components/ItemThumbnail.tsx@@ -88,13 +88,14 @@ const ItemThumbnail = ({loading="lazy"decoding="async"alt="thumbnail"+ data-thumbnail={size}className={itemVariants({ size, withPadding: false })}key={thumbnailPath}onError={() => setFailedPath(thumbnailPath)}src={getPrivateUrl(thumbnailPath)}/>) : (- <div className={cn(itemVariants({ size }))}>+ <div data-thumbnail={size} className={cn(itemVariants({ size }))}>{type ? (<MethodItemTypeIcon className={iconVariants({ size })} type={type} />) : (diff --git a/apps/erp/app/components/Layout/CompactTabRow.tsx b/apps/erp/app/components/Layout/CompactTabRow.tsxnew file mode 100644index 0000000000..21132125fc--- /dev/null+++ b/apps/erp/app/components/Layout/CompactTabRow.tsx@@ -0,0 +1,86 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { Count, cn, PrefetchLink } from "@carbon/react";+import type { ReactNode } from "react";+import { useEffect, useRef } from "react";++export type CompactTabItem = {+ id: string;+ label: ReactNode;+ active: boolean;+ /** A link tab; `onClick` still runs on tap. */+ to?: string;+ onClick?: () => void;+ count?: number;+};++const tabClassName =+ "relative flex min-h-11 min-w-11 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-[15px] font-medium text-muted-foreground outline-none after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full data-[active=true]:text-foreground data-[active=true]:after:bg-foreground";++/** Phones: a horizontally scrolling underline tab row. */+export function CompactTabRow({+ items,+ className+}: {+ items: CompactTabItem[];+ className?: string;+}) {+ const rowRef = useRef<HTMLDivElement>(null);+ const activeId = items.find((item) => item.active)?.id;++ // Keep the current tab in view in the scrolling row.+ // biome-ignore lint/correctness/useExhaustiveDependencies: re-run when the active tab changes+ useEffect(() => {+ rowRef.current+ ?.querySelector('[data-active="true"]')+ ?.scrollIntoView({ block: "nearest", inline: "center" });+ }, [activeId]);++ return (+ <div+ ref={rowRef}+ role="tablist"+ className={cn(+ "flex shrink-0 gap-5 overflow-x-auto scrollbar-hide scroll-fade-x border-b border-border bg-card px-4",+ className+ )}+ >+ {items.map((item) => {+ const content = (+ <>+ <span>{item.label}</span>+ {item.count !== undefined && <Count count={item.count} />}+ </>+ );+ return item.to ? (+ <PrefetchLink+ key={item.id}+ to={item.to}+ role="tab"+ data-active={item.active}+ aria-selected={item.active}+ aria-current={item.active ? "page" : undefined}+ className={tabClassName}+ onClick={item.onClick}+ >+ {content}+ </PrefetchLink>+ ) : (+ <button+ key={item.id}+ type="button"+ role="tab"+ data-active={item.active}+ aria-selected={item.active}+ className={tabClassName}+ onClick={item.onClick}+ >+ {content}+ </button>+ );+ })}+ </div>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/ChromeSlots.tsx b/apps/erp/app/components/Layout/Mobile/ChromeSlots.tsxnew file mode 100644index 0000000000..e5244f53be--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/ChromeSlots.tsx@@ -0,0 +1,81 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { useCompact } from "@carbon/react";+import type { ReactNode } from "react";+import { Children, useEffect, useState } from "react";+import { createPortalSlot } from "./slots";++/**+ * Pages put controls into the compact app bar and bottom bar through these+ * slots, so the shell needs no props. Desktop renders nothing.+ */+const appBarActionsSlot = createPortalSlot();+const bottomBarSlot = createPortalSlot();++/** Where <AppBarActions> render: the right of the compact app bar. */+export const AppBarActionsTarget = appBarActionsSlot.Target;++/** True while any <BottomBar> is mounted; the tab bar hides then. */+export const useBottomBarActive = bottomBarSlot.useFilled;++const MAX_APP_BAR_ACTIONS = 2;++/** Up to two controls on the right of the compact app bar. */+export function AppBarActions({ children }: { children: ReactNode }) {+ if (+ process.env.NODE_ENV !== "production" &&+ Children.count(children) > MAX_APP_BAR_ACTIONS+ ) {+ // biome-ignore lint/suspicious/noConsole: dev-only authoring warning+ console.warn("[AppBarActions] the app bar holds at most 2 actions");+ }+ return <appBarActionsSlot.Fill>{children}</appBarActionsSlot.Fill>;+}++/** A compact bottom bar (action bar or bulk bar) that replaces the tab bar. */+export const BottomBar = bottomBarSlot.Fill;++/**+ * Publish an element's height as a CSS variable on <html> while compact, so+ * the app's existing `calc(100dvh - var(--…))` frames fit between the bars.+ * Removed on desktop, where the stylesheet values apply unchanged.+ */+export function useCompactCssVar(+ name: "--header-height" | "--hero-height" | "--content-inset",+ element: HTMLElement | null+) {+ const isCompact = useCompact();+ useEffect(() => {+ if (!isCompact || !element) return;+ const root = document.documentElement;+ const write = () =>+ root.style.setProperty(+ name,+ `${element.getBoundingClientRect().height}px`+ );+ write();+ const observer = new ResizeObserver(write);+ observer.observe(element);+ return () => {+ observer.disconnect();+ root.style.removeProperty(name);+ };+ }, [isCompact, element, name]);+}++/**+ * The shell's bottom chrome: the target for <BottomBar> and the tab bar. Its+ * height becomes `--content-inset`, so full-height pages end above it.+ */+export function MobileBottomChrome({ children }: { children: ReactNode }) {+ const [element, setElement] = useState<HTMLElement | null>(null);+ useCompactCssVar("--content-inset", element);+ return (+ <div ref={setElement} className="md:hidden shrink-0">+ <bottomBarSlot.Target className="empty:hidden" />+ {children}+ </div>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/CreateSheet.tsx b/apps/erp/app/components/Layout/Mobile/CreateSheet.tsxnew file mode 100644index 0000000000..3b3a7012ca--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/CreateSheet.tsx@@ -0,0 +1,49 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ BottomSheet,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle,+ PrefetchLink+} from "@carbon/react";+import { Trans } from "@lingui/react/macro";+import { useCreate } from "../Topbar/CreateMenu";+import { SheetRowContent, sheetRowClassName } from "./SheetRow";++/** The tab bar's Create sheet: the desktop Create menu's items, same order. */+export function CreateSheet({+ open,+ onOpenChange+}: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+}) {+ const items = useCreate();+ return (+ <BottomSheet open={open} onOpenChange={onOpenChange}>+ <BottomSheetContent>+ <BottomSheetHeader>+ <BottomSheetTitle>+ <Trans>Create</Trans>+ </BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody className="px-2">+ {items.map((item) => (+ <PrefetchLink+ key={item.to}+ to={item.to}+ className={sheetRowClassName}+ onClick={() => onOpenChange(false)}+ >+ <SheetRowContent icon={item.icon} label={item.name} />+ </PrefetchLink>+ ))}+ </BottomSheetBody>+ </BottomSheetContent>+ </BottomSheet>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/MobileAppBar.tsx b/apps/erp/app/components/Layout/Mobile/MobileAppBar.tsxnew file mode 100644index 0000000000..3babaa431f--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/MobileAppBar.tsx@@ -0,0 +1,125 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { Button, cn } from "@carbon/react";+import { useLingui } from "@lingui/react/macro";+import { useEffect, useState } from "react";+import { LuChevronDown, LuChevronLeft } from "react-icons/lu";+import { Link, useLocation } from "react-router";+import { SidebarPresentationProvider } from "../Navigation/SidebarPresentation";+import { AppBarActionsTarget } from "./ChromeSlots";+import { SectionSwitcherSheet } from "./SectionSwitcherSheet";+import { useAppBar } from "./useAppBar";++function scrollMainToTop() {+ document.querySelector("main")?.scrollTo({ top: 0, behavior: "smooth" });+}++/**+ * The compact app bar: ‹ Back on pushed screens, the title (a section+ * switcher ▾ on root screens with a module sidebar) and up to two page+ * actions from <AppBarActions>. Hidden at md and above.+ */+export function MobileAppBar() {+ const { t } = useLingui();+ const { title, subtitle, backTo, kind, trailing, moduleTitle, Sidebar } =+ useAppBar();+ const [switcherOpen, setSwitcherOpen] = useState(false);+ const location = useLocation();++ // Picking a section navigates; any navigation closes the switcher.+ // biome-ignore lint/correctness/useExhaustiveDependencies: close on navigation only+ useEffect(() => {+ setSwitcherOpen(false);+ }, [location.pathname, location.search]);+ const canSwitch = kind === "root" && Boolean(Sidebar);++ // On a section root the title names the section the switcher ticks (the+ // sidebar's own active rule); it falls back to the breadcrumb when the+ // sidebar has no active item (e.g. the module landing).+ const sectionTitle =+ canSwitch && Sidebar ? (+ <SidebarPresentationProvider value="title">+ <Sidebar />+ </SidebarPresentationProvider>+ ) : null;+ const titleText = (+ <span className="min-w-0 max-w-full truncate text-[17px] font-semibold leading-tight">+ {sectionTitle ? (+ <>+ <span className="peer empty:hidden">{sectionTitle}</span>+ <span className="peer-[:not(:empty)]:hidden">{title}</span>+ </>+ ) : (+ title+ )}+ </span>+ );++ return (+ <header className="md:hidden sticky top-0 z-20 flex h-[calc(52px+env(safe-area-inset-top))] shrink-0 items-center gap-1 border-b border-border bg-card/92 px-1 pt-safe backdrop-blur">+ {kind === "pushed" && backTo ? (+ <Button+ asChild+ isIcon+ variant="ghost"+ size="lg"+ aria-label={t`Back`}+ className="shrink-0"+ >+ <Link to={backTo}>+ <LuChevronLeft className="size-6" />+ </Link>+ </Button>+ ) : (+ <span className="w-2 shrink-0" />+ )}++ {canSwitch ? (+ <button+ type="button"+ onClick={() => setSwitcherOpen(true)}+ aria-haspopup="dialog"+ className="flex min-h-11 min-w-0 items-center gap-1 rounded-lg px-1 text-foreground outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50"+ >+ {titleText}+ <LuChevronDown className="size-5 shrink-0 text-muted-foreground" />+ </button>+ ) : (+ <button+ type="button"+ onClick={scrollMainToTop}+ className={cn(+ "flex min-h-11 min-w-0 flex-col items-start justify-center px-1 text-left text-foreground outline-none"+ )}+ >+ {titleText}+ {subtitle ? (+ <span className="min-w-0 max-w-full truncate text-xs text-muted-foreground">+ {subtitle}+ </span>+ ) : null}+ </button>+ )}++ <div className="flex-1" />+ <AppBarActionsTarget+ className={cn(+ "flex shrink-0 items-center",+ kind === "selection" && "hidden"+ )}+ />+ {trailing}++ {canSwitch && Sidebar ? (+ <SectionSwitcherSheet+ open={switcherOpen}+ onOpenChange={setSwitcherOpen}+ title={moduleTitle}+ Sidebar={Sidebar}+ />+ ) : null}+ </header>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/MobileTabBar.tsx b/apps/erp/app/components/Layout/Mobile/MobileTabBar.tsxnew file mode 100644index 0000000000..1840f93fe7--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/MobileTabBar.tsx@@ -0,0 +1,156 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { cn } from "@carbon/react";+import { useLingui } from "@lingui/react/macro";+import type { ReactNode } from "react";+import { useEffect, useState } from "react";+import { LuHouse, LuLayoutGrid, LuSearch, LuSquarePen } from "react-icons/lu";+import { Link, useLocation } from "react-router";+import { Avatar } from "~/components";+import { useUser } from "~/hooks";+import { useUIStore } from "~/stores/ui";+import { path } from "~/utils/path";+import { useBottomBarActive } from "./ChromeSlots";+import { CreateSheet } from "./CreateSheet";+import { ModulesSheet } from "./ModulesSheet";+import { ProfileSheet } from "./ProfileSheet";+import { useAppBar } from "./useAppBar";++const tabClassName =+ "flex min-h-11 min-w-0 flex-1 flex-col items-center justify-center gap-0.5 text-[10.5px] font-medium leading-none outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50";++function Tab({+ icon,+ label,+ isActive+}: {+ icon: ReactNode;+ label: string;+ isActive?: boolean;+}) {+ return (+ <>+ <span+ className={cn(+ "flex size-6 items-center justify-center [&>svg]:size-5",+ isActive ? "text-foreground" : "text-muted-foreground"+ )}+ >+ {icon}+ </span>+ <span+ className={cn(+ "max-w-full truncate",+ isActive ? "text-foreground" : "text-muted-foreground"+ )}+ >+ {label}+ </span>+ </>+ );+}++/**+ * The compact tab bar: Home, Search, Create, Modules, Profile — each+ * an existing desktop control. Shown on root screens only; a page's bottom+ * bar (action or bulk bar) replaces it. Hidden at md and above.+ */+export function MobileTabBar() {+ const { t } = useLingui();+ const { kind } = useAppBar();+ const bottomBarActive = useBottomBarActive();+ const { pathname } = useLocation();+ const user = useUser();+ const openSearchModal = useUIStore((s) => s.openSearchModal);+ const [sheet, setSheet] = useState<"create" | "modules" | "profile" | null>(+ null+ );+ const setOpen = (name: typeof sheet) => (open: boolean) =>+ setSheet(open ? name : null);++ // Any navigation closes the open sheet.+ // biome-ignore lint/correctness/useExhaustiveDependencies: close on navigation only+ useEffect(() => {+ setSheet(null);+ }, [pathname]);++ const hidden = kind === "pushed" || bottomBarActive;+ const isHome = pathname === path.to.authenticatedRoot;++ return (+ <>+ <nav+ aria-label={t`Main`}+ className={cn(+ "md:hidden flex shrink-0 items-stretch border-t border-border bg-card/92 px-1 pt-1 pb-safe backdrop-blur",+ hidden && "hidden"+ )}+ >+ <Link+ to={path.to.authenticatedRoot}+ className={tabClassName}+ aria-current={isHome ? "page" : undefined}+ >+ <Tab icon={<LuHouse />} label={t`Home`} isActive={isHome} />+ </Link>+ <button+ type="button"+ className={tabClassName}+ onClick={openSearchModal}+ >+ <Tab icon={<LuSearch />} label={t`Search`} />+ </button>+ <button+ type="button"+ className={tabClassName}+ onClick={() => setSheet("create")}+ >+ <Tab+ icon={<LuSquarePen />}+ label={t`Create`}+ isActive={sheet === "create"}+ />+ </button>+ <button+ type="button"+ className={tabClassName}+ onClick={() => setSheet("modules")}+ >+ <Tab+ icon={<LuLayoutGrid />}+ label={t`Modules`}+ isActive={sheet === "modules"}+ />+ </button>+ <button+ type="button"+ className={tabClassName}+ onClick={() => setSheet("profile")}+ >+ <Tab+ icon={+ <Avatar+ path={user.avatarUrl}+ name={`${user.firstName} ${user.lastName}`}+ size="xs"+ />+ }+ label={t`Profile`}+ isActive={sheet === "profile"}+ />+ </button>+ </nav>+ <CreateSheet open={sheet === "create"} onOpenChange={setOpen("create")} />+ <ModulesSheet+ open={sheet === "modules"}+ onOpenChange={setOpen("modules")}+ />+ <ProfileSheet+ open={sheet === "profile"}+ onOpenChange={setOpen("profile")}+ />+ </>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/ModulesSheet.tsx b/apps/erp/app/components/Layout/Mobile/ModulesSheet.tsxnew file mode 100644index 0000000000..91cd95d565--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/ModulesSheet.tsx@@ -0,0 +1,74 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ BottomSheet,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle,+ PrefetchLink+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import { ModuleCard } from "~/components/ModuleCard";+import {+ getImplementationNavItem,+ ImplementationData+} from "~/hooks/useImplementationNavItem";+import { useModules, useSettingsModule } from "~/hooks/useModules";+import { SheetRowContent, sheetRowClassName } from "./SheetRow";++/**+ * The tab bar's Modules sheet: the desktop rail's items in rail order —+ * Get Started while onboarding, the module tiles, then Settings.+ */+export function ModulesSheet({+ open,+ onOpenChange+}: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+}) {+ const { i18n } = useLingui();+ const modules = useModules();+ const settingsModule = useSettingsModule();+ return (+ <BottomSheet open={open} onOpenChange={onOpenChange}>+ <BottomSheetContent>+ <BottomSheetHeader>+ <BottomSheetTitle>+ <Trans>Modules</Trans>+ </BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody>+ <div className="grid grid-cols-3 gap-3 sm:grid-cols-4">+ <ImplementationData>+ {(data) => {+ const item = getImplementationNavItem(data, i18n);+ return item ? <ModuleCard module={item} /> : null;+ }}+ </ImplementationData>+ {modules.map((module) => (+ <ModuleCard key={module.key} module={module} />+ ))}+ </div>+ {settingsModule ? (+ <div className="mt-4 border-t border-border pt-2">+ <PrefetchLink+ to={settingsModule.to}+ className={sheetRowClassName}+ >+ <SheetRowContent+ icon={<settingsModule.icon />}+ label={settingsModule.name}+ trailing="drill"+ />+ </PrefetchLink>+ </div>+ ) : null}+ </BottomSheetBody>+ </BottomSheetContent>+ </BottomSheet>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/ProfileSheet.tsx b/apps/erp/app/components/Layout/Mobile/ProfileSheet.tsxnew file mode 100644index 0000000000..931ecdfcf5--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/ProfileSheet.tsx@@ -0,0 +1,370 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { CONTROLLED_ENVIRONMENT } from "@carbon/auth";+import {+ Avatar as AvatarBase,+ BottomSheet,+ BottomSheetBack,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle,+ cn,+ ItarDisclosure,+ PrefetchLink,+ useMode+} from "@carbon/react";+import { themes } from "@carbon/utils";+import { Trans, useLingui } from "@lingui/react/macro";+import type { ReactNode } from "react";+import { Fragment, useEffect, useState } from "react";+import { LuBell, LuBuilding2 } from "react-icons/lu";+import { Form } from "react-router";+import { Avatar } from "~/components";+import type { AccountMenuItem } from "~/components/AvatarMenu";+import { useAccountMenu } from "~/components/AvatarMenu";+import { useUser } from "~/hooks";+import { useNotifications } from "~/hooks/useNotifications";+import { path } from "~/utils/path";+import {+ useCompanyGroups,+ useCompanySwitchRedirect+} from "../Topbar/CompanySwitcher";+import { NotificationsPanel } from "../Topbar/Notifications";+import {+ SheetRowButton,+ SheetRowContent,+ SheetRowGroup,+ sheetRowClassName+} from "./SheetRow";++/** Consecutive items with the same `group`, as the desktop separators split them. */+function groupItems(items: AccountMenuItem[]) {+ const groups: AccountMenuItem[][] = [];+ for (const item of items) {+ const last = groups[groups.length - 1];+ if (last && last[0]!.group === item.group) last.push(item);+ else groups.push([item]);+ }+ return groups;+}++type Screen =+ | { id: "root" }+ | { id: "notifications" }+ | { id: "companies" }+ | { id: "submenu"; item: AccountMenuItem };++/**+ * The tab bar's Profile sheet: the desktop account menu's items in order,+ * plus Notifications and the company switcher, which live in the desktop top+ * bar. Sub-menus drill in within the sheet.+ */+export function ProfileSheet({+ open,+ onOpenChange+}: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+}) {+ const { t } = useLingui();+ const menu = useAccountMenu();+ const user = useUser();+ const mode = useMode();+ const companyGroups = useCompanyGroups();+ const switchRedirect = useCompanySwitchRedirect();+ const notifications = useNotifications({+ companyId: user.company.id,+ userId: user.id+ });+ const unread = notifications.notifications.filter((n) => !n.read).length;+ const companyCount = companyGroups.reduce(+ (sum, group) => sum + group.companies.length,+ 0+ );++ const [screen, setScreen] = useState<Screen>({ id: "root" });+ const [notificationsTab, setNotificationsTab] = useState("inbox");++ useEffect(() => {+ if (!open) setScreen({ id: "root" });+ }, [open]);++ const back = () => setScreen({ id: "root" });++ const renderItem = (item: AccountMenuItem) => {+ switch (item.kind) {+ case "link":+ return (+ <PrefetchLink to={item.to!} className={sheetRowClassName}>+ <SheetRowContent+ icon={item.icon}+ label={item.label}+ trailing="drill"+ />+ </PrefetchLink>+ );+ case "external":+ return (+ <a+ href={item.to}+ target="_blank"+ rel="noreferrer"+ className={sheetRowClassName}+ >+ <SheetRowContent+ icon={item.icon}+ label={item.label}+ trailing="external"+ />+ </a>+ );+ case "mode":+ return (+ <div className="flex min-h-12 items-center gap-3 px-3">+ <SheetRowContent icon={item.icon} label={item.label} />+ <div+ role="radiogroup"+ aria-label={t`Appearance`}+ className="flex shrink-0 rounded-lg bg-muted p-0.5"+ >+ {menu.modeOptions.map((option) => {+ const selected = menu.modePreference === option.value;+ return (+ <button+ key={option.value}+ type="button"+ role="radio"+ aria-checked={selected}+ onClick={() => menu.onModeChange(option.value)}+ className={cn(+ "hit-area flex h-9 min-w-11 items-center justify-center rounded-md px-2 text-sm text-muted-foreground",+ selected &&+ "bg-background text-foreground shadow-button-base"+ )}+ >+ {option.label}+ </button>+ );+ })}+ </div>+ </div>+ );+ case "submenu":+ return (+ <SheetRowButton+ onClick={() => setScreen({ id: "submenu", item })}+ disabled={+ item.id === "language" && menu.localeFetcher.state !== "idle"+ }+ >+ <SheetRowContent+ icon={item.icon}+ label={item.label}+ trailing="drill"+ />+ </SheetRowButton>+ );+ case "action":+ if (item.id === "signOut") {+ return (+ <Form method="post" action={path.to.logout}>+ <SheetRowButton type="submit">+ <SheetRowContent icon={item.icon} label={item.label} />+ </SheetRowButton>+ </Form>+ );+ }+ return (+ <SheetRowButton onClick={menu.itarDisclosure.onOpen}>+ <SheetRowContent icon={item.icon} label={item.label} />+ </SheetRowButton>+ );+ }+ };++ const renderSubmenu = (item: AccountMenuItem): ReactNode => {+ if (item.id === "theme") {+ return themes.map((theme) => (+ <SheetRowButton+ key={theme.name}+ onClick={() => menu.onThemeChange(theme.name)}+ >+ <span+ className="size-5 shrink-0 rounded-full"+ style={{+ background: `hsl(${theme.activeColor[mode === "dark" ? "dark" : "light"]})`+ }}+ />+ <SheetRowContent+ label={theme.label}+ trailing={menu.optimisticTheme === theme.name ? "check" : null}+ />+ </SheetRowButton>+ ));+ }+ if (item.id === "language") {+ return (+ <menu.localeFetcher.Form method="post" action="/api/locale">+ {menu.languageOptions.map((option) => (+ <SheetRowButton+ key={option.value}+ type="submit"+ name="locale"+ value={option.value}+ disabled={+ menu.localeFetcher.state !== "idle" ||+ option.value === menu.resolvedLocale+ }+ className="disabled:opacity-100"+ >+ <SheetRowContent+ label={option.label}+ trailing={option.value === menu.resolvedLocale ? "check" : null}+ />+ </SheetRowButton>+ ))}+ </menu.localeFetcher.Form>+ );+ }+ return item.children?.map((child) => (+ <a key={child.id} href={child.to} className={sheetRowClassName}>+ <SheetRowContent+ icon={child.icon}+ label={child.label}+ trailing="external"+ />+ </a>+ ));+ };++ const title =+ screen.id === "notifications" ? (+ <Trans>Notifications</Trans>+ ) : screen.id === "companies" ? (+ <Trans>Switch company</Trans>+ ) : screen.id === "submenu" ? (+ screen.item.label+ ) : (+ <Trans>Profile</Trans>+ );++ return (+ <>+ <BottomSheet open={open} onOpenChange={onOpenChange}>+ <BottomSheetContent>+ <BottomSheetHeader>+ {screen.id !== "root" && <BottomSheetBack onClick={back} />}+ <BottomSheetTitle>{title}</BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody+ className={cn("px-2", screen.id === "notifications" && "px-0")}+ >+ {screen.id === "root" && (+ <>+ <div className="flex items-center gap-3 px-3 pb-3">+ <Avatar path={menu.user.avatarUrl} name={menu.name} />+ <span className="min-w-0 truncate text-sm text-muted-foreground">+ {menu.signedInAs}+ </span>+ </div>+ <SheetRowGroup>+ <SheetRowButton+ onClick={() => setScreen({ id: "notifications" })}+ >+ <SheetRowContent+ icon={<LuBell />}+ label={<Trans>Notifications</Trans>}+ detail={unread > 0 ? unread : undefined}+ trailing="drill"+ />+ </SheetRowButton>+ {companyCount > 1 && (+ <SheetRowButton+ onClick={() => setScreen({ id: "companies" })}+ >+ <SheetRowContent+ icon={<LuBuilding2 />}+ label={<Trans>Switch company</Trans>}+ detail={user.company.name}+ trailing="drill"+ />+ </SheetRowButton>+ )}+ </SheetRowGroup>+ {groupItems(menu.items).map((group) => (+ <SheetRowGroup key={group[0]!.group}>+ {group.map((item) => (+ <Fragment key={item.id}>{renderItem(item)}</Fragment>+ ))}+ </SheetRowGroup>+ ))}+ </>+ )}+ {screen.id === "submenu" && renderSubmenu(screen.item)}+ {screen.id === "notifications" && (+ <NotificationsPanel+ isOpen={open}+ onClose={() => onOpenChange(false)}+ activeTab={notificationsTab}+ onActiveTabChange={setNotificationsTab}+ notifications={notifications}+ />+ )}+ {screen.id === "companies" &&+ companyGroups.map((group) => (+ <SheetRowGroup key={group.name}>+ <div className="px-3 pt-2 pb-1 text-xs font-medium uppercase tracking-[0.04em] text-muted-foreground">+ {group.name}+ </div>+ {group.companies.map((company) => {+ const logo =+ mode === "dark"+ ? company.logoDarkIcon+ : company.logoLightIcon;+ const isCurrent = company.companyId === user.company.id;+ return (+ <Form+ key={company.companyId}+ method="post"+ action={path.to.companySwitch(company.companyId!)}+ >+ {switchRedirect && (+ <input+ type="hidden"+ name="redirectTo"+ value={switchRedirect}+ />+ )}+ <SheetRowButton+ type="submit"+ disabled={isCurrent}+ className="disabled:opacity-100"+ >+ <AvatarBase+ size="xs"+ name={company.name ?? undefined}+ src={logo ?? undefined}+ />+ <SheetRowContent+ label={company.name}+ detail={company.employeeType}+ trailing={isCurrent ? "check" : null}+ />+ </SheetRowButton>+ </Form>+ );+ })}+ </SheetRowGroup>+ ))}+ </BottomSheetBody>+ </BottomSheetContent>+ </BottomSheet>+ {CONTROLLED_ENVIRONMENT && (+ <ItarDisclosure disclosure={menu.itarDisclosure} />+ )}+ </>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/SectionSwitcherSheet.tsx b/apps/erp/app/components/Layout/Mobile/SectionSwitcherSheet.tsxnew file mode 100644index 0000000000..92d84d0c98--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/SectionSwitcherSheet.tsx@@ -0,0 +1,45 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ BottomSheet,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle+} from "@carbon/react";+import type { ComponentType, ReactNode } from "react";+import { SidebarPresentationProvider } from "../Navigation/SidebarPresentation";++/**+ * The title ▾ sheet on root screens: renders the module's own sidebar+ * component in its sheet presentation, so it lists exactly the desktop+ * sections. Picking a row navigates and closes the sheet.+ */+export function SectionSwitcherSheet({+ open,+ onOpenChange,+ title,+ Sidebar+}: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ title: ReactNode;+ Sidebar: ComponentType;+}) {+ return (+ <BottomSheet open={open} onOpenChange={onOpenChange}>+ <BottomSheetContent>+ <BottomSheetHeader>+ <BottomSheetTitle>{title}</BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody className="px-2">+ <SidebarPresentationProvider value="sheet">+ <Sidebar />+ </SidebarPresentationProvider>+ </BottomSheetBody>+ </BottomSheetContent>+ </BottomSheet>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/SheetRow.tsx b/apps/erp/app/components/Layout/Mobile/SheetRow.tsxnew file mode 100644index 0000000000..d8e8f08e35--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/SheetRow.tsx@@ -0,0 +1,87 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { cn } from "@carbon/react";+import type { ComponentProps, ReactNode } from "react";+import { forwardRef } from "react";+import { LuArrowUpRight, LuCheck, LuChevronRight } from "react-icons/lu";++/**+ * One 48pt row in a shell sheet (Create, Modules, Profile). The trailing+ * indicator: › drills in, ↗ leaves the app, ✓ marks the current.+ */+export type SheetRowTrailing = "drill" | "external" | "check" | ReactNode;++export function SheetRowContent({+ icon,+ label,+ detail,+ trailing,+ destructive+}: {+ icon?: ReactNode;+ label: ReactNode;+ detail?: ReactNode;+ trailing?: SheetRowTrailing;+ destructive?: boolean;+}) {+ return (+ <>+ {icon ? (+ <span+ className={cn(+ "flex size-5 shrink-0 items-center justify-center [&>svg]:size-5",+ destructive ? "text-destructive" : "text-muted-foreground"+ )}+ >+ {icon}+ </span>+ ) : null}+ <span className="min-w-0 flex-1 truncate text-left">{label}</span>+ {detail ? (+ <span className="shrink-0 text-sm text-muted-foreground tabular-nums">+ {detail}+ </span>+ ) : null}+ {trailing === "drill" ? (+ <LuChevronRight className="size-5 shrink-0 text-muted-foreground" />+ ) : trailing === "external" ? (+ <LuArrowUpRight className="size-5 shrink-0 text-muted-foreground" />+ ) : trailing === "check" ? (+ <LuCheck className="size-5 shrink-0 text-primary" />+ ) : (+ trailing+ )}+ </>+ );+}++export const sheetRowClassName =+ "flex min-h-12 w-full items-center gap-3 rounded-lg px-3 text-[15px] text-foreground outline-none active:bg-accent focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50";++export const SheetRowButton = forwardRef<+ HTMLButtonElement,+ ComponentProps<"button"> & { destructive?: boolean }+>(({ className, destructive, ...props }, ref) => (+ <button+ ref={ref}+ type="button"+ className={cn(+ sheetRowClassName,+ destructive && "text-destructive",+ className+ )}+ {...props}+ />+));+SheetRowButton.displayName = "SheetRowButton";++/** A group of rows separated from the next by a hairline, like menu separators. */+export function SheetRowGroup({ children }: { children: ReactNode }) {+ return (+ <div className="flex flex-col border-b border-border py-1 last:border-b-0">+ {children}+ </div>+ );+}diff --git a/apps/erp/app/components/Layout/Mobile/appBar.test.ts b/apps/erp/app/components/Layout/Mobile/appBar.test.tsnew file mode 100644index 0000000000..5dc15576a1--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/appBar.test.ts@@ -0,0 +1,104 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { describe, expect, it } from "vitest";+import { deriveAppBar, mergeAppBar } from "./appBar";++describe("deriveAppBar", () => {+ it("treats a module sidebar section as root", () => {+ expect(+ deriveAppBar(+ [+ { breadcrumb: "Purchasing", to: "/x/purchasing" },+ { breadcrumb: "Orders", to: "/x/purchasing/orders" }+ ],+ { hasModuleSidebar: true, moduleCrumbIndex: 0 }+ )+ ).toEqual({ title: "Orders", kind: "root" });+ });++ it("pushes a record page and goes up to its list", () => {+ expect(+ deriveAppBar(+ [+ { breadcrumb: "Purchasing", to: "/x/purchasing" },+ { breadcrumb: "Orders", to: "/x/purchasing/orders" },+ { breadcrumb: "PO000018" }+ ],+ { hasModuleSidebar: false, moduleCrumbIndex: 0 }+ )+ ).toEqual({+ title: "PO000018",+ subtitle: "Orders",+ backTo: "/x/purchasing/orders",+ kind: "pushed"+ });+ });++ it("treats a settings page as root", () => {+ expect(+ deriveAppBar(+ [+ { breadcrumb: "Settings", to: "/x/settings" },+ { breadcrumb: "Company", to: "/x/settings/company" }+ ],+ { hasModuleSidebar: true, moduleCrumbIndex: 0 }+ ).kind+ ).toBe("root");+ });++ it("pushes a page two crumbs below the module even with a sidebar", () => {+ expect(+ deriveAppBar(+ [+ { breadcrumb: "Inventory", to: "/x/inventory" },+ { breadcrumb: "Quantities", to: "/x/inventory/quantities" },+ { breadcrumb: "ITEM-1" }+ ],+ { hasModuleSidebar: true, moduleCrumbIndex: 0 }+ ).kind+ ).toBe("pushed");+ });++ it("treats Home as root", () => {+ expect(+ deriveAppBar([], { hasModuleSidebar: false, moduleCrumbIndex: 0 })+ ).toEqual({ title: null, kind: "root" });+ });+});++describe("mergeAppBar", () => {+ const root = { title: "Customers", kind: "root" as const };+ const pushed = {+ title: "PO000018",+ subtitle: "Orders",+ backTo: "/x/purchasing/orders",+ kind: "pushed" as const+ };++ it("returns the derived bar without an override", () => {+ expect(mergeAppBar(pushed, null)).toEqual(pushed);+ });++ it("pushes a root screen with Back from the override", () => {+ expect(+ mergeAppBar(root, { kind: "pushed", backTo: "/x/sales/customers" })+ ).toEqual({+ title: "Customers",+ subtitle: undefined,+ kind: "pushed",+ backTo: "/x/sales/customers"+ });+ });++ it("keeps the derived title in selection mode when none is given", () => {+ expect(mergeAppBar(root, { kind: "selection" }).title).toBe("Customers");+ });++ it("drops the derived subtitle under an override", () => {+ expect(+ mergeAppBar(pushed, { kind: "selection", title: "2 selected" }).subtitle+ ).toBeUndefined();+ });+});diff --git a/apps/erp/app/components/Layout/Mobile/appBar.ts b/apps/erp/app/components/Layout/Mobile/appBar.tsnew file mode 100644index 0000000000..27104eed24--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/appBar.ts@@ -0,0 +1,75 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { ReactNode } from "react";++/** One resolved breadcrumb, as `useBreadcrumbs()` returns it. */+export type Crumb = {+ breadcrumb: ReactNode;+ to?: string;+};++export type AppBarState = {+ title: ReactNode;+ subtitle?: ReactNode;+ backTo?: string;+ /**+ * Root screens show the tab bar and the section switcher; pushed screens+ * show Back; a selection (list select mode) hides the page actions.+ */+ kind: "root" | "pushed" | "selection";+};++/** What a page sets over the derived app bar (see useSetAppBarOverride). */+export type AppBarOverride = Partial<AppBarState> & { trailing?: ReactNode };++/**+ * The derived app bar with a page's override on top. An override replaces the+ * subtitle too, so a pushed record never shows the list's crumb under it.+ */+export function mergeAppBar(+ base: AppBarState,+ override: AppBarOverride | null+): AppBarState & { trailing?: ReactNode } {+ if (!override) return base;+ return { ...base, subtitle: undefined, ...override };+}++type DeriveOptions = {+ /** The route renders inside a module layout with a content sidebar (`handle.sidebar`). */+ hasModuleSidebar: boolean;+ /** Index of the module crumb in `crumbs` (usually 0). */+ moduleCrumbIndex: number;+};++/**+ * Derive the compact app bar from the desktop breadcrumbs: the last crumb is+ * the title; on a pushed screen the previous crumb is the subtitle and the Back+ * target ("up", never history). A screen is root when it is Home, a module+ * landing page, or a module-sidebar page at most one crumb below the module.+ */+export function deriveAppBar(+ crumbs: Crumb[],+ { hasModuleSidebar, moduleCrumbIndex }: DeriveOptions+): AppBarState {+ const last = crumbs[crumbs.length - 1];+ const title = last?.breadcrumb ?? null;+ const belowModule = crumbs.length - 1 - Math.max(moduleCrumbIndex, 0);++ const isHome = crumbs.length === 0;+ const isModuleLanding = belowModule <= 0;+ const isSidebarSection = hasModuleSidebar && belowModule <= 1;++ if (isHome || isModuleLanding || isSidebarSection) {+ return { title, kind: "root" };+ }++ const parent = crumbs[crumbs.length - 2];+ return {+ title,+ subtitle: parent?.breadcrumb,+ backTo: parent?.to,+ kind: "pushed"+ };+}diff --git a/apps/erp/app/components/Layout/Mobile/index.ts b/apps/erp/app/components/Layout/Mobile/index.tsnew file mode 100644index 0000000000..8022caf469--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/index.ts@@ -0,0 +1,8 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++export { AppBarActions, MobileBottomChrome } from "./ChromeSlots";+export { MobileAppBar } from "./MobileAppBar";+export { MobileTabBar } from "./MobileTabBar";+export { useSetAppBarOverride } from "./useAppBarOverride";diff --git a/apps/erp/app/components/Layout/Mobile/slots.tsx b/apps/erp/app/components/Layout/Mobile/slots.tsxnew file mode 100644index 0000000000..2e617e5126--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/slots.tsx@@ -0,0 +1,97 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { useCompact } from "@carbon/react";+import type { ReactNode } from "react";+import { useEffect, useId, useRef, useState } from "react";+import { createPortal } from "react-dom";+import { create } from "zustand";++/**+ * A place in the shell that pages render into. A portal keeps the filler's+ * React context (forms, menus, route data). Phones only: on desktop `Fill`+ * renders nothing and the caller keeps its in-place copy.+ *+ * The slot owns its DOM element and `Target` only shows it, so filled content+ * never remounts when the place it shows in comes and goes (the ⋯ sheet+ * closing must not unmount a dialog an action opened).+ */+export function createPortalSlot() {+ let element: HTMLDivElement | null = null;+ const getElement = () => {+ element ??= document.createElement("div");+ return element;+ };+ const useCount = create<{ count: number; add: (delta: 1 | -1) => void }>()(+ (set) => ({+ count: 0,+ add: (delta) => set((s) => ({ count: Math.max(0, s.count + delta) }))+ })+ );++ /** `className` styles the slot's element; the host is `display: contents`. */+ function Target({ className }: { className?: string }) {+ const host = useRef<HTMLDivElement>(null);+ useEffect(() => {+ const el = getElement();+ el.className = className ?? "";+ host.current?.appendChild(el);+ return () => el.remove();+ }, [className]);+ return <div ref={host} className="contents" />;+ }++ function Fill({ children }: { children: ReactNode }) {+ const isCompact = useCompact();+ // After hydration only: the server renders no portals.+ const [mounted, setMounted] = useState(false);+ useEffect(() => setMounted(true), []);+ const add = useCount((s) => s.add);+ useEffect(() => {+ if (!isCompact) return;+ add(1);+ return () => add(-1);+ }, [isCompact, add]);+ return isCompact && mounted ? createPortal(children, getElement()) : null;+ }++ const useFilled = () => useCount((s) => s.count > 0);++ return { Target, Fill, useFilled };+}++/**+ * Data a page hands the shell. The newest provider wins; unmounting removes+ * only its own entry. Callers memoize `value`: a new object re-provides it.+ */+export function createValueSlot<T>() {+ const useStore = create<{+ entries: { id: string; value: T }[];+ put: (id: string, value: T) => void;+ remove: (id: string) => void;+ }>()((set) => ({+ entries: [],+ put: (id, value) =>+ set((s) => ({+ entries: [...s.entries.filter((e) => e.id !== id), { id, value }]+ })),+ remove: (id) =>+ set((s) => ({ entries: s.entries.filter((e) => e.id !== id) }))+ }));++ function useProvide(value: T | null) {+ const id = useId();+ const put = useStore((s) => s.put);+ const remove = useStore((s) => s.remove);+ useEffect(() => {+ if (value === null) return;+ put(id, value);+ return () => remove(id);+ }, [id, value, put, remove]);+ }++ const useValue = () => useStore((s) => s.entries.at(-1)?.value ?? null);++ return { useProvide, useValue };+}diff --git a/apps/erp/app/components/Layout/Mobile/useAppBar.ts b/apps/erp/app/components/Layout/Mobile/useAppBar.tsnew file mode 100644index 0000000000..823c54af36--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/useAppBar.ts@@ -0,0 +1,40 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { useUser } from "~/hooks";+import { useCompactModuleSidebar } from "../Navigation/CollapsibleSidebar";+import { useBreadcrumbs } from "../Topbar/Breadcrumbs";+import { deriveAppBar, mergeAppBar } from "./appBar";+import { useAppBarOverride } from "./useAppBarOverride";++/**+ * The compact app bar for the current route: title, subtitle and Back from+ * the desktop breadcrumbs (with a page's override on top), the module+ * sidebar for the section switcher, and the module name for the switcher's+ * title. Home shows the company name.+ */+export function useAppBar() {+ const crumbs = useBreadcrumbs();+ const Sidebar = useCompactModuleSidebar();+ const { company } = useUser();+ const override = useAppBarOverride();++ const derived = deriveAppBar(crumbs, {+ hasModuleSidebar: Boolean(Sidebar),+ moduleCrumbIndex: 0+ });+ const state = mergeAppBar(+ {+ ...derived,+ title: crumbs.length === 0 ? company?.name : derived.title+ },+ override+ );++ return {+ ...state,+ moduleTitle: crumbs[0]?.breadcrumb,+ Sidebar: state.kind === "root" ? Sidebar : undefined+ };+}diff --git a/apps/erp/app/components/Layout/Mobile/useAppBarOverride.ts b/apps/erp/app/components/Layout/Mobile/useAppBarOverride.tsnew file mode 100644index 0000000000..a794edd623--- /dev/null+++ b/apps/erp/app/components/Layout/Mobile/useAppBarOverride.ts@@ -0,0 +1,18 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { AppBarOverride } from "./appBar";+import { createValueSlot } from "./slots";++/**+ * A temporary app bar a page can take over: list selection mode ("3 selected"+ * with Cancel), or a drilled-in screen with Back. The newest one shows;+ * cleared when its page unmounts.+ */+const appBarSlot = createValueSlot<AppBarOverride>();++export const useAppBarOverride = appBarSlot.useValue;++/** Take over the app bar while `override` is non-null. Memoize it. */+export const useSetAppBarOverride = appBarSlot.useProvide;diff --git a/apps/erp/app/components/Layout/Navigation/CollapsibleSidebar.tsx b/apps/erp/app/components/Layout/Navigation/CollapsibleSidebar.tsxindex 275699e3db..50513d3dfe 100644--- a/apps/erp/app/components/Layout/Navigation/CollapsibleSidebar.tsx+++ b/apps/erp/app/components/Layout/Navigation/CollapsibleSidebar.tsx@@ -2,15 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import {- cn,- Drawer,- DrawerContent,- DrawerTitle,- IconButton,- useIsMobile-} from "@carbon/react";-import { Trans } from "@lingui/react/macro";+import { cn, IconButton, useCompact } from "@carbon/react";import { motion, useReducedMotion } from "motion/react";import type { ComponentProps, PropsWithChildren } from "react";import {@@ -24,7 +16,6 @@ import {import { LuPanelLeft } from "react-icons/lu";import type { Location } from "react-router";import { useLocation, useMatches, useNavigation } from "react-router";-import { useOptimisticLocation } from "~/hooks";import { useUIStore } from "~/stores/ui";import type { Handle } from "~/utils/handle";@@ -51,29 +42,19 @@ function CollapsibleSidebarProvider({hasSidebar,children}: PropsWithChildren<{ hasSidebar: boolean }>) {- const isMobile = useIsMobile();+ const isCompact = useCompact();const isSidebarOpen = useUIStore((state) => state.isSidebarOpen);const setSidebarOpen = useUIStore((state) => state.setSidebarOpen);const toggleSidebar = useUIStore((state) => state.toggleSidebar);- const setHasContentSidebar = useUIStore(- (state) => state.setHasContentSidebar- );// Only a change of breakpoint moves it: opening on mount would undo the- // user's collapse, and on a phone open the drawer for a frame.- const wasMobile = useRef(false);- useEffect(() => {- if (isMobile) setSidebarOpen(false);- else if (wasMobile.current) setSidebarOpen(true);- wasMobile.current = isMobile;- }, [isMobile, setSidebarOpen]);-- // Tell the (global) Topbar that this route has a content sub-nav, so it can- // surface a mobile "Sections" trigger.+ // user's collapse.+ const wasCompact = useRef(false);useEffect(() => {- setHasContentSidebar(hasSidebar);- return () => setHasContentSidebar(false);- }, [hasSidebar, setHasContentSidebar]);+ if (isCompact) setSidebarOpen(false);+ else if (wasCompact.current) setSidebarOpen(true);+ wasCompact.current = isCompact;+ }, [isCompact, setSidebarOpen]);return (<CollapsibleSidebarContext.Provider@@ -187,6 +168,28 @@ export function SidebarLinks({ children }: PropsWithChildren) {);}+/**+ * The current module's sub-navigation component from the route handles, or+ * undefined. The desktop sidebar and the compact section switcher both read it.+ */+export function useModuleSidebar() {+ const matches = useMatches();+ const handles = matches.map((match) => match.handle as Handle | undefined);+ return handles.some((handle) => handle?.hideModuleSidebar)+ ? undefined+ : handles.find((handle) => handle?.sidebar)?.sidebar;+}++/** Phones: the module sidebar, or a route's phone-only section switcher. */+export function useCompactModuleSidebar() {+ const matches = useMatches();+ const Sidebar = useModuleSidebar();+ if (Sidebar) return Sidebar;+ return matches+ .map((match) => match.handle as Handle | undefined)+ .find((handle) => handle?.compactSidebar)?.compactSidebar;+}+/*** The one module sidebar, rendered by the app shell around every page. A* module layout names its sub-navigation on its route handle (`sidebar`) and@@ -195,11 +198,7 @@ export function SidebarLinks({ children }: PropsWithChildren) {* outside a module (detail pages) have none and get the full width.*/export function ModuleSidebarLayout({ children }: PropsWithChildren) {- const matches = useMatches();- const handles = matches.map((match) => match.handle as Handle | undefined);- const Sidebar = handles.some((handle) => handle?.hideModuleSidebar)- ? undefined- : handles.find((handle) => handle?.sidebar)?.sidebar;+ const Sidebar = useModuleSidebar();return (<CollapsibleSidebarProvider hasSidebar={Boolean(Sidebar)}>@@ -229,9 +228,7 @@ const CollapsibleSidebar = ({}: PropsWithChildren<{ width?: number }>) => {const { isOpen } = useCollapsibleSidebar();const shouldReduceMotion = useReducedMotion();- const isMobile = useIsMobile();- const setSidebarOpen = useUIStore((state) => state.setSidebarOpen);- const location = useOptimisticLocation();+ const isCompact = useCompact();const variants = useMemo(() => {return {@@ -246,38 +243,9 @@ const CollapsibleSidebar = ({};}, [width]);- // On mobile the sub-nav is an overlay drawer; close it once the user picks a- // section (the pathname changes) so it doesn't sit over the destination.- useEffect(() => {- if (isMobile) setSidebarOpen(false);- }, [location.pathname, isMobile, setSidebarOpen]);-- if (isMobile) {- return (- <>- {/* The sub-nav is a portaled overlay on mobile, but the module layout- grid (`grid-cols-[auto_minmax(0,1fr)]`) still expects a node in its- first (`auto`) track. Without this zero-width occupant the content- slides into the `auto` track and the `1fr` track becomes an empty- gutter on the right. */}- <div aria-hidden className="w-0" />- <Drawer open={isOpen} onOpenChange={setSidebarOpen}>- <DrawerContent- position="left"- size="content"- className="w-[17rem] max-w-[85vw] p-0"- >- <DrawerTitle className="px-4 py-3">- <Trans>Submodules</Trans>- </DrawerTitle>- <div className="flex flex-1 min-h-0 flex-col overflow-hidden">- {children}- </div>- </DrawerContent>- </Drawer>- </>- );- }+ // Compact: the app bar title opens the section switcher sheet instead.+ // Keep the zero-width occupant of the layout grid's first track.+ if (isCompact) return <div aria-hidden className="w-0" />;return (<motion.divdiff --git a/apps/erp/app/components/Layout/Navigation/ContentSidebar.tsx b/apps/erp/app/components/Layout/Navigation/ContentSidebar.tsxindex b309bb1fa3..cb391360af 100644--- a/apps/erp/app/components/Layout/Navigation/ContentSidebar.tsx+++ b/apps/erp/app/components/Layout/Navigation/ContentSidebar.tsx@@ -6,6 +6,11 @@ import { Button, cn, PrefetchLink, VStack } from "@carbon/react";import { useUrlParams } from "~/hooks";import type { Route } from "~/types";import { SidebarLinks, useSidebarLocation } from "./CollapsibleSidebar";+import {+ SheetNavGroup,+ SheetNavRow,+ useSidebarPresentation+} from "./SidebarPresentation";const ContentSidebar = ({ links }: { links: Route[] }) => {const location = useSidebarLocation((pathname) =>@@ -13,6 +18,32 @@ const ContentSidebar = ({ links }: { links: Route[] }) => {);const [params] = useUrlParams();const filter = params.get("q") ?? undefined;+ const presentation = useSidebarPresentation();++ if (presentation === "title") {+ const active = links.find(+ (route) => location.pathname.includes(route.to) && route.q === filter+ );+ return active ? <>{active.name}</> : null;+ }++ if (presentation === "sheet") {+ return (+ <SheetNavGroup>+ {links.map((route) => (+ <SheetNavRow+ key={route.name}+ to={route.to + (route.q ? `?q=${route.q}` : "")}+ icon={route.icon}+ label={route.name}+ isActive={+ location.pathname.includes(route.to) && route.q === filter+ }+ />+ ))}+ </SheetNavGroup>+ );+ }return (<SidebarLinks>diff --git a/apps/erp/app/components/Layout/Navigation/DetailSidebar.tsx b/apps/erp/app/components/Layout/Navigation/DetailSidebar.tsxindex 938cb4eb89..e89c59bc25 100644--- a/apps/erp/app/components/Layout/Navigation/DetailSidebar.tsx+++ b/apps/erp/app/components/Layout/Navigation/DetailSidebar.tsx@@ -12,6 +12,7 @@ import {Tooltip,TooltipContent,TooltipTrigger,+ useCompact,useShortcutKeyMap,VStack} from "@carbon/react";@@ -19,6 +20,7 @@ import type { ReactNode } from "react";import { useMemo } from "react";import { useNavigate } from "react-router";import { useOptimisticLocation } from "~/hooks";+import { CompactTabRow } from "../CompactTabRow";type DetailSidebarProps = {links: {@@ -46,6 +48,24 @@ const DetailSidebar = ({ links }: DetailSidebarProps) => {));+ // Phones: the same links as a sticky, horizontally scrolling underline+ // tab row, as DetailsTopbar renders outside a record.+ const isCompact = useCompact();+ if (isCompact) {+ return (+ <CompactTabRow+ className="sticky top-0 z-10 mb-3 w-full px-0"+ items={links.map((route) => ({+ id: route.name,+ label: route.name,+ to: route.to,+ count: route.count,+ active: location.pathname.includes(route.to)+ }))}+ />+ );+ }+return (<VStackclassName="overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent h-full"diff --git a/apps/erp/app/components/Layout/Navigation/DetailsTopbar.tsx b/apps/erp/app/components/Layout/Navigation/DetailsTopbar.tsxindex 3488f98f73..b5044dbe96 100644--- a/apps/erp/app/components/Layout/Navigation/DetailsTopbar.tsx+++ b/apps/erp/app/components/Layout/Navigation/DetailsTopbar.tsx@@ -12,12 +12,16 @@ import {Tooltip,TooltipContent,TooltipTrigger,+ useCompact,useShortcutKeyMap} from "@carbon/react";import { useMemo } from "react";import type { IconType } from "react-icons";import { useNavigate } from "react-router";import { useOptimisticLocation, useUrlParams } from "~/hooks";+import type { CompactTabItem } from "../CompactTabRow";+import { CompactTabRow } from "../CompactTabRow";+import { recordFrameSlot, recordTabsSlot } from "../Panels";type DetailTopbarProps = {links: {@@ -63,6 +67,42 @@ const DetailTopbar = ({));+ // Phones: inside a record frame the links join its one tab row; elsewhere+ // they render here as a scrolling underline row.+ const isCompact = useCompact();+ const paramString = params.toString();+ // `links` is a new array on every render: keyed on what the tabs show.+ const itemsKey = links+ .map((link) => {+ const active = link.isActive+ ? link.isActive(location.pathname)+ : location.pathname.includes(link.to);+ return `${link.name}|${link.to}|${link.count}|${active}`;+ })+ .join(",");+ // biome-ignore lint/correctness/useExhaustiveDependencies: keyed on itemsKey+ const items = useMemo<CompactTabItem[]>(+ () =>+ links.map((route) => ({+ id: route.to,+ label: route.name,+ to: preserveParams ? `${route.to}?${paramString}` : route.to,+ count: route.count,+ active: route.isActive+ ? route.isActive(location.pathname)+ : location.pathname.includes(route.to)+ })),+ [itemsKey, preserveParams, paramString]+ );+ recordTabsSlot.useProvide(isCompact ? items : null);+ const inRecordFrame = recordFrameSlot.useValue() !== null;++ if (isCompact) {+ return inRecordFrame ? null : (+ <CompactTabRow className="w-full min-w-0 shrink" items={items} />+ );+ }+return (<div className="inline-flex h-9 items-center justify-center rounded-[0.5rem] bg-muted p-1 text-muted-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.15)] border-b border-border">{links.map((route) => {diff --git a/apps/erp/app/components/Layout/Navigation/GroupedContentSidebar.tsx b/apps/erp/app/components/Layout/Navigation/GroupedContentSidebar.tsxindex b3b43fc3b0..03913019cf 100644--- a/apps/erp/app/components/Layout/Navigation/GroupedContentSidebar.tsx+++ b/apps/erp/app/components/Layout/Navigation/GroupedContentSidebar.tsx@@ -32,6 +32,11 @@ import { ConfirmDelete } from "~/components/Modals";import type { RouteGroup } from "~/types";import { path } from "~/utils/path";import { SidebarLinks, useSidebarLocation } from "./CollapsibleSidebar";+import {+ SheetNavGroup,+ SheetNavRow,+ useSidebarPresentation+} from "./SidebarPresentation";type GroupedRoute = RouteGroup["routes"][number];@@ -90,6 +95,64 @@ const GroupedContentSidebar = ({}));};+ const presentation = useSidebarPresentation();+ if (presentation === "title") {+ // Compact app bar title: the item the switcher sheet below ticks.+ const search = `${location.pathname}${location.search}`;+ for (const route of groups.flatMap((group) => group.routes)) {+ if (!matchesRoute(route, location.pathname, exactMatch)) continue;+ const view = route.views?.find((v) => search.includes(`view=${v.id}`));+ if (view) return <>{view.name}</>;+ if (Boolean(route.isActive) || exactMatch || !search.includes("view=")) {+ return <>{route.name}</>;+ }+ }+ return null;+ }+ if (presentation === "sheet") {+ // Compact section switcher: the same groups, order and active rule as+ // the panel below. Saved views open from here; reordering and deleting+ // them stays on desktop.+ const search = `${location.pathname}${location.search}`;+ return (+ <div className="flex flex-col">+ {groups.map((group) => (+ <SheetNavGroup key={group.name} title={group.name}>+ {group.routes.map((route) => {+ const isActive =+ matchesRoute(route, location.pathname, exactMatch) &&+ (Boolean(route.isActive) ||+ exactMatch ||+ !search.includes("view="));+ const views = [...(route.views ?? [])].sort(+ (a, b) => a.sortOrder - b.sortOrder+ );+ return (+ <div key={route.name} className="flex flex-col">+ <SheetNavRow+ to={route.to + (route.q ? `?q=${route.q}` : "")}+ icon={route.icon}+ label={route.name}+ isActive={isActive}+ />+ {views.map((view) => (+ <SheetNavRow+ key={view.to}+ to={view.to}+ label={view.name}+ isActive={search.includes(`view=${view.id}`)}+ inset+ />+ ))}+ </div>+ );+ })}+ </SheetNavGroup>+ ))}+ </div>+ );+ }+return (<><SidebarLinks>@@ -277,7 +340,7 @@ const ViewsReorderGroup = ({icon={<LuGripVertical />}variant="ghost"size="sm"- className="flex-shrink-0 opacity-0 group-hover/view:opacity-100 absolute left-1"+ className="flex-shrink-0 opacity-0 group-hover/view:opacity-100 absolute left-1 compact:opacity-100"/><DropdownMenu><DropdownMenuTrigger asChild>@@ -286,7 +349,7 @@ const ViewsReorderGroup = ({icon={<LuEllipsisVertical />}variant="ghost"size="sm"- className="absolute right-1 flex-shrink-0 opacity-0 group-hover/view:opacity-100 data-[state=open]:opacity-100 text-foreground/70 hover:text-foreground"+ className="absolute right-1 flex-shrink-0 opacity-0 group-hover/view:opacity-100 data-[state=open]:opacity-100 text-foreground/70 hover:text-foreground compact:opacity-100"/></DropdownMenuTrigger><DropdownMenuContent>diff --git a/apps/erp/app/components/Layout/Navigation/HiddenModulesPopover.tsx b/apps/erp/app/components/Layout/Navigation/HiddenModulesPopover.tsxindex d2ed16f02f..383e58c4e1 100644--- a/apps/erp/app/components/Layout/Navigation/HiddenModulesPopover.tsx+++ b/apps/erp/app/components/Layout/Navigation/HiddenModulesPopover.tsx@@ -38,7 +38,7 @@ export function HiddenModulesPopover({className={cn("min-w-[128px] text-sm","absolute left-7 group-data-[state=expanded]:left-12",- "opacity-0 group-data-[state=expanded]:opacity-100"+ "opacity-0 group-data-[state=expanded]:opacity-100 compact:opacity-100")}>Add modulediff --git a/apps/erp/app/components/Layout/Navigation/MobileNavigation.tsx b/apps/erp/app/components/Layout/Navigation/MobileNavigation.tsxdeleted file mode 100644index ba3e25135b..0000000000--- a/apps/erp/app/components/Layout/Navigation/MobileNavigation.tsx+++ /dev/null@@ -1,24 +0,0 @@-// SPDX-License-Identifier: AGPL-3.0-only-// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,-// including ports, remain AGPLv3; serving them over a network requires releasing their source.--import { IconButton, useSidebar } from "@carbon/react";-import { useLingui } from "@lingui/react/macro";-import { LuMenu } from "react-icons/lu";--/** Below `md` the rail rendered by `PrimaryNavigation` is a drawer; this opens it. */-const MobileNavigation = () => {- const { t } = useLingui();- const { toggleSidebar } = useSidebar();-- return (- <IconButton- aria-label={t`Open navigation`}- icon={<LuMenu />}- variant="ghost"- onClick={toggleSidebar}- />- );-};--export default MobileNavigation;diff --git a/apps/erp/app/components/Layout/Navigation/NavigationEditBar.tsx b/apps/erp/app/components/Layout/Navigation/NavigationEditBar.tsxindex 57f13473a6..0f69e9d870 100644--- a/apps/erp/app/components/Layout/Navigation/NavigationEditBar.tsx+++ b/apps/erp/app/components/Layout/Navigation/NavigationEditBar.tsx@@ -22,7 +22,7 @@ export function NavigationEditBar({<divclassName={cn("flex gap-1 px-2",- "opacity-0 group-data-[state=expanded]:opacity-100",+ "opacity-0 group-data-[state=expanded]:opacity-100 compact:opacity-100","transition-opacity")}>diff --git a/apps/erp/app/components/Layout/Navigation/SidebarPresentation.tsx b/apps/erp/app/components/Layout/Navigation/SidebarPresentation.tsxnew file mode 100644index 0000000000..7830b63fc4--- /dev/null+++ b/apps/erp/app/components/Layout/Navigation/SidebarPresentation.tsx@@ -0,0 +1,80 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { cn, PrefetchLink } from "@carbon/react";+import type { ReactNode } from "react";+import { createContext, useContext } from "react";+import { LuCheck } from "react-icons/lu";++/**+ * Where a module sidebar renders: the desktop side panel, the compact section+ * switcher sheet, or ("title") just the current section's name for the compact+ * app bar. The sidebar component and its data are the same in all three, so+ * the sheet lists exactly the desktop items and the title names the item the+ * sheet ticks.+ */+export type SidebarPresentation = "panel" | "sheet" | "title";++const SidebarPresentationContext = createContext<SidebarPresentation>("panel");++export const SidebarPresentationProvider = SidebarPresentationContext.Provider;++export function useSidebarPresentation() {+ return useContext(SidebarPresentationContext);+}++/** A 48pt section-switcher row: icon, label, ✓ on the current section. */+export function SheetNavRow({+ to,+ icon,+ label,+ isActive,+ inset = false+}: {+ to: string;+ icon?: ReactNode;+ label: ReactNode;+ isActive: boolean;+ inset?: boolean;+}) {+ return (+ <PrefetchLink+ to={to}+ aria-current={isActive ? "page" : undefined}+ className={cn(+ "flex min-h-12 items-center gap-3 rounded-lg px-3 text-[15px] text-foreground active:bg-accent",+ inset && "pl-11 text-sm text-muted-foreground",+ isActive && "font-medium"+ )}+ >+ {icon ? (+ <span className="flex size-5 shrink-0 items-center justify-center text-muted-foreground [&>svg]:size-5">+ {icon}+ </span>+ ) : null}+ <span className="min-w-0 flex-1 truncate">{label}</span>+ {isActive ? <LuCheck className="size-5 shrink-0 text-primary" /> : null}+ </PrefetchLink>+ );+}++/** Group overline in the switcher sheet. */+export function SheetNavGroup({+ title,+ children+}: {+ title?: ReactNode;+ children: ReactNode;+}) {+ return (+ <div className="flex flex-col pb-2">+ {title ? (+ <div className="px-3 pt-3 pb-1 text-xs font-medium uppercase tracking-[0.04em] text-muted-foreground">+ {title}+ </div>+ ) : null}+ {children}+ </div>+ );+}diff --git a/apps/erp/app/components/Layout/Navigation/SortableNavItem.tsx b/apps/erp/app/components/Layout/Navigation/SortableNavItem.tsxindex 9d092b0494..67acfae694 100644--- a/apps/erp/app/components/Layout/Navigation/SortableNavItem.tsx+++ b/apps/erp/app/components/Layout/Navigation/SortableNavItem.tsx@@ -46,7 +46,7 @@ export function SortableNavItem({<divclassName={cn("absolute left-0 top-0 h-full flex items-center pl-1",- "opacity-0 group-data-[state=expanded]:opacity-100",+ "opacity-0 group-data-[state=expanded]:opacity-100 compact:opacity-100","cursor-grab active:cursor-grabbing")}{...attributes}@@ -63,7 +63,7 @@ export function SortableNavItem({className={cn("min-w-[128px] text-sm","absolute left-12 group-data-[state=expanded]:left-16",- "opacity-0 group-data-[state=expanded]:opacity-100"+ "opacity-0 group-data-[state=expanded]:opacity-100 compact:opacity-100")}>{module.name}@@ -75,7 +75,7 @@ export function SortableNavItem({onClick={() => onToggleHidden(module.key)}className={cn("absolute right-2 top-2.5 p-0.5 rounded",- "opacity-0 group-data-[state=expanded]:opacity-100",+ "opacity-0 group-data-[state=expanded]:opacity-100 compact:opacity-100","text-muted-foreground hover:text-foreground","transition-opacity")}diff --git a/apps/erp/app/components/Layout/Panels.tsx b/apps/erp/app/components/Layout/Panels.tsxindex 4a3a72a578..89ebd04973 100644--- a/apps/erp/app/components/Layout/Panels.tsx+++ b/apps/erp/app/components/Layout/Panels.tsx@@ -3,18 +3,28 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import {- Drawer,- DrawerContent,- DrawerTitle,+ cn,ResizableHandle,ResizablePanel,ResizablePanelGroup,- useIsMobile+ useCompact} from "@carbon/react";-import { Trans } from "@lingui/react/macro";+import { useLingui } from "@lingui/react/macro";+import type { ReactNode } from "react";import { createContext, useContext, useEffect, useRef, useState } from "react";import type { ImperativePanelHandle } from "react-resizable-panels";import { useOptimisticLocation } from "~/hooks";+import type { CompactTabItem } from "./CompactTabRow";+import { CompactTabRow } from "./CompactTabRow";+import { createValueSlot } from "./Mobile/slots";++/**+ * Phones: a record's sub-route tabs (Details, Purchasing, …), provided by its+ * DetailsTopbar, and whether a record frame is mounted to show them in its+ * one tab row (DetailsTopbar renders its own row otherwise).+ */+export const recordTabsSlot = createValueSlot<CompactTabItem[]>();+export const recordFrameSlot = createValueSlot<true>();interface PanelContextType {isExplorerCollapsed: boolean;@@ -25,7 +35,7 @@ interface PanelContextType {setIsPropertiesCollapsed: (collapsed: boolean) => void;}-const PanelContext = createContext<PanelContextType>({+const defaultPanelContext: PanelContextType = {isExplorerCollapsed: false,isPropertiesCollapsed: false,// biome-ignore lint/suspicious/noEmptyBlockStatements: suppressed due to migration@@ -36,7 +46,9 @@ const PanelContext = createContext<PanelContextType>({setIsExplorerCollapsed: () => {},// biome-ignore lint/suspicious/noEmptyBlockStatements: suppressed due to migrationsetIsPropertiesCollapsed: () => {}-});+};++const PanelContext = createContext<PanelContextType>(defaultPanelContext);export function usePanels() {const context = useContext(PanelContext);@@ -51,7 +63,7 @@ interface PanelProviderProps {}export function PanelProvider({ children }: PanelProviderProps) {- const isMobile = useIsMobile();+ const isCompact = useCompact();// Seed both to `false` so the first client render matches the server (which// has no `window`); collapsing based on viewport happens post-mount in the@@ -69,15 +81,14 @@ export function PanelProvider({ children }: PanelProviderProps) {setIsPropertiesCollapsed};- // biome-ignore lint/correctness/useExhaustiveDependencies: suppressed due to migrationuseEffect(() => {- if (isMobile) {+ if (isCompact) {setIsExplorerCollapsed(true);setIsPropertiesCollapsed(true);} else if (window.innerWidth < 1024) {setIsPropertiesCollapsed(true);}- }, [isMobile]);+ }, [isCompact]);return (<PanelContext.Provider value={value}>{children}</PanelContext.Provider>@@ -88,22 +99,112 @@ interface ResizablePanelsProps {explorer?: React.ReactNode;content: React.ReactNode;properties?: React.ReactNode;+ /** Compact tab label for the explorer; defaults to "Lines". */+ explorerLabel?: ReactNode;+}++/** True inside a compact record frame's tab panel (see CompactToolbar). */+export const RecordFrameContext = createContext(false);++/**+ * Phones: one sticky underline tab row instead of side panels: the record's+ * content (or its sub-route tabs), the explorer and the properties. Content+ * comes first because tapping a line changes it.+ */+function CompactRecordTabs({+ explorer,+ content,+ properties,+ explorerLabel+}: ResizablePanelsProps) {+ const { t } = useLingui();+ const location = useOptimisticLocation();+ const recordTabs = recordTabsSlot.useValue();+ recordFrameSlot.useProvide(true);+ const [panel, setPanel] = useState<"content" | "explorer" | "properties">(+ "content"+ );++ // A tapped line (or any navigation) shows its content.+ // biome-ignore lint/correctness/useExhaustiveDependencies: switch back on navigation only+ useEffect(() => {+ setPanel("content");+ }, [location.pathname]);++ const showContent = () => setPanel("content");+ const tabs: CompactTabItem[] = [+ ...(recordTabs?.length+ ? recordTabs.map((tab) => ({+ ...tab,+ active: panel === "content" && tab.active,+ onClick: showContent+ }))+ : [+ {+ id: "content",+ label: t`Overview`,+ active: panel === "content",+ onClick: showContent+ }+ ]),+ ...(explorer+ ? [+ {+ id: "explorer",+ label: explorerLabel ?? t`Lines`,+ active: panel === "explorer",+ onClick: () => setPanel("explorer")+ }+ ]+ : []),+ ...(properties+ ? [+ {+ id: "properties",+ label: t`Properties`,+ active: panel === "properties",+ onClick: () => setPanel("properties")+ }+ ]+ : [])+ ];++ return (+ <div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] w-full flex-col overflow-hidden">+ <CompactTabRow items={tabs} />+ {/* Panels fill the tab area: their own desktop sizes (w-96 border-l,+ fixed heights) give way to the full width and height. */}+ <div+ className={cn(+ "flex min-h-0 flex-1 flex-col overflow-y-auto bg-card",+ // Sub-routes size themselves from --header-height: here that is the+ // hero plus this tab row (44 + 1 border), not the hero alone.+ "[--header-height:calc(var(--hero-height,0px)+45px)]",+ "[&>*]:h-auto [&>*]:min-h-full [&>*]:w-full [&>*]:max-w-none [&>*]:flex-1 [&>*]:border-0"+ )}+ >+ <RecordFrameContext.Provider value>+ {panel === "content"+ ? content+ : panel === "explorer"+ ? explorer+ : properties}+ </RecordFrameContext.Provider>+ </div>+ </div>+ );}export function ResizablePanels({explorer,content,- properties+ properties,+ explorerLabel}: ResizablePanelsProps) {- const {- isExplorerCollapsed,- isPropertiesCollapsed,- setIsExplorerCollapsed,- setIsPropertiesCollapsed- } = usePanels();+ const { isExplorerCollapsed, isPropertiesCollapsed, setIsExplorerCollapsed } =+ usePanels();const panelRef = useRef<ImperativePanelHandle>(null);- const isMobile = useIsMobile();- const location = useOptimisticLocation();+ const isCompact = useCompact();useEffect(() => {if (isExplorerCollapsed) {@@ -113,66 +214,14 @@ export function ResizablePanels({}}, [isExplorerCollapsed]);- // On mobile the side panels overlay the content as drawers; collapse them once- // the pathname changes (e.g. picking an item in the explorer) so the drawer- // doesn't sit over the destination.- useEffect(() => {- if (isMobile) {- setIsExplorerCollapsed(true);- setIsPropertiesCollapsed(true);- }- }, [- location.pathname,- isMobile,- setIsExplorerCollapsed,- setIsPropertiesCollapsed- ]);-- // A resizable column split is unreadable at phone width. Render the content- // full-width and float the explorer / properties as overlay drawers instead.- if (isMobile) {+ if (isCompact) {return (- <div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] w-full overflow-hidden">- {content}- {explorer && (- <Drawer- open={!isExplorerCollapsed}- onOpenChange={(open) => setIsExplorerCollapsed(!open)}- >- <DrawerContent- position="left"- size="content"- className="w-[20rem] max-w-[90vw] p-0"- >- <DrawerTitle className="sr-only">- <Trans>Explorer</Trans>- </DrawerTitle>- <div className="flex flex-1 min-h-0 flex-col overflow-hidden">- {explorer}- </div>- </DrawerContent>- </Drawer>- )}- {properties && (- <Drawer- open={!isPropertiesCollapsed}- onOpenChange={(open) => setIsPropertiesCollapsed(!open)}- >- <DrawerContent- position="right"- size="content"- className="w-[20rem] max-w-[90vw] p-0"- >- <DrawerTitle className="sr-only">- <Trans>Properties</Trans>- </DrawerTitle>- <div className="flex flex-1 min-h-0 flex-col overflow-hidden">- {properties}- </div>- </DrawerContent>- </Drawer>- )}- </div>+ <CompactRecordTabs+ explorer={explorer}+ content={content}+ properties={properties}+ explorerLabel={explorerLabel}+ />);}diff --git a/apps/erp/app/components/Layout/RecordHeader.tsx b/apps/erp/app/components/Layout/RecordHeader.tsxnew file mode 100644index 0000000000..f0f97246b6--- /dev/null+++ b/apps/erp/app/components/Layout/RecordHeader.tsx@@ -0,0 +1,364 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ ActionPresentationProvider,+ BottomSheet,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle,+ Copy,+ cn,+ copyToClipboard,+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuIcon,+ DropdownMenuItem,+ DropdownMenuTrigger,+ Heading,+ HStack,+ IconButton,+ toast,+ useCompact+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import type { ReactNode } from "react";+import { useState } from "react";+import {+ LuCopy,+ LuEllipsis,+ LuEllipsisVertical,+ LuPanelLeft,+ LuPanelRight+} from "react-icons/lu";+import { Link } from "react-router";+import { create } from "zustand";+import {+ AppBarActions,+ BottomBar,+ useCompactCssVar+} from "./Mobile/ChromeSlots";+import { createPortalSlot } from "./Mobile/slots";++/** Where record actions go on phones: the bottom bar's cells, the ⋯ sheet. */+const primarySlot = createPortalSlot();+const secondarySlot = createPortalSlot();+const overflowSlot = createPortalSlot();+/** A card form's hero: DocumentHeader fills it, the page places it. */+export const recordHeroSlot = createPortalSlot();++/** The ⋯ action sheet; one record frame shows at a time, like its slot. */+const useOverflowSheet = create<{+ open: boolean;+ setOpen: (open: boolean) => void;+}>()((set) => ({ open: false, setOpen: (open) => set({ open }) }));+const closeOverflow = () => useOverflowSheet.getState().setOpen(false);++const presentations = {+ primary: { kind: "bar", emphasis: "primary" },+ secondary: { kind: "bar", emphasis: "secondary" },+ overflow: { kind: "row", onSelect: closeOverflow }+} as const;+const slots = {+ primary: primarySlot,+ secondary: secondarySlot,+ overflow: overflowSlot+};++/**+ * A record header action. Desktop renders it in place; phones move it to+ * the bottom bar (`primary` filled, `secondary` outline) or the ⋯ sheet+ * (`overflow`), and its Button renders to match (see ActionPresentation).+ */+export function RecordAction({+ slot,+ children+}: {+ slot: "primary" | "secondary" | "overflow";+ children: ReactNode;+}) {+ const isCompact = useCompact();+ if (!isCompact) return <>{children}</>;+ const { Fill } = slots[slot];+ return (+ <Fill>+ <ActionPresentationProvider value={presentations[slot]}>+ {children}+ </ActionPresentationProvider>+ </Fill>+ );+}++/**+ * Phones: the record's name, subtitle and status under the app bar. Kept+ * mounted (hidden) when empty, so --header-height still resolves (to 0):+ * record frames size their body from it, and here the hero takes the place+ * of the desktop header.+ */+export function RecordHero({+ title,+ subtitle,+ status,+ bleed = false+}: {+ title?: ReactNode;+ subtitle?: ReactNode;+ status?: ReactNode;+ /** The page pads its content by 16pt: pull the hero out to the edges. */+ bleed?: boolean;+}) {+ const isCompact = useCompact();+ const [element, setElement] = useState<HTMLElement | null>(null);+ useCompactCssVar("--header-height", element);+ useCompactCssVar("--hero-height", element);+ if (!isCompact) return null;++ const hasHero = Boolean(title || subtitle || status);+ return (+ <div+ ref={setElement}+ className={cn(+ "flex shrink-0 flex-col self-stretch",+ hasHero ? "gap-1.5 border-b border-border bg-card px-4 py-3" : "hidden",+ bleed && "-mx-4 -mt-4"+ )}+ >+ {title ? (+ <h1 className="min-w-0 truncate text-[22px] font-semibold leading-tight text-foreground">+ {title}+ </h1>+ ) : null}+ {subtitle ? (+ <p className="min-w-0 truncate text-[13px] text-muted-foreground">+ {subtitle}+ </p>+ ) : null}+ {status ? (+ <div className="flex min-w-0 flex-wrap items-center gap-1.5 empty:hidden">+ {status}+ </div>+ ) : null}+ </div>+ );+}++/** Where a card form's hero shows on phones (see DocumentHeader). */+export function RecordHeroTarget({ bleed = false }: { bleed?: boolean }) {+ const isCompact = useCompact();+ if (!isCompact) return null;+ return (+ <recordHeroSlot.Target+ className={cn("flex flex-col self-stretch", bleed && "-mx-4 -mt-4")}+ />+ );+}++const cellClassName =+ "flex min-w-0 flex-1 empty:hidden [&>*]:w-full [&>*]:min-w-0";++/**+ * Phones: the record's app-bar ⋯ (Copy ID and its menu) and the bottom+ * action bar with the ⋯ sheet that its RecordActions fill. Renders nothing+ * at md and above.+ */+export function RecordPhoneChrome({+ menu,+ copyValue+}: {+ menu?: ReactNode;+ copyValue?: string;+}) {+ const { t } = useLingui();+ const isCompact = useCompact();+ const hasPrimary = primarySlot.useFilled();+ const hasSecondary = secondarySlot.useFilled();+ const hasOverflow = overflowSlot.useFilled();+ const { open, setOpen } = useOverflowSheet();+ if (!isCompact) return null;++ const onCopy = async () => {+ if (copyValue && (await copyToClipboard(copyValue))) {+ toast.success(t`Copied to clipboard`);+ }+ };++ return (+ <>+ {menu || copyValue ? (+ <AppBarActions>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton+ className="order-last"+ aria-label={t`More options`}+ icon={<LuEllipsis />}+ variant="ghost"+ size="lg"+ />+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ {copyValue ? (+ <DropdownMenuItem onClick={onCopy}>+ <DropdownMenuIcon icon={<LuCopy />} />+ <Trans>Copy ID</Trans>+ </DropdownMenuItem>+ ) : null}+ {menu}+ </DropdownMenuContent>+ </DropdownMenu>+ </AppBarActions>+ ) : null}++ {hasPrimary || hasSecondary || hasOverflow ? (+ <BottomBar>+ <div className="flex items-center gap-2 border-t border-border bg-card px-4 pt-2 pb-safe-4 [&>*]:min-w-0">+ <primarySlot.Target className={cellClassName} />+ <secondarySlot.Target className={cellClassName} />+ {hasOverflow ? (+ <IconButton+ aria-label={t`More actions`}+ icon={<LuEllipsis />}+ variant="secondary"+ size="lg"+ className="ml-auto shrink-0"+ onClick={() => setOpen(true)}+ />+ ) : null}+ </div>+ </BottomBar>+ ) : null}++ <BottomSheet open={open} onOpenChange={setOpen}>+ <BottomSheetContent>+ <BottomSheetHeader>+ <BottomSheetTitle>+ <Trans>Actions</Trans>+ </BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody>+ <overflowSlot.Target className="flex flex-col [&>*]:w-full" />+ </BottomSheetBody>+ </BottomSheetContent>+ </BottomSheet>+ </>+ );+}++type RecordHeaderProps = {+ /** The record's name. Phones show it in the app bar (the breadcrumb). */+ title: ReactNode;+ /**+ * Phones: render `title` in the hero instead. For a title the user edits+ * (a name input): it renders once, in the desktop row or the hero.+ */+ titleInHero?: boolean;+ /** Links the desktop title (usually the record's details page). */+ titleTo?: string;+ /** Desktop <Copy> and the phone app bar's "Copy ID". */+ copyValue?: string;+ /** The ⋯ menu items: desktop beside the title, phones in the app bar. */+ menu?: ReactNode;+ /** Status badges: desktop after the ⋯, phones in the hero. */+ status?: ReactNode;+ /** Phones: a line under the hero title. */+ subtitle?: ReactNode;+ onToggleExplorer?: () => void;+ onToggleProperties?: () => void;+ /** Desktop: a node before the actions (an item's sub-route tabs). */+ aside?: ReactNode;+ /** The record's actions, each in a RecordAction. */+ actions?: ReactNode;+};++/**+ * A record page's header: the desktop row, and on phones a hero, the+ * app-bar ⋯ and a bottom action bar, all from one set of props. The desktop+ * row stays mounted (hidden) on phones, for its modals and portalled actions.+ */+export function RecordHeader({+ title,+ titleInHero = false,+ titleTo,+ copyValue,+ menu,+ status,+ subtitle,+ onToggleExplorer,+ onToggleProperties,+ aside,+ actions+}: RecordHeaderProps) {+ const { t } = useLingui();+ const isCompact = useCompact();+ // An editable title is a control (a name input), not a heading.+ const heading = titleInHero ? (+ title+ ) : (+ <Heading size="h4" className="flex items-center gap-2">+ {title}+ </Heading>+ );++ return (+ <>+ <RecordHero+ title={isCompact && titleInHero ? title : undefined}+ subtitle={subtitle}+ status={status}+ />+ <RecordPhoneChrome menu={menu} copyValue={copyValue} />+ <div+ className={cn(+ "flex flex-shrink-0 items-center justify-between gap-x-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide compact:hidden",+ onToggleExplorer ? "pl-2" : "pl-4",+ onToggleProperties ? "pr-2" : "pr-4"+ )}+ >+ <HStack className="min-w-0">+ {onToggleExplorer ? (+ <IconButton+ aria-label={t`Toggle Explorer`}+ icon={<LuPanelLeft />}+ onClick={onToggleExplorer}+ variant="ghost"+ />+ ) : null}+ {isCompact && titleInHero ? null : titleTo ? (+ <Link to={titleTo}>{heading}</Link>+ ) : (+ heading+ )}+ {copyValue ? <Copy text={copyValue} /> : null}+ {menu ? (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton+ aria-label={t`More options`}+ icon={<LuEllipsisVertical />}+ variant="secondary"+ size="sm"+ />+ </DropdownMenuTrigger>+ <DropdownMenuContent>{menu}</DropdownMenuContent>+ </DropdownMenu>+ ) : null}+ {status}+ </HStack>+ <HStack>+ {aside}+ {actions}+ {onToggleProperties ? (+ <IconButton+ aria-label={t`Toggle Properties`}+ icon={<LuPanelRight />}+ onClick={onToggleProperties}+ variant="ghost"+ />+ ) : null}+ </HStack>+ </div>+ </>+ );+}diff --git a/apps/erp/app/components/Layout/Topbar/Breadcrumbs.tsx b/apps/erp/app/components/Layout/Topbar/Breadcrumbs.tsxindex 9438f46d56..6788d8764f 100644--- a/apps/erp/app/components/Layout/Topbar/Breadcrumbs.tsx+++ b/apps/erp/app/components/Layout/Topbar/Breadcrumbs.tsx@@ -24,7 +24,6 @@ import {ModalTitle,ScrollArea,useDisclosure,- useIsMobile,useMode,VStack} from "@carbon/react";@@ -66,7 +65,12 @@ const BreadcrumbHandleMatch = z.object({handle: BreadcrumbHandle});-const Breadcrumbs = () => {+/**+ * The current route's breadcrumbs from each match's `handle.breadcrumb`, with+ * `msg` descriptors translated. Desktop renders them as Breadcrumbs; the+ * compact app bar derives its title, subtitle and Back target from them.+ */+export function useBreadcrumbs() {const { i18n } = useLingui();const matches = useMatches();@@ -103,7 +107,12 @@ const Breadcrumbs = () => {}));});- const isMobile = useIsMobile();+ return breadcrumbs;+}++const Breadcrumbs = () => {+ const breadcrumbs = useBreadcrumbs();+const { company } = useUser();const mode = useMode();const logo = mode === "dark" ? company?.logoDarkIcon : company?.logoLightIcon;@@ -125,7 +134,7 @@ const Breadcrumbs = () => {</Button><BreadcrumbsBase className="line-clamp-1">- {!isMobile && <CompanyBreadcrumb />}+ <CompanyBreadcrumb />{breadcrumbs.map((breadcrumb, i) => (<BreadcrumbItem key={i}><BreadcrumbLinkdiff --git a/apps/erp/app/components/Layout/Topbar/CompanySwitcher.tsx b/apps/erp/app/components/Layout/Topbar/CompanySwitcher.tsxindex 8462e63db4..0745dbef4f 100644--- a/apps/erp/app/components/Layout/Topbar/CompanySwitcher.tsx+++ b/apps/erp/app/components/Layout/Topbar/CompanySwitcher.tsx@@ -35,22 +35,16 @@ export function useCompanySwitchRedirect() {return Object.keys(params).length === 0 ? `${pathname}${search}` : undefined;}-const CompanySwitcher = () => {- const switchRedirect = useCompanySwitchRedirect();+/**+ * The user's companies grouped by company group (single-company groups fold+ * into "Companies"). Used by the company switcher and the compact Profile sheet.+ */+export function useCompanyGroups() {const { t } = useLingui();const routeData = useRouteData<{ company: Company; companies: Company[] }>(path.to.authenticatedRoot);- const user = useUser();- const mode = useMode();-- const hasMultipleCompanies = Boolean(- routeData?.companies && routeData?.companies.length > 1- );-- const canSwitchCompany = hasMultipleCompanies;-- const companyGroups = useMemo(() => {+ return useMemo(() => {if (!routeData?.companies) return [];const groups = new Map<string, { name: string; companies: Company[] }>();@@ -90,6 +84,23 @@ const CompanySwitcher = () => {return Array.from(result.values());}, [routeData?.companies, t]);+}++const CompanySwitcher = () => {+ const switchRedirect = useCompanySwitchRedirect();+ const routeData = useRouteData<{ company: Company; companies: Company[] }>(+ path.to.authenticatedRoot+ );+ const user = useUser();+ const mode = useMode();++ const hasMultipleCompanies = Boolean(+ routeData?.companies && routeData?.companies.length > 1+ );++ const canSwitchCompany = hasMultipleCompanies;++ const companyGroups = useCompanyGroups();if (!canSwitchCompany) {// Just show the company logo without dropdowndiff --git a/apps/erp/app/components/Layout/Topbar/CreateMenu.tsx b/apps/erp/app/components/Layout/Topbar/CreateMenu.tsxindex d9ed0478f2..104f9fa622 100644--- a/apps/erp/app/components/Layout/Topbar/CreateMenu.tsx+++ b/apps/erp/app/components/Layout/Topbar/CreateMenu.tsx@@ -31,7 +31,7 @@ import { usePermissions } from "~/hooks";import type { Route } from "~/types";import { path } from "~/utils/path";-function useCreate(): Route[] {+export function useCreate(): Route[] {const permissions = usePermissions();const { t } = useLingui();diff --git a/apps/erp/app/components/Layout/Topbar/Notifications.tsx b/apps/erp/app/components/Layout/Topbar/Notifications.tsxindex 4ef2c05ab2..a843af48c4 100644--- a/apps/erp/app/components/Layout/Topbar/Notifications.tsx+++ b/apps/erp/app/components/Layout/Topbar/Notifications.tsx@@ -90,7 +90,7 @@ function getNotificationBody(function EmptyState({ description }: { description: string }) {return (- <div className="h-[460px] flex items-center justify-center flex-col gap-y-4">+ <div className="h-[460px] compact:h-auto compact:py-16 flex items-center justify-center flex-col gap-y-4"><div className="w-12 h-12 rounded-full bg-accent flex items-center justify-center"><LuInbox size={18} /></div>@@ -642,14 +642,35 @@ function DigestNotification({);}-const Notifications = () => {+/**+ * The notification tabs (Inbox, Trainings, Archive). The desktop bell+ * popover and the compact Profile sheet's Notifications drill-in both+ * render it; the caller owns `useNotifications` so the unread badge and the+ * panel share one subscription.+ */+export function NotificationsPanel({+ isOpen,+ onClose,+ activeTab,+ onActiveTabChange,+ notifications: {+ fetchDigestChildren,+ hasUnseenNotifications,+ notifications,+ markMessageAsRead,+ markAllMessagesAsSeen,+ markAllMessagesAsRead+ }+}: {+ isOpen: boolean;+ onClose: () => void;+ /** Owned by the caller: the desktop popover unmounts the panel on close+ * and reopens on the last tab. */+ activeTab: string;+ onActiveTabChange: (tab: string) => void;+ notifications: ReturnType<typeof useNotifications>;+}) {const { t } = useLingui();- const {- id: userId,- company: { id: companyId }- } = useUser();- const [isOpen, setOpen] = useState(false);- const [activeTab, setActiveTab] = useState("inbox");// Loaded when the tab is opened, and again each time the popover reopens.const trainingsFetcher = useLoaderQuery<{ data: OutstandingTraining[] }>(isOpen && activeTab === "trainings"@@ -658,18 +679,6 @@ const Notifications = () => {{ staleTime: 0 });- const {- fetchDigestChildren,- hasUnseenNotifications,- notifications,- markMessageAsRead,- markAllMessagesAsSeen,- markAllMessagesAsRead- } = useNotifications({- companyId,- userId- });-const unreadNotifications = notifications.filter((notification) => !notification.read);@@ -688,6 +697,189 @@ const Notifications = () => {const outstandingTrainings = trainingsFetcher.data?.data ?? [];const isLoadingTrainings = trainingsFetcher.isFetching;+ return (+ <Tabs+ defaultValue="inbox"+ value={activeTab}+ onValueChange={onActiveTabChange}+ >+ <TabsList className="w-full border-b py-2 rounded-none bg-muted/50">+ <TabsTrigger value="inbox" className="font-normal">+ <Trans>Inbox</Trans>+ </TabsTrigger>+ <TabsTrigger value="trainings" className="font-normal">+ <Trans>Trainings</Trans>+ </TabsTrigger>+ <TabsTrigger value="archive" className="font-normal">+ <Trans>Archive</Trans>+ </TabsTrigger>+ </TabsList>++ {/* <Link+ to={path.to.notificationSettings}+ className="absolute right-[11px] top-1.5"+ >+ <IconButton+ aria-label={t`Settings`}+ icon={<LuSettings />}+ variant="ghost"+ isIcon+ className="rounded-full"+ onClick={() => onClose()}+ />+ </Link> */}++ <TabsContent value="inbox" className="relative mt-0">+ {!unreadNotifications.length && (+ <EmptyState description={t`No new notifications`} />+ )}++ {unreadNotifications.length > 0 && (+ <ScrollArea className="pb-12 h-[485px] compact:h-auto">+ <div className="divide-y">+ {unreadNotifications.map((notification) => {+ const event = notification.payload.event as NotificationEvent;+ if (event === NotificationEvent.Digest) {+ return (+ <DigestNotification+ key={notification._id}+ id={notification._id}+ description={notification.payload.description as string}+ markMessageAsRead={() =>+ markMessageAsRead(notification._id)+ }+ onClose={() => onClose()}+ fetchChildren={fetchDigestChildren}+ />+ );+ }+ return (+ <GenericNotification+ key={notification._id}+ id={notification.payload.documentId as string}+ createdAt={notification.createdAt}+ description={notification.payload.description as string}+ body={getNotificationBody(notification.payload, event)}+ event={event}+ from={notification.payload.from as string | undefined}+ documentType={+ notification.payload.documentType as+ | ApprovalDocumentType+ | undefined+ }+ markMessageAsRead={() =>+ markMessageAsRead(notification._id)+ }+ onClose={() => onClose()}+ />+ );+ })}+ </div>+ </ScrollArea>+ )}++ {unreadNotifications.length > 0 && (+ <div className="h-12 w-full absolute bottom-0 flex items-center justify-center border-t">+ <Button+ variant="secondary"+ className="bg-transparent"+ onClick={markAllMessagesAsRead}+ >+ <Trans>Archive all</Trans>+ </Button>+ </div>+ )}+ </TabsContent>++ <TabsContent value="trainings" className="mt-0">+ {isLoadingTrainings && (+ <div className="h-[460px] compact:h-auto compact:py-16 flex items-center justify-center">+ <Spinner />+ </div>+ )}++ {!isLoadingTrainings && outstandingTrainings.length === 0 && (+ <EmptyState description={t`No outstanding trainings`} />+ )}++ {!isLoadingTrainings && outstandingTrainings.length > 0 && (+ <ScrollArea className="h-[490px] compact:h-auto">+ <div className="divide-y">+ {outstandingTrainings.map((training) => (+ <TrainingItem+ key={training.trainingAssignmentId}+ training={training}+ onClose={() => onClose()}+ />+ ))}+ </div>+ </ScrollArea>+ )}+ </TabsContent>++ <TabsContent value="archive" className="mt-0">+ {!archivedNotifications.length && (+ <EmptyState description={t`Nothing in the archive`} />+ )}++ {archivedNotifications.length > 0 && (+ <ScrollArea className="h-[490px] compact:h-auto">+ <div className="divide-y">+ {archivedNotifications.map((notification) => {+ const event = notification.payload.event as NotificationEvent;+ if (event === NotificationEvent.Digest) {+ return (+ <DigestNotification+ key={notification._id}+ id={notification._id}+ description={notification.payload.description as string}+ onClose={() => onClose()}+ fetchChildren={fetchDigestChildren}+ />+ );+ }+ return (+ <GenericNotification+ key={notification._id}+ id={notification.payload.documentId as string}+ createdAt={notification.createdAt}+ description={notification.payload.description as string}+ body={getNotificationBody(notification.payload, event)}+ event={event}+ from={notification.payload.from as string | undefined}+ documentType={+ notification.payload.documentType as+ | ApprovalDocumentType+ | undefined+ }+ onClose={() => onClose()}+ />+ );+ })}+ </div>+ </ScrollArea>+ )}+ </TabsContent>+ </Tabs>+ );+}++const Notifications = () => {+ const {+ id: userId,+ company: { id: companyId }+ } = useUser();+ const [isOpen, setOpen] = useState(false);+ const [activeTab, setActiveTab] = useState("inbox");+ const notificationsState = useNotifications({+ companyId,+ userId+ });++ const unreadNotifications = notificationsState.notifications.filter(+ (notification) => !notification.read+ );+return (<Popover onOpenChange={setOpen} open={isOpen}><PopoverTrigger asChild>@@ -709,175 +901,13 @@ const Notifications = () => {align="end"sideOffset={10}>- <Tabs- defaultValue="inbox"- value={activeTab}- onValueChange={setActiveTab}- >- <TabsList className="w-full border-b py-2 rounded-none bg-muted/50">- <TabsTrigger value="inbox" className="font-normal">- <Trans>Inbox</Trans>- </TabsTrigger>- <TabsTrigger value="trainings" className="font-normal">- <Trans>Trainings</Trans>- </TabsTrigger>- <TabsTrigger value="archive" className="font-normal">- <Trans>Archive</Trans>- </TabsTrigger>- </TabsList>-- {/* <Link- to={path.to.notificationSettings}- className="absolute right-[11px] top-1.5"- >- <IconButton- aria-label={t`Settings`}- icon={<LuSettings />}- variant="ghost"- isIcon- className="rounded-full"- onClick={() => setOpen(false)}- />- </Link> */}-- <TabsContent value="inbox" className="relative mt-0">- {!unreadNotifications.length && (- <EmptyState description={t`No new notifications`} />- )}-- {unreadNotifications.length > 0 && (- <ScrollArea className="pb-12 h-[485px]">- <div className="divide-y">- {unreadNotifications.map((notification) => {- const event = notification.payload- .event as NotificationEvent;- if (event === NotificationEvent.Digest) {- return (- <DigestNotification- key={notification._id}- id={notification._id}- description={- notification.payload.description as string- }- markMessageAsRead={() =>- markMessageAsRead(notification._id)- }- onClose={() => setOpen(false)}- fetchChildren={fetchDigestChildren}- />- );- }- return (- <GenericNotification- key={notification._id}- id={notification.payload.documentId as string}- createdAt={notification.createdAt}- description={notification.payload.description as string}- body={getNotificationBody(notification.payload, event)}- event={event}- from={notification.payload.from as string | undefined}- documentType={- notification.payload.documentType as- | ApprovalDocumentType- | undefined- }- markMessageAsRead={() =>- markMessageAsRead(notification._id)- }- onClose={() => setOpen(false)}- />- );- })}- </div>- </ScrollArea>- )}-- {unreadNotifications.length > 0 && (- <div className="h-12 w-full absolute bottom-0 flex items-center justify-center border-t">- <Button- variant="secondary"- className="bg-transparent"- onClick={markAllMessagesAsRead}- >- <Trans>Archive all</Trans>- </Button>- </div>- )}- </TabsContent>-- <TabsContent value="trainings" className="mt-0">- {isLoadingTrainings && (- <div className="h-[460px] flex items-center justify-center">- <Spinner />- </div>- )}-- {!isLoadingTrainings && outstandingTrainings.length === 0 && (- <EmptyState description={t`No outstanding trainings`} />- )}-- {!isLoadingTrainings && outstandingTrainings.length > 0 && (- <ScrollArea className="h-[490px]">- <div className="divide-y">- {outstandingTrainings.map((training) => (- <TrainingItem- key={training.trainingAssignmentId}- training={training}- onClose={() => setOpen(false)}- />- ))}- </div>- </ScrollArea>- )}- </TabsContent>-- <TabsContent value="archive" className="mt-0">- {!archivedNotifications.length && (- <EmptyState description={t`Nothing in the archive`} />- )}-- {archivedNotifications.length > 0 && (- <ScrollArea className="h-[490px]">- <div className="divide-y">- {archivedNotifications.map((notification) => {- const event = notification.payload- .event as NotificationEvent;- if (event === NotificationEvent.Digest) {- return (- <DigestNotification- key={notification._id}- id={notification._id}- description={- notification.payload.description as string- }- onClose={() => setOpen(false)}- fetchChildren={fetchDigestChildren}- />- );- }- return (- <GenericNotification- key={notification._id}- id={notification.payload.documentId as string}- createdAt={notification.createdAt}- description={notification.payload.description as string}- body={getNotificationBody(notification.payload, event)}- event={event}- from={notification.payload.from as string | undefined}- documentType={- notification.payload.documentType as- | ApprovalDocumentType- | undefined- }- onClose={() => setOpen(false)}- />- );- })}- </div>- </ScrollArea>- )}- </TabsContent>- </Tabs>+ <NotificationsPanel+ isOpen={isOpen}+ onClose={() => setOpen(false)}+ activeTab={activeTab}+ onActiveTabChange={setActiveTab}+ notifications={notificationsState}+ /></PopoverContent></Popover>);diff --git a/apps/erp/app/components/Layout/Topbar/Search.tsx b/apps/erp/app/components/Layout/Topbar/Search.tsxindex 218fec4d0f..8652f4cb56 100644--- a/apps/erp/app/components/Layout/Topbar/Search.tsx+++ b/apps/erp/app/components/Layout/Topbar/Search.tsx@@ -11,6 +11,7 @@ import {CommandSeparator,cn,Modal,+ ModalClose,ModalContent,Subheading,useDebounce,@@ -83,6 +84,7 @@ export const SearchModal = () => {const [input, setInput] = useState("");const [typeFilter, setTypeFilter] = useState<EntityTypeFilter>("all");const typeFilterRef = useRef<EntityTypeFilter>(typeFilter);+ const inputRef = useRef<HTMLInputElement>(null);typeFilterRef.current = typeFilter;const [isDebouncing, setIsDebouncing] = useState(false);@@ -234,18 +236,35 @@ export const SearchModal = () => {}}><ModalContent- className="rounded-lg p-0 h-[520px] max-w-2xl overflow-hidden dark:shadow-button"+ className="rounded-lg p-0 h-[520px] max-w-2xl overflow-hidden dark:shadow-button compact:h-[calc(100dvh-env(safe-area-inset-top)-12px)] compact:max-h-none compact:max-w-none compact:pt-4"withCloseButton={false}+ // Sheets keep focus off their fields on phones; search is the+ // exception, since typing is the only thing it is opened for.+ onOpenAutoFocus={(event) => {+ event.preventDefault();+ inputRef.current?.focus();+ }}><Command shouldFilter={false} className="h-full flex flex-col">{/* Search Input */}- <CommandInput- placeholder={t`Search across your workspace...`}- value={input}- onValueChange={onInputChange}- className="h-14 text-base"- />+ {/* Phones: the sheet has no Esc key, so the input row carries a+ close button. */}+ <div className="contents compact:flex compact:items-center compact:border-b compact:border-border compact:pr-1 compact:[&>[cmdk-input-wrapper]]:flex-1 compact:[&>[cmdk-input-wrapper]]:border-b-0">+ <CommandInput+ ref={inputRef}+ placeholder={t`Search across your workspace...`}+ value={input}+ onValueChange={onInputChange}+ className="h-14 text-base"+ />+ <ModalClose+ aria-label={t`Close`}+ className="hidden compact:flex size-11 shrink-0 items-center justify-center rounded-full text-muted-foreground outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50"+ >+ <LuX className="size-5" />+ </ModalClose>+ </div><SearchFilterChipsselectedFilter={typeFilter}@@ -321,7 +340,7 @@ export const SearchModal = () => {<buttontype="button"onClick={(e) => removeRecentSearch(result.to, e)}- className="flex-shrink-0 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity"+ className="flex-shrink-0 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity compact:opacity-100"><LuX className="w-4 h-4 text-muted-foreground" /></button>@@ -375,7 +394,7 @@ export const SearchModal = () => {{item.name}</span></span>- <LuCornerDownLeft className="w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" />+ <LuCornerDownLeft className="w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity compact:opacity-100" /></CommandItem>))}</CommandGroup>@@ -428,7 +447,7 @@ export const SearchModal = () => {</span>)}</VStack>- <LuChevronRight className="w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" />+ <LuChevronRight className="w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity compact:opacity-100" /></CommandItem>))}</CommandGroup>@@ -441,7 +460,7 @@ export const SearchModal = () => {</CommandList>{/* Footer */}- <div className="border-t border-border px-4 py-2 flex items-center justify-between text-xs text-muted-foreground">+ <div className="border-t border-border px-4 py-2 flex items-center justify-between text-xs text-muted-foreground compact:hidden"><div className="flex items-center gap-3"><span className="flex items-center gap-1"><kbd className="px-1.5 py-0.5 rounded bg-muted font-mono text-[10px]">diff --git a/apps/erp/app/components/Layout/Topbar/Search/SearchResultItem.tsx b/apps/erp/app/components/Layout/Topbar/Search/SearchResultItem.tsxindex bdc0ab4480..5c214d2197 100644--- a/apps/erp/app/components/Layout/Topbar/Search/SearchResultItem.tsx+++ b/apps/erp/app/components/Layout/Topbar/Search/SearchResultItem.tsx@@ -60,10 +60,10 @@ export function SearchResultItem({{/* Entity type label + chevron */}<div className="flex-shrink-0 flex items-center gap-2 text-muted-foreground">- <span className="text-xs font-medium opacity-0 group-hover:opacity-100 transition-opacity">+ <span className="text-xs font-medium opacity-0 group-hover:opacity-100 transition-opacity compact:opacity-100">{entityLabel}</span>- <LuChevronRight className="w-4 h-4 opacity-0 group-hover:opacity-100 transition-opacity" />+ <LuChevronRight className="w-4 h-4 opacity-0 group-hover:opacity-100 transition-opacity compact:opacity-100" /></div></button>);diff --git a/apps/erp/app/components/Layout/Topbar/Topbar.tsx b/apps/erp/app/components/Layout/Topbar/Topbar.tsxindex e00be42887..788c79d258 100644--- a/apps/erp/app/components/Layout/Topbar/Topbar.tsx+++ b/apps/erp/app/components/Layout/Topbar/Topbar.tsx@@ -2,16 +2,13 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { HStack, IconButton } from "@carbon/react";+import { HStack, IconButton, useCompact } from "@carbon/react";import { useLingui } from "@lingui/react/macro";-import { LuPanelLeft, LuSquarePen } from "react-icons/lu";+import { LuSquarePen } from "react-icons/lu";import { useUser } from "~/hooks";-import { useUIStore } from "~/stores/ui";import AvatarMenu from "../../AvatarMenu";-import MobileNavigation from "../Navigation/MobileNavigation";import AskDocs from "./AskDocs";import Breadcrumbs from "./Breadcrumbs";-import CompanySwitcher from "./CompanySwitcher";import CreateMenu from "./CreateMenu";import Notifications from "./Notifications";import Suggestion from "./Suggestion";@@ -20,26 +17,16 @@ const Topbar = () => {const { t } = useLingui();const user = useUser();const notificationsKey = `${user.id}:${user.company.id}`;- const hasContentSidebar = useUIStore((s) => s.hasContentSidebar);- const toggleSidebar = useUIStore((s) => s.toggleSidebar);+ // Phones get the MobileAppBar and MobileTabBar instead; returning early+ // also keeps the notifications subscription and menus from mounting there.+ const isCompact = useCompact();+ if (isCompact) return null;return (<div className="h-[var(--topbar-height)] grid grid-cols-[1fr_auto] bg-card border-b border-border text-foreground px-4 top-0 sticky z-10 items-center"><div className="flex-1 hidden md:block"><Breadcrumbs /></div>- <div className="flex-1 md:hidden flex items-center gap-1 min-w-0">- <MobileNavigation />- {hasContentSidebar && (- <IconButton- aria-label={t`Sections`}- icon={<LuPanelLeft />}- variant="ghost"- onClick={toggleSidebar}- />- )}- <CompanySwitcher />- </div><HStack spacing={1} className="flex-1 justify-end py-2"><div className="hidden sm:block"><AskDocs />diff --git a/apps/erp/app/components/LineReorder/useLineOrderEditMode.ts b/apps/erp/app/components/LineReorder/useLineOrderEditMode.tsindex 9d09a088c7..eea582a17a 100644--- a/apps/erp/app/components/LineReorder/useLineOrderEditMode.ts+++ b/apps/erp/app/components/LineReorder/useLineOrderEditMode.ts@@ -106,7 +106,7 @@ export function useLineOrderEditMode<T extends ReorderableLine>({useEffect(() => {if (!isEditing) return;const onKey = (e: KeyboardEvent) => {- if (e.key === "Escape") cancelEditMode();+ if (e.key === "Escape" && !e.defaultPrevented) cancelEditMode();};document.addEventListener("keydown", onKey);return () => document.removeEventListener("keydown", onKey);diff --git a/apps/erp/app/components/Location.tsx b/apps/erp/app/components/Location.tsxindex f9b34190bf..84e02e5994 100644--- a/apps/erp/app/components/Location.tsx+++ b/apps/erp/app/components/Location.tsx@@ -49,7 +49,9 @@ const Location = ({ location, actions }: LocationProps) => {<div className="grid w-full gap-4 grid-cols-[auto_1fr_auto]"><LuMapPin className="size-5 mt-2" /><VStack spacing={0}>- <p className="font-bold line-clamp-1">{locationName}</p>+ <p className="font-bold line-clamp-1 compact:font-semibold">+ {locationName}+ </p><p className="text-sm text-muted-foreground line-clamp-1">{addressLines}</p>diff --git a/apps/erp/app/components/MetricCard.tsx b/apps/erp/app/components/MetricCard.tsxindex eebf4ebc2c..dbb8146d73 100644--- a/apps/erp/app/components/MetricCard.tsx+++ b/apps/erp/app/components/MetricCard.tsx@@ -7,11 +7,13 @@ import {Card,CardContent,CardHeader,- CardTitle+ CardTitle,+ cn,+ useCompact} from "@carbon/react";import { useLingui } from "@lingui/react/macro";import type { ReactNode } from "react";-import { LuArrowUpRight } from "react-icons/lu";+import { LuArrowUpRight, LuChevronRight } from "react-icons/lu";import { Link } from "react-router";type MetricCardProps = {@@ -34,17 +36,28 @@ const MetricCard = ({className}: MetricCardProps) => {const { t } = useLingui();+ const isCompact = useCompact();+ // Compact: the whole tile is the link, so no View button.+ // The link is then the grid item, so it takes the caller's layout classes.+ const isLinkTile = isCompact && !!to;- return (- <Card className={className}>+ const card = (+ <Card className={cn(!isLinkTile && className, "compact:h-full")}><CardHeader className="flex-row items-center gap-2">{icon && (<span className="flex-shrink-0 text-muted-foreground">{icon}</span>)}- <CardTitle className="flex-1 min-w-0 truncate line-clamp-none">+ <CardTitle+ className={cn(+ "flex-1 min-w-0 line-clamp-none",+ // Phones: two lines, so similar labels stay distinguishable; always two+ // lines tall, so values line up across a row of tiles.+ isCompact ? "line-clamp-2 min-h-[2lh] text-[13px]" : "truncate"+ )}+ >{title}</CardTitle>- {to && (+ {to && !isLinkTile && (<Buttonaria-label={linkLabel}asChild@@ -56,9 +69,13 @@ const MetricCard = ({<Link to={to}>{t`View`}</Link></Button>)}+ {/* The View button's place on a link tile: the whole tile opens. */}+ {isLinkTile && (+ <LuChevronRight className="size-4 shrink-0 text-muted-foreground" />+ )}</CardHeader><CardContent>- <h3 className="text-4xl font-medium tracking-tighter tabular-nums truncate">+ <h3 className="text-4xl font-medium tracking-tighter tabular-nums truncate compact:text-[26px] compact:font-semibold compact:tracking-tight">{value}</h3>{description && (@@ -67,6 +84,22 @@ const MetricCard = ({</CardContent></Card>);++ if (isLinkTile && to) {+ return (+ <Link+ to={to}+ className={cn(+ "block rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",+ className+ )}+ >+ {card}+ </Link>+ );+ }++ return card;};export default MetricCard;diff --git a/apps/erp/app/components/ModuleCard.tsx b/apps/erp/app/components/ModuleCard.tsxnew file mode 100644index 0000000000..6b7acda9cb--- /dev/null+++ b/apps/erp/app/components/ModuleCard.tsx@@ -0,0 +1,28 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { PrefetchLink } from "@carbon/react";+import { Link } from "react-router";+import type { Authenticated, NavItem } from "~/types";++/** A module tile: Home's module grid and the compact Modules sheet. */+export const ModuleCard = ({ module }: { module: Authenticated<NavItem> }) => {+ const Anchor = module.external ? Link : PrefetchLink;+ return (+ <Anchor+ to={module.to}+ {...(module.external+ ? { target: "_blank", rel: "noopener noreferrer" }+ : {})}+ className="flex items-center gap-4 p-4 rounded-lg border border-border group bg-muted/20 hover:border-foreground/20 cursor-pointer transition-colors duration-200 compact:min-h-[88px] compact:min-w-0 compact:flex-col compact:justify-center compact:gap-2 compact:p-3 compact:bg-card"+ >+ <div className="shrink-0 p-2.5 rounded-lg border border-border group-hover:border-foreground/20 transition-colors compact:p-2">+ <module.icon className="text-xl" />+ </div>+ <span className="text-sm py-1 px-4 border border-border rounded-full group-hover:bg-background font-medium tracking-tight transition-colors compact:max-w-full compact:truncate compact:border-0 compact:p-0 compact:text-[13px]">+ {module.name}+ </span>+ </Anchor>+ );+};diff --git a/apps/erp/app/components/MoveToSubmenu.tsx b/apps/erp/app/components/MoveToSubmenu.tsxnew file mode 100644index 0000000000..8105f86d05--- /dev/null+++ b/apps/erp/app/components/MoveToSubmenu.tsx@@ -0,0 +1,95 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuIcon,+ DropdownMenuItem,+ DropdownMenuLabel,+ DropdownMenuSub,+ DropdownMenuSubContent,+ DropdownMenuSubTrigger,+ DropdownMenuTrigger,+ IconButton,+ useCompact+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import { LuEllipsisVertical, LuMoveRight } from "react-icons/lu";++export type MoveTarget = { id: string; title: string };++type MoveToProps = {+ /** The board's other columns, in board order. Called only on phones, so+ * desktop renders never pay for it. */+ getTargets: () => MoveTarget[];+ /** The same move the board's drop handler makes. */+ onMove: (columnId: string) => void;+};++/**+ * "Move to" for a board card's ⋯ menu, on phones only: a phone shows one+ * column at a time, so dragging across columns is impractical and this makes+ * the drop's move reachable by tap. Renders nothing on desktop.+ */+export function MoveToSubmenu({ getTargets, onMove }: MoveToProps) {+ const isCompact = useCompact();+ if (!isCompact) return null;+ const targets = getTargets();+ if (targets.length === 0) return null;++ return (+ <DropdownMenuSub>+ <DropdownMenuSubTrigger>+ <DropdownMenuIcon icon={<LuMoveRight />} />+ <Trans>Move to</Trans>+ </DropdownMenuSubTrigger>+ <DropdownMenuSubContent>+ {targets.map((target) => (+ <DropdownMenuItem key={target.id} onClick={() => onMove(target.id)}>+ {target.title}+ </DropdownMenuItem>+ ))}+ </DropdownMenuSubContent>+ </DropdownMenuSub>+ );+}++/**+ * The same "Move to" for a card that has no ⋯ menu of its own: brings its own+ * trigger. Phones only; renders nothing on desktop.+ */+export function MoveToMenu({ getTargets, onMove }: MoveToProps) {+ const { t } = useLingui();+ const isCompact = useCompact();+ if (!isCompact) return null;+ const targets = getTargets();+ if (targets.length === 0) return null;++ return (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton+ aria-label={t`More options`}+ icon={<LuEllipsisVertical />}+ variant="ghost"+ size="sm"+ // Keeps a drag sensor on the card from taking the tap.+ onPointerDown={(e) => e.stopPropagation()}+ />+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuLabel>+ <Trans>Move to</Trans>+ </DropdownMenuLabel>+ {targets.map((target) => (+ <DropdownMenuItem key={target.id} onClick={() => onMove(target.id)}>+ <DropdownMenuIcon icon={<LuMoveRight />} />+ {target.title}+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ );+}diff --git a/apps/erp/app/components/New.tsx b/apps/erp/app/components/New.tsxindex 6423ca537a..c6fdfeaeb1 100644--- a/apps/erp/app/components/New.tsx+++ b/apps/erp/app/components/New.tsx@@ -3,12 +3,25 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import type { ButtonProps } from "@carbon/react";-import { Button } from "@carbon/react";+import { Button, IconButton, useCompact } from "@carbon/react";import { useLingui } from "@lingui/react/macro";-import { useEffect, useSyncExternalStore } from "react";-import { LuCirclePlus } from "react-icons/lu";+import type { ReactNode } from "react";+import {+ createContext,+ useContext,+ useEffect,+ useSyncExternalStore+} from "react";+import { LuCirclePlus, LuPlus } from "react-icons/lu";import { Link } from "react-router";import { SHORTCUTS } from "~/shortcuts";+import { AppBarActions } from "./Layout/Mobile/ChromeSlots";++/**+ * On phones a New button moves to the app bar as "+" unless the+ * caller renders it inline, e.g. as an empty state's primary action.+ */+export const NewPlacementContext = createContext<"appBar" | "inline">("appBar");// `n` means "the New action" only while a screen shows exactly one New// button. With two visible Add buttons (e.g. Chart of Accounts renders@@ -25,6 +38,58 @@ const subscribe = (listener: () => void) => {const getCount = () => mountedCount;const getServerCount = () => 1;+type NewActionProps = {+ /** Accessible name of the phone "+". */+ label: string;+ isDisabled?: boolean;+ /** The desktop control, rendered unchanged everywhere but the app bar. */+ children: ReactNode;+} & ({ to: string; onClick?: never } | { onClick: () => void; to?: never });++/**+ * A page's create action. On phones it becomes the app bar "+" (a link to+ * `to`, or a button calling `onClick`) unless an ancestor places it inline,+ * e.g. as an empty state's primary action. Elsewhere it renders `children`.+ */+export function NewAction({+ label,+ isDisabled,+ to,+ onClick,+ children+}: NewActionProps) {+ const isCompact = useCompact();+ const placement = useContext(NewPlacementContext);+ if (!isCompact || placement !== "appBar") return <>{children}</>;++ const icon = <LuPlus className="size-6" />;+ return (+ <AppBarActions>+ {to ? (+ <Button+ asChild+ isIcon+ variant="ghost"+ size="lg"+ aria-label={label}+ isDisabled={isDisabled}+ >+ <Link to={to}>{icon}</Link>+ </Button>+ ) : (+ <IconButton+ icon={icon}+ variant="ghost"+ size="lg"+ aria-label={label}+ isDisabled={isDisabled}+ onClick={onClick}+ />+ )}+ </AppBarActions>+ );+}+type NewProps = {label?: string;to: string;@@ -48,16 +113,19 @@ const New = ({ label, to, variant = "primary" }: NewProps) => {}, []);const isSoleNew =useSyncExternalStore(subscribe, getCount, getServerCount) <= 1;+ const text = label ? `${t`Add`} ${label}` : t`Add`;return (- <Button- asChild- leftIcon={<LuCirclePlus />}- variant={variant}- shortcut={isSoleNew ? SHORTCUTS.newRecord : undefined}- >- <Link to={to}>{label ? `${t`Add`} ${label}` : t`Add`}</Link>- </Button>+ <NewAction label={text} to={to}>+ <Button+ asChild+ leftIcon={<LuCirclePlus />}+ variant={variant}+ shortcut={isSoleNew ? SHORTCUTS.newRecord : undefined}+ >+ <Link to={to}>{text}</Link>+ </Button>+ </NewAction>);};diff --git a/apps/erp/app/components/NewRecordPage.tsx b/apps/erp/app/components/NewRecordPage.tsxnew file mode 100644index 0000000000..52593ef087--- /dev/null+++ b/apps/erp/app/components/NewRecordPage.tsx@@ -0,0 +1,36 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { cn } from "@carbon/react";+import type { ComponentProps } from "react";+import { useMemo } from "react";+import { useLocation } from "react-router";+import { useSetAppBarOverride } from "./Layout/Mobile";+import { useBreadcrumbs } from "./Layout/Topbar/Breadcrumbs";++/**+ * Centered wrapper for a "new record" form page. On phones it is a pushed+ * screen: Back returns to the list it creates into, its last breadcrumb.+ */+export function NewRecordPage({ className, ...props }: ComponentProps<"div">) {+ const { pathname } = useLocation();+ const listTo = useBreadcrumbs().at(-1)?.to;+ const backTo = listTo && listTo !== pathname ? listTo : undefined;+ useSetAppBarOverride(+ useMemo(+ () => (backTo ? { kind: "pushed" as const, backTo } : null),+ [backTo]+ )+ );++ return (+ <div+ {...props}+ className={cn(+ "max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8 compact:px-4 compact:pt-3",+ className+ )}+ />+ );+}diff --git a/apps/erp/app/components/PermissionMatrix.tsx b/apps/erp/app/components/PermissionMatrix.tsxindex 2587c9be44..885d486907 100644--- a/apps/erp/app/components/PermissionMatrix.tsx+++ b/apps/erp/app/components/PermissionMatrix.tsx@@ -11,7 +11,8 @@ import {Td,Th,Thead,- Tr+ Tr,+ useCompact} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import type { UsePermissionMatrixReturn } from "~/hooks/usePermissionMatrix";@@ -34,6 +35,7 @@ const PermissionMatrix = ({isDisabled}: PermissionMatrixProps) => {const { t } = useLingui();+ const isCompact = useCompact();const resolvedLabel = label ?? t`Permissions`;const {modules,@@ -56,11 +58,12 @@ const PermissionMatrix = ({<LabelWithHelp termId={termId}>{resolvedLabel}</LabelWithHelp></label>)}- <div className="rounded-md border overflow-hidden">- <Table>+ {/* Compact: this div scrolls sideways and the module column stays pinned. */}+ <div className="rounded-md border overflow-hidden compact:overflow-x-auto compact:scroll-fade-x">+ <Table full={isCompact}><Thead><Tr>- <Th className="w-[140px]">+ <Th className="w-[140px] compact:sticky compact:left-0 compact:z-10 compact:bg-card"><div className="flex items-center gap-2"><CheckboxisChecked={allChecked}@@ -85,7 +88,7 @@ const PermissionMatrix = ({<Tbody>{modules.map(([mod]) => (<Tr key={mod}>- <Td>+ <Td className="compact:sticky compact:left-0 compact:z-10 compact:bg-card"><div className="flex items-center gap-2"><CheckboxisChecked={isRowAllChecked(mod)}diff --git a/apps/erp/app/components/RecordDocuments.tsx b/apps/erp/app/components/RecordDocuments.tsxindex 7fb1d67a8f..9e11576e95 100644--- a/apps/erp/app/components/RecordDocuments.tsx+++ b/apps/erp/app/components/RecordDocuments.tsx@@ -11,6 +11,7 @@ import {CardContent,CardHeader,CardTitle,+ cn,DropdownMenu,DropdownMenuContent,DropdownMenuItem,@@ -125,7 +126,7 @@ const RecordDocuments = ({</HStack><CardContent><Table>- <Thead>+ <Thead className={cn(filesToRender.length === 0 && "compact:hidden")}><Tr><Th><Trans>Name</Trans>diff --git a/apps/erp/app/components/SearchFilter.tsx b/apps/erp/app/components/SearchFilter.tsxindex 552f392f0a..0e351f804f 100644--- a/apps/erp/app/components/SearchFilter.tsx+++ b/apps/erp/app/components/SearchFilter.tsx@@ -27,7 +27,7 @@ const SearchFilter = ({ param, size, ...props }: SearchFilterProps) => {return (<InputGroup size={size}><InputLeftElement>- <LuSearch className="text-muted-foreground w-3.5 h-3.5 mt-[-2px]" />+ <LuSearch className="text-muted-foreground w-3.5 h-3.5 mt-[-2px] compact:size-4 compact:mt-0" /></InputLeftElement><Inputvalue={query}@@ -35,7 +35,7 @@ const SearchFilter = ({ param, size, ...props }: SearchFilterProps) => {setQuery(e.target.value);debounceQuery(e.target.value);}}- className="w-[100px] sm:w-[200px] text-sm"+ className="w-[100px] sm:w-[200px] text-sm compact:w-full compact:text-base"{...props}/></InputGroup>diff --git a/apps/erp/app/components/Selectors/UserSelect/components/Popover.tsx b/apps/erp/app/components/Selectors/UserSelect/components/Popover.tsxindex 51388f3c7e..3f6ef2a3a0 100644--- a/apps/erp/app/components/Selectors/UserSelect/components/Popover.tsx+++ b/apps/erp/app/components/Selectors/UserSelect/components/Popover.tsx@@ -2,13 +2,16 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.+import { useCompact } from "@carbon/react";import type { PropsWithChildren } from "react";import { useEffect } from "react";import useUserSelectContext from "../provider";const Popover = ({ children }: PropsWithChildren) => {+ const isCompact = useCompact();const {aria: { popoverProps },+ dropdown,refs: { listBoxRef, popoverRef, focusableNodes }} = useUserSelectContext();@@ -60,13 +63,28 @@ const Popover = ({ children }: PropsWithChildren) => {}, [children, focusableNodes, listBoxRef]);return (- <div- {...popoverProps}- ref={popoverRef}- className="absolute w-full mt-1 px-2 bg-popover text-popover-foreground shadow-sm border border-border rounded-md min-w-[240px] z-50"- >- {children}- </div>+ <>+ {/* Phones: the list is a bottom sheet over a dimmed screen. The scrim+ sits inside the select's container, so the outside-click handler+ never sees a tap on it; it closes the sheet itself. */}+ {isCompact && (+ <div+ aria-hidden+ className="fixed inset-0 z-40 bg-black/40"+ onPointerDown={(event) => {+ event.preventDefault();+ dropdown.onClose();+ }}+ />+ )}+ <div+ {...popoverProps}+ ref={popoverRef}+ className="absolute w-full mt-1 px-2 bg-popover text-popover-foreground shadow-sm border border-border rounded-md min-w-[240px] z-50 compact:fixed compact:inset-x-0 compact:top-auto compact:bottom-0 compact:mt-0 compact:max-h-[88dvh] compact:min-w-0 compact:overflow-y-auto compact:rounded-none compact:rounded-t-[14px] compact:border-0 compact:px-2 compact:pt-2 compact:pb-safe-4"+ >+ {children}+ </div>+ </>);};diff --git a/apps/erp/app/components/Selectors/UserSelect/components/TreeSelect.tsx b/apps/erp/app/components/Selectors/UserSelect/components/TreeSelect.tsxindex 2d3410d272..9a5d497d13 100644--- a/apps/erp/app/components/Selectors/UserSelect/components/TreeSelect.tsx+++ b/apps/erp/app/components/Selectors/UserSelect/components/TreeSelect.tsx@@ -182,7 +182,7 @@ const GroupRow = ({if (!expanded) prefetchGroup(group.id);}}className={cn(- "flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 hover:bg-muted/50 text-sm",+ "flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 hover:bg-muted/50 text-sm compact:min-h-11",isFocused && "bg-muted/50",isSelected && "bg-accent",isDisabled && "opacity-50 pointer-events-none"@@ -196,7 +196,7 @@ const GroupRow = ({e.stopPropagation();expanded ? onGroupCollapse(uid) : onGroupExpand(uid);}}- className="-m-1.5 flex items-center justify-center rounded-md p-1.5 hover:bg-muted pointer-events-auto"+ className="-m-1.5 flex items-center justify-center rounded-md p-1.5 hover:bg-muted pointer-events-auto compact:relative compact:mr-1 compact:after:absolute compact:after:content-[''] compact:after:-inset-2.5"><ExpandIcon isExpanded={expanded} /></button>diff --git a/apps/erp/app/components/SettingsPage.tsx b/apps/erp/app/components/SettingsPage.tsxnew file mode 100644index 0000000000..46f344c626--- /dev/null+++ b/apps/erp/app/components/SettingsPage.tsx@@ -0,0 +1,34 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { cn, Heading, VStack } from "@carbon/react";+import type { ComponentProps } from "react";++/** Centered body of a settings-style page; phones get tighter padding. */+export function SettingsPage({+ className,+ ...props+}: ComponentProps<typeof VStack>) {+ return (+ <VStack+ spacing={4}+ {...props}+ className={cn(+ "py-12 px-4 max-w-[60rem] h-full mx-auto",+ className,+ "compact:py-3 compact:px-4 compact:gap-3 compact:space-y-0"+ )}+ />+ );+}++/** The page title; phones show it in the app bar instead. */+export function SettingsPageHeading({+ className,+ ...props+}: Omit<ComponentProps<typeof Heading>, "size">) {+ return (+ <Heading size="h3" {...props} className={cn("compact:hidden", className)} />+ );+}diff --git a/apps/erp/app/components/SettingsSectionHeader.tsx b/apps/erp/app/components/SettingsSectionHeader.tsxindex a6296fe6f9..93fa95300d 100644--- a/apps/erp/app/components/SettingsSectionHeader.tsx+++ b/apps/erp/app/components/SettingsSectionHeader.tsx@@ -20,7 +20,13 @@ type Props = {*/export default function SettingsSectionHeader({ children, className }: Props) {return (- <Subheading variant="light" className={cn("mt-4", className)}>+ <Subheading+ variant="light"+ className={cn(+ "mt-4 compact:text-xs/[1.3] compact:font-medium compact:tracking-[0.04em]",+ className+ )}+ >{children}</Subheading>);diff --git a/apps/erp/app/components/SlidesEditor.tsx b/apps/erp/app/components/SlidesEditor.tsxindex e5abb74118..0c3f12d642 100644--- a/apps/erp/app/components/SlidesEditor.tsx+++ b/apps/erp/app/components/SlidesEditor.tsx@@ -199,7 +199,10 @@ export function SlidesEditor({const withModels = !!modelInputRef && !!onModelFileChange;return (- <VStack spacing={2} className="w-full col-span-2 border-t pt-4">+ <VStack+ spacing={2}+ className="w-full col-span-2 compact:col-span-full border-t pt-4"+ ><div className="flex w-full items-center justify-between"><Label className="text-xs text-muted-foreground">Slides</Label>{!isDisabled && (diff --git a/apps/erp/app/components/SortableList.tsx b/apps/erp/app/components/SortableList.tsxindex f786e94c79..d160d63fb5 100644--- a/apps/erp/app/components/SortableList.tsx+++ b/apps/erp/app/components/SortableList.tsx@@ -140,7 +140,7 @@ function SortableListItem<T>({><HStackclassName={cn(- "w-full justify-between pr-8",+ "w-full justify-between pr-8 compact:flex-wrap compact:gap-y-1",!isReadOnly && "cursor-grab")}>@@ -176,7 +176,7 @@ function SortableListItem<T>({)}{item.details && (- <div className="flex flex-shrink-0">+ <div className="flex flex-shrink-0 compact:basis-full compact:flex-wrap compact:[&>*]:flex-wrap">{item.details}</div>)}@@ -236,7 +236,10 @@ export function SortableListItemToggle({<buttontype="button"onClick={onToggle}- className={cn("absolute right-3 top-3 z-10", className)}+ className={cn(+ "absolute right-3 top-3 z-10 compact:after:absolute compact:after:-inset-3",+ className+ )}>{isOpen ? (<LuX className="h-5 w-5 text-foreground" />diff --git a/apps/erp/app/components/StepLinkEditor.tsx b/apps/erp/app/components/StepLinkEditor.tsxindex 3fcf8f3a2a..74b4cb7bbb 100644--- a/apps/erp/app/components/StepLinkEditor.tsx+++ b/apps/erp/app/components/StepLinkEditor.tsx@@ -162,7 +162,10 @@ export function StepLinkEditor({if (isDisabled && linked.length === 0) return null;return (- <VStack spacing={2} className="w-full col-span-2 border-t pt-4">+ <VStack+ spacing={2}+ className="w-full col-span-2 compact:col-span-full border-t pt-4"+ ><div className="flex w-full items-center justify-between"><Label className="text-xs text-muted-foreground">{label}</Label>{!isDisabled && (diff --git a/apps/erp/app/components/Table/Table.tsx b/apps/erp/app/components/Table/Table.tsxindex 7b2602dc70..081f89eb26 100644--- a/apps/erp/app/components/Table/Table.tsx+++ b/apps/erp/app/components/Table/Table.tsx@@ -22,6 +22,7 @@ import {Th,Thead,Tr,+ useCompact,useEscape,useMount,useOutsideClick,@@ -87,6 +88,8 @@ import {usePagination,useSort} from "./components";+import { CompactList } from "./components/Compact";+import { CompactToolbar } from "./components/Compact/CompactToolbar";import type { ColumnFilter } from "./components/Filter/types";import { useFilters } from "./components/Filter/useFilters";import type { ColumnSizeMap } from "./types";@@ -161,6 +164,10 @@ interface TableProps<T extends object> {key: (row: T) => string;header: (rows: T[]) => ReactNode;};+ // Phones: "list" (default) renders 3-line rows from the columns'+ // `meta.mobile` priorities; "table" keeps the grid, scrolling sideways with+ // a sticky first column (inline-editing grids, comparison tables).+ mobileLayout?: "list" | "table";}type AggregateFunction = "sum" | "average" | "min" | "max" | "median" | "count";@@ -310,7 +317,8 @@ const Table = <T extends object>({renderContextMenu,renderExpandedRow,canExpandRow,- groupRowsBy+ groupRowsBy,+ mobileLayout = "list"}: TableProps<T>) => {const { t } = useLingui();const tableContainerRef = useRef<HTMLDivElement>(null);@@ -599,14 +607,16 @@ const Table = <T extends object>({// Clicking outside the table clears the selected cell (and ends any edit). A// cell's editable input commits on blur first, so the value is saved before- // this runs. Portaled dropdowns (e.g. a cell's combobox popover) render- // outside the container but belong to an active edit — ignore clicks in them.+ // this runs. Portaled dropdowns (e.g. a cell's combobox popover, or its+ // bottom sheet on phones) render outside the container but belong to an+ // active edit — ignore clicks in them.useOutsideClick({ref: tableContainerRef,enabled: selectedCell != null,handler: (e) => {const target = e.target as HTMLElement | null;- if (target?.closest("[data-radix-popper-content-wrapper]")) return;+ if (target?.closest("[data-radix-popper-content-wrapper],[role=dialog]"))+ return;setIsEditing(false);setSelectedCell(null);}@@ -1082,64 +1092,153 @@ const Table = <T extends object>({params.getAll("sort").filter(Boolean).length === 0 &&!params.get("search")?.trim();+ const isCompact = useCompact();+ // Phones export from the toolbar's ⋯ (list and grid alike); desktop keeps+ // the toolbar's Download button.+ const csvExport = withCsvExport+ ? {+ data,+ columnAccessors,+ exportValues,+ exportOnlyColumns,+ columnOrder,+ columnVisibility+ }+ : undefined;++ if (isCompact && mobileLayout === "list") {+ return (+ <CompactList+ titleBadge={titleBadge}+ table={table}+ count={count}+ title={currentView?.name ?? title}+ tableName={tableName}+ filters={filters}+ sortKeyToLabel={sortKeyToLabel}+ withSearch={withSearch}+ withSort={sort !== null}+ withPagination={withPagination}+ pagination={pagination}+ withSelectableRows={withSelectableRows}+ headerActions={headerActions}+ primaryAction={primaryAction}+ emptyState={emptyState}+ isLoading={isLoading}+ isTableEmpty={isTableEmpty}+ hasFilters={hasFilters}+ clearFilters={clearFilters}+ csvExport={csvExport}+ importCSV={importCSV}+ renderContextMenu={renderContextMenu}+ renderActions={renderActions}+ renderExpandedRow={renderExpandedRow}+ canExpandRow={canExpandRow}+ groupStarts={groupStarts}+ groupHeader={groupRowsBy?.header}+ totals={table+ .getAllLeafColumns()+ .filter((column) => column.columnDef.meta?.renderTotal)+ .map((column) => ({+ id: column.id,+ label:+ typeof column.columnDef.header === "string"+ ? column.columnDef.header+ : (column.columnDef.meta?.filterHeader ?? column.id),+ value: aggregateForCol(table, column.id, "sum"),+ formatter: column.columnDef.meta?.formatter+ }))}+ />+ );+ }++ // The empty-state ("No data exists") renders `primaryAction` too. When it+ // will, omit it from the header so only ONE copy mounts — a second mount of+ // the same `New` trips its `isSoleNew` guard and silently drops the keyboard+ // shortcut badge + binding on both.+ const headerPrimaryAction =+ rows.length === 0 && !isLoading && !emptyState && !hasFilters+ ? undefined+ : primaryAction;+return (<VStackkey={view ?? tableName ?? ""}spacing={0}className={cn("h-full bg-card",- !compact && "flex flex-col w-full px-0 md:px-4 lg:px-6"+ !compact && "flex flex-col w-full px-0 md:px-4 lg:px-6",+ // Phones (grid mode): the toolbar spans the full width.+ "compact:items-stretch")}>- <TableHeader- columnAccessors={columnAccessors}- exportValues={exportValues}- exportOnlyColumns={exportOnlyColumns}- sortKeyToLabel={sortKeyToLabel}- columnOrder={columnOrder}- columnPinning={columnPinning}- columnVisibility={columnVisibility}- columns={table.getAllLeafColumns()}- compact={compact}- data={data}- editMode={editMode}- filters={filters}- isEmpty={isTableEmpty}- importCSV={importCSV}- pagination={pagination}- primaryAction={- // The empty-state ("No data exists") renders `primaryAction` too. When- // it will, omit it from the header so only ONE copy mounts — a second- // mount of the same `New` trips its `isSoleNew` guard and silently- // drops the keyboard shortcut badge + binding on both.- rows.length === 0 && !isLoading && !emptyState && !hasFilters- ? undefined- : primaryAction- }- headerActions={headerActions}- renderActions={renderActions}- selectedRows={selectedRows}- setColumnOrder={setColumnOrder}- setEditMode={setEditMode}- table={tableName}- title={title}- titleBadge={titleBadge}- withInlineEditing={withInlineEditing}- forceEditMode={forceEditMode}- withPagination={withPagination}- withSavedView={withSavedView}- withSearch={withSearch}- withSelectableRows={withSelectableRows}- withSidebarTrigger={withSidebarTrigger}- withColumnOrdering={withColumnOrdering}- withCsvExport={withCsvExport}- sort={sort}- />+ {isCompact ? (+ <CompactToolbar+ title={currentView?.name ?? title}+ tableName={tableName}+ count={count}+ filters={filters}+ sortKeyToLabel={sortKeyToLabel}+ withSearch={withSearch}+ withSort={sort !== null}+ headerActions={+ <>+ {headerPrimaryAction}+ {headerActions}+ </>+ }+ csvExport={csvExport}+ titleBadge={titleBadge}+ importCSV={importCSV}+ hideControls={isTableEmpty}+ />+ ) : (+ <TableHeader+ columnAccessors={columnAccessors}+ exportValues={exportValues}+ exportOnlyColumns={exportOnlyColumns}+ sortKeyToLabel={sortKeyToLabel}+ columnOrder={columnOrder}+ columnPinning={columnPinning}+ columnVisibility={columnVisibility}+ columns={table.getAllLeafColumns()}+ compact={compact}+ data={data}+ editMode={editMode}+ filters={filters}+ isEmpty={isTableEmpty}+ importCSV={importCSV}+ pagination={pagination}+ primaryAction={headerPrimaryAction}+ headerActions={headerActions}+ renderActions={renderActions}+ selectedRows={selectedRows}+ setColumnOrder={setColumnOrder}+ setEditMode={setEditMode}+ table={tableName}+ title={title}+ titleBadge={titleBadge}+ withInlineEditing={withInlineEditing}+ forceEditMode={forceEditMode}+ withPagination={withPagination}+ withSavedView={withSavedView}+ withSearch={withSearch}+ withSelectableRows={withSelectableRows}+ withSidebarTrigger={withSidebarTrigger}+ withColumnOrdering={withColumnOrdering}+ withCsvExport={withCsvExport}+ sort={sort}+ />+ )}<divid="table-container"className={cn(- "w-full h-full overflow-x-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent"+ "w-full h-full overflow-x-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent",+ // Phones, grids kept as grids: sideways scroll with an+ // edge fade, 16pt inset, and a sticky first column of at most 150pt.+ mobileLayout === "table" &&+ "compact:scroll-fade-x compact:px-4 compact:[&_tr>*:first-child]:sticky compact:[&_tr>*:first-child]:left-0 compact:[&_tr>*:first-child]:z-10 compact:[&_tr>*:first-child]:max-w-[150px] compact:[&_tr>*:first-child]:bg-card")}style={{ contain: "strict" }}ref={tableContainerRef}@@ -1292,7 +1391,7 @@ const Table = <T extends object>({) : (<LuArrowUpDownaria-hidden="true"- className="text-muted-foreground/50 opacity-0 transition-opacity group-hover:opacity-100"+ className="text-muted-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 compact:opacity-100"/>)}</span>diff --git a/apps/erp/app/components/Table/components/Cell.tsx b/apps/erp/app/components/Table/components/Cell.tsxindex 9e8e511665..6e16c5261b 100644--- a/apps/erp/app/components/Table/components/Cell.tsx+++ b/apps/erp/app/components/Table/components/Cell.tsx@@ -80,6 +80,8 @@ const Cell = <T extends object>({<TdclassName={cn("group/cell relative py-2 whitespace-nowrap text-sm outline-none max-w-[30dvw] truncate",+ // Phones: a grid's name column opts in to more width than the others.+ "compact:[&:has([data-key-cell])]:max-w-[45dvw]",cell.column.id === "Select" ? "px-2" : "px-4",wasEdited && "bg-yellow-100 dark:bg-yellow-900",isEditMode && !hasEditableTableCellComponent && "bg-muted/50",diff --git a/apps/erp/app/components/Table/components/Compact/CompactEmpty.tsx b/apps/erp/app/components/Table/components/Compact/CompactEmpty.tsxnew file mode 100644index 0000000000..47474136c1--- /dev/null+++ b/apps/erp/app/components/Table/components/Compact/CompactEmpty.tsx@@ -0,0 +1,87 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { Button, Skeleton } from "@carbon/react";+import { Trans } from "@lingui/react/macro";+import type { ReactNode } from "react";+import { LuInbox, LuSearchX } from "react-icons/lu";+import { NewPlacementContext } from "~/components/New";++function IconTile({ children }: { children: ReactNode }) {+ return (+ <div className="flex size-[52px] items-center justify-center rounded-xl bg-muted text-muted-foreground [&>svg]:size-6">+ {children}+ </div>+ );+}++/** A list with no records yet: neutral tile, title, the create action. */+export function CompactEmpty({+ title,+ primaryAction+}: {+ title?: string;+ primaryAction?: ReactNode;+}) {+ return (+ <div className="flex flex-col items-center gap-3 px-6 py-16 text-center">+ <IconTile>+ <LuInbox />+ </IconTile>+ <h3 className="text-[17px] font-semibold text-foreground">+ {title ? (+ <Trans>No {title} yet</Trans>+ ) : (+ <Trans>Nothing here yet</Trans>+ )}+ </h3>+ {primaryAction ? (+ <NewPlacementContext.Provider value="inline">+ {/* Several actions (an HStack of buttons) stack full width, primary first. */}+ <div className="mt-1 w-full max-w-xs [&_a]:w-full [&_a]:h-11 [&_button]:w-full [&_button]:h-11 [&>div]:w-full [&>div]:flex-col [&>div]:gap-2 [&>div>*]:!mx-0 [&>div>*]:w-full">+ {primaryAction}+ </div>+ </NewPlacementContext.Provider>+ ) : null}+ </div>+ );+}++/** Filtered to zero: say so and offer to clear. */+export function CompactNoResults({ onClear }: { onClear: () => void }) {+ return (+ <div className="flex flex-col items-center gap-3 px-6 py-16 text-center">+ <IconTile>+ <LuSearchX />+ </IconTile>+ <h3 className="text-[17px] font-semibold text-foreground">+ <Trans>No results</Trans>+ </h3>+ <Button variant="secondary" size="lg" onClick={onClear}>+ <Trans>Clear filters</Trans>+ </Button>+ </div>+ );+}++/** Loading: skeleton rows in the 3-line row shape. */+export function CompactLoading() {+ return (+ <div className="flex flex-col">+ {Array.from({ length: 6 }).map((_, i) => (+ <div+ key={i}+ className="flex min-h-14 flex-col gap-2 border-b border-border px-4 py-3"+ >+ <div className="flex items-center justify-between gap-4">+ <Skeleton className="h-4 w-2/5" />+ <Skeleton className="h-4 w-16" />+ </div>+ <Skeleton className="h-3 w-3/5" />+ <Skeleton className="h-5 w-20 rounded-full" />+ </div>+ ))}+ </div>+ );+}diff --git a/apps/erp/app/components/Table/components/Compact/CompactList.tsx b/apps/erp/app/components/Table/components/Compact/CompactList.tsxnew file mode 100644index 0000000000..fe9c7992b2--- /dev/null+++ b/apps/erp/app/components/Table/components/Compact/CompactList.tsx@@ -0,0 +1,408 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ Button,+ ContextMenu,+ ContextMenuContent,+ ContextMenuTrigger,+ DropdownMenu,+ DropdownMenuTrigger,+ Menu+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import { useNumberFormatter } from "@react-aria/i18n";+import type { Table } from "@tanstack/react-table";+import type { ReactNode } from "react";+import { Fragment, useEffect, useMemo, useState } from "react";+import { BottomBar } from "~/components/Layout/Mobile/ChromeSlots";+import { useSetAppBarOverride } from "~/components/Layout/Mobile/useAppBarOverride";+import { useUrlParams } from "~/hooks";+import type { fieldMappings } from "~/modules/shared/imports.models";+import { MAX_PAGE_SIZE, PAGE_SIZES } from "~/utils/pagination";+import type { DownloadProps } from "../Download";+import type { ColumnFilter } from "../Filter/types";+import type { usePagination } from "../Pagination";+import { CompactEmpty, CompactLoading, CompactNoResults } from "./CompactEmpty";+import { CompactRow } from "./CompactRow";+import { CompactToolbar } from "./CompactToolbar";+import { resolveSlots } from "./resolveSlots";++const PAGE = 25;++export type CompactListProps<T> = {+ table: Table<T>;+ titleBadge?: ReactNode;+ count: number;+ title?: string;+ tableName?: string;+ filters: ColumnFilter[];+ sortKeyToLabel: Record<string, string>;+ withSearch: boolean;+ withSort: boolean;+ withPagination: boolean;+ pagination: ReturnType<typeof usePagination>;+ withSelectableRows: boolean;+ headerActions?: ReactNode;+ primaryAction?: ReactNode;+ emptyState?: ReactNode;+ isLoading: boolean;+ isTableEmpty: boolean;+ hasFilters: boolean;+ clearFilters: () => void;+ csvExport?: DownloadProps;+ importCSV?: { table: keyof typeof fieldMappings; label: string }[];+ renderContextMenu?: (row: T) => JSX.Element | null;+ renderActions?: (selectedRows: T[]) => ReactNode;+ renderExpandedRow?: (row: T) => ReactNode;+ canExpandRow?: (row: T) => boolean;+ groupStarts: Map<string, T[]>;+ groupHeader?: (rows: T[]) => ReactNode;+ totals: {+ id: string;+ label: ReactNode;+ value: number;+ formatter?: (value: number) => string;+ }[];+};++/**+ * A table's compact (phone) presentation: the same TanStack instance, rows,+ * filters, sort, selection and actions as the desktop grid, rendered as a+ * list of 3-line rows.+ */+export function CompactList<T>({+ table,+ count,+ title,+ tableName,+ filters,+ sortKeyToLabel,+ withSearch,+ withSort,+ withPagination,+ pagination,+ withSelectableRows,+ headerActions,+ primaryAction,+ emptyState,+ isLoading,+ isTableEmpty,+ hasFilters,+ clearFilters,+ csvExport,+ importCSV,+ renderContextMenu,+ renderActions,+ renderExpandedRow,+ canExpandRow,+ groupStarts,+ groupHeader,+ totals,+ titleBadge+}: CompactListProps<T>) {+ const { t } = useLingui();+ const numberFormatter = useNumberFormatter();+ const [params, setParams] = useUrlParams();+ const rows = table.getRowModel().rows;++ // Only the columns desktop shows (a hidden column never fills a slot).+ const columnVisibility = table.getState().columnVisibility;+ // biome-ignore lint/correctness/useExhaustiveDependencies: visibility changes re-resolve the slots+ const slots = useMemo(+ () =>+ resolveSlots(+ table+ .getAllLeafColumns()+ .filter((c) => c.getIsVisible() && !c.columnDef.meta?.exportOnly),+ tableName ?? title+ ),+ [table, tableName, title, columnVisibility]+ );++ /* Paging: reveal 25 loaded rows at a time. On the first page, raise `limit`+ up to the largest page size; past it (or from a deep link with an+ offset), step through pages like desktop. */+ const [visible, setVisible] = useState(PAGE);+ // biome-ignore lint/correctness/useExhaustiveDependencies: a new result set starts over+ useEffect(() => {+ setVisible(PAGE);+ }, [+ params.get("search"),+ params.getAll("filter").join(),+ params.getAll("sort").join(),+ params.get("view"),+ params.get("offset")+ ]);++ const shown = Math.min(visible, rows.length);+ const offset = withPagination ? pagination.offset : 0;+ const total = withPagination ? pagination.count : rows.length;+ const allShown = shown >= rows.length;+ const hasNextPage = withPagination && pagination.canNextPage;+ const nextLimit =+ hasNextPage && offset === 0 && pagination.pageSize < MAX_PAGE_SIZE+ ? PAGE_SIZES.find((size) => size > pagination.pageSize)+ : undefined;+ const canLoadMore = !allShown || nextLimit !== undefined;+ const loadMore = () => {+ setVisible((v) => v + PAGE);+ if (allShown && nextLimit !== undefined) {+ setParams({ limit: String(nextLimit), offset: null });+ }+ };+ const firstShown = offset + 1;+ const lastShown = offset + shown;+ const showPageNav =+ allShown &&+ nextLimit === undefined &&+ (hasNextPage || (withPagination && pagination.canPreviousPage));++ /* Selection mode */+ const [selecting, setSelecting] = useState(false);+ const selectedRows = selecting+ ? table.getSelectedRowModel().flatRows.map((row) => row.original)+ : [];+ const exitSelection = () => {+ table.resetRowSelection();+ setSelecting(false);+ };+ // biome-ignore lint/correctness/useExhaustiveDependencies: rebuilt when the selection or its count changes+ const override = useMemo(+ () =>+ selecting+ ? {+ kind: "selection" as const,+ title: t`${selectedRows.length} selected`,+ trailing: (+ <Button variant="ghost" size="lg" onClick={exitSelection}>+ <Trans>Cancel</Trans>+ </Button>+ )+ }+ : null,+ [selecting, selectedRows.length]+ );+ useSetAppBarOverride(override);++ /* Expandable rows */+ const [expanded, setExpanded] = useState<Record<string, boolean>>({});++ const toolbar = (+ <CompactToolbar+ titleBadge={titleBadge}+ title={title}+ tableName={tableName}+ count={count}+ filters={filters}+ sortKeyToLabel={sortKeyToLabel}+ withSearch={withSearch}+ withSort={withSort}+ headerActions={headerActions}+ csvExport={csvExport}+ importCSV={importCSV}+ onSelect={+ withSelectableRows && rows.length > 0 && !selecting+ ? () => setSelecting(true)+ : undefined+ }+ // Like desktop: a genuinely empty list has no toolbar.+ hideControls={isTableEmpty}+ />+ );++ // A New button portals itself to the app bar "+"; any other primary control+ // (a picker, a split button) stays here. Hidden when nothing renders in place.+ const primaryActionRow = primaryAction ? (+ <div className="flex flex-wrap items-center gap-2 bg-card px-4 pb-2 [&:not(:has(button,a,input))]:hidden [&>*]:max-w-full [&>div]:flex-wrap [&_button]:h-11">+ {primaryAction}+ </div>+ ) : null;++ if (rows.length === 0 || !slots) {+ return (+ <div className="flex min-h-full w-full min-w-0 flex-col bg-card">+ {toolbar}+ {!isLoading && !emptyState && !hasFilters && isTableEmpty+ ? null+ : primaryActionRow}+ {isLoading ? (+ <CompactLoading />+ ) : emptyState ? (+ <div className="flex flex-col items-center gap-4 px-4 py-12">+ {emptyState}+ </div>+ ) : hasFilters ? (+ <CompactNoResults onClear={clearFilters} />+ ) : isTableEmpty ? (+ <CompactEmpty title={title} primaryAction={primaryAction} />+ ) : (+ <CompactNoResults onClear={() => setParams({ search: undefined })} />+ )}+ </div>+ );+ }++ return (+ <div className="flex min-h-full w-full min-w-0 flex-col bg-card">+ {toolbar}+ {primaryActionRow}+ <div className="flex flex-col border-t border-border">+ {rows.slice(0, shown).map((row) => {+ const rowExpandable =+ !!renderExpandedRow &&+ (!canExpandRow || canExpandRow(row.original));+ const isExpanded = rowExpandable && !!expanded[row.id];+ const groupRows = groupStarts.get(row.id);+ const content = (+ <CompactRow+ row={row}+ slots={slots}+ selection={+ selecting+ ? {+ selected: row.getIsSelected(),+ onToggle: () => row.toggleSelected()+ }+ : undefined+ }+ expansion={+ rowExpandable+ ? {+ expanded: isExpanded,+ onToggle: () =>+ setExpanded((prev) => ({+ ...prev,+ [row.id]: !prev[row.id]+ }))+ }+ : undefined+ }+ />+ );+ return (+ <Fragment key={row.id}>+ {groupRows && groupHeader ? (+ <div className="sticky top-0 z-20 flex items-center justify-between gap-3 border-b border-border bg-muted/90 px-4 py-1.5 text-xs font-medium uppercase tracking-[0.04em] text-muted-foreground backdrop-blur">+ <div className="min-w-0 truncate normal-case tracking-normal">+ {groupHeader(groupRows)}+ </div>+ <span className="shrink-0 tabular-nums">+ {groupRows.length}+ </span>+ </div>+ ) : null}+ {renderContextMenu && !selecting ? (+ <Menu type="context">+ <ContextMenu>+ <ContextMenuTrigger asChild>+ <div>{content}</div>+ </ContextMenuTrigger>+ <ContextMenuContent>+ {renderContextMenu(row.original)}+ </ContextMenuContent>+ </ContextMenu>+ </Menu>+ ) : (+ content+ )}+ {isExpanded && renderExpandedRow ? (+ <div className="overflow-x-auto border-b border-border bg-muted/20">+ {renderExpandedRow(row.original)}+ </div>+ ) : null}+ </Fragment>+ );+ })}+ </div>++ {totals.length > 0 ? (+ <div className="mx-4 mt-4 rounded-xl border border-border bg-card p-3">+ <div className="pb-1 text-xs font-medium uppercase tracking-[0.04em] text-muted-foreground">+ <Trans>Totals</Trans>+ </div>+ {totals.map((total) => (+ <div+ key={total.id}+ className="flex min-h-9 items-center justify-between gap-3 text-sm"+ >+ <span className="min-w-0 truncate text-muted-foreground">+ {total.label}+ </span>+ <span className="shrink-0 font-medium tabular-nums">+ {total.formatter+ ? total.formatter(total.value)+ : numberFormatter.format(total.value)}+ </span>+ </div>+ ))}+ </div>+ ) : null}++ {offset > 0 || shown < total ? (+ <div className="flex flex-col items-center gap-2 px-4 py-4">+ {canLoadMore ? (+ <Button+ variant="secondary"+ size="lg"+ className="w-full"+ onClick={loadMore}+ isLoading={isLoading}+ >+ <Trans>Load more</Trans>+ </Button>+ ) : null}+ {showPageNav ? (+ <div className="flex w-full gap-2">+ <Button+ variant="secondary"+ size="lg"+ className="flex-1"+ isDisabled={!pagination.canPreviousPage}+ onClick={pagination.previousPage}+ >+ <Trans>Previous page</Trans>+ </Button>+ <Button+ variant="secondary"+ size="lg"+ className="flex-1"+ isDisabled={!hasNextPage}+ isLoading={isLoading}+ onClick={pagination.nextPage}+ >+ <Trans>Next page</Trans>+ </Button>+ </div>+ ) : null}+ <span className="text-xs text-muted-foreground tabular-nums">+ {t`Showing ${firstShown}–${lastShown} of ${total}`}+ </span>+ </div>+ ) : null}++ {selecting && renderActions ? (+ <BottomBar>+ <div className="flex items-center gap-3 border-t border-border bg-card px-4 pt-2 pb-safe-4">+ <span className="min-w-0 flex-1 truncate text-sm text-muted-foreground">+ {t`${selectedRows.length} selected`}+ </span>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ variant="primary"+ size="lg"+ isDisabled={selectedRows.length === 0}+ >+ <Trans>Actions</Trans>+ </Button>+ </DropdownMenuTrigger>+ {renderActions(selectedRows)}+ </DropdownMenu>+ </div>+ </BottomBar>+ ) : null}+ </div>+ );+}diff --git a/apps/erp/app/components/Table/components/Compact/CompactRow.tsx b/apps/erp/app/components/Table/components/Compact/CompactRow.tsxnew file mode 100644index 0000000000..784a8feb6c--- /dev/null+++ b/apps/erp/app/components/Table/components/Compact/CompactRow.tsx@@ -0,0 +1,167 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { cn, EnumerableAsText } from "@carbon/react";+import { useLingui } from "@lingui/react/macro";+import type { Cell, Column, Row } from "@tanstack/react-table";+import { flexRender } from "@tanstack/react-table";+import { LuChevronRight } from "react-icons/lu";+import IndeterminateCheckbox from "../IndeterminateCheckbox";+import type { CompactSlots } from "./resolveSlots";++function renderCell<T>(row: Row<T>, column: Column<T, unknown> | undefined) {+ if (!column) return null;+ const cell = row.getAllCells().find((c) => c.column.id === column.id) as+ | Cell<T, unknown>+ | undefined;+ if (!cell) return null;+ const value = flexRender(cell.column.columnDef.cell, cell.getContext());+ const { header, meta } = cell.column.columnDef;+ if (!meta?.mobileLabel || typeof header !== "string") return value;+ return (+ <>+ <span className="mr-1 text-[13px] text-muted-foreground">{header}</span>+ {value}+ </>+ );+}++type CompactRowProps<T> = {+ row: Row<T>;+ slots: CompactSlots<T>;+ selection?: { selected: boolean; onToggle: () => void };+ expansion?: { expanded: boolean; onToggle: () => void };+ className?: string;+};++/**+ * One list row: line 1 = identity (P1) with the metric (P2) trailing,+ * line 2 = context (P3), line 3 = status pills. Each slot renders the+ * column's own cell, so links, pills and money formats are the desktop ones.+ * The P1 link is stretched over the row, so a tap anywhere opens the record+ * at the desktop href; other controls sit above it.+ */+export function CompactRow<T>({+ row,+ slots,+ selection,+ expansion,+ className+}: CompactRowProps<T>) {+ const { t } = useLingui();+ const p2 = renderCell(row, slots.p2);+ const p3 = renderCell(row, slots.p3);+ const pills = slots.pills+ .map((column) => ({ id: column.id, node: renderCell(row, column) }))+ .filter((pill) => pill.node !== null);++ return (+ <div+ className={cn(+ "relative flex min-h-14 items-start gap-3 bg-card px-4 py-3",+ // A one-line row centres its content vertically.+ p3 === null && pills.length === 0 && "items-center",+ "after:pointer-events-none after:absolute after:right-0 after:bottom-0 after:left-4 after:h-px after:bg-border",+ // With a leading thumbnail in P1, the divider starts at the text column.+ "[&:has([data-p1]_[data-thumbnail=sm])]:after:left-14 [&:has([data-p1]_[data-thumbnail=md])]:after:left-16 [&:has([data-p1]_[data-thumbnail=lg])]:after:left-[68px]",+ "[&:has([data-p1]_[data-avatar=xs])]:after:left-12 [&:has([data-p1]_[data-avatar=sm])]:after:left-14",+ selection?.selected && "bg-accent/60",+ className+ )}+ >+ {selection ? (+ <div className="relative z-10 flex size-6 shrink-0 items-center justify-center pt-0.5">+ <IndeterminateCheckbox+ checked={selection.selected}+ indeterminate={false}+ onChange={selection.onToggle}+ />+ </div>+ ) : null}+ <div+ className={cn(+ "flex min-w-0 flex-1 flex-col gap-1",+ // Lines 2 and 3 start at the text column, past a P1 thumbnail (+8 gap).+ "[&:has([data-p1]_[data-thumbnail=sm])>[data-line]]:pl-10 [&:has([data-p1]_[data-thumbnail=md])>[data-line]]:pl-12 [&:has([data-p1]_[data-thumbnail=lg])>[data-line]]:pl-[52px]",+ // …and past a P1 avatar.+ "[&:has([data-p1]_[data-avatar=xs])>[data-line]]:pl-8 [&:has([data-p1]_[data-avatar=sm])>[data-line]]:pl-10"+ )}+ >+ <div className="flex min-w-0 items-start gap-3 [&:has(>[data-p1]_[data-thumbnail])]:items-center [&:has(>[data-p1]_[data-avatar])]:items-center">+ <div+ data-p1+ className={cn(+ "min-w-0 flex-1 truncate text-[15px] font-medium text-foreground",+ // Stretch the identity link over the whole row; with selection+ // active a tap toggles the row instead.+ !selection &&+ "[&_a:first-of-type]:after:absolute [&_a:first-of-type]:after:inset-0 [&_a:first-of-type]:after:content-['']",+ "[&_*]:min-w-0 [&_*]:truncate",+ // Controls inside the identity cell (expand chevrons) stay+ // tappable above the stretched link.+ "[&_button]:relative [&_button]:z-10"+ )}+ >+ {renderCell(row, slots.p1)}+ </div>+ {p2 !== null ? (+ <div className="max-w-[45%] shrink-0 truncate text-right text-[15px] tabular-nums text-foreground [&_*]:truncate [&_a]:relative [&_a]:z-10 [&_button]:relative [&_button]:z-10">+ {p2}+ </div>+ ) : null}+ </div>+ {p3 !== null ? (+ // Context line: not raised above the row link, so a tap anywhere on+ // it opens the row's record, never the linked one. Column stacks turn+ // into a row here, so their parts need a gap.+ <div+ data-line+ className="min-w-0 truncate text-[13px] text-muted-foreground [&_*]:truncate [&>*]:!flex-row [&>*]:items-center [&>[class~=flex-col]]:!gap-x-1.5"+ >+ <EnumerableAsText value>{p3}</EnumerableAsText>+ </div>+ ) : null}+ {pills.length > 0 ? (+ <div+ data-line+ className="flex min-w-0 flex-wrap items-center gap-1.5 [&_a]:relative [&_a]:z-10 [&_button]:relative [&_button]:z-10"+ >+ {pills.map((pill) => (+ <div+ key={pill.id}+ className="min-w-0 max-w-full truncate empty:hidden"+ >+ {pill.node}+ </div>+ ))}+ </div>+ ) : null}+ </div>+ {expansion ? (+ <button+ type="button"+ aria-expanded={expansion.expanded}+ aria-label={expansion.expanded ? t`Collapse` : t`Expand`}+ onClick={expansion.onToggle}+ className="relative z-10 -my-2 -mr-2 flex size-11 shrink-0 items-center justify-center text-muted-foreground"+ >+ <LuChevronRight+ className={cn(+ "size-5 transition-transform",+ expansion.expanded && "rotate-90"+ )}+ />+ </button>+ ) : null}+ {selection ? (+ <button+ type="button"+ aria-label={t`Select row`}+ className="absolute inset-0"+ onClick={selection.onToggle}+ />+ ) : null}+ </div>+ );+}diff --git a/apps/erp/app/components/Table/components/Compact/CompactToolbar.tsx b/apps/erp/app/components/Table/components/Compact/CompactToolbar.tsxnew file mode 100644index 0000000000..894c077fb8--- /dev/null+++ b/apps/erp/app/components/Table/components/Compact/CompactToolbar.tsx@@ -0,0 +1,205 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuIcon,+ DropdownMenuItem,+ DropdownMenuTrigger,+ IconButton+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import type { ReactNode } from "react";+import { useContext, useState } from "react";+import {+ LuDownload,+ LuEllipsis,+ LuListChecks,+ LuListFilter,+ LuUpload+} from "react-icons/lu";+import { SearchFilter } from "~/components";+import { ImportCSVModal } from "~/components/ImportCSVModal";+import { AppBarActions } from "~/components/Layout/Mobile/ChromeSlots";+import { RecordFrameContext } from "~/components/Layout/Panels";+import type { fieldMappings } from "~/modules/shared/imports.models";+import { type DownloadProps, useCsvDownload } from "../Download";+import { ActiveFilters } from "../Filter";+import type { ColumnFilter } from "../Filter/types";+import { useFilters } from "../Filter/useFilters";+import { FilterSortSheet } from "./FilterSortSheet";++const NO_EXPORT: DownloadProps = {+ data: [],+ columnAccessors: {},+ exportValues: {},+ exportOnlyColumns: [],+ columnOrder: [],+ columnVisibility: {}+};++type CompactToolbarProps = {+ title?: string;+ tableName?: string;+ count: number;+ filters: ColumnFilter[];+ sortKeyToLabel: Record<string, string>;+ withSearch: boolean;+ withSort: boolean;+ headerActions?: ReactNode;+ /** The badge desktop shows beside the table title (e.g. a document status). */+ titleBadge?: ReactNode;+ csvExport?: DownloadProps;+ importCSV?: { table: keyof typeof fieldMappings; label: string }[];+ onSelect?: () => void;+ hideControls?: boolean;+};++/**+ * The compact list toolbar: search plus a Filter & sort button+ * with a count, the active filter chips in one scrolling row, and an app bar+ * ⋯ for Export CSV, Import and Select. Column and density controls stay on+ * desktop.+ */+export function CompactToolbar({+ title,+ tableName,+ count,+ filters,+ sortKeyToLabel,+ withSearch,+ withSort,+ headerActions,+ titleBadge,+ csvExport,+ importCSV,+ onSelect,+ hideControls = false+}: CompactToolbarProps) {+ const { t } = useLingui();+ const { urlFiltersParams, hasFilters } = useFilters();+ const [sheetOpen, setSheetOpen] = useState(false);+ const exportCsv = useCsvDownload(csvExport ?? NO_EXPORT);+ const [importTable, setImportTable] = useState<+ keyof typeof fieldMappings | null+ >(null);++ const canFilter =+ filters.length > 0 || (withSort && Object.keys(sortKeyToLabel).length > 0);+ const activeCount = urlFiltersParams.filter(Boolean).length;+ const canExport = Boolean(csvExport?.data.length);+ const hasMenu = canExport || Boolean(importCSV?.length || onSelect);++ // Inside a record frame the app bar ⋯ is the record's: the table's own+ // ⋯ sits in its search row instead, so the bar never shows two.+ const inRecord = useContext(RecordFrameContext);+ const menu = (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton+ className="order-last"+ aria-label={t`More actions`}+ icon={<LuEllipsis />}+ // Matches the bordered Filter button beside it in the search row.+ variant={inRecord ? "secondary" : "ghost"}+ size="lg"+ />+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ {canExport ? (+ <DropdownMenuItem onClick={exportCsv}>+ <DropdownMenuIcon icon={<LuDownload />} />+ <Trans>Export CSV</Trans>+ </DropdownMenuItem>+ ) : null}+ {importCSV?.map(({ table, label }) => (+ <DropdownMenuItem key={table} onClick={() => setImportTable(table)}>+ <DropdownMenuIcon icon={<LuUpload />} />+ {t`Import ${label} CSV`}+ </DropdownMenuItem>+ ))}+ {onSelect ? (+ <DropdownMenuItem onClick={onSelect}>+ <DropdownMenuIcon icon={<LuListChecks />} />+ <Trans>Select</Trans>+ </DropdownMenuItem>+ ) : null}+ </DropdownMenuContent>+ </DropdownMenu>+ );++ return (+ <>+ {hasMenu && !inRecord ? <AppBarActions>{menu}</AppBarActions> : null}++ {titleBadge ? (+ <div className="shrink-0 flex items-center gap-2 bg-card px-4 pt-3">+ {titleBadge}+ </div>+ ) : null}+ {!hideControls && (withSearch || canFilter) ? (+ <div className="shrink-0 flex items-center gap-2 bg-card px-4 pt-3 pb-2">+ {withSearch ? (+ <div className="min-w-0 flex-1">+ <SearchFilter+ param="search"+ size="sm"+ placeholder={title ? t`Search ${title}` : t`Search`}+ />+ </div>+ ) : (+ <div className="flex-1" />+ )}+ {canFilter ? (+ <div className="relative shrink-0">+ <IconButton+ aria-label={t`Filter and sort`}+ icon={<LuListFilter />}+ variant={activeCount > 0 ? "active" : "secondary"}+ size="lg"+ onClick={() => setSheetOpen(true)}+ />+ {activeCount > 0 ? (+ <span className="pointer-events-none absolute -top-1 -right-1 min-w-4 rounded-full bg-primary px-1 text-center text-[10px] font-medium leading-4 text-primary-foreground tabular-nums">+ {activeCount}+ </span>+ ) : null}+ </div>+ ) : null}+ {hasMenu && inRecord ? menu : null}+ </div>+ ) : null}++ {!hideControls && hasFilters ? (+ <div className="shrink-0 overflow-x-auto scrollbar-hide scroll-fade-x bg-card px-4 pb-2 [&>div]:flex-nowrap [&>div]:w-max">+ <ActiveFilters filters={filters} />+ </div>+ ) : null}++ {!hideControls && headerActions ? (+ <div className="shrink-0 flex items-center gap-2 overflow-x-auto scrollbar-hide scroll-fade-x bg-card px-4 pt-0.5 pb-2.5 [&:not(:has(button,a,input))]:hidden [&>*]:shrink-0 [&_button]:h-11">+ {headerActions}+ </div>+ ) : null}++ {canFilter ? (+ <FilterSortSheet+ open={sheetOpen}+ onOpenChange={setSheetOpen}+ filters={filters}+ sortKeyToLabel={withSort ? sortKeyToLabel : {}}+ tableName={tableName}+ count={count}+ />+ ) : null}+ {importTable ? (+ <ImportCSVModal+ table={importTable}+ onClose={() => setImportTable(null)}+ />+ ) : null}+ </>+ );+}diff --git a/apps/erp/app/components/Table/components/Compact/FilterSortSheet.tsx b/apps/erp/app/components/Table/components/Compact/FilterSortSheet.tsxnew file mode 100644index 0000000000..3e791897ef--- /dev/null+++ b/apps/erp/app/components/Table/components/Compact/FilterSortSheet.tsx@@ -0,0 +1,334 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ BottomSheet,+ BottomSheetBack,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetFooter,+ BottomSheetHeader,+ BottomSheetTitle,+ Button,+ PrefetchLink,+ Spinner+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import type { PostgrestResponse } from "@supabase/supabase-js";+import type { ReactNode } from "react";+import { useEffect, useMemo, useState } from "react";+import {+ LuArrowDown,+ LuArrowUp,+ LuCheck,+ LuChevronRight+} from "react-icons/lu";+import { useFetcher, useLocation } from "react-router";+import { useUrlParams } from "~/hooks";+import { useSavedViews } from "~/hooks/useSavedViews";+import type { ColumnFilter, Option } from "../Filter/types";+import { useFilters } from "../Filter/useFilters";+import { useSort } from "../Sort/useSort";++const rowClassName =+ "flex min-h-12 w-full items-center gap-3 rounded-lg px-3 text-left text-[15px] text-foreground outline-none active:bg-accent focus-visible:ring-[3px] focus-visible:ring-ring/50";++function Overline({ children }: { children: ReactNode }) {+ return (+ <div className="px-3 pt-3 pb-1 text-xs font-medium uppercase tracking-[0.04em] text-muted-foreground">+ {children}+ </div>+ );+}++/** The options of one filter column: static, fetched, or a custom picker. */+function FilterOptions({+ filter,+ onClose+}: {+ filter: ColumnFilter;+ onClose: () => void;+}) {+ const { getFilter, hasFilter, setFilter, toggleFilter } = useFilters();+ const fetcher = useFetcher<PostgrestResponse<{ id: string; name: string }>>();+ const [options, setOptions] = useState<Option[]>(+ filter.filter.type === "static" ? filter.filter.options : []+ );++ // biome-ignore lint/correctness/useExhaustiveDependencies: load once per filter+ useEffect(() => {+ if (filter.filter.type === "fetcher") fetcher.load(filter.filter.endpoint);+ }, [filter.accessorKey]);++ useEffect(() => {+ if (+ filter.filter.type === "fetcher" &&+ fetcher.data &&+ typeof fetcher.data === "object" &&+ "data" in fetcher.data+ ) {+ setOptions(+ filter.filter.transform+ ? filter.filter.transform(fetcher.data.data)+ : (fetcher.data.data?.map((d) => ({ label: d.name, value: d.id })) ??+ [])+ );+ }+ }, [fetcher.data, filter.filter]);++ if (filter.filter.type === "custom") {+ return (+ <div className="px-1">+ {filter.filter.render({+ values: getFilter(filter.accessorKey),+ toggle: (value) =>+ toggleFilter(+ filter.accessorKey,+ value,+ filter.filter.type === "custom" ? filter.filter.isArray : false+ ),+ close: onClose+ })}+ </div>+ );+ }++ if (fetcher.state !== "idle" && options.length === 0) {+ return (+ <div className="flex justify-center py-8">+ <Spinner />+ </div>+ );+ }++ const isArray = "isArray" in filter.filter ? filter.filter.isArray : false;+ const isExclusive =+ filter.filter.type === "static" ? filter.filter.isExclusive : false;++ return (+ <div className="flex flex-col">+ {options.map((option) => {+ const checked = hasFilter(filter.accessorKey, option.value);+ return (+ // biome-ignore lint/a11y/useAriaPropsSupportedByRole: role is radio or checkbox+ <button+ key={option.value}+ type="button"+ role={isExclusive ? "radio" : "checkbox"}+ aria-checked={checked}+ className={rowClassName}+ onClick={() =>+ isExclusive && !checked+ ? setFilter(filter.accessorKey, option.value)+ : toggleFilter(filter.accessorKey, option.value, isArray)+ }+ >+ <span className="min-w-0 flex-1 truncate">+ {option.label}+ {option.helperText ? (+ <span className="block truncate text-xs text-muted-foreground">+ {option.helperText}+ </span>+ ) : null}+ </span>+ {checked ? (+ <LuCheck className="size-5 shrink-0 text-primary" />+ ) : null}+ </button>+ );+ })}+ </div>+ );+}++/**+ * Filter & sort for a compact list: saved views, then sort, then one+ * row per filter column that drills into its options. Every choice applies at+ * once through the same URL params as desktop, so the count stays live.+ */+export function FilterSortSheet({+ open,+ onOpenChange,+ filters,+ sortKeyToLabel,+ tableName,+ count+}: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ filters: ColumnFilter[];+ sortKeyToLabel: Record<string, string>;+ tableName?: string;+ count: number;+}) {+ const { t } = useLingui();+ const location = useLocation();+ const [, setParams] = useUrlParams();+ const { savedViews, view } = useSavedViews();+ const { clearFilters, getFilter, hasFilters } = useFilters();+ const [activeFilter, setActiveFilter] = useState<ColumnFilter | null>(null);++ useEffect(() => {+ if (!open) setActiveFilter(null);+ }, [open]);++ const views = useMemo(+ () =>+ tableName+ ? savedViews+ .filter((v) => v.table === tableName)+ .sort((a, b) => a.sortOrder - b.sortOrder)+ : [],+ [savedViews, tableName]+ );++ const { sorts, isSorted, toggleSortByAscending, toggleSortByDirection } =+ useSort();+ const sortEntries = Object.entries(sortKeyToLabel);++ // Like desktop, a new sort leads and the existing ones stay as tiebreakers.+ const setSort = (key: string) => {+ if (isSorted(key)) toggleSortByDirection(key);+ else toggleSortByAscending(key);+ };++ const reset = () => {+ clearFilters();+ setParams({ sort: undefined, filter: undefined });+ };++ const viewHref = (v: (typeof views)[number]) =>+ `${location.pathname}?view=${v.id}${+ v.filters?.length ? `&filter=${v.filters.join("&filter=")}` : ""+ }${v.sorts?.length ? `&sort=${v.sorts.join("&sort=")}` : ""}`;++ return (+ <BottomSheet open={open} onOpenChange={onOpenChange}>+ <BottomSheetContent>+ <BottomSheetHeader>+ {activeFilter ? (+ <BottomSheetBack onClick={() => setActiveFilter(null)} />+ ) : null}+ <BottomSheetTitle>+ {activeFilter ? activeFilter.header : <Trans>Filter & sort</Trans>}+ </BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody className="px-2">+ {activeFilter ? (+ <FilterOptions+ filter={activeFilter}+ onClose={() => setActiveFilter(null)}+ />+ ) : (+ <>+ {views.length > 0 ? (+ <>+ <Overline>+ <Trans>Saved views</Trans>+ </Overline>+ {views.map((v) => (+ <PrefetchLink+ key={v.id}+ to={viewHref(v)}+ className={rowClassName}+ onClick={() => onOpenChange(false)}+ >+ <span className="min-w-0 flex-1 truncate">{v.name}</span>+ {view === v.id ? (+ <LuCheck className="size-5 shrink-0 text-primary" />+ ) : null}+ </PrefetchLink>+ ))}+ </>+ ) : null}+ {sortEntries.length > 0 ? (+ <>+ <Overline>+ <Trans>Sort</Trans>+ </Overline>+ {sortEntries.map(([key, label]) => {+ const direction = isSorted(key);+ const isActive = direction !== null;+ return (+ <button+ key={key}+ type="button"+ role="checkbox"+ aria-checked={isActive}+ className={rowClassName}+ onClick={() => setSort(key)}+ >+ <span className="min-w-0 flex-1 truncate">{label}</span>+ {isActive ? (+ <span className="flex items-center gap-1 text-sm text-primary">+ {direction === -1 ? (+ <LuArrowDown className="size-4" />+ ) : (+ <LuArrowUp className="size-4" />+ )}+ {direction === -1 ? t`Descending` : t`Ascending`}+ </span>+ ) : null}+ </button>+ );+ })}+ </>+ ) : null}+ {filters.length > 0 ? (+ <>+ <Overline>+ <Trans>Filters</Trans>+ </Overline>+ {filters.map((filter) => {+ const applied = getFilter(filter.accessorKey);+ return (+ <button+ key={filter.accessorKey}+ type="button"+ className={rowClassName}+ onClick={() => setActiveFilter(filter)}+ >+ {filter.icon ? (+ <span className="flex size-5 shrink-0 items-center justify-center text-muted-foreground [&>svg]:size-5">+ {filter.icon}+ </span>+ ) : null}+ <span className="min-w-0 flex-1 truncate">+ {filter.header}+ </span>+ {applied.length > 0 ? (+ <span className="shrink-0 rounded-full bg-primary px-2 text-xs font-medium leading-5 text-primary-foreground tabular-nums">+ {applied.length}+ </span>+ ) : null}+ <LuChevronRight className="size-5 shrink-0 text-muted-foreground" />+ </button>+ );+ })}+ </>+ ) : null}+ </>+ )}+ </BottomSheetBody>+ <BottomSheetFooter>+ <Button+ variant="secondary"+ size="lg"+ onClick={reset}+ isDisabled={!hasFilters && sorts.length === 0}+ >+ <Trans>Reset</Trans>+ </Button>+ <Button+ variant="primary"+ size="lg"+ onClick={() => onOpenChange(false)}+ >+ {t`Show ${count} results`}+ </Button>+ </BottomSheetFooter>+ </BottomSheetContent>+ </BottomSheet>+ );+}diff --git a/apps/erp/app/components/Table/components/Compact/index.ts b/apps/erp/app/components/Table/components/Compact/index.tsnew file mode 100644index 0000000000..e1770dadb1--- /dev/null+++ b/apps/erp/app/components/Table/components/Compact/index.ts@@ -0,0 +1,5 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++export { CompactList } from "./CompactList";diff --git a/apps/erp/app/components/Table/components/Compact/resolveSlots.test.ts b/apps/erp/app/components/Table/components/Compact/resolveSlots.test.tsnew file mode 100644index 0000000000..402b1f7018--- /dev/null+++ b/apps/erp/app/components/Table/components/Compact/resolveSlots.test.ts@@ -0,0 +1,62 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { Column } from "@tanstack/react-table";+import { afterEach, describe, expect, it, vi } from "vitest";+import { resolveSlots } from "./resolveSlots";++type Row = Record<string, unknown>;++const col = (id: string, meta: Record<string, unknown> = {}) =>+ ({ id, columnDef: { meta } }) as unknown as Column<Row, unknown>;++const status = (id: string, mobile?: string) =>+ col(id, { mobile, filter: { type: "static", options: [] } });++afterEach(() => vi.restoreAllMocks());++describe("resolveSlots", () => {+ it("fills slots from explicit priorities", () => {+ const number = col("number", { mobile: "P1" });+ const supplier = col("supplier", { mobile: "P3" });+ const state = status("status", "P2");+ const total = col("total", { mobile: "P2" });+ const slots = resolveSlots([+ col("Select"),+ number,+ supplier,+ state,+ total,+ col("createdAt")+ ]);+ expect(slots?.p1).toBe(number);+ expect(slots?.p2).toBe(total);+ expect(slots?.p3).toBe(supplier);+ expect(slots?.pills).toEqual([state]);+ });++ it("falls back to the first data column and warns", () => {+ const warn = vi.spyOn(console, "warn").mockImplementation(() => undefined);+ const name = col("name");+ const slots = resolveSlots([col("Select"), name, col("other")], "Parts");+ expect(slots?.p1).toBe(name);+ expect(warn).toHaveBeenCalledWith(expect.stringContaining("Parts"));+ });++ it("never uses the select, actions or expand columns", () => {+ vi.spyOn(console, "warn").mockImplementation(() => undefined);+ expect(+ resolveSlots([col("Select"), col("Expand"), col("Actions")])+ ).toBeNull();+ const id = col("id");+ expect(resolveSlots([col("Expand"), col("Actions"), id])?.p1).toBe(id);+ });++ it("caps status pills at two", () => {+ const pills = [status("a", "P2"), status("b", "P2"), status("c", "P2")];+ const slots = resolveSlots([col("id", { mobile: "P1" }), ...pills]);+ expect(slots?.pills).toEqual(pills.slice(0, 2));+ expect(slots?.p2).toBeUndefined();+ });+});diff --git a/apps/erp/app/components/Table/components/Compact/resolveSlots.ts b/apps/erp/app/components/Table/components/Compact/resolveSlots.tsnew file mode 100644index 0000000000..dd63a6f6de--- /dev/null+++ b/apps/erp/app/components/Table/components/Compact/resolveSlots.ts@@ -0,0 +1,65 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { Column } from "@tanstack/react-table";++/** Columns the Table adds itself; they never fill a compact row slot. */+const STRUCTURAL_COLUMN_IDS = new Set(["Select", "Actions", "Expand"]);++const MAX_PILLS = 2;++export type CompactSlots<T> = {+ /** Line 1, leading: the record identity. */+ p1: Column<T, unknown>;+ /** Line 1, trailing: the primary metric (amount, quantity, date). */+ p2?: Column<T, unknown>;+ /** Line 2: the most useful context. */+ p3?: Column<T, unknown>;+ /** Line 3: status pills (enumerated P2 columns), at most two. */+ pills: Column<T, unknown>[];+};++/**+ * A P2 column filtered by a fixed option list is a status, shown as a pill;+ * `meta.mobilePill` marks a status column that has no such filter.+ */+function isStatusColumn<T>(column: Column<T, unknown>) {+ const meta = column.columnDef.meta;+ return Boolean(meta?.mobilePill) || meta?.filter?.type === "static";+}++/**+ * Map a table's visible columns onto the compact row from their+ * `meta.mobile` priorities. Without a P1, the first data column stands in and+ * a dev warning names the table, so a forgotten annotation never renders blank.+ * Returns null when the table has no data column at all.+ */+export function resolveSlots<T>(+ columns: Column<T, unknown>[],+ tableName = "table"+): CompactSlots<T> | null {+ const data = columns.filter((c) => !STRUCTURAL_COLUMN_IDS.has(c.id));+ if (data.length === 0) return null;++ const byPriority = (p: "P1" | "P2" | "P3") =>+ data.filter((c) => c.columnDef.meta?.mobile === p);++ let p1 = byPriority("P1")[0];+ if (!p1) {+ p1 = data[0];+ if (process.env.NODE_ENV !== "production") {+ // biome-ignore lint/suspicious/noConsole: dev-only authoring warning+ console.warn(+ `[CompactList] no P1 column in ${tableName}; using "${p1.id}". Add meta.mobile to its columns.`+ );+ }+ }++ const p2Columns = byPriority("P2").filter((c) => c !== p1);+ const p2 = p2Columns.find((c) => !isStatusColumn(c));+ const pills = p2Columns.filter(isStatusColumn).slice(0, MAX_PILLS);+ const p3 = byPriority("P3").find((c) => c !== p1);++ return { p1, p2, p3, pills };+}diff --git a/apps/erp/app/components/Table/components/Download.tsx b/apps/erp/app/components/Table/components/Download.tsxindex fe18ace35c..14c7fc0264 100644--- a/apps/erp/app/components/Table/components/Download.tsx+++ b/apps/erp/app/components/Table/components/Download.tsx@@ -15,7 +15,7 @@ import { LuDownload } from "react-icons/lu";import { useCustomers, useItems, usePeople, useSuppliers } from "~/stores";import { selectExportColumns } from "../utils";-type DownloadProps = {+export type DownloadProps = {data: object[];columnAccessors: Record<string, string>;exportValues: Record<string, (row: any) => unknown>;@@ -26,16 +26,18 @@ type DownloadProps = {exportOnlyColumns: string[];};-const Download = ({+/**+ * Builds the CSV of the current page (visible columns, view order) and+ * downloads it. The desktop Download button and the compact ⋯ menu share it.+ */+export function useCsvDownload({data,columnAccessors,exportValues,columnOrder,columnVisibility,exportOnlyColumns-}: DownloadProps) => {- const { t } = useLingui();-+}: DownloadProps) {const [items] = useItems();const [suppliers] = useSuppliers();const [people] = usePeople();@@ -89,6 +91,14 @@ const Download = ({downloadCsv(rows, "data.csv");}, [data, exportColumns, idNameMaps, columnAccessors, exportValues]);+ return onClick;+}++const Download = (props: DownloadProps) => {+ const { t } = useLingui();+ const { data } = props;+ const onClick = useCsvDownload(props);+if (!data?.length) {return null;}diff --git a/apps/erp/app/components/Table/types.ts b/apps/erp/app/components/Table/types.tsindex bbeb6a1afc..da61c270b7 100644--- a/apps/erp/app/components/Table/types.ts+++ b/apps/erp/app/components/Table/types.ts@@ -42,6 +42,15 @@ declare module "@tanstack/react-table" {// field than its accessor (e.g. accessor `supplierTypeId`, sort by `type`).// Must name a real column on the view.sortBy?: string;+ // Phone list priority: P1 = identity (line 1), P2 = trailing metric+ // or status pill, P3 = context (line 2); P4 or unset = not in the row.+ // See Table/components/Compact/resolveSlots.ts.+ mobile?: "P1" | "P2" | "P3" | "P4";+ /** Phones: show this P2 column as a status pill on line 3 (a status column without a static filter). */+ mobilePill?: boolean;+ /** Phones: lead this column's value with its (string) header, since a+ * list row shows no column headers. */+ mobileLabel?: boolean;}}diff --git a/apps/erp/app/components/TrainingPanel.tsx b/apps/erp/app/components/TrainingPanel.tsxindex 3352a74d27..c8b470cb47 100644--- a/apps/erp/app/components/TrainingPanel.tsx+++ b/apps/erp/app/components/TrainingPanel.tsx@@ -34,7 +34,7 @@ export default function TrainingPanel({animate={{ opacity: 1, y: 0, scale: 1, filter: "blur(0px)" }}exit={{ opacity: 0, y: 10, scale: 0.95, filter: "blur(4px)" }}transition={{ duration: 0.3, ease: "easeOut" }}- className="fixed bottom-4 right-4 w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden"+ className="fixed bottom-4 right-4 w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden compact:inset-0 compact:z-[60] compact:w-full compact:overflow-y-auto compact:rounded-none compact:border-0 compact:pt-safe compact:pb-safe"><div className="relative aspect-video w-full bg-muted"><iframediff --git a/apps/erp/app/modules/account/ui/Profile/ProfileForm.tsx b/apps/erp/app/modules/account/ui/Profile/ProfileForm.tsxindex 1720ec1d92..a24a9d48a8 100644--- a/apps/erp/app/modules/account/ui/Profile/ProfileForm.tsx+++ b/apps/erp/app/modules/account/ui/Profile/ProfileForm.tsx@@ -61,7 +61,10 @@ const ProfileForm = ({ user }: ProfileFormProps) => {/><Hidden name="intent" value="about" /></VStack>- <ProfilePhotoForm user={user} />+ {/* Phones: the avatar heads the form as the identity header. */}+ <div className="contents compact:block compact:order-first compact:justify-self-center">+ <ProfilePhotoForm user={user} />+ </div></div></CardContent><CardFooter>diff --git a/apps/erp/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx b/apps/erp/app/modules/account/ui/UserAttributes/UserAttributesForm.tsxindex dc804c5d29..6a997109c9 100644--- a/apps/erp/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx+++ b/apps/erp/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx@@ -179,7 +179,7 @@ function TypedForm(fetcher={updateFetcher}onSubmit={(data) => onSubmit(data.value)}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>@@ -216,7 +216,7 @@ function TypedForm(fetcher={updateFetcher}onSubmit={(data) => onSubmit(data.value)}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>@@ -249,7 +249,7 @@ function TypedForm(fetcher={updateFetcher}onSubmit={(data) => onSubmit(data.value)}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>@@ -290,7 +290,7 @@ function TypedForm(fetcher={updateFetcher}onSubmit={(data) => onSubmit(data.value)}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>@@ -323,7 +323,7 @@ function TypedForm(fetcher={updateFetcher}onSubmit={(data) => onSubmit(data.value)}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>@@ -356,7 +356,7 @@ function TypedForm(fetcher={updateFetcher}onSubmit={(data) => onSubmit(data.value)}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>@@ -389,7 +389,7 @@ function TypedForm(fetcher={updateFetcher}onSubmit={(data) => onSubmit(data.value)}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>@@ -422,7 +422,7 @@ function TypedForm(fetcher={updateFetcher}onSubmit={(data) => onSubmit(data.value)}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>@@ -483,7 +483,7 @@ function TypedDisplay(switch (type) {case DataType.Boolean:return (- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground items-center">{attribute.name}</p>{displayValue === "N/A" ? (<p className="self-center">{displayValue}</p>@@ -507,7 +507,7 @@ function TypedDisplay(case DataType.List:case DataType.Text:return (- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p><p className="self-center">{type === DataType.Date &&@@ -533,7 +533,7 @@ function TypedDisplay();case DataType.Numeric:return (- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p><p className="self-center">{displayValue.toLocaleString(locale)}</p><UpdateRemoveButtons@@ -548,7 +548,7 @@ function TypedDisplay();case DataType.User:return (- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>{value ? (<UserSelect disabled value={value.toString()} />@@ -568,7 +568,7 @@ function TypedDisplay();case DataType.Customer:return (- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>{value ? (<CustomerAvatar customerId={value.toString()} />@@ -588,7 +588,7 @@ function TypedDisplay();case DataType.Supplier:return (- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>{value ? (<SupplierAvatar supplierId={value.toString()} />@@ -608,7 +608,7 @@ function TypedDisplay();case DataType.File:return (- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p>{value ? (<a@@ -803,7 +803,7 @@ function FileAttributeForm({if (filePath) onSubmit(filePath);}}>- <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center compact:grid-cols-1 compact:gap-2"><p className="text-muted-foreground self-center">{attribute.name}</p><div><Hidden name="type" value="file" />diff --git a/apps/erp/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx b/apps/erp/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsxindex ef30a27951..d6e48efc3b 100644--- a/apps/erp/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx+++ b/apps/erp/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx@@ -592,7 +592,7 @@ const AccountDefaultsForm = ({><Hidden name="intent" value="all" /><div className="rounded-lg border border-border bg-card">- <div className="flex items-center justify-between border-b border-border p-6">+ <div className="flex items-center justify-between border-b border-border p-6 compact:flex-col compact:items-start compact:gap-3 compact:p-4"><div><Heading as="h1" size="h3"><Trans>Default Accounts</Trans>@@ -621,10 +621,13 @@ const AccountDefaultsForm = ({</Button></HStack></div>- <div className="flex flex-col gap-8 p-6">+ <div className="flex flex-col gap-8 p-6 compact:gap-6 compact:p-4">{categoryGroups.map((group) => (- <div key={group.id} className="border border-border rounded-lg">- <div className="py-6 px-4 border-b border-border">+ <div+ key={group.id}+ className="border border-border rounded-lg compact:border-0"+ >+ <div className="py-6 px-4 border-b border-border compact:px-0 compact:pt-0 compact:pb-3"><h2 className="text-base font-semibold text-foreground">{group.title}</h2>@@ -632,13 +635,13 @@ const AccountDefaultsForm = ({{group.description}</p></div>- <div className="flex flex-col gap-3 p-4">+ <div className="flex flex-col gap-3 p-4 compact:gap-5 compact:px-0">{group.fields.map((field) => (<divkey={field.name}- className="group rounded-lg border border-border p-4 transition-colors hover:border-muted-foreground/30"+ className="group rounded-lg border border-border p-4 transition-colors hover:border-muted-foreground/30 compact:border-0 compact:p-0">- <div className="flex items-start justify-between gap-4">+ <div className="flex items-start justify-between gap-4 compact:flex-col compact:items-stretch compact:gap-2"><div className="flex-1 min-w-0"><div className="flex items-center gap-2 mb-1"><h3 className="text-sm font-medium text-foreground">@@ -661,7 +664,7 @@ const AccountDefaultsForm = ({{field.description}</p></div>- <div className="flex-shrink-0 w-64">+ <div className="flex-shrink-0 w-64 compact:w-full"><Comboboxname={field.name}options={diff --git a/apps/erp/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTableFilters.tsx b/apps/erp/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTableFilters.tsxindex 66ace43d6c..1d6f7641fa 100644--- a/apps/erp/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTableFilters.tsx+++ b/apps/erp/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTableFilters.tsx@@ -4,14 +4,22 @@import {Button,+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuTrigger,HStack,+ IconButton,Input,InputGroup,- InputLeftElement+ InputLeftElement,+ useCompact} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";-import { LuCheckCheck, LuSearch, LuWallet, LuX } from "react-icons/lu";+import { LuCheckCheck, LuPlus, LuSearch, LuWallet, LuX } from "react-icons/lu";+import { Link } from "react-router";import { New, PeriodSelector } from "~/components";+import { AppBarActions } from "~/components/Layout/Mobile/ChromeSlots";import { usePermissions, useUrlParams } from "~/hooks";type ChartOfAccountsTableFiltersProps = {@@ -40,11 +48,14 @@ const ChartOfAccountsTableFilters = ({const { t } = useLingui();const [params, setParams] = useUrlParams();const permissions = usePermissions();+ const isCompact = useCompact();+ const newGroupTo = `new-group?${params.toString()}`;+ const newAccountTo = `new?${params.toString()}`;return (- <div className="flex px-4 py-3 items-center space-x-4 justify-between bg-card border-b border-border w-full">- <HStack>- <InputGroup size="sm" className="w-64">+ <div className="flex px-4 py-3 items-center space-x-4 justify-between bg-card border-b border-border w-full compact:flex-wrap compact:gap-y-1 compact:space-x-0 compact:px-0 compact:py-1.5">+ <HStack className="compact:w-full compact:flex-nowrap compact:overflow-x-auto compact:scrollbar-hide compact:scroll-fade-x compact:whitespace-nowrap compact:px-4 compact:py-1.5 compact:[&>*]:shrink-0">+ <InputGroup size="sm" className="w-64 compact:w-48"><InputLeftElement><LuSearch className="h-4 w-4 text-muted-foreground" /></InputLeftElement>@@ -70,7 +81,7 @@ const ChartOfAccountsTableFilters = ({</Button>)}</HStack>- <HStack>+ <HStack className="compact:ml-auto compact:mr-4">{openingBalanceMode ? (// Entering opening balances: Add Group / Add Account are hidden; only// Cancel + Post remain.@@ -89,12 +100,36 @@ const ChartOfAccountsTableFilters = ({</>) : (<>- {permissions.can("create", "accounting") && (- <>- <New label={t`Group`} to={`new-group?${params.toString()}`} />- <New label={t`Account`} to={`new?${params.toString()}`} />- </>- )}+ {permissions.can("create", "accounting") &&+ (isCompact ? (+ // Phones: one app bar "+" opens both Add actions, instead of+ // two identical "+" icons.+ <AppBarActions>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton+ aria-label={t`Add`}+ icon={<LuPlus />}+ variant="ghost"+ size="lg"+ />+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuItem asChild>+ <Link to={newGroupTo}>{t`Add Group`}</Link>+ </DropdownMenuItem>+ <DropdownMenuItem asChild>+ <Link to={newAccountTo}>{t`Add Account`}</Link>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </AppBarActions>+ ) : (+ <>+ <New label={t`Group`} to={newGroupTo} />+ <New label={t`Account`} to={newAccountTo} />+ </>+ ))}{canEnterOpeningBalances && (<Buttonvariant="secondary"diff --git a/apps/erp/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTree.tsx b/apps/erp/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTree.tsxindex 787b520d9e..b2ea5277ef 100644--- a/apps/erp/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTree.tsx+++ b/apps/erp/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTree.tsx@@ -188,7 +188,7 @@ const ChartOfAccountsTree = memo(</span>) : (accountingEnabled && (- <span className="w-32 text-right px-4">+ <span className="w-32 text-right px-4 compact:w-24 compact:pl-0">{params.get("startDate") ? t`Net Change` : t`Balance`}</span>)@@ -214,7 +214,7 @@ const ChartOfAccountsTree = memo(return (<divclassName={cn(- "flex h-8 cursor-pointer items-center overflow-hidden pr-4 text-sm group/row",+ "flex h-8 cursor-pointer items-center overflow-hidden pr-4 text-sm group/row compact:h-11",state.selected? "bg-muted hover:bg-accent": "bg-transparent hover:bg-accent",@@ -318,13 +318,13 @@ const ChartOfAccountsTree = memo() : (accountingEnabled &&(isGroup ? (- <span className="w-32 text-right tabular-nums shrink-0 text-muted-foreground">+ <span className="w-32 text-right tabular-nums shrink-0 text-muted-foreground compact:w-24">{formatCurrency(balance)}</span>) : (<buttontype="button"- className="w-32 text-right tabular-nums shrink-0 text-muted-foreground hover:text-foreground hover:underline underline-offset-2 decoration-border"+ className="w-32 compact:w-24 text-right tabular-nums shrink-0 text-muted-foreground hover:text-foreground hover:underline underline-offset-2 decoration-border"onClick={(e) => {e.stopPropagation();openLedger(account.id as string);@@ -340,10 +340,10 @@ const ChartOfAccountsTree = memo(<DropdownMenu><DropdownMenuTrigger asChild><button- className="ml-1 shrink-0 rounded-md p-1 opacity-0 transition-opacity hover:bg-accent group-hover/row:opacity-100"+ className="ml-1 shrink-0 rounded-md p-1 opacity-0 transition-opacity hover:bg-accent group-hover/row:opacity-100 compact:-mr-3 compact:flex compact:size-11 compact:items-center compact:justify-center compact:opacity-100"onClick={(e) => e.stopPropagation()}>- <LuEllipsisVertical className="h-3.5 w-3.5 text-muted-foreground" />+ <LuEllipsisVertical className="h-3.5 w-3.5 text-muted-foreground compact:size-5" /></button></DropdownMenuTrigger><DropdownMenuContent align="end">diff --git a/apps/erp/app/modules/accounting/ui/CostCenters/CostCenterNode.tsx b/apps/erp/app/modules/accounting/ui/CostCenters/CostCenterNode.tsxindex a0fca0b8d9..ad277ef7be 100644--- a/apps/erp/app/modules/accounting/ui/CostCenters/CostCenterNode.tsx+++ b/apps/erp/app/modules/accounting/ui/CostCenters/CostCenterNode.tsx@@ -64,7 +64,7 @@ function CostCenterNodeComponent({<DropdownMenu><DropdownMenuTrigger asChild><button- className="ml-auto shrink-0 rounded-md p-1 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 focus:opacity-100"+ className="ml-auto shrink-0 rounded-md p-1 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 focus:opacity-100 compact:opacity-100 compact:hit-area"aria-label={t`Actions`}><LuEllipsisVertical className="size-3.5 text-muted-foreground" />diff --git a/apps/erp/app/modules/accounting/ui/CostCenters/CostCentersTreeView.tsx b/apps/erp/app/modules/accounting/ui/CostCenters/CostCentersTreeView.tsxindex 301431237a..e53d90fe69 100644--- a/apps/erp/app/modules/accounting/ui/CostCenters/CostCentersTreeView.tsx+++ b/apps/erp/app/modules/accounting/ui/CostCenters/CostCentersTreeView.tsx@@ -2,6 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.+import { useCompact } from "@carbon/react";import {Background,BackgroundVariant,@@ -70,6 +71,7 @@ export function CostCentersTreeView({return { initialNodes: layoutedNodes, initialEdges: layoutedEdges };}, [costCenters, onEdit, onDelete, onAddChild]);+ const isCompact = useCompact();const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);@@ -79,7 +81,7 @@ export function CostCentersTreeView({}, [initialNodes, initialEdges, setNodes, setEdges]);return (- <div className="h-[calc(100dvh-(var(--header-height))-61px)] w-full overflow-hidden bg-card">+ <div className="h-[calc(100dvh-(var(--header-height))-61px)] w-full overflow-hidden compact:h-[calc(100dvh-var(--topbar-height)-var(--content-inset,0px)-61px)] bg-card"><ReactFlownodes={nodes}edges={edges}@@ -91,7 +93,8 @@ export function CostCentersTreeView({fitViewOptions={{padding: 0.3,maxZoom: 1.2,- minZoom: 0.3+ // Phones: never fit below a readable size; the user pans instead.+ minZoom: isCompact ? 0.75 : 0.3}}nodesDraggable={false}nodesConnectable={false}@@ -104,7 +107,7 @@ export function CostCentersTreeView({><ControlsshowInteractive={false}- className="!bg-card !border-border !shadow-sm [&>button]:!bg-card [&>button]:!border-border [&>button]:!text-foreground [&>button:hover]:!bg-accent"+ className="!bg-card !border-border !shadow-sm compact:!left-auto compact:!right-0 compact:[&>button]:!size-11 [&>button]:!bg-card [&>button]:!border-border [&>button]:!text-foreground [&>button:hover]:!bg-accent"/><Backgroundvariant={BackgroundVariant.Dots}diff --git a/apps/erp/app/modules/accounting/ui/Dimensions/DimensionsTable.tsx b/apps/erp/app/modules/accounting/ui/Dimensions/DimensionsTable.tsxindex 585c09dd0c..1c05178936 100644--- a/apps/erp/app/modules/accounting/ui/Dimensions/DimensionsTable.tsx+++ b/apps/erp/app/modules/accounting/ui/Dimensions/DimensionsTable.tsx@@ -43,6 +43,7 @@ const DimensionsTable = memo(({ data, count }: DimensionsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -51,6 +52,7 @@ const DimensionsTable = memo(({ data, count }: DimensionsTableProps) => {header: t`Entity Type`,cell: (item) => <Enumerable value={item.getValue<string>()} />,meta: {+ mobile: "P3",filter: {type: "static",options: dimensionEntityTypes.map((v) => ({@@ -87,6 +89,7 @@ const DimensionsTable = memo(({ data, count }: DimensionsTableProps) => {);},meta: {+ mobile: "P2",icon: <LuShapes />}}diff --git a/apps/erp/app/modules/accounting/ui/ExchangeRates/ExchangeRatesTable.tsx b/apps/erp/app/modules/accounting/ui/ExchangeRates/ExchangeRatesTable.tsxindex e46f492ad8..027ee8c32f 100644--- a/apps/erp/app/modules/accounting/ui/ExchangeRates/ExchangeRatesTable.tsx+++ b/apps/erp/app/modules/accounting/ui/ExchangeRates/ExchangeRatesTable.tsx@@ -54,6 +54,7 @@ const ExchangeRatesTable = memo(({ data, count }: ExchangeRatesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -62,6 +63,7 @@ const ExchangeRatesTable = memo(({ data, count }: ExchangeRatesTableProps) => {header: t`Code`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",icon: <LuEuro />}},@@ -74,6 +76,7 @@ const ExchangeRatesTable = memo(({ data, count }: ExchangeRatesTableProps) => {? formatExchangeRate(row.original.rate, locale): null,meta: {+ mobile: "P2",icon: <LuPercent />}},diff --git a/apps/erp/app/modules/accounting/ui/FiscalYear/FiscalYearSettingsForm.tsx b/apps/erp/app/modules/accounting/ui/FiscalYear/FiscalYearSettingsForm.tsxindex e4698a0b62..0677491cd5 100644--- a/apps/erp/app/modules/accounting/ui/FiscalYear/FiscalYearSettingsForm.tsx+++ b/apps/erp/app/modules/accounting/ui/FiscalYear/FiscalYearSettingsForm.tsx@@ -74,7 +74,7 @@ const FiscalYearSettingsForm = ({className="w-full"><div className="rounded-lg border border-border bg-card">- <div className="flex items-center justify-between border-b border-border p-6">+ <div className="flex items-center justify-between border-b border-border p-6 compact:flex-col compact:items-start compact:gap-3 compact:p-4"><div><Heading as="h1" size="h3"><Trans>Fiscal Year Settings</Trans>@@ -94,13 +94,13 @@ const FiscalYearSettingsForm = ({</Button></HStack></div>- <div className="flex flex-col gap-3 p-6">+ <div className="flex flex-col gap-3 p-6 compact:gap-5 compact:p-4">{fields.map((field) => (<divkey={field.name}- className="group rounded-lg border border-border p-4 transition-colors hover:border-muted-foreground/30"+ className="group rounded-lg border border-border p-4 transition-colors hover:border-muted-foreground/30 compact:border-0 compact:p-0">- <div className="flex items-start justify-between gap-4">+ <div className="flex items-start justify-between gap-4 compact:flex-col compact:items-stretch compact:gap-2"><div className="flex-1 min-w-0"><h3 className="text-sm font-medium text-foreground mb-1"><LabelWithHelp variant="inline" termId={field.termId}>@@ -119,7 +119,7 @@ const FiscalYearSettingsForm = ({</p>)}</div>- <div className="flex-shrink-0 w-64">+ <div className="flex-shrink-0 w-64 compact:w-full"><Selectname={field.name}options={months.map((month) => ({diff --git a/apps/erp/app/modules/accounting/ui/FixedAssets/AssetClassesTable.tsx b/apps/erp/app/modules/accounting/ui/FixedAssets/AssetClassesTable.tsxindex b7c1f07ec7..105e647890 100644--- a/apps/erp/app/modules/accounting/ui/FixedAssets/AssetClassesTable.tsx+++ b/apps/erp/app/modules/accounting/ui/FixedAssets/AssetClassesTable.tsx@@ -90,6 +90,7 @@ const AssetClassesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -98,6 +99,7 @@ const AssetClassesTable = memo(header: t`Book Depreciation`,cell: ({ row }) => formatBookDepreciation(row.original),meta: {+ mobile: "P3",icon: <LuCalendar />}}diff --git a/apps/erp/app/modules/accounting/ui/FixedAssets/DepreciationRunTable.tsx b/apps/erp/app/modules/accounting/ui/FixedAssets/DepreciationRunTable.tsxindex a06295352c..6c0ff3241b 100644--- a/apps/erp/app/modules/accounting/ui/FixedAssets/DepreciationRunTable.tsx+++ b/apps/erp/app/modules/accounting/ui/FixedAssets/DepreciationRunTable.tsx@@ -47,6 +47,7 @@ const DepreciationRunTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuHash />}},@@ -57,6 +58,7 @@ const DepreciationRunTable = memo(<DateTime value={row.original.periodEnd} variant="date" />),meta: {+ mobile: "P3",icon: <LuCalendar />}},@@ -67,6 +69,7 @@ const DepreciationRunTable = memo(<DepreciationRunStatus status={row.original.status} />),meta: {+ mobile: "P2",icon: <LuStar />}},diff --git a/apps/erp/app/modules/accounting/ui/FixedAssets/FixedAssetsTable.tsx b/apps/erp/app/modules/accounting/ui/FixedAssets/FixedAssetsTable.tsxindex 0acf4dd521..0298bf59ca 100644--- a/apps/erp/app/modules/accounting/ui/FixedAssets/FixedAssetsTable.tsx+++ b/apps/erp/app/modules/accounting/ui/FixedAssets/FixedAssetsTable.tsx@@ -67,6 +67,7 @@ const FixedAssetsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -74,6 +75,7 @@ const FixedAssetsTable = memo(accessorKey: "name",header: t`Name`,meta: {+ mobile: "P3",icon: <LuBuilding2 />}},@@ -95,6 +97,7 @@ const FixedAssetsTable = memo(/>),meta: {+ mobile: "P2",filter: {type: "static",options: fixedAssetStatuses.map((v) => ({@@ -166,6 +169,7 @@ const FixedAssetsTable = memo(return currencyFormatter.format(nbv);},meta: {+ mobile: "P2",icon: <LuCircleDollarSign />}}diff --git a/apps/erp/app/modules/accounting/ui/Intercompany/IntercompanyTransactionTable.tsx b/apps/erp/app/modules/accounting/ui/Intercompany/IntercompanyTransactionTable.tsxindex da29f28e01..7d392dfe7a 100644--- a/apps/erp/app/modules/accounting/ui/Intercompany/IntercompanyTransactionTable.tsx+++ b/apps/erp/app/modules/accounting/ui/Intercompany/IntercompanyTransactionTable.tsx@@ -61,6 +61,7 @@ const IntercompanyTransactionTable = memo(header: t`Target`,cell: ({ row }) => row.original.targetCompany?.name ?? "—",meta: {+ mobile: "P3",icon: <LuBuilding2 />}},@@ -79,6 +80,7 @@ const IntercompanyTransactionTable = memo();},meta: {+ mobile: "P2",icon: <LuCircleDollarSign />}},@@ -91,6 +93,7 @@ const IntercompanyTransactionTable = memo(</div>),meta: {+ mobile: "P1",icon: <LuFileText />}},@@ -106,6 +109,7 @@ const IntercompanyTransactionTable = memo(/>),meta: {+ mobile: "P2",filter: {type: "static",options: intercompanyTransactionStatuses.map((v) => ({diff --git a/apps/erp/app/modules/accounting/ui/JournalEntries/JournalEntriesTable.tsx b/apps/erp/app/modules/accounting/ui/JournalEntries/JournalEntriesTable.tsxindex 108e9fd3e9..86ef9240e6 100644--- a/apps/erp/app/modules/accounting/ui/JournalEntries/JournalEntriesTable.tsx+++ b/apps/erp/app/modules/accounting/ui/JournalEntries/JournalEntriesTable.tsx@@ -7,6 +7,7 @@ import {MENU_ITEM_SHORTCUTS,MenuIcon,MenuItem,+ useCompact,useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";@@ -67,6 +68,7 @@ const JournalEntriesTable = memo(const [selectedEntry, setSelectedEntry] =useState<JournalEntryListItem | null>(null);const deleteModal = useDisclosure();+ const isCompact = useCompact();const columns = useMemo<ColumnDef<JournalEntryListItem>[]>(() => {const defaultColumns: ColumnDef<JournalEntryListItem>[] = [@@ -81,6 +83,7 @@ const JournalEntriesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookmark />}},@@ -97,26 +100,31 @@ const JournalEntriesTable = memo({accessorKey: "description",header: t`Description`,- cell: ({ row }) => (- <HStack className="py-1" spacing={2}>- <div className="w-8 h-8 bg-muted rounded-lg flex items-center justify-center flex-shrink-0 p-1">- <JournalEntrySourceTypeIcon- sourceType={row.original.sourceType ?? "Manual"}- className="w-4 h-4 text-[#AAAAAA] dark:text-[#444]"- />- </div>-- <div className="flex flex-col max-w-[300px] truncate">- <div className="text-sm line-clamp-1">- {row.original.description || "—"}+ cell: ({ row }) =>+ // Phones: plain text on the row's context line (P3).+ isCompact ? (+ row.original.description || "—"+ ) : (+ <HStack className="py-1" spacing={2}>+ <div className="w-8 h-8 bg-muted rounded-lg flex items-center justify-center flex-shrink-0 p-1">+ <JournalEntrySourceTypeIcon+ sourceType={row.original.sourceType ?? "Manual"}+ className="w-4 h-4 text-[#AAAAAA] dark:text-[#444]"+ /></div>- <div className="text-xs text-muted-foreground">- {row.original.sourceType || "—"}++ <div className="flex flex-col max-w-[300px] truncate">+ <div className="text-sm line-clamp-1">+ {row.original.description || "—"}+ </div>+ <div className="text-xs text-muted-foreground">+ {row.original.sourceType || "—"}+ </div></div>- </div>- </HStack>- ),+ </HStack>+ ),meta: {+ mobile: "P3",icon: <LuFileText />}},@@ -146,6 +154,7 @@ const JournalEntriesTable = memo(/>),meta: {+ mobile: "P2",filter: {type: "static",options: journalEntryStatuses.map((v) => ({@@ -162,6 +171,7 @@ const JournalEntriesTable = memo(cell: ({ row }) =>currencyFormatter.format(Number(row.original.totalDebits)),meta: {+ mobile: "P2",icon: <LuCircleDollarSign />}},@@ -230,7 +240,7 @@ const JournalEntriesTable = memo(}];return defaultColumns;- }, [currencyFormatter, people, t]);+ }, [currencyFormatter, isCompact, people, t]);const renderContextMenu = useCallback((row: JournalEntryListItem) => {diff --git a/apps/erp/app/modules/accounting/ui/JournalEntries/JournalEntryForm.tsx b/apps/erp/app/modules/accounting/ui/JournalEntries/JournalEntryForm.tsxindex 98b8b3491d..9ffad1e0de 100644--- a/apps/erp/app/modules/accounting/ui/JournalEntries/JournalEntryForm.tsx+++ b/apps/erp/app/modules/accounting/ui/JournalEntries/JournalEntryForm.tsx@@ -7,17 +7,9 @@ import {Button,Card,CardContent,- CardHeader,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,LabelWithHelp,MENU_ITEM_SHORTCUTS,Status,@@ -28,7 +20,6 @@ import { Trans, useLingui } from "@lingui/react/macro";import { useCallback, useMemo, useState } from "react";import {LuCheckCheck,- LuEllipsisVertical,LuExternalLink,LuPlus,LuRotateCcw,@@ -36,7 +27,12 @@ import {LuTrash} from "react-icons/lu";import { Link, useNavigate } from "react-router";+import { DocumentHeader } from "~/components";import { DatePicker, Hidden, Input, Select } from "~/components/Form";+import {+ RecordAction,+ RecordHeroTarget+} from "~/components/Layout/RecordHeader";import { ConfirmDelete } from "~/components/Modals";import { usePermissions, useUser } from "~/hooks";import { useCurrencyFormatter } from "~/hooks/useCurrencyFormatter";@@ -74,6 +70,8 @@ type JournalEntryFormProps = {isDisabled?: boolean;};+const formId = "journal-entry-form";+function generateId() {return Math.random().toString(36).substring(2, 9);}@@ -176,110 +174,110 @@ const JournalEntryForm = ({})));+ const statusBadge = <JournalEntryStatus status={status as any} />;++ const menuItems = (+ <>+ {isPosted && permissions.can("create", "accounting") && (+ <DropdownMenuItem destructive onClick={reverseModal.onOpen}>+ <DropdownMenuIcon icon={<LuRotateCcw />} />+ <Trans>Reverse Entry</Trans>+ </DropdownMenuItem>+ )}+ {isDraft && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "accounting") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Journal Entry</Trans>+ </DropdownMenuItem>+ </>+ )}+ </>+ );+return (<>- <Card>+ <RecordHeroTarget bleed />+ <Card className="compact:mt-4"><ValidatedForm+ id={formId}method="post"validator={journalEntryValidator}defaultValues={initialValues}isReadOnly={isDisabled}style={{ width: "100%" }}>- <CardHeader className="flex-row items-center justify-between">- <HStack>- <Heading as="h1" size="h3" className="font-sans">- {displayId}- </Heading>- <Copy text={displayId} />-- {(isDraft || isPosted) && (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- type="button"- aria-label="More options"- icon={<LuEllipsisVertical />}+ <DocumentHeader+ title={displayId}+ status={statusBadge}+ menuItems={isDraft || isPosted ? menuItems : undefined}+ actions={+ <>+ {sourceDocument && (+ <RecordAction slot="overflow">+ <Buttonvariant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {isPosted && permissions.can("create", "accounting") && (- <DropdownMenuItem- destructive- onClick={reverseModal.onOpen}+ leftIcon={<LuExternalLink />}+ asChild+ >+ <Link to={sourceDocument.to}>+ {sourceDocument.readableId}+ </Link>+ </Button>+ </RecordAction>+ )}+ {isReversed && reversedById && (+ <RecordAction slot="overflow">+ <Button variant="secondary" asChild>+ <Link to={path.to.journalEntryDetails(reversedById)}>+ <Trans>Reversing Entry</Trans>+ </Link>+ </Button>+ </RecordAction>+ )}+ {isDraft && permissions.can("update", "accounting") && (+ <>+ {/* `form` keeps these submitting from the phone action+ bar, which renders outside the <form>. */}+ <RecordAction slot="secondary">+ <Button+ type="submit"+ form={formId}+ name="intent"+ value="save"+ leftIcon={<LuSave />}+ variant="secondary">- <DropdownMenuIcon icon={<LuRotateCcw />} />- Reverse Entry- </DropdownMenuItem>- )}- {isDraft && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "accounting") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- Delete Journal Entry- </DropdownMenuItem>- </>- )}- </DropdownMenuContent>- </DropdownMenu>- )}- <JournalEntryStatus status={status as any} />- </HStack>- <HStack>- {sourceDocument && (- <Button- variant="secondary"- leftIcon={<LuExternalLink />}- asChild- >- <Link to={sourceDocument.to}>- {sourceDocument.readableId}- </Link>- </Button>- )}- {isReversed && reversedById && (- <Button variant="secondary" asChild>- <Link to={path.to.journalEntryDetails(reversedById)}>- Reversing Entry- </Link>- </Button>- )}- {isDraft && permissions.can("update", "accounting") && (- <>- <Button- type="submit"- name="intent"- value="save"- leftIcon={<LuSave />}- variant="secondary"- >- Save Draft- </Button>- <Button- type="submit"- name="intent"- value="post"- leftIcon={<LuCheckCheck />}- variant="primary"- isDisabled={!isBalanced || totalDebits === 0}- >- Post- </Button>- </>- )}- </HStack>- </CardHeader>+ <Trans>Save Draft</Trans>+ </Button>+ </RecordAction>+ <RecordAction slot="primary">+ <Button+ type="submit"+ form={formId}+ name="intent"+ value="post"+ leftIcon={<LuCheckCheck />}+ variant="primary"+ isDisabled={!isBalanced || totalDebits === 0}+ >+ <Trans>Post</Trans>+ </Button>+ </RecordAction>+ </>+ )}+ </>+ }+ /><CardContent><Hidden name="id" />@@ -287,7 +285,7 @@ const JournalEntryForm = ({<VStack spacing={4} className="w-full">{/* Entry Details */}<div className="grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 w-full">- <div className="col-span-3">+ <div className="col-span-3 compact:col-span-1"><Input autoFocus name="description" label={t`Description`} /></div><Input@@ -315,12 +313,12 @@ const JournalEntryForm = ({{/* Journal Lines + Totals */}<div className="rounded-lg border border-border overflow-hidden w-full">{/* Column Headers */}- <div className="grid grid-cols-[auto_1fr_140px_140px_40px] items-center gap-3 px-4 py-2.5 text-sm text-muted-foreground font-medium bg-muted/50 border-b border-border">+ <div className="grid grid-cols-[auto_1fr_140px_140px_40px] items-center gap-3 px-4 py-2.5 text-sm text-muted-foreground font-medium bg-muted/50 border-b border-border compact:grid-cols-[24px_minmax(0,1fr)_minmax(0,1fr)_40px]"><div className="w-6" />- <div className="pl-3">+ <div className="pl-3 compact:col-span-3"><Trans>Account & Details</Trans></div>- <div className="text-right pr-3">+ <div className="text-right pr-3 compact:col-start-2"><LabelWithHelpvariant="inline"termId="journal-line-debit"@@ -374,9 +372,9 @@ const JournalEntryForm = ({)}{/* Totals */}- <div className="grid grid-cols-[auto_1fr_140px_140px_40px] items-center gap-3 px-4 py-3 bg-muted/50 border-t border-border">+ <div className="grid grid-cols-[auto_1fr_140px_140px_40px] items-center gap-3 px-4 py-3 bg-muted/50 border-t border-border compact:grid-cols-[24px_minmax(0,1fr)_minmax(0,1fr)_40px]"><div className="w-6" />- <div className="flex items-center gap-2 text-sm font-medium">+ <div className="flex items-center gap-2 text-sm font-medium compact:col-span-3 compact:flex-wrap">Totals{isBalanced && totalDebits > 0 ? (<Status color="green">Balanced</Status>@@ -396,7 +394,7 @@ const JournalEntryForm = ({</Status>)}</div>- <div className="text-right font-mono text-sm tabular-nums">+ <div className="text-right font-mono text-sm tabular-nums compact:col-start-2">{currencyFormatter.format(totalDebits)}</div><div className="text-right font-mono text-sm tabular-nums">diff --git a/apps/erp/app/modules/accounting/ui/JournalEntries/JournalLineRow.tsx b/apps/erp/app/modules/accounting/ui/JournalEntries/JournalLineRow.tsxindex 1a675daa6c..ecda377260 100644--- a/apps/erp/app/modules/accounting/ui/JournalEntries/JournalLineRow.tsx+++ b/apps/erp/app/modules/accounting/ui/JournalEntries/JournalLineRow.tsx@@ -70,14 +70,14 @@ const JournalLineRow = ({return (<div className="group">- <div className="grid grid-cols-[auto_1fr_140px_140px_40px] items-start gap-3 py-4 px-4 transition-colors hover:bg-muted/30">+ <div className="grid grid-cols-[auto_1fr_140px_140px_40px] items-start gap-3 py-4 px-4 transition-colors hover:bg-muted/30 compact:grid-cols-[24px_minmax(0,1fr)_minmax(0,1fr)_40px]">{/* Row number */}<div className="flex h-9 w-6 items-center justify-center text-xs font-medium text-muted-foreground tabular-nums">{index + 1}</div>{/* Account and Description */}- <div className="space-y-2">+ <div className="space-y-2 compact:col-span-3 compact:min-w-0"><AccountControlledvalue={line.accountId}onChange={handleAccountChange}@@ -106,6 +106,7 @@ const JournalLineRow = ({{/* Debit */}<NumberField+ className="compact:col-start-2"value={line.debit ?? 0}onChange={handleDebitChange}formatOptions={INPUT_FORMAT.rate(currencyCode, currencyDecimals)}@@ -114,7 +115,7 @@ const JournalLineRow = ({isReadOnly={isDisabled}><NumberInput- className="text-right font-mono tabular-nums"+ className="text-right font-mono tabular-nums compact:px-3"isReadOnly={isDisabled}/></NumberField>@@ -129,7 +130,7 @@ const JournalLineRow = ({isReadOnly={isDisabled}><NumberInput- className="text-right font-mono tabular-nums"+ className="text-right font-mono tabular-nums compact:px-3"isReadOnly={isDisabled}/></NumberField>@@ -143,7 +144,7 @@ const JournalLineRow = ({variant="ghost"onClick={onDelete}isDisabled={!canDelete}- className="size-8 p-0 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0"+ className="size-8 p-0 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0 compact:opacity-100"/>)}</div>diff --git a/apps/erp/app/modules/accounting/ui/PaymentTerms/PaymentTermsTable.tsx b/apps/erp/app/modules/accounting/ui/PaymentTerms/PaymentTermsTable.tsxindex 176e61db2b..1791e1c37e 100644--- a/apps/erp/app/modules/accounting/ui/PaymentTerms/PaymentTermsTable.tsx+++ b/apps/erp/app/modules/accounting/ui/PaymentTerms/PaymentTermsTable.tsx@@ -46,6 +46,7 @@ const PaymentTermsTable = memo(({ data, count }: PaymentTermsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -54,6 +55,7 @@ const PaymentTermsTable = memo(({ data, count }: PaymentTermsTableProps) => {header: t`Days Due`,cell: (item) => item.getValue(),meta: {+ mobile: "P2",icon: <LuCalendar />}},@@ -78,6 +80,7 @@ const PaymentTermsTable = memo(({ data, count }: PaymentTermsTableProps) => {header: t`Calculation Method`,cell: (item) => <Enumerable value={item.getValue<string>()} />,meta: {+ mobile: "P2",filter: {type: "static",options: paymentTermsCalculationMethod.map((v) => ({diff --git a/apps/erp/app/modules/accounting/ui/Periods/PeriodsTable.tsx b/apps/erp/app/modules/accounting/ui/Periods/PeriodsTable.tsxindex 79abb37ea0..2f71cf1c2c 100644--- a/apps/erp/app/modules/accounting/ui/Periods/PeriodsTable.tsx+++ b/apps/erp/app/modules/accounting/ui/Periods/PeriodsTable.tsx@@ -67,6 +67,7 @@ const PeriodsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuCalendarCheck />,exportValue: (row) => periodLabel(row)}@@ -78,6 +79,7 @@ const PeriodsTable = memo(<DateTime value={row.original.startDate} variant="date" />),meta: {+ mobile: "P3",icon: <LuCalendar />}},@@ -100,6 +102,7 @@ const PeriodsTable = memo(</Status>),meta: {+ mobile: "P2",filter: {type: "static",options: (["Active", "Inactive"] as const).map((v) => ({@@ -126,6 +129,7 @@ const PeriodsTable = memo(</Status>),meta: {+ mobile: "P2",filter: {type: "static",options: periodCloseStatuses.map((v) => ({diff --git a/apps/erp/app/modules/accounting/ui/Projects/ProjectsTable.tsx b/apps/erp/app/modules/accounting/ui/Projects/ProjectsTable.tsxindex 8181659f20..b8b39596a1 100644--- a/apps/erp/app/modules/accounting/ui/Projects/ProjectsTable.tsx+++ b/apps/erp/app/modules/accounting/ui/Projects/ProjectsTable.tsx@@ -40,6 +40,7 @@ const ProjectsTable = memo(({ data, count }: ProjectsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuFolderKanban />}},@@ -48,6 +49,7 @@ const ProjectsTable = memo(({ data, count }: ProjectsTableProps) => {header: t`Description`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",icon: <LuLetterText />}}diff --git a/apps/erp/app/modules/accounting/ui/Reports/AccountLedgerDrawer.tsx b/apps/erp/app/modules/accounting/ui/Reports/AccountLedgerDrawer.tsxindex e89c4b71ec..d34dc55b16 100644--- a/apps/erp/app/modules/accounting/ui/Reports/AccountLedgerDrawer.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/AccountLedgerDrawer.tsx@@ -116,7 +116,7 @@ const AccountLedgerDrawer = ({<span>{periodLabel}</span></div></DrawerHeader>- <DrawerBody className="p-0">+ <DrawerBody className="p-0 compact:p-0"><div className="grid w-full grid-cols-3 divide-x divide-border border-b border-border"><div className="px-4 py-3"><p className="text-xs text-muted-foreground">diff --git a/apps/erp/app/modules/accounting/ui/Reports/ExecutivePnlSummary.tsx b/apps/erp/app/modules/accounting/ui/Reports/ExecutivePnlSummary.tsxindex bac7b1fbd0..468c0cba41 100644--- a/apps/erp/app/modules/accounting/ui/Reports/ExecutivePnlSummary.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/ExecutivePnlSummary.tsx@@ -2,7 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { cn } from "@carbon/react";+import { cn, useCompact } from "@carbon/react";import type {ReportColumnGranularity,ReportPeriodBucket@@ -16,6 +16,8 @@ import { computeExecutivePnl, type ExecutivePnlRowKey } from "./executivePnl";import { getPeriodColumnLabel } from "./MultiPeriodStatementTree";const ACCOUNT_COLUMN_WIDTH = 360;+/** Phones: the pinned first column is capped at 150pt. */+const COMPACT_ACCOUNT_COLUMN_WIDTH = 150;const PERIOD_COLUMN_WIDTH = 128;type ExecutivePnlSummaryProps = {@@ -44,6 +46,10 @@ const ExecutivePnlSummary = memo(parentCurrency}: ExecutivePnlSummaryProps) => {const { t } = useLingui();+ const isCompact = useCompact();+ const accountColumnWidth = isCompact+ ? COMPACT_ACCOUNT_COLUMN_WIDTH+ : ACCOUNT_COLUMN_WIDTH;const { locale } = useLocale();useRealtime("journal");const scrollRef = useRef<HTMLDivElement>(null);@@ -94,7 +100,7 @@ const ExecutivePnlSummary = memo();const rowWidth =- ACCOUNT_COLUMN_WIDTH + periods.length * PERIOD_COLUMN_WIDTH + 16;+ accountColumnWidth + periods.length * PERIOD_COLUMN_WIDTH + 16;return (<div className="flex h-[calc(100dvh-var(--header-height)-61px)] w-full flex-col">@@ -106,7 +112,7 @@ const ExecutivePnlSummary = memo(><divclassName="sticky left-0 z-[2] flex h-full shrink-0 items-center bg-card px-4"- style={{ width: ACCOUNT_COLUMN_WIDTH }}+ style={{ width: accountColumnWidth }}><Trans>Executive P&L</Trans></div>@@ -129,7 +135,10 @@ const ExecutivePnlSummary = memo(</div></div>- <div ref={scrollRef} className="flex-1 overflow-auto">+ <div+ ref={scrollRef}+ className="flex-1 overflow-auto compact:scroll-fade-x"+ ><div style={{ minWidth: rowWidth }}>{rows.map((row) => (<div@@ -151,7 +160,7 @@ const ExecutivePnlSummary = memo("sticky left-0 z-[1] flex h-full shrink-0 items-center px-4",row.isBottomLine ? "bg-muted/40" : "bg-card")}- style={{ width: ACCOUNT_COLUMN_WIDTH }}+ style={{ width: accountColumnWidth }}><span className="truncate">{labels[row.key]}</span></div>diff --git a/apps/erp/app/modules/accounting/ui/Reports/MultiPeriodStatementTree.tsx b/apps/erp/app/modules/accounting/ui/Reports/MultiPeriodStatementTree.tsxindex 9e84e9fa8a..b19a0f192c 100644--- a/apps/erp/app/modules/accounting/ui/Reports/MultiPeriodStatementTree.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/MultiPeriodStatementTree.tsx@@ -2,7 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { cn } from "@carbon/react";+import { cn, useCompact } from "@carbon/react";import type {ReportColumnGranularity,ReportPeriodBucket@@ -26,6 +26,8 @@ import { NET_INCOME_ACCOUNT_ID } from "../../types";import { accountsToFlatTree, filterAccounts } from "./reportTree";const ACCOUNT_COLUMN_WIDTH = 360;+/** Phones: the pinned first column is capped at 150pt. */+const COMPACT_ACCOUNT_COLUMN_WIDTH = 150;const PERIOD_COLUMN_WIDTH = 128;type MultiPeriodStatementTreeProps = {@@ -86,6 +88,10 @@ const MultiPeriodStatementTree = memo(ledgerPath}: MultiPeriodStatementTreeProps) => {const { t } = useLingui();+ const isCompact = useCompact();+ const accountColumnWidth = isCompact+ ? COMPACT_ACCOUNT_COLUMN_WIDTH+ : ACCOUNT_COLUMN_WIDTH;const { locale } = useLocale();useRealtime("journal");const navigate = useNavigate();@@ -137,7 +143,7 @@ const MultiPeriodStatementTree = memo(});const rowWidth =- ACCOUNT_COLUMN_WIDTH + periods.length * PERIOD_COLUMN_WIDTH + 16;+ accountColumnWidth + periods.length * PERIOD_COLUMN_WIDTH + 16;return (<div className="flex h-[calc(100dvh-var(--header-height)-61px)] w-full flex-col">@@ -149,7 +155,7 @@ const MultiPeriodStatementTree = memo(><divclassName="sticky left-0 z-[2] flex h-full shrink-0 items-center bg-card px-4"- style={{ width: ACCOUNT_COLUMN_WIDTH }}+ style={{ width: accountColumnWidth }}><Trans>Account</Trans></div>@@ -179,7 +185,7 @@ const MultiPeriodStatementTree = memo(virtualizer={virtualizer}parentRef={parentRef}scrollRef={scrollRef}- parentClassName="flex-1 overflow-x-auto"+ parentClassName="flex-1 overflow-x-auto compact:scroll-fade-x"contentMinWidth={rowWidth}renderNode={({ node, state }) => {const account = node.data;@@ -215,7 +221,7 @@ const MultiPeriodStatementTree = memo(? "bg-muted group-hover/row:bg-accent": "bg-card group-hover/row:bg-accent")}- style={{ width: ACCOUNT_COLUMN_WIDTH }}+ style={{ width: accountColumnWidth }}>{/* Indentation lines */}<div className="flex h-9 items-center">@@ -246,7 +252,12 @@ const MultiPeriodStatementTree = memo(</div>{/* Folder icon */}- <div className="w-5 h-5 flex items-center justify-center mr-2 shrink-0">+ <div+ className={cn(+ "w-5 h-5 flex items-center justify-center mr-2 shrink-0",+ !isGroup && "compact:hidden"+ )}+ >{isGroup &&(isExpanded ? (<LuFolderOpen className="h-4 w-4 text-muted-foreground" />diff --git a/apps/erp/app/modules/accounting/ui/Reports/PivotControlBar.tsx b/apps/erp/app/modules/accounting/ui/Reports/PivotControlBar.tsxindex caa5b59d11..022788a8a7 100644--- a/apps/erp/app/modules/accounting/ui/Reports/PivotControlBar.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/PivotControlBar.tsx@@ -229,8 +229,10 @@ const PivotControlBar = ({};return (- <div className="flex flex-wrap px-4 py-3 items-center gap-2 justify-between bg-card border-b border-border w-full">- <HStack className="flex-wrap gap-y-2">+ <div className="flex flex-wrap px-4 py-3 items-center gap-2 justify-between bg-card border-b border-border w-full compact:gap-1 compact:px-0 compact:py-1.5">+ {/* Phones: the scope controls form one sideways-scrolling+ chip row; Download and the views menu sit on the line below. */}+ <HStack className="flex-wrap gap-y-2 compact:w-full compact:flex-nowrap compact:overflow-x-auto compact:scrollbar-hide compact:scroll-fade-x compact:whitespace-nowrap compact:px-4 compact:py-1.5 compact:[&>*]:shrink-0"><PeriodSelector variant="range" /><DropdownMenu><DropdownMenuTrigger asChild>@@ -443,7 +445,7 @@ const PivotControlBar = ({</Button>)}</HStack>- <HStack className="gap-2">+ <HStack className="gap-2 compact:ml-auto compact:px-4"><Buttonvariant="secondary"leftIcon={<LuDownload />}diff --git a/apps/erp/app/modules/accounting/ui/Reports/PivotLinesDrawer.tsx b/apps/erp/app/modules/accounting/ui/Reports/PivotLinesDrawer.tsxindex a0e445d3ef..614f56e759 100644--- a/apps/erp/app/modules/accounting/ui/Reports/PivotLinesDrawer.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/PivotLinesDrawer.tsx@@ -86,7 +86,7 @@ const PivotLinesDrawer = ({<DrawerHeader><DrawerTitle>{title}</DrawerTitle></DrawerHeader>- <DrawerBody className="p-0">+ <DrawerBody className="p-0 compact:p-0">{isLoading ? (<div className="flex w-full items-center justify-center py-16"><Spinner size={24} />diff --git a/apps/erp/app/modules/accounting/ui/Reports/PivotTree.tsx b/apps/erp/app/modules/accounting/ui/Reports/PivotTree.tsxindex d2c32eefd9..7d511e2152 100644--- a/apps/erp/app/modules/accounting/ui/Reports/PivotTree.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/PivotTree.tsx@@ -2,7 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { cn } from "@carbon/react";+import { cn, useCompact } from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import { useLocale } from "@react-aria/i18n";import { useVirtualizer } from "@tanstack/react-virtual";@@ -29,6 +29,8 @@ import {} from "./pivotData";const ROW_COLUMN_WIDTH = 360;+/** Phones: the pinned first column is capped at 150pt. */+const COMPACT_ROW_COLUMN_WIDTH = 150;const VALUE_COLUMN_WIDTH = 128;/**@@ -82,6 +84,10 @@ function formatMeasureValue(value: number, measure: PivotMeasure): string {const PivotTree = memo(({ pivot, state, columnLabels, onCellClick }: PivotTreeProps) => {const { t } = useLingui();+ const isCompact = useCompact();+ const rowColumnWidth = isCompact+ ? COMPACT_ROW_COLUMN_WIDTH+ : ROW_COLUMN_WIDTH;const { locale } = useLocale();const [, setParams] = useUrlParams();useRealtime("journal");@@ -192,7 +198,7 @@ const PivotTree = memo(const totalColumnsWidth = columnKeys.length * VALUE_COLUMN_WIDTH;const rowWidth =- ROW_COLUMN_WIDTH + totalColumnsWidth + VALUE_COLUMN_WIDTH + 16;+ rowColumnWidth + totalColumnsWidth + VALUE_COLUMN_WIDTH + 16;// Horizontal virtualizer over the value columns — thousands of columns stay// cheap because only the visible window renders in every row + header +@@ -265,7 +271,7 @@ const PivotTree = memo("group/header sticky left-0 z-[2] flex h-full shrink-0 items-center gap-1 bg-card px-4 text-muted-foreground hover:text-foreground",state.sort?.key === LABEL_SORT_KEY && "text-foreground")}- style={{ width: ROW_COLUMN_WIDTH }}+ style={{ width: rowColumnWidth }}onClick={() => cycleSort(LABEL_SORT_KEY, "asc")}>{renderSortIndicator(LABEL_SORT_KEY)}@@ -284,7 +290,7 @@ const PivotTree = memo(state.sort?.key === columnKey && "text-foreground")}style={{- left: ROW_COLUMN_WIDTH + virtualColumn.start,+ left: rowColumnWidth + virtualColumn.start,width: VALUE_COLUMN_WIDTH}}onClick={() => cycleSort(columnKey, "desc")}@@ -306,7 +312,7 @@ const PivotTree = memo(state.sort?.key === TOTAL_SORT_KEY && "text-foreground")}style={{- left: ROW_COLUMN_WIDTH + totalColumnsWidth,+ left: rowColumnWidth + totalColumnsWidth,width: VALUE_COLUMN_WIDTH}}onClick={() => cycleSort(TOTAL_SORT_KEY, "desc")}@@ -324,7 +330,7 @@ const PivotTree = memo(virtualizer={virtualizer}parentRef={parentRef}scrollRef={scrollRef}- parentClassName="flex-1 overflow-x-auto"+ parentClassName="flex-1 overflow-x-auto compact:scroll-fade-x"contentMinWidth={rowWidth}renderNode={({ node, state: nodeState }) => {const row = node.data;@@ -357,7 +363,7 @@ const PivotTree = memo(? "bg-muted group-hover/row:bg-accent": "bg-card group-hover/row:bg-accent")}- style={{ width: ROW_COLUMN_WIDTH }}+ style={{ width: rowColumnWidth }}>{/* Indentation lines */}<div className="flex h-9 items-center">@@ -408,7 +414,7 @@ const PivotTree = memo(key={columnKey}className="absolute top-0 flex h-full cursor-pointer items-center justify-end px-2 text-right tabular-nums text-muted-foreground hover:text-foreground hover:underline underline-offset-2 decoration-border"style={{- left: ROW_COLUMN_WIDTH + virtualColumn.start,+ left: rowColumnWidth + virtualColumn.start,width: VALUE_COLUMN_WIDTH}}onClick={(e) => {@@ -427,7 +433,7 @@ const PivotTree = memo(<spanclassName="absolute top-0 flex h-full cursor-pointer items-center justify-end px-2 text-right font-medium tabular-nums text-muted-foreground hover:text-foreground hover:underline underline-offset-2 decoration-border"style={{- left: ROW_COLUMN_WIDTH + totalColumnsWidth,+ left: rowColumnWidth + totalColumnsWidth,width: VALUE_COLUMN_WIDTH}}onClick={(e) => {@@ -449,7 +455,7 @@ const PivotTree = memo(><divclassName="sticky left-0 z-[2] flex h-full shrink-0 items-center bg-card px-4"- style={{ width: ROW_COLUMN_WIDTH }}+ style={{ width: rowColumnWidth }}><Trans>Total</Trans></div>@@ -461,7 +467,7 @@ const PivotTree = memo(key={columnKey}className="absolute top-0 flex h-full items-center justify-end px-2 text-right tabular-nums"style={{- left: ROW_COLUMN_WIDTH + virtualColumn.start,+ left: rowColumnWidth + virtualColumn.start,width: VALUE_COLUMN_WIDTH}}>@@ -487,7 +493,7 @@ const PivotTree = memo(<spanclassName="absolute top-0 flex h-full items-center justify-end px-2 text-right tabular-nums"style={{- left: ROW_COLUMN_WIDTH + totalColumnsWidth,+ left: rowColumnWidth + totalColumnsWidth,width: VALUE_COLUMN_WIDTH}}>diff --git a/apps/erp/app/modules/accounting/ui/Reports/PurchaseLinesDrawer.tsx b/apps/erp/app/modules/accounting/ui/Reports/PurchaseLinesDrawer.tsxindex cb0b0b3d46..297342d1a1 100644--- a/apps/erp/app/modules/accounting/ui/Reports/PurchaseLinesDrawer.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/PurchaseLinesDrawer.tsx@@ -84,7 +84,7 @@ const PurchaseLinesDrawer = ({<DrawerHeader><DrawerTitle>{title}</DrawerTitle></DrawerHeader>- <DrawerBody className="p-0">+ <DrawerBody className="p-0 compact:p-0">{isLoading ? (<div className="flex w-full items-center justify-center py-16"><Spinner size={24} />diff --git a/apps/erp/app/modules/accounting/ui/Reports/PurchasesControlBar.tsx b/apps/erp/app/modules/accounting/ui/Reports/PurchasesControlBar.tsxindex ab7b515687..c1a63eecee 100644--- a/apps/erp/app/modules/accounting/ui/Reports/PurchasesControlBar.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/PurchasesControlBar.tsx@@ -154,8 +154,10 @@ const PurchasesControlBar = ({};return (- <div className="flex flex-wrap px-4 py-3 items-center gap-2 justify-between bg-card border-b border-border w-full">- <HStack className="flex-wrap gap-y-2">+ <div className="flex flex-wrap px-4 py-3 items-center gap-2 justify-between bg-card border-b border-border w-full compact:gap-1 compact:px-0 compact:py-1.5">+ {/* Phones: the scope controls form one sideways-scrolling chip+ row; Download sits on the line below. */}+ <HStack className="flex-wrap gap-y-2 compact:w-full compact:flex-nowrap compact:overflow-x-auto compact:scrollbar-hide compact:scroll-fade-x compact:whitespace-nowrap compact:px-4 compact:py-1.5 compact:[&>*]:shrink-0"><PeriodSelector variant="range" /><DropdownMenu><DropdownMenuTrigger asChild>@@ -324,6 +326,7 @@ const PurchasesControlBar = ({variant="secondary"leftIcon={<LuDownload />}onClick={onDownload}+ className="compact:ml-auto compact:mr-4">{t`Download`}</Button>diff --git a/apps/erp/app/modules/accounting/ui/Reports/ReportFilters.tsx b/apps/erp/app/modules/accounting/ui/Reports/ReportFilters.tsxindex c2fb49ffc4..6bf56d8f20 100644--- a/apps/erp/app/modules/accounting/ui/Reports/ReportFilters.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/ReportFilters.tsx@@ -87,10 +87,12 @@ const ReportFilters = ({};return (- <div className="flex px-4 py-3 items-center space-x-4 justify-between bg-card border-b border-border w-full">- <HStack>+ <div className="flex px-4 py-3 items-center space-x-4 justify-between bg-card border-b border-border w-full compact:flex-wrap compact:gap-y-1 compact:space-x-0 compact:px-0 compact:py-1.5">+ {/* Phones: search, company, period and columns form one+ sideways-scrolling chip row; Download sits on the line below. */}+ <HStack className="compact:w-full compact:flex-nowrap compact:overflow-x-auto compact:scrollbar-hide compact:scroll-fade-x compact:whitespace-nowrap compact:px-4 compact:py-1.5 compact:[&>*]:shrink-0">{showSearch && (- <InputGroup size="sm" className="w-64">+ <InputGroup size="sm" className="w-64 compact:w-48"><InputLeftElement><LuSearch className="h-4 w-4 text-muted-foreground" /></InputLeftElement>@@ -176,6 +178,7 @@ const ReportFilters = ({variant="secondary"leftIcon={<LuDownload />}onClick={onDownload}+ className="compact:ml-auto compact:mr-4">{t`Download`}</Button>diff --git a/apps/erp/app/modules/accounting/ui/Reports/TrialBalanceTable.tsx b/apps/erp/app/modules/accounting/ui/Reports/TrialBalanceTable.tsxindex a642bb276d..2e745ab25d 100644--- a/apps/erp/app/modules/accounting/ui/Reports/TrialBalanceTable.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/TrialBalanceTable.tsx@@ -56,6 +56,7 @@ const TrialBalanceTable = memo(),size: 100,meta: {+ mobile: "P1",icon: <LuHash />}},@@ -153,6 +154,7 @@ const TrialBalanceTable = memo(data={data}columns={columns}count={count}+ mobileLayout="table"withSimpleSorting={false}title={t`Trial Balance`}/>diff --git a/apps/erp/app/modules/accounting/ui/Reports/TrialBalanceTree.tsx b/apps/erp/app/modules/accounting/ui/Reports/TrialBalanceTree.tsxindex 9a747d8b8f..3283771246 100644--- a/apps/erp/app/modules/accounting/ui/Reports/TrialBalanceTree.tsx+++ b/apps/erp/app/modules/accounting/ui/Reports/TrialBalanceTree.tsx@@ -2,7 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { cn, ScrollArea } from "@carbon/react";+import { cn, ScrollArea, useCompact } from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import { memo, useMemo, useRef } from "react";import {@@ -60,6 +60,7 @@ const TrialBalanceTree = memo(ledgerPath}: TrialBalanceTreeProps) => {const { t } = useLingui();+ const isCompact = useCompact();useRealtime("journal");const navigate = useNavigate();const [params] = useUrlParams();@@ -103,9 +104,16 @@ const TrialBalanceTree = memo(});return (- <ScrollArea className="h-[calc(100dvh-var(--header-height)-61px)] w-full">- <div className="sticky top-0 z-10 flex h-11 items-center pr-4 text-sm font-medium text-foreground/80 border-b border-border bg-card">- <div className="flex-1 px-4">+ <ScrollArea+ className={cn(+ "h-[calc(100dvh-var(--header-height)-61px)] w-full",+ // Phones: the viewport also scrolls sideways, with an+ // edge fade, behind a sticky 150pt account column.+ "compact:[&>[data-radix-scroll-area-viewport]]:!overflow-x-auto compact:[&>[data-radix-scroll-area-viewport]]:scroll-fade-x"+ )}+ >+ <div className="sticky top-0 z-10 flex h-11 items-center pr-4 text-sm font-medium text-foreground/80 border-b border-border bg-card compact:w-max compact:min-w-full">+ <div className="flex-1 px-4 compact:sticky compact:left-0 compact:z-[2] compact:w-[150px] compact:flex-none compact:truncate compact:bg-card"><Trans>Account</Trans></div><span className="w-28 text-right px-2">@@ -136,7 +144,12 @@ const TrialBalanceTree = memo(getNodeProps={getNodeProps}virtualizer={virtualizer}parentRef={parentRef}- parentClassName="h-full"+ parentClassName={cn(+ "h-full",+ // The viewport is the sideways scroller, so sticky cells pin to it.+ "compact:overflow-visible",+ showTranslated ? "compact:min-w-[806px]" : "compact:min-w-[694px]"+ )}renderNode={({ node, state }) => {const account = node.data;const isGroup = account.isGroup;@@ -158,24 +171,9 @@ const TrialBalanceTree = memo(const isDrillable = !isGroup && !!ledgerPath;- return (- <div- className={cn(- "flex h-8 cursor-pointer items-center overflow-hidden pr-4 text-sm group/row",- state.selected- ? "bg-muted hover:bg-accent"- : "bg-transparent hover:bg-accent",- isGroup && "font-semibold"- )}- onClick={() => {- selectNode(node.id, false);- if (isGroup) {- toggleExpandNode(node.id);- } else if (isDrillable) {- openLedger(account.id);- }- }}- >+ // Indentation + folder + number + name.+ const accountCell = (+ <>{/* Indentation lines */}<div className="flex h-9 items-center">{Array.from({ length: node.level }).map((_, index) => (@@ -205,7 +203,12 @@ const TrialBalanceTree = memo(</div>{/* Folder icon */}- <div className="w-5 h-5 flex items-center justify-center mr-2 shrink-0">+ <div+ className={cn(+ "w-5 h-5 flex items-center justify-center mr-2 shrink-0",+ !isGroup && "compact:hidden"+ )}+ >{isGroup &&(isExpanded ? (<LuFolderOpen className="h-4 w-4 text-muted-foreground" />@@ -223,6 +226,43 @@ const TrialBalanceTree = memo()}<span className="truncate">{account.name}</span></div>+ </>+ );++ return (+ <div+ className={cn(+ "flex h-8 cursor-pointer items-center overflow-hidden pr-4 text-sm group/row compact:overflow-visible",+ state.selected+ ? "bg-muted hover:bg-accent"+ : "bg-transparent hover:bg-accent",+ isGroup && "font-semibold"+ )}+ onClick={() => {+ selectNode(node.id, false);+ if (isGroup) {+ toggleExpandNode(node.id);+ } else if (isDrillable) {+ openLedger(account.id);+ }+ }}+ >+ {/* Compact: one sticky cell, so the name stays beside the+ amounts while they scroll sideways. */}+ {isCompact ? (+ <div+ className={cn(+ "sticky left-0 z-[1] flex h-full w-[150px] shrink-0 items-center overflow-hidden",+ state.selected+ ? "bg-muted group-hover/row:bg-accent"+ : "bg-card group-hover/row:bg-accent"+ )}+ >+ {accountCell}+ </div>+ ) : (+ accountCell+ )}{/* Beginning Balance */}<span className="w-28 text-right tabular-nums shrink-0 px-2 text-muted-foreground">diff --git a/apps/erp/app/modules/accounting/ui/SyncTieOut/SyncTieOutTable.tsx b/apps/erp/app/modules/accounting/ui/SyncTieOut/SyncTieOutTable.tsxindex 29adfd9c2f..11997cf3b8 100644--- a/apps/erp/app/modules/accounting/ui/SyncTieOut/SyncTieOutTable.tsx+++ b/apps/erp/app/modules/accounting/ui/SyncTieOut/SyncTieOutTable.tsx@@ -96,6 +96,7 @@ const SyncTieOutTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuCalendar />,exportValue: (row: AccountingSyncTieOutListItem) =>periodLabel(row.accountingPeriod, locale)@@ -115,6 +116,7 @@ const SyncTieOutTable = memo(</div>),meta: {+ mobile: "P3",icon: <LuSheet />,filter: {type: "static",@@ -145,6 +147,7 @@ const SyncTieOutTable = memo(/>),meta: {+ mobile: "P2",icon: <LuLink />,filter: {type: "static",@@ -163,7 +166,7 @@ const SyncTieOutTable = memo(accessorKey: "carbonPostedAmount",header: t`Carbon Posted`,cell: ({ row }) => formatAmount(row.original.carbonPostedAmount),- meta: { icon: <LuCircleDollarSign /> }+ meta: { mobile: "P2", icon: <LuCircleDollarSign /> }},{accessorKey: "syncedAmount",diff --git a/apps/erp/app/modules/agent/ui/AgentPanel.tsx b/apps/erp/app/modules/agent/ui/AgentPanel.tsxindex 6fbecd1f0f..fd294619e4 100644--- a/apps/erp/app/modules/agent/ui/AgentPanel.tsx+++ b/apps/erp/app/modules/agent/ui/AgentPanel.tsx@@ -72,7 +72,7 @@ export function AgentPanel() {<divclassName={`fixed right-4 z-40 flex flex-col w-100 max-w-[calc(100vw-2rem)] rounded-lg border bg-background shadow-lg overflow-hidden animate-in slide-in-from-top-4 fade-in duration-200 ${expanded ? "top-14 bottom-4" : "top-14 h-[45vh]"- }`}+ } compact:inset-0 compact:z-[60] compact:h-auto compact:w-full compact:max-w-none compact:rounded-none compact:border-0 compact:pt-safe compact:pb-safe`}><div className="flex items-center justify-between px-3 h-11 border-b shrink-0"><div className="flex items-center gap-2">diff --git a/apps/erp/app/modules/agent/ui/AgentThreadList.tsx b/apps/erp/app/modules/agent/ui/AgentThreadList.tsxindex a19cddff37..27c4db7517 100644--- a/apps/erp/app/modules/agent/ui/AgentThreadList.tsx+++ b/apps/erp/app/modules/agent/ui/AgentThreadList.tsx@@ -82,7 +82,7 @@ export function AgentThreadList({<buttontype="button"aria-label="Delete chat"- className="absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-1 text-muted-foreground opacity-0 group-hover:opacity-100 focus-visible:opacity-100 hover:text-destructive hover:bg-muted transition-opacity"+ className="absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-1 text-muted-foreground opacity-0 group-hover:opacity-100 focus-visible:opacity-100 hover:text-destructive hover:bg-muted transition-opacity compact:opacity-100"onClick={(e) => {e.stopPropagation();handleDelete(t.id);diff --git a/apps/erp/app/modules/documents/ui/Documents/DocumentCreateForm.tsx b/apps/erp/app/modules/documents/ui/Documents/DocumentCreateForm.tsxindex acd33b2dac..527aa5b4b5 100644--- a/apps/erp/app/modules/documents/ui/Documents/DocumentCreateForm.tsx+++ b/apps/erp/app/modules/documents/ui/Documents/DocumentCreateForm.tsx@@ -6,7 +6,7 @@ import { useCarbon } from "@carbon/auth";import { getCompanyPrivateBucket, storage } from "@carbon/files";import { convertHeicToJpeg, isHeic } from "@carbon/files/media";import { getLogger } from "@carbon/logger";-import { File, toast } from "@carbon/react";+import { File, toast, useCompact } from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import { nanoid } from "nanoid";import type { ChangeEvent } from "react";@@ -19,6 +19,7 @@ const logger = getLogger("erp", "documentcreateform");const DocumentCreateForm = () => {const { t } = useLingui();+ const isCompact = useCompact();const submit = useSubmit();const { carbon } = useCarbon();const {@@ -89,7 +90,12 @@ const DocumentCreateForm = () => {};return (- <File leftIcon={<LuUpload />} onChange={uploadFile}>+ <File+ leftIcon={<LuUpload />}+ onChange={uploadFile}+ // Phones: Upload is the list's one primary action.+ variant={isCompact ? "primary" : undefined}+ ><Trans>Upload</Trans></File>);diff --git a/apps/erp/app/modules/documents/ui/Documents/DocumentView.tsx b/apps/erp/app/modules/documents/ui/Documents/DocumentView.tsxindex d9fdb6c727..a91ab1b8a3 100644--- a/apps/erp/app/modules/documents/ui/Documents/DocumentView.tsx+++ b/apps/erp/app/modules/documents/ui/Documents/DocumentView.tsx@@ -89,13 +89,16 @@ const DocumentView = ({ bucket, document }: DocumentPreviewProps) => {defaultSize={50}maxSize={70}minSize={25}- className="bg-background"+ className="bg-background compact:overflow-y-auto"+ compactFocus><div className="flex items-center justify-between p-0.5"><Button isIcon variant={"ghost"} onClick={onClose}><LuX className="w-4 h-4" /></Button>- <span className="text-sm">{document.name}</span>+ <span className="text-sm compact:min-w-0 compact:truncate">+ {document.name}+ </span><Button variant={"ghost"} onClick={() => download(document)}><LuDownload className="w-4 h-4 mr-2" /><Trans>Download</Trans>diff --git a/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx b/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsxindex df8378b919..3e2b7b4e8a 100644--- a/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx+++ b/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx@@ -20,6 +20,7 @@ import {PopoverContent,PopoverTrigger,PrefetchLink,+ useCompact,useDisclosure} from "@carbon/react";import { filterEmpty } from "@carbon/utils";@@ -66,6 +67,7 @@ type DocumentsTableProps = {const DocumentsTable = memo(({ data, count, labels, extensions }: DocumentsTableProps) => {const { t } = useLingui();+ const isCompact = useCompact();const permissions = usePermissions();const revalidator = useRevalidator();const [params] = useUrlParams();@@ -207,6 +209,7 @@ const DocumentsTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -225,7 +228,7 @@ const DocumentsTable = memo(className="group flex items-center gap-1"><Enumerable value={row.original.sourceDocument} />{" "}- <span className="group-hover:opacity-100 opacity-0 transition-opacity duration-200 w-4 h-4 text-foreground">+ <span className="group-hover:opacity-100 opacity-0 transition-opacity duration-200 w-4 h-4 text-foreground compact:opacity-100"><LuExternalLink /></span></PrefetchLink>@@ -304,6 +307,7 @@ const DocumentsTable = memo(header: t`Size`,cell: ({ row }) => convertKbToString(row.original.size ?? 0),meta: {+ mobile: "P2",icon: <LuRuler />}},@@ -396,6 +400,7 @@ const DocumentsTable = memo(<DateTime value={item.getValue<string>()} variant="date" />),meta: {+ mobile: "P3",icon: <LuFileText />}},@@ -506,7 +511,11 @@ const DocumentsTable = memo(data={rows}defaultColumnVisibility={defaultColumnVisibility}primaryAction={- permissions.can("create", "documents") && <DocumentCreateForm />+ permissions.can("create", "documents") &&+ // Phones: uploading neither pins a file nor fills the trash.+ !(isCompact && (filter === "starred" || filter === "trash")) && (+ <DocumentCreateForm />+ )}renderContextMenu={renderContextMenu}title={t`Documents`}diff --git a/apps/erp/app/modules/inventory/ui/Inventory/InventoryItemHeader.tsx b/apps/erp/app/modules/inventory/ui/Inventory/InventoryItemHeader.tsxindex 0683a8e23f..bebe0b1583 100644--- a/apps/erp/app/modules/inventory/ui/Inventory/InventoryItemHeader.tsx+++ b/apps/erp/app/modules/inventory/ui/Inventory/InventoryItemHeader.tsx@@ -35,6 +35,7 @@ const InventoryItemHeader = ({<ButtonisIconvariant="ghost"+ className="compact:hidden"onClick={() =>navigate(`${path.to.inventory}?${params.toString()}`)}@@ -42,8 +43,11 @@ const InventoryItemHeader = ({<LuX className="w-4 h-4" /></Button><span className="flex items-center font-semibold text-center">- {itemReadableId}{" "}- <Link to={getLinkToItemDetails(itemType, itemId)} className="ml-2">+ <span className="compact:hidden">{itemReadableId}</span>{" "}+ <Link+ to={getLinkToItemDetails(itemType, itemId)}+ className="ml-2 compact:-mx-1.5 compact:-my-3.5 compact:p-3.5"+ ><LuExternalLink /></Link></span>diff --git a/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx b/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsxindex 0f56b31de0..ab884d6fd2 100644--- a/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx+++ b/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx@@ -141,6 +141,7 @@ const InventoryTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -160,6 +161,7 @@ const InventoryTable = memo(formatNumber(row.original.quantityOnHand)),meta: {+ mobile: "P2",icon: <LuBlocks />,renderTotal: true,formatter: formatNumberdiff --git a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCount.tsx b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCount.tsxindex e8f8c25bf6..d25dbea9f8 100644--- a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCount.tsx+++ b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCount.tsx@@ -24,6 +24,11 @@ import {LuSend} from "react-icons/lu";import { useFetcher, useRevalidator } from "react-router";+import {+ RecordAction,+ RecordHero,+ RecordPhoneChrome+} from "~/components/Layout/RecordHeader";import { usePermissions } from "~/hooks";import type {InventoryCountLine,@@ -103,70 +108,82 @@ const InventoryCountDetails = ({// edit gate (blind spans Draft + Pending, editing is Draft-only).const hideSystemQuantity = inventoryCount.isBlind && status !== "Posted";+ const statusBadge = <InventoryCountStatus status={status} />;+// Actions live in the table header (the `primaryAction` slot) instead of a// dedicated detail header. Notes are surfaced via an info icon → modal.const actions = (- <HStack spacing={2} className="items-center">+ <HStack spacing={2} className="items-center compact:hidden">{inventoryCount.notes && (- <IconButton- aria-label={t`View notes`}- variant="ghost"- icon={<LuInfo />}- onClick={notesModal.onOpen}- />+ <RecordAction slot="overflow">+ <IconButton+ aria-label={t`View notes`}+ variant="ghost"+ icon={<LuInfo />}+ onClick={notesModal.onOpen}+ />+ </RecordAction>)}{movements.length > 0 && (- <Button- variant="secondary"- leftIcon={<LuHistory />}- onClick={historyModal.onOpen}- >- {t`History`}- </Button>+ <RecordAction slot="overflow">+ <Button+ variant="secondary"+ leftIcon={<LuHistory />}+ onClick={historyModal.onOpen}+ >+ {t`History`}+ </Button>+ </RecordAction>)}{status === "Draft" && (- <Button- isDisabled={!canUpdate}- onClick={() => {- // Inline edits write directly to the DB without revalidating, so- // refresh the loader to get accurate warning counts before review.- revalidator.revalidate();- confirmModal.onOpen();- }}- leftIcon={<LuCheck />}- >- {t`Confirm`}- </Button>+ <RecordAction slot="primary">+ <Button+ isDisabled={!canUpdate}+ onClick={() => {+ // Inline edits write directly to the DB without revalidating, so+ // refresh the loader to get accurate warning counts before review.+ revalidator.revalidate();+ confirmModal.onOpen();+ }}+ leftIcon={<LuCheck />}+ >+ {t`Confirm`}+ </Button>+ </RecordAction>)}{status === "Pending" && (<>- <reopenFetcher.Form- method="post"- action={path.to.inventoryCountReopen(inventoryCount.id!)}- >- <Button- type="submit"- variant="secondary"- isDisabled={!canUpdate}- isLoading={reopenFetcher.state !== "idle"}- leftIcon={<LuRotateCcw />}+ <RecordAction slot="secondary">+ <reopenFetcher.Form+ method="post"+ action={path.to.inventoryCountReopen(inventoryCount.id!)}>- {t`Reopen`}- </Button>- </reopenFetcher.Form>- <postFetcher.Form- method="post"- action={path.to.inventoryCountPost(inventoryCount.id!)}- >- <Button- type="submit"- isDisabled={!canUpdate}- isLoading={postFetcher.state !== "idle"}- leftIcon={<LuSend />}+ <Button+ type="submit"+ variant="secondary"+ isDisabled={!canUpdate}+ isLoading={reopenFetcher.state !== "idle"}+ leftIcon={<LuRotateCcw />}+ >+ {t`Reopen`}+ </Button>+ </reopenFetcher.Form>+ </RecordAction>+ <RecordAction slot="primary">+ <postFetcher.Form+ method="post"+ action={path.to.inventoryCountPost(inventoryCount.id!)}>- {t`Post`}- </Button>- </postFetcher.Form>+ <Button+ type="submit"+ isDisabled={!canUpdate}+ isLoading={postFetcher.state !== "idle"}+ leftIcon={<LuSend />}+ >+ {t`Post`}+ </Button>+ </postFetcher.Form>+ </RecordAction></>)}</HStack>@@ -174,6 +191,8 @@ const InventoryCountDetails = ({return (<>+ <RecordHero status={statusBadge} />+ <RecordPhoneChrome /><div className="flex-1 min-h-0 w-full"><InventoryCountLineslines={lines}@@ -182,7 +201,7 @@ const InventoryCountDetails = ({isReadOnly={isReadOnly}locationId={inventoryCount.locationId}title={inventoryCount.inventoryCountId}- titleBadge={<InventoryCountStatus status={status} />}+ titleBadge={statusBadge}primaryAction={actions}invalidLineIds={invalidLineIds}forms={forms}diff --git a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountLines.tsx b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountLines.tsxindex 4ee20eafd5..0bc2071f38 100644--- a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountLines.tsx+++ b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountLines.tsx@@ -223,6 +223,7 @@ const InventoryCountLines = ({);},meta: {+ mobile: "P1",icon: <LuPackage />,// Display column (no accessorKey) — without an exportValue it is// absent from the CSV entirely.@@ -468,7 +469,7 @@ const InventoryCountLines = ({</span>);},- meta: { icon: <LuCalculator /> }+ meta: { mobile: "P2", icon: <LuCalculator /> }});if (!hideSystem) {@@ -676,6 +677,7 @@ const InventoryCountLines = ({)}<Table<InventoryCountLine>compact+ mobileLayout="table"columns={columns}data={lines}count={count}diff --git a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountsTable.tsx b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountsTable.tsxindex 287fc05229..ea6fedfea8 100644--- a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountsTable.tsx+++ b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountsTable.tsx@@ -58,7 +58,7 @@ const InventoryCountsTable = memo({row.original.inventoryCountId}</Hyperlink>),- meta: { icon: <LuBookMarked /> }+ meta: { mobile: "P1", icon: <LuBookMarked /> }},{accessorKey: "locationId",@@ -67,6 +67,7 @@ const InventoryCountsTable = memo(locations.find((l) => l.id === row.original.locationId)?.name ??null,meta: {+ mobile: "P3",filter: {type: "static",options: locations.map((location) => ({@@ -88,6 +89,7 @@ const InventoryCountsTable = memo(return <InventoryCountStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: Constants.public.Enums.inventoryCountStatus.map(diff --git a/apps/erp/app/modules/inventory/ui/Kanbans/KanbansTable.tsx b/apps/erp/app/modules/inventory/ui/Kanbans/KanbansTable.tsxindex 9649c4d94c..c4728a3a7a 100644--- a/apps/erp/app/modules/inventory/ui/Kanbans/KanbansTable.tsx+++ b/apps/erp/app/modules/inventory/ui/Kanbans/KanbansTable.tsx@@ -24,6 +24,7 @@ import {TooltipContent,TooltipTrigger,toast,+ useCompact,VStack} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";@@ -94,6 +95,7 @@ const KanbansTable = memo(const [items] = useItems();const [suppliers] = useSuppliers();const locations = useLocations();+ const isCompact = useCompact();const columns = useMemo<ColumnDef<Kanban>[]>(() => [@@ -120,6 +122,7 @@ const KanbansTable = memo(</HStack>),meta: {+ mobile: "P1",filter: {type: "static",options: items?.map((item) => ({@@ -154,6 +157,10 @@ const KanbansTable = memo(</Link></Badge>);+ },+ meta: {+ mobile: "P2",+ mobilePill: true}},{@@ -400,6 +407,7 @@ const KanbansTable = memo();},meta: {+ mobile: "P2",icon: <LuHash />}},@@ -410,6 +418,7 @@ const KanbansTable = memo(<Enumerable value={row.original.replenishmentSystem} />),meta: {+ mobile: "P2",filter: {type: "static",options: ["Buy", "Make", "Transfer"].map((type) => ({@@ -427,6 +436,7 @@ const KanbansTable = memo(<SupplierAvatar supplierId={row.original.supplierId} />),meta: {+ mobile: "P3",icon: <LuContainer />,filter: {type: "static",@@ -568,6 +578,48 @@ const KanbansTable = memo(</Link></MenuItem>)}+ {/* Phone rows drop the label links column; keep them reachable here */}+ {isCompact && kanbanOutput === "label" && (+ <>+ <MenuItem asChild>+ <a+ href={path.to.file.kanbanLabelsPdf([row.id!], "order")}+ target="_blank"+ rel="noreferrer"+ >+ <LuTag className="mr-2 size-4" />+ <Trans>Create</Trans>+ </a>+ </MenuItem>+ {row.replenishmentSystem === "Make" && (+ <>+ <MenuItem asChild>+ <a+ href={path.to.file.kanbanLabelsPdf([row.id!], "start")}+ target="_blank"+ rel="noreferrer"+ >+ <LuTag className="mr-2 size-4" />+ <Trans>Start</Trans>+ </a>+ </MenuItem>+ <MenuItem asChild>+ <a+ href={path.to.file.kanbanLabelsPdf(+ [row.id!],+ "complete"+ )}+ target="_blank"+ rel="noreferrer"+ >+ <LuTag className="mr-2 size-4" />+ <Trans>Complete</Trans>+ </a>+ </MenuItem>+ </>+ )}+ </>+ )}{canViewItems &&row.itemId &&(() => {@@ -607,7 +659,7 @@ const KanbansTable = memo(</>);},- [params, permissions, items.find]+ [params, permissions, items.find, isCompact, kanbanOutput]);const renderActions = useCallback((selectedRows: typeof data) => {diff --git a/apps/erp/app/modules/inventory/ui/PickingLists/PickingKanban.tsx b/apps/erp/app/modules/inventory/ui/PickingLists/PickingKanban.tsxindex 0a42c640bf..c28b1b0d2e 100644--- a/apps/erp/app/modules/inventory/ui/PickingLists/PickingKanban.tsx+++ b/apps/erp/app/modules/inventory/ui/PickingLists/PickingKanban.tsx@@ -59,11 +59,11 @@ const PickingKanban = memo(return (<div className="flex flex-col flex-1 min-h-0"><ScrollArea className="flex-1">- <div className="flex gap-0 items-start flex-row justify-start">+ <div className="flex gap-0 items-start flex-row justify-start compact:px-4">{columns.map((column) => (<divkey={column.id}- className="w-[350px] max-w-full flex flex-col flex-shrink-0 bg-card/30 border-r border-border h-[calc(100dvh-var(--header-height)*2)]"+ className="w-[350px] max-w-full flex flex-col flex-shrink-0 bg-card/30 border-r border-border h-[calc(100dvh-var(--header-height)*2)] compact:w-[300px]"><div className="p-4 w-full font-semibold text-left flex flex-row items-center gap-2 sticky top-0 z-1 border-b border-border bg-card"><PulsingDot inactive className="mt-1" />diff --git a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListHeader.tsx b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListHeader.tsxindex fa7f1d829c..babd2d236b 100644--- a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListHeader.tsx+++ b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListHeader.tsx@@ -4,16 +4,9 @@import {Button,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Modal,ModalBody,@@ -30,13 +23,13 @@ import {LuCircleCheck,LuCirclePlay,LuCircleStop,- LuEllipsisVertical,LuLoaderCircle,LuTrash,LuTriangleAlert} from "react-icons/lu";import { useFetcher, useParams } from "react-router";import Assignee, { useOptimisticAssignment } from "~/components/Assignee";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";import type {@@ -110,118 +103,119 @@ const PickingListHeader = () => {);};- return (+ const statusBadge = <PickingListStatus status={status} />;++ const menuItems = (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <Heading size="h4" className="flex items-center gap-2">- <span>{pickingList.pickingListId}</span>- </Heading>- <Copy text={pickingList.pickingListId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- status === "Draft" ||- statusFetcher.state !== "idle" ||- !permissions.can("delete", "inventory")- }- onClick={() => submitStatus("Draft")}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- status !== "Draft" ||- hasPickedLines ||- !permissions.can("delete", "inventory") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Picking List</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <PickingListStatus status={status} />- </HStack>+ <DropdownMenuItem+ disabled={+ status === "Draft" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("delete", "inventory")+ }+ onClick={() => submitStatus("Draft")}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ status !== "Draft" ||+ hasPickedLines ||+ !permissions.can("delete", "inventory") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Picking List</Trans>+ </DropdownMenuItem>+ </>+ );- <HStack>- <Assignee- size="md"- id={pickingListId}- value={assignee ?? ""}- table="pickingList"- isReadOnly={!permissions.can("update", "inventory")}- />- <Button- type="button"- leftIcon={<LuCirclePlay />}- variant={status === "Draft" ? "primary" : "secondary"}- isDisabled={- status !== "Draft" ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "inventory")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "In Progress"- }- onClick={() => submitStatus("In Progress")}- >- <Trans>Start</Trans>- </Button>- <Button- type="button"- leftIcon={<LuCircleCheck />}- variant="secondary"- isDisabled={- status !== "In Progress" ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "inventory")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Completed"- }- onClick={() => submitStatus("Completed")}- >- <Trans>Finish</Trans>- </Button>- <Button- type="button"- variant="secondary"- leftIcon={<LuCircleStop />}- isDisabled={- isClosed ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "inventory")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Cancelled"- }- onClick={() => submitStatus("Cancelled")}+ return (+ <>+ <RecordHeader+ title={pickingList.pickingListId}+ copyValue={pickingList.pickingListId ?? ""}+ menu={menuItems}+ status={statusBadge}+ actions={+ <>+ <RecordAction slot="overflow">+ <Assignee+ size="md"+ id={pickingListId}+ value={assignee ?? ""}+ table="pickingList"+ isReadOnly={!permissions.can("update", "inventory")}+ />+ </RecordAction>+ <RecordAction slot={status === "Draft" ? "primary" : "overflow"}>+ <Button+ type="button"+ leftIcon={<LuCirclePlay />}+ variant={status === "Draft" ? "primary" : "secondary"}+ isDisabled={+ status !== "Draft" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "inventory")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "In Progress"+ }+ onClick={() => submitStatus("In Progress")}+ >+ <Trans>Start</Trans>+ </Button>+ </RecordAction>+ <RecordAction+ slot={status === "In Progress" ? "primary" : "overflow"}>- <Trans>Cancel</Trans>- </Button>- </HStack>- </HStack>- </div>+ <Button+ type="button"+ leftIcon={<LuCircleCheck />}+ variant="secondary"+ isDisabled={+ status !== "In Progress" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "inventory")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Completed"+ }+ onClick={() => submitStatus("Completed")}+ >+ <Trans>Finish</Trans>+ </Button>+ </RecordAction>+ <RecordAction slot="overflow">+ <Button+ type="button"+ variant="secondary"+ leftIcon={<LuCircleStop />}+ isDisabled={+ isClosed ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "inventory")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Cancelled"+ }+ onClick={() => submitStatus("Cancelled")}+ >+ <Trans>Cancel</Trans>+ </Button>+ </RecordAction>+ </>+ }+ />{acknowledgeLines && (<Modaldiff --git a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListLines.tsx b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListLines.tsxindex 850b2d8e5a..4b10169c75 100644--- a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListLines.tsx+++ b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListLines.tsx@@ -366,7 +366,7 @@ function PickingListLineItem({return (<divclassName={cn(- "group flex items-center justify-between gap-6 p-4 border-b",+ "group flex items-center justify-between gap-6 p-4 border-b compact:flex-col compact:items-stretch compact:gap-3",isLast && "border-none")}>@@ -410,7 +410,10 @@ function PickingListLineItem({</VStack></HStack>- <HStack spacing={6} className="shrink-0">+ <HStack+ spacing={6}+ className="shrink-0 compact:flex-wrap compact:gap-3 compact:space-x-0"+ >{source ? (<div className="text-base font-medium whitespace-nowrap">{source}diff --git a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsHeader.tsx b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsHeader.tsxindex 98ce1dd99d..1f9a818d96 100644--- a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsHeader.tsx+++ b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsHeader.tsx@@ -57,7 +57,7 @@ export function PickingListsHeader({const locations = useLocations();return (- <HStack className="px-4 py-2 justify-between bg-card border-b border-border w-full">+ <HStack className="px-4 py-2 justify-between bg-card border-b border-border w-full compact:[&_:is(button,a)]:h-11 compact:[&_:is(button,a)]:min-w-11"><HStack><Button variant="secondary" leftIcon={<LuClipboardList />} asChild><Link to={path.to.pickingListsTable}>diff --git a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsTable.tsx b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsTable.tsxindex 3e5ae5d1b3..bb238c5b25 100644--- a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsTable.tsx+++ b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsTable.tsx@@ -25,6 +25,7 @@ import {import { Link, useNavigate } from "react-router";import { DateTime, EmployeeAvatar, Hyperlink, Table } from "~/components";import { ConfirmDelete } from "~/components/Modals";+import { NewAction } from "~/components/New";import { usePermissions, useUrlParams } from "~/hooks";import { path } from "~/utils/path";import { pickingListStatusType } from "../../inventory.models";@@ -70,6 +71,7 @@ const PickingListsTable = memo(({ data, count }: PickingListsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookmark />}},@@ -82,6 +84,7 @@ const PickingListsTable = memo(({ data, count }: PickingListsTableProps) => {return <PickingListStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: pickingListStatusType.map((type) => ({@@ -103,6 +106,7 @@ const PickingListsTable = memo(({ data, count }: PickingListsTableProps) => {"Unassigned"),meta: {+ mobile: "P3",icon: <LuUser />,exportValue: (row) => row.assigneeName}@@ -134,7 +138,8 @@ const PickingListsTable = memo(({ data, count }: PickingListsTableProps) => {const total = row.original.lineCount ?? 0;const completed = row.original.completedLineCount ?? 0;return `${completed}/${total}`;- }+ },+ meta: { mobile: "P2" }},{accessorKey: "createdAt",@@ -220,11 +225,13 @@ const PickingListsTable = memo(({ data, count }: PickingListsTableProps) => {}}primaryAction={permissions.can("create", "inventory") ? (- <Button asChild leftIcon={<LuCirclePlus />}>- <Link to={path.to.pickingSchedule}>- <Trans>New Picking List</Trans>- </Link>- </Button>+ <NewAction label={t`New Picking List`} to={path.to.pickingSchedule}>+ <Button asChild leftIcon={<LuCirclePlus />}>+ <Link to={path.to.pickingSchedule}>+ <Trans>New Picking List</Trans>+ </Link>+ </Button>+ </NewAction>) : undefined}renderContextMenu={renderContextMenu}diff --git a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsxindex 603daacd22..bc7e7dd630 100644--- a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx+++ b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx@@ -43,6 +43,10 @@ import {Location,Select} from "~/components/Form";+import {+ RecordAction,+ RecordHeroTarget+} from "~/components/Layout/RecordHeader";import { ConfirmDelete } from "~/components/Modals";import { usePermissions, useRouteData, useUser } from "~/hooks";import type {@@ -134,8 +138,44 @@ const ReceiptForm = ({navigation.state !== "idle" &&navigation.location?.pathname === path.to.newPurchaseInvoice;+ const statusBadge = <ReceiptStatus status={status} />;++ const menuItems = (+ <>+ {auditLogTrigger}+ {isPosted && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={+ isVoided || isInvoiced || !permissions.can("update", "inventory")+ }+ destructive+ onClick={voidModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTicketX />} />+ <Trans>Void</Trans>+ </DropdownMenuItem>+ </>+ )}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "inventory") || !permissions.is("employee")+ }+ destructive+ onClick={deleteDisclosure.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete</Trans>+ </DropdownMenuItem>+ </>+ );+return (<>+ <RecordHeroTarget bleed /><Card><ValidatedFormid={formId}@@ -147,98 +187,76 @@ const ReceiptForm = ({><DocumentHeadertitle={routeData?.receipt?.receiptId ?? ""}- status={<ReceiptStatus status={status} />}- menuItems={- <>- {auditLogTrigger}- {isPosted && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- isVoided ||- isInvoiced ||- !permissions.can("update", "inventory")- }- destructive- onClick={voidModal.onOpen}- >- <DropdownMenuIcon icon={<LuTicketX />} />- <Trans>Void</Trans>- </DropdownMenuItem>- </>- )}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "inventory") ||- !permissions.is("employee")- }- destructive- onClick={deleteDisclosure.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete</Trans>- </DropdownMenuItem>- </>- }+ status={statusBadge}+ menuItems={menuItems}actions={<>{receiptLineTracking.length > 0 && (- <PrintButton- sourceDocument="Receipt"- sourceDocumentId={receiptId}- locationId={locationId ?? undefined}- context="receiving"- fileRoutes={{- pdf: path.to.file.receiptLabelsPdf,- zpl: path.to.file.receiptLabelsZpl- }}- />+ <RecordAction slot="overflow">+ <PrintButton+ sourceDocument="Receipt"+ sourceDocumentId={receiptId}+ locationId={locationId ?? undefined}+ context="receiving"+ fileRoutes={{+ pdf: path.to.file.receiptLabelsPdf,+ zpl: path.to.file.receiptLabelsZpl+ }}+ />+ </RecordAction>)}- <SourceDocumentLink- sourceDocument={- routeData?.receipt?.sourceDocument ?? undefined- }- sourceDocumentId={- routeData?.receipt?.sourceDocumentId ?? undefined- }- sourceDocumentReadableId={- routeData?.receipt?.sourceDocumentReadableId ?? undefined- }- />- <InspectionsLink- inspections={routeData?.receiptInspections ?? []}- />- <Button- variant={canInvoice ? "primary" : "secondary"}- isDisabled={!canInvoice || isInvoicing}- isLoading={isInvoicing}- leftIcon={<LuCreditCard />}- asChild- >- <Link- to={`${path.to.newPurchaseInvoice}?sourceDocument=Purchase Order&sourceDocumentId=${routeData?.receipt?.sourceDocumentId}`}+ <RecordAction slot="overflow">+ <SourceDocumentLink+ sourceDocument={+ routeData?.receipt?.sourceDocument ?? undefined+ }+ sourceDocumentId={+ routeData?.receipt?.sourceDocumentId ?? undefined+ }+ sourceDocumentReadableId={+ routeData?.receipt?.sourceDocumentReadableId ?? undefined+ }+ />+ </RecordAction>+ <RecordAction slot="overflow">+ <InspectionsLink+ inspections={routeData?.receiptInspections ?? []}+ />+ </RecordAction>+ <RecordAction slot={isPosted ? "primary" : "overflow"}>+ <Button+ variant={canInvoice ? "primary" : "secondary"}+ isDisabled={!canInvoice || isInvoicing}+ isLoading={isInvoicing}+ leftIcon={<LuCreditCard />}+ asChild+ >+ <Link+ to={`${path.to.newPurchaseInvoice}?sourceDocument=Purchase Order&sourceDocumentId=${routeData?.receipt?.sourceDocumentId}`}+ >+ <Trans>Invoice</Trans>+ </Link>+ </Button>+ </RecordAction>+ <RecordAction slot={isPosted ? "overflow" : "primary"}>+ <Button+ variant={+ canPost && !isPosted && !isVoided+ ? "primary"+ : "secondary"+ }+ onClick={postModal.onOpen}+ isDisabled={+ !canPost ||+ isPosted ||+ isVoided ||+ !permissions.is("employee")+ }+ leftIcon={<LuCheckCheck />}>- <Trans>Invoice</Trans>- </Link>- </Button>- <Button- variant={- canPost && !isPosted && !isVoided ? "primary" : "secondary"- }- onClick={postModal.onOpen}- isDisabled={- !canPost ||- isPosted ||- isVoided ||- !permissions.is("employee")- }- leftIcon={<LuCheckCheck />}- >- <Trans>Post</Trans>- </Button>+ <Trans>Post</Trans>+ </Button>+ </RecordAction></>}/>diff --git a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptLines.tsx b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptLines.tsxindex 71dee6e110..f1c7ee4c2a 100644--- a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptLines.tsx+++ b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptLines.tsx@@ -362,7 +362,12 @@ function ReceiptFixedAssetLineItem({};return (- <div className={cn("flex items-center gap-4 p-6", className)}>+ <div+ className={cn(+ "flex items-center gap-4 p-6 compact:flex-wrap compact:p-4",+ className+ )}+ ><CheckboxisChecked={line.received}disabled={isReadOnly}@@ -384,7 +389,7 @@ function ReceiptFixedAssetLineItem({placeholder="Serial Number"value={serialNumber}isDisabled={isReadOnly}- className="w-48"+ className="w-48 compact:w-full"onChange={(e) => setSerialNumber(e.target.value)}onBlur={() => {if (serialNumber !== (line.serialNumber ?? "")) {@@ -459,8 +464,13 @@ function ReceiptLineItem({const isSurplus = remainingQuantity < 0;return (- <div className={cn("flex flex-col border-b p-6 gap-6 relative", className)}>- <div className="absolute top-3 right-6">+ <div+ className={cn(+ "flex flex-col border-b p-6 gap-6 relative compact:p-4 compact:gap-4",+ className+ )}+ >+ <div className="absolute top-3 right-6 compact:right-4"><DropdownMenu><DropdownMenuTrigger asChild><IconButton@@ -490,15 +500,21 @@ function ReceiptLineItem({</DropdownMenuContent></DropdownMenu></div>- <div className="flex flex-1 justify-between items-center w-full">- <HStack spacing={4} className="w-1/2">- <HStack spacing={4} className="flex-1">+ <div className="flex flex-1 justify-between items-center w-full compact:flex-col compact:items-stretch compact:gap-4">+ <HStack spacing={4} className="w-1/2 compact:w-full">+ <HStack+ spacing={4}+ className="flex-1 compact:flex-wrap compact:gap-4 compact:space-x-0"+ ><ItemThumbnailsize="md"thumbnailPath={line.thumbnailPath}type={(item?.type as "Part") ?? "Part"}/>- <VStack spacing={0}>+ <VStack+ spacing={0}+ className="compact:min-w-0 compact:flex-1 compact:pr-12"+ ><span className="text-sm font-medium">{item?.name}</span><span className="text-xs text-muted-foreground line-clamp-2">{item?.readableIdWithRevision}@@ -512,7 +528,7 @@ function ReceiptLineItem({/></div></VStack>- <VStack spacing={1}>+ <VStack spacing={1} className="compact:w-full"><label className="text-xs text-muted-foreground">Received</label><NumberField@@ -543,7 +559,7 @@ function ReceiptLineItem({}}><NumberInput- className="disabled:bg-transparent disabled:opacity-100 min-w-[100px]"+ className="disabled:bg-transparent disabled:opacity-100 min-w-[100px] compact:w-full"isDisabled={isReadOnly}size="sm"min={0}@@ -552,7 +568,7 @@ function ReceiptLineItem({</VStack></HStack></HStack>- <div className="flex flex-grow items-center justify-between gap-2 pl-4">+ <div className="flex flex-grow items-center justify-between gap-2 pl-4 compact:flex-wrap compact:gap-4 compact:pl-0"><HStack spacing={4}><VStack spacing={1} className="text-center items-center"><label className="text-xs text-muted-foreground">Ordered</label>@@ -584,7 +600,7 @@ function ReceiptLineItem({</VStack></HStack>- <div className="flex flex-col items-start gap-1 min-w-[140px] text-sm">+ <div className="flex flex-col items-start gap-1 min-w-[140px] text-sm compact:w-full"><label className="text-xs text-muted-foreground">Storage Unit</label>@@ -869,7 +885,7 @@ function BatchForm({const propertiesDisclosure = useDisclosure();return (- <div className="flex flex-col gap-6 w-full p-6 border rounded-lg">+ <div className="flex flex-col gap-6 w-full p-6 border rounded-lg compact:gap-4 compact:p-4"><div className="flex justify-between items-center gap-4"><Heading size="h4">Batch Properties</Heading><div className="flex items-center gap-2">@@ -1108,7 +1124,7 @@ function SerialForm({const propertiesDisclosure = useDisclosure();return (- <div className="flex flex-col gap-6 p-6 border rounded-lg">+ <div className="flex flex-col gap-6 p-6 border rounded-lg compact:gap-4 compact:p-4"><div className="flex justify-between items-center gap-6"><Heading size="h4">Serial Numbers</Heading><div className="flex items-center gap-2">@@ -1134,7 +1150,7 @@ function SerialForm({</div>{showExpiryField && (- <div className="flex flex-col gap-2 max-w-xs">+ <div className="flex flex-col gap-2 max-w-xs compact:max-w-none"><label className="text-xs text-muted-foreground flex items-center gap-2"><LuCalendar />{" "}<Trans>Expiration Date (applies to all serials on this line)</Trans>diff --git a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptsTable.tsx b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptsTable.tsxindex 2a6525809a..0c4678c1c7 100644--- a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptsTable.tsx+++ b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptsTable.tsx@@ -35,6 +35,7 @@ import {} from "~/components";import { Enumerable } from "~/components/Enumerable";import { ConfirmDelete } from "~/components/Modals";+import { NewAction } from "~/components/New";import { usePermissions, useRealtime, useUrlParams } from "~/hooks";import { useCustomColumns } from "~/hooks/useCustomColumns";import type { Receipt } from "~/modules/inventory";@@ -48,17 +49,26 @@ import { path } from "~/utils/path";function NewReceipt() {const fetcher = useFetcher();+ const { t } = useLingui();return (- <fetcher.Form method="post" action={path.to.newReceipt}>- <Button- type="submit"- leftIcon={<LuCirclePlus />}- variant="primary"- isLoading={fetcher.state !== "idle"}- >- <Trans>Add Receipt</Trans>- </Button>- </fetcher.Form>+ <NewAction+ label={t`Add Receipt`}+ isDisabled={fetcher.state !== "idle"}+ onClick={() =>+ fetcher.submit(null, { method: "post", action: path.to.newReceipt })+ }+ >+ <fetcher.Form method="post" action={path.to.newReceipt}>+ <Button+ type="submit"+ leftIcon={<LuCirclePlus />}+ variant="primary"+ isLoading={fetcher.state !== "idle"}+ >+ <Trans>Add Receipt</Trans>+ </Button>+ </fetcher.Form>+ </NewAction>);}@@ -91,6 +101,7 @@ const ReceiptsTable = memo(({ data, count }: ReceiptsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -99,6 +110,7 @@ const ReceiptsTable = memo(({ data, count }: ReceiptsTableProps) => {header: t`Source Document`,cell: (item) => <Enumerable value={item.getValue<string>()} />,meta: {+ mobile: "P2",filter: {type: "static",options: receiptSourceDocumentType.map((type) => ({@@ -160,6 +172,7 @@ const ReceiptsTable = memo(({ data, count }: ReceiptsTableProps) => {return <ReceiptStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: receiptStatusType.map((type) => ({@@ -222,6 +235,7 @@ const ReceiptsTable = memo(({ data, count }: ReceiptsTableProps) => {return <SupplierAvatar supplierId={row.original.supplierId} />;},meta: {+ mobile: "P3",filter: {type: "static",options: suppliers?.map((supplier) => ({diff --git a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentForm/ShipmentForm.tsx b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentForm/ShipmentForm.tsxindex a44fba25c9..7dd40b9fec 100644--- a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentForm/ShipmentForm.tsx+++ b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentForm/ShipmentForm.tsx@@ -54,6 +54,10 @@ import {Select,ShippingMethod} from "~/components/Form";+import {+ RecordAction,+ RecordHeroTarget+} from "~/components/Layout/RecordHeader";import { ConfirmDelete } from "~/components/Modals";import { usePermissions, useRouteData, useUser } from "~/hooks";import type {@@ -143,8 +147,50 @@ const ShipmentForm = ({);};+ const statusBadge = (+ <ShipmentStatus status={status} invoiced={routeData?.shipment?.invoiced} />+ );++ const menuItems = (+ <>+ {auditLogTrigger}+ {(isPosted || isVoided) && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={isVoided || !permissions.is("employee")}+ destructive+ onClick={voidModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTicketX />} />+ <Trans>Void</Trans>+ </DropdownMenuItem>+ </>+ )}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "inventory") || !permissions.is("employee")+ }+ destructive+ onClick={deleteDisclosure.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Shipment</Trans>+ </DropdownMenuItem>+ </>+ );++ // Phones lead with Invoice once a Sales Order shipment is posted.+ const isInvoicePrimary =+ isPosted &&+ !isVoided &&+ routeData?.shipment?.sourceDocument === "Sales Order";+return (<>+ <RecordHeroTarget bleed /><Card><ValidatedFormid={formId}@@ -156,100 +202,79 @@ const ShipmentForm = ({><DocumentHeadertitle={routeData?.shipment?.shipmentId ?? ""}- status={- <ShipmentStatus- status={status}- invoiced={routeData?.shipment?.invoiced}- />- }- menuItems={- <>- {auditLogTrigger}- {(isPosted || isVoided) && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={isVoided || !permissions.is("employee")}- destructive- onClick={voidModal.onOpen}- >- <DropdownMenuIcon icon={<LuTicketX />} />- <Trans>Void</Trans>- </DropdownMenuItem>- </>- )}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "inventory") ||- !permissions.is("employee")- }- destructive- onClick={deleteDisclosure.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Shipment</Trans>- </DropdownMenuItem>- </>- }+ status={statusBadge}+ menuItems={menuItems}actions={<>{hasTrackingLabels && (- <PrintButton- sourceDocument="Shipment"- sourceDocumentId={shipmentId}- locationId={locationId ?? undefined}- context="shipping"- fileRoutes={{- pdf: path.to.file.shipmentLabelsPdf,- zpl: path.to.file.shipmentLabelsZpl- }}- />+ <RecordAction slot="overflow">+ <PrintButton+ sourceDocument="Shipment"+ sourceDocumentId={shipmentId}+ locationId={locationId ?? undefined}+ context="shipping"+ fileRoutes={{+ pdf: path.to.file.shipmentLabelsPdf,+ zpl: path.to.file.shipmentLabelsZpl+ }}+ />+ </RecordAction>)}- <Button variant="secondary" leftIcon={<LuBarcode />} asChild>- <a- target="_blank"- href={path.to.file.shipment(shipmentId)}- rel="noreferrer"- >- <Trans>Packing Slip</Trans>- </a>- </Button>- <SourceDocumentLink- sourceDocument={- routeData?.shipment?.sourceDocument ?? undefined- }- sourceDocumentId={- routeData?.shipment?.sourceDocumentId ?? undefined- }- sourceDocumentReadableId={- routeData?.shipment?.sourceDocumentReadableId ?? undefined- }- />- {permissions.can("view", "invoicing") && (- <InvoiceButtons- shipment={routeData?.shipment}- relatedItems={routeData?.relatedItems}- shipmentId={shipmentId}- isPosted={isPosted}- isVoided={isVoided}- onCreateInvoice={createInvoice}+ <RecordAction+ slot={isPosted && !isInvoicePrimary ? "primary" : "secondary"}+ >+ <Button variant="secondary" leftIcon={<LuBarcode />} asChild>+ <a+ target="_blank"+ href={path.to.file.shipment(shipmentId)}+ rel="noreferrer"+ >+ <Trans>Packing Slip</Trans>+ </a>+ </Button>+ </RecordAction>+ <RecordAction slot="overflow">+ <SourceDocumentLink+ sourceDocument={+ routeData?.shipment?.sourceDocument ?? undefined+ }+ sourceDocumentId={+ routeData?.shipment?.sourceDocumentId ?? undefined+ }+ sourceDocumentReadableId={+ routeData?.shipment?.sourceDocumentReadableId ?? undefined+ }/>+ </RecordAction>+ {permissions.can("view", "invoicing") && (+ <RecordAction+ slot={isInvoicePrimary ? "primary" : "overflow"}+ >+ <InvoiceButtons+ shipment={routeData?.shipment}+ relatedItems={routeData?.relatedItems}+ shipmentId={shipmentId}+ isPosted={isPosted}+ isVoided={isVoided}+ onCreateInvoice={createInvoice}+ />+ </RecordAction>)}- <Button- variant={!isPosted && !isVoided ? "primary" : "secondary"}- onClick={postModal.onOpen}- isDisabled={- !canPost ||- isPosted ||- isVoided ||- !permissions.is("employee")- }- leftIcon={<LuCheckCheck />}- >- <Trans>Post</Trans>- </Button>+ <RecordAction slot={isPosted ? "overflow" : "primary"}>+ <Button+ variant={!isPosted && !isVoided ? "primary" : "secondary"}+ onClick={postModal.onOpen}+ isDisabled={+ !canPost ||+ isPosted ||+ isVoided ||+ !permissions.is("employee")+ }+ leftIcon={<LuCheckCheck />}+ >+ <Trans>Post</Trans>+ </Button>+ </RecordAction></>}/>diff --git a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentLines.tsx b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentLines.tsxindex b9bb091dc4..eeb044d000 100644--- a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentLines.tsx+++ b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentLines.tsx@@ -360,7 +360,12 @@ function ShipmentFixedAssetLineItem({};return (- <div className={cn("flex items-center gap-4 p-6", className)}>+ <div+ className={cn(+ "flex items-center gap-4 p-6 compact:flex-wrap compact:p-4",+ className+ )}+ ><CheckboxisChecked={line.shipped}disabled={isReadOnly}@@ -382,7 +387,7 @@ function ShipmentFixedAssetLineItem({placeholder="Serial Number"value={serialNumber}isDisabled={isReadOnly}- className="w-48"+ className="w-48 compact:w-full"onChange={(e) => setSerialNumber(e.target.value)}onBlur={() => {if (serialNumber !== (line.serialNumber ?? "")) {@@ -444,8 +449,13 @@ function ShipmentLineItem({(line.shippedQuantity || 0) > (line.fulfillment?.job?.quantity || 0);return (- <div className={cn("flex flex-col border-b p-6 gap-6 relative", className)}>- <div className="absolute top-3 right-6">+ <div+ className={cn(+ "flex flex-col border-b p-6 gap-6 relative compact:p-4 compact:gap-4",+ className+ )}+ >+ <div className="absolute top-3 right-6 compact:right-4">{line.fulfillment?.type === "Job" ? (<div className="flex flex-col items-end gap-0"><span>Job</span>@@ -484,16 +494,19 @@ function ShipmentLineItem({</DropdownMenu>)}</div>- <div className="flex flex-1 justify-between items-center w-full">- <HStack spacing={4} className="w-1/2">- <HStack spacing={4}>+ <div className="flex flex-1 justify-between items-center w-full compact:flex-col compact:items-stretch compact:gap-4">+ <HStack spacing={4} className="w-1/2 compact:w-full">+ <HStack spacing={4} className="compact:w-full"><ItemThumbnailsize="md"thumbnailPath={line.thumbnailPath}type={(item?.type as "Part") ?? "Part"}/>- <VStack spacing={0} className="max-w-[380px] w-full">+ <VStack+ spacing={0}+ className="max-w-[380px] w-full compact:min-w-0 compact:flex-1 compact:pr-20"+ ><div className="w-full overflow-hidden"><span className="text-sm font-medium truncate block w-full">{item?.readableIdWithRevision}@@ -513,9 +526,12 @@ function ShipmentLineItem({</VStack></HStack></HStack>- <div className="flex flex-grow items-center justify-between gap-2 pl-4 w-1/2">- <HStack spacing={4}>- <VStack spacing={1}>+ <div className="flex flex-grow items-center justify-between gap-2 pl-4 w-1/2 compact:w-full compact:flex-wrap compact:gap-4 compact:pl-0">+ <HStack+ spacing={4}+ className="compact:w-full compact:flex-wrap compact:gap-4 compact:space-x-0"+ >+ <VStack spacing={1} className="compact:w-full"><div className="flex items-center justify-between gap-1 w-full"><label className="text-xs text-muted-foreground">Shipped</label>{isJobOverShipped && (@@ -558,7 +574,7 @@ function ShipmentLineItem({><NumberInputclassName={cn(- "disabled:bg-transparent disabled:opacity-100 min-w-[100px]",+ "disabled:bg-transparent disabled:opacity-100 min-w-[100px] compact:w-full",isJobOverShipped && "border-red-500 border-2")}isDisabled={@@ -893,7 +909,7 @@ function BatchForm({);return (- <div className="flex flex-col gap-6 w-full p-6 border rounded-lg">+ <div className="flex flex-col gap-6 w-full p-6 border rounded-lg compact:gap-4 compact:p-4"><div className="flex justify-between items-center gap-4"><Heading size="h4">Tracking Number</Heading>{hasTrackingLabel && (@@ -1205,7 +1221,7 @@ function SerialForm({);return (- <div className="flex flex-col gap-6 p-6 border rounded-lg">+ <div className="flex flex-col gap-6 p-6 border rounded-lg compact:gap-4 compact:p-4"><div className="flex justify-between items-center gap-4"><Heading size="h4">Tracking Numbers</Heading>{hasTrackingLabel && (diff --git a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentsTable.tsx b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentsTable.tsxindex 6eedaee5bc..ac7aa5e148 100644--- a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentsTable.tsx+++ b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentsTable.tsx@@ -35,6 +35,7 @@ import {} from "~/components";import { Enumerable } from "~/components/Enumerable";import { ConfirmDelete } from "~/components/Modals";+import { NewAction } from "~/components/New";import { usePermissions, useRealtime, useUrlParams } from "~/hooks";import { useCustomColumns } from "~/hooks/useCustomColumns";import { useCustomers, usePeople } from "~/stores";@@ -48,17 +49,26 @@ import ShipmentStatus from "./ShipmentStatus";function NewShipment() {const fetcher = useFetcher();+ const { t } = useLingui();return (- <fetcher.Form method="post" action={path.to.newShipment}>- <Button- type="submit"- leftIcon={<LuCirclePlus />}- variant="primary"- isLoading={fetcher.state !== "idle"}- >- <Trans>Add Shipment</Trans>- </Button>- </fetcher.Form>+ <NewAction+ label={t`Add Shipment`}+ isDisabled={fetcher.state !== "idle"}+ onClick={() =>+ fetcher.submit(null, { method: "post", action: path.to.newShipment })+ }+ >+ <fetcher.Form method="post" action={path.to.newShipment}>+ <Button+ type="submit"+ leftIcon={<LuCirclePlus />}+ variant="primary"+ isLoading={fetcher.state !== "idle"}+ >+ <Trans>Add Shipment</Trans>+ </Button>+ </fetcher.Form>+ </NewAction>);}@@ -91,6 +101,7 @@ const ShipmentsTable = memo(({ data, count }: ShipmentsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -99,6 +110,7 @@ const ShipmentsTable = memo(({ data, count }: ShipmentsTableProps) => {header: t`Source Document`,cell: (item) => <Enumerable value={item.getValue<string>()} />,meta: {+ mobile: "P2",filter: {type: "static",options: shipmentSourceDocumentType.map((type) => ({@@ -175,6 +187,7 @@ const ShipmentsTable = memo(({ data, count }: ShipmentsTableProps) => {);},meta: {+ mobile: "P2",filter: {type: "static",options: shipmentStatusType.map((type) => ({@@ -252,6 +265,7 @@ const ShipmentsTable = memo(({ data, count }: ShipmentsTableProps) => {return <CustomerAvatar customerId={row.original.customerId} />;},meta: {+ mobile: "P3",filter: {type: "static",options: customers?.map((customer) => ({diff --git a/apps/erp/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable.tsx b/apps/erp/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable.tsxindex bcc800e531..b260374f54 100644--- a/apps/erp/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable.tsx+++ b/apps/erp/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable.tsx@@ -58,6 +58,7 @@ const ShippingMethodsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -66,6 +67,7 @@ const ShippingMethodsTable = memo(header: t`Carrier`,cell: (item) => <Enumerable value={item.getValue<string>()} />,meta: {+ mobile: "P2",filter: {type: "static",options: shippingCarrierType.map((v) => ({diff --git a/apps/erp/app/modules/inventory/ui/StockMovements/StockMovementsTable.tsx b/apps/erp/app/modules/inventory/ui/StockMovements/StockMovementsTable.tsxindex d63bd64ff6..6e8afb36d6 100644--- a/apps/erp/app/modules/inventory/ui/StockMovements/StockMovementsTable.tsx+++ b/apps/erp/app/modules/inventory/ui/StockMovements/StockMovementsTable.tsx@@ -98,6 +98,7 @@ const StockMovementsTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBlocks />}},@@ -111,6 +112,7 @@ const StockMovementsTable = memo(header: t`Entry Type`,cell: (item) => <Enumerable value={item.getValue<string>()} />,meta: {+ mobile: "P2",filter: {type: "static",options: itemLedgerTypes.map((type) => ({@@ -126,6 +128,7 @@ const StockMovementsTable = memo(header: t`Document Type`,cell: (item) => <Enumerable value={item.getValue<string>()} />,meta: {+ mobile: "P2",filter: {type: "static",options: itemLedgerDocumentTypes.map((type) => ({@@ -165,6 +168,7 @@ const StockMovementsTable = memo(header: t`Quantity`,cell: ({ row }) => <QuantityDelta value={row.original.quantity} />,meta: {+ mobile: "P2",icon: <LuHash />}},@@ -239,6 +243,7 @@ const StockMovementsTable = memo(<DateTime value={item.getValue<string>()} variant="date" />),meta: {+ mobile: "P3",icon: <LuCalendar />}},diff --git a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferHeader.tsx b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferHeader.tsxindex 3f6bdade28..c99444edf7 100644--- a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferHeader.tsx+++ b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferHeader.tsx@@ -6,16 +6,9 @@ import type { Result } from "@carbon/auth";import { useRuleViolations } from "@carbon/ee/rules";import {Button,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,useDisclosure} from "@carbon/react";@@ -24,7 +17,6 @@ import {LuBarcode,LuCircleCheck,LuCirclePlay,- LuEllipsisVertical,LuLoaderCircle,LuTrash} from "react-icons/lu";@@ -32,6 +24,7 @@ import { useFetcher, useParams } from "react-router";import { PrintButton } from "~/components";import Assignee, { useOptimisticAssignment } from "~/components/Assignee";import { useAuditLog } from "~/components/AuditLog";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";import {@@ -107,145 +100,148 @@ const StockTransferHeader = () => {(line) => !!line.trackedEntityId);- return (+ const statusBadge = (+ <StockTransferStatus status={routeData?.stockTransfer?.status} />+ );++ const menuItems = (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.stockTransfer?.stockTransferId}</span>- </Heading>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={+ ["Draft"].includes(routeData?.stockTransfer?.status ?? "") ||+ statusFetcher.state !== "idle" ||+ !permissions.can("delete", "inventory")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.stockTransferStatus(id)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "inventory") ||+ !permissions.is("employee") ||+ !["Released", "Draft"].includes(status) ||+ hasPickedItems ||+ isLocked+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Stock Transfer</Trans>+ </DropdownMenuItem>+ </>+ );- <Copy text={routeData?.stockTransfer?.stockTransferId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- ["Draft"].includes(- routeData?.stockTransfer?.status ?? ""- ) ||- statusFetcher.state !== "idle" ||- !permissions.can("delete", "inventory")- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.stockTransferStatus(id)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "inventory") ||- !permissions.is("employee") ||- !["Released", "Draft"].includes(status) ||- hasPickedItems ||- isLocked- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Stock Transfer</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <StockTransferStatus status={routeData?.stockTransfer?.status} />- </HStack>- <HStack>- <Assignee- size="md"- id={id}- value={assignee ?? ""}- table="stockTransfer"- isReadOnly={!permissions.can("update", "inventory")}- />- {hasTrackedLines && (- <PrintButton- sourceDocument="StockTransfer"- sourceDocumentId={id}- locationId={routeData?.stockTransfer?.locationId ?? undefined}- context="inventory"- fileRoutes={{- pdf: path.to.file.stockTransferLabelsPdf,- zpl: path.to.file.stockTransferLabelsZpl- }}+ return (+ <>+ <RecordHeader+ title={routeData?.stockTransfer?.stockTransferId}+ copyValue={routeData?.stockTransfer?.stockTransferId ?? ""}+ menu={menuItems}+ status={statusBadge}+ actions={+ <>+ <RecordAction slot="overflow">+ <Assignee+ size="md"+ id={id}+ value={assignee ?? ""}+ table="stockTransfer"+ isReadOnly={!permissions.can("update", "inventory")}/>+ </RecordAction>+ {hasTrackedLines && (+ <RecordAction slot="overflow">+ <PrintButton+ sourceDocument="StockTransfer"+ sourceDocumentId={id}+ locationId={routeData?.stockTransfer?.locationId ?? undefined}+ context="inventory"+ fileRoutes={{+ pdf: path.to.file.stockTransferLabelsPdf,+ zpl: path.to.file.stockTransferLabelsZpl+ }}+ />+ </RecordAction>)}- <Button variant="secondary" leftIcon={<LuBarcode />} asChild>- <a- target="_blank"- href={path.to.file.stockTransfer(id)}- rel="noreferrer"- >- <Trans>Pick List</Trans>- </a>- </Button>- <Button- type="button"- leftIcon={<LuCirclePlay />}- variant={status === "Draft" ? "primary" : "secondary"}- isDisabled={- status !== "Draft" ||- releaseFetcher.state !== "idle" ||- !permissions.can("update", "inventory")- }- isLoading={releaseFetcher.state !== "idle"}- onClick={() => {- const fd = new FormData();- fd.set("status", "Released");- releaseRules.submit(fd);- }}- >- <Trans>Release</Trans>- </Button>- <releaseRules.ViolationModal />-- <form- onSubmit={(e) => {- e.preventDefault();- const fd = new FormData();- fd.set("status", "Completed");- completeRules.submit(fd);- }}- >+ <RecordAction slot="secondary">+ <Button variant="secondary" leftIcon={<LuBarcode />} asChild>+ <a+ target="_blank"+ href={path.to.file.stockTransfer(id)}+ rel="noreferrer"+ >+ <Trans>Pick List</Trans>+ </a>+ </Button>+ </RecordAction>+ <RecordAction slot={status === "Draft" ? "primary" : "overflow"}><Button- type="submit"- variant={canComplete && !isCompleted ? "primary" : "secondary"}+ type="button"+ leftIcon={<LuCirclePlay />}+ variant={status === "Draft" ? "primary" : "secondary"}isDisabled={- !canComplete ||- isCompleted ||- !permissions.is("employee") ||- completeFetcher.state !== "idle"+ status !== "Draft" ||+ releaseFetcher.state !== "idle" ||+ !permissions.can("update", "inventory")}- leftIcon={<LuCircleCheck />}- isLoading={completeFetcher.state !== "idle"}+ isLoading={releaseFetcher.state !== "idle"}+ onClick={() => {+ const fd = new FormData();+ fd.set("status", "Released");+ releaseRules.submit(fd);+ }}>- <Trans>Complete</Trans>+ <Trans>Release</Trans></Button>- </form>+ </RecordAction>+ <releaseRules.ViolationModal />++ <RecordAction slot={status === "Draft" ? "overflow" : "primary"}>+ <form+ onSubmit={(e) => {+ e.preventDefault();+ const fd = new FormData();+ fd.set("status", "Completed");+ completeRules.submit(fd);+ }}+ >+ <Button+ type="submit"+ variant={+ canComplete && !isCompleted ? "primary" : "secondary"+ }+ isDisabled={+ !canComplete ||+ isCompleted ||+ !permissions.is("employee") ||+ completeFetcher.state !== "idle"+ }+ leftIcon={<LuCircleCheck />}+ isLoading={completeFetcher.state !== "idle"}+ >+ <Trans>Complete</Trans>+ </Button>+ </form>+ </RecordAction><completeRules.ViolationModal />- </HStack>- </HStack>- </div>+ </>+ }+ />{postModal.isOpen && (<StockTransferCompleteModal onClose={postModal.onClose} />diff --git a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferLines.tsx b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferLines.tsxindex 4fd0a3380f..43c4f8ceb5 100644--- a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferLines.tsx+++ b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferLines.tsx@@ -99,14 +99,14 @@ function StockTransferLineComponent({return (<divclassName={cn(- "flex flex-col border-b p-6 gap-6",+ "flex flex-col border-b p-6 gap-6 compact:p-4 compact:gap-4",index === totalLines - 1 && "border-none",isPicked && "opacity-50 hover:opacity-100")}>- <div className="flex justify-between items-center w-full">- <HStack spacing={4} className="w-1/2 justify-between">- <HStack spacing={4}>+ <div className="flex justify-between items-center w-full compact:flex-col compact:items-stretch compact:gap-4">+ <HStack spacing={4} className="w-1/2 justify-between compact:w-full">+ <HStack spacing={4} className="compact:min-w-0"><ItemThumbnailsize="md"thumbnailPath={line.thumbnailPath}@@ -144,21 +144,24 @@ function StockTransferLineComponent({)}/></HStack>- <div className="flex flex-grow items-center justify-between gap-4 pl-4 w-1/2">- <HStack spacing={4} className="text-left items-center">+ <div className="flex flex-grow items-center justify-between gap-4 pl-4 w-1/2 compact:w-full compact:flex-wrap compact:gap-3 compact:pl-0">+ <HStack+ spacing={4}+ className="text-left items-center compact:min-w-0"+ >{"fromStorageUnitId" in line && (- <span className="text-base font-medium whitespace-nowrap">+ <span className="text-base font-medium whitespace-nowrap compact:min-w-0 compact:truncate">{line.fromStorageUnitName ?? ""}</span>)}<LuArrowRight className="size-4" />{"toStorageUnitId" in line && (- <span className="text-base font-medium whitespace-nowrap">+ <span className="text-base font-medium whitespace-nowrap compact:min-w-0 compact:truncate">{line.toStorageUnitName ?? ""}</span>)}</HStack>- <HStack spacing={1}>+ <HStack spacing={1} className="compact:ml-auto">{line.trackedEntityId && (<PrintButtonsourceDocument="Entity"diff --git a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferWizard.tsx b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferWizard.tsxindex 94bcb3ceda..202c8dad3c 100644--- a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferWizard.tsx+++ b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferWizard.tsx@@ -282,7 +282,7 @@ function TransferGrid({ locationId }: { locationId: string }) {return (<>- <DrawerBody className="w-full p-0 min-h-0 overflow-y-hidden">+ <DrawerBody className="w-full p-0 compact:p-0 min-h-0 overflow-y-hidden"><ResizablePanelGroupdirection="horizontal"className="h-full w-full min-h-0"@@ -409,7 +409,8 @@ function DestinationTable({</span></VStack></HStack>- )+ ),+ meta: { mobile: "P1" }},{accessorKey: "storageUnitName",@@ -537,6 +538,7 @@ function DestinationTable({<div className="flex-1 min-h-0 overflow-hidden w-full px-4"><Table<BinRow>compact+ mobileLayout="table"data={data}columns={columns}title={t`Transfer To`}diff --git a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransfersTable.tsx b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransfersTable.tsxindex a0b2804ab7..a2dde48815 100644--- a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransfersTable.tsx+++ b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransfersTable.tsx@@ -28,6 +28,7 @@ import { DateTime, EmployeeAvatar, Hyperlink, Table } from "~/components";import { Enumerable } from "~/components/Enumerable";import { useLocations } from "~/components/Form/Location";import { ConfirmDelete } from "~/components/Modals";+import { NewAction } from "~/components/New";import { usePermissions, useUrlParams } from "~/hooks";import { useCustomColumns } from "~/hooks/useCustomColumns";import { clearStockTransferWizard, usePeople } from "~/stores";@@ -69,6 +70,7 @@ const StockTransfersTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -103,6 +105,7 @@ const StockTransfersTable = memo(return <StockTransferStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: stockTransferStatusType.map((type) => ({@@ -121,6 +124,7 @@ const StockTransfersTable = memo(<EmployeeAvatar employeeId={row.original.assignee} />),meta: {+ mobile: "P3",filter: {type: "static",options: people.map((employee) => ({@@ -274,15 +278,23 @@ const StockTransfersTable = memo(}}/>{permissions.can("create", "inventory") && (- <Button+ <NewAction+ label={t`Add Stock Transfer`}onClick={() => {clearStockTransferWizard();wizardDisclosure.onOpen();}}- leftIcon={<LuCirclePlus />}>- {t`Add Stock Transfer`}- </Button>+ <Button+ onClick={() => {+ clearStockTransferWizard();+ wizardDisclosure.onOpen();+ }}+ leftIcon={<LuCirclePlus />}+ >+ {t`Add Stock Transfer`}+ </Button>+ </NewAction>)}</div>}diff --git a/apps/erp/app/modules/inventory/ui/StorageRules/MessageWithTokens.tsx b/apps/erp/app/modules/inventory/ui/StorageRules/MessageWithTokens.tsxindex a6912249ab..905cbba3df 100644--- a/apps/erp/app/modules/inventory/ui/StorageRules/MessageWithTokens.tsx+++ b/apps/erp/app/modules/inventory/ui/StorageRules/MessageWithTokens.tsx@@ -337,7 +337,7 @@ export default function MessageWithTokens({// Identical typography between the overlay and the textarea — any drift// here desyncs the highlighted rectangles from the rendered glyphs.const sharedTypography =- "px-3 py-2 text-sm leading-[1.25rem] font-sans whitespace-pre-wrap break-words";+ "px-3 py-2 text-sm leading-[1.25rem] font-sans whitespace-pre-wrap break-words compact:text-base compact:leading-6";const inputProps = getInputProps<TextareaHTMLAttributes<HTMLTextAreaElement>>({diff --git a/apps/erp/app/modules/inventory/ui/StorageRules/StorageRulesGroups.tsx b/apps/erp/app/modules/inventory/ui/StorageRules/StorageRulesGroups.tsxindex 11d434862e..a2b48caa57 100644--- a/apps/erp/app/modules/inventory/ui/StorageRules/StorageRulesGroups.tsx+++ b/apps/erp/app/modules/inventory/ui/StorageRules/StorageRulesGroups.tsx@@ -30,6 +30,7 @@ import {VStack} from "@carbon/react";import type { TargetType, TransactionSurface } from "@carbon/utils";+import { useLingui } from "@lingui/react/macro";import { memo, useCallback, useMemo } from "react";import {LuBlocks,@@ -41,6 +42,7 @@ import {import { Link, useNavigate } from "react-router";import { Empty } from "~/components";import ConfirmDelete from "~/components/Modals/ConfirmDelete";+import { NewAction } from "~/components/New";import { usePermissions, useUrlParams } from "~/hooks";import { path } from "~/utils/path";import SurfaceChips from "./SurfaceChips";@@ -128,9 +130,11 @@ const RuleSectionCard = memo(</CardDescription></div>{canCreate && (- <Button variant="primary" leftIcon={<LuPlus />} asChild>- <Link to={newRuleHref}>{newRuleLabel}</Link>- </Button>+ <NewAction label={newRuleLabel} to={newRuleHref}>+ <Button variant="primary" leftIcon={<LuPlus />} asChild>+ <Link to={newRuleHref}>{newRuleLabel}</Link>+ </Button>+ </NewAction>)}</div></CardHeader>@@ -151,6 +155,7 @@ const RuleSectionCard = memo(RuleSectionCard.displayName = "RuleSectionCard";const StorageRulesGroups = memo(({ rules }: StorageRulesGroupsProps) => {+ const { t } = useLingui();const permissions = usePermissions();const canCreate = permissions.can("create", "inventory");@@ -165,10 +170,13 @@ const StorageRulesGroups = memo(({ rules }: StorageRulesGroupsProps) => {<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))] bg-card"><VStackspacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"+ className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4 compact:py-4"><div className="flex flex-col gap-1 w-full">- <Heading size="h3" className="tracking-tight text-balance">+ <Heading+ size="h3"+ className="tracking-tight text-balance compact:hidden"+ >Storage Rules</Heading><p className="max-w-[72ch] text-sm text-muted-foreground text-pretty">@@ -182,7 +190,7 @@ const StorageRulesGroups = memo(({ rules }: StorageRulesGroupsProps) => {description="Fire on receipts, shipments, transfers, inventory adjustments and bin moves (place/pick)."icon={<LuBlocks className="size-4 text-muted-foreground" />}newRuleHref={`${path.to.newStorageRule}?targetType=item`}- newRuleLabel="Storage Rule"+ newRuleLabel={t`Storage Rule`}canCreate={canCreate}rules={itemRules}/>@@ -214,10 +222,17 @@ const StorageRuleCard = memo(({ rule }: { rule: RuleListItem }) => {<Accordion type="multiple" className="w-full"><AccordionItem value={rule.id} className="border-none"><div className="relative">- <AccordionTrigger className="px-6 py-6 hover:no-underline w-full">- <HStack spacing={4} className="flex-1 justify-between pr-12">- <div className="flex items-center gap-3 min-w-0">- <Heading size="h4" as="h3" className="truncate">+ <AccordionTrigger className="px-6 py-6 hover:no-underline w-full compact:px-4 compact:py-3 compact:text-left">+ <HStack+ spacing={4}+ className="flex-1 justify-between pr-12 compact:flex-wrap compact:items-start compact:gap-y-2 compact:pr-0"+ >+ <div className="flex items-center gap-3 min-w-0 compact:flex-wrap compact:gap-y-1">+ <Heading+ size="h4"+ as="h3"+ className="truncate compact:basis-full compact:pr-12"+ >{rule.name}</Heading><Badge variant="secondary">@@ -240,7 +255,7 @@ const StorageRuleCard = memo(({ rule }: { rule: RuleListItem }) => {</Status></HStack></AccordionTrigger>- <div className="absolute right-12 top-1/2 -translate-y-1/2 z-10">+ <div className="absolute right-12 top-1/2 -translate-y-1/2 z-10 compact:top-3 compact:translate-y-0"><DropdownMenu><DropdownMenuTrigger asChild><IconButtondiff --git a/apps/erp/app/modules/inventory/ui/StorageRules/StorageRulesTable.tsx b/apps/erp/app/modules/inventory/ui/StorageRules/StorageRulesTable.tsxindex f920d93171..9e07634c0d 100644--- a/apps/erp/app/modules/inventory/ui/StorageRules/StorageRulesTable.tsx+++ b/apps/erp/app/modules/inventory/ui/StorageRules/StorageRulesTable.tsx@@ -69,7 +69,7 @@ const StorageRulesTable = memo(({ data, count }: StorageRulesTableProps) => {<Enumerable value={row.original.name} /></Hyperlink>),- meta: { icon: <LuShieldCheck /> }+ meta: { mobile: "P1", icon: <LuShieldCheck /> }},{accessorKey: "targetType",@@ -78,7 +78,8 @@ const StorageRulesTable = memo(({ data, count }: StorageRulesTableProps) => {<Badge variant="secondary">{TARGET_TYPE_LABELS[row.original.targetType]}</Badge>- )+ ),+ meta: { mobile: "P3" }},{accessorKey: "severity",@@ -116,7 +117,8 @@ const StorageRulesTable = memo(({ data, count }: StorageRulesTableProps) => {<Status color="gray"><Trans>Inactive</Trans></Status>- )+ ),+ meta: { mobile: "P2" }},{accessorKey: "assignmentCount",diff --git a/apps/erp/app/modules/inventory/ui/StorageTypes/StorageTypesTable.tsx b/apps/erp/app/modules/inventory/ui/StorageTypes/StorageTypesTable.tsxindex fabcfcec92..5b534bab65 100644--- a/apps/erp/app/modules/inventory/ui/StorageTypes/StorageTypesTable.tsx+++ b/apps/erp/app/modules/inventory/ui/StorageTypes/StorageTypesTable.tsx@@ -48,7 +48,7 @@ const StorageTypesTable = memo(({ data, count }: StorageTypesTableProps) => {<Enumerable value={row.original.name} /></Hyperlink>),- meta: { icon: <LuTag /> }+ meta: { mobile: "P1", icon: <LuTag /> }}];return [...defaultColumns, ...customColumns];diff --git a/apps/erp/app/modules/inventory/ui/StorageUnits/StorageUnitParentSelect.tsx b/apps/erp/app/modules/inventory/ui/StorageUnits/StorageUnitParentSelect.tsxindex 4a109f8a9f..f5afbfe5ee 100644--- a/apps/erp/app/modules/inventory/ui/StorageUnits/StorageUnitParentSelect.tsx+++ b/apps/erp/app/modules/inventory/ui/StorageUnits/StorageUnitParentSelect.tsx@@ -183,6 +183,7 @@ function DrillSelect({disabled={isReadOnly}className={cn("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 text-sm text-left shadow-xs transition-[color,box-shadow]",+ "compact:h-11 compact:text-base","outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",isReadOnly && "opacity-60 cursor-not-allowed",!triggerLabel && "text-muted-foreground"@@ -201,7 +202,7 @@ function DrillSelect({e.stopPropagation();onChange("");}}- className="flex h-4 w-4 items-center justify-center rounded opacity-60 hover:bg-muted hover:opacity-100"+ className="flex h-4 w-4 items-center justify-center rounded opacity-60 hover:bg-muted hover:opacity-100 compact:hit-area"><LuX className="h-3 w-3" /></span>diff --git a/apps/erp/app/modules/inventory/ui/StorageUnits/StorageUnitsTable.tsx b/apps/erp/app/modules/inventory/ui/StorageUnits/StorageUnitsTable.tsxindex 21b1f5c86e..43eb440914 100644--- a/apps/erp/app/modules/inventory/ui/StorageUnits/StorageUnitsTable.tsx+++ b/apps/erp/app/modules/inventory/ui/StorageUnits/StorageUnitsTable.tsx@@ -7,6 +7,7 @@ import {Button,Checkbox,Combobox,+ EnumerableAsText,HStack,MENU_ITEM_SHORTCUTS,MenuIcon,@@ -19,6 +20,7 @@ import {ModalTitle,Spinner,toast,+ useCompact,useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";@@ -78,6 +80,7 @@ const StorageUnitsTable = memo(}: StorageUnitsTableProps) => {const [params] = useUrlParams();const { t } = useLingui();+ const isCompact = useCompact();const navigate = useNavigate();const permissions = usePermissions();@@ -262,6 +265,16 @@ const StorageUnitsTable = memo(}, [displayRows]);const columns = useMemo<ColumnDef<StorageUnit>[]>(() => {+ const renderStorageTypes = (ids: string[]) => (+ <HStack spacing={1}>+ {ids.map((id) => {+ const label =+ storageTypes?.find((st) => st.value === id)?.label ?? id;+ return <Enumerable key={id} value={label} />;+ })}+ </HStack>+ );+return [{// The id "Select" opts into the Table's compact checkbox-column@@ -296,7 +309,7 @@ const StorageUnitsTable = memo({accessorKey: "name",header: t`Name`,- cell: ({ row }) => {+ cell: ({ row, table }) => {const depth = Math.max(0, (row.original.depth ?? 1) - 1);const isExpanded = expandedIds.has(row.original.id);const isLoading = loadingIds.has(row.original.id);@@ -308,10 +321,10 @@ const StorageUnitsTable = memo(<divkey={i}aria-hidden- className="w-5 shrink-0 border-l border-border -my-2"+ className="w-5 shrink-0 border-l border-border -my-2 compact:border-l-0"/>))}- <div className="w-5 shrink-0 flex items-center justify-center self-center">+ <div className="w-5 shrink-0 flex items-center justify-center self-center compact:self-start compact:h-[1lh]">{hasChildren ? (isLoading ? (<Spinner className="size-3" />@@ -321,7 +334,7 @@ const StorageUnitsTable = memo(aria-label={isExpanded ? t`Collapse subtree` : t`Expand subtree`}- className="text-muted-foreground hover:text-foreground shrink-0"+ className="text-muted-foreground hover:text-foreground shrink-0 compact:hit-area"onClick={(e) => {e.stopPropagation();e.preventDefault();@@ -337,7 +350,7 @@ const StorageUnitsTable = memo()) : null}</div>- <div className="flex items-center py-1">+ <div className="flex items-center py-1 compact:flex-col compact:items-start compact:gap-1 compact:py-0"><Hyperlinkto={`${path.to.storageUnit(row.original.id)}?${params}`}>@@ -349,11 +362,23 @@ const StorageUnitsTable = memo({row.original.name}</span></Hyperlink>+ {/* Phones: the context line sits under the name, so it+ shares the tree indent instead of starting at the gutter. */}+ {isCompact &&+ table.getColumn("storageTypeIds")?.getIsVisible() &&+ row.original.storageTypeIds?.length ? (+ <div className="text-[13px] font-normal text-muted-foreground">+ <EnumerableAsText value>+ {renderStorageTypes(row.original.storageTypeIds)}+ </EnumerableAsText>+ </div>+ ) : null}</div></div>);},meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -377,17 +402,10 @@ const StorageUnitsTable = memo(header: t`Storage Types`,cell: ({ row }) => {if (!row.original.storageTypeIds?.length) return null;- return (- <HStack spacing={1}>- {row.original.storageTypeIds.map((id) => {- const label =- storageTypes?.find((st) => st.value === id)?.label ?? id;- return <Enumerable key={id} value={label} />;- })}- </HStack>- );+ return renderStorageTypes(row.original.storageTypeIds);},meta: {+ // No compact slot: the name cell renders it under the name (tree indent).filter: {type: "static",options: storageTypes?.map((st) => ({@@ -419,6 +437,7 @@ const StorageUnitsTable = memo(}];}, [+ isCompact,locations,params,storageTypes,diff --git a/apps/erp/app/modules/inventory/ui/Traceability/GraphToolbar.tsx b/apps/erp/app/modules/inventory/ui/Traceability/GraphToolbar.tsxindex bc9e46e080..f455fd8c2a 100644--- a/apps/erp/app/modules/inventory/ui/Traceability/GraphToolbar.tsx+++ b/apps/erp/app/modules/inventory/ui/Traceability/GraphToolbar.tsx@@ -12,6 +12,7 @@ import {PopoverContent,PopoverTrigger,Subheading,+ useCompact,VStack} from "@carbon/react";import { useReactFlow } from "@xyflow/react";@@ -27,6 +28,7 @@ import {LuSearch,LuTable} from "react-icons/lu";+import { COMPACT_FIT_PADDING } from "./constants";import type { LayoutDirection } from "./worker/core";export type ViewMode = "graph" | "table";@@ -94,7 +96,14 @@ function ViewModeChip({onViewChange: (next: ViewMode) => void;}) {return (- <HStack spacing={0} className={cn("absolute top-3 left-3 z-30 p-1", PANEL)}>+ <HStack+ spacing={0}+ className={cn(+ "absolute top-3 left-3 z-30 p-1",+ PANEL,+ "compact:[&_button]:relative compact:[&_button]:after:absolute compact:[&_button]:after:inset-x-0 compact:[&_button]:after:-inset-y-2.5"+ )}+ ><SegmentButtonactive={view === "graph"}onClick={() => onViewChange("graph")}@@ -143,11 +152,19 @@ function GraphControlsChip({showGraphOnly: boolean;}) {const { fitView } = useReactFlow();+ const isCompact = useCompact();return (<HStackspacing={1}- className={cn("absolute top-3 right-3 z-30 px-1.5 py-1", PANEL)}+ className={cn(+ "absolute top-3 right-3 z-30 px-1.5 py-1",+ PANEL,+ // Phones: drops under the view chip and scrolls sideways.+ // A hit area overflowing the buttons would make it scroll vertically+ // too, so the buttons themselves are 44pt tall.+ "compact:top-14 compact:left-3 compact:right-auto compact:max-w-[calc(100%-24px)] compact:overflow-x-auto compact:overflow-y-hidden compact:scroll-fade-x compact:[&>*]:shrink-0 compact:[&_button]:h-11"+ )}>{onOpenSearch && (<>@@ -164,7 +181,7 @@ function GraphControlsChip({aria-label="Search nodes"><LuSearch className="w-3.5 h-3.5" />- <kbd className="text-[10px] text-muted-foreground bg-muted/50 px-1 rounded">+ <kbd className="text-[10px] text-muted-foreground bg-muted/50 px-1 rounded compact:hidden">/</kbd></button>@@ -319,7 +336,12 @@ function GraphControlsChip({<HoverCard openDelay={150} closeDelay={50}><HoverCardTrigger asChild><button- onClick={() => fitView({ duration: 300, padding: 0.2 })}+ onClick={() =>+ fitView({+ duration: 300,+ padding: isCompact ? COMPACT_FIT_PADDING : 0.2+ })+ }className={cn("h-7 w-7 rounded-md flex items-center justify-center transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",diff --git a/apps/erp/app/modules/inventory/ui/Traceability/TraceabilityGraph.tsx b/apps/erp/app/modules/inventory/ui/Traceability/TraceabilityGraph.tsxindex 6033c28e52..15fc45a89b 100644--- a/apps/erp/app/modules/inventory/ui/Traceability/TraceabilityGraph.tsx+++ b/apps/erp/app/modules/inventory/ui/Traceability/TraceabilityGraph.tsx@@ -2,7 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { cn } from "@carbon/react";+import { cn, useCompact } from "@carbon/react";import {Background,BackgroundVariant,@@ -28,7 +28,7 @@ import type {ActivityOutput,TrackedEntity} from "~/modules/inventory";-import { clampDepth } from "./constants";+import { COMPACT_FIT_PADDING, clampDepth } from "./constants";import { QuantityEdge } from "./edges/QuantityEdge";import { GraphLegend } from "./GraphLegend";import { GraphToolbar } from "./GraphToolbar";@@ -105,6 +105,7 @@ function TraceabilityGraphInner({const [searchParams] = useSearchParams();const navigate = useNavigate();const { fitView } = useReactFlow();+ const isCompact = useCompact();const nodesInitialized = useNodesInitialized();const lastFitSignatureRef = useRef<string>("");@@ -541,7 +542,7 @@ function TraceabilityGraphInner({lastFitSignatureRef.current = sig;const raf = requestAnimationFrame(() => {fitView({- padding: 0.2,+ padding: isCompact ? COMPACT_FIT_PADDING : 0.2,duration: isFirstFit ? 0 : 250,maxZoom: 1});@@ -557,7 +558,8 @@ function TraceabilityGraphInner({view,width,height,- fitView+ fitView,+ isCompact]);const handleDepthChange = useCallback(@@ -661,7 +663,7 @@ function TraceabilityGraphInner({<MiniMappannablezoomable- className="!bg-card !border-border"+ className="!bg-card !border-border compact:!hidden"nodeColor={(n) => {const data = (n as any).data;if (data?.kind === "entity") {@@ -744,7 +746,7 @@ function TraceabilityGraphInner({</button></>) : (- <span className="px-1 flex items-center gap-1.5 text-muted-foreground">+ <span className="px-1 flex items-center gap-1.5 text-muted-foreground compact:hidden"><kbd className="rounded border border-border bg-muted px-1 py-px font-mono text-[10px] leading-none text-foreground">Shift</kbd>diff --git a/apps/erp/app/modules/inventory/ui/Traceability/TraceabilitySidebar.tsx b/apps/erp/app/modules/inventory/ui/Traceability/TraceabilitySidebar.tsxindex 4506d01ae2..aa8a74db8e 100644--- a/apps/erp/app/modules/inventory/ui/Traceability/TraceabilitySidebar.tsx+++ b/apps/erp/app/modules/inventory/ui/Traceability/TraceabilitySidebar.tsx@@ -300,7 +300,7 @@ export function TraceabilitySidebar({const hasMultiSelect = selectedIds && selectedIds.length > 1;return (- <aside className="w-[426px] flex-shrink-0 bg-card h-full overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent border-l border-border text-sm">+ <aside className="w-[426px] flex-shrink-0 bg-card h-full overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent border-l border-border text-sm compact:w-full compact:h-[45%] compact:border-l-0 compact:border-t">{hasMultiSelect && (<div className="flex items-center justify-between gap-2 bg-muted/40 mx-3 mt-3 rounded-md px-2 py-1"><div className="flex items-center gap-2 min-w-0">diff --git a/apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx b/apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsxindex 1aabca86ff..748f87db52 100644--- a/apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx+++ b/apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx@@ -88,6 +88,7 @@ const TrackedEntitiesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />,filter: {@@ -110,6 +111,7 @@ const TrackedEntitiesTable = memo(</Badge>) : null,meta: {+ mobile: "P3",icon: <LuHash />}},@@ -120,6 +122,7 @@ const TrackedEntitiesTable = memo(<span>{numberFormatter.format(row.original.quantity)}</span>),meta: {+ mobile: "P2",icon: <LuHash />,renderTotal: true}@@ -131,6 +134,7 @@ const TrackedEntitiesTable = memo(<TrackedEntityStatus status={row.original.status} />),meta: {+ mobile: "P2",icon: <LuCheck />,filter: {type: "static",diff --git a/apps/erp/app/modules/inventory/ui/Traceability/constants.ts b/apps/erp/app/modules/inventory/ui/Traceability/constants.tsindex fb12709b28..8e63a9fb89 100644--- a/apps/erp/app/modules/inventory/ui/Traceability/constants.ts+++ b/apps/erp/app/modules/inventory/ui/Traceability/constants.ts@@ -12,6 +12,14 @@ export const SPACING = { min: 1, max: 5, default: 2 } as const;export const NODE_SIZE = 44;export const NODE_RADIUS = NODE_SIZE / 2;+/** Phones: fit inside the view chip and toolbar above and the legend below. */+export const COMPACT_FIT_PADDING = {+ top: "120px",+ bottom: "56px",+ left: "24px",+ right: "24px"+} as const;+export function clampDepth(n: number): number {return Math.min(Math.max(DEPTH.min, n), DEPTH.max);}diff --git a/apps/erp/app/modules/inventory/ui/Valuation/InventoryValuationWorkbench.tsx b/apps/erp/app/modules/inventory/ui/Valuation/InventoryValuationWorkbench.tsxindex f6e478ac88..e452afac17 100644--- a/apps/erp/app/modules/inventory/ui/Valuation/InventoryValuationWorkbench.tsx+++ b/apps/erp/app/modules/inventory/ui/Valuation/InventoryValuationWorkbench.tsx@@ -243,7 +243,7 @@ export function InventoryValuationWorkbench({<buttontype="button"aria-label={isExpanded ? t`Collapse` : t`Expand`}- className="text-muted-foreground hover:text-foreground"+ className="text-muted-foreground hover:text-foreground compact:hit-area"onClick={(e) => {e.stopPropagation();toggleExpand(r.id);@@ -277,7 +277,9 @@ export function InventoryValuationWorkbench({</Hyperlink></HStack>) : (- <span className="font-semibold">{r.label}</span>+ <span className="font-semibold compact:min-w-0 compact:truncate">+ {r.label}+ </span>)}</div>);@@ -314,6 +316,7 @@ export function InventoryValuationWorkbench({);},meta: {+ mobile: "P1",exportValue: (row: ValuationRow) =>row.kind === "group" ? row.label : detailLabel(row)}@@ -664,6 +667,7 @@ export function InventoryValuationWorkbench({<div className="flex-1 w-full"><Table<ValuationRow>data={displayRows}+ mobileLayout="table"columns={columns}count={displayRows.length}title={t`Inventory Valuation`}diff --git a/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransferForm.tsx b/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransferForm.tsxindex 9b262073d4..44aafdc0a2 100644--- a/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransferForm.tsx+++ b/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransferForm.tsx@@ -49,6 +49,10 @@ import {Submit,TextArea} from "~/components/Form";+import {+ RecordAction,+ RecordHeroTarget+} from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useUser } from "~/hooks";import type { action as statusAction } from "~/routes/x+/warehouse-transfer+/$transferId.status";@@ -101,6 +105,50 @@ const WarehouseTransferForm = ({const { receipts, shipments, ship, receive, hasShippedItems } =useWarehouseTransferRelatedDocuments(warehouseTransfer?.id);+ const statusBadge = warehouseTransfer ? (+ <WarehouseTransferStatus status={warehouseTransfer.status} />+ ) : null;++ const menuItems = warehouseTransfer ? (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={+ ["Draft"].includes(warehouseTransfer.status ?? "") ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "inventory")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.warehouseTransferStatus(warehouseTransfer.id)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ isLocked ||+ !permissions.can("delete", "inventory") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Warehouse Transfer</Trans>+ </DropdownMenuItem>+ </>+ ) : null;+return (<><ValidatedForm@@ -112,229 +160,218 @@ const WarehouseTransferForm = ({><Card className="w-full">{isEditing && warehouseTransfer ? (- <DocumentHeader- title={warehouseTransfer.transferId ?? ""}- status={- <WarehouseTransferStatus status={warehouseTransfer.status} />- }- menuItems={- <>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- ["Draft"].includes(warehouseTransfer.status ?? "") ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "inventory")- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.warehouseTransferStatus(- warehouseTransfer.id- )+ <>+ <RecordHeroTarget />+ <DocumentHeader+ title={warehouseTransfer.transferId ?? ""}+ status={statusBadge}+ menuItems={menuItems}+ actions={+ <>+ <RecordAction+ slot={+ warehouseTransfer.status === "Draft"+ ? "primary"+ : "overflow"+ }+ >+ <Button+ type="button"+ leftIcon={<LuCheckCheck />}+ variant={+ warehouseTransfer.status === "Draft"+ ? "primary"+ : "secondary"+ }+ isDisabled={+ !["Draft"].includes(warehouseTransfer.status) ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "inventory")}- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- isLocked ||- !permissions.can("delete", "inventory") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Warehouse Transfer</Trans>- </DropdownMenuItem>- </>- }- actions={- <>- <Button- type="button"- leftIcon={<LuCheckCheck />}- variant={- warehouseTransfer.status === "Draft"- ? "primary"- : "secondary"- }- isDisabled={- !["Draft"].includes(warehouseTransfer.status) ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "inventory")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") ===- "To Ship and Receive"- }- onClick={() => {- const fd = new FormData();- fd.set("status", "To Ship and Receive");- statusRules.submit(fd);- }}- >- <Trans>Confirm</Trans>- </Button>+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") ===+ "To Ship and Receive"+ }+ onClick={() => {+ const fd = new FormData();+ fd.set("status", "To Ship and Receive");+ statusRules.submit(fd);+ }}+ >+ <Trans>Confirm</Trans>+ </Button>+ </RecordAction>- <Button- type="button"- variant="secondary"- leftIcon={<LuCircleStop />}- isDisabled={- ["Cancelled", "Completed"].includes(- warehouseTransfer.status- ) ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "inventory")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Cancelled"- }- onClick={() => {- const fd = new FormData();- fd.set("status", "Cancelled");- statusRules.submit(fd);- }}- >- <Trans>Cancel</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button+ type="button"+ variant="secondary"+ leftIcon={<LuCircleStop />}+ isDisabled={+ ["Cancelled", "Completed"].includes(+ warehouseTransfer.status+ ) ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "inventory")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Cancelled"+ }+ onClick={() => {+ const fd = new FormData();+ fd.set("status", "Cancelled");+ statusRules.submit(fd);+ }}+ >+ <Trans>Cancel</Trans>+ </Button>+ </RecordAction>- {shipments.length > 0 ? (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuTruck />}- variant="secondary"- rightIcon={<LuChevronDown />}- >- <Trans>Shipments</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- !["To Ship", "To Ship and Receive"].includes(- warehouseTransfer.status ?? ""- )- }- onClick={() => ship(warehouseTransfer)}- >- <DropdownMenuIcon icon={<LuCirclePlus />} />- <Trans>New Shipment</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- {shipments.map((shipment) => (- <DropdownMenuItem key={shipment.id} asChild>- <Link to={path.to.shipment(shipment.id)}>- <DropdownMenuIcon icon={<LuTruck />} />- <HStack spacing={8}>- <span>{shipment.shipmentId}</span>- <ShipmentStatus status={shipment.status} />- </HStack>- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>- ) : (- <Button- leftIcon={<LuTruck />}- isDisabled={- !["To Ship", "To Ship and Receive"].includes(- warehouseTransfer.status ?? ""- )- }- variant={+ <RecordAction+ slot={["To Ship", "To Ship and Receive"].includes(warehouseTransfer.status ?? "")? "primary"- : "secondary"+ : "overflow"}- onClick={() => ship(warehouseTransfer)}>- <Trans>Ship</Trans>- </Button>- )}-- {receipts.length > 0 ? (- <DropdownMenu>- <DropdownMenuTrigger asChild>+ {shipments.length > 0 ? (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuTruck />}+ variant="secondary"+ rightIcon={<LuChevronDown />}+ >+ <Trans>Shipments</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuItem+ disabled={+ !["To Ship", "To Ship and Receive"].includes(+ warehouseTransfer.status ?? ""+ )+ }+ onClick={() => ship(warehouseTransfer)}+ >+ <DropdownMenuIcon icon={<LuCirclePlus />} />+ <Trans>New Shipment</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ {shipments.map((shipment) => (+ <DropdownMenuItem key={shipment.id} asChild>+ <Link to={path.to.shipment(shipment.id)}>+ <DropdownMenuIcon icon={<LuTruck />} />+ <HStack spacing={8}>+ <span>{shipment.shipmentId}</span>+ <ShipmentStatus status={shipment.status} />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ ) : (<Button- leftIcon={<LuHandCoins />}+ leftIcon={<LuTruck />}+ isDisabled={+ !["To Ship", "To Ship and Receive"].includes(+ warehouseTransfer.status ?? ""+ )+ }variant={- ["To Receive", "To Ship and Receive"].includes(+ ["To Ship", "To Ship and Receive"].includes(warehouseTransfer.status ?? "")? "primary": "secondary"}- rightIcon={<LuChevronDown />}+ onClick={() => ship(warehouseTransfer)}>- <Trans>Receipts</Trans>+ <Trans>Ship</Trans></Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={+ )}+ </RecordAction>++ <RecordAction+ slot={+ warehouseTransfer.status === "To Receive"+ ? "primary"+ : "overflow"+ }+ >+ {receipts.length > 0 ? (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuHandCoins />}+ variant={+ ["To Receive", "To Ship and Receive"].includes(+ warehouseTransfer.status ?? ""+ )+ ? "primary"+ : "secondary"+ }+ rightIcon={<LuChevronDown />}+ >+ <Trans>Receipts</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuItem+ disabled={+ !["To Receive", "To Ship and Receive"].includes(+ warehouseTransfer.status ?? ""+ ) || !hasShippedItems+ }+ onClick={() => receive(warehouseTransfer)}+ >+ <DropdownMenuIcon icon={<LuCirclePlus />} />+ <Trans>New Receipt</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ {receipts.map((receipt) => (+ <DropdownMenuItem key={receipt.id} asChild>+ <Link to={path.to.receipt(receipt.id)}>+ <DropdownMenuIcon icon={<LuHandCoins />} />+ <HStack spacing={8}>+ <span>{receipt.receiptId}</span>+ <ReceiptStatus status={receipt.status} />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ ) : (+ <Button+ leftIcon={<LuHandCoins />}+ isDisabled={!["To Receive", "To Ship and Receive"].includes(warehouseTransfer.status ?? "") || !hasShippedItems}+ variant={+ ["To Receive", "To Ship and Receive"].includes(+ warehouseTransfer.status ?? ""+ ) && hasShippedItems+ ? "primary"+ : "secondary"+ }onClick={() => receive(warehouseTransfer)}>- <DropdownMenuIcon icon={<LuCirclePlus />} />- <Trans>New Receipt</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- {receipts.map((receipt) => (- <DropdownMenuItem key={receipt.id} asChild>- <Link to={path.to.receipt(receipt.id)}>- <DropdownMenuIcon icon={<LuHandCoins />} />- <HStack spacing={8}>- <span>{receipt.receiptId}</span>- <ReceiptStatus status={receipt.status} />- </HStack>- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>- ) : (- <Button- leftIcon={<LuHandCoins />}- isDisabled={- !["To Receive", "To Ship and Receive"].includes(- warehouseTransfer.status ?? ""- ) || !hasShippedItems- }- variant={- ["To Receive", "To Ship and Receive"].includes(- warehouseTransfer.status ?? ""- ) && hasShippedItems- ? "primary"- : "secondary"- }- onClick={() => receive(warehouseTransfer)}- >- <Trans>Receive</Trans>- </Button>- )}- </>- }- />+ <Trans>Receive</Trans>+ </Button>+ )}+ </RecordAction>+ </>+ }+ />+ </>) : (<CardHeader><Heading as="h1" size="h3" className="font-sans">diff --git a/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransferLines.tsx b/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransferLines.tsxindex 636435d817..610aa3bf77 100644--- a/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransferLines.tsx+++ b/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransferLines.tsx@@ -144,11 +144,14 @@ function WarehouseTransferLineListItem({const date = line.updatedAt ?? line.createdAt;return (- <div className={cn("border-b p-6", className)}>- <div className="flex flex-1 justify-between items-center w-full">- <HStack spacing={4} className="w-1/2">- <HStack spacing={4} className="flex-1">- <div className="flex items-center space-x-3">+ <div className={cn("border-b p-6 compact:p-4", className)}>+ <div className="flex flex-1 justify-between items-center w-full compact:flex-col compact:items-stretch compact:gap-3">+ <HStack spacing={4} className="w-1/2 compact:w-full">+ <HStack+ spacing={4}+ className="flex-1 compact:min-w-0 compact:flex-col compact:items-start compact:gap-3 compact:space-x-0"+ >+ <div className="flex items-center space-x-3 compact:min-w-0"><ItemThumbnailsize="sm"thumbnailPath={line.item?.thumbnailPath}@@ -163,7 +166,7 @@ function WarehouseTransferLineListItem({</span></VStack></div>- <div className="flex items-center gap-2">+ <div className="flex items-center gap-2 compact:flex-wrap"><Badge variant="secondary">{Number(line.quantity).toLocaleString()}</Badge>@@ -177,7 +180,7 @@ function WarehouseTransferLineListItem({</div></HStack></HStack>- <div className="flex items-center justify-end gap-2">+ <div className="flex items-center justify-end gap-2 compact:justify-between"><HStack spacing={2}><span className="text-xs text-muted-foreground">{isUpdated ? t`Updated` : t`Created`}{" "}diff --git a/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransfersTable.tsx b/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransfersTable.tsxindex 7f7365acbe..4ffe762559 100644--- a/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransfersTable.tsx+++ b/apps/erp/app/modules/inventory/ui/WarehouseTransfers/WarehouseTransfersTable.tsx@@ -65,6 +65,7 @@ const WarehouseTransfersTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -77,6 +78,7 @@ const WarehouseTransfersTable = memo(return <WarehouseTransferStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: warehouseTransferStatusType.map((type) => ({@@ -93,6 +95,7 @@ const WarehouseTransfersTable = memo(header: t`From Location`,cell: ({ row }) => row.original.fromLocation?.name || "N/A",meta: {+ mobile: "P3",icon: <LuMapPin />}},@@ -120,6 +123,7 @@ const WarehouseTransfersTable = memo(return date ? <DateTime value={date} variant="date" /> : "N/A";},meta: {+ mobile: "P2",icon: <LuCalendar />}},diff --git a/apps/erp/app/modules/inventory/ui/index.ts b/apps/erp/app/modules/inventory/ui/index.tsindex f983de3006..233d687a58 100644--- a/apps/erp/app/modules/inventory/ui/index.ts+++ b/apps/erp/app/modules/inventory/ui/index.ts@@ -2,7 +2,9 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import useInventorySubmodules from "./useInventorySubmodules";+import useInventorySubmodules, {+ InventorySections+} from "./useInventorySubmodules";export * from "./Inventory";export * from "./InventoryCount";@@ -14,4 +16,4 @@ export * from "./StorageTypes";export * from "./StorageUnits";export * from "./Valuation";export * from "./WarehouseTransfers";-export { useInventorySubmodules };+export { InventorySections, useInventorySubmodules };diff --git a/apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx b/apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsxindex 5dbe664563..600571aca3 100644--- a/apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx+++ b/apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx@@ -19,6 +19,7 @@ import {LuTruck,LuWarehouse} from "react-icons/lu";+import { GroupedContentSidebar } from "~/components/Layout";import { usePermissions } from "~/hooks";import { useSavedViews } from "~/hooks/useSavedViews";import type { AuthenticatedRouteGroup } from "~/types";@@ -167,3 +168,10 @@ export default function useInventorySubmodules() {}))};}++/** Phones: the module's section switcher, for routes outside the module's+ * own layout (`handle.compactSidebar`). */+export function InventorySections() {+ const { groups } = useInventorySubmodules();+ return <GroupedContentSidebar groups={groups} />;+}diff --git a/apps/erp/app/modules/invoicing/ui/Charge/ChargesTable.tsx b/apps/erp/app/modules/invoicing/ui/Charge/ChargesTable.tsxindex 4e2d131ee6..504c048e06 100644--- a/apps/erp/app/modules/invoicing/ui/Charge/ChargesTable.tsx+++ b/apps/erp/app/modules/invoicing/ui/Charge/ChargesTable.tsx@@ -50,13 +50,14 @@ const ChargesTable = memo(({ data, count }: ChargesTableProps) => {{row.original.chargeId}</Hyperlink>),- meta: { icon: <LuHash /> }+ meta: { icon: <LuHash />, mobile: "P1" }},{accessorKey: "type",header: t`Type`,cell: ({ row }) => <Enumerable value={row.original.type} />,meta: {+ mobile: "P2",icon: <LuCircleDot />,filter: {type: "static",@@ -73,6 +74,7 @@ const ChargesTable = memo(({ data, count }: ChargesTableProps) => {header: t`Status`,cell: ({ row }) => <ChargeStatus status={row.original.status} />,meta: {+ mobile: "P2",icon: <LuCircleDot />,filter: {type: "static",@@ -94,7 +96,7 @@ const ChargesTable = memo(({ data, count }: ChargesTableProps) => {accessorKey: "merchantName",header: t`Merchant`,cell: ({ row }) => row.original.merchantName ?? null,- meta: { icon: <LuStore /> }+ meta: { icon: <LuStore />, mobile: "P3" }},{accessorKey: "cardHolderName",@@ -119,6 +121,7 @@ const ChargesTable = memo(({ data, count }: ChargesTableProps) => {);},meta: {+ mobile: "P2",icon: <LuCoins />}},diff --git a/apps/erp/app/modules/invoicing/ui/Dashboard/InvoicingDashboard.tsx b/apps/erp/app/modules/invoicing/ui/Dashboard/InvoicingDashboard.tsxindex 4f6b7d0bcf..e4598c8e9e 100644--- a/apps/erp/app/modules/invoicing/ui/Dashboard/InvoicingDashboard.tsx+++ b/apps/erp/app/modules/invoicing/ui/Dashboard/InvoicingDashboard.tsx@@ -105,7 +105,7 @@ const AgingCard = ({<span className="text-muted-foreground">{icon}</span><CardTitle>{title}</CardTitle></CardHeader>- <CardContent>+ <CardContent className="compact:px-0 compact:py-2 compact:[&_td]:px-4 compact:[&_th]:px-4"><Table><Thead><Tr>@@ -211,7 +211,7 @@ const InvoicingDashboard = ({return (<div className="flex flex-col gap-4 w-full p-4 h-[calc(100dvh-var(--header-height))] overflow-y-auto scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-muted-foreground">{/* KPI Cards */}- <div className="grid w-full gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4">+ <div className="grid w-full gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 compact:grid-cols-2 compact:gap-3 compact:[&>:last-child:nth-child(odd)]:col-span-2"><MetricCardicon={<LuHandCoins />}title={<Trans>AR Outstanding</Trans>}diff --git a/apps/erp/app/modules/invoicing/ui/Memo/MemoForm.tsx b/apps/erp/app/modules/invoicing/ui/Memo/MemoForm.tsxindex 7053db7983..1f152e7b4a 100644--- a/apps/erp/app/modules/invoicing/ui/Memo/MemoForm.tsx+++ b/apps/erp/app/modules/invoicing/ui/Memo/MemoForm.tsx@@ -38,6 +38,10 @@ import {Supplier,TextArea} from "~/components/Form";+import {+ RecordAction,+ RecordHeroTarget+} from "~/components/Layout/RecordHeader";import { ConfirmDelete } from "~/components/Modals";import { useCurrencyDecimals, usePermissions, useUser } from "~/hooks";import {@@ -102,6 +106,24 @@ const MemoForm = ({ initialValues, type }: MemoFormProps) => {value: d}));+ const statusNode = (+ <>+ <Enumerable value={typeLabel} />+ <MemoStatus status={status} />+ </>+ );+ const menuItems =+ status === "Draft" && canDelete ? (+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete</Trans>+ </DropdownMenuItem>+ ) : undefined;+return (<><ValidatedForm@@ -111,54 +133,43 @@ const MemoForm = ({ initialValues, type }: MemoFormProps) => {isDisabled={isEditing && isLocked}className="w-full">- <Card>+ {isEditing && <RecordHeroTarget bleed />}+ <Card className={isEditing ? "compact:mt-4" : undefined}>{isEditing ? (<DocumentHeadertitle={initialValues.memoId ?? ""}- status={- <>- <Enumerable value={typeLabel} />- <MemoStatus status={status} />- </>- }- menuItems={- status === "Draft" && canDelete ? (- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete</Trans>- </DropdownMenuItem>- ) : undefined- }+ status={statusNode}+ menuItems={menuItems}actions={status === "Draft" ? (- <Button- leftIcon={<LuCheckCheck />}- variant="primary"- isLoading={post.state !== "idle"}- isDisabled={!canMutate}- onClick={() =>- post.submit(null, {- method: "post",- action: path.to.memoPost(initialValues.id!)- })- }- >- <Trans>Post</Trans>- </Button>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuCheckCheck />}+ variant="primary"+ isLoading={post.state !== "idle"}+ isDisabled={!canMutate}+ onClick={() =>+ post.submit(null, {+ method: "post",+ action: path.to.memoPost(initialValues.id!)+ })+ }+ >+ <Trans>Post</Trans>+ </Button>+ </RecordAction>) : status === "Posted" ? (- <Button- leftIcon={<LuTicketX />}- variant="destructive"- type="button"- isDisabled={!canMutate}- onClick={voidModal.onOpen}- >- <Trans>Void</Trans>- </Button>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuTicketX />}+ variant="destructive"+ type="button"+ isDisabled={!canMutate}+ onClick={voidModal.onOpen}+ >+ <Trans>Void</Trans>+ </Button>+ </RecordAction>) : undefined}/>@@ -242,7 +253,7 @@ const MemoForm = ({ initialValues, type }: MemoFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isEditingdiff --git a/apps/erp/app/modules/invoicing/ui/Memo/MemosTable.tsx b/apps/erp/app/modules/invoicing/ui/Memo/MemosTable.tsxindex df96b8a119..776a707a06 100644--- a/apps/erp/app/modules/invoicing/ui/Memo/MemosTable.tsx+++ b/apps/erp/app/modules/invoicing/ui/Memo/MemosTable.tsx@@ -123,13 +123,14 @@ const MemosTable = memo(({ data, count, party }: MemosTableProps) => {{row.original.memoId}</Hyperlink>),- meta: { icon: <LuHash /> }+ meta: { icon: <LuHash />, mobile: "P1" }},{accessorKey: "direction",header: t`Direction`,cell: ({ row }) => <Enumerable value={row.original.direction} />,meta: {+ mobile: "P2",icon: <LuCircleDot />,filter: {type: "static",@@ -153,6 +154,7 @@ const MemosTable = memo(({ data, count, party }: MemosTableProps) => {<CustomerAvatar customerId={row.original.customerId} />) : null,meta: {+ mobile: "P3",icon: <LuUser />,filter: {type: "static",@@ -183,6 +185,7 @@ const MemosTable = memo(({ data, count, party }: MemosTableProps) => {</span>),meta: {+ mobile: "P2",icon: <LuCoins />,renderTotal: true,formatter: currencyFormatter.format@@ -215,6 +218,7 @@ const MemosTable = memo(({ data, count, party }: MemosTableProps) => {header: t`Status`,cell: ({ row }) => <MemoStatus status={row.original.status} />,meta: {+ mobile: "P2",icon: <LuCircleDot />,filter: {type: "static",diff --git a/apps/erp/app/modules/invoicing/ui/Payment/PaymentForm.test.tsx b/apps/erp/app/modules/invoicing/ui/Payment/PaymentForm.test.tsxindex ecf2aba83e..a0d51f9e85 100644--- a/apps/erp/app/modules/invoicing/ui/Payment/PaymentForm.test.tsx+++ b/apps/erp/app/modules/invoicing/ui/Payment/PaymentForm.test.tsx@@ -65,6 +65,10 @@ vi.mock("@carbon/react", () => {useMount: () => undefined};});+vi.mock("~/components/Layout/RecordHeader", () => ({+ RecordAction: ({ children }: { children?: ReactNode }) => children,+ RecordHeroTarget: () => null+}));vi.mock("@carbon/form", () => ({ValidatedForm: ({children,diff --git a/apps/erp/app/modules/invoicing/ui/Payment/PaymentForm.tsx b/apps/erp/app/modules/invoicing/ui/Payment/PaymentForm.tsxindex 500bdf41ba..2f4e49c610 100644--- a/apps/erp/app/modules/invoicing/ui/Payment/PaymentForm.tsx+++ b/apps/erp/app/modules/invoicing/ui/Payment/PaymentForm.tsx@@ -41,6 +41,10 @@ import {Supplier,TextArea} from "~/components/Form";+import {+ RecordAction,+ RecordHeroTarget+} from "~/components/Layout/RecordHeader";import { ConfirmDelete } from "~/components/Modals";import { useCurrencyDecimals, usePermissions, useUser } from "~/hooks";import { isPaymentLocked, paymentValidator } from "~/modules/invoicing";@@ -138,6 +142,23 @@ const PaymentForm = ({ initialValues, seedInvoiceIds }: PaymentFormProps) => {{ label: t`Refund from Supplier`, value: "supplier-refund" },{ label: t`Reimbursement to Employee`, value: "employee-payment" }];+ const statusNode = (+ <>+ <Enumerable value={initialValues.paymentType} />+ <PaymentStatus status={status} />+ </>+ );+ const menuItems =+ status === "Draft" && canDelete ? (+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete</Trans>+ </DropdownMenuItem>+ ) : undefined;return (<>@@ -148,54 +169,43 @@ const PaymentForm = ({ initialValues, seedInvoiceIds }: PaymentFormProps) => {isDisabled={isEditing && isLocked}className="w-full">- <Card>+ {isEditing && <RecordHeroTarget bleed />}+ <Card className={isEditing ? "compact:mt-4" : undefined}>{isEditing ? (<DocumentHeadertitle={initialValues.paymentId ?? ""}- status={- <>- <Enumerable value={initialValues.paymentType} />- <PaymentStatus status={status} />- </>- }- menuItems={- status === "Draft" && canDelete ? (- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete</Trans>- </DropdownMenuItem>- ) : undefined- }+ status={statusNode}+ menuItems={menuItems}actions={status === "Draft" ? (- <Button- leftIcon={<LuCheckCheck />}- variant="primary"- isLoading={post.state !== "idle"}- isDisabled={!canMutate}- onClick={() =>- post.submit(null, {- method: "post",- action: path.to.paymentPost(initialValues.id!)- })- }- >- <Trans>Post</Trans>- </Button>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuCheckCheck />}+ variant="primary"+ isLoading={post.state !== "idle"}+ isDisabled={!canMutate}+ onClick={() =>+ post.submit(null, {+ method: "post",+ action: path.to.paymentPost(initialValues.id!)+ })+ }+ >+ <Trans>Post</Trans>+ </Button>+ </RecordAction>) : status === "Posted" ? (- <Button- leftIcon={<LuTicketX />}- variant="destructive"- type="button"- isDisabled={!canMutate}- onClick={voidModal.onOpen}- >- <Trans>Void</Trans>- </Button>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuTicketX />}+ variant="destructive"+ type="button"+ isDisabled={!canMutate}+ onClick={voidModal.onOpen}+ >+ <Trans>Void</Trans>+ </Button>+ </RecordAction>) : undefined}/>@@ -298,7 +308,7 @@ const PaymentForm = ({ initialValues, seedInvoiceIds }: PaymentFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isEditingdiff --git a/apps/erp/app/modules/invoicing/ui/Payment/PaymentsTable.tsx b/apps/erp/app/modules/invoicing/ui/Payment/PaymentsTable.tsxindex 59f482f1cd..75fee4b591 100644--- a/apps/erp/app/modules/invoicing/ui/Payment/PaymentsTable.tsx+++ b/apps/erp/app/modules/invoicing/ui/Payment/PaymentsTable.tsx@@ -105,13 +105,14 @@ const PaymentsTable = memo(({ data, count }: PaymentsTableProps) => {{row.original.paymentId}</Hyperlink>),- meta: { icon: <LuHash /> }+ meta: { icon: <LuHash />, mobile: "P1" }},{accessorKey: "paymentType",header: t`Type`,cell: ({ row }) => <Enumerable value={row.original.paymentType} />,meta: {+ mobile: "P2",icon: <LuCircleDot />,filter: {type: "static",@@ -133,6 +134,7 @@ const PaymentsTable = memo(({ data, count }: PaymentsTableProps) => {<SupplierAvatar supplierId={row.original.supplierId} />) : null,meta: {+ mobile: "P3",icon: <LuUser />,filter: {type: "static",@@ -169,6 +171,7 @@ const PaymentsTable = memo(({ data, count }: PaymentsTableProps) => {</span>),meta: {+ mobile: "P2",icon: <LuCoins />,renderTotal: true,formatter: currencyFormatter.format@@ -184,6 +187,7 @@ const PaymentsTable = memo(({ data, count }: PaymentsTableProps) => {header: t`Status`,cell: ({ row }) => <PaymentStatus status={row.original.status} />,meta: {+ mobile: "P2",icon: <LuCircleDot />,filter: {type: "static",diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceExplorer.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceExplorer.tsxindex 8d34b88393..7c36cb45b0 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceExplorer.tsx+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceExplorer.tsx@@ -367,7 +367,7 @@ function PurchaseInvoiceLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm.tsxindex ac75aeed60..cc5de3e462 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm.tsx+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm.tsx@@ -229,7 +229,7 @@ const PurchaseInvoiceForm = ({ initialValues }: PurchaseInvoiceFormProps) => {onExtractionComplete={handleExtractionComplete}/></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isEditingdiff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceHeader.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceHeader.tsxindex 0b99b4732b..ff6fda91e5 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceHeader.tsx+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceHeader.tsx@@ -5,16 +5,12 @@import { useCarbon } from "@carbon/auth";import {Button,- Copy,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Status,useDisclosure@@ -27,10 +23,7 @@ import {LuCheckCheck,LuCircleCheck,LuCircleX,- LuEllipsisVertical,LuHandCoins,- LuPanelLeft,- LuPanelRight,LuShoppingCart,LuTicketX,LuTrash@@ -38,6 +31,7 @@ import {import { Link, useFetcher, useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";import { usePanels } from "~/components/Layout/Panels";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import {usePermissions,@@ -227,222 +221,217 @@ const PurchaseInvoiceHeader = () => {invoiceId,balance: purchaseInvoice.balance});+ const isDraft = routeData?.purchaseInvoice?.status === "Draft";+ const menuItems = (+ <>+ {auditLogTrigger}+ {canMarkPaid && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={statusFetcher.state !== "idle"}+ onClick={() =>+ statusFetcher.submit(+ { status: "Paid" },+ {+ method: "post",+ action: path.to.purchaseInvoiceStatus(invoiceId)+ }+ )+ }+ >+ <DropdownMenuIcon icon={<LuCircleCheck />} />+ <Trans>Mark as Paid</Trans>+ </DropdownMenuItem>+ </>+ )}+ {canMarkUnpaid && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={statusFetcher.state !== "idle"}+ onClick={() =>+ statusFetcher.submit(+ { status: "Open" },+ {+ method: "post",+ action: path.to.purchaseInvoiceStatus(invoiceId)+ }+ )+ }+ >+ <DropdownMenuIcon icon={<LuCircleX />} />+ <Trans>Mark as Unpaid</Trans>+ </DropdownMenuItem>+ </>+ )}+ {isPosted && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={!canVoid || !permissions.can("update", "invoicing")}+ destructive+ onClick={voidModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTicketX />} />+ <Trans>Void</Trans>+ </DropdownMenuItem>+ </>+ )}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ isPurchaseInvoiceLocked(routeData?.purchaseInvoice?.status) ||+ !permissions.can("delete", "invoicing") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Purchase Invoice</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadges = (+ <>+ <PurchaseInvoicingStatus+ // @ts-expect-error TS2322 - TODO: fix type+ status={routeData?.purchaseInvoice?.status}+ />+ {supplierApprovalRequired && !isSupplierApproved && (+ <Status color="red">+ <Trans>Unapproved Supplier</Trans>+ </Status>+ )}+ {rampMapping &&+ (rampDeepLink ? (+ <a href={rampDeepLink} target="_blank" rel="noreferrer">+ <Status color="blue">+ <Trans>Ramp</Trans>+ </Status>+ </a>+ ) : (+ <Status color="blue">+ <Trans>Ramp</Trans>+ </Status>+ ))}+ </>+ );return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.purchaseInvoiceDetails(invoiceId)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.purchaseInvoice?.invoiceId}</span>- </Heading>- </Link>- <Copy text={routeData?.purchaseInvoice?.invoiceId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- {canMarkPaid && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={statusFetcher.state !== "idle"}- onClick={() =>- statusFetcher.submit(- { status: "Paid" },- {- method: "post",- action: path.to.purchaseInvoiceStatus(invoiceId)- }- )- }- >- <DropdownMenuIcon icon={<LuCircleCheck />} />- <Trans>Mark as Paid</Trans>- </DropdownMenuItem>- </>- )}- {canMarkUnpaid && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={statusFetcher.state !== "idle"}- onClick={() =>- statusFetcher.submit(- { status: "Open" },- {- method: "post",- action: path.to.purchaseInvoiceStatus(invoiceId)- }- )- }- >- <DropdownMenuIcon icon={<LuCircleX />} />- <Trans>Mark as Unpaid</Trans>- </DropdownMenuItem>- </>- )}- {isPosted && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- !canVoid || !permissions.can("update", "invoicing")- }- destructive- onClick={voidModal.onOpen}- >- <DropdownMenuIcon icon={<LuTicketX />} />- <Trans>Void</Trans>- </DropdownMenuItem>- </>- )}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- isPurchaseInvoiceLocked(- routeData?.purchaseInvoice?.status- ) ||- !permissions.can("delete", "invoicing") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Purchase Invoice</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <PurchaseInvoicingStatus- // @ts-expect-error TS2322 - TODO: fix type- status={routeData?.purchaseInvoice?.status}- />- {supplierApprovalRequired && !isSupplierApproved && (- <Status color="red">- <Trans>Unapproved Supplier</Trans>- </Status>- )}- {rampMapping &&- (rampDeepLink ? (- <a href={rampDeepLink} target="_blank" rel="noreferrer">- <Status color="blue">- <Trans>Ramp</Trans>- </Status>- </a>- ) : (- <Status color="blue">- <Trans>Ramp</Trans>- </Status>- ))}- </HStack>- <HStack>+ <RecordHeader+ title={routeData?.purchaseInvoice?.invoiceId}+ titleTo={path.to.purchaseInvoiceDetails(invoiceId)}+ copyValue={routeData?.purchaseInvoice?.invoiceId ?? ""}+ menu={menuItems}+ status={statusBadges}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>{relatedDocs.purchaseOrders.length === 1 && (- <Button variant="secondary" leftIcon={<LuShoppingCart />} asChild>- <Link- to={path.to.purchaseOrderDetails(- relatedDocs.purchaseOrders[0].id- )}+ <RecordAction slot="overflow">+ <Button+ variant="secondary"+ leftIcon={<LuShoppingCart />}+ asChild>- <Trans>Purchase Order</Trans>- </Link>- </Button>+ <Link+ to={path.to.purchaseOrderDetails(+ relatedDocs.purchaseOrders[0].id+ )}+ >+ <Trans>Purchase Order</Trans>+ </Link>+ </Button>+ </RecordAction>)}{relatedDocs.receipts.length === 1 && (- <Button variant="secondary" leftIcon={<LuHandCoins />} asChild>- <Link to={path.to.receipt(relatedDocs.receipts[0].id)}>- <Trans>Receipt</Trans>- </Link>- </Button>+ <RecordAction slot="overflow">+ <Button variant="secondary" leftIcon={<LuHandCoins />} asChild>+ <Link to={path.to.receipt(relatedDocs.receipts[0].id)}>+ <Trans>Receipt</Trans>+ </Link>+ </Button>+ </RecordAction>)}{relatedDocs.purchaseOrders.length > 1 && (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button variant="secondary" leftIcon={<LuShoppingCart />}>- <Trans>Purchase Orders</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- {relatedDocs.purchaseOrders.map((po) => (- <DropdownMenuItem key={po.id} asChild>- <Link to={path.to.purchaseOrderDetails(po.id)}>- {po.readableId}- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button variant="secondary" leftIcon={<LuShoppingCart />}>+ <Trans>Purchase Orders</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ {relatedDocs.purchaseOrders.map((po) => (+ <DropdownMenuItem key={po.id} asChild>+ <Link to={path.to.purchaseOrderDetails(po.id)}>+ {po.readableId}+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>)}{relatedDocs.receipts.length > 1 && (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button variant="secondary" leftIcon={<LuHandCoins />}>- <Trans>Receipts</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- {relatedDocs.receipts.map((receipt) => (- <DropdownMenuItem key={receipt.id} asChild>- <Link to={path.to.receipt(receipt.id)}>- {receipt.readableId}- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button variant="secondary" leftIcon={<LuHandCoins />}>+ <Trans>Receipts</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ {relatedDocs.receipts.map((receipt) => (+ <DropdownMenuItem key={receipt.id} asChild>+ <Link to={path.to.receipt(receipt.id)}>+ {receipt.readableId}+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>)}- <Button- leftIcon={<LuCheckCheck />}- variant={- routeData?.purchaseInvoice?.status === "Draft"- ? "primary"- : "secondary"- }- onClick={showPostModal}- isDisabled={- isPosted ||- routeData?.purchaseInvoiceLines?.length === 0 ||- !permissions.can("update", "invoicing") ||- !isSupplierApproved- }- >- <Trans>Post</Trans>- </Button>+ <RecordAction slot={isDraft ? "primary" : "secondary"}>+ <Button+ leftIcon={<LuCheckCheck />}+ variant={+ routeData?.purchaseInvoice?.status === "Draft"+ ? "primary"+ : "secondary"+ }+ onClick={showPostModal}+ isDisabled={+ isPosted ||+ routeData?.purchaseInvoiceLines?.length === 0 ||+ !permissions.can("update", "invoicing") ||+ !isSupplierApproved+ }+ >+ <Trans>Post</Trans>+ </Button>+ </RecordAction>{canMakePayment && (- <Button variant="primary" leftIcon={<LuHandCoins />} asChild>- <Link to={makePaymentHref}>- <Trans>Payment</Trans>- </Link>- </Button>+ <RecordAction slot={isDraft ? "secondary" : "primary"}>+ <Button variant="primary" leftIcon={<LuHandCoins />} asChild>+ <Link to={makePaymentHref}>+ <Trans>Payment</Trans>+ </Link>+ </Button>+ </RecordAction>)}-- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>- </div>+ </>+ }+ />{postingModal.isOpen && (<PurchaseInvoicePostModaldiff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLineForm.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLineForm.tsxindex 09237df491..471aa26b97 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLineForm.tsx+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLineForm.tsx@@ -467,7 +467,7 @@ const PurchaseInvoiceLineForm = ({><HStackclassName={cn(- "w-full justify-between items-start",+ "w-full justify-between items-start compact:flex-col compact:items-stretch compact:space-x-0",type === "modal" && "pr-16")}>@@ -527,7 +527,7 @@ const PurchaseInvoiceLineForm = ({)}</ModalCardDescription></ModalCardHeader>- <div className="flex-shrink-0">+ <div className="flex-shrink-0 compact:min-w-0 compact:overflow-x-auto compact:scroll-fade-x compact:px-4 compact:pb-2 compact:empty:hidden">{!isEditing && (<TabsList><TabsTrigger value="item">@@ -582,7 +582,7 @@ const PurchaseInvoiceLineForm = ({onTypeChange={onTypeChange}/>- <FormControl className="col-span-2">+ <FormControl className="col-span-2 compact:col-span-full"><FormLabel isOptional><Trans>Description</Trans></FormLabel>@@ -827,7 +827,9 @@ const PurchaseInvoiceLineForm = ({)}<InputControlledclassName={- activeTab === "asset" ? "col-span-1" : "col-span-3"+ activeTab === "asset"+ ? "col-span-1"+ : "col-span-3 compact:col-span-full"}label={t`Description`}name="description"diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSummary.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSummary.tsxindex d6059d5dd6..1c283fafd0 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSummary.tsx+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSummary.tsx@@ -114,12 +114,12 @@ const LineItems = ({{line.thumbnailPath ? (<imgalt={itemReadableId ?? ""}- className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg"+ className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg compact:size-16"src={getPrivateUrl(line.thumbnailPath)}/>) : (- <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4">- <LuImage className="w-16 h-16 text-muted-foreground" />+ <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4 compact:size-16">+ <LuImage className="w-16 h-16 text-muted-foreground compact:size-8" /></div>)}@@ -133,8 +133,11 @@ const LineItems = ({children need w-full because VStack is items-start, whichsizes each child to its own content and leaves truncateinert no matter how narrow the column gets. */}- <div className="flex items-center justify-between w-full">- <VStack spacing={0} className="flex-1 min-w-0">+ <div className="flex items-center justify-between w-full compact:flex-col compact:items-start compact:gap-2">+ <VStack+ spacing={0}+ className="flex-1 min-w-0 compact:w-full"+ ><HStack spacing={2} className="flex min-w-0 w-full"><Heading className="truncate">{itemReadableId}</Heading><Button@@ -162,7 +165,7 @@ const LineItems = ({</VStack><VStackspacing={2}- className="flex-shrink-0 items-end w-auto"+ className="flex-shrink-0 items-end w-auto compact:items-start compact:w-full"><HStack spacing={4}><VStack spacing={0}>diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicesTable.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicesTable.tsxindex 3fb8c79057..07fd90a2d7 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicesTable.tsx+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicesTable.tsx@@ -91,6 +91,7 @@ const PurchaseInvoicesTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -101,6 +102,7 @@ const PurchaseInvoicesTable = memo(<SupplierAvatar supplierId={row.original.supplierId} />),meta: {+ mobile: "P3",filter: {type: "static",options: suppliers?.map((supplier) => ({@@ -145,6 +147,7 @@ const PurchaseInvoicesTable = memo(return <PurchaseInvoicingStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: purchaseInvoiceStatusType.map((status) => ({@@ -161,6 +164,7 @@ const PurchaseInvoicesTable = memo(header: t`Order Total`,cell: (item) => currencyFormatter.format(item.getValue<number>()),meta: {+ mobile: "P2",icon: <LuDollarSign />,formatter: currencyFormatter.format,renderTotal: truediff --git a/apps/erp/app/modules/invoicing/ui/Reimbursement/ReimbursementsTable.tsx b/apps/erp/app/modules/invoicing/ui/Reimbursement/ReimbursementsTable.tsxindex af6cbc7362..918326cdd3 100644--- a/apps/erp/app/modules/invoicing/ui/Reimbursement/ReimbursementsTable.tsx+++ b/apps/erp/app/modules/invoicing/ui/Reimbursement/ReimbursementsTable.tsx@@ -52,7 +52,7 @@ const ReimbursementsTable = memo({row.original.reimbursementId}</Hyperlink>),- meta: { icon: <LuHash /> }+ meta: { icon: <LuHash />, mobile: "P1" }},{accessorKey: "status",@@ -61,6 +61,7 @@ const ReimbursementsTable = memo(<ReimbursementStatus status={row.original.status} />),meta: {+ mobile: "P2",icon: <LuCircleDot />,filter: {type: "static",@@ -79,6 +80,7 @@ const ReimbursementsTable = memo(<EmployeeAvatar employeeId={row.original.employeeId} />),meta: {+ mobile: "P3",icon: <LuUser />,filter: {type: "static",@@ -119,7 +121,7 @@ const ReimbursementsTable = memo(</span>);},- meta: { icon: <LuCoins /> }+ meta: { icon: <LuCoins />, mobile: "P2" }},{accessorKey: "journalId",diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceExplorer.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceExplorer.tsxindex 356eccafea..9010d69702 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceExplorer.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceExplorer.tsx@@ -315,7 +315,7 @@ function SalesInvoiceLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceForm.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceForm.tsxindex 136316cc0c..fdb1a86454 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceForm.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceForm.tsx@@ -283,7 +283,7 @@ const SalesInvoiceForm = ({ initialValues }: SalesInvoiceFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isEditingdiff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceHeader.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceHeader.tsxindex 241edfbbcc..17336e4d47 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceHeader.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceHeader.tsx@@ -6,16 +6,13 @@ import { useCarbon } from "@carbon/auth";import { useRuleViolations } from "@carbon/ee/rules";import {Button,- Copy,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,- Heading,HStack,- IconButton,MENU_ITEM_SHORTCUTS,Status,useDisclosure@@ -30,11 +27,8 @@ import {LuCircleCheck,LuCircleX,LuDollarSign,- LuEllipsisVertical,LuEye,LuFile,- LuPanelLeft,- LuPanelRight,LuTicketX,LuTrash,LuTruck@@ -44,6 +38,7 @@ import type { FetcherWithComponents } from "react-router";import { Link, useFetcher, useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";import { usePanels } from "~/components/Layout/Panels";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useSettings, useUser } from "~/hooks";import { ShipmentStatus } from "~/modules/inventory/ui/Shipments";@@ -220,246 +215,242 @@ const SalesInvoiceHeader = () => {invoiceId,balance: salesInvoice.balance});+ const isDraft = routeData?.salesInvoice?.status === "Draft";+ const menuItems = (+ <>+ {auditLogTrigger}+ {canMarkPaid && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={statusFetcher.state !== "idle"}+ onClick={() =>+ statusFetcher.submit(+ { status: "Paid" },+ {+ method: "post",+ action: path.to.salesInvoiceStatus(invoiceId)+ }+ )+ }+ >+ <DropdownMenuIcon icon={<LuCircleCheck />} />+ <Trans>Mark as Paid</Trans>+ </DropdownMenuItem>+ </>+ )}+ {canMarkUnpaid && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={statusFetcher.state !== "idle"}+ onClick={() =>+ statusFetcher.submit(+ { status: "Submitted" },+ {+ method: "post",+ action: path.to.salesInvoiceStatus(invoiceId)+ }+ )+ }+ >+ <DropdownMenuIcon icon={<LuCircleX />} />+ <Trans>Mark as Unpaid</Trans>+ </DropdownMenuItem>+ </>+ )}+ {isPosted && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={isVoided || !permissions.can("update", "invoicing")}+ destructive+ onClick={voidModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTicketX />} />+ <Trans>Void</Trans>+ </DropdownMenuItem>+ </>+ )}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ salesInvoice.status !== "Draft" ||+ !permissions.can("delete", "invoicing") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Sales Invoice</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadges = (+ <>+ <SalesInvoiceStatus status={salesInvoice.status} />+ {routeData?.stripeInvoiceUrl && isPosted && (+ <a+ href={routeData.stripeInvoiceUrl}+ target="_blank"+ rel="noreferrer"+ className="no-underline"+ >+ <Status color="purple">+ <Trans>Stripe</Trans>+ </Status>+ </a>+ )}+ </>+ );return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.salesInvoiceDetails(invoiceId)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.salesInvoice?.invoiceId}</span>- </Heading>- </Link>- <Copy text={routeData?.salesInvoice?.invoiceId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- {canMarkPaid && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={statusFetcher.state !== "idle"}- onClick={() =>- statusFetcher.submit(- { status: "Paid" },- {- method: "post",- action: path.to.salesInvoiceStatus(invoiceId)- }- )- }- >- <DropdownMenuIcon icon={<LuCircleCheck />} />- <Trans>Mark as Paid</Trans>- </DropdownMenuItem>- </>- )}- {canMarkUnpaid && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={statusFetcher.state !== "idle"}- onClick={() =>- statusFetcher.submit(- { status: "Submitted" },- {- method: "post",- action: path.to.salesInvoiceStatus(invoiceId)- }- )- }- >- <DropdownMenuIcon icon={<LuCircleX />} />- <Trans>Mark as Unpaid</Trans>- </DropdownMenuItem>- </>- )}- {isPosted && (- <>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- isVoided || !permissions.can("update", "invoicing")- }- destructive- onClick={voidModal.onOpen}- >- <DropdownMenuIcon icon={<LuTicketX />} />- <Trans>Void</Trans>- </DropdownMenuItem>- </>- )}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- salesInvoice.status !== "Draft" ||- !permissions.can("delete", "invoicing") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Sales Invoice</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <SalesInvoiceStatus status={salesInvoice.status} />- {routeData?.stripeInvoiceUrl && isPosted && (- <a- href={routeData.stripeInvoiceUrl}- target="_blank"- rel="noreferrer"- className="no-underline"- >- <Status color="purple">- <Trans>Stripe</Trans>- </Status>- </a>- )}- </HStack>- <HStack>+ <RecordHeader+ title={routeData?.salesInvoice?.invoiceId}+ titleTo={path.to.salesInvoiceDetails(invoiceId)}+ copyValue={routeData?.salesInvoice?.invoiceId ?? ""}+ menu={menuItems}+ status={statusBadges}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>{relatedDocs.salesOrders.length === 1 && (- <Button- variant="secondary"- leftIcon={<RiProgress8Line />}- asChild- >- <Link- to={path.to.salesOrderDetails(relatedDocs.salesOrders[0].id)}+ <RecordAction slot="overflow">+ <Button+ variant="secondary"+ leftIcon={<RiProgress8Line />}+ asChild>- <Trans>Sales Order</Trans>- </Link>- </Button>+ <Link+ to={path.to.salesOrderDetails(+ relatedDocs.salesOrders[0].id+ )}+ >+ <Trans>Sales Order</Trans>+ </Link>+ </Button>+ </RecordAction>)}{relatedDocs.salesOrders.length > 1 && (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button variant="secondary" leftIcon={<RiProgress8Line />}>- <Trans>Sales Orders</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- {relatedDocs.salesOrders.map((po) => (- <DropdownMenuItem key={po.id} asChild>- <Link to={path.to.salesOrderDetails(po.id)}>- {po.readableId}- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button variant="secondary" leftIcon={<RiProgress8Line />}>+ <Trans>Sales Orders</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ {relatedDocs.salesOrders.map((po) => (+ <DropdownMenuItem key={po.id} asChild>+ <Link to={path.to.salesOrderDetails(po.id)}>+ {po.readableId}+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>)}{relatedDocs.shipments.length > 0 && (+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ variant="secondary"+ leftIcon={<LuTruck />}+ rightIcon={+ relatedDocs.shipments.length > 1 ? (+ <LuChevronDown />+ ) : undefined+ }+ >+ {relatedDocs.shipments.length === 1 ? (+ <Trans>Shipment</Trans>+ ) : (+ <Trans>Shipments</Trans>+ )}+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ {relatedDocs.shipments.map((shipment) => (+ <DropdownMenuItem key={shipment.id} asChild>+ <Link to={path.to.shipment(shipment.id)}>+ <DropdownMenuIcon icon={<LuTruck />} />+ <HStack spacing={8}>+ <span>{shipment.readableId}</span>+ <ShipmentStatus+ status={shipment.status as "Posted"}+ />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>+ )}+ <RecordAction slot="overflow"><DropdownMenu><DropdownMenuTrigger asChild><Button+ leftIcon={<LuEye />}variant="secondary"- leftIcon={<LuTruck />}- rightIcon={- relatedDocs.shipments.length > 1 ? (- <LuChevronDown />- ) : undefined- }+ rightIcon={<LuChevronDown />}>- {relatedDocs.shipments.length === 1 ? (- <Trans>Shipment</Trans>- ) : (- <Trans>Shipments</Trans>- )}+ <Trans>Preview</Trans></Button></DropdownMenuTrigger><DropdownMenuContent>- {relatedDocs.shipments.map((shipment) => (- <DropdownMenuItem key={shipment.id} asChild>- <Link to={path.to.shipment(shipment.id)}>- <DropdownMenuIcon icon={<LuTruck />} />- <HStack spacing={8}>- <span>{shipment.readableId}</span>- <ShipmentStatus- status={shipment.status as "Posted"}- />- </HStack>- </Link>- </DropdownMenuItem>- ))}+ <DropdownMenuItem asChild>+ <a+ target="_blank"+ href={path.to.file.salesInvoice(invoiceId)}+ rel="noreferrer"+ >+ <DropdownMenuIcon icon={<LuFile />} />+ <Trans>PDF</Trans>+ </a>+ </DropdownMenuItem></DropdownMenuContent></DropdownMenu>- )}- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuEye />}- variant="secondary"- rightIcon={<LuChevronDown />}- >- <Trans>Preview</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem asChild>- <a- target="_blank"- href={path.to.file.salesInvoice(invoiceId)}- rel="noreferrer"- >- <DropdownMenuIcon icon={<LuFile />} />- <Trans>PDF</Trans>- </a>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <Button- leftIcon={<LuCheckCheck />}- variant={- routeData?.salesInvoice?.status === "Draft"- ? "primary"- : "secondary"- }- onClick={showPostModal}- isLoading={postFetcher.state !== "idle"}- isDisabled={- postFetcher.state !== "idle" ||- isPosted ||- routeData?.salesInvoiceLines?.length === 0 ||- !permissions.can("update", "invoicing")- }- >- <Trans>Post</Trans>- </Button>- {canReceivePayment && (- <Button variant="primary" leftIcon={<LuDollarSign />} asChild>- <Link to={receivePaymentHref}>- <Trans>Payment</Trans>- </Link>+ </RecordAction>+ <RecordAction slot={isDraft ? "primary" : "secondary"}>+ <Button+ leftIcon={<LuCheckCheck />}+ variant={+ routeData?.salesInvoice?.status === "Draft"+ ? "primary"+ : "secondary"+ }+ onClick={showPostModal}+ isLoading={postFetcher.state !== "idle"}+ isDisabled={+ postFetcher.state !== "idle" ||+ isPosted ||+ routeData?.salesInvoiceLines?.length === 0 ||+ !permissions.can("update", "invoicing")+ }+ >+ <Trans>Post</Trans></Button>+ </RecordAction>+ {canReceivePayment && (+ <RecordAction slot={isDraft ? "secondary" : "primary"}>+ <Button variant="primary" leftIcon={<LuDollarSign />} asChild>+ <Link to={receivePaymentHref}>+ <Trans>Payment</Trans>+ </Link>+ </Button>+ </RecordAction>)}- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>- </div>+ </>+ }+ />{postingModal.isOpen && (<SalesInvoicePostModaldiff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceLineForm.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceLineForm.tsxindex 86cc18906d..3a48c88a67 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceLineForm.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceLineForm.tsx@@ -429,7 +429,7 @@ const SalesInvoiceLineForm = ({><HStackclassName={cn(- "w-full justify-between items-start",+ "w-full justify-between items-start compact:flex-col compact:items-stretch compact:space-x-0",type === "modal" && "pr-16")}>@@ -491,7 +491,7 @@ const SalesInvoiceLineForm = ({)}</ModalCardDescription></ModalCardHeader>- <div className="flex-shrink-0">+ <div className="flex-shrink-0 compact:min-w-0 compact:overflow-x-auto compact:scroll-fade-x compact:px-4 compact:pb-2 compact:empty:hidden">{!isEditing && (<TabsList><TabsTrigger value="item">@@ -551,7 +551,7 @@ const SalesInvoiceLineForm = ({onTypeChange={onTypeChange}/>- <FormControl className="col-span-2">+ <FormControl className="col-span-2 compact:col-span-full"><FormLabel isOptional><Trans>Description</Trans></FormLabel>diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsxindex 3e622637d3..df036a301d 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx@@ -116,12 +116,12 @@ const LineItems = ({{line.thumbnailPath ? (<imgalt={itemReadableId ?? ""}- className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg"+ className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg compact:size-16"src={getPrivateUrl(line.thumbnailPath)}/>) : (- <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4">- <LuImage className="w-16 h-16 text-muted-foreground" />+ <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4 compact:size-16">+ <LuImage className="w-16 h-16 text-muted-foreground compact:size-8" /></div>)}@@ -135,8 +135,11 @@ const LineItems = ({children need w-full because VStack is items-start, whichsizes each child to its own content and leaves truncateinert no matter how narrow the column gets. */}- <div className="flex items-center justify-between w-full">- <VStack spacing={0} className="flex-1 min-w-0">+ <div className="flex items-center justify-between w-full compact:flex-col compact:items-start compact:gap-2">+ <VStack+ spacing={0}+ className="flex-1 min-w-0 compact:w-full"+ ><HStack spacing={2} className="flex min-w-0 w-full"><Heading className="truncate">{itemReadableId}</Heading><Button@@ -161,7 +164,7 @@ const LineItems = ({</VStack><VStackspacing={2}- className="flex-shrink-0 items-end w-auto"+ className="flex-shrink-0 items-end w-auto compact:items-start compact:w-full"><HStack spacing={4}><VStack spacing={0}>diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicesTable.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicesTable.tsxindex 79f7369ceb..b55b6f67e1 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicesTable.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicesTable.tsx@@ -84,6 +84,7 @@ const SalesInvoicesTable = memo(({ data, count }: SalesInvoicesTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -94,6 +95,7 @@ const SalesInvoicesTable = memo(({ data, count }: SalesInvoicesTableProps) => {<CustomerAvatar customerId={row.original.customerId} />),meta: {+ mobile: "P3",filter: {type: "static",options: customers?.map((customer) => ({@@ -138,6 +140,7 @@ const SalesInvoicesTable = memo(({ data, count }: SalesInvoicesTableProps) => {return <SalesInvoiceStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: salesInvoiceStatusType.map((status) => ({@@ -154,6 +157,7 @@ const SalesInvoicesTable = memo(({ data, count }: SalesInvoicesTableProps) => {header: t`Invoice Total`,cell: (item) => currencyFormatter.format(item.getValue<number>()),meta: {+ mobile: "P2",icon: <LuDollarSign />,formatter: currencyFormatter.format,renderTotal: truediff --git a/apps/erp/app/modules/invoicing/ui/Workbench/ARAPWorkbench.tsx b/apps/erp/app/modules/invoicing/ui/Workbench/ARAPWorkbench.tsxindex c418f56e04..18a7fb9bba 100644--- a/apps/erp/app/modules/invoicing/ui/Workbench/ARAPWorkbench.tsx+++ b/apps/erp/app/modules/invoicing/ui/Workbench/ARAPWorkbench.tsx@@ -276,13 +276,16 @@ export function ARAPWorkbench({const kids = childrenByParty[r.partyId] ?? [];const isExpanded = expandedIds.has(r.partyId);return (- <div className="flex items-center">+ <div+ data-key-cell=""+ className="flex items-center compact:w-[calc(45dvw-32px)] compact:pl-3"+ ><div className="w-5 shrink-0 flex items-center justify-center self-center">{kids.length > 0 ? (<buttontype="button"aria-label={isExpanded ? t`Collapse` : t`Expand`}- className="text-muted-foreground hover:text-foreground"+ className="text-muted-foreground hover:text-foreground compact:hit-area"onClick={(e) => {e.stopPropagation();toggleExpand(r.partyId);@@ -297,9 +300,15 @@ export function ARAPWorkbench({) : null}</div>{r.customerId ? (- <CustomerAvatar customerId={r.customerId} />+ <CustomerAvatar+ customerId={r.customerId}+ className="compact:min-w-0 compact:truncate"+ />) : r.supplierId ? (- <SupplierAvatar supplierId={r.supplierId} />+ <SupplierAvatar+ supplierId={r.supplierId}+ className="compact:min-w-0 compact:truncate"+ />) : null}</div>);@@ -311,7 +320,10 @@ export function ARAPWorkbench({: path.to.purchaseInvoiceDetails(r.invoiceId): path.to.memo(r.invoiceId);return (- <div className="flex items-center">+ <div+ data-key-cell=""+ className="flex items-center compact:w-[calc(45dvw-32px)]"+ ><divaria-hiddenclassName="w-5 shrink-0 border-l border-border -my-2"@@ -334,7 +346,7 @@ export function ARAPWorkbench({</div>);},- meta: { icon: <LuUser /> }+ meta: { icon: <LuUser />, mobile: "P1" }},{id: "paymentTerm",@@ -557,6 +569,7 @@ export function ARAPWorkbench({title={title ?? (side === "ar" ? t`Receivables` : t`Payables`)}primaryAction={filters}defaultColumnPinning={{ left: ["Select", "counterparty"] }}+ mobileLayout="table"/></div></VStack>diff --git a/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeExplorer.tsx b/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeExplorer.tsxindex 6297004910..2add305268 100644--- a/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeExplorer.tsx+++ b/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeExplorer.tsx@@ -182,7 +182,7 @@ function AffectedItemRow({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeHeader.tsx b/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeHeader.tsxindex dd8fbe4674..6167d90245 100644--- a/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeHeader.tsx+++ b/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeHeader.tsx@@ -4,31 +4,23 @@import {Button,- Copy,cn,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { useLingui } from "@lingui/react/macro";import {LuCircleCheck,LuCircleStop,- LuEllipsisVertical,LuLoaderCircle,LuStepForward,LuTrash} from "react-icons/lu";-import { Link, useFetcher, useParams } from "react-router";+import { useFetcher, useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import Confirm from "~/components/Modals/Confirm/Confirm";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";@@ -71,151 +63,147 @@ const ChangeNoticeHeader = () => {status as (typeof changeNoticeStatus)[number]]?.[0] ?? null;+ const statusBadge = (+ <span className={cn(isLocked && "line-through")}>+ <ChangeNoticeStatus status={routeData?.changeNotice?.status} />+ </span>+ );+ const menuItems = (+ <>+ {auditLogTrigger}+ {status === "Cancelled" && (+ <DropdownMenuItem+ disabled={+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "parts")+ }+ onClick={() => {+ statusFetcher.submit(+ { id, fromStatus: status, status: "Draft" },+ {+ method: "post",+ action: path.to.changeNoticeStatus(id)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ {t`Reopen`}+ </DropdownMenuItem>+ )}+ {/* Reopen from Implementation goes back one stage so the+ engineering content unlocks without losing progress. */}+ {status === "Implementation" && (+ <DropdownMenuItem+ disabled={+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "parts")+ }+ onClick={() => {+ statusFetcher.submit(+ {+ id,+ fromStatus: status,+ status: "Engineering Complete"+ },+ {+ method: "post",+ action: path.to.changeNoticeStatus(id)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ {t`Reopen`}+ </DropdownMenuItem>+ )}+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ destructive+ disabled={+ !permissions.can("delete", "parts") || !permissions.is("employee")+ }+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ {t`Delete Change Notice`}+ </DropdownMenuItem>+ </>+ );+return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0}>- <HStack>- <Link to={path.to.changeNoticeDetails(id)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.changeNotice?.changeOrderId}</span>- </Heading>- </Link>- <span className={cn(isLocked && "line-through")}>- <ChangeNoticeStatus status={routeData?.changeNotice?.status} />- </span>- <Copy text={routeData?.changeNotice?.changeOrderId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}+ <RecordHeader+ title={routeData?.changeNotice?.changeOrderId}+ titleTo={path.to.changeNoticeDetails(id)}+ copyValue={routeData?.changeNotice?.changeOrderId ?? ""}+ menu={menuItems}+ status={statusBadge}+ actions={+ <>+ {/* The full stage flow (green-dot progress) lives in the middle pane+ (ChangeNoticeStatusFlow); the header keeps only the canonical status+ badge (above) + the advance/release action. */}++ {/* Cancel — a header action (opens the confirm modal) sitting beside the+ advance/release primary action. Reopen (from Cancelled) stays in the+ ⋮ menu. */}+ {status !== "Cancelled" && !isLocked && (+ <RecordAction slot="secondary">+ <Button+ leftIcon={<LuCircleStop />}variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- {status === "Cancelled" && (- <DropdownMenuItem- disabled={- statusFetcher.state !== "idle" ||- !permissions.can("update", "parts")- }- onClick={() => {- statusFetcher.submit(- { id, fromStatus: status, status: "Draft" },- {- method: "post",- action: path.to.changeNoticeStatus(id)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- {t`Reopen`}- </DropdownMenuItem>- )}- {/* Reopen from Implementation goes back one stage so the- engineering content unlocks without losing progress. */}- {status === "Implementation" && (- <DropdownMenuItem- disabled={+ isDisabled={!permissions.can("update", "parts")}+ onClick={cancelModal.onOpen}+ >+ {t`Cancel`}+ </Button>+ </RecordAction>+ )}++ {/* Implementation → Done is a release: it opens the review + confirm+ dialog (which carries the merge resolution), not a one-click stage+ advance. The header only auto-advances the earlier stages. */}+ {nextStatus && nextStatus !== "Done" && !isLocked && (+ <RecordAction slot="primary">+ <statusFetcher.Form+ method="post"+ action={path.to.changeNoticeStatus(id)}+ >+ <input type="hidden" name="id" value={id} />+ <input type="hidden" name="fromStatus" value={status} />+ <input type="hidden" name="status" value={nextStatus} />+ <Button+ type="submit"+ rightIcon={<LuStepForward />}+ variant="primary"+ isDisabled={statusFetcher.state !== "idle" ||!permissions.can("update", "parts")}- onClick={() => {- statusFetcher.submit(- {- id,- fromStatus: status,- status: "Engineering Complete"- },- {- method: "post",- action: path.to.changeNoticeStatus(id)- }- );- }}+ isLoading={statusFetcher.state !== "idle"}>- <DropdownMenuIcon icon={<LuLoaderCircle />} />- {t`Reopen`}- </DropdownMenuItem>- )}- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- destructive- disabled={- !permissions.can("delete", "parts") ||- !permissions.is("employee")- }- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- {t`Delete Change Notice`}- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>-- <HStack spacing={2}>- {/* The full stage flow (green-dot progress) lives in the middle pane- (ChangeNoticeStatusFlow); the header keeps only the canonical status- badge (above) + the advance/release action. */}-- {/* Cancel — a header action (opens the confirm modal) sitting beside the- advance/release primary action. Reopen (from Cancelled) stays in the- ⋮ menu. */}- {status !== "Cancelled" && !isLocked && (- <Button- leftIcon={<LuCircleStop />}- variant="secondary"- isDisabled={!permissions.can("update", "parts")}- onClick={cancelModal.onOpen}- >- {t`Cancel`}- </Button>- )}+ {t`Advance to ${nextStatus}`}+ </Button>+ </statusFetcher.Form>+ </RecordAction>+ )}- {/* Implementation → Done is a release: it opens the review + confirm- dialog (which carries the merge resolution), not a one-click stage- advance. The header only auto-advances the earlier stages. */}- {nextStatus && nextStatus !== "Done" && !isLocked && (- <statusFetcher.Form- method="post"- action={path.to.changeNoticeStatus(id)}- >- <input type="hidden" name="id" value={id} />- <input type="hidden" name="fromStatus" value={status} />- <input type="hidden" name="status" value={nextStatus} />- <Button- type="submit"- rightIcon={<LuStepForward />}- variant="primary"- isDisabled={- statusFetcher.state !== "idle" ||- !permissions.can("update", "parts")- }- isLoading={statusFetcher.state !== "idle"}- >- {t`Advance to ${nextStatus}`}- </Button>- </statusFetcher.Form>- )}-- {status === "Implementation" && !isLocked && (- <Button- leftIcon={<LuCircleCheck />}- variant="primary"- isDisabled={!permissions.can("update", "parts")}- onClick={() => setReleaseDialogOpen(true)}- >- {t`Release`}- </Button>- )}- </HStack>- </div>+ {status === "Implementation" && !isLocked && (+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuCircleCheck />}+ variant="primary"+ isDisabled={!permissions.can("update", "parts")}+ onClick={() => setReleaseDialogOpen(true)}+ >+ {t`Release`}+ </Button>+ </RecordAction>+ )}+ </>+ }+ />{deleteModal.isOpen && (<ConfirmDeleteaction={path.to.deleteChangeNotice(id)}diff --git a/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticesTable.tsx b/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticesTable.tsxindex 32f641aa40..092b8f0d40 100644--- a/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticesTable.tsx+++ b/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticesTable.tsx@@ -104,6 +104,7 @@ const ChangeNoticesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -114,6 +115,7 @@ const ChangeNoticesTable = memo(<ChangeNoticeStatus status={row.original.status} />),meta: {+ mobile: "P2",icon: <LuCircleGauge />,filter: {type: "static",@@ -205,6 +207,7 @@ const ChangeNoticesTable = memo(<EmployeeAvatar employeeId={row.original.assignee} />),meta: {+ mobile: "P3",icon: <LuUser />,filter: {type: "static",diff --git a/apps/erp/app/modules/items/ui/ChangeNoticeActions/ChangeNoticeRequiredActionsTable.tsx b/apps/erp/app/modules/items/ui/ChangeNoticeActions/ChangeNoticeRequiredActionsTable.tsxindex 4e9a8726bf..967914e412 100644--- a/apps/erp/app/modules/items/ui/ChangeNoticeActions/ChangeNoticeRequiredActionsTable.tsx+++ b/apps/erp/app/modules/items/ui/ChangeNoticeActions/ChangeNoticeRequiredActionsTable.tsx@@ -42,6 +42,7 @@ const ChangeNoticeRequiredActionsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuListChecks />}},diff --git a/apps/erp/app/modules/items/ui/ChangeNoticeTypes/ChangeNoticeTypesTable.tsx b/apps/erp/app/modules/items/ui/ChangeNoticeTypes/ChangeNoticeTypesTable.tsxindex 54b4c67db7..f6cd8efa66 100644--- a/apps/erp/app/modules/items/ui/ChangeNoticeTypes/ChangeNoticeTypesTable.tsx+++ b/apps/erp/app/modules/items/ui/ChangeNoticeTypes/ChangeNoticeTypesTable.tsx@@ -37,6 +37,7 @@ const ChangeNoticeTypesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuGitPullRequestArrow />}}diff --git a/apps/erp/app/modules/items/ui/Consumables/ConsumableHeader.tsx b/apps/erp/app/modules/items/ui/Consumables/ConsumableHeader.tsxindex e84024a96d..fa944d78ad 100644--- a/apps/erp/app/modules/items/ui/Consumables/ConsumableHeader.tsx+++ b/apps/erp/app/modules/items/ui/Consumables/ConsumableHeader.tsx@@ -3,26 +3,19 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import {- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Status,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";-import { LuEllipsisVertical, LuTrash } from "react-icons/lu";-import { Link, useParams } from "react-router";+import { LuTrash } from "react-icons/lu";+import { useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";import { DetailsTopbar } from "~/components/Layout";+import { RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";import { useResolved } from "~/hooks/useResolved";@@ -63,73 +56,53 @@ const ConsumableHeader = () => {supersession?.supersessionMode);+ const statusPill = lifecycleStatus && (+ <Status color={lifecycleStatus.color}>{lifecycleStatus.label}</Status>+ );+ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "parts") || !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Consumable</Trans>+ </DropdownMenuItem>+ </>+ );+return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0} className="flex-grow">- <HStack>- <Link to={path.to.consumableDetails(itemId)}>- <Heading size="h4" className="flex items-center gap-2">- {routeData?.consumableSummary?.readableIdWithRevision}- </Heading>- </Link>- <Copy- text={routeData?.consumableSummary?.readableIdWithRevision ?? ""}- />- {lifecycleStatus && (- <Status color={lifecycleStatus.color}>- {lifecycleStatus.label}- </Status>- )}- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "parts") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Consumable</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>- <VStack spacing={0} className="flex-shrink justify-center items-end">- <DetailsTopbar links={links} />- </VStack>- {deleteModal.isOpen && (- <ConfirmDelete- action={path.to.deleteItem(itemId)}- isOpen={deleteModal.isOpen}- name={- routeData?.consumableSummary?.readableIdWithRevision ??- "consumable"- }- text={t`Are you sure you want to delete ${routeData?.consumableSummary?.readableIdWithRevision}? This cannot be undone.`}- onCancel={() => {- deleteModal.onClose();- }}- onSubmit={() => {- deleteModal.onClose();- }}- />- )}- </div>+ <RecordHeader+ title={routeData?.consumableSummary?.readableIdWithRevision}+ titleTo={path.to.consumableDetails(itemId)}+ copyValue={routeData?.consumableSummary?.readableIdWithRevision ?? ""}+ menu={menuItems}+ status={statusPill}+ aside={<DetailsTopbar links={links} />}+ />+ {deleteModal.isOpen && (+ <ConfirmDelete+ action={path.to.deleteItem(itemId)}+ isOpen={deleteModal.isOpen}+ name={+ routeData?.consumableSummary?.readableIdWithRevision ?? "consumable"+ }+ text={t`Are you sure you want to delete ${routeData?.consumableSummary?.readableIdWithRevision}? This cannot be undone.`}+ onCancel={() => {+ deleteModal.onClose();+ }}+ onSubmit={() => {+ deleteModal.onClose();+ }}+ />+ )}{auditLogDrawer}</>);diff --git a/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx b/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsxindex 3d4875b6c2..362c8a2284 100644--- a/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx+++ b/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx@@ -138,6 +138,7 @@ const ConsumablesTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />,// The accessor is the raw item id — export the readable id// the cell shows instead of a UUID.@@ -158,6 +159,7 @@ const ConsumablesTable = memo(</div>),meta: {+ mobile: "P3",icon: <LuAlignJustify />}},@@ -208,6 +210,7 @@ const ConsumablesTable = memo(</VStack>),meta: {+ mobile: "P2",filter: {type: "static",options: methodType.map((value) => ({@@ -606,7 +609,12 @@ const ConsumablesTable = memo(primaryAction={permissions.can("create", "parts") && (<div className="flex items-center gap-2">- <Button variant="secondary" leftIcon={<LuGroup />} asChild>+ <Button+ variant="secondary"+ leftIcon={<LuGroup />}+ className="compact:hidden"+ asChild+ ><Link to={path.to.itemPostingGroups}><Trans>Item Groups</Trans></Link>diff --git a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsxindex 3969053a77..b477656176 100644--- a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx+++ b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx@@ -1268,8 +1268,9 @@ function makeItem(<Linkto={getLinkToItemDetails(material.itemType, material.itemId)}onClick={(e) => e.stopPropagation()}+ className="compact:hit-area">- <LuExternalLink className="h-4 w-4 opacity-0 group-hover:opacity-100" />+ <LuExternalLink className="h-4 w-4 opacity-0 group-hover:opacity-100 compact:opacity-100" /></Link>)}</div>@@ -1287,7 +1288,7 @@ function makeItem(material.item?.itemTrackingType ?? "") && (<Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary"><TrackingTypeIcontype={material.item?.itemTrackingType ?? ""}@@ -1309,7 +1310,7 @@ function makeItem()}<Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary"><MethodIcon type={material.methodType} isKit={material.kit} /></Badge>@@ -1327,7 +1328,7 @@ function makeItem({replenishmentSystem === "Buy and Make" && (<Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary"><SourcingTypeIcon type={material.sourcingType} /></Badge>@@ -1339,7 +1340,7 @@ function makeItem(<Badge variant="secondary">{material.quantity}</Badge><Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary"><MethodItemTypeIcon type={material.itemType} /></Badge>diff --git a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsxindex 8888c90177..823e30d84a 100644--- a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx+++ b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx@@ -816,11 +816,11 @@ const BillOfProcess = ({return (<Card><HStack className="justify-between">- <CardHeader>- <CardTitle className="flex flex-row items-center gap-2">+ <CardHeader className="compact:min-w-0">+ <CardTitle className="flex flex-row items-center gap-2 compact:flex compact:flex-wrap compact:gap-y-1"><Trans>Bill of Process</Trans>{itemName && (- <span className="text-xs text-muted-foreground font-normal">+ <span className="text-xs text-muted-foreground font-normal compact:order-last compact:min-w-0 compact:basis-full compact:truncate">{itemName}</span>)}@@ -1256,7 +1256,7 @@ function OperationForm({onChange={(newValue) => {setProcessData((d) => ({ ...d, description: newValue }));}}- className="col-span-2"+ className="col-span-2 compact:col-span-full"isConfigured={rulesByField.has(key("description"))}onConfigure={configurable && !temporaryItems[item.id]@@ -2249,7 +2249,10 @@ function AttributesForm({<Input name="name" label={t`Name`} /></div>- <VStack spacing={2} className="w-full col-span-2">+ <VStack+ spacing={2}+ className="w-full col-span-2 compact:col-span-full"+ ><Label>Description</Label><EditorinitialValue={description}@@ -2607,7 +2610,10 @@ function AttributesListItem({<Input name="name" label={t`Name`} /></div>- <VStack spacing={2} className="w-full col-span-2">+ <VStack+ spacing={2}+ className="w-full col-span-2 compact:col-span-full"+ ><Label>Description</Label><EditorinitialValue={description}diff --git a/apps/erp/app/modules/items/ui/Item/CustomerParts/CustomerParts.tsx b/apps/erp/app/modules/items/ui/Item/CustomerParts/CustomerParts.tsxindex d9a53823fd..882ed6075d 100644--- a/apps/erp/app/modules/items/ui/Item/CustomerParts/CustomerParts.tsx+++ b/apps/erp/app/modules/items/ui/Item/CustomerParts/CustomerParts.tsx@@ -25,6 +25,7 @@ import { Outlet, useNavigate } from "react-router";import { CustomerAvatar, New } from "~/components";import { EditableText } from "~/components/Editable";import Grid from "~/components/Grid";+import { NewPlacementContext } from "~/components/New";import { path } from "~/utils/path";import type { CustomerPart } from "../../../types";import useCustomerParts from "./useCustomerParts";@@ -121,7 +122,11 @@ const CustomerParts = ({ customerParts, itemId }: CustomerPartsProps) => {</CardTitle></CardHeader><CardAction>- {canEdit && <New to={path.to.newCustomerPart(itemId)} />}+ {canEdit && (+ <NewPlacementContext.Provider value="inline">+ <New to={path.to.newCustomerPart(itemId)} />+ </NewPlacementContext.Provider>+ )}</CardAction></HStack><CardContent>diff --git a/apps/erp/app/modules/items/ui/Item/FileBadge.tsx b/apps/erp/app/modules/items/ui/Item/FileBadge.tsxindex 82defa3af5..0a6817bc9a 100644--- a/apps/erp/app/modules/items/ui/Item/FileBadge.tsx+++ b/apps/erp/app/modules/items/ui/Item/FileBadge.tsx@@ -49,7 +49,7 @@ export function FileBadge({<LuDownloadonClick={() => download(file)}- className="cursor-pointer group-hover:opacity-100 opacity-0 transition-opacity duration-200 w-4 h-4 text-foreground"+ className="cursor-pointer group-hover:opacity-100 opacity-0 transition-opacity duration-200 w-4 h-4 text-foreground compact:opacity-100"/></HStack>);diff --git a/apps/erp/app/modules/items/ui/Item/ItemManufacturingForm.tsx b/apps/erp/app/modules/items/ui/Item/ItemManufacturingForm.tsxindex e31b9e3d8e..c3ba3d3baa 100644--- a/apps/erp/app/modules/items/ui/Item/ItemManufacturingForm.tsx+++ b/apps/erp/app/modules/items/ui/Item/ItemManufacturingForm.tsx@@ -87,7 +87,7 @@ const ItemManufacturingForm = ({termId="item-configured"bordereddescription={t`Part is configured for manufacturing`}- className="col-span-3"+ className="col-span-3 compact:col-span-1"/>)}<CustomFormFields table="partReplenishment" />diff --git a/apps/erp/app/modules/items/ui/Item/ItemPlanningForm.tsx b/apps/erp/app/modules/items/ui/Item/ItemPlanningForm.tsxindex 9b048f1b34..e5f717a446 100644--- a/apps/erp/app/modules/items/ui/Item/ItemPlanningForm.tsx+++ b/apps/erp/app/modules/items/ui/Item/ItemPlanningForm.tsx@@ -60,7 +60,7 @@ const ItemPlanningForm = ({validator={itemPlanningValidator}defaultValues={initialValues}>- <HStack className="w-full justify-between items-start">+ <HStack className="w-full justify-between items-start compact:items-center"><CardHeader><CardTitle><Trans>Planning</Trans>diff --git a/apps/erp/app/modules/items/ui/Item/PickMethodForm.tsx b/apps/erp/app/modules/items/ui/Item/PickMethodForm.tsxindex 12739f314e..70324c6411 100644--- a/apps/erp/app/modules/items/ui/Item/PickMethodForm.tsx+++ b/apps/erp/app/modules/items/ui/Item/PickMethodForm.tsx@@ -141,7 +141,7 @@ const PickMethodForm = ({validator={pickMethodWithShelfLifeValidator}defaultValues={initialValues}>- <HStack className="w-full justify-between items-start">+ <HStack className="w-full justify-between items-start compact:flex-wrap compact:gap-y-0 compact:items-center"><CardHeader><CardTitle><Trans>Inventory</Trans>diff --git a/apps/erp/app/modules/items/ui/Item/UsedIn.tsx b/apps/erp/app/modules/items/ui/Item/UsedIn.tsxindex e4ac7d4ebc..98d51c72cc 100644--- a/apps/erp/app/modules/items/ui/Item/UsedIn.tsx+++ b/apps/erp/app/modules/items/ui/Item/UsedIn.tsx@@ -403,7 +403,7 @@ export function RevisionsItem({variant="secondary"icon={<LuEllipsisVertical />}aria-label={t`Edit`}- className="absolute right-2 top-1 flex-shrink-0 opacity-0 group-hover/used-in:opacity-100 data-[state=open]:opacity-100"+ className="absolute right-2 top-1 flex-shrink-0 opacity-0 group-hover/used-in:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"/></DropdownMenuTrigger><DropdownMenuContent align="end">diff --git a/apps/erp/app/modules/items/ui/ItemPostingGroups/ItemPostingGroupsTable.tsx b/apps/erp/app/modules/items/ui/ItemPostingGroups/ItemPostingGroupsTable.tsxindex c5acb3a6b5..c46fa3a567 100644--- a/apps/erp/app/modules/items/ui/ItemPostingGroups/ItemPostingGroupsTable.tsx+++ b/apps/erp/app/modules/items/ui/ItemPostingGroups/ItemPostingGroupsTable.tsx@@ -46,12 +46,14 @@ const ItemGroupsTable = memo(({ data, count }: ItemGroupsTableProps) => {}className="cursor-pointer"/>- )+ ),+ meta: { mobile: "P1" }},{accessorKey: "description",header: t`Description`,- cell: (item) => item.getValue()+ cell: (item) => item.getValue(),+ meta: { mobile: "P3" }}];return [...defaultColumns, ...customColumns];diff --git a/apps/erp/app/modules/items/ui/MaterialDimensions/MaterialDimensionsTable.tsx b/apps/erp/app/modules/items/ui/MaterialDimensions/MaterialDimensionsTable.tsxindex 8d57426e6f..1c03629da6 100644--- a/apps/erp/app/modules/items/ui/MaterialDimensions/MaterialDimensionsTable.tsx+++ b/apps/erp/app/modules/items/ui/MaterialDimensions/MaterialDimensionsTable.tsx@@ -50,6 +50,7 @@ const MaterialDimensionsTable = memo(header: t`Shape`,cell: ({ row }) => <Enumerable value={row.original.formName} />,meta: {+ mobile: "P2",icon: <LuShapes />,filter: {type: "static",@@ -76,6 +77,7 @@ const MaterialDimensionsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuDessert />}},diff --git a/apps/erp/app/modules/items/ui/MaterialFinishes/MaterialFinishesTable.tsx b/apps/erp/app/modules/items/ui/MaterialFinishes/MaterialFinishesTable.tsxindex 453f7c3282..d6df35df74 100644--- a/apps/erp/app/modules/items/ui/MaterialFinishes/MaterialFinishesTable.tsx+++ b/apps/erp/app/modules/items/ui/MaterialFinishes/MaterialFinishesTable.tsx@@ -50,6 +50,7 @@ const MaterialFinishesTable = memo(header: t`Substance`,cell: ({ row }) => <Enumerable value={row.original.substanceName} />,meta: {+ mobile: "P2",icon: <LuGlassWater />,filter: {type: "static",@@ -76,6 +77,7 @@ const MaterialFinishesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuDessert />}},diff --git a/apps/erp/app/modules/items/ui/MaterialGrades/MaterialGradesTable.tsx b/apps/erp/app/modules/items/ui/MaterialGrades/MaterialGradesTable.tsxindex af4d6960ba..99e45d3bb9 100644--- a/apps/erp/app/modules/items/ui/MaterialGrades/MaterialGradesTable.tsx+++ b/apps/erp/app/modules/items/ui/MaterialGrades/MaterialGradesTable.tsx@@ -50,6 +50,7 @@ const MaterialGradesTable = memo(header: t`Substance`,cell: ({ row }) => <Enumerable value={row.original.substanceName} />,meta: {+ mobile: "P2",icon: <LuGlassWater />,filter: {type: "static",@@ -76,6 +77,7 @@ const MaterialGradesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBeef />}},diff --git a/apps/erp/app/modules/items/ui/MaterialShapes/MaterialShapesTable.tsx b/apps/erp/app/modules/items/ui/MaterialShapes/MaterialShapesTable.tsxindex b24cff8667..0b6be2fb57 100644--- a/apps/erp/app/modules/items/ui/MaterialShapes/MaterialShapesTable.tsx+++ b/apps/erp/app/modules/items/ui/MaterialShapes/MaterialShapesTable.tsx@@ -61,6 +61,7 @@ const MaterialShapesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -69,6 +70,7 @@ const MaterialShapesTable = memo(header: t`Code`,cell: ({ row }) => row.original.code,meta: {+ mobile: "P2",icon: <LuCode />}},diff --git a/apps/erp/app/modules/items/ui/MaterialSubstances/MaterialSubstanceTable.tsx b/apps/erp/app/modules/items/ui/MaterialSubstances/MaterialSubstanceTable.tsxindex bf6147f536..7f5c1c5029 100644--- a/apps/erp/app/modules/items/ui/MaterialSubstances/MaterialSubstanceTable.tsx+++ b/apps/erp/app/modules/items/ui/MaterialSubstances/MaterialSubstanceTable.tsx@@ -61,6 +61,7 @@ const MaterialSubstancesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -69,6 +70,7 @@ const MaterialSubstancesTable = memo(header: t`Code`,cell: ({ row }) => row.original.code,meta: {+ mobile: "P2",icon: <LuCode />}},diff --git a/apps/erp/app/modules/items/ui/MaterialTypes/MaterialTypesTable.tsx b/apps/erp/app/modules/items/ui/MaterialTypes/MaterialTypesTable.tsxindex 59da0f130f..6e722b212d 100644--- a/apps/erp/app/modules/items/ui/MaterialTypes/MaterialTypesTable.tsx+++ b/apps/erp/app/modules/items/ui/MaterialTypes/MaterialTypesTable.tsx@@ -52,6 +52,7 @@ const MaterialTypesTable = memo(({ data, count }: MaterialTypesTableProps) => {header: t`Substance`,cell: ({ row }) => <Enumerable value={row.original.substanceName} />,meta: {+ mobile: "P2",icon: <LuGlassWater />,filter: {type: "static",@@ -67,6 +68,7 @@ const MaterialTypesTable = memo(({ data, count }: MaterialTypesTableProps) => {header: t`Shape`,cell: ({ row }) => <Enumerable value={row.original.formName} />,meta: {+ mobile: "P2",icon: <LuShapes />,filter: {type: "static",@@ -93,6 +95,7 @@ const MaterialTypesTable = memo(({ data, count }: MaterialTypesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuTag />}},diff --git a/apps/erp/app/modules/items/ui/Materials/MaterialHeader.tsx b/apps/erp/app/modules/items/ui/Materials/MaterialHeader.tsxindex fb27f1d049..5dd2fc0c4e 100644--- a/apps/erp/app/modules/items/ui/Materials/MaterialHeader.tsx+++ b/apps/erp/app/modules/items/ui/Materials/MaterialHeader.tsx@@ -3,26 +3,19 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import {- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Status,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";-import { LuEllipsisVertical, LuTrash } from "react-icons/lu";-import { Link, useParams } from "react-router";+import { LuTrash } from "react-icons/lu";+import { useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";import { DetailsTopbar } from "~/components/Layout";+import { RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";import { useResolved } from "~/hooks/useResolved";@@ -63,75 +56,53 @@ const MaterialHeader = () => {supersession?.supersessionMode);+ const statusPill = lifecycleStatus && (+ <Status color={lifecycleStatus.color}>{lifecycleStatus.label}</Status>+ );+ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "parts") || !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Material</Trans>+ </DropdownMenuItem>+ </>+ );+return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0} className="flex-grow">- <HStack>- <Link to={path.to.materialDetails(itemId)}>- <Heading size="h4" className="flex items-center gap-2">- {/* <ModuleIcon icon={<MethodItemTypeIcon type="Material" />} /> */}- <span>- {routeData?.materialSummary?.readableIdWithRevision}- </span>- </Heading>- </Link>- <Copy- text={routeData?.materialSummary?.readableIdWithRevision ?? ""}- />- {lifecycleStatus && (- <Status color={lifecycleStatus.color}>- {lifecycleStatus.label}- </Status>- )}- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "parts") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Material</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>- <VStack spacing={0} className="flex-shrink justify-center items-end">- <DetailsTopbar links={links} />- </VStack>- {deleteModal.isOpen && (- <ConfirmDelete- action={path.to.deleteItem(itemId)}- isOpen={deleteModal.isOpen}- name={- routeData?.materialSummary?.readableIdWithRevision ?? "material"- }- text={t`Are you sure you want to delete ${routeData?.materialSummary?.readableIdWithRevision}? This cannot be undone.`}- onCancel={() => {- deleteModal.onClose();- }}- onSubmit={() => {- deleteModal.onClose();- }}- />- )}- </div>+ <RecordHeader+ title={routeData?.materialSummary?.readableIdWithRevision}+ titleTo={path.to.materialDetails(itemId)}+ copyValue={routeData?.materialSummary?.readableIdWithRevision ?? ""}+ menu={menuItems}+ status={statusPill}+ aside={<DetailsTopbar links={links} />}+ />+ {deleteModal.isOpen && (+ <ConfirmDelete+ action={path.to.deleteItem(itemId)}+ isOpen={deleteModal.isOpen}+ name={+ routeData?.materialSummary?.readableIdWithRevision ?? "material"+ }+ text={t`Are you sure you want to delete ${routeData?.materialSummary?.readableIdWithRevision}? This cannot be undone.`}+ onCancel={() => {+ deleteModal.onClose();+ }}+ onSubmit={() => {+ deleteModal.onClose();+ }}+ />+ )}{auditLogDrawer}</>);diff --git a/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx b/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsxindex 9fd8c8e3c1..25665c3b58 100644--- a/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx+++ b/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx@@ -156,6 +156,7 @@ const MaterialsTable = memo(({ data, tags, count }: MaterialsTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />,// The accessor is the raw item id — export the readable id// the cell shows instead of a UUID.@@ -176,6 +177,7 @@ const MaterialsTable = memo(({ data, tags, count }: MaterialsTableProps) => {</div>),meta: {+ mobile: "P3",icon: <LuAlignJustify />}},@@ -186,6 +188,8 @@ const MaterialsTable = memo(({ data, tags, count }: MaterialsTableProps) => {<Enumerable value={row.original.materialSubstance} />),meta: {+ mobile: "P2",+ mobilePill: true,filter: {type: "fetcher",endpoint: path.to.api.materialSubstances,@@ -757,7 +761,12 @@ const MaterialsTable = memo(({ data, tags, count }: MaterialsTableProps) => {primaryAction={permissions.can("create", "parts") && (<div className="flex items-center gap-2">- <Button variant="secondary" leftIcon={<LuGroup />} asChild>+ <Button+ variant="secondary"+ leftIcon={<LuGroup />}+ className="compact:hidden"+ asChild+ ><Link to={path.to.itemPostingGroups}><Trans>Item Groups</Trans></Link>diff --git a/apps/erp/app/modules/items/ui/Methods/MethodMaterialsTable.tsx b/apps/erp/app/modules/items/ui/Methods/MethodMaterialsTable.tsxindex b78b800518..160f1883d1 100644--- a/apps/erp/app/modules/items/ui/Methods/MethodMaterialsTable.tsx+++ b/apps/erp/app/modules/items/ui/Methods/MethodMaterialsTable.tsx@@ -45,13 +45,15 @@ const MethodMaterialsTable = memo({row.original.makeMethod?.item?.readableIdWithRevision}</Hyperlink></HStack>- )+ ),+ meta: { mobile: "P1" }},{accessorKey: "itemReadableIdWithRevision",header: t`Material ID`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",filter: {type: "static",options: items?.map((item) => ({@@ -131,7 +133,8 @@ const MethodMaterialsTable = memo({accessorKey: "quantity",header: t`Qty. per Parent`,- cell: (item) => item.getValue()+ cell: (item) => item.getValue(),+ meta: { mobile: "P2" }}];}, [items, t]);diff --git a/apps/erp/app/modules/items/ui/Methods/MethodOperationsTable.tsx b/apps/erp/app/modules/items/ui/Methods/MethodOperationsTable.tsxindex 7b29987053..b84b07ce68 100644--- a/apps/erp/app/modules/items/ui/Methods/MethodOperationsTable.tsx+++ b/apps/erp/app/modules/items/ui/Methods/MethodOperationsTable.tsx@@ -43,7 +43,8 @@ const MethodOperationsTable = memo(>{row.original.description}</Hyperlink>- )+ ),+ meta: { mobile: "P1" }},{accessorKey: "makeMethod.item.readableIdWithRevision",@@ -52,6 +53,7 @@ const MethodOperationsTable = memo(return row.original.makeMethod?.item?.readableIdWithRevision;},meta: {+ mobile: "P3",filter: {type: "static",options: items?.map((item) => ({@@ -68,6 +70,7 @@ const MethodOperationsTable = memo(<Enumerable value={item.getValue<string>() ?? null} />),meta: {+ mobile: "P2",filter: {type: "static",options: operationTypes.map((value) => ({diff --git a/apps/erp/app/modules/items/ui/Parts/PartHeader.tsx b/apps/erp/app/modules/items/ui/Parts/PartHeader.tsxindex a77558da66..edb41a33ab 100644--- a/apps/erp/app/modules/items/ui/Parts/PartHeader.tsx+++ b/apps/erp/app/modules/items/ui/Parts/PartHeader.tsx@@ -3,30 +3,19 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import {- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Status,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";-import {- LuEllipsisVertical,- LuGitPullRequestArrow,- LuTrash-} from "react-icons/lu";-import { Link, useParams } from "react-router";+import { LuGitPullRequestArrow, LuTrash } from "react-icons/lu";+import { useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";import { DetailsTopbar } from "~/components/Layout";+import { RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";import { useResolved } from "~/hooks/useResolved";@@ -69,77 +58,59 @@ const PartHeader = () => {supersession?.supersessionMode);+ const statusPill = lifecycleStatus && (+ <Status color={lifecycleStatus.color}>{lifecycleStatus.label}</Status>+ );+ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={!permissions.can("create", "parts")}+ onClick={changeNoticeModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuGitPullRequestArrow />} />+ <Trans>Create Change Notice</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "parts") || !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Part</Trans>+ </DropdownMenuItem>+ </>+ );+return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0} className="flex-grow">- <HStack>- <Link to={path.to.partDetails(itemId)}>- <Heading size="h4" className="flex items-center gap-2">- {/* <ModuleIcon icon={<MethodItemTypeIcon type="Part" />} /> */}- <span>{routeData?.partSummary?.readableIdWithRevision}</span>- </Heading>- </Link>- <Copy text={routeData?.partSummary?.readableIdWithRevision ?? ""} />- {lifecycleStatus && (- <Status color={lifecycleStatus.color}>- {lifecycleStatus.label}- </Status>- )}- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- size="sm"- variant="secondary"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={!permissions.can("create", "parts")}- onClick={changeNoticeModal.onOpen}- >- <DropdownMenuIcon icon={<LuGitPullRequestArrow />} />- <Trans>Create Change Notice</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "parts") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Part</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>- <VStack spacing={0} className="flex-shrink justify-center items-end">- <DetailsTopbar links={links} />- </VStack>- {deleteModal.isOpen && (- <ConfirmDelete- action={path.to.deleteItem(itemId)}- isOpen={deleteModal.isOpen}- name={routeData?.partSummary?.readableIdWithRevision ?? "part"}- text={t`Are you sure you want to delete ${routeData?.partSummary?.readableIdWithRevision}? This cannot be undone.`}- onCancel={() => {- deleteModal.onClose();- }}- onSubmit={() => {- deleteModal.onClose();- }}- />- )}- </div>+ <RecordHeader+ title={routeData?.partSummary?.readableIdWithRevision}+ titleTo={path.to.partDetails(itemId)}+ copyValue={routeData?.partSummary?.readableIdWithRevision ?? ""}+ menu={menuItems}+ status={statusPill}+ aside={<DetailsTopbar links={links} />}+ />+ {deleteModal.isOpen && (+ <ConfirmDelete+ action={path.to.deleteItem(itemId)}+ isOpen={deleteModal.isOpen}+ name={routeData?.partSummary?.readableIdWithRevision ?? "part"}+ text={t`Are you sure you want to delete ${routeData?.partSummary?.readableIdWithRevision}? This cannot be undone.`}+ onCancel={() => {+ deleteModal.onClose();+ }}+ onSubmit={() => {+ deleteModal.onClose();+ }}+ />+ )}{changeNoticeModal.isOpen && (<CreateChangeNoticeModalitemId={itemId}diff --git a/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx b/apps/erp/app/modules/items/ui/Parts/PartProperties.tsxindex c179fb4e64..3b9007cf78 100644--- a/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx+++ b/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx@@ -295,7 +295,7 @@ const PartProperties = ({<LuMove3D className="w-3 h-3 mr-1 text-emerald-500" /><Trans>3D Model</Trans></Badge>- <span className="group-hover:opacity-100 opacity-0 transition-opacity duration-200 w-4 h-4 text-foreground">+ <span className="group-hover:opacity-100 opacity-0 transition-opacity duration-200 w-4 h-4 text-foreground compact:opacity-100"><LuExternalLink /></span></Link>diff --git a/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx b/apps/erp/app/modules/items/ui/Parts/PartsTable.tsxindex e01433ead5..13d7cc5d1a 100644--- a/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx+++ b/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx@@ -151,6 +151,7 @@ const PartsTable = memo(({ data, tags, count }: PartsTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />,// The accessor is the raw item id — export the bare part number// (no revision suffix; the Revision column carries that) so the@@ -184,6 +185,7 @@ const PartsTable = memo(({ data, tags, count }: PartsTableProps) => {</div>),meta: {+ mobile: "P3",icon: <LuAlignJustify />}},@@ -226,6 +228,7 @@ const PartsTable = memo(({ data, tags, count }: PartsTableProps) => {</Badge>),meta: {+ mobile: "P2",filter: {type: "static",options: itemReplenishmentSystems.map((type) => ({@@ -726,7 +729,12 @@ const PartsTable = memo(({ data, tags, count }: PartsTableProps) => {primaryAction={permissions.can("create", "parts") && (<div className="flex items-center gap-2">- <Button variant="secondary" leftIcon={<LuGroup />} asChild>+ <Button+ variant="secondary"+ leftIcon={<LuGroup />}+ className="compact:hidden"+ asChild+ ><Link to={path.to.itemPostingGroups}><Trans>Item Groups</Trans></Link>diff --git a/apps/erp/app/modules/items/ui/Services/ServiceHeader.tsx b/apps/erp/app/modules/items/ui/Services/ServiceHeader.tsxindex 58240fd466..fe42ed72f2 100644--- a/apps/erp/app/modules/items/ui/Services/ServiceHeader.tsx+++ b/apps/erp/app/modules/items/ui/Services/ServiceHeader.tsx@@ -3,26 +3,19 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import {- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Status,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";-import { LuEllipsisVertical, LuTrash } from "react-icons/lu";-import { Link, useParams } from "react-router";+import { LuTrash } from "react-icons/lu";+import { useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";import { DetailsTopbar } from "~/components/Layout";+import { RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";import { useResolved } from "~/hooks/useResolved";@@ -63,72 +56,51 @@ const ServiceHeader = () => {supersession?.supersessionMode);+ const statusPill = lifecycleStatus && (+ <Status color={lifecycleStatus.color}>{lifecycleStatus.label}</Status>+ );+ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "parts") || !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Service</Trans>+ </DropdownMenuItem>+ </>+ );+return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0} className="flex-grow">- <HStack>- <Link to={path.to.serviceDetails(itemId)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.serviceSummary?.readableIdWithRevision}</span>- </Heading>- </Link>- <Copy- text={routeData?.serviceSummary?.readableIdWithRevision ?? ""}- />- {lifecycleStatus && (- <Status color={lifecycleStatus.color}>- {lifecycleStatus.label}- </Status>- )}- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "parts") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Service</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>- <VStack spacing={0} className="flex-shrink justify-center items-end">- <DetailsTopbar links={links} />- </VStack>- {deleteModal.isOpen && (- <ConfirmDelete- action={path.to.deleteItem(itemId)}- isOpen={deleteModal.isOpen}- name={- routeData?.serviceSummary?.readableIdWithRevision ?? "service"- }- text={t`Are you sure you want to delete ${routeData?.serviceSummary?.readableIdWithRevision}? This cannot be undone.`}- onCancel={() => {- deleteModal.onClose();- }}- onSubmit={() => {- deleteModal.onClose();- }}- />- )}- </div>+ <RecordHeader+ title={routeData?.serviceSummary?.readableIdWithRevision}+ titleTo={path.to.serviceDetails(itemId)}+ copyValue={routeData?.serviceSummary?.readableIdWithRevision ?? ""}+ menu={menuItems}+ status={statusPill}+ aside={<DetailsTopbar links={links} />}+ />+ {deleteModal.isOpen && (+ <ConfirmDelete+ action={path.to.deleteItem(itemId)}+ isOpen={deleteModal.isOpen}+ name={routeData?.serviceSummary?.readableIdWithRevision ?? "service"}+ text={t`Are you sure you want to delete ${routeData?.serviceSummary?.readableIdWithRevision}? This cannot be undone.`}+ onCancel={() => {+ deleteModal.onClose();+ }}+ onSubmit={() => {+ deleteModal.onClose();+ }}+ />+ )}{auditLogDrawer}</>);diff --git a/apps/erp/app/modules/items/ui/Services/ServicesTable.tsx b/apps/erp/app/modules/items/ui/Services/ServicesTable.tsxindex bd86db2762..25a92558ac 100644--- a/apps/erp/app/modules/items/ui/Services/ServicesTable.tsx+++ b/apps/erp/app/modules/items/ui/Services/ServicesTable.tsx@@ -136,6 +136,7 @@ const ServicesTable = memo(({ data, tags, count }: ServicesTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />,// The accessor is the raw item id — export the readable id// the cell shows instead of a UUID.@@ -156,6 +157,7 @@ const ServicesTable = memo(({ data, tags, count }: ServicesTableProps) => {</div>),meta: {+ mobile: "P3",icon: <LuAlignJustify />}},@@ -194,6 +196,7 @@ const ServicesTable = memo(({ data, tags, count }: ServicesTableProps) => {</Badge>),meta: {+ mobile: "P2",filter: {type: "static",options: serviceReplenishmentSystems.map((type) => ({@@ -566,7 +569,12 @@ const ServicesTable = memo(({ data, tags, count }: ServicesTableProps) => {primaryAction={permissions.can("create", "parts") && (<div className="flex items-center gap-2">- <Button variant="secondary" leftIcon={<LuGroup />} asChild>+ <Button+ variant="secondary"+ leftIcon={<LuGroup />}+ className="compact:hidden"+ asChild+ ><Link to={path.to.itemPostingGroups}><Trans>Item Groups</Trans></Link>diff --git a/apps/erp/app/modules/items/ui/Tools/ToolHeader.tsx b/apps/erp/app/modules/items/ui/Tools/ToolHeader.tsxindex f12e550893..e1e062553e 100644--- a/apps/erp/app/modules/items/ui/Tools/ToolHeader.tsx+++ b/apps/erp/app/modules/items/ui/Tools/ToolHeader.tsx@@ -3,30 +3,19 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import {- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Status,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";-import {- LuEllipsisVertical,- LuGitPullRequestArrow,- LuTrash-} from "react-icons/lu";-import { Link, useParams } from "react-router";+import { LuGitPullRequestArrow, LuTrash } from "react-icons/lu";+import { useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";import { DetailsTopbar } from "~/components/Layout";+import { RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";import { useResolved } from "~/hooks/useResolved";@@ -69,77 +58,59 @@ const ToolHeader = () => {supersession?.supersessionMode);+ const statusPill = lifecycleStatus && (+ <Status color={lifecycleStatus.color}>{lifecycleStatus.label}</Status>+ );+ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={!permissions.can("create", "parts")}+ onClick={changeNoticeModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuGitPullRequestArrow />} />+ <Trans>Create Change Notice</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "parts") || !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Tool</Trans>+ </DropdownMenuItem>+ </>+ );+return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0} className="flex-grow">- <HStack>- <Link to={path.to.toolDetails(itemId)}>- <Heading size="h4" className="flex items-center gap-2">- {/* <ModuleIcon icon={<MethodItemTypeIcon type="Tool" />} /> */}- <span>{routeData?.toolSummary?.readableIdWithRevision}</span>- </Heading>- </Link>- <Copy text={routeData?.toolSummary?.readableIdWithRevision ?? ""} />- {lifecycleStatus && (- <Status color={lifecycleStatus.color}>- {lifecycleStatus.label}- </Status>- )}- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={!permissions.can("create", "parts")}- onClick={changeNoticeModal.onOpen}- >- <DropdownMenuIcon icon={<LuGitPullRequestArrow />} />- <Trans>Create Change Notice</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "parts") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Tool</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>- <VStack spacing={0} className="flex-shrink justify-center items-end">- <DetailsTopbar links={links} />- </VStack>- {deleteModal.isOpen && (- <ConfirmDelete- action={path.to.deleteItem(itemId)}- isOpen={deleteModal.isOpen}- name={routeData?.toolSummary?.readableIdWithRevision ?? "tool"}- text={t`Are you sure you want to delete ${routeData?.toolSummary?.readableIdWithRevision}? This cannot be undone.`}- onCancel={() => {- deleteModal.onClose();- }}- onSubmit={() => {- deleteModal.onClose();- }}- />- )}- </div>+ <RecordHeader+ title={routeData?.toolSummary?.readableIdWithRevision}+ titleTo={path.to.toolDetails(itemId)}+ copyValue={routeData?.toolSummary?.readableIdWithRevision ?? ""}+ menu={menuItems}+ status={statusPill}+ aside={<DetailsTopbar links={links} />}+ />+ {deleteModal.isOpen && (+ <ConfirmDelete+ action={path.to.deleteItem(itemId)}+ isOpen={deleteModal.isOpen}+ name={routeData?.toolSummary?.readableIdWithRevision ?? "tool"}+ text={t`Are you sure you want to delete ${routeData?.toolSummary?.readableIdWithRevision}? This cannot be undone.`}+ onCancel={() => {+ deleteModal.onClose();+ }}+ onSubmit={() => {+ deleteModal.onClose();+ }}+ />+ )}{changeNoticeModal.isOpen && (<CreateChangeNoticeModalitemId={itemId}diff --git a/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx b/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsxindex 5fab082a2c..135476c61e 100644--- a/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx+++ b/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx@@ -151,6 +151,7 @@ const ToolsTable = memo(({ data, tags, count }: ToolsTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />,// The accessor is the raw item id — export the readable id// the cell shows instead of a UUID.@@ -171,6 +172,7 @@ const ToolsTable = memo(({ data, tags, count }: ToolsTableProps) => {</div>),meta: {+ mobile: "P3",icon: <LuAlignJustify />}},@@ -209,6 +211,7 @@ const ToolsTable = memo(({ data, tags, count }: ToolsTableProps) => {</Badge>),meta: {+ mobile: "P2",filter: {type: "static",options: itemReplenishmentSystems.map((type) => ({@@ -684,7 +687,12 @@ const ToolsTable = memo(({ data, tags, count }: ToolsTableProps) => {primaryAction={permissions.can("create", "parts") && (<div className="flex items-center gap-2">- <Button variant="secondary" leftIcon={<LuGroup />} asChild>+ <Button+ variant="secondary"+ leftIcon={<LuGroup />}+ className="compact:hidden"+ asChild+ ><Link to={path.to.itemPostingGroups}><Trans>Item Groups</Trans></Link>diff --git a/apps/erp/app/modules/items/ui/UnitOfMeasure/UnitOfMeasuresTable.tsx b/apps/erp/app/modules/items/ui/UnitOfMeasure/UnitOfMeasuresTable.tsxindex 3e9eeee8a1..0e6994634c 100644--- a/apps/erp/app/modules/items/ui/UnitOfMeasure/UnitOfMeasuresTable.tsx+++ b/apps/erp/app/modules/items/ui/UnitOfMeasure/UnitOfMeasuresTable.tsx@@ -39,6 +39,7 @@ const UnitOfMeasuresTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -47,6 +48,7 @@ const UnitOfMeasuresTable = memo(header: t`Code`,cell: (item) => item.getValue(),meta: {+ mobile: "P2",icon: <LuCode />}}diff --git a/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx b/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsxindex 621df7c165..43b9f3f63a 100644--- a/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx+++ b/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx@@ -55,6 +55,7 @@ const AttributeCategoriesTable = memo({accessorKey: "name",header: t`Category`,+ meta: { mobile: "P1" },cell: ({ row }) => (<Hyperlink to={row.original.id} className="flex items-center gap-2">{row.original.emoji ? (@@ -68,6 +69,7 @@ const AttributeCategoriesTable = memo(},{header: t`Attributes`,+ meta: { mobile: "P3" },cell: ({ row }) => (<HStack className="text-xs text-muted-foreground"><LuListChecks />@@ -77,9 +79,12 @@ const AttributeCategoriesTable = memo(: 0}{" "}<Trans>Attributes</Trans></span>+ {/* Phones: line 2 sits under the row link, so this button is+ hidden; the row menu's View Attributes opens the same list. */}<Buttonvariant="secondary"size="sm"+ className="compact:hidden"onClick={() => {navigate(`${path.to.attributeCategoryList(@@ -105,6 +110,7 @@ const AttributeCategoriesTable = memo();},meta: {+ mobile: "P2",filter: {type: "static",options: [diff --git a/apps/erp/app/modules/people/ui/Attributes/AttributeCategoryDetail.tsx b/apps/erp/app/modules/people/ui/Attributes/AttributeCategoryDetail.tsxindex ca5e334e2e..a76ce474f3 100644--- a/apps/erp/app/modules/people/ui/Attributes/AttributeCategoryDetail.tsx+++ b/apps/erp/app/modules/people/ui/Attributes/AttributeCategoryDetail.tsx@@ -32,6 +32,7 @@ import { LuGripVertical, LuPencil, LuTrash } from "react-icons/lu";import { Link, useFetcher } from "react-router";import { New } from "~/components";import { ConfirmDelete } from "~/components/Modals";+import { NewPlacementContext } from "~/components/New";import { useUrlParams } from "~/hooks";import { path } from "~/utils/path";@@ -218,7 +219,10 @@ const AttributeCategoryDetail = ({)}</DrawerBody><DrawerFooter>- <New to={`new?${params.toString()}`} label={t`Attribute`} />+ {/* Inline on phones too: the app bar sits under this drawer. */}+ <NewPlacementContext.Provider value="inline">+ <New to={`new?${params.toString()}`} label={t`Attribute`} />+ </NewPlacementContext.Provider></DrawerFooter></DrawerContent></Drawer>diff --git a/apps/erp/app/modules/people/ui/Contact/ContactTable.tsx b/apps/erp/app/modules/people/ui/Contact/ContactTable.tsxindex 0faa0a37e6..37251d600c 100644--- a/apps/erp/app/modules/people/ui/Contact/ContactTable.tsx+++ b/apps/erp/app/modules/people/ui/Contact/ContactTable.tsx@@ -23,6 +23,7 @@ const ContactTable = memo(({ data, count }: ContactTableProps) => {header: t`First Name`,cell: (item) => item.getValue(),meta: {+ mobile: "P1",icon: <LuUser />}},@@ -39,6 +40,7 @@ const ContactTable = memo(({ data, count }: ContactTableProps) => {header: t`Email`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",icon: <LuMail />}},diff --git a/apps/erp/app/modules/people/ui/Departments/DepartmentNode.tsx b/apps/erp/app/modules/people/ui/Departments/DepartmentNode.tsxindex a18eb6945a..40d5dbbace 100644--- a/apps/erp/app/modules/people/ui/Departments/DepartmentNode.tsx+++ b/apps/erp/app/modules/people/ui/Departments/DepartmentNode.tsx@@ -7,7 +7,8 @@ import {DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,- MENU_ITEM_SHORTCUTS+ MENU_ITEM_SHORTCUTS,+ useCompact} from "@carbon/react";import { Handle, type NodeProps, Position } from "@xyflow/react";import { memo } from "react";@@ -31,12 +32,14 @@ function DepartmentNodeComponent({data}: NodeProps & { data: DepartmentNodeData }) {const { department, onEdit, onDelete, onAddChild } = data;+ // Phones lay the tree out left-to-right, so edges attach at the sides.+ const isCompact = useCompact();return (<div className="group relative"><Handletype="target"- position={Position.Top}+ position={isCompact ? Position.Left : Position.Top}className="!bg-transparent !border-0 !w-px !h-px !min-w-0 !min-h-0"/>@@ -57,7 +60,7 @@ function DepartmentNodeComponent({<DropdownMenu><DropdownMenuTrigger asChild><button- className="ml-auto shrink-0 rounded-md p-1 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 focus:opacity-100"+ className="ml-auto shrink-0 rounded-md p-1 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 focus:opacity-100 compact:opacity-100 compact:hit-area"aria-label="Actions"><LuEllipsisVertical className="size-3.5 text-muted-foreground" />@@ -89,7 +92,7 @@ function DepartmentNodeComponent({<Handletype="source"- position={Position.Bottom}+ position={isCompact ? Position.Right : Position.Bottom}className="!bg-transparent !border-0 !w-px !h-px !min-w-0 !min-h-0"/></div>diff --git a/apps/erp/app/modules/people/ui/Departments/DepartmentsTable.tsx b/apps/erp/app/modules/people/ui/Departments/DepartmentsTable.tsxindex 0a2db8fafe..3c587a6f38 100644--- a/apps/erp/app/modules/people/ui/Departments/DepartmentsTable.tsx+++ b/apps/erp/app/modules/people/ui/Departments/DepartmentsTable.tsx@@ -47,6 +47,7 @@ const DepartmentsTable = memo(({ data, count }: DepartmentsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBuilding />}},@@ -61,6 +62,7 @@ const DepartmentsTable = memo(({ data, count }: DepartmentsTableProps) => {</HStack>),meta: {+ mobile: "P3",icon: <LuBuilding />}}diff --git a/apps/erp/app/modules/people/ui/Departments/DepartmentsTreeView.tsx b/apps/erp/app/modules/people/ui/Departments/DepartmentsTreeView.tsxindex f31b938576..cadf60c7bb 100644--- a/apps/erp/app/modules/people/ui/Departments/DepartmentsTreeView.tsx+++ b/apps/erp/app/modules/people/ui/Departments/DepartmentsTreeView.tsx@@ -2,6 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.+import { useCompact } from "@carbon/react";import {Background,BackgroundVariant,@@ -37,6 +38,7 @@ export function DepartmentsTreeView({onDelete,onAddChild}: DepartmentsTreeViewProps) {+ const isCompact = useCompact();const { initialNodes, initialEdges } = useMemo(() => {const nodes: Node[] = departments.map((department) => ({id: department.id!,@@ -64,11 +66,13 @@ export function DepartmentsTreeView({const { nodes: layoutedNodes, edges: layoutedEdges } = getLayoutedElements(nodes,edges,- "TB"+ // Phones: sibling departments stack vertically and children branch+ // sideways, so every root fits the narrow canvas.+ isCompact ? "LR" : "TB");return { initialNodes: layoutedNodes, initialEdges: layoutedEdges };- }, [departments, onEdit, onDelete, onAddChild]);+ }, [departments, onEdit, onDelete, onAddChild, isCompact]);const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);@@ -79,7 +83,7 @@ export function DepartmentsTreeView({}, [initialNodes, initialEdges, setNodes, setEdges]);return (- <div className="h-[calc(100dvh-(var(--header-height))-61px)] w-full overflow-hidden bg-card">+ <div className="h-[calc(100dvh-(var(--header-height))-61px)] w-full overflow-hidden compact:h-[calc(100dvh-var(--topbar-height)-var(--content-inset,0px)-61px)] bg-card"><ReactFlownodes={nodes}edges={edges}@@ -91,7 +95,8 @@ export function DepartmentsTreeView({fitViewOptions={{padding: 0.3,maxZoom: 1.2,- minZoom: 0.3+ // Phones: never fit below a readable size; the user pans instead.+ minZoom: isCompact ? 0.75 : 0.3}}nodesDraggable={false}nodesConnectable={false}@@ -104,7 +109,7 @@ export function DepartmentsTreeView({><ControlsshowInteractive={false}- className="!bg-card !border-border !shadow-sm [&>button]:!bg-card [&>button]:!border-border [&>button]:!text-foreground [&>button:hover]:!bg-accent"+ className="!bg-card !border-border !shadow-sm compact:!left-auto compact:!right-0 compact:[&>button]:!size-11 [&>button]:!bg-card [&>button]:!border-border [&>button]:!text-foreground [&>button:hover]:!bg-accent"/><Backgroundvariant={BackgroundVariant.Dots}diff --git a/apps/erp/app/modules/people/ui/Holidays/HolidaysTable.tsx b/apps/erp/app/modules/people/ui/Holidays/HolidaysTable.tsxindex e2bc2d30cd..1e0913a655 100644--- a/apps/erp/app/modules/people/ui/Holidays/HolidaysTable.tsx+++ b/apps/erp/app/modules/people/ui/Holidays/HolidaysTable.tsx@@ -41,6 +41,7 @@ const HolidaysTable = memo(({ data, count, years }: HolidaysTableProps) => {<Hyperlink to={row.original.id}>{row.original.name}</Hyperlink>),meta: {+ mobile: "P1",icon: <LuCalendar />}},@@ -68,6 +69,7 @@ const HolidaysTable = memo(({ data, count, years }: HolidaysTableProps) => {<DateTime value={item.getValue<string>()} variant="date" />),meta: {+ mobile: "P2",icon: <LuCalendarDays />}}diff --git a/apps/erp/app/modules/people/ui/People/PeopleTable.tsx b/apps/erp/app/modules/people/ui/People/PeopleTable.tsxindex 7265f45d99..3d43076e30 100644--- a/apps/erp/app/modules/people/ui/People/PeopleTable.tsx+++ b/apps/erp/app/modules/people/ui/People/PeopleTable.tsx@@ -134,6 +134,7 @@ const PeopleTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuUsers />}},@@ -159,6 +160,7 @@ const PeopleTable = memo(header: t`Email`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",icon: <LuMail />}},@@ -228,6 +230,7 @@ const PeopleTable = memo(return <Badge variant="secondary">{t`Inactive`}</Badge>;},meta: {+ mobile: "P2",filter: {type: "static",options: [diff --git a/apps/erp/app/modules/people/ui/Person/PersonAbilities.tsx b/apps/erp/app/modules/people/ui/Person/PersonAbilities.tsxindex c1bf7e0772..3fd74ce8ea 100644--- a/apps/erp/app/modules/people/ui/Person/PersonAbilities.tsx+++ b/apps/erp/app/modules/people/ui/Person/PersonAbilities.tsx@@ -71,15 +71,18 @@ const PersonAbilities = ({ personId, abilities }: PersonAbilitiesProps) => {return (<li key={employeeAbility.id}><HStack className="w-full justify-between">- <HStack spacing={2}>- <Link className="font-medium" to={editPath}>+ <HStack spacing={2} className="compact:min-w-0">+ <Link+ className="font-medium compact:block compact:min-w-0 compact:truncate compact:leading-[2.75rem]"+ to={editPath}+ >{process?.name}</Link><EmployeeAbilityStatusemployeeAbility={employeeAbility}/></HStack>- <HStack spacing={2}>+ <HStack spacing={2} className="compact:shrink-0"><p className="text-sm text-muted-foreground"><DateTimevalue={employeeAbility.lastTrainingDate}diff --git a/apps/erp/app/modules/people/ui/Person/PersonPreview.tsx b/apps/erp/app/modules/people/ui/Person/PersonPreview.tsxindex b4c5ce59b1..d4bf871f6d 100644--- a/apps/erp/app/modules/people/ui/Person/PersonPreview.tsx+++ b/apps/erp/app/modules/people/ui/Person/PersonPreview.tsx@@ -13,6 +13,7 @@ import {CardHeader,CardTitle,HStack,+ useCompact,useDisclosure} from "@carbon/react";import { Trans } from "@lingui/react/macro";@@ -31,6 +32,7 @@ const PersonHeader = () => {const { company } = useUser();const auditDrawer = useDisclosure();+ const isCompact = useCompact();const routeData = useRouteData<{ employeeSummary: EmployeeSummary }>(path.to.person(personId));@@ -78,7 +80,8 @@ const PersonHeader = () => {<Trans>Manager</Trans></CardAttributeLabel><CardAttributeValue>- {routeData?.employeeSummary?.managerName}+ {routeData?.employeeSummary?.managerName ||+ (isCompact ? "—" : null)}</CardAttributeValue></CardAttribute><CardAttribute>diff --git a/apps/erp/app/modules/people/ui/Shifts/ShiftForm.tsx b/apps/erp/app/modules/people/ui/Shifts/ShiftForm.tsxindex db47f2a2d7..742844aa8b 100644--- a/apps/erp/app/modules/people/ui/Shifts/ShiftForm.tsx+++ b/apps/erp/app/modules/people/ui/Shifts/ShiftForm.tsx@@ -81,7 +81,8 @@ const ShiftForm = ({ initialValues }: ShiftFormProps) => {<FormLabel><Trans>Days</Trans></FormLabel>- <VStack>+ {/* Phones: the day names read as row labels, not helper text. */}+ <VStack className="compact:[&_p]:text-sm compact:[&_p]:text-foreground"><Boolean name="monday" description={t`Monday`} bordered /><Boolean name="tuesday" description={t`Tuesday`} bordered /><Booleandiff --git a/apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx b/apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsxindex 87097752f5..7ce64cb464 100644--- a/apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx+++ b/apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx@@ -2,7 +2,13 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { Badge, MENU_ITEM_SHORTCUTS, MenuIcon, MenuItem } from "@carbon/react";+import {+ Badge,+ MENU_ITEM_SHORTCUTS,+ MenuIcon,+ MenuItem,+ useCompact+} from "@carbon/react";import { formatTimeOfDay } from "@carbon/utils";import {parseTime,@@ -40,6 +46,7 @@ type ShiftsTableProps = {const ShiftsTable = memo(({ data, count, locations }: ShiftsTableProps) => {const { t } = useLingui();const { locale } = useLocale();+ const isCompact = useCompact();const navigate = useNavigate();const permissions = usePermissions();const [params] = useUrlParams();@@ -110,6 +117,7 @@ const ShiftsTable = memo(({ data, count, locations }: ShiftsTableProps) => {<Hyperlink to={row.original.id!}>{row.original.name}</Hyperlink>),meta: {+ mobile: "P1",icon: <LuCalendarRange />}},@@ -117,8 +125,18 @@ const ShiftsTable = memo(({ data, count, locations }: ShiftsTableProps) => {accessorKey: "startTime",header: t`Start Time`,cell: ({ row }) =>- renderShiftTime(row.original.startTime, row.original.locationId),+ // Phones: line 2 shows the whole span, start – end.+ isCompact && row.original.endTime ? (+ <>+ {renderShiftTime(row.original.startTime, row.original.locationId)}+ {" – "}+ {renderShiftTime(row.original.endTime, row.original.locationId)}+ </>+ ) : (+ renderShiftTime(row.original.startTime, row.original.locationId)+ ),meta: {+ mobile: "P3",icon: <LuClock />}},@@ -173,7 +191,7 @@ const ShiftsTable = memo(({ data, count, locations }: ShiftsTableProps) => {];return [...defaultColumns, ...customColumns];- }, [locations, renderDays, renderShiftTime, customColumns, t]);+ }, [locations, renderDays, renderShiftTime, customColumns, isCompact, t]);const renderContextMenu = useCallback((row: Shift) => {diff --git a/apps/erp/app/modules/people/ui/Timecards/TimecardsTable.tsx b/apps/erp/app/modules/people/ui/Timecards/TimecardsTable.tsxindex 252d400285..e36016f517 100644--- a/apps/erp/app/modules/people/ui/Timecards/TimecardsTable.tsx+++ b/apps/erp/app/modules/people/ui/Timecards/TimecardsTable.tsx@@ -9,6 +9,7 @@ import {MENU_ITEM_SHORTCUTS,MenuIcon,MenuItem,+ useCompact,useInterval} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";@@ -68,6 +69,7 @@ function formatDuration(clockInStr: string, clockOutStr: string | null) {const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {const { t } = useLingui();const { locale } = useLocale();+ const isCompact = useCompact();const navigate = useNavigate();const permissions = usePermissions();const [params] = useUrlParams();@@ -104,6 +106,7 @@ const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuUser />}},@@ -112,15 +115,31 @@ const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {header: t`Date`,cell: ({ row }) =>row.original.clockIn ? (- <DateTime- value={row.original.clockIn}- variant="date"- dateOptions={{ dateStyle: "medium" }}- />+ <>+ <DateTime+ value={row.original.clockIn}+ variant="date"+ dateOptions={{ dateStyle: "medium" }}+ />+ {/* Phones: line 2 also carries the clock-in – clock-out span. */}+ {isCompact ? (+ <>+ {" · "}+ <DateTime value={row.original.clockIn} variant="time" />+ {" – "}+ <DateTime+ value={row.original.clockOut}+ variant="time"+ fallback="—"+ />+ </>+ ) : null}+ </>) : ("—"),meta: {+ mobile: "P3",icon: <LuCalendar />}},@@ -152,6 +171,7 @@ const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {cell: ({ row }) =>durationLabel(row.original.clockIn, row.original.clockOut),meta: {+ mobile: "P2",icon: <LuClock />,exportValue: (row) => durationLabel(row.clockIn, row.clockOut)}@@ -167,6 +187,7 @@ const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {</Badge>),meta: {+ mobile: "P2",icon: <LuRadar />,filter: {type: "static" as const,@@ -203,7 +224,7 @@ const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {}}];- }, [locations, t, locale]);+ }, [locations, t, locale, isCompact]);const renderContextMenu = useCallback((row: TimeCardEntry) => {diff --git a/apps/erp/app/modules/production/ui/Assemblies/AssemblyBomTree.tsx b/apps/erp/app/modules/production/ui/Assemblies/AssemblyBomTree.tsxindex b36042847f..1cb806ec1c 100644--- a/apps/erp/app/modules/production/ui/Assemblies/AssemblyBomTree.tsx+++ b/apps/erp/app/modules/production/ui/Assemblies/AssemblyBomTree.tsx@@ -1161,7 +1161,7 @@ function UnitListRow({icon={<LuPencil />}variant="ghost"size="sm"- className="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 compact:opacity-100"onClick={(event) => {event.stopPropagation();onEdit();@@ -1174,7 +1174,7 @@ function UnitListRow({icon={<LuTrash />}variant="ghost"size="sm"- className="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 compact:opacity-100"onClick={(event) => {event.stopPropagation();deleteFetcher.submit(new FormData(), {@@ -1664,7 +1664,7 @@ function ComponentRow({icon={<LuSettings />}variant="ghost"size="sm"- className="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"onClick={(event) => event.stopPropagation()}/></PopoverTrigger>@@ -1751,7 +1751,7 @@ function HideToggle({"focus:opacity-100",isMarked? "opacity-100 text-muted-foreground"- : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"+ : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 compact:opacity-100")}onClick={(event) => {event.stopPropagation();@@ -1768,7 +1768,7 @@ function HideToggle({className={cn("inline-flex",!isMarked &&- "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"+ "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 compact:opacity-100")}>{button}diff --git a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionHeader.tsx b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionHeader.tsxindex 2cb3b20334..440365e7cb 100644--- a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionHeader.tsx+++ b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionHeader.tsx@@ -5,29 +5,19 @@import {Badge,Button,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- HStack,- IconButton,Input,MENU_ITEM_SHORTCUTS,useDisclosure} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";import { useState } from "react";-import {- LuBlocks,- LuEllipsisVertical,- LuPanelLeft,- LuPanelRight,- LuRefreshCw,- LuTrash-} from "react-icons/lu";+import { LuBlocks, LuRefreshCw, LuTrash } from "react-icons/lu";import { Link, useFetcher, useParams } from "react-router";import { DateTime, VersionMenu } from "~/components";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import { Confirm } from "~/components/Modals";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";@@ -54,6 +44,7 @@ const AssemblyInstructionHeader = () => {const instruction = routeData?.instruction;const versions = routeData?.versions ?? [];+ const { t } = useLingui();const permissions = usePermissions();const user = useUser();const { toggleExplorer, toggleProperties } = usePanels();@@ -98,150 +89,160 @@ const AssemblyInstructionHeader = () => {});};+ const nameInput = (+ <Input+ className="mr-2 w-auto min-w-0 max-w-[320px] font-semibold text-foreground field-sizing-content"+ value={name}+ borderless+ onChange={+ isDraft && canUpdate ? (e) => setName(e.target.value) : undefined+ }+ onBlur={+ isDraft && canUpdate ? (e) => onUpdateName(e.target.value) : undefined+ }+ />+ );+ const statusBadge = (+ <AssemblyInstructionStatus status={instruction?.status} />+ );+ const versionBadge = instruction && (+ <Badge variant="outline" className="shrink-0 tabular-nums">+ <Trans>Version {instruction.version}</Trans>+ </Badge>+ );+ const menuItems = (+ <>+ {item && itemTypesWithDetails.includes(item.type) && (+ <DropdownMenuItem shortcut={MENU_ITEM_SHORTCUTS.view} asChild>+ <Link to={getLinkToItemDetails(item.type as MethodItemType, item.id)}>+ <DropdownMenuIcon icon={<LuBlocks />} />+ <Trans>View Item Master</Trans>+ </Link>+ </DropdownMenuItem>+ )}+ <DropdownMenuItem+ disabled={+ !permissions.can("update", "production") ||+ invalidateFetcher.state !== "idle"+ }+ onClick={() =>+ invalidateFetcher.submit(null, {+ method: "post",+ action: path.to.assemblyModelInvalidate(id)+ })+ }+ >+ <DropdownMenuIcon icon={<LuRefreshCw />} />+ <Trans>Re-convert Model</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "production") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteDisclosure.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Instruction</Trans>+ </DropdownMenuItem>+ </>+ );++ const editedBy = instruction && (+ <span className="hidden whitespace-nowrap text-xs text-muted-foreground lg:inline">+ {instruction.createdBy === user.id ? (+ <Trans>+ By you · edited{" "}+ <DateTime+ value={instruction.updatedAt ?? instruction.createdAt}+ variant="relative"+ />+ </Trans>+ ) : (+ <Trans>+ edited{" "}+ <DateTime+ value={instruction.updatedAt ?? instruction.createdAt}+ variant="relative"+ />+ </Trans>+ )}+ </span>+ );+return (- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="flex-grow" spacing={1}>- <IconButton- aria-label="Toggle Explorer"- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Input- className="mr-2 w-auto min-w-0 max-w-[320px] font-semibold text-foreground field-sizing-content"- value={name}- borderless- onChange={- isDraft && canUpdate ? (e) => setName(e.target.value) : undefined- }- onBlur={- isDraft && canUpdate- ? (e) => onUpdateName(e.target.value)- : undefined- }- />- <AssemblyInstructionStatus status={instruction?.status} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label="More options"- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {item && itemTypesWithDetails.includes(item.type) && (- <DropdownMenuItem shortcut={MENU_ITEM_SHORTCUTS.view} asChild>- <Link- to={getLinkToItemDetails(- item.type as MethodItemType,- item.id+ <>+ <RecordHeader+ title={nameInput}+ titleInHero+ menu={menuItems}+ status={+ <>+ {statusBadge}+ {versionBadge}+ {editedBy}+ </>+ }+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ {instruction && (+ <RecordAction slot="overflow">+ <VersionMenu+ versions={versions}+ currentVersionId={id}+ getKey={(v) => v.id}+ getHref={(v) => path.to.assemblyInstruction(v.id)}+ renderLabel={(v) => (+ <>+ <Badge variant="outline" className="tabular-nums">+ V{v.version}+ </Badge>+ <span>{v.name}</span>+ </>)}- >- <DropdownMenuIcon icon={<LuBlocks />} />- View Item Master- </Link>- </DropdownMenuItem>- )}- <DropdownMenuItem- disabled={- !permissions.can("update", "production") ||- invalidateFetcher.state !== "idle"- }- onClick={() =>- invalidateFetcher.submit(null, {- method: "post",- action: path.to.assemblyModelInvalidate(id)- })- }- >- <DropdownMenuIcon icon={<LuRefreshCw />} />- Re-convert Model- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "production") ||- !permissions.is("employee")- }- destructive- onClick={deleteDisclosure.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- Delete Instruction- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- {instruction && (- <Badge variant="outline" className="shrink-0 tabular-nums">- Version {instruction.version}- </Badge>- )}- {instruction && (- <span className="hidden whitespace-nowrap text-xs text-muted-foreground lg:inline">- {instruction.createdBy === user.id ? "By you · " : ""}- edited{" "}- <DateTime- value={instruction.updatedAt ?? instruction.createdAt}- variant="relative"- />- </span>- )}- </HStack>- <div className="flex flex-shrink-0 gap-2 items-center justify-end">- {instruction && (- <VersionMenu- versions={versions}- currentVersionId={id}- getKey={(v) => v.id}- getHref={(v) => path.to.assemblyInstruction(v.id)}- renderLabel={(v) => (- <>- <Badge variant="outline" className="tabular-nums">- V{v.version}- </Badge>- <span>{v.name}</span>- </>- )}- renderStatus={(v) => (- <AssemblyInstructionStatus status={v.status} />- )}- onNewVersion={canCreate ? onNewVersion : undefined}- isNewVersionDisabled={isCreatingVersion}- />- )}- {instruction?.status === "Published"- ? canCreate && (- <Button- isDisabled={isCreatingVersion}- isLoading={isCreatingVersion}- onClick={onNewVersion}- >- New Version- </Button>- )- : instruction && (- <Button- isDisabled={!canUpdate}- onClick={activateDisclosure.onOpen}- >- Make Active- </Button>+ renderStatus={(v) => (+ <AssemblyInstructionStatus status={v.status} />+ )}+ onNewVersion={canCreate ? onNewVersion : undefined}+ isNewVersionDisabled={isCreatingVersion}+ />+ </RecordAction>)}- <IconButton- aria-label="Toggle Properties"- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </div>+ {instruction?.status === "Published"+ ? canCreate && (+ <RecordAction slot="primary">+ <Button+ isDisabled={isCreatingVersion}+ isLoading={isCreatingVersion}+ onClick={onNewVersion}+ >+ <Trans>New Version</Trans>+ </Button>+ </RecordAction>+ )+ : instruction && (+ <RecordAction slot="primary">+ <Button+ isDisabled={!canUpdate}+ onClick={activateDisclosure.onOpen}+ >+ <Trans>Make Active</Trans>+ </Button>+ </RecordAction>+ )}+ </>+ }+ />{deleteDisclosure.isOpen && (<ConfirmDeleteaction={path.to.deleteAssemblyInstruction(id)}isOpen={deleteDisclosure.isOpen}- name={instruction?.name ?? "assembly instruction"}- text={`Are you sure you want to delete ${instruction?.name}? This cannot be undone.`}+ name={instruction?.name ?? t`assembly instruction`}+ text={t`Are you sure you want to delete ${instruction?.name}? This cannot be undone.`}onCancel={() => {deleteDisclosure.onClose();}}@@ -253,15 +254,15 @@ const AssemblyInstructionHeader = () => {{activateDisclosure.isOpen && instruction && (<ConfirmisOpen- title="Make Active"- text={`Make version ${instruction.version} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it.`}- confirmText="Make Active"+ title={t`Make Active`}+ text={t`Make version ${instruction.version} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it.`}+ confirmText={t`Make Active`}action={path.to.assemblyInstructionActivate(id)}onCancel={activateDisclosure.onClose}onSubmit={activateDisclosure.onClose}/>)}- </div>+ </>);};diff --git a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionProperties.tsx b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionProperties.tsxindex 4c8a8ee6a5..829fcf193f 100644--- a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionProperties.tsx+++ b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionProperties.tsx@@ -952,7 +952,7 @@ function StepComponentsEditor({icon={<LuX />}variant="ghost"size="sm"- className="opacity-0 group-hover:opacity-100 focus:opacity-100"+ className="opacity-0 group-hover:opacity-100 focus:opacity-100 compact:opacity-100"onClick={() => setUsedIn(used.headerId, "")}/>)}@@ -1004,7 +1004,7 @@ function StepComponentsEditor({icon={<LuX />}variant="ghost"size="sm"- className="opacity-0 group-hover:opacity-100 focus:opacity-100"+ className="opacity-0 group-hover:opacity-100 focus:opacity-100 compact:opacity-100"onClick={(event) => {event.stopPropagation();onRemoveComponents(group.nodeIds);diff --git a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionsTable.tsx b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionsTable.tsxindex b9fd28ecf5..808fc8a1b3 100644--- a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionsTable.tsx+++ b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionsTable.tsx@@ -96,6 +96,7 @@ const AssemblyInstructionsTable = memo(</div>),meta: {+ mobile: "P1",icon: <LuBlocks />}},@@ -106,6 +107,8 @@ const AssemblyInstructionsTable = memo(<AssemblyInstructionStatus status={row.original.status} />),meta: {+ mobile: "P2",+ mobilePill: true,icon: <LuCircleCheck />}},@@ -128,6 +131,7 @@ const AssemblyInstructionsTable = memo();},meta: {+ mobile: "P3",icon: <LuSquareStack />,// Without this the exporter substitutes the item's name for the id// (Download.tsx idNameMaps), losing the readable id the cell shows.diff --git a/apps/erp/app/modules/production/ui/Assemblies/AssemblyStepList.tsx b/apps/erp/app/modules/production/ui/Assemblies/AssemblyStepList.tsxindex 1e0c647fcf..5e66bf1da1 100644--- a/apps/erp/app/modules/production/ui/Assemblies/AssemblyStepList.tsx+++ b/apps/erp/app/modules/production/ui/Assemblies/AssemblyStepList.tsx@@ -930,7 +930,7 @@ function SubAssemblyRow({aria-label={t`More options`}size="sm"variant="ghost"- className="size-6 shrink-0 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 data-[state=open]:opacity-100"+ className="size-6 shrink-0 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}onClick={(e) => e.stopPropagation()}/>@@ -1093,7 +1093,7 @@ function StepRow({aria-label={t`More options`}size="sm"variant="ghost"- className="size-6 shrink-0 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 data-[state=open]:opacity-100"+ className="size-6 shrink-0 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}onClick={(e) => e.stopPropagation()}/>diff --git a/apps/erp/app/modules/production/ui/Batches/BatchBuilder.tsx b/apps/erp/app/modules/production/ui/Batches/BatchBuilder.tsxindex dd4852fc6e..f6e2a7ab88 100644--- a/apps/erp/app/modules/production/ui/Batches/BatchBuilder.tsx+++ b/apps/erp/app/modules/production/ui/Batches/BatchBuilder.tsx@@ -35,6 +35,7 @@ import {ResizablePanelGroup,Spinner,toast,+ useCompact,useLocalStorage,VStack} from "@carbon/react";@@ -1146,6 +1147,16 @@ function DrawerBodyGrid({left: React.ReactNode;right: React.ReactNode;}) {+ const isCompact = useCompact();+ if (isCompact) {+ return (+ <div className="flex flex-col min-h-0 flex-1 overflow-y-auto">+ <div className="flex-shrink-0 border-b px-4 py-3 bg-card">{scope}</div>+ <div className="flex h-full flex-shrink-0 flex-col">{left}</div>+ <div className="flex flex-shrink-0 flex-col border-t">{right}</div>+ </div>+ );+ }return (<div className="flex flex-col min-h-0 flex-1 overflow-hidden"><div className="flex-shrink-0 border-b px-4 py-3 bg-card">{scope}</div>@@ -1255,7 +1266,7 @@ function ScopeBar({<Trans>Scope</Trans></span></HStack>- <div className="w-[220px]">+ <div className="w-[220px] compact:w-full compact:!mx-0"><Comboboxsize="md"value={locationId}@@ -1264,7 +1275,7 @@ function ScopeBar({placeholder={t`Location`}/></div>- <div className="w-[220px]">+ <div className="w-[220px] compact:w-full compact:!mx-0"><Comboboxsize="md"value={processId ?? ""}@@ -1851,7 +1862,8 @@ function CandidateTable({header: t`Job`,cell: ({ row }) => (<span className="font-medium">{row.original.jobReadableId}</span>- )+ ),+ meta: { mobile: "P1" }},{id: "jobStatus",@@ -1940,6 +1952,7 @@ function CandidateTable({return (<div className="flex-1 min-h-0 overflow-hidden w-full px-4"><Table<BatchCandidate>+ mobileLayout="table"compactdata={visible}columns={columns}diff --git a/apps/erp/app/modules/production/ui/Batches/BatchDetailDrawer.tsx b/apps/erp/app/modules/production/ui/Batches/BatchDetailDrawer.tsxindex 967b8515f9..dcc9feb2e2 100644--- a/apps/erp/app/modules/production/ui/Batches/BatchDetailDrawer.tsx+++ b/apps/erp/app/modules/production/ui/Batches/BatchDetailDrawer.tsx@@ -369,7 +369,7 @@ export function BatchDetailDrawer({{/* One surface (DrawerBody), two panes divided by a rule — the memberslist grows to fill the page and scrolls internally, so the drawernever leaves a dead lower half. No nested cards. */}- <DrawerBody className="w-full flex-1 min-h-0 overflow-hidden p-0">+ <DrawerBody className="w-full flex-1 min-h-0 overflow-hidden p-0 compact:p-0"><div className="grid h-full min-h-0 w-full grid-cols-1 lg:grid-cols-3">{/* Operations — the batch's contents */}<section className="flex min-h-0 flex-col lg:col-span-2">diff --git a/apps/erp/app/modules/production/ui/Batches/BatchesTable.tsx b/apps/erp/app/modules/production/ui/Batches/BatchesTable.tsxindex 8fb680e659..e3ff8dda56 100644--- a/apps/erp/app/modules/production/ui/Batches/BatchesTable.tsx+++ b/apps/erp/app/modules/production/ui/Batches/BatchesTable.tsx@@ -308,6 +308,7 @@ const BatchesTable = memo(({ data, count }: BatchesTableProps) => {<Hyperlink to={row.original.id}>{row.original.readableId}</Hyperlink>),meta: {+ mobile: "P1",icon: <LuLayers />}},@@ -316,6 +317,7 @@ const BatchesTable = memo(({ data, count }: BatchesTableProps) => {header: t`Status`,cell: ({ row }) => <BatchStatus status={row.original.status} />,meta: {+ mobile: "P2",filter: {type: "static",options: BATCH_STATUSES.map((status) => ({@@ -346,6 +348,7 @@ const BatchesTable = memo(({ data, count }: BatchesTableProps) => {<Enumerable value={row.original.workCenterName ?? null} />),meta: {+ mobile: "P3",icon: <LuFactory />,filterHeader: t`Work Center`,exportValue: (row: JobOperationBatch) => row.workCenterName ?? null@@ -358,6 +361,8 @@ const BatchesTable = memo(({ data, count }: BatchesTableProps) => {<span className="tabular-nums">{row.original.memberCount ?? 0}</span>),meta: {+ mobile: "P2",+ mobileLabel: true,icon: <LuUsers />}},diff --git a/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsx b/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsxindex 1e8012c806..7b90187ff4 100644--- a/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsx+++ b/apps/erp/app/modules/production/ui/DemandProjection/DemandProjectionTable.tsx@@ -12,6 +12,7 @@ import {HStack,IconButton,MENU_ITEM_SHORTCUTS,+ useCompact,useUrlParams,VStack} from "@carbon/react";@@ -56,6 +57,7 @@ const DemandProjectionsTable = memo(});const [params] = useUrlParams();const { t } = useLingui();+ const isCompact = useCompact();const permissions = usePermissions();const locations = useLocations();const [selectedItem, setSelectedItem] = useState<DemandProjection | null>(@@ -115,7 +117,7 @@ const DemandProjectionsTable = memo(<Hyperlinkto={path.to.demandProjection(row.original.id!, locationId)}>- <HStack className="py-1 cursor-pointer">+ <HStack className="py-1 cursor-pointer compact:min-w-0"><ItemThumbnailsize="sm"thumbnailPath={row.original.thumbnailPath}@@ -123,8 +125,10 @@ const DemandProjectionsTable = memo(type={row.original.type}/>- <VStack spacing={0} className="font-medium">- {row.original.readableIdWithRevision}+ <VStack spacing={0} className="font-medium compact:min-w-0">+ <span className="compact:block compact:w-full compact:truncate">+ {row.original.readableIdWithRevision}+ </span><div className="w-full truncate text-muted-foreground text-xs">{row.original.name}</div>@@ -133,6 +137,7 @@ const DemandProjectionsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -194,6 +199,7 @@ const DemandProjectionsTable = memo(return (<><Table<DemandProjection>+ mobileLayout="table"data={data}columns={columns}count={count}@@ -201,7 +207,7 @@ const DemandProjectionsTable = memo(title={t`Demand Forecasts`}table="production-planning"withSavedView- withSelectableRows+ withSelectableRows={!isCompact}withSimpleSortingprimaryAction={<div className="flex items-center gap-2">diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsxindex 13c394649e..72e886f968 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx@@ -170,8 +170,9 @@ function makeItem(<Linkto={getLinkToItemDetails(material.itemType, material.itemId)}onClick={(e) => e.stopPropagation()}+ className="compact:hit-area">- <LuExternalLink className="h-4 w-4 opacity-0 group-hover:opacity-100" />+ <LuExternalLink className="h-4 w-4 opacity-0 group-hover:opacity-100 compact:opacity-100" /></Link>)}</div>@@ -187,7 +188,7 @@ function makeItem(<HStack spacing={2}>{material.requiresBatchTracking ? (<Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary"><TrackingTypeIcon type="Batch" /></Badge>@@ -198,7 +199,7 @@ function makeItem(</Tooltip>) : material.requiresSerialTracking ? (<Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary"><TrackingTypeIcon type="Serial" /></Badge>@@ -210,7 +211,7 @@ function makeItem() : null}<Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary"><MethodIcon type={material.methodType} isKit={material.kit} /></Badge>@@ -228,7 +229,7 @@ function makeItem(<Badge variant="secondary">{material.quantity}</Badge><Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary"><MethodItemTypeIcon type={material.itemType} /></Badge>@@ -837,7 +838,7 @@ function MaterialForm({onChange={(newValue) => {setItemData((d) => ({ ...d, description: newValue }));}}- className="col-span-2"+ className="col-span-2 compact:col-span-full"/>{itemData.methodType !== "Make to Order" && (<NumberControlleddiff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsxindex e07c4e0d21..2d5d1189f0 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx@@ -1504,7 +1504,10 @@ function StepsForm({<Input name="name" label={t`Name`} /></div>- <VStack spacing={2} className="w-full col-span-2">+ <VStack+ spacing={2}+ className="w-full col-span-2 compact:col-span-full"+ ><Label><Trans>Description</Trans></Label>@@ -2154,7 +2157,10 @@ function StepsListItem({<Input name="name" label={t`Name`} /></div>- <VStack spacing={2} className="w-full col-span-2">+ <VStack+ spacing={2}+ className="w-full col-span-2 compact:col-span-full"+ ><Label><Trans>Description</Trans></Label>@@ -3108,7 +3114,7 @@ function OperationForm({onChange={(newValue) => {setProcessData((d) => ({ ...d, description: newValue }));}}- className="col-span-2"+ className="col-span-2 compact:col-span-full"/><Selectdiff --git a/apps/erp/app/modules/production/ui/Jobs/JobDag.tsx b/apps/erp/app/modules/production/ui/Jobs/JobDag.tsxindex 747ca30bc4..a74a0fa063 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobDag.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobDag.tsx@@ -165,7 +165,8 @@ function JobDagInner({ operations, dependencies }: Props) {onClick={toggleDirection}className={cn("h-7 px-2 rounded-md text-xs font-medium flex items-center gap-1.5",- "border border-border bg-background hover:bg-accent/60 transition-colors"+ "border border-border bg-background hover:bg-accent/60 transition-colors",+ "compact:hit-area compact:h-8 compact:text-sm")}>{direction === "LR" ? (@@ -180,7 +181,8 @@ function JobDagInner({ operations, dependencies }: Props) {onClick={handleFitView}className={cn("h-7 px-2 rounded-md text-xs font-medium flex items-center gap-1.5",- "border border-border bg-background hover:bg-accent/60 transition-colors"+ "border border-border bg-background hover:bg-accent/60 transition-colors",+ "compact:hit-area compact:h-8 compact:text-sm")}><LuMaximize className="w-3.5 h-3.5" />@@ -210,7 +212,7 @@ function JobDagInner({ operations, dependencies }: Props) {nodeStrokeWidth={3}pannablezoomable- className="!bg-card !border-border"+ className="!bg-card !border-border compact:!hidden"/></ReactFlow><DagLegend />@@ -246,7 +248,7 @@ function DagLegend() {type="button"aria-label="Show legend"className={cn(- "h-8 w-8 rounded-md flex items-center justify-center transition-colors",+ "h-8 w-8 rounded-md flex items-center justify-center transition-colors compact:size-11","border border-border bg-card/90 backdrop-blur shadow-sm","text-muted-foreground hover:text-foreground hover:bg-accent/60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"diff --git a/apps/erp/app/modules/production/ui/Jobs/JobForm.tsx b/apps/erp/app/modules/production/ui/Jobs/JobForm.tsxindex 73a1d2092d..924add980b 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobForm.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobForm.tsx@@ -230,7 +230,7 @@ const JobForm = ({ initialValues }: JobFormProps) => {<Tabs defaultValue="job"><VStack className="w-full items-center relative">{!isEditing && (- <TabsList className="absolute top-6 right-4 z-50">+ <TabsList className="absolute top-6 right-4 z-50 compact:static compact:self-start compact:mb-3"><TabsTrigger value="job"><LuDiamond className="mr-1" />Single Jobdiff --git a/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx b/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsxindex 10c3bc6627..e8e1b8b0bb 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobHeader.tsx@@ -9,7 +9,6 @@ import {AlertDescription,AlertTitle,Button,- Copy,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,@@ -18,9 +17,7 @@ import {DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuTrigger,- Heading,HStack,- IconButton,MENU_ITEM_SHORTCUTS,Modal,ModalBody,@@ -56,11 +53,8 @@ import {LuCircleStop,LuClipboardList,LuClock,- LuEllipsisVertical,LuList,LuLoaderCircle,- LuPanelLeft,- LuPanelRight,LuQrCode,LuSettings,LuShoppingCart,@@ -77,6 +71,7 @@ import { Link, useFetcher, useNavigate, useParams } from "react-router";import { useAuditLog } from "~/components/AuditLog";import { Location, StorageUnit } from "~/components/Form";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import Select from "~/components/Select";import SupplierAvatar from "~/components/SupplierAvatar";@@ -203,307 +198,315 @@ const JobHeader = () => {};}, [projectedCompletionAt, jobDueDate]);- return (+ const menuItems = (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide ">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.jobDetails(jobId)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.job?.jobId}</span>- </Heading>- </Link>- <Copy text={routeData?.job?.jobId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- !["Ready", "In Progress", "Paused"].includes(status ?? "") ||- expediteFetcher.state !== "idle" ||- !permissions.can("view", "production")- }- onClick={() => {- expediteModal.onOpen();- expediteFetcher.submit(- {},- { method: "post", action: path.to.jobExpedite(jobId) }- );- }}- >- <DropdownMenuIcon icon={<LuZap />} />- {t`Best case…`}- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- !["Cancelled", "Completed"].includes(- routeData?.job?.status ?? ""- ) ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "production")- }- onClick={() => {- statusFetcher.submit(- {- status:- routeData?.job?.status === "Cancelled"- ? "Draft"- : "In Progress"- },- {- method: "post",- action: path.to.jobStatus(jobId)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- Reopen- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "production") ||- !permissions.is("employee") ||- isJobLocked(routeData?.job?.status)- }- destructive- onClick={deleteJobModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- Delete Job- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <JobStatus status={routeData?.job?.status} />- {["Draft", "Planned", "In Progress", "Ready", "Paused"].includes(- routeData?.job?.status ?? ""- ) && (- <>- {routeData?.job?.dueDate &&- isSameDay(parseDate(routeData?.job?.dueDate), todaysDate) && (- <JobStatus status="Due Today" />- )}- {routeData?.job?.dueDate &&- parseDate(routeData?.job?.dueDate) < todaysDate && (- <JobStatus status="Overdue" />- )}- {slack && (- <Status- color={slack.late ? "red" : "green"}- tooltip={`${t`Projected completion`}: ${slack.projectedDate}`}- >- {slack.late- ? t`${slack.absDays}d late`- : t`${slack.absDays}d early`}- </Status>- )}- </>- )}- {unbatchedBatchableOperations > 0 && (+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={+ !["Ready", "In Progress", "Paused"].includes(status ?? "") ||+ expediteFetcher.state !== "idle" ||+ !permissions.can("view", "production")+ }+ onClick={() => {+ expediteModal.onOpen();+ expediteFetcher.submit(+ {},+ { method: "post", action: path.to.jobExpedite(jobId) }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuZap />} />+ {t`Best case…`}+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={+ !["Cancelled", "Completed"].includes(routeData?.job?.status ?? "") ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "production")+ }+ onClick={() => {+ statusFetcher.submit(+ {+ status:+ routeData?.job?.status === "Cancelled" ? "Draft" : "In Progress"+ },+ {+ method: "post",+ action: path.to.jobStatus(jobId)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "production") ||+ !permissions.is("employee") ||+ isJobLocked(routeData?.job?.status)+ }+ destructive+ onClick={deleteJobModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Job</Trans>+ </DropdownMenuItem>+ </>+ );+ const isReleasable = ["Draft", "Planned"].includes(status ?? "");+ const statusBadges = (+ <>+ <JobStatus status={routeData?.job?.status} />+ {["Draft", "Planned", "In Progress", "Ready", "Paused"].includes(+ routeData?.job?.status ?? ""+ ) && (+ <>+ {routeData?.job?.dueDate &&+ isSameDay(parseDate(routeData?.job?.dueDate), todaysDate) && (+ <JobStatus status="Due Today" />+ )}+ {routeData?.job?.dueDate &&+ parseDate(routeData?.job?.dueDate) < todaysDate && (+ <JobStatus status="Overdue" />+ )}+ {slack && (<Status- color="gray"- tooltip={- unbatchedBatchableOperations === 1- ? t`1 batchable operation is not in a batch — it runs individually until batched`- : t`${unbatchedBatchableOperations} batchable operations are not in a batch — they run individually until batched`- }+ color={slack.late ? "red" : "green"}+ tooltip={`${t`Projected completion`}: ${slack.projectedDate}`}>- {t`${unbatchedBatchableOperations} awaiting batching`}+ {slack.late+ ? t`${slack.absDays}d late`+ : t`${slack.absDays}d early`}</Status>)}- </HStack>- <HStack>- {routeData?.job?.salesOrderId && routeData?.job.salesOrderLineId && (- <Button leftIcon={<RiProgress8Line />} variant="secondary" asChild>- <Link- to={path.to.salesOrderLine(- routeData?.job?.salesOrderId,- routeData?.job?.salesOrderLineId- )}- >- Sales Order- </Link>- </Button>- )}- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={currentValue === "details" ? <LuList /> : <LuTable />}- rightIcon={<LuChevronDown />}- variant="secondary"- >- {getExplorerLabel(currentValue)}- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent className="w-56">- <DropdownMenuItem asChild>- <a- target="_blank"- href={path.to.file.jobTravelerByJobId(jobId)}- rel="noreferrer"+ </>+ )}+ {unbatchedBatchableOperations > 0 && (+ <Status+ color="gray"+ tooltip={+ unbatchedBatchableOperations === 1+ ? t`1 batchable operation is not in a batch — it runs individually until batched`+ : t`${unbatchedBatchableOperations} batchable operations are not in a batch — they run individually until batched`+ }+ >+ {t`${unbatchedBatchableOperations} awaiting batching`}+ </Status>+ )}+ </>+ );++ return (+ <>+ <RecordHeader+ title={routeData?.job?.jobId}+ titleTo={path.to.jobDetails(jobId)}+ copyValue={routeData?.job?.jobId ?? ""}+ menu={menuItems}+ status={statusBadges}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ {routeData?.job?.salesOrderId &&+ routeData?.job.salesOrderLineId && (+ <RecordAction slot="overflow">+ <Button+ leftIcon={<RiProgress8Line />}+ variant="secondary"+ asChild+ >+ <Link+ to={path.to.salesOrderLine(+ routeData?.job?.salesOrderId,+ routeData?.job?.salesOrderLineId+ )}+ >+ <Trans>Sales Order</Trans>+ </Link>+ </Button>+ </RecordAction>+ )}+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={+ currentValue === "details" ? <LuList /> : <LuTable />+ }+ rightIcon={<LuChevronDown />}+ variant="secondary"+ >+ {getExplorerLabel(currentValue)}+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent className="w-56">+ <DropdownMenuItem asChild>+ <a+ target="_blank"+ href={path.to.file.jobTravelerByJobId(jobId)}+ rel="noreferrer"+ >+ <DropdownMenuIcon icon={<LuQrCode />} />+ <Trans>Job Traveler</Trans>+ </a>+ </DropdownMenuItem>+ <DropdownMenuRadioGroup+ value={currentValue}+ onValueChange={(option) => {+ navigate(getExplorePath(jobId, option));+ }}+ >+ <DropdownMenuRadioItem value="details">+ <DropdownMenuIcon icon={getExplorerMenuIcon("details")} />+ {getExplorerLabel("details")}+ </DropdownMenuRadioItem>+ <DropdownMenuSeparator />+ {[+ "materials",+ "operations",+ ...(status !== "Draft" && status !== "Planned"+ ? ["dag"]+ : [])+ ].map((i) => (+ <DropdownMenuRadioItem value={i} key={i}>+ <DropdownMenuIcon icon={getExplorerMenuIcon(i)} />+ {getExplorerLabel(i)}+ </DropdownMenuRadioItem>+ ))}+ <DropdownMenuSeparator />+ {["events", "quantities", "step-records"].map((i) => (+ <DropdownMenuRadioItem value={i} key={i}>+ <DropdownMenuIcon icon={getExplorerMenuIcon(i)} />+ {getExplorerLabel(i)}+ </DropdownMenuRadioItem>+ ))}+ </DropdownMenuRadioGroup>+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>++ {status !== "Paused" ? (+ <RecordAction slot="secondary">+ <statusFetcher.Form+ method="post"+ action={path.to.jobStatus(jobId)}+ >+ <input type="hidden" name="status" value="Paused" />+ <Button+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Paused"+ }+ isDisabled={+ !["Ready", "In Progress"].includes(status ?? "") ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "production")+ }+ leftIcon={<LuCirclePause />}+ type="submit"+ variant="secondary"+ >+ <Trans>Pause</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>+ ) : (+ <RecordAction slot="secondary">+ <statusFetcher.Form+ method="post"+ action={path.to.jobStatus(jobId)}>- <DropdownMenuIcon icon={<LuQrCode />} />- Job Traveler- </a>- </DropdownMenuItem>- <DropdownMenuRadioGroup- value={currentValue}- onValueChange={(option) => {- navigate(getExplorePath(jobId, option));- }}+ <input type="hidden" name="status" value="Ready" />+ <Button+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Ready"+ }+ isDisabled={+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "production")+ }+ leftIcon={<LuCirclePlay />}+ type="submit"+ >+ <Trans>Resume</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>+ )}++ <RecordAction slot={isReleasable ? "primary" : "overflow"}>+ <SplitButton+ onClick={releaseModal.onOpen}+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Ready"+ }+ isDisabled={+ !isReleasable ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "production") ||+ (routeData?.job?.quantity === 0 &&+ routeData?.job?.scrapQuantity === 0)+ }+ leftIcon={<LuCirclePlay />}+ variant={isReleasable ? "primary" : "secondary"}+ dropdownItems={[+ {+ label: <JobStatus status="Planned" />,+ icon: <LuCheckCheck />,+ onClick: markAsPlanned+ }+ ]}>- <DropdownMenuRadioItem value="details">- <DropdownMenuIcon icon={getExplorerMenuIcon("details")} />- {getExplorerLabel("details")}- </DropdownMenuRadioItem>- <DropdownMenuSeparator />- {[- "materials",- "operations",- ...(status !== "Draft" && status !== "Planned" ? ["dag"] : [])- ].map((i) => (- <DropdownMenuRadioItem value={i} key={i}>- <DropdownMenuIcon icon={getExplorerMenuIcon(i)} />- {getExplorerLabel(i)}- </DropdownMenuRadioItem>- ))}- <DropdownMenuSeparator />- {["events", "quantities", "step-records"].map((i) => (- <DropdownMenuRadioItem value={i} key={i}>- <DropdownMenuIcon icon={getExplorerMenuIcon(i)} />- {getExplorerLabel(i)}- </DropdownMenuRadioItem>- ))}- </DropdownMenuRadioGroup>- </DropdownMenuContent>- </DropdownMenu>-- {status !== "Paused" ? (- <statusFetcher.Form method="post" action={path.to.jobStatus(jobId)}>- <input type="hidden" name="status" value="Paused" />+ <Trans>Release</Trans>+ </SplitButton>+ </RecordAction>++ <RecordAction slot={isReleasable ? "overflow" : "primary"}><Button+ onClick={completeModal.onOpen}isLoading={statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Paused"+ statusFetcher.formAction === path.to.jobComplete(jobId)}isDisabled={- !["Ready", "In Progress"].includes(status ?? "") ||+ ["Completed", "Cancelled"].includes(status ?? "") ||statusFetcher.state !== "idle" ||!permissions.can("update", "production")}- leftIcon={<LuCirclePause />}- type="submit"- variant="secondary"+ leftIcon={<LuCircleCheck />}+ variant={status === "Completed" ? "primary" : "secondary"}>- Pause+ <Trans>Complete</Trans></Button>- </statusFetcher.Form>- ) : (- <statusFetcher.Form method="post" action={path.to.jobStatus(jobId)}>- <input type="hidden" name="status" value="Ready" />+ </RecordAction>+ <RecordAction slot="overflow"><Button+ onClick={cancelModal.onOpen}isLoading={statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Ready"+ statusFetcher.formData?.get("status") === "Cancelled"}isDisabled={+ ["Cancelled", "Completed"].includes(status ?? "") ||statusFetcher.state !== "idle" ||!permissions.can("update", "production")}- leftIcon={<LuCirclePlay />}- type="submit"+ leftIcon={<LuCircleStop />}+ variant="secondary">- Resume+ <Trans>Cancel</Trans></Button>- </statusFetcher.Form>- )}-- <SplitButton- onClick={releaseModal.onOpen}- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Ready"- }- isDisabled={- !["Draft", "Planned"].includes(status ?? "") ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "production") ||- (routeData?.job?.quantity === 0 &&- routeData?.job?.scrapQuantity === 0)- }- leftIcon={<LuCirclePlay />}- variant={- ["Draft", "Planned"].includes(status ?? "")- ? "primary"- : "secondary"- }- dropdownItems={[- {- label: <JobStatus status="Planned" />,- icon: <LuCheckCheck />,- onClick: markAsPlanned- }- ]}- >- Release- </SplitButton>-- <Button- onClick={completeModal.onOpen}- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formAction === path.to.jobComplete(jobId)- }- isDisabled={- ["Completed", "Cancelled"].includes(status ?? "") ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "production")- }- leftIcon={<LuCircleCheck />}- variant={status === "Completed" ? "primary" : "secondary"}- >- Complete- </Button>- <Button- onClick={cancelModal.onOpen}- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Cancelled"- }- isDisabled={- ["Cancelled", "Completed"].includes(status ?? "") ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "production")- }- leftIcon={<LuCircleStop />}- variant="secondary"- >- Cancel- </Button>- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </div>+ </RecordAction>+ </>+ }+ />{releaseModal.isOpen && (<JobStartModaljob={routeData?.job}diff --git a/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsxindex bfd2e1f8ac..1bc6436c6e 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx@@ -251,6 +251,7 @@ const JobMaterialsTable = memo();},meta: {+ mobile: "P1",icon: <LuBookMarked />,// Filter by item id (a real column) so it filters server-side;// scoped to items on this job, with the readable id as the label.@@ -295,6 +296,7 @@ const JobMaterialsTable = memo(/>),meta: {+ mobile: "P2",icon: <LuShoppingCart />,// `header` is JSX (tooltip), so name the column for the filter UI.filterHeader: t`Status`,@@ -400,6 +402,7 @@ const JobMaterialsTable = memo(),cell: ({ row }) => formatter.format(row.original.estimatedQuantity),meta: {+ mobile: "P2",icon: <LuHash />}},diff --git a/apps/erp/app/modules/production/ui/Jobs/JobOperationStepRecordsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobOperationStepRecordsTable.tsxindex 76fa22aa9c..f4c114f7c2 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobOperationStepRecordsTable.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobOperationStepRecordsTable.tsx@@ -80,6 +80,7 @@ const JobOperationStepRecordsTable = memo(header: t`Step`,cell: ({ row }) => row.original.name,meta: {+ mobile: "P1",icon: <LuClipboardList />}},@@ -175,6 +176,7 @@ const JobOperationStepRecordsTable = memo(}},meta: {+ mobile: "P2",icon: <LuFileText />}},@@ -188,6 +190,7 @@ const JobOperationStepRecordsTable = memo(</div>),meta: {+ mobile: "P2",icon: <LuList />,filter: {type: "static",@@ -213,6 +216,7 @@ const JobOperationStepRecordsTable = memo(/>),meta: {+ mobile: "P3",icon: <LuUser />}},diff --git a/apps/erp/app/modules/production/ui/Jobs/JobOperationsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobOperationsTable.tsxindex 5a4e330ed8..6453ab70b0 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobOperationsTable.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobOperationsTable.tsx@@ -127,6 +127,7 @@ const JobOperationsTable = memo(({ data, count }: JobOperationsTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuClipboardList />}},@@ -254,6 +255,7 @@ const JobOperationsTable = memo(({ data, count }: JobOperationsTableProps) => {return (<Table<JobOperation>+ mobileLayout="table"compactcount={count}columns={columns}diff --git a/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx b/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsxindex 5a5fda4333..9c7f035a81 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx@@ -328,7 +328,7 @@ const JobProperties = () => {</Badge></Hyperlink><Button- className="group-hover:opacity-100 opacity-0 transition-opacity duration-200"+ className="group-hover:opacity-100 opacity-0 transition-opacity duration-200 compact:opacity-100"variant="ghost"size="sm"leftIcon={<LuUnlink2 className="w-3 h-3" />}diff --git a/apps/erp/app/modules/production/ui/Jobs/JobsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobsTable.tsxindex 2a61e51579..9d0bf153ac 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobsTable.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobsTable.tsx@@ -17,6 +17,7 @@ import {MenuIcon,MenuItem,toast,+ useCompact,useDisclosure,VStack} from "@carbon/react";@@ -154,6 +155,7 @@ const JobsTable = memo((props: JobsTableProps) => {const { data, count, tags, batchesByJobId = {} } = props;const navigate = useNavigate();const { t } = useLingui();+ const isCompact = useCompact();const [params] = useUrlParams();const parts = useParts();const tools = useTools();@@ -219,6 +221,7 @@ const JobsTable = memo((props: JobsTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -236,6 +239,7 @@ const JobsTable = memo((props: JobsTableProps) => {);},meta: {+ mobile: "P3",filter: {type: "static",options: items?.map((item) => ({@@ -291,6 +295,7 @@ const JobsTable = memo((props: JobsTableProps) => {);},meta: {+ mobile: "P2",filter: {type: "static",options: jobStatus.map((status) => ({@@ -352,9 +357,21 @@ const JobsTable = memo((props: JobsTableProps) => {/>);}+ // Phones: no column header, so the number carries its unit.+ if (isCompact && row.original.unitOfMeasureCode) {+ return (+ <>+ {quantity}+ <span className="ml-1 text-[13px] text-muted-foreground">+ {row.original.unitOfMeasureCode}+ </span>+ </>+ );+ }return quantity;},meta: {+ mobile: "P2",icon: <LuHash />,renderTotal: true}@@ -655,7 +672,7 @@ const JobsTable = memo((props: JobsTableProps) => {}];return [...defaultColumns, ...customColumns];- }, [params, customColumns, trackedEntities, batchesByJobId]);+ }, [params, customColumns, trackedEntities, batchesByJobId, isCompact]);const fetcher = useAction<typeof action>({onError: (data) => {diff --git a/apps/erp/app/modules/production/ui/Jobs/ProductionEventsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/ProductionEventsTable.tsxindex 006746edc9..84cf3e1e5f 100644--- a/apps/erp/app/modules/production/ui/Jobs/ProductionEventsTable.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/ProductionEventsTable.tsx@@ -56,6 +56,7 @@ const ProductionEventsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",filter: {type: "static",options: operations.map((operation) => ({@@ -80,6 +81,7 @@ const ProductionEventsTable = memo(<EmployeeAvatar employeeId={row.original.employeeId} />),meta: {+ mobile: "P3",filter: {type: "static",options: people.map((employee) => ({@@ -107,6 +109,7 @@ const ProductionEventsTable = memo(</Badge>),meta: {+ mobile: "P2",filter: {type: "static",options: ["Setup", "Labor", "Machine"].map((type) => ({@@ -135,7 +138,8 @@ const ProductionEventsTable = memo(cell: ({ row }) =>row.original.duration? formatDurationMilliseconds(row.original.duration * 1000)- : null+ : null,+ meta: { mobile: "P2" }},{accessorKey: "workCenterId",diff --git a/apps/erp/app/modules/production/ui/Jobs/ProductionQuantitiesTable.tsx b/apps/erp/app/modules/production/ui/Jobs/ProductionQuantitiesTable.tsxindex d369b9aede..0180e1bbf6 100644--- a/apps/erp/app/modules/production/ui/Jobs/ProductionQuantitiesTable.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/ProductionQuantitiesTable.tsx@@ -52,6 +52,7 @@ const ProductionQuantitiesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",filter: {type: "static",options: operations.map((operation) => ({@@ -76,6 +77,7 @@ const ProductionQuantitiesTable = memo(<EmployeeAvatar employeeId={row.original.createdBy} />),meta: {+ mobile: "P3",filter: {type: "static",options: people.map((employee) => ({@@ -102,6 +104,7 @@ const ProductionQuantitiesTable = memo(</Badge>),meta: {+ mobile: "P2",filter: {type: "static",options: ["Production", "Rework", "Scrap"].map((type) => ({@@ -126,7 +129,8 @@ const ProductionQuantitiesTable = memo({accessorKey: "quantity",header: t`Quantity`,- cell: ({ row }) => row.original.quantity+ cell: ({ row }) => row.original.quantity,+ meta: { mobile: "P2" }},{accessorKey: "scrapReasonId",diff --git a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsxindex 8c34b780f1..df045b43ae 100644--- a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx+++ b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx@@ -371,6 +371,7 @@ const ProductionPlanningTable = ({</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -418,6 +419,7 @@ const ProductionPlanningTable = ({);},meta: {+ mobile: "P2",filter: {type: "static",options: itemReorderingPolicies.map((policy) => ({@@ -449,6 +451,8 @@ const ProductionPlanningTable = ({);},meta: {+ mobile: "P2",+ mobileLabel: true,icon: <LuCirclePlay />}},diff --git a/apps/erp/app/modules/production/ui/Procedures/ProcedureExplorer.tsx b/apps/erp/app/modules/production/ui/Procedures/ProcedureExplorer.tsxindex 99a19da879..e02c0155eb 100644--- a/apps/erp/app/modules/production/ui/Procedures/ProcedureExplorer.tsx+++ b/apps/erp/app/modules/production/ui/Procedures/ProcedureExplorer.tsx@@ -571,7 +571,7 @@ function ProcedureStepItem({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}@@ -663,7 +663,7 @@ function ProcedureParameterItem({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/production/ui/Procedures/ProcedureHeader.tsx b/apps/erp/app/modules/production/ui/Procedures/ProcedureHeader.tsxindex 57c60342eb..1c066c6cf1 100644--- a/apps/erp/app/modules/production/ui/Procedures/ProcedureHeader.tsx+++ b/apps/erp/app/modules/production/ui/Procedures/ProcedureHeader.tsx@@ -4,31 +4,19 @@import {Badge,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import type { PostgrestResponse } from "@supabase/supabase-js";import { Suspense, useEffect } from "react";-import {- LuEllipsisVertical,- LuPanelLeft,- LuPanelRight,- LuTrash-} from "react-icons/lu";+import { LuTrash } from "react-icons/lu";import { Await, useParams } from "react-router";import { VersionMenu } from "~/components";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";import { useDocumentStore } from "~/stores";@@ -60,85 +48,76 @@ const ProcedureHeader = () => {newVersionDisclosure.onClose();}, [id]);+ const versionBadge = (+ <Badge variant="outline">V{routeData?.procedure?.version}</Badge>+ );+ const statusBadge = <ProcedureStatus status={routeData?.procedure?.status} />;+ const menuItems = (+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "production") || !permissions.is("employee")+ }+ destructive+ onClick={deleteDisclosure.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Procedure</Trans>+ </DropdownMenuItem>+ );+return (- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0} className="flex-grow">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Heading size="h4" className="flex items-center gap-2">- <span>{displayName}</span>- <Badge variant="outline">V{routeData?.procedure?.version}</Badge>- <ProcedureStatus status={routeData?.procedure?.status} />- </Heading>- <Copy text={routeData?.procedure?.name ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "production") ||- !permissions.is("employee")- }- destructive- onClick={deleteDisclosure.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Procedure</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>- <div className="flex flex-shrink-0 gap-1 items-center justify-end">- <Suspense fallback={null}>- <Await resolve={routeData?.versions}>- {(versions) => {- const allVersions =- versions?.data ??- (routeData?.procedure ? [routeData.procedure] : []);- return (- <VersionMenu- versions={allVersions}- currentVersionId={id}- getKey={(v) => v.id}- getHref={(v) => path.to.procedure(v.id)}- renderLabel={(v) => (- <>- <Badge variant="outline">V{v.version}</Badge>- <span>{v.name}</span>- </>- )}- renderStatus={(v) => <ProcedureStatus status={v.status} />}- onNewVersion={- permissions.can("create", "production")- ? newVersionDisclosure.onOpen- : undefined- }- />- );- }}- </Await>- </Suspense>- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </div>+ <>+ <RecordHeader+ title={displayName}+ copyValue={routeData?.procedure?.name ?? ""}+ menu={menuItems}+ status={+ <>+ {versionBadge}+ {statusBadge}+ </>+ }+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ <RecordAction slot="overflow">+ <Suspense fallback={null}>+ <Await resolve={routeData?.versions}>+ {(versions) => {+ const allVersions =+ versions?.data ??+ (routeData?.procedure ? [routeData.procedure] : []);+ return (+ <VersionMenu+ versions={allVersions}+ currentVersionId={id}+ getKey={(v) => v.id}+ getHref={(v) => path.to.procedure(v.id)}+ renderLabel={(v) => (+ <>+ <Badge variant="outline">V{v.version}</Badge>+ <span>{v.name}</span>+ </>+ )}+ renderStatus={(v) => (+ <ProcedureStatus status={v.status} />+ )}+ onNewVersion={+ permissions.can("create", "production")+ ? newVersionDisclosure.onOpen+ : undefined+ }+ />+ );+ }}+ </Await>+ </Suspense>+ </RecordAction>+ </>+ }+ />{newVersionDisclosure.isOpen && (<ProcedureFormtype="copy"@@ -167,7 +146,7 @@ const ProcedureHeader = () => {}}/>)}- </div>+ </>);};diff --git a/apps/erp/app/modules/production/ui/Procedures/ProceduresTable.tsx b/apps/erp/app/modules/production/ui/Procedures/ProceduresTable.tsxindex 4d1b64a330..3a5d8922f2 100644--- a/apps/erp/app/modules/production/ui/Procedures/ProceduresTable.tsx+++ b/apps/erp/app/modules/production/ui/Procedures/ProceduresTable.tsx@@ -70,6 +70,7 @@ const ProceduresTable = memo(({ data, tags, count }: ProceduresTableProps) => {</div>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -85,6 +86,7 @@ const ProceduresTable = memo(({ data, tags, count }: ProceduresTableProps) => {/>),meta: {+ mobile: "P2",icon: <TbRoute />,filter: {type: "static",@@ -97,6 +99,8 @@ const ProceduresTable = memo(({ data, tags, count }: ProceduresTableProps) => {header: t`Status`,cell: ({ row }) => <ProcedureStatus status={row.original.status} />,meta: {+ mobile: "P2",+ mobilePill: true,icon: <LuCalendar />}},@@ -107,6 +111,7 @@ const ProceduresTable = memo(({ data, tags, count }: ProceduresTableProps) => {<EmployeeAvatar employeeId={row.original.assignee} />),meta: {+ mobile: "P3",icon: <LuUser />}},diff --git a/apps/erp/app/modules/production/ui/Schedule/ForecastHeader.tsx b/apps/erp/app/modules/production/ui/Schedule/ForecastHeader.tsxindex 8b8502d59f..501eda1329 100644--- a/apps/erp/app/modules/production/ui/Schedule/ForecastHeader.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/ForecastHeader.tsx@@ -213,7 +213,7 @@ export function ForecastHeader({}, [weekStart, locale]);return (- <HStack className="pl-2 pr-4 py-2 flex flex-wrap gap-y-2 justify-between bg-card border-b border-border">+ <HStack className="pl-2 pr-4 py-2 flex flex-wrap gap-y-2 justify-between bg-card border-b border-border compact:pl-4"><HStack className="flex-wrap gap-y-2"><HStack spacing={2} className="flex-wrap gap-y-2"><Comboboxdiff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/DateKanban.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/DateKanban.tsxindex 50d106ae8b..2a957fb960 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/DateKanban.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/DateKanban.tsx@@ -34,12 +34,13 @@ import { useFetchers, useSubmit } from "react-router";import { path } from "~/utils/path";import { BoardContainer, ColumnCard } from "./components/ColumnCard";import { JobCard } from "./components/JobCard";-import { KanbanProvider } from "./context/KanbanContext";+import { type KanbanMoveTo, KanbanProvider } from "./context/KanbanContext";import { getDateOnly, getPendingDueDate } from "./date-utils";import {comparePriorityThenId,createDragOrigin,type DragOrigin,+ type DragPlacement,type DragPreview,getColumnPlacement,getItemPlacement,@@ -310,6 +311,18 @@ const DateKanban = ({}));+ function createDateDragOrigin(activeItem: JobItem): DateDragOrigin | null {+ const placementOrigin = createDragOrigin(baseItems, activeItem);+ if (!placementOrigin) return null;+ return {+ ...placementOrigin,+ dueDate:+ activeItem.dueDate === undefined+ ? undefined+ : getDateOnly(activeItem.dueDate)+ };+ }+function clearDragState() {dragOriginRef.current = null;setDragState(null);@@ -330,19 +343,12 @@ const DateKanban = ({return;}- const placementOrigin = createDragOrigin(baseItems, activeItem);- if (!placementOrigin) {+ const origin = createDateDragOrigin(activeItem);+ if (!origin) {clearDragState();return;}- const origin: DateDragOrigin = {- ...placementOrigin,- dueDate:- activeItem.dueDate === undefined- ? undefined- : getDateOnly(activeItem.dueDate)- };dragOriginRef.current = origin;setDragState({ origin, preview: null });}@@ -392,33 +398,7 @@ const DateKanban = ({): null;- if (- origin &&- origin.dueDate !== undefined &&- placement &&- !isSamePlacement(origin.placement, placement)- ) {- const isSameDisplayBucket =- placement.columnId === origin.placement.columnId;- submit(- {- id: origin.item.id,- locationId,- columnId: isSameDisplayBucket- ? (origin.dueDate ?? origin.placement.columnId)- : placement.columnId,- optimisticColumnId: placement.columnId,- priority: placement.priority- },- {- method: "post",- action: path.to.priorityDatesUpdate,- navigate: false,- flushSync: true,- fetcherKey: `job:${origin.item.id}`- }- );- }+ if (origin && placement) submitPlacement(origin, placement);clearDragState();}@@ -427,6 +407,57 @@ const DateKanban = ({clearDragState();}+ function submitPlacement(origin: DateDragOrigin, placement: DragPlacement) {+ if (+ origin.dueDate === undefined ||+ isSamePlacement(origin.placement, placement)+ ) {+ return;+ }+ const isSameDisplayBucket =+ placement.columnId === origin.placement.columnId;+ submit(+ {+ id: origin.item.id,+ locationId,+ columnId: isSameDisplayBucket+ ? (origin.dueDate ?? origin.placement.columnId)+ : placement.columnId,+ optimisticColumnId: placement.columnId,+ priority: placement.priority+ },+ {+ method: "post",+ action: path.to.priorityDatesUpdate,+ navigate: false,+ flushSync: true,+ fetcherKey: `job:${origin.item.id}`+ }+ );+ }++ // Phones: "Move to" on a card makes the same move as dropping it on that+ // column's background.+ const moveTo: KanbanMoveTo = {+ targetsFor: (itemId) => {+ const item = itemsById.get(itemId);+ if (!item || item.dueDate === undefined) return [];+ return columnOrder.flatMap((columnId) => {+ const column = columnsMap.get(columnId);+ return column && column.id !== item.columnId+ ? [{ id: column.id, title: column.title }]+ : [];+ });+ },+ onMove: (itemId, columnId) => {+ const activeItem = itemsById.get(itemId);+ const origin = activeItem ? createDateDragOrigin(activeItem) : null;+ if (!origin) return;+ const placement = getColumnPlacement(origin, baseItems, columnId);+ if (placement) submitPlacement(origin, placement);+ }+ };+const isInitialMount = useRef(true);useEffect(() => {@@ -443,6 +474,7 @@ const DateKanban = ({setSelectedGroup={setSelectedGroup}tags={tags}columnIds={columns.map((col) => col.id)}+ moveTo={moveTo}><DateDragPreviewContext.Provider value={dragState}><DndContextdiff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/Kanban.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/Kanban.tsxindex ee68d285e6..873c1b868d 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/Kanban.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/Kanban.tsx@@ -29,6 +29,7 @@ import { path } from "~/utils/path";import { BatchItemCard } from "./components/BatchItemCard";import { BoardContainer, ColumnCard } from "./components/ColumnCard";import { ItemCard } from "./components/ItemCard";+import type { KanbanMoveTo } from "./context/KanbanContext";import { KanbanProvider } from "./context/KanbanContext";import {calculateFractionalPriority,@@ -308,40 +309,50 @@ function resolveDragCommit(}if (overData?.type === "column") {- if (- overData.column.id !== overId ||- !columnsById.has(overId) ||- overId === origin.placement.columnId- ) {- return null;- }+ if (overData.column.id !== overId) return null;+ return resolveColumnCommit(origin, items, columnsById, overId);+ }- const destinationColumn = columnsById.get(overId);- if (!destinationColumn?.type.includes(origin.item.columnType)) {- return null;- }+ return null;+}- const placement = getColumnPlacement(origin, items, overId);- if (placement) {- return {- columnId: overId,- updates: [{ id: origin.item.id, priority: placement.priority }]- };- }+/**+ * The priority writes for dropping a card on a column's background (it lands+ * at the column's end). Shared by the drop and by the phone "Move to" menu.+ */+function resolveColumnCommit(+ origin: OperationDragOrigin,+ items: readonly Item[],+ columnsById: ReadonlyMap<string, Column>,+ columnId: string+): DragCommit | null {+ if (!columnsById.has(columnId) || columnId === origin.placement.columnId) {+ return null;+ }- // A background/empty-column drop whose origin priority collides with an- // existing card — renumber, appending the dragged op to the column's end.- const destinationItems = getItemsInColumn(items, overId, origin.item.id);- const updates = planColumnReorder(- origin,- items,- overId,- destinationItems.length- );- return updates.length ? { columnId: overId, updates } : null;+ const destinationColumn = columnsById.get(columnId);+ if (!destinationColumn?.type.includes(origin.item.columnType)) {+ return null;}- return null;+ const placement = getColumnPlacement(origin, items, columnId);+ if (placement) {+ return {+ columnId,+ updates: [{ id: origin.item.id, priority: placement.priority }]+ };+ }++ // A background/empty-column drop whose origin priority collides with an+ // existing card — renumber, appending the dragged op to the column's end.+ const destinationItems = getItemsInColumn(items, columnId, origin.item.id);+ const updates = planColumnReorder(+ origin,+ items,+ columnId,+ destinationItems.length+ );+ return updates.length ? { columnId, updates } : null;}const Kanban = ({@@ -548,12 +559,29 @@ const Kanban = ({}};+ const moveTo: KanbanMoveTo = {+ targetsFor: (itemId) => {+ const item = itemsById.get(itemId);+ if (!item) return [];+ return columnOrder.flatMap((columnId) => {+ const column = columnsById.get(columnId);+ return column &&+ column.id !== item.columnId &&+ column.type.includes(item.columnType)+ ? [{ id: column.id, title: column.title }]+ : [];+ });+ },+ onMove: moveToColumn+ };+return (<KanbanProviderdisplaySettings={displaySettings}selectedGroup={selectedGroup}setSelectedGroup={setSelectedGroup}tags={tags}+ moveTo={moveTo}><KanbanDragPreviewContext.Provider value={dragState}><DndContext@@ -729,73 +757,86 @@ const Kanban = ({columnsById);- if (commit) {- if (- isBatchItem(origin.item) &&- commit.columnId !== origin.placement.columnId- ) {- // A batch dropped on a DIFFERENT work center reassigns the whole batch- // (the server fn writes the work center to every member) and reschedules;- // the priority renumber is left to the resulting replan wave.+ if (commit) submitCommit(origin, commit);+ }++ clearDragState();+ }++ // Persists a resolved move: each moved card writes through its own endpoint.+ function submitCommit(origin: OperationDragOrigin, commit: DragCommit) {+ if (+ isBatchItem(origin.item) &&+ commit.columnId !== origin.placement.columnId+ ) {+ // A batch dropped on a DIFFERENT work center reassigns the whole batch+ // (the server fn writes the work center to every member) and reschedules;+ // the priority renumber is left to the resulting replan wave.+ submit(+ {+ intent: "update",+ batchId: origin.item.batchId,+ workCenterId: commit.columnId+ },+ {+ method: "post",+ action: path.to.priorityBatchingUpdate,+ navigate: false,+ flushSync: true,+ fetcherKey: `item:${origin.item.id}`+ }+ );+ } else {+ // Within-column reorder (or a non-batch cross-column move). Each+ // renumbered card writes through its own endpoint: an operation writes+ // its priority (+ work center), a batch card writes every member's+ // priority so min(member) lands at the batch's new dispatch slot.+ const flushSync = commit.updates.length === 1;+ for (const update of commit.updates) {+ const target = itemsById.get(update.id);+ if (target && isBatchItem(target)) {submit({- intent: "update",- batchId: origin.item.batchId,- workCenterId: commit.columnId+ intent: "reprioritize",+ batchId: target.batchId,+ priority: update.priority},{method: "post",action: path.to.priorityBatchingUpdate,navigate: false,- flushSync: true,- fetcherKey: `item:${origin.item.id}`+ flushSync,+ fetcherKey: `item:${update.id}`});} else {- // Within-column reorder (or a non-batch cross-column move). Each- // renumbered card writes through its own endpoint: an operation writes- // its priority (+ work center), a batch card writes every member's- // priority so min(member) lands at the batch's new dispatch slot.- const flushSync = commit.updates.length === 1;- for (const update of commit.updates) {- const target = itemsById.get(update.id);- if (target && isBatchItem(target)) {- submit(- {- intent: "reprioritize",- batchId: target.batchId,- priority: update.priority- },- {- method: "post",- action: path.to.priorityBatchingUpdate,- navigate: false,- flushSync,- fetcherKey: `item:${update.id}`- }- );- } else {- submit(- {- id: update.id,- columnId: commit.columnId,- priority: update.priority- },- {- method: "post",- action: path.to.priorityOperationUpdate,- navigate: false,- flushSync,- fetcherKey: `item:${update.id}`- }- );+ submit(+ {+ id: update.id,+ columnId: commit.columnId,+ priority: update.priority+ },+ {+ method: "post",+ action: path.to.priorityOperationUpdate,+ navigate: false,+ flushSync,+ fetcherKey: `item:${update.id}`}- }+ );}}}+ }- clearDragState();+ // Phones: "Move to" on a card makes the same move as dropping it on that+ // column's background.+ function moveToColumn(itemId: string, columnId: string) {+ const activeItem = itemsById.get(itemId);+ const origin = activeItem ? createDragOrigin(items, activeItem) : null;+ if (!origin) return;+ const commit = resolveColumnCommit(origin, items, columnsById, columnId);+ if (commit) submitCommit(origin, commit);}function onDragOver(event: DragOverEvent) {diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/BatchItemCard.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/BatchItemCard.tsxindex 9fd578f032..ef8d00b61e 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/BatchItemCard.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/BatchItemCard.tsx@@ -37,6 +37,7 @@ import {import { useFetcher } from "react-router";import { CustomerAvatar, OperationStatusIcon } from "~/components";import { ConfirmDelete } from "~/components/Modals";+import { MoveToSubmenu } from "~/components/MoveToSubmenu";import { useDateFormatter } from "~/hooks";import { path } from "~/utils/path";import { KANBAN_CARD_SHELL } from "../cardShell";@@ -87,7 +88,7 @@ export function BatchItemCard({}) {const { t } = useLingui();const { formatRelativeTime } = useDateFormatter();- const { displaySettings } = useKanban();+ const { displaySettings, moveTo } = useKanban();const scheduleToday = useScheduleToday();const fetcher = useFetcher();const isCompleting = item.batchStatus === "Completing";@@ -238,6 +239,12 @@ export function BatchItemCard({{t`Dissolve batch`}</DropdownMenuItem>)}+ {moveTo && !isCompleting && (+ <MoveToSubmenu+ getTargets={() => moveTo.targetsFor(item.id)}+ onMove={(columnId) => moveTo.onMove(item.id, columnId)}+ />+ )}</DropdownMenuContent></DropdownMenu></HStack>@@ -334,7 +341,7 @@ export function BatchItemCard({icon={<LuX />}variant="ghost"size="sm"- className="opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive"+ className="opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive compact:opacity-100"onClick={() => setRemoving(m)}/>)}diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ColumnCard.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ColumnCard.tsxindex da5728d578..aa2864089e 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ColumnCard.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ColumnCard.tsx@@ -107,6 +107,8 @@ export function ColumnCard<T extends Item = Item>({`${variants({dragging: isOverlay ? "overlay" : isDragging ? "over" : undefined})} flex flex-col p-[1px] pt-0`,+ // Phones: one column with a peek of the next.+ "compact:w-[300px]",currentFilters.length > 0? `h-[calc(100dvh-var(--header-height)*2-var(--filters-height))]`: `h-[calc(100dvh-var(--header-height)*2)]`@@ -212,7 +214,7 @@ export function BoardContainer({ children }: { children: React.ReactNode }) {>{/* min-w-max: the row must span the full scroll width so a stickycolumn keeps sticking past the first viewport-width of scrolling */}- <div className="flex min-w-max gap-0 items-start flex-row justify-start p-0">+ <div className="flex min-w-max gap-0 items-start flex-row justify-start p-0 compact:px-4">{children}</div><ScrollBar orientation="horizontal" forceMount className="h-5" />diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsxindex 564a94f468..0a14638eaa 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx@@ -51,6 +51,7 @@ import { Link } from "react-router";import { z } from "zod";import { Assignee, CustomerAvatar, EmployeeAvatarGroup } from "~/components";import { Tags } from "~/components/Form";+import { MoveToSubmenu } from "~/components/MoveToSubmenu";import { useDateFormatter } from "~/hooks";import { useTags } from "~/hooks/useTags";import { JobOperationStatus } from "~/modules/production/ui/Jobs/JobOperationStatus";@@ -119,7 +120,7 @@ function OperationCard({}) {const { t } = useLingui();const { formatRelativeTime } = useDateFormatter();- const { displaySettings, selectedGroup, setSelectedGroup, tags } =+ const { displaySettings, selectedGroup, setSelectedGroup, tags, moveTo } =useKanban();const {setNodeRef,@@ -258,6 +259,12 @@ function OperationCard({Open in MES</a></DropdownMenuItem>+ {moveTo && (+ <MoveToSubmenu+ getTargets={() => moveTo.targetsFor(item.id)}+ onMove={(columnId) => moveTo.onMove(item.id, columnId)}+ />+ )}</DropdownMenuContent></DropdownMenu></HStack>diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/JobCard.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/JobCard.tsxindex af3fba426c..2afe48f9a2 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/JobCard.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/JobCard.tsx@@ -44,6 +44,7 @@ import {import { RiProgress8Line } from "react-icons/ri";import { Link, useSubmit } from "react-router";import { Assignee, DateTime, EmployeeAvatarGroup } from "~/components";+import { MoveToSubmenu } from "~/components/MoveToSubmenu";import { getDeadlineIcon } from "~/modules/production/ui/Jobs/Deadline";import { useCustomers } from "~/stores";import { getPrivateUrl, path } from "~/utils/path";@@ -108,9 +109,13 @@ export function JobCard({}: JobCardProps) {const { t } = useLingui();const submit = useSubmit();- // biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { displaySettings, selectedGroup, setSelectedGroup, tags, columnIds } =- useKanban();+ const {+ displaySettings,+ selectedGroup,+ setSelectedGroup,+ columnIds,+ moveTo+ } = useKanban();const {setNodeRef,attributes,@@ -309,6 +314,12 @@ export function JobCard({/>{isHighlighted ? "Remove Highlight" : "Highlight Job"}</DropdownMenuItem>+ {moveTo && (+ <MoveToSubmenu+ getTargets={() => moveTo.targetsFor(item.id)}+ onMove={(columnId) => moveTo.onMove(item.id, columnId)}+ />+ )}</DropdownMenuContent></DropdownMenu></HStack>diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/context/KanbanContext.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/context/KanbanContext.tsxindex 7ea50f431b..78c7f253cc 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/context/KanbanContext.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/context/KanbanContext.tsx@@ -6,12 +6,19 @@ import type { ReactNode } from "react";import { createContext, useContext } from "react";import type { DisplaySettings } from "../types";+/** Tap-to-move for a card (phones): its target columns and the drop's move. */+export type KanbanMoveTo = {+ targetsFor: (itemId: string) => { id: string; title: string }[];+ onMove: (itemId: string, columnId: string) => void;+};+interface KanbanContextType {displaySettings: DisplaySettings;selectedGroup: string | null;setSelectedGroup: (jobId: string | null) => void;tags: { name: string }[];columnIds?: string[];+ moveTo?: KanbanMoveTo;}const KanbanContext = createContext<KanbanContextType | null>(null);@@ -23,6 +30,7 @@ interface KanbanProviderProps {setSelectedGroup: (jobId: string | null) => void;tags: { name: string }[];columnIds?: string[];+ moveTo?: KanbanMoveTo;}export function KanbanProvider({@@ -31,7 +39,8 @@ export function KanbanProvider({selectedGroup,setSelectedGroup,tags,- columnIds+ columnIds,+ moveTo}: KanbanProviderProps) {return (<KanbanContext.Provider@@ -40,7 +49,8 @@ export function KanbanProvider({selectedGroup,setSelectedGroup,tags,- columnIds+ columnIds,+ moveTo}}>{children}diff --git a/apps/erp/app/modules/production/ui/Schedule/OutboundTable.tsx b/apps/erp/app/modules/production/ui/Schedule/OutboundTable.tsxindex 6ed6efabe4..18039a1e7d 100644--- a/apps/erp/app/modules/production/ui/Schedule/OutboundTable.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/OutboundTable.tsx@@ -138,6 +138,7 @@ const OutboundTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -193,6 +194,7 @@ const OutboundTable = memo(<CustomerAvatar customerId={row.original.customerId} />),meta: {+ mobile: "P3",icon: <LuSquareUser />}},@@ -263,14 +265,18 @@ const OutboundTable = memo(id: "progress",header: t`Progress`,// No attachments here, so the portal-only customerId is never read.+ // Phones: the strip scrolls sideways so segment labels stay whole.cell: ({ row }) => (- <JobOperationProgress- customerId=""- jobOperations={row.original.operations}- jobOperationAttachments={{}}- />+ <div className="contents compact:block compact:max-w-full compact:overflow-x-auto compact:scroll-fade-x compact:[&>div>*]:shrink-0">+ <JobOperationProgress+ customerId=""+ jobOperations={row.original.operations}+ jobOperationAttachments={{}}+ />+ </div>),meta: {+ mobile: "P2",filterHeader: t`Progress`,exportValue: (row) =>`${row.operations.filter((op) => op.status === "Done").length}/${row.operations.length}`diff --git a/apps/erp/app/modules/production/ui/Schedule/People/PeopleColumn.tsx b/apps/erp/app/modules/production/ui/Schedule/People/PeopleColumn.tsxindex 5c31f99339..c94d313177 100644--- a/apps/erp/app/modules/production/ui/Schedule/People/PeopleColumn.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/People/PeopleColumn.tsx@@ -69,7 +69,10 @@ export function PeopleColumn({className={cn("w-[300px] max-w-full flex flex-col flex-shrink-0 snap-center rounded-none bg-card/30 border-0 border-r h-[calc(100dvh-var(--header-height)*2)]",sticky && "sticky left-0 z-10 bg-card transition-shadow",- sticky && isScrolled && "shadow-[6px_0_12px_-6px_rgba(0,0,0,0.15)]"+ sticky && isScrolled && "shadow-[6px_0_12px_-6px_rgba(0,0,0,0.15)]",+ // Phones: a pinned 300px column would leave no room for the rest, so+ // Unassigned scrolls with the board like any other column.+ sticky && "compact:static compact:shadow-none")}><div className="p-4 w-full font-semibold text-left flex flex-row items-center gap-2 sticky top-0 z-1 border-b bg-card">diff --git a/apps/erp/app/modules/production/ui/Schedule/People/PeopleHeader.tsx b/apps/erp/app/modules/production/ui/Schedule/People/PeopleHeader.tsxindex 875e7d5f46..f26d6bd68c 100644--- a/apps/erp/app/modules/production/ui/Schedule/People/PeopleHeader.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/People/PeopleHeader.tsx@@ -190,7 +190,7 @@ export function PeopleHeader({};return (- <HStack className="pl-2 pr-4 py-2 flex flex-wrap gap-y-2 justify-between bg-card border-b border-border">+ <HStack className="pl-2 pr-4 py-2 flex flex-wrap gap-y-2 justify-between bg-card border-b border-border compact:pl-4"><HStack className="flex-wrap gap-y-2"><HStack spacing={2} className="flex-wrap gap-y-2"><Comboboxdiff --git a/apps/erp/app/modules/production/ui/Schedule/People/PeopleWeekBoard.tsx b/apps/erp/app/modules/production/ui/Schedule/People/PeopleWeekBoard.tsxindex 9b0f7596ad..efb7119b44 100644--- a/apps/erp/app/modules/production/ui/Schedule/People/PeopleWeekBoard.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/People/PeopleWeekBoard.tsx@@ -25,6 +25,7 @@ import { createPortal } from "react-dom";import { LuGripVertical, LuX } from "react-icons/lu";import { useSubmit } from "react-router";import { EmployeeAvatar } from "~/components";+import { type MoveTarget, MoveToMenu } from "~/components/MoveToSubmenu";import { usePermissions } from "~/hooks";import { path } from "~/utils/path";import { BoardContainer } from "../Kanban/components/ColumnCard";@@ -83,12 +84,17 @@ function WeekCard({item,isOverlay,isDisabled,- onRemove+ onRemove,+ getMoveTargets = () => [],+ onMove}: {item: WeekCardItem;isOverlay?: boolean;isDisabled?: boolean;onRemove: (item: WeekCardItem) => void;+ /** Phones: the other columns, for the card's "Move to" menu. */+ getMoveTargets?: () => MoveTarget[];+ onMove?: (item: WeekCardItem, columnId: string) => void;}) {const {setNodeRef,@@ -143,13 +149,21 @@ function WeekCard({<buttontype="button"aria-label="Remove"- className="rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-red-600 dark:hover:text-red-400"+ className="rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-red-600 dark:hover:text-red-400 compact:hit-area"onPointerDown={(e) => e.stopPropagation()}onClick={() => onRemove(item)}><LuX className="h-3.5 w-3.5" /></button>)}+ {/* Phones: the card has no menu on desktop, where moving is drag+ only; this holds just the drop's move, reachable by tap. */}+ {onMove && !isDisabled && !isOverlay && (+ <MoveToMenu+ getTargets={getMoveTargets}+ onMove={(columnId) => onMove(item, columnId)}+ />+ )}</div></div>{item.abilities.length > 0 && (@@ -174,7 +188,9 @@ function WeekColumn({items,isDisabled,sticky = false,- onRemove+ onRemove,+ columnTargets = [],+ onMove}: {id: string;title: string;@@ -182,6 +198,9 @@ function WeekColumn({isDisabled: boolean;sticky?: boolean;onRemove: (item: WeekCardItem) => void;+ /** Every column of the board, for the cards' "Move to" menu. */+ columnTargets?: MoveTarget[];+ onMove?: (item: WeekCardItem, columnId: string) => void;}) {const { setNodeRef } = useSortable({id,@@ -213,7 +232,10 @@ function WeekColumn({className={cn("w-[300px] max-w-full flex flex-col flex-shrink-0 snap-center rounded-none bg-card/30 border-0 border-r h-[calc(100dvh-var(--header-height)*2)]",sticky && "sticky left-0 z-10 bg-card transition-shadow",- sticky && isScrolled && "shadow-[6px_0_12px_-6px_rgba(0,0,0,0.15)]"+ sticky && isScrolled && "shadow-[6px_0_12px_-6px_rgba(0,0,0,0.15)]",+ // Phones: a pinned 300px column would leave no room for the rest, so+ // Unassigned scrolls with the board like any other column.+ sticky && "compact:static compact:shadow-none")}><div className="p-4 w-full font-semibold text-left flex flex-row items-center sticky top-0 z-1 border-b bg-card">@@ -229,6 +251,8 @@ function WeekColumn({item={item}isDisabled={isDisabled}onRemove={onRemove}+ getMoveTargets={() => columnTargets.filter((c) => c.id !== id)}+ onMove={onMove}/>))}{/* the dashed box doubles as the drop affordance — an empty@@ -397,6 +421,12 @@ const PeopleWeekBoard = ({}if (!targetColumnId) return;+ moveToColumn(item, targetColumnId);+ }++ // The drop's move; phones also reach it from a card's "Move to" menu.+ function moveToColumn(item: WeekCardItem, targetColumnId: string) {+ if (isDisabled) return;const currentColumnId = item.workCenterId ?? UNASSIGNED;if (targetColumnId === currentColumnId) return;@@ -442,6 +472,14 @@ const PeopleWeekBoard = ({toast.success(t`Assigned ${employeeName} to ${targetName} for the week`);}+ const columnTargets: MoveTarget[] = [+ { id: UNASSIGNED, title: t`Unassigned` },+ ...workCenters.map((workCenter) => ({+ id: workCenter.id,+ title: workCenter.name+ }))+ ];+const onRemove = (item: WeekCardItem) => {if (!item.workCenterId) return;const weekShiftId = shiftForEmployee(item.employee.id);@@ -469,6 +507,8 @@ const PeopleWeekBoard = ({isDisabled={isDisabled}stickyonRemove={onRemove}+ columnTargets={columnTargets}+ onMove={moveToColumn}/>{workCenters.map((workCenter) => (<WeekColumn@@ -478,6 +518,8 @@ const PeopleWeekBoard = ({items={itemsByColumn.get(workCenter.id) ?? []}isDisabled={isDisabled}onRemove={onRemove}+ columnTargets={columnTargets}+ onMove={moveToColumn}/>))}</BoardContainer>diff --git a/apps/erp/app/modules/production/ui/Schedule/WorkCenterAvailabilityPopover.tsx b/apps/erp/app/modules/production/ui/Schedule/WorkCenterAvailabilityPopover.tsxindex 98164a7a27..c683bf101b 100644--- a/apps/erp/app/modules/production/ui/Schedule/WorkCenterAvailabilityPopover.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/WorkCenterAvailabilityPopover.tsx@@ -92,7 +92,7 @@ export function WorkCenterAvailabilityPopover({aria-label={t`How are these hours calculated?`}// Stop the row's onClick (which selects the node) from firing.onClick={(e) => e.stopPropagation()}- className="flex size-5 shrink-0 items-center justify-center rounded-sm text-muted-foreground/70 opacity-0 transition hover:bg-muted hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"+ className="flex size-5 shrink-0 items-center justify-center rounded-sm text-muted-foreground/70 opacity-0 transition hover:bg-muted hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"><LuInfo className="size-3.5" /></button>diff --git a/apps/erp/app/modules/production/ui/ScrapReasons/ScrapReasonsTable.tsx b/apps/erp/app/modules/production/ui/ScrapReasons/ScrapReasonsTable.tsxindex e9a568491d..07cc63297f 100644--- a/apps/erp/app/modules/production/ui/ScrapReasons/ScrapReasonsTable.tsx+++ b/apps/erp/app/modules/production/ui/ScrapReasons/ScrapReasonsTable.tsx@@ -38,6 +38,7 @@ const ScrapReasonsTable = memo(({ data, count }: ScrapReasonsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuTrash />}}diff --git a/apps/erp/app/modules/production/ui/useProductionSubmodules.tsx b/apps/erp/app/modules/production/ui/useProductionSubmodules.tsxindex a8750c74f1..f70d06d9cc 100644--- a/apps/erp/app/modules/production/ui/useProductionSubmodules.tsx+++ b/apps/erp/app/modules/production/ui/useProductionSubmodules.tsx@@ -16,6 +16,7 @@ import {LuTrash,LuTruck} from "react-icons/lu";+import { GroupedContentSidebar } from "~/components/Layout";import { usePermissions } from "~/hooks";import { useSavedViews } from "~/hooks/useSavedViews";import type { AuthenticatedRouteGroup } from "~/types";@@ -133,3 +134,10 @@ export default function useProductionSubmodules() {}))};}++/** Phones: the module's section switcher, for routes outside the module's+ * own layout (`handle.compactSidebar`). */+export function ProductionSections() {+ const { groups } = useProductionSubmodules();+ return <GroupedContentSidebar groups={groups} />;+}diff --git a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsxindex febee22b0a..4bfc7692b3 100644--- a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx+++ b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx@@ -409,6 +409,7 @@ const PlanningTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -446,6 +447,7 @@ const PlanningTable = memo(return <SupplierAvatar supplierId={supplierId} />;},meta: {+ mobile: "P3",filter: {type: "static",options: suppliers.map((supplier) => ({@@ -526,6 +528,7 @@ const PlanningTable = memo();},meta: {+ mobile: "P2",icon: <LuCirclePlay />}},diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm.tsxindex 5c708bb847..22ac474a8b 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm.tsx@@ -166,7 +166,7 @@ const PurchaseOrderDeliveryForm = forwardRef</><Input name="trackingNumber" label={t`Tracking Number`} />- <div className="col-span-3">+ <div className="col-span-3 compact:col-span-full"><Booleanname="dropShipment"label={t`Drop Shipment`}diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderExplorer.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderExplorer.tsxindex c5ce6ac999..2392260a92 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderExplorer.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderExplorer.tsx@@ -375,7 +375,7 @@ function PurchaseOrderLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm.tsxindex b7e3c5ac33..8770eeef3d 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm.tsx@@ -208,7 +208,7 @@ const PurchaseOrderForm = ({ initialValues }: PurchaseOrderFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isEditingdiff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderHeader.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderHeader.tsxindex 6062ce7f80..e451f9696b 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderHeader.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderHeader.tsx@@ -8,16 +8,13 @@ import type { ApprovalDecision } from "@carbon/ee/approvals";import {Badge,Button,- Copy,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,- Heading,HStack,- IconButton,MENU_ITEM_SHORTCUTS,SplitButton,Status,@@ -35,14 +32,11 @@ import {LuCirclePlus,LuCircleStop,LuCreditCard,- LuEllipsisVertical,LuEye,LuFile,LuGitBranchPlus,LuHandCoins,LuLoaderCircle,- LuPanelLeft,- LuPanelRight,LuTrash,LuTruck,LuUndo2,@@ -53,6 +47,7 @@ import { RevisionSuffix } from "~/components";import type { ResolvedAttachmentItem } from "~/components/AttachmentsList";import { useAuditLog } from "~/components/AuditLog";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import Confirm from "~/components/Modals/Confirm/Confirm";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import {@@ -212,486 +207,475 @@ const PurchaseOrderHeader = () => {);};+ // Phones lead the action bar with the control the desktop highlights for+ // this status, with Invoice beside Receive when both apply.+ const status = routeData?.purchaseOrder?.status ?? "";+ const isReceiveStep = ["To Receive", "To Receive and Invoice"].includes(+ status+ );+ const isFinalizable = ["Draft", "Planned"].includes(status);+ const isInvoiceStep = ["To Invoice", "To Receive and Invoice"].includes(+ status+ );+ const finalizeSlot = isFinalizable ? "primary" : "overflow";+ const shipSlot = isReceiveStep && requiresShipment ? "primary" : "overflow";+ const receiveSlot =+ isReceiveStep && !requiresShipment ? "primary" : "overflow";+ const invoiceSlot =+ !isInvoiceStep || requiresShipment+ ? "overflow"+ : receiveSlot === "primary" && hasReceivableLines+ ? "secondary"+ : "primary";+ const invoiceVariant =+ isInvoiceStep && !requiresShipment ? "primary" : "secondary";++ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={+ ["Draft"].includes(routeData?.purchaseOrder?.status ?? "") ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "purchasing") ||+ (isNeedsApproval && !routeData?.canReopen)+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.purchaseOrderStatus(orderId)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ disabled={+ !canCreatePurchaseOrderRevision({+ newStatus: "Draft",+ currentStatus: routeData?.purchaseOrder?.status,+ orderDate: routeData?.purchaseOrder?.orderDate+ }) ||+ statusFetcher.state !== "idle" ||+ !permissions.can("delete", "purchasing")+ }+ onClick={createRevisionModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuGitBranchPlus />} />+ <Trans>Create PO Revision</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ isLocked ||+ !permissions.can("delete", "purchasing") ||+ !permissions.is("employee") ||+ (isNeedsApproval && !routeData?.canDelete)+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Purchase Order</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadges = (+ <>+ <PurchasingStatus status={routeData?.purchaseOrder?.status} />+ {isOutsideProcessing && (+ <Badge variant="default">+ {routeData?.purchaseOrder?.purchaseOrderType}+ </Badge>+ )}+ {supplierApprovalRequired && !isSupplierApproved && (+ <Status color="red">+ <Trans>Unapproved Supplier</Trans>+ </Status>+ )}+ </>+ );+ // The ID with its revision; phones show it under the app bar title,+ // which names the record without the revision.+ const titleNode = (+ <span className="flex items-center gap-0">+ <span>{routeData?.purchaseOrder?.purchaseOrderId}</span>+ <RevisionSuffix revisionId={routeData?.purchaseOrder?.revisionId} />+ </span>+ );return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.purchaseOrderDetails(orderId)}>- <Heading size="h4" className="flex items-center gap-2">- <span className="flex items-center gap-0">- <span>{routeData?.purchaseOrder?.purchaseOrderId}</span>- <RevisionSuffix- revisionId={routeData?.purchaseOrder?.revisionId}- />- </span>- </Heading>- </Link>- <Copy text={getPurchaseOrderDisplayId(routeData?.purchaseOrder)} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- ["Draft"].includes(- routeData?.purchaseOrder?.status ?? ""- ) ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "purchasing") ||- (isNeedsApproval && !routeData?.canReopen)- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.purchaseOrderStatus(orderId)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- disabled={- !canCreatePurchaseOrderRevision({- newStatus: "Draft",- currentStatus: routeData?.purchaseOrder?.status,- orderDate: routeData?.purchaseOrder?.orderDate- }) ||- statusFetcher.state !== "idle" ||- !permissions.can("delete", "purchasing")- }- onClick={createRevisionModal.onOpen}- >- <DropdownMenuIcon icon={<LuGitBranchPlus />} />- <Trans>Create PO Revision</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- isLocked ||- !permissions.can("delete", "purchasing") ||- !permissions.is("employee") ||- (isNeedsApproval && !routeData?.canDelete)- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Purchase Order</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <PurchasingStatus status={routeData?.purchaseOrder?.status} />- {isOutsideProcessing && (- <Badge variant="default">- {routeData?.purchaseOrder?.purchaseOrderType}- </Badge>- )}- {supplierApprovalRequired && !isSupplierApproved && (- <Status color="red">- <Trans>Unapproved Supplier</Trans>- </Status>- )}- </HStack>- <HStack>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuEye />}- variant="secondary"- rightIcon={<LuChevronDown />}- >- <Trans>Preview</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem asChild>- <a- target="_blank"- href={path.to.file.purchaseOrder(orderId)}- rel="noreferrer"+ <RecordHeader+ title={titleNode}+ subtitle={+ (routeData?.purchaseOrder?.revisionId ?? 0) > 0+ ? titleNode+ : undefined+ }+ titleTo={path.to.purchaseOrderDetails(orderId)}+ copyValue={getPurchaseOrderDisplayId(routeData?.purchaseOrder)}+ menu={menuItems}+ status={statusBadges}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuEye />}+ variant="secondary"+ rightIcon={<LuChevronDown />}>- <DropdownMenuIcon icon={<LuFile />} />- <Trans>PDF</Trans>- </a>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>+ <Trans>Preview</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuItem asChild>+ <a+ target="_blank"+ href={path.to.file.purchaseOrder(orderId)}+ rel="noreferrer"+ >+ <DropdownMenuIcon icon={<LuFile />} />+ <Trans>PDF</Trans>+ </a>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>- <SplitButton- leftIcon={<LuCheckCheck />}- isLoading={- statusFetcher.formAction ===- path.to.purchaseOrderFinalize(orderId)- }- variant={- ["Draft", "Planned"].includes(- routeData?.purchaseOrder?.status ?? ""- )- ? "primary"- : "secondary"- }- onClick={finalizeDisclosure.onOpen}- isDisabled={- !["Draft", "Planned"].includes(- routeData?.purchaseOrder?.status ?? ""- ) ||- routeData?.lines.length === 0 ||- !isSupplierApproved- }- dropdownItems={[- {- label: t`Mark as Planned`,- icon: <LuCheckCheck />,- onClick: markAsPlanned,- disabled:- !["Draft"].includes(- routeData?.purchaseOrder?.status ?? ""- ) ||- routeData?.lines.length === 0 ||- !isSupplierApproved+ <RecordAction slot={finalizeSlot}>+ <SplitButton+ leftIcon={<LuCheckCheck />}+ isLoading={+ statusFetcher.formAction ===+ path.to.purchaseOrderFinalize(orderId)+ }+ variant={isFinalizable ? "primary" : "secondary"}+ onClick={finalizeDisclosure.onOpen}+ isDisabled={+ !isFinalizable ||+ routeData?.lines.length === 0 ||+ !isSupplierApproved}- ]}- >- <Trans>Finalize</Trans>- </SplitButton>+ dropdownItems={[+ {+ label: t`Mark as Planned`,+ icon: <LuCheckCheck />,+ onClick: markAsPlanned,+ disabled:+ !["Draft"].includes(+ routeData?.purchaseOrder?.status ?? ""+ ) ||+ routeData?.lines.length === 0 ||+ !isSupplierApproved+ }+ ]}+ >+ <Trans>Finalize</Trans>+ </SplitButton>+ </RecordAction>{routeData?.purchaseOrder?.purchaseOrderType ==="Outside Processing" &&(shipments.length > 0 ? (- <DropdownMenu>- <DropdownMenuTrigger asChild>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuTruck />}+ variant="secondary"+ rightIcon={<LuChevronDown />}+ >+ <Trans>Shipments</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuItem+ disabled={+ ![+ "To Receive",+ "To Receive and Invoice",+ "To Invoice"+ ].includes(routeData?.purchaseOrder?.status ?? "")+ }+ onClick={() => {+ ship(routeData?.purchaseOrder);+ }}+ >+ <DropdownMenuIcon icon={<LuCirclePlus />} />+ <Trans>New Shipment</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ {shipments.map((shipment) => (+ <DropdownMenuItem key={shipment.id} asChild>+ <Link to={path.to.shipment(shipment.id)}>+ <DropdownMenuIcon icon={<LuTruck />} />+ <HStack spacing={8}>+ <span>{shipment.shipmentId}</span>+ <ShipmentStatus status={shipment.status} />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>+ ) : (+ <RecordAction slot={shipSlot}>+ <RelatedDocsErrorTooltip+ hasError={relatedDocsError}+ message={relatedDocsErrorMessage}+ ><ButtonleftIcon={<LuTruck />}- variant="secondary"- rightIcon={<LuChevronDown />}- >- <Trans>Shipments</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- ![- "To Receive",- "To Receive and Invoice",- "To Invoice"- ].includes(routeData?.purchaseOrder?.status ?? "")- }+ isDisabled={relatedDocsError || !isReceiveStep}+ variant={isReceiveStep ? "primary" : "secondary"}onClick={() => {ship(routeData?.purchaseOrder);}}>- <DropdownMenuIcon icon={<LuCirclePlus />} />- <Trans>New Shipment</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- {shipments.map((shipment) => (- <DropdownMenuItem key={shipment.id} asChild>- <Link to={path.to.shipment(shipment.id)}>- <DropdownMenuIcon icon={<LuTruck />} />- <HStack spacing={8}>- <span>{shipment.shipmentId}</span>- <ShipmentStatus status={shipment.status} />- </HStack>- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>- ) : (- <RelatedDocsErrorTooltip- hasError={relatedDocsError}- message={relatedDocsErrorMessage}- >- <Button- leftIcon={<LuTruck />}- isDisabled={- relatedDocsError ||- !["To Receive", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- )- }- variant={- ["To Receive", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- )- ? "primary"- : "secondary"- }- onClick={() => {- ship(routeData?.purchaseOrder);- }}- >- <Trans>Ship</Trans>- </Button>- </RelatedDocsErrorTooltip>+ <Trans>Ship</Trans>+ </Button>+ </RelatedDocsErrorTooltip>+ </RecordAction>))}{isNeedsApproval && hasApprovalRequest && canApprove ? (<>- <Button- leftIcon={<LuCheckCheck />}- variant="primary"- isLoading={- approvalFetcher.state !== "idle" &&- approvalFetcher.formData?.get("decision") === "Approved"- }- isDisabled={approvalFetcher.state !== "idle"}- onClick={() => setApprovalDecision("Approved")}- >- <Trans>Approve</Trans>- </Button>- <Button- leftIcon={<LuX />}- variant="destructive"- isLoading={- approvalFetcher.state !== "idle" &&- approvalFetcher.formData?.get("decision") === "Rejected"- }- isDisabled={approvalFetcher.state !== "idle"}- onClick={() => setApprovalDecision("Rejected")}- >- <Trans>Reject</Trans>- </Button>- </>- ) : hasReceivableLines ? (- receipts.length > 0 ? (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuHandCoins />}- variant={- ["To Receive", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- ) && !requiresShipment- ? "primary"- : "secondary"- }- rightIcon={<LuChevronDown />}- >- <Trans>Receipts</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- ![- "To Receive",- "To Receive and Invoice",- "To Invoice"- ].includes(routeData?.purchaseOrder?.status ?? "") ||- isReceiving- }- onClick={() => {- receive(routeData?.purchaseOrder);- }}- >- <DropdownMenuIcon icon={<LuCirclePlus />} />- <Trans>New Receipt</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- {receipts.map((receipt) => (- <DropdownMenuItem key={receipt.id} asChild>- <Link to={path.to.receipt(receipt.id)}>- <DropdownMenuIcon icon={<LuHandCoins />} />- <HStack spacing={8}>- <span>{receipt.receiptId}</span>- <ReceiptStatus status={receipt.status} />- </HStack>- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>- ) : (- <RelatedDocsErrorTooltip- hasError={relatedDocsError}- message={relatedDocsErrorMessage}- >+ <RecordAction slot="primary"><Button- leftIcon={<LuHandCoins />}- isLoading={isReceiving}- isDisabled={- relatedDocsError ||- !["To Receive", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- ) ||- isReceiving+ leftIcon={<LuCheckCheck />}+ variant="primary"+ isLoading={+ approvalFetcher.state !== "idle" &&+ approvalFetcher.formData?.get("decision") === "Approved"}- variant={- ["To Receive", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- ) && !requiresShipment- ? "primary"- : "secondary"+ isDisabled={approvalFetcher.state !== "idle"}+ onClick={() => setApprovalDecision("Approved")}+ >+ <Trans>Approve</Trans>+ </Button>+ </RecordAction>+ <RecordAction slot="secondary">+ <Button+ leftIcon={<LuX />}+ variant="destructive"+ isLoading={+ approvalFetcher.state !== "idle" &&+ approvalFetcher.formData?.get("decision") === "Rejected"}- onClick={() => {- receive(routeData?.purchaseOrder);- }}+ isDisabled={approvalFetcher.state !== "idle"}+ onClick={() => setApprovalDecision("Rejected")}>- <Trans>Receive</Trans>+ <Trans>Reject</Trans></Button>- </RelatedDocsErrorTooltip>- )- ) : null}-- {!isNeedsApproval && (- <>- {invoices?.length > 0 ? (+ </RecordAction>+ </>+ ) : hasReceivableLines ? (+ receipts.length > 0 ? (+ <RecordAction slot={receiveSlot}><DropdownMenu><DropdownMenuTrigger asChild><Button- leftIcon={<LuCreditCard />}- rightIcon={<LuChevronDown />}+ leftIcon={<LuHandCoins />}variant={- ["To Invoice", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- ) && !requiresShipment+ isReceiveStep && !requiresShipment? "primary": "secondary"}+ rightIcon={<LuChevronDown />}>- <Trans>Invoice</Trans>+ <Trans>Receipts</Trans></Button></DropdownMenuTrigger>- <DropdownMenuContent align="end">+ <DropdownMenuContent><DropdownMenuItemdisabled={- !["To Invoice", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- ) || isInvoicing+ ![+ "To Receive",+ "To Receive and Invoice",+ "To Invoice"+ ].includes(routeData?.purchaseOrder?.status ?? "") ||+ isReceiving}onClick={() => {- invoice(routeData?.purchaseOrder);+ receive(routeData?.purchaseOrder);}}><DropdownMenuIcon icon={<LuCirclePlus />} />- <Trans>New Invoice</Trans>+ <Trans>New Receipt</Trans></DropdownMenuItem><DropdownMenuSeparator />- {invoices.map((invoice) => (- <DropdownMenuItem key={invoice.id} asChild>- <Link to={path.to.purchaseInvoice(invoice.id!)}>- <DropdownMenuIcon icon={<LuCreditCard />} />+ {receipts.map((receipt) => (+ <DropdownMenuItem key={receipt.id} asChild>+ <Link to={path.to.receipt(receipt.id)}>+ <DropdownMenuIcon icon={<LuHandCoins />} /><HStack spacing={8}>- <span>{invoice.invoiceId}</span>- <PurchaseInvoicingStatus- // @ts-expect-error - Return type is not defined- status={invoice.status}- />+ <span>{receipt.receiptId}</span>+ <ReceiptStatus status={receipt.status} /></HStack></Link></DropdownMenuItem>))}</DropdownMenuContent></DropdownMenu>- ) : (+ </RecordAction>+ ) : (+ <RecordAction slot={receiveSlot}><RelatedDocsErrorTooltiphasError={relatedDocsError}message={relatedDocsErrorMessage}><Button- leftIcon={<LuCreditCard />}- isLoading={isInvoicing}+ leftIcon={<LuHandCoins />}+ isLoading={isReceiving}isDisabled={- relatedDocsError ||- !["To Invoice", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- ) ||- isInvoicing+ relatedDocsError || !isReceiveStep || isReceiving}variant={- ["To Invoice", "To Receive and Invoice"].includes(- routeData?.purchaseOrder?.status ?? ""- ) && !requiresShipment+ isReceiveStep && !requiresShipment? "primary": "secondary"}onClick={() => {- invoice(routeData?.purchaseOrder);+ receive(routeData?.purchaseOrder);}}>- <Trans>Invoice</Trans>+ <Trans>Receive</Trans></Button></RelatedDocsErrorTooltip>+ </RecordAction>+ )+ ) : null}++ {!isNeedsApproval && (+ <>+ {invoices?.length > 0 ? (+ <RecordAction slot={invoiceSlot}>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuCreditCard />}+ rightIcon={<LuChevronDown />}+ variant={invoiceVariant}+ >+ <Trans>Invoice</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuItem+ disabled={!isInvoiceStep || isInvoicing}+ onClick={() => {+ invoice(routeData?.purchaseOrder);+ }}+ >+ <DropdownMenuIcon icon={<LuCirclePlus />} />+ <Trans>New Invoice</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ {invoices.map((invoice) => (+ <DropdownMenuItem key={invoice.id} asChild>+ <Link to={path.to.purchaseInvoice(invoice.id!)}>+ <DropdownMenuIcon icon={<LuCreditCard />} />+ <HStack spacing={8}>+ <span>{invoice.invoiceId}</span>+ <PurchaseInvoicingStatus+ // @ts-expect-error - Return type is not defined+ status={invoice.status}+ />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>+ ) : (+ <RecordAction slot={invoiceSlot}>+ <RelatedDocsErrorTooltip+ hasError={relatedDocsError}+ message={relatedDocsErrorMessage}+ >+ <Button+ leftIcon={<LuCreditCard />}+ isLoading={isInvoicing}+ isDisabled={+ relatedDocsError || !isInvoiceStep || isInvoicing+ }+ variant={invoiceVariant}+ onClick={() => {+ invoice(routeData?.purchaseOrder);+ }}+ >+ <Trans>Invoice</Trans>+ </Button>+ </RelatedDocsErrorTooltip>+ </RecordAction>)}</>)}{returnOrders.length > 0 && (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuUndo2 />}- rightIcon={<LuChevronDown />}- variant="secondary"- >- <Trans>Returns</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- {returnOrders.map((returnOrder) => (- <DropdownMenuItem key={returnOrder.id} asChild>- <Link to={path.to.purchaseReturnOrder(returnOrder.id)}>- <DropdownMenuIcon icon={<LuUndo2 />} />- <HStack spacing={8}>- <span>{returnOrder.purchaseReturnOrderId}</span>- <PurchaseReturnOrderStatus- status={- returnOrder.status as Database["public"]["Enums"]["purchaseReturnOrderStatus"]- }- />- </HStack>- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuUndo2 />}+ rightIcon={<LuChevronDown />}+ variant="secondary"+ >+ <Trans>Returns</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ {returnOrders.map((returnOrder) => (+ <DropdownMenuItem key={returnOrder.id} asChild>+ <Link to={path.to.purchaseReturnOrder(returnOrder.id)}>+ <DropdownMenuIcon icon={<LuUndo2 />} />+ <HStack spacing={8}>+ <span>{returnOrder.purchaseReturnOrderId}</span>+ <PurchaseReturnOrderStatus+ status={+ returnOrder.status as Database["public"]["Enums"]["purchaseReturnOrderStatus"]+ }+ />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>)}- <Button- onClick={cancelModal.onOpen}- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Closed"- }- isDisabled={- ["Closed", "Completed"].includes(- routeData?.purchaseOrder?.status ?? ""- ) ||- statusFetcher.state !== "idle" ||- !permissions.can("delete", "purchasing")- }- leftIcon={<LuCircleStop />}- variant="secondary"- >- <Trans>Cancel Order</Trans>- </Button>- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>- </div>+ <RecordAction slot="overflow">+ <Button+ onClick={cancelModal.onOpen}+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Closed"+ }+ isDisabled={+ ["Closed", "Completed"].includes(+ routeData?.purchaseOrder?.status ?? ""+ ) ||+ statusFetcher.state !== "idle" ||+ !permissions.can("delete", "purchasing")+ }+ leftIcon={<LuCircleStop />}+ variant="secondary"+ >+ <Trans>Cancel Order</Trans>+ </Button>+ </RecordAction>+ </>+ }+ />{finalizeDisclosure.isOpen && (<PurchaseOrderFinalizeModaldiff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm.tsxindex ce2814247f..fa3460ef51 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm.tsx@@ -502,7 +502,7 @@ const PurchaseOrderLineForm = ({><HStackclassName={cn(- "w-full justify-between items-start",+ "w-full justify-between items-start compact:flex-col compact:items-stretch compact:space-x-0",type === "modal" && "pr-16")}>@@ -574,7 +574,7 @@ const PurchaseOrderLineForm = ({)}</ModalCardDescription></ModalCardHeader>- <div className="flex-shrink-0">+ <div className="flex-shrink-0 compact:min-w-0 compact:overflow-x-auto compact:scroll-fade-x compact:px-4 compact:pb-2 compact:empty:hidden">{!isEditing && (<TabsList><TabsTrigger value="item">@@ -923,7 +923,7 @@ const PurchaseOrderLineForm = ({className={activeTab === "asset"? "col-span-1"- : "col-span-3"+ : "col-span-3 compact:col-span-full"}><FormLabel>diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSummary.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSummary.tsxindex 6cd57586f1..5a718692e9 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSummary.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSummary.tsx@@ -124,12 +124,12 @@ const LineItems = ({{line.thumbnailPath ? (<imgalt={itemReadableId!}- className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg"+ className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg compact:size-14"src={getPrivateUrl(line.thumbnailPath)}/>) : (- <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4">- <LuImage className="w-16 h-16 text-muted-foreground" />+ <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4 compact:size-14 compact:p-3">+ <LuImage className="w-16 h-16 text-muted-foreground compact:size-8" /></div>)}@@ -143,8 +143,11 @@ const LineItems = ({children need w-full because VStack is items-start, whichsizes each child to its own content and leaves truncateinert no matter how narrow the column gets. */}- <div className="flex items-center justify-between w-full">- <VStack spacing={0} className="flex-1 min-w-0">+ <div className="flex items-center justify-between w-full compact:flex-wrap compact:gap-y-2">+ <VStack+ spacing={0}+ className="flex-1 min-w-0 compact:basis-full"+ ><HStack spacing={2} className="flex min-w-0 w-full"><Heading className="truncate">{itemReadableId}</Heading><Button@@ -169,7 +172,7 @@ const LineItems = ({</VStack><VStackspacing={2}- className="flex-shrink-0 items-end w-auto"+ className="flex-shrink-0 items-end w-auto compact:basis-full compact:items-start"><HStack spacing={4}><VStack spacing={0}>diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsxindex 2a0e165197..d45056352d 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx@@ -112,6 +112,7 @@ const PurchaseOrdersTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -122,6 +123,7 @@ const PurchaseOrdersTable = memo(return <SupplierAvatar supplierId={row.original.supplierId} />;},meta: {+ mobile: "P3",filter: {type: "static",options: suppliers?.map((supplier) => ({@@ -144,6 +146,7 @@ const PurchaseOrdersTable = memo(return <PurchasingStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: purchaseOrderStatusType.map((status) => ({@@ -247,6 +250,7 @@ const PurchaseOrdersTable = memo(header: t`Order Total`,cell: (item) => currencyFormatter.format(item.getValue<number>()),meta: {+ mobile: "P2",icon: <LuDollarSign />,formatter: currencyFormatter.format,renderTotal: truediff --git a/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderExplorer.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderExplorer.tsxindex 625dbec32b..f07b80f00b 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderExplorer.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderExplorer.tsx@@ -323,7 +323,7 @@ function PurchaseReturnOrderLineItem({<IconButtonaria-label={disclosure.isOpen ? t`Hide` : t`Show`}className={cn(- "animate opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100",+ "animate opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100",disclosure.isOpen && "-rotate-180")}icon={<LuChevronDown />}@@ -338,7 +338,7 @@ function PurchaseReturnOrderLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label="More"- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}size="md"variant="solid"diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderForm.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderForm.tsxindex 3419f902ab..d347fd38e1 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderForm.tsx@@ -220,7 +220,7 @@ const PurchaseReturnOrderForm = ({</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isEditingdiff --git a/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderHeader.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderHeader.tsxindex 262eafc5c0..712cbdd25c 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderHeader.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrderHeader.tsx@@ -4,15 +4,8 @@import {Button,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,useDisclosure} from "@carbon/react";@@ -21,12 +14,9 @@ import {LuCheckCheck,LuCircleStop,LuCreditCard,- LuEllipsisVertical,LuFile,LuGitCompare,LuLoaderCircle,- LuPanelLeft,- LuPanelRight,LuTrash,LuTruck} from "react-icons/lu";@@ -38,6 +28,7 @@ import {useSubmit} from "react-router";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import Confirm from "~/components/Modals/Confirm/Confirm";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";@@ -94,175 +85,168 @@ const PurchaseReturnOrderHeader = () => {const canUpdate = permissions.can("update", "purchasing");+ const statusBadge = <PurchaseReturnOrderStatus status={status} />;+ const menuItems = (+ <>+ <DropdownMenuItem+ disabled={+ !["Confirmed", "Cancelled"].includes(status ?? "") ||+ statusFetcher.state !== "idle" ||+ !canUpdate+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.purchaseReturnOrderStatus(id)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ destructive+ disabled={+ !["Draft", "Cancelled"].includes(status ?? "") ||+ !permissions.can("delete", "purchasing") ||+ !permissions.is("employee")+ }+ onClick={deleteDisclosure.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Supplier Return</Trans>+ </DropdownMenuItem>+ </>+ );return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.purchaseReturnOrderDetails(id)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{purchaseReturnOrder.purchaseReturnOrderId}</span>- </Heading>- </Link>- <Copy text={purchaseReturnOrder.purchaseReturnOrderId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- !["Confirmed", "Cancelled"].includes(status ?? "") ||- statusFetcher.state !== "idle" ||- !canUpdate- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.purchaseReturnOrderStatus(id)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- destructive- disabled={- !["Draft", "Cancelled"].includes(status ?? "") ||- !permissions.can("delete", "purchasing") ||- !permissions.is("employee")- }- onClick={deleteDisclosure.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Supplier Return</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <PurchaseReturnOrderStatus status={status} />- </HStack>- <HStack>+ <RecordHeader+ title={purchaseReturnOrder.purchaseReturnOrderId}+ titleTo={path.to.purchaseReturnOrderDetails(id)}+ copyValue={purchaseReturnOrder.purchaseReturnOrderId ?? ""}+ menu={menuItems}+ status={statusBadge}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>{status !== "Draft" && (- <Button leftIcon={<LuFile />} variant="secondary" asChild>- <a- target="_blank"- href={path.to.file.purchaseReturnOrder(id)}- rel="noreferrer"- >- <Trans>PDF</Trans>- </a>- </Button>+ <RecordAction slot="overflow">+ <Button leftIcon={<LuFile />} variant="secondary" asChild>+ <a+ target="_blank"+ href={path.to.file.purchaseReturnOrder(id)}+ rel="noreferrer"+ >+ <Trans>PDF</Trans>+ </a>+ </Button>+ </RecordAction>)}{status === "Draft" && (- <Button- leftIcon={<LuCheckCheck />}- variant="primary"- isDisabled={routeData.lines.length === 0 || !canUpdate}- onClick={confirmDisclosure.onOpen}- >- <Trans>Confirm</Trans>- </Button>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuCheckCheck />}+ variant="primary"+ isDisabled={routeData.lines.length === 0 || !canUpdate}+ onClick={confirmDisclosure.onOpen}+ >+ <Trans>Confirm</Trans>+ </Button>+ </RecordAction>)}{["Draft", "To Ship"].includes(status ?? "") && (- <Button- variant="secondary"- leftIcon={<LuCircleStop />}- isDisabled={!canUpdate}- onClick={cancelDisclosure.onOpen}- >- <Trans>Cancel</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button+ variant="secondary"+ leftIcon={<LuCircleStop />}+ isDisabled={!canUpdate}+ onClick={cancelDisclosure.onOpen}+ >+ <Trans>Cancel</Trans>+ </Button>+ </RecordAction>)}{status === "To Ship" && (- <Button- variant="primary"- leftIcon={<LuTruck />}- isDisabled={- isCreatingDocument || !permissions.can("create", "inventory")- }- onClick={ship}- >- <Trans>Ship</Trans>- </Button>+ <RecordAction slot="primary">+ <Button+ variant="primary"+ leftIcon={<LuTruck />}+ isDisabled={+ isCreatingDocument ||+ !permissions.can("create", "inventory")+ }+ onClick={ship}+ >+ <Trans>Ship</Trans>+ </Button>+ </RecordAction>)}{!["Draft", "Cancelled"].includes(status ?? "") && (<>{hasShippedQuantity && (- <Button- leftIcon={<LuCreditCard />}- variant="secondary"- isDisabled={!permissions.can("create", "invoicing")}- onClick={creditDisclosure.onOpen}- >- <Trans>Issue Credit</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button+ leftIcon={<LuCreditCard />}+ variant="secondary"+ isDisabled={!permissions.can("create", "invoicing")}+ onClick={creditDisclosure.onOpen}+ >+ <Trans>Issue Credit</Trans>+ </Button>+ </RecordAction>)}{purchaseReturnOrder.replacementPurchaseOrderId ? (- <Button- leftIcon={<LuGitCompare />}- variant="secondary"- asChild- >- <Link- to={path.to.purchaseOrder(- purchaseReturnOrder.replacementPurchaseOrderId- )}+ <RecordAction slot="overflow">+ <Button+ leftIcon={<LuGitCompare />}+ variant="secondary"+ asChild>- <Trans>Replacement Order</Trans>- </Link>- </Button>+ <Link+ to={path.to.purchaseOrder(+ purchaseReturnOrder.replacementPurchaseOrderId+ )}+ >+ <Trans>Replacement Order</Trans>+ </Link>+ </Button>+ </RecordAction>) : (- <Button- leftIcon={<LuGitCompare />}- variant="secondary"- isLoading={replacementFetcher.state !== "idle"}- isDisabled={- replacementFetcher.state !== "idle" ||- !permissions.can("create", "purchasing")- }- onClick={() => {- replacementFetcher.submit(null, {- method: "post",- action: path.to.purchaseReturnOrderReplacement(id)- });- }}- >- <Trans>Create Replacement</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button+ leftIcon={<LuGitCompare />}+ variant="secondary"+ isLoading={replacementFetcher.state !== "idle"}+ isDisabled={+ replacementFetcher.state !== "idle" ||+ !permissions.can("create", "purchasing")+ }+ onClick={() => {+ replacementFetcher.submit(null, {+ method: "post",+ action: path.to.purchaseReturnOrderReplacement(id)+ });+ }}+ >+ <Trans>Create Replacement</Trans>+ </Button>+ </RecordAction>)}</>)}-- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>- </div>+ </>+ }+ />{confirmDisclosure.isOpen && (<Confirmdiff --git a/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrdersTable.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrdersTable.tsxindex 9bb8d0a6c4..90b90df983 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrdersTable.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseReturnOrders/PurchaseReturnOrdersTable.tsx@@ -76,6 +76,7 @@ const PurchaseReturnOrdersTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -86,6 +87,7 @@ const PurchaseReturnOrdersTable = memo(<SupplierAvatar supplierId={row.original.supplierId} />),meta: {+ mobile: "P3",filter: {type: "static",options: suppliers?.map((supplier) => ({@@ -106,6 +108,7 @@ const PurchaseReturnOrdersTable = memo(<PurchaseReturnOrderStatus status={row.original.status} />),meta: {+ mobile: "P2",filter: {type: "static",options: purchaseReturnOrderStatusType.map((status) => ({diff --git a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQExplorer.tsx b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQExplorer.tsxindex c94841d646..d62fb73b5e 100644--- a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQExplorer.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQExplorer.tsx@@ -298,7 +298,7 @@ function PurchasingRFQLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQForm.tsx b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQForm.tsxindex 301043618d..92abbe5879 100644--- a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQForm.tsx@@ -107,7 +107,7 @@ const PurchasingRFQForm = ({ initialValues }: PurchasingRFQFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isLocked ||diff --git a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQHeader.tsx b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQHeader.tsxindex f8be176940..4a4e2b3953 100644--- a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQHeader.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQHeader.tsx@@ -13,9 +13,6 @@ import {DropdownMenuIcon,DropdownMenuItem,DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Modal,ModalBody,@@ -29,12 +26,9 @@ import { Trans, useLingui } from "@lingui/react/macro";import {LuChevronDown,LuCircleX,- LuEllipsisVertical,LuEye,LuGitCompare,LuLoaderCircle,- LuPanelLeft,- LuPanelRight,LuSend,LuShare2,LuTrash,@@ -42,6 +36,7 @@ import {} from "react-icons/lu";import { Link, useFetcher, useParams } from "react-router";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";import { useIntegrations } from "~/hooks/useIntegrations";@@ -92,222 +87,221 @@ const PurchasingRFQHeader = () => {);const canCompareQuotes = activeLinkedQuotes.length > 1;+ const finalizeSlot = status === "Draft" ? "primary" : "overflow";+ const menuItems = (+ <>+ <DropdownMenuItem+ disabled={+ status !== "Closed" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "purchasing")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.purchasingRfqStatus(rfqId)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ isLocked ||+ !permissions.can("delete", "purchasing") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteRFQModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete RFQ</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadge = (+ <PurchasingRFQStatus status={routeData?.rfqSummary?.status} />+ );return (- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide ">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.purchasingRfqDetails(rfqId)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.rfqSummary?.rfqId}</span>- </Heading>- </Link>- <Copy text={routeData?.rfqSummary?.rfqId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- status !== "Closed" ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "purchasing")- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.purchasingRfqStatus(rfqId)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- isLocked ||- !permissions.can("delete", "purchasing") ||- !permissions.is("employee")- }- destructive- onClick={deleteRFQModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete RFQ</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <PurchasingRFQStatus status={routeData?.rfqSummary?.status} />- </HStack>- <HStack>- {/* Preview Button - for Draft status */}- {status === "Draft" && (- <Button variant="secondary" leftIcon={<LuEye />} asChild>- <Link to={path.to.purchasingRfqPreview(rfqId)} target="_blank">- <Trans>Preview</Trans>- </Link>- </Button>- )}-- {/* Share Dropdown - for Requested status with external links */}- {status === "Requested" && hasSuppliers && (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- variant="secondary"- leftIcon={<LuShare2 />}- rightIcon={<LuChevronDown />}- >- <Trans>Share</Trans>+ <>+ <RecordHeader+ title={routeData?.rfqSummary?.rfqId}+ titleTo={path.to.purchasingRfqDetails(rfqId)}+ copyValue={routeData?.rfqSummary?.rfqId ?? ""}+ menu={menuItems}+ status={statusBadge}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ {/* Preview Button - for Draft status */}+ {status === "Draft" && (+ <RecordAction slot="overflow">+ <Button variant="secondary" leftIcon={<LuEye />} asChild>+ <Link+ to={path.to.purchasingRfqPreview(rfqId)}+ target="_blank"+ >+ <Trans>Preview</Trans>+ </Link></Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- {routeData?.suppliers?.map((supplier) => (- <DropdownMenuItem- key={supplier.id}- disabled={!supplier.quoteExternalLinkId}- onClick={() => {- if (supplier.quoteExternalLinkId) {- window.open(- path.to.externalSupplierQuote(- supplier.quoteExternalLinkId- ),- "_blank"- );- }- }}+ </RecordAction>+ )}++ {/* Share Dropdown - for Requested status with external links */}+ {status === "Requested" && hasSuppliers && (+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ variant="secondary"+ leftIcon={<LuShare2 />}+ rightIcon={<LuChevronDown />}+ >+ <Trans>Share</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ {routeData?.suppliers?.map((supplier) => (+ <DropdownMenuItem+ key={supplier.id}+ disabled={!supplier.quoteExternalLinkId}+ onClick={() => {+ if (supplier.quoteExternalLinkId) {+ window.open(+ path.to.externalSupplierQuote(+ supplier.quoteExternalLinkId+ ),+ "_blank"+ );+ }+ }}+ >+ <DropdownMenuIcon icon={<LuShare2 />} />+ {supplier.supplier.name}+ {supplier.quoteExternalLinkId &&+ typeof window !== "undefined" && (+ <Copy+ className="ml-2"+ text={`${+ window.location.origin+ }${path.to.externalSupplierQuote(+ supplier.quoteExternalLinkId+ )}`}+ />+ )}+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>+ )}++ {hasSuppliers ? (+ canEmail ? (+ // With Resend: Open modal for contact selection+ <RecordAction slot={finalizeSlot}>+ <Button+ isDisabled={+ status !== "Draft" ||+ routeData?.lines?.length === 0 ||+ !permissions.can("create", "purchasing")+ }+ leftIcon={<LuSend />}+ variant={status === "Draft" ? "primary" : "secondary"}+ onClick={finalizeModal.onOpen}+ >+ <Trans>Finalize</Trans>+ </Button>+ </RecordAction>+ ) : (+ // Without Resend: Submit directly+ <RecordAction slot={finalizeSlot}>+ <finalizeFetcher.Form+ method="post"+ action={path.to.purchasingRfqFinalize(rfqId)}>- <DropdownMenuIcon icon={<LuShare2 />} />- {supplier.supplier.name}- {supplier.quoteExternalLinkId &&- typeof window !== "undefined" && (- <Copy- className="ml-2"- text={`${- window.location.origin- }${path.to.externalSupplierQuote(- supplier.quoteExternalLinkId- )}`}+ {routeData?.suppliers?.map((supplier, index) => (+ <span key={supplier.id}>+ <input+ type="hidden"+ name={`suppliers[${index}].supplierId`}+ value={supplier.supplierId}/>- )}- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>- )}-- {hasSuppliers ? (- canEmail ? (- // With Resend: Open modal for contact selection- <Button- isDisabled={- status !== "Draft" ||- routeData?.lines?.length === 0 ||- !permissions.can("create", "purchasing")- }- leftIcon={<LuSend />}- variant={status === "Draft" ? "primary" : "secondary"}- onClick={finalizeModal.onOpen}- >- <Trans>Finalize</Trans>- </Button>+ <input+ type="hidden"+ name={`suppliers[${index}].rfqSupplierId`}+ value={supplier.id}+ />+ </span>+ ))}+ <Button+ type="submit"+ isDisabled={+ status !== "Draft" ||+ routeData?.lines?.length === 0 ||+ !permissions.can("create", "purchasing") ||+ finalizeFetcher.state !== "idle"+ }+ isLoading={finalizeFetcher.state !== "idle"}+ leftIcon={<LuSend />}+ variant={status === "Draft" ? "primary" : "secondary"}+ >+ <Trans>Finalize</Trans>+ </Button>+ </finalizeFetcher.Form>+ </RecordAction>+ )) : (- // Without Resend: Submit directly- <finalizeFetcher.Form- method="post"- action={path.to.purchasingRfqFinalize(rfqId)}- >- {routeData?.suppliers?.map((supplier, index) => (- <span key={supplier.id}>- <input- type="hidden"- name={`suppliers[${index}].supplierId`}- value={supplier.supplierId}- />- <input- type="hidden"- name={`suppliers[${index}].rfqSupplierId`}- value={supplier.id}- />- </span>- ))}+ <RecordAction slot={finalizeSlot}><Button- type="submit"isDisabled={status !== "Draft" ||routeData?.lines?.length === 0 ||- !permissions.can("create", "purchasing") ||- finalizeFetcher.state !== "idle"+ !permissions.can("create", "purchasing")}- isLoading={finalizeFetcher.state !== "idle"}leftIcon={<LuSend />}variant={status === "Draft" ? "primary" : "secondary"}+ onClick={requiresSuppliersAlert.onOpen}><Trans>Finalize</Trans></Button>- </finalizeFetcher.Form>- )- ) : (- <Button- isDisabled={- status !== "Draft" ||- routeData?.lines?.length === 0 ||- !permissions.can("create", "purchasing")- }- leftIcon={<LuSend />}- variant={status === "Draft" ? "primary" : "secondary"}- onClick={requiresSuppliersAlert.onOpen}- >- <Trans>Finalize</Trans>- </Button>- )}+ </RecordAction>+ )}- {/* Cancel Button - sets status to Closed */}- <Button- onClick={cancelReasonModal.onOpen}- isDisabled={- (status !== "Draft" && status !== "Requested") ||- !permissions.can("update", "purchasing")- }- leftIcon={<LuCircleX />}- variant="secondary"- >- <Trans>Cancel</Trans>- </Button>-- {canCompareQuotes && (- <Button- onClick={compareQuotesModal.onOpen}- leftIcon={<LuGitCompare />}- variant="secondary"- >- <Trans>Compare Quotes</Trans>- </Button>- )}+ <RecordAction slot="overflow">+ <Button+ onClick={cancelReasonModal.onOpen}+ isDisabled={+ (status !== "Draft" && status !== "Requested") ||+ !permissions.can("update", "purchasing")+ }+ leftIcon={<LuCircleX />}+ variant="secondary"+ >+ <Trans>Cancel</Trans>+ </Button>+ </RecordAction>- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>+ {canCompareQuotes && (+ <RecordAction slot="overflow">+ <Button+ onClick={compareQuotesModal.onOpen}+ leftIcon={<LuGitCompare />}+ variant="secondary"+ >+ <Trans>Compare Quotes</Trans>+ </Button>+ </RecordAction>+ )}+ </>+ }+ />{finalizeModal.isOpen && (<FinalizeRFQModallines={routeData?.lines ?? []}@@ -357,7 +351,7 @@ const PurchasingRFQHeader = () => {purchasingRfqId={rfqId}/>)}- </div>+ </>);};diff --git a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQLineForm.tsx b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQLineForm.tsxindex b61dfbb0c0..4fe59d7e94 100644--- a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQLineForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQLineForm.tsx@@ -240,7 +240,7 @@ const PurchasingRFQLineForm = ({/><VStack><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3">- <div className="col-span-2 grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min">+ <div className="col-span-2 compact:col-span-full grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min"><ItemautoFocusname="itemId"diff --git a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQsTable.tsx b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQsTable.tsxindex bc4dba2d8e..7a5c3f06d1 100644--- a/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQsTable.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchasingRfq/PurchasingRFQsTable.tsx@@ -67,6 +67,7 @@ const PurchasingRFQsTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -95,6 +96,7 @@ const PurchasingRFQsTable = memo();},meta: {+ mobile: "P3",icon: <LuContainer />,filter: {type: "static",@@ -115,6 +117,7 @@ const PurchasingRFQsTable = memo(return <PurchasingRFQStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: purchasingRfqStatusType.map((status) => ({diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierForm.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierForm.tsxindex f2f3e851b6..7577c8111d 100644--- a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierForm.tsx@@ -210,7 +210,7 @@ const SupplierForm = ({<CustomFormFields table="supplier" /></div></ModalCardBody>- <ModalCardFooter>+ <ModalCardFooter sticky={type === "card" && !isEditing}><HStack><Submit isDisabled={isDisabled}><Trans>Save</Trans>diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierHeader.tsxindex fc2c5c3e62..8bad464a7e 100644--- a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx@@ -53,6 +53,11 @@ import { useAuditLog } from "~/components/AuditLog";import { Enumerable } from "~/components/Enumerable";import { Tags } from "~/components/Form";import { useSupplierTypes } from "~/components/Form/SupplierType";+import {+ RecordAction,+ RecordHero,+ RecordPhoneChrome+} from "~/components/Layout/RecordHeader";import { ConfirmDelete } from "~/components/Modals";import {usePermissions,@@ -151,11 +156,30 @@ const SupplierHeader = () => {[supplierId]);+ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={!permissions.can("delete", "purchasing")}+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Supplier</Trans>+ </DropdownMenuItem>+ </>+ );return (<>+ {/* The app bar titles the record with its name, so no hero. */}+ {/* No hero; it still zeroes --header-height on phones. */}+ <RecordHero />+ <RecordPhoneChrome menu={menuItems} copyValue={supplierId} /><VStack><Card>- <HStack className="justify-between items-start">+ <HStack className="justify-between items-start compact:hidden"><CardHeader><CardTitle className="flex items-center gap-2"><span>{routeData?.supplier?.name}</span>@@ -168,19 +192,7 @@ const SupplierHeader = () => {size="sm"/></DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={!permissions.can("delete", "purchasing")}- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Supplier</Trans>- </DropdownMenuItem>- </DropdownMenuContent>+ <DropdownMenuContent>{menuItems}</DropdownMenuContent></DropdownMenu><Copytext={supplierId}@@ -193,54 +205,62 @@ const SupplierHeader = () => {{isApprovalRequired &&status !== "Active" &&!hasApprovalRequest && (- <Button- leftIcon={<LuClipboardCheck />}- variant="primary"- isDisabled={- !permissions.can("update", "purchasing") ||- requestApprovalFetcher.state !== "idle"- }- isLoading={requestApprovalFetcher.state !== "idle"}- onClick={submitRequestApproval}- >- <Trans>Request Approval</Trans>- </Button>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuClipboardCheck />}+ variant="primary"+ isDisabled={+ !permissions.can("update", "purchasing") ||+ requestApprovalFetcher.state !== "idle"+ }+ isLoading={requestApprovalFetcher.state !== "idle"}+ onClick={submitRequestApproval}+ >+ <Trans>Request Approval</Trans>+ </Button>+ </RecordAction>)}{status === "Active" && canApprove && (- <Button- leftIcon={<LuX />}- variant="secondary"- isLoading={makeInactiveFetcher.state !== "idle"}- isDisabled={makeInactiveFetcher.state !== "idle"}- onClick={makeInactiveModal.onOpen}- >- <Trans>Make Inactive</Trans>- </Button>- )}- {isPending && hasApprovalRequest && (- <>- <Button- leftIcon={<LuCheckCheck />}- variant="primary"- isLoading={requestApprovalFetcher.state !== "idle"}- isDisabled={- !canApprove || requestApprovalFetcher.state !== "idle"- }- onClick={() => setApprovalDecision("Approved")}- >- <Trans>Approve</Trans>- </Button>+ <RecordAction slot="secondary"><ButtonleftIcon={<LuX />}- variant="destructive"- isLoading={requestApprovalFetcher.state !== "idle"}- isDisabled={- !canApprove || requestApprovalFetcher.state !== "idle"- }- onClick={() => setApprovalDecision("Rejected")}+ variant="secondary"+ isLoading={makeInactiveFetcher.state !== "idle"}+ isDisabled={makeInactiveFetcher.state !== "idle"}+ onClick={makeInactiveModal.onOpen}>- <Trans>Reject</Trans>+ <Trans>Make Inactive</Trans></Button>+ </RecordAction>+ )}+ {isPending && hasApprovalRequest && (+ <>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuCheckCheck />}+ variant="primary"+ isLoading={requestApprovalFetcher.state !== "idle"}+ isDisabled={+ !canApprove || requestApprovalFetcher.state !== "idle"+ }+ onClick={() => setApprovalDecision("Approved")}+ >+ <Trans>Approve</Trans>+ </Button>+ </RecordAction>+ <RecordAction slot="secondary">+ <Button+ leftIcon={<LuX />}+ variant="destructive"+ isLoading={requestApprovalFetcher.state !== "idle"}+ isDisabled={+ !canApprove || requestApprovalFetcher.state !== "idle"+ }+ onClick={() => setApprovalDecision("Rejected")}+ >+ <Trans>Reject</Trans>+ </Button>+ </RecordAction></>)}</CardAction>diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsxindex d12eaf6cb4..c52caef202 100644--- a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx@@ -79,7 +79,7 @@ const SupplierPaymentForm = ({ initialValues }: SupplierPaymentFormProps) => {<CustomFormFields table="supplierPayment" /></div></CardContent>- <CardFooter>+ <CardFooter className="compact:[&>*]:flex-1 compact:[&>div>*]:flex-1 compact:[&_button]:h-11"><HStack><Submit isDisabled={isDisabled}><Trans>Save</Trans>diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierShippingForm.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierShippingForm.tsxindex 4bdbc1a18f..6123e4bf64 100644--- a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierShippingForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierShippingForm.tsx@@ -106,7 +106,7 @@ const SupplierShippingForm = ({ initialValues }: SupplierShippingFormProps) => {<CustomFormFields table="supplierShipping" /></div></CardContent>- <CardFooter>+ <CardFooter className="compact:[&>*]:flex-1 compact:[&>div>*]:flex-1 compact:[&_button]:h-11"><HStack><Submit isDisabled={isDisabled}><Trans>Save</Trans>diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierTaxForm.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierTaxForm.tsxindex 57ab457032..3c62acc53f 100644--- a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierTaxForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierTaxForm.tsx@@ -101,7 +101,7 @@ const SupplierTaxForm = ({ initialValues }: SupplierTaxFormProps) => {<div />)}- <div className="col-span-3">+ <div className="col-span-3 compact:col-span-full"><Booleanname="taxExempt"label={t`Tax Exempt`}@@ -159,7 +159,7 @@ const SupplierTaxForm = ({ initialValues }: SupplierTaxFormProps) => {</div>)}</CardContent>- <CardFooter>+ <CardFooter className="compact:[&>*]:flex-1 compact:[&>div>*]:flex-1 compact:[&_button]:h-11"><HStack><Submit isDisabled={isDisabled}><Trans>Save</Trans>diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsxindex a8c72663a9..a47c75a5fe 100644--- a/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx@@ -135,6 +135,7 @@ const SuppliersTable = memo(function SuppliersTable({</div>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -146,6 +147,7 @@ const SuppliersTable = memo(function SuppliersTable({<SupplierStatusIndicator status={item.getValue<string>()} />),meta: {+ mobile: "P2",filter: {type: "static",options: supplierStatusType.map((status) => ({@@ -161,6 +163,7 @@ const SuppliersTable = memo(function SuppliersTable({header: t`Type`,cell: ({ row }) => <Enumerable value={row.original.type ?? ""} />,meta: {+ mobile: "P2",icon: <LuShapes />,sortBy: "type",exportValue: (row) => row.type,@@ -484,7 +487,12 @@ const SuppliersTable = memo(function SuppliersTable({primaryAction={permissions.can("create", "purchasing") && (<div className="flex items-center gap-2">- <Button variant="secondary" leftIcon={<LuShapes />} asChild>+ <Button+ className="compact:hidden"+ variant="secondary"+ leftIcon={<LuShapes />}+ asChild+ ><Link to={path.to.supplierTypes}><Trans>Supplier Types</Trans></Link>diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteExplorer.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteExplorer.tsxindex c859a8d4f9..215f185a01 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteExplorer.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteExplorer.tsx@@ -323,7 +323,7 @@ function SupplierQuoteLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteForm.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteForm.tsxindex a416f448b7..2f64a87e5d 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteForm.tsx@@ -243,7 +243,7 @@ const SupplierQuoteForm = ({ initialValues }: SupplierQuoteFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={(isEditing && isLocked) ||diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsxindex 8abd76e6fe..468cfc8d5e 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx@@ -15,9 +15,6 @@ import {DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,- Heading,- HStack,- IconButton,Input,InputGroup,InputRightElement,@@ -39,21 +36,19 @@ import {LuCheckCheck,LuChevronDown,LuCircleStop,- LuEllipsisVertical,LuExternalLink,LuEye,LuGitCompare,LuLoaderCircle,- LuPanelLeft,- LuPanelRight,LuSend,LuShoppingCart,LuTrash,LuTriangleAlert} from "react-icons/lu";import type { FetcherWithComponents } from "react-router";-import { Link, useFetcher, useParams, useRevalidator } from "react-router";+import { useFetcher, useParams, useRevalidator } from "react-router";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import {usePermissions,@@ -134,217 +129,209 @@ const SupplierQuoteHeader = () => {const canFinalize = ["Draft", "Declined"].includes(quoteStatus);+ const menuItems = (+ <>+ <DropdownMenuItem+ disabled={+ routeData?.quote?.status === "Draft" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "purchasing")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.supplierQuoteStatus(id)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ isLocked ||+ !permissions.can("delete", "purchasing") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Supplier Quote</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadges = (+ <>+ <SupplierQuoteStatus status={routeData?.quote?.status} />+ {isOutsideProcessing && (+ <Badge variant="default">{routeData?.quote?.supplierQuoteType}</Badge>+ )}+ {supplierApprovalRequired && !isSupplierApproved && (+ <Status color="red">+ <Trans>Unapproved Supplier</Trans>+ </Status>+ )}+ </>+ );return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.supplierQuoteDetails(id)}>- <Heading size="h4">- <span>{routeData?.quote?.supplierQuoteId}</span>- </Heading>- </Link>- <Copy text={routeData?.quote?.supplierQuoteId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- routeData?.quote?.status === "Draft" ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "purchasing")- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.supplierQuoteStatus(id)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- isLocked ||- !permissions.can("delete", "purchasing") ||- !permissions.is("employee")- }- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Supplier Quote</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <SupplierQuoteStatus status={routeData?.quote?.status} />- {isOutsideProcessing && (- <Badge variant="default">- {routeData?.quote?.supplierQuoteType}- </Badge>- )}- {supplierApprovalRequired && !isSupplierApproved && (- <Status color="red">- <Trans>Unapproved Supplier</Trans>- </Status>- )}- </HStack>- <HStack>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuEye />}- variant="secondary"- rightIcon={<LuChevronDown />}- >- <Trans>Preview</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem asChild>- <a- target="_blank"- href={path.to.externalSupplierQuote(- (routeData?.quote as any).externalLinkId- )}- rel="noreferrer"+ <RecordHeader+ title={routeData?.quote?.supplierQuoteId}+ titleTo={path.to.supplierQuoteDetails(id)}+ copyValue={routeData?.quote?.supplierQuoteId ?? ""}+ menu={menuItems}+ status={statusBadges}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuEye />}+ variant="secondary"+ rightIcon={<LuChevronDown />}>- <DropdownMenuIcon icon={<LuExternalLink />} />- <Trans>Digital Quote</Trans>- </a>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>+ <Trans>Preview</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuItem asChild>+ <a+ target="_blank"+ href={path.to.externalSupplierQuote(+ (routeData?.quote as any).externalLinkId+ )}+ rel="noreferrer"+ >+ <DropdownMenuIcon icon={<LuExternalLink />} />+ <Trans>Digital Quote</Trans>+ </a>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>{canSend && (- <Button- onClick={sendModal.onOpen}- isLoading={sendFetcher.state !== "idle"}- isDisabled={- quoteStatus == "Active" ||- sendFetcher.state !== "idle" ||- !permissions.can("update", "purchasing") ||- !hasLines- }- variant="primary"- leftIcon={<LuSend />}- >- <Trans>Send</Trans>- </Button>- )}-- {canFinalize && (- <Button- onClick={() => {- revalidator.revalidate();- finalizeModal.onOpen();- }}- isLoading={finalizeFetcher.state !== "idle"}- isDisabled={- finalizeFetcher.state !== "idle" ||- !permissions.can("update", "purchasing") ||- !hasLines- }- variant="secondary"- leftIcon={<LuCheckCheck />}- >- <Trans>Finalize</Trans>- </Button>- )}-- {routeData?.quote?.status === "Active" &&- (hasSiblingQuotes ? (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- isDisabled={- !permissions.can("update", "purchasing") ||- !isSupplierApproved- }- variant="primary"- leftIcon={<LuShoppingCart />}- rightIcon={<LuChevronDown />}- >- <Trans>Order</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem onClick={convertToOrderModal.onOpen}>- <DropdownMenuIcon icon={<LuShoppingCart />} />- <Trans>Order</Trans>- </DropdownMenuItem>- <DropdownMenuItem onClick={compareModal.onOpen}>- <DropdownMenuIcon icon={<LuGitCompare />} />- <Trans>Compare and Order</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- ) : (+ <RecordAction slot="primary"><Button+ onClick={sendModal.onOpen}+ isLoading={sendFetcher.state !== "idle"}isDisabled={+ quoteStatus == "Active" ||+ sendFetcher.state !== "idle" ||!permissions.can("update", "purchasing") ||- !isSupplierApproved+ !hasLines}variant="primary"- leftIcon={<LuShoppingCart />}- onClick={convertToOrderModal.onOpen}+ leftIcon={<LuSend />}>- <Trans>Order</Trans>+ <Trans>Send</Trans></Button>- ))}+ </RecordAction>+ )}- {routeData?.quote?.status === "Draft" && (- <statusFetcher.Form- method="post"- action={path.to.supplierQuoteStatus(id)}- >- <input type="hidden" name="status" value="Cancelled" />+ {canFinalize && (+ <RecordAction slot="secondary"><Button+ onClick={() => {+ revalidator.revalidate();+ finalizeModal.onOpen();+ }}+ isLoading={finalizeFetcher.state !== "idle"}isDisabled={- statusFetcher.state !== "idle" ||- !permissions.can("update", "purchasing")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Cancelled"+ finalizeFetcher.state !== "idle" ||+ !permissions.can("update", "purchasing") ||+ !hasLines}- leftIcon={<LuCircleStop />}- type="submit"variant="secondary"+ leftIcon={<LuCheckCheck />}>- <Trans>Cancel</Trans>+ <Trans>Finalize</Trans></Button>- </statusFetcher.Form>+ </RecordAction>)}- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>- </div>+ {routeData?.quote?.status === "Active" &&+ (hasSiblingQuotes ? (+ <RecordAction slot="primary">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ isDisabled={+ !permissions.can("update", "purchasing") ||+ !isSupplierApproved+ }+ variant="primary"+ leftIcon={<LuShoppingCart />}+ rightIcon={<LuChevronDown />}+ >+ <Trans>Order</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuItem onClick={convertToOrderModal.onOpen}>+ <DropdownMenuIcon icon={<LuShoppingCart />} />+ <Trans>Order</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem onClick={compareModal.onOpen}>+ <DropdownMenuIcon icon={<LuGitCompare />} />+ <Trans>Compare and Order</Trans>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>+ ) : (+ <RecordAction slot="primary">+ <Button+ isDisabled={+ !permissions.can("update", "purchasing") ||+ !isSupplierApproved+ }+ variant="primary"+ leftIcon={<LuShoppingCart />}+ onClick={convertToOrderModal.onOpen}+ >+ <Trans>Order</Trans>+ </Button>+ </RecordAction>+ ))}++ {routeData?.quote?.status === "Draft" && (+ <RecordAction slot="overflow">+ <statusFetcher.Form+ method="post"+ action={path.to.supplierQuoteStatus(id)}+ >+ <input type="hidden" name="status" value="Cancelled" />+ <Button+ isDisabled={+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "purchasing")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Cancelled"+ }+ leftIcon={<LuCircleStop />}+ type="submit"+ variant="secondary"+ >+ <Trans>Cancel</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>+ )}+ </>+ }+ /><SupplierQuoteToOrderDrawerisOpen={convertToOrderModal.isOpen}diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteLineForm.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteLineForm.tsxindex cb0b189b86..95a625ee0a 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteLineForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteLineForm.tsx@@ -301,7 +301,7 @@ const SupplierQuoteLineForm = ({/><VStack><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3">- <div className="col-span-2 grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min">+ <div className="col-span-2 compact:col-span-full grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min"><ItemautoFocusname="itemId"@@ -392,7 +392,7 @@ const SupplierQuoteLineForm = ({<Hidden name="supplierQuoteLineType" value="G/L Account" /><VStack><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3">- <div className="col-span-2 grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min">+ <div className="col-span-2 compact:col-span-full grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min"><Accountname="accountId"label={t`GL Account`}diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteSummary.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteSummary.tsxindex bcf1400338..d38232915e 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteSummary.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteSummary.tsx@@ -120,12 +120,12 @@ const LineItems = ({{line.thumbnailPath ? (<imgalt={itemReadableId!}- className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg"+ className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg compact:size-14"src={getPrivateUrl(line.thumbnailPath)}/>) : (- <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4">- <LuImage className="w-16 h-16 text-muted-foreground" />+ <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4 compact:size-14 compact:p-3">+ <LuImage className="w-16 h-16 text-muted-foreground compact:size-8" /></div>)}diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuotesTable.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuotesTable.tsxindex 1059e0eeca..4b0be610ff 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuotesTable.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuotesTable.tsx@@ -89,6 +89,7 @@ const SupplierQuotesTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -99,6 +100,7 @@ const SupplierQuotesTable = memo(<SupplierAvatar supplierId={row.original.supplierId} />),meta: {+ mobile: "P3",filter: {type: "static",options: suppliers?.map((supplier) => ({@@ -117,6 +119,7 @@ const SupplierQuotesTable = memo(<SupplierQuoteStatus status={row.original.status} />),meta: {+ mobile: "P2",filter: {type: "static",options: supplierQuoteStatusType.map((status) => ({diff --git a/apps/erp/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTable.tsx b/apps/erp/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTable.tsxindex ddaf5a4cf0..425f7d00bd 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTable.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTable.tsx@@ -41,6 +41,7 @@ const SupplierTypesTable = memo(({ data, count }: SupplierTypesTableProps) => {/>),meta: {+ mobile: "P1",icon: <LuShapes />}}diff --git a/apps/erp/app/modules/quality/ui/Actions/ActionsTable.tsx b/apps/erp/app/modules/quality/ui/Actions/ActionsTable.tsxindex e056e678aa..647b753c9d 100644--- a/apps/erp/app/modules/quality/ui/Actions/ActionsTable.tsx+++ b/apps/erp/app/modules/quality/ui/Actions/ActionsTable.tsx@@ -71,6 +71,7 @@ const ActionsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -79,6 +80,7 @@ const ActionsTable = memo(header: t`Action Type`,cell: ({ row }) => <Enumerable value={row.original.actionType} />,meta: {+ mobile: "P2",icon: <LuFileText />,filter: {type: "static",@@ -94,6 +96,7 @@ const ActionsTable = memo(header: t`Action Status`,cell: ({ row }) => <ActionStatus status={row.original.status} />,meta: {+ mobile: "P2",icon: <LuCircleGauge />,filter: {type: "static",@@ -111,6 +114,7 @@ const ActionsTable = memo(<EmployeeAvatar employeeId={row.original.assignee} />),meta: {+ mobile: "P3",filter: {type: "static",options: people.map((employee) => ({@@ -167,6 +171,7 @@ const ActionsTable = memo();},meta: {+ mobile: "P2",icon: <LuCalendar />}},diff --git a/apps/erp/app/modules/quality/ui/Calibrations/GaugeCalibrationRecordsTable.tsx b/apps/erp/app/modules/quality/ui/Calibrations/GaugeCalibrationRecordsTable.tsxindex 6665dadfc1..58db3ead06 100644--- a/apps/erp/app/modules/quality/ui/Calibrations/GaugeCalibrationRecordsTable.tsx+++ b/apps/erp/app/modules/quality/ui/Calibrations/GaugeCalibrationRecordsTable.tsx@@ -116,6 +116,7 @@ const GaugeCalibrationRecordsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -126,6 +127,7 @@ const GaugeCalibrationRecordsTable = memo(<DateTime value={item.getValue<string>()} variant="date" />),meta: {+ mobile: "P2",icon: <LuCalendar />}},@@ -138,6 +140,7 @@ const GaugeCalibrationRecordsTable = memo(/>),meta: {+ mobile: "P2",icon: <LuCheck />,filter: {type: "static",@@ -229,6 +232,7 @@ const GaugeCalibrationRecordsTable = memo(<SupplierAvatar supplierId={row.original.supplierId} />),meta: {+ mobile: "P3",filter: {type: "static",options: suppliers?.map((supplier) => ({diff --git a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentEditor.tsx b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentEditor.tsxindex 4c787aa8e8..7f19d6f750 100644--- a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentEditor.tsx+++ b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentEditor.tsx@@ -106,7 +106,7 @@ export default function QualityDocumentEditor() {}}/>) : (- <div className="flex flex-col gap-6 w-full h-full p-8">+ <div className="flex flex-col gap-6 w-full h-full p-8 compact:p-4"><h1 className="md:text-3xl text-2xl font-semibold leading-tight tracking-tight text-foreground">{documentName}</h1>diff --git a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentHeader.tsx b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentHeader.tsxindex 5e1ffa69aa..40c6121d6b 100644--- a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentHeader.tsx+++ b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentHeader.tsx@@ -6,36 +6,22 @@ import type { ApprovalDecision } from "@carbon/ee/approvals";import {Badge,Button,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Tooltip,TooltipContent,TooltipTrigger,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import type { PostgrestResponse } from "@supabase/supabase-js";import { Suspense, useEffect, useState } from "react";-import {- LuCheckCheck,- LuClipboardCheck,- LuEllipsisVertical,- LuPanelRight,- LuTrash,- LuX-} from "react-icons/lu";+import { LuCheckCheck, LuClipboardCheck, LuTrash, LuX } from "react-icons/lu";import { Await, useFetcher, useParams } from "react-router";import { VersionMenu } from "~/components";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";import { useDocumentStore } from "~/stores";@@ -121,126 +107,133 @@ const QualityDocumentHeader = () => {newVersionDisclosure.onClose();}, [id]);+ const versionBadge = (+ <Badge variant="outline">V{routeData?.document?.version}</Badge>+ );+ const statusBadge = (+ <QualityDocumentStatus status={routeData?.document?.status} />+ );+ const menuItems = (+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "quality") ||+ !permissions.is("employee") ||+ (canActivate && hasApprovalRequest && !canDelete)+ }+ destructive+ onClick={deleteDisclosure.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Document</Trans>+ </DropdownMenuItem>+ );+return (- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0} className="flex-grow">- <HStack>- <Heading size="h4" className="flex items-center gap-2">- <span>{displayName}</span>- <Badge variant="outline">V{routeData?.document?.version}</Badge>- <QualityDocumentStatus status={routeData?.document?.status} />- </Heading>- <Copy text={routeData?.document?.name ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "quality") ||- !permissions.is("employee") ||- (canActivate && hasApprovalRequest && !canDelete)- }- destructive- onClick={deleteDisclosure.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Document</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>- <div className="flex flex-shrink-0 gap-1 items-center justify-end">- {canActivate && !hasApprovalRequest && (- <Tooltip>- <TooltipTrigger asChild>- <span className="inline-flex">- <Button- leftIcon={- isApprovalRequired ? <LuClipboardCheck /> : <LuCheckCheck />- }- variant="primary"- isLoading={submitLoading}- isDisabled={- !permissions.can("update", "quality") ||- !permissions.is("employee") ||- !statusIdle- }- onClick={submitForActivation}- >- {submitButtonLabel}- </Button>- </span>- </TooltipTrigger>- <TooltipContent>{submitButtonTooltip}</TooltipContent>- </Tooltip>- )}- {canActivate && hasApprovalRequest && (+ <>+ <RecordHeader+ title={displayName}+ copyValue={routeData?.document?.name ?? ""}+ menu={menuItems}+ status={<>- <Button- leftIcon={<LuCheckCheck />}- variant="primary"- isDisabled={!canApprove}- onClick={() => setApprovalDecision("Approved")}- >- <Trans>Approve</Trans>- </Button>- <Button- leftIcon={<LuX />}- variant="destructive"- isDisabled={!canApprove}- onClick={() => setApprovalDecision("Rejected")}- >- <Trans>Reject</Trans>- </Button>+ {versionBadge}+ {statusBadge}</>- )}- <Suspense fallback={null}>- <Await resolve={routeData?.versions}>- {(versions) => {- const allVersions =- versions?.data ??- (routeData?.document ? [routeData.document] : []);- return (- <VersionMenu- versions={allVersions}- currentVersionId={id}- getKey={(v) => v.id}- getHref={(v) => path.to.qualityDocument(v.id)}- renderLabel={(v) => (- <>- <Badge variant="outline">V{v.version}</Badge>- <span>{v.name}</span>- </>- )}- renderStatus={(v) => (- <QualityDocumentStatus status={v.status} />- )}- onNewVersion={- permissions.can("create", "quality")- ? newVersionDisclosure.onOpen- : undefined- }- />- );- }}- </Await>- </Suspense>- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </div>+ }+ onToggleProperties={toggleProperties}+ actions={+ <>+ {canActivate && !hasApprovalRequest && (+ <RecordAction slot="primary">+ <Tooltip>+ <TooltipTrigger asChild>+ <span className="inline-flex">+ <Button+ leftIcon={+ isApprovalRequired ? (+ <LuClipboardCheck />+ ) : (+ <LuCheckCheck />+ )+ }+ variant="primary"+ isLoading={submitLoading}+ isDisabled={+ !permissions.can("update", "quality") ||+ !permissions.is("employee") ||+ !statusIdle+ }+ onClick={submitForActivation}+ >+ {submitButtonLabel}+ </Button>+ </span>+ </TooltipTrigger>+ <TooltipContent>{submitButtonTooltip}</TooltipContent>+ </Tooltip>+ </RecordAction>+ )}+ {canActivate && hasApprovalRequest && (+ <>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuCheckCheck />}+ variant="primary"+ isDisabled={!canApprove}+ onClick={() => setApprovalDecision("Approved")}+ >+ <Trans>Approve</Trans>+ </Button>+ </RecordAction>+ <RecordAction slot="secondary">+ <Button+ leftIcon={<LuX />}+ variant="destructive"+ isDisabled={!canApprove}+ onClick={() => setApprovalDecision("Rejected")}+ >+ <Trans>Reject</Trans>+ </Button>+ </RecordAction>+ </>+ )}+ <RecordAction slot="overflow">+ <Suspense fallback={null}>+ <Await resolve={routeData?.versions}>+ {(versions) => {+ const allVersions =+ versions?.data ??+ (routeData?.document ? [routeData.document] : []);+ return (+ <VersionMenu+ versions={allVersions}+ currentVersionId={id}+ getKey={(v) => v.id}+ getHref={(v) => path.to.qualityDocument(v.id)}+ renderLabel={(v) => (+ <>+ <Badge variant="outline">V{v.version}</Badge>+ <span>{v.name}</span>+ </>+ )}+ renderStatus={(v) => (+ <QualityDocumentStatus status={v.status} />+ )}+ onNewVersion={+ permissions.can("create", "quality")+ ? newVersionDisclosure.onOpen+ : undefined+ }+ />+ );+ }}+ </Await>+ </Suspense>+ </RecordAction>+ </>+ }+ />{newVersionDisclosure.isOpen && (<QualityDocumentFormtype="copy"@@ -277,7 +270,7 @@ const QualityDocumentHeader = () => {onClose={() => setApprovalDecision(null)}/>)}- </div>+ </>);};diff --git a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentsTable.tsx b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentsTable.tsxindex 76aab85868..a8be0c343b 100644--- a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentsTable.tsx+++ b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentsTable.tsx@@ -80,6 +80,7 @@ const QualityDocumentsTable = memo(</div>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -91,6 +92,8 @@ const QualityDocumentsTable = memo(<QualityDocumentStatus status={row.original.status} />),meta: {+ mobile: "P2",+ mobilePill: true,icon: <LuCalendar />}},@@ -101,6 +104,7 @@ const QualityDocumentsTable = memo(<EmployeeAvatar employeeId={row.original.assignee} />),meta: {+ mobile: "P3",icon: <LuUser />}},diff --git a/apps/erp/app/modules/quality/ui/Gauge/GaugesTable.tsx b/apps/erp/app/modules/quality/ui/Gauge/GaugesTable.tsxindex d6cfd032bc..d12e767e1a 100644--- a/apps/erp/app/modules/quality/ui/Gauge/GaugesTable.tsx+++ b/apps/erp/app/modules/quality/ui/Gauge/GaugesTable.tsx@@ -102,6 +102,7 @@ const GaugesTable = memo(({ data, types, count }: GaugesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -112,6 +113,7 @@ const GaugesTable = memo(({ data, types, count }: GaugesTableProps) => {return <SupplierAvatar supplierId={row.original.supplierId} />;},meta: {+ mobile: "P3",filter: {type: "static",options: suppliers?.map((supplier) => ({@@ -135,6 +137,7 @@ const GaugesTable = memo(({ data, types, count }: GaugesTableProps) => {/>),meta: {+ mobile: "P2",icon: <LuShapes />,filter: {type: "static",@@ -154,6 +157,7 @@ const GaugesTable = memo(({ data, types, count }: GaugesTableProps) => {/>),meta: {+ mobile: "P2",icon: <LuCircleGauge />,filter: {type: "static",@@ -218,6 +222,7 @@ const GaugesTable = memo(({ data, types, count }: GaugesTableProps) => {<DateTime value={row.original.nextCalibrationDate} variant="date" />),meta: {+ mobile: "P2",icon: <LuCalendar />}},diff --git a/apps/erp/app/modules/quality/ui/GaugeTypes/GaugeTypesTable.tsx b/apps/erp/app/modules/quality/ui/GaugeTypes/GaugeTypesTable.tsxindex 4020ebaafc..89f9ac6205 100644--- a/apps/erp/app/modules/quality/ui/GaugeTypes/GaugeTypesTable.tsx+++ b/apps/erp/app/modules/quality/ui/GaugeTypes/GaugeTypesTable.tsx@@ -39,6 +39,7 @@ const GaugeTypesTable = memo(({ data, count }: GaugeTypesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuCircleGauge />}}diff --git a/apps/erp/app/modules/quality/ui/InspectionDocument/InspectionDocumentTable.tsx b/apps/erp/app/modules/quality/ui/InspectionDocument/InspectionDocumentTable.tsxindex 89ad88d425..85e55df26b 100644--- a/apps/erp/app/modules/quality/ui/InspectionDocument/InspectionDocumentTable.tsx+++ b/apps/erp/app/modules/quality/ui/InspectionDocument/InspectionDocumentTable.tsx@@ -79,6 +79,7 @@ const InspectionDocumentTable = memo();},meta: {+ mobile: "P1",filter: {type: "static" as const,options: items?.map((item) => ({@@ -93,7 +94,7 @@ const InspectionDocumentTable = memo(accessorKey: "name",header: t`Name`,cell: ({ row }) => row.original.name,- meta: { icon: <LuTarget /> }+ meta: { mobile: "P3", icon: <LuTarget /> }},{id: "createdBy",@@ -109,7 +110,7 @@ const InspectionDocumentTable = memo(cell: (item) => (<DateTime value={item.getValue<string>()} variant="date" />),- meta: { icon: <LuFileText /> }+ meta: { mobile: "P2", icon: <LuFileText /> }},{id: "updatedBy",diff --git a/apps/erp/app/modules/quality/ui/Inspections/InspectionMeasurementGrid.tsx b/apps/erp/app/modules/quality/ui/Inspections/InspectionMeasurementGrid.tsxindex 1a64fbf502..acd90a549b 100644--- a/apps/erp/app/modules/quality/ui/Inspections/InspectionMeasurementGrid.tsx+++ b/apps/erp/app/modules/quality/ui/Inspections/InspectionMeasurementGrid.tsx@@ -646,12 +646,13 @@ const InspectionMeasurementGrid = ({header: t`Characteristic`,cell: ({ row }) => (<span- className="line-clamp-2 max-w-[180px] text-xs"+ className="line-clamp-2 max-w-[180px] text-xs compact:whitespace-normal"title={row.original.description ?? undefined}>{row.original.description ?? "—"}</span>- )+ ),+ meta: { mobile: "P1" }},{accessorKey: "specLabel",@@ -943,6 +944,7 @@ const InspectionMeasurementGrid = ({className="flex h-full min-h-0 w-full flex-col"><Table<FeatureGridRow>+ mobileLayout="table"compactcolumns={columns}data={rows}diff --git a/apps/erp/app/modules/quality/ui/Inspections/InspectionView.tsx b/apps/erp/app/modules/quality/ui/Inspections/InspectionView.tsxindex ad5449f4fd..7b68533d0c 100644--- a/apps/erp/app/modules/quality/ui/Inspections/InspectionView.tsx+++ b/apps/erp/app/modules/quality/ui/Inspections/InspectionView.tsx@@ -48,6 +48,11 @@ import {LuTriangleAlert} from "react-icons/lu";import { useFetcher } from "react-router";+import {+ RecordAction,+ RecordHero,+ RecordPhoneChrome+} from "~/components/Layout/RecordHeader";import { Confirm } from "~/components/Modals";import { usePermissions } from "~/hooks";import type {@@ -492,64 +497,80 @@ const InspectionView = ({.filter(Boolean).join(" · ");+ const statusBadge = (+ <Badge variant={statusBadgeVariant}>{inspection.status}</Badge>+ );+return (<div className="flex h-full flex-col overflow-hidden">+ <RecordHero subtitle={metaLine} status={statusBadge} />+ <RecordPhoneChrome />{/* Header bar — mirrors InspectionDocumentEditor's header */}- <div className="flex min-h-[var(--header-height)] flex-shrink-0 flex-wrap items-center justify-between gap-x-3 gap-y-2 overflow-x-auto border-b border-border bg-card px-4 py-2 scrollbar-hide">+ <div className="flex min-h-[var(--header-height)] flex-shrink-0 flex-wrap items-center justify-between gap-x-3 gap-y-2 overflow-x-auto border-b border-border bg-card px-4 py-2 scrollbar-hide compact:hidden"><div className="min-w-0 flex-1 pr-2"><HStack spacing={2} className="items-center"><h1 className="truncate text-base font-semibold">{inspection.inspectionId}</h1>- <Badge variant={statusBadgeVariant}>{inspection.status}</Badge>+ {statusBadge}</HStack><p className="truncate text-xs text-muted-foreground">{metaLine}</p></div><HStack spacing={2} className="flex-shrink-0 flex-wrap justify-end">- <Button- variant="secondary"- leftIcon={<LuShieldAlert />}- asChild- isDisabled={failedTrackedEntityIds.length === 0}- >- <a href={newIssueHref} target="_blank" rel="noreferrer">- <Trans>Create Issue</Trans>- </a>- </Button>- {canUpdate && !lotClosed && !hasMeasurements && (+ <RecordAction slot="overflow"><Buttonvariant="secondary"- leftIcon={<LuFileText />}- onClick={documentSwitchDisclosure.onOpen}- >- <Trans>Change Document</Trans>- </Button>- )}- {isSerial && !lotClosed && (- <Button- variant={allSamplesLoaded ? "secondary" : "primary"}- leftIcon={<LuScan />}- onClick={scannerDisclosure.onOpen}- isDisabled={!canUpdate}+ leftIcon={<LuShieldAlert />}+ asChild+ isDisabled={failedTrackedEntityIds.length === 0}>- <Trans>Add Sample</Trans>+ <a href={newIssueHref} target="_blank" rel="noreferrer">+ <Trans>Create Issue</Trans>+ </a></Button>- )}- {isReceiptSource && (- <>+ </RecordAction>+ {canUpdate && !lotClosed && !hasMeasurements && (+ <RecordAction slot="overflow"><Button- variant="destructive"- onClick={rejectConfirmDisclosure.onOpen}- isDisabled={!canUpdate || !canReject}+ variant="secondary"+ leftIcon={<LuFileText />}+ onClick={documentSwitchDisclosure.onOpen}>- <Trans>Reject Lot</Trans>+ <Trans>Change Document</Trans></Button>+ </RecordAction>+ )}+ {isSerial && !lotClosed && (+ <RecordAction slot={isReceiptSource ? "overflow" : "primary"}><Button- onClick={acceptConfirmDisclosure.onOpen}- isDisabled={!canUpdate || !canAccept}+ variant={allSamplesLoaded ? "secondary" : "primary"}+ leftIcon={<LuScan />}+ onClick={scannerDisclosure.onOpen}+ isDisabled={!canUpdate}>- <Trans>Accept Lot</Trans>+ <Trans>Add Sample</Trans></Button>+ </RecordAction>+ )}+ {isReceiptSource && (+ <>+ <RecordAction slot="secondary">+ <Button+ variant="destructive"+ onClick={rejectConfirmDisclosure.onOpen}+ isDisabled={!canUpdate || !canReject}+ >+ <Trans>Reject Lot</Trans>+ </Button>+ </RecordAction>+ <RecordAction slot="primary">+ <Button+ onClick={acceptConfirmDisclosure.onOpen}+ isDisabled={!canUpdate || !canAccept}+ >+ <Trans>Accept Lot</Trans>+ </Button>+ </RecordAction></>)}</HStack>@@ -582,7 +603,9 @@ const InspectionView = ({{/* PDF viewer — pinned height while the grid is expanded */}<divclassName={`flex min-h-0 min-w-full flex-col overflow-hidden rounded-lg border bg-muted ${- gridExpanded ? "shrink-0" : "min-h-[220px] flex-1"+ gridExpanded+ ? "shrink-0 compact:!h-[40dvh]"+ : "min-h-[220px] flex-1"}`}style={{...(gridExpanded ? { height: pdfPaneHeightPx } : undefined),@@ -621,7 +644,7 @@ const InspectionView = ({aria-orientation="horizontal"aria-label={t`Drag to resize drawing and characteristics`}aria-valuenow={Math.round(pdfPaneHeightPx)}- className={`group flex h-2 shrink-0 cursor-row-resize touch-none items-center justify-center rounded-md px-2 hover:bg-muted/80 ${+ className={`group flex h-2 shrink-0 cursor-row-resize touch-none items-center justify-center rounded-md px-2 hover:bg-muted/80 compact:hidden ${isResizingSplit ? "bg-muted" : ""}`}onMouseDown={onSplitResizeMouseDown}@@ -634,7 +657,7 @@ const InspectionView = ({<divclassName={gridExpanded- ? "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-lg bg-card"+ ? "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-lg bg-card compact:mt-2 compact:!min-h-0": "flex max-h-[14rem] min-w-0 shrink-0 flex-col overflow-hidden rounded-lg bg-card"}style={@@ -696,7 +719,7 @@ const InspectionView = ({// No drawing: the grid takes the full body. Feature-driven lots still// render their features; lots without a document collapse to the// single "Overall result" row inside the same grid.- <div className="flex min-h-0 flex-1 flex-col overflow-hidden px-4 pb-4 pt-2">+ <div className="flex min-h-0 flex-1 flex-col overflow-hidden px-4 pb-4 pt-2 compact:px-0"><div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-lg bg-card"><div className="min-h-0 flex-1 overflow-auto"><InspectionMeasurementGriddiff --git a/apps/erp/app/modules/quality/ui/Inspections/InspectionsTable.tsx b/apps/erp/app/modules/quality/ui/Inspections/InspectionsTable.tsxindex 4285ef8c3c..17f9cb4c95 100644--- a/apps/erp/app/modules/quality/ui/Inspections/InspectionsTable.tsx+++ b/apps/erp/app/modules/quality/ui/Inspections/InspectionsTable.tsx@@ -67,6 +67,7 @@ const InspectionsTable = memo(({ data, count }: InspectionsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -75,7 +76,7 @@ const InspectionsTable = memo(({ data, count }: InspectionsTableProps) => {header: t`Item`,cell: ({ row }) => (<div className="flex flex-col gap-0">- <span className="text-sm font-medium">+ <span className="text-sm font-medium compact:text-[13px] compact:font-normal">{getItemReadableId(items, (row.original as any).itemId) ??(row.original as any).itemReadableId ??""}@@ -86,6 +87,7 @@ const InspectionsTable = memo(({ data, count }: InspectionsTableProps) => {</div>),meta: {+ mobile: "P3",icon: <LuBookMarked />,filter: {type: "static",@@ -143,7 +145,7 @@ const InspectionsTable = memo(({ data, count }: InspectionsTableProps) => {cell: ({ row }) => (<span className="text-sm">{(row.original as any).lotSize ?? 0}</span>),- meta: { icon: <LuBlocks /> }+ meta: { mobile: "P2", mobileLabel: true, icon: <LuBlocks /> }},{accessorKey: "sampleSize",@@ -167,6 +169,7 @@ const InspectionsTable = memo(({ data, count }: InspectionsTableProps) => {</Badge>),meta: {+ mobile: "P2",icon: <LuClipboardCheck />,filter: {type: "static",diff --git a/apps/erp/app/modules/quality/ui/Issue/AssociatedItemsList.tsx b/apps/erp/app/modules/quality/ui/Issue/AssociatedItemsList.tsxindex 27b3623a4e..d415bc1c20 100644--- a/apps/erp/app/modules/quality/ui/Issue/AssociatedItemsList.tsx+++ b/apps/erp/app/modules/quality/ui/Issue/AssociatedItemsList.tsx@@ -403,8 +403,8 @@ export function AssociatedItemsList({}}}>- <div className="flex items-start w-full gap-4">- <div className="flex flex-col min-w-0 flex-1">+ <div className="flex items-start w-full gap-4 compact:flex-wrap compact:gap-y-2">+ <div className="flex flex-col min-w-0 flex-1 compact:basis-full"><h3 className="font-semibold truncate">{item.readableIdWithRevision}</h3>diff --git a/apps/erp/app/modules/quality/ui/Issue/IssueAssociations.tsx b/apps/erp/app/modules/quality/ui/Issue/IssueAssociations.tsxindex 55b1ae3e2a..0d2e771366 100644--- a/apps/erp/app/modules/quality/ui/Issue/IssueAssociations.tsx+++ b/apps/erp/app/modules/quality/ui/Issue/IssueAssociations.tsx@@ -279,7 +279,7 @@ export function IssueAssociationItem({icon={<LuEllipsisVertical />}variant="ghost"size="sm"- className="absolute right-1 top-1 flex-shrink-0 opacity-0 group-hover/association:opacity-100 data-[state=open]:opacity-100 text-foreground/70 hover:text-foreground"+ className="absolute right-1 top-1 flex-shrink-0 opacity-0 group-hover/association:opacity-100 data-[state=open]:opacity-100 text-foreground/70 hover:text-foreground compact:opacity-100"/></DropdownMenuTrigger><DropdownMenuContent>diff --git a/apps/erp/app/modules/quality/ui/Issue/IssueHeader.tsx b/apps/erp/app/modules/quality/ui/Issue/IssueHeader.tsxindex 0f4284d876..1b1ef39f30 100644--- a/apps/erp/app/modules/quality/ui/Issue/IssueHeader.tsx+++ b/apps/erp/app/modules/quality/ui/Issue/IssueHeader.tsx@@ -4,25 +4,19 @@import {Button,- Copy,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import {LuChevronDown,LuCircleCheck,LuCirclePlay,- LuEllipsisVertical,LuExternalLink,LuFile,LuGitPullRequestArrow,@@ -30,6 +24,7 @@ import {LuTrash} from "react-icons/lu";import { Link, useFetcher, useParams } from "react-router";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";import { useSuppliers } from "~/stores/suppliers";@@ -54,156 +49,154 @@ const IssueHeader = () => {const [suppliers] = useSuppliers();const deleteIssueModal = useDisclosure();+ const statusBadge = <IssueStatus status={status} />;+ const menuItems = (+ <>+ <DropdownMenuItem disabled={!permissions.can("create", "parts")} asChild>+ <Link+ to={`${+ path.to.newChangeNotice+ }?sourceType=nonConformance&sourceId=${id}&name=${encodeURIComponent(+ routeData?.nonConformance?.nonConformanceId ?? ""+ )}`}+ >+ <DropdownMenuIcon icon={<LuGitPullRequestArrow />} />+ <Trans>Create Change Notice</Trans>+ </Link>+ </DropdownMenuItem>+ <DropdownMenuItem+ disabled={+ !["In Progress", "Closed"].includes(status ?? "") ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "quality")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Registered" },+ { method: "post", action: path.to.issueStatus(id) }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ destructive+ disabled={+ !permissions.can("delete", "quality") ||+ !permissions.is("employee") ||+ isIssueLocked(status)+ }+ onClick={deleteIssueModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Issue</Trans>+ </DropdownMenuItem>+ </>+ );+return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0}>- <HStack>- <Link to={path.to.issueDetails(id)}>- <Heading size="h4" className="flex items-center gap-2">- {/* <ModuleIcon icon={<MethodItemTypeIcon type="Part" />} /> */}- <span>{routeData?.nonConformance?.nonConformanceId}</span>- </Heading>- </Link>- <IssueStatus status={status} />- <Copy text={routeData?.nonConformance?.nonConformanceId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={!permissions.can("create", "parts")}- asChild- >- <Link- to={`${- path.to.newChangeNotice- }?sourceType=nonConformance&sourceId=${id}&name=${encodeURIComponent(- routeData?.nonConformance?.nonConformanceId ?? ""- )}`}+ <RecordHeader+ title={routeData?.nonConformance?.nonConformanceId}+ titleTo={path.to.issueDetails(id)}+ copyValue={routeData?.nonConformance?.nonConformanceId ?? ""}+ menu={menuItems}+ status={statusBadge}+ actions={+ <>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuFile />}+ variant="secondary"+ rightIcon={<LuChevronDown />}>- <DropdownMenuIcon icon={<LuGitPullRequestArrow />} />- <Trans>Create Change Notice</Trans>- </Link>- </DropdownMenuItem>- <DropdownMenuItem- disabled={- !["In Progress", "Closed"].includes(status ?? "") ||+ <Trans>Reports</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ {routeData?.suppliers?.map((s) => {+ if (!s.externalLinkId) return null;+ const supplier = suppliers.find(+ (sup) => sup.id === s.supplierId+ );+ return (+ <DropdownMenuItem key={s.supplierId} asChild>+ <Link to={path.to.externalScar(s.externalLinkId)}>+ <DropdownMenuIcon icon={<LuExternalLink />} />+ {supplier?.name} <Trans>SCAR</Trans>+ </Link>+ </DropdownMenuItem>+ );+ })}+ <DropdownMenuItem asChild>+ <a+ target="_blank"+ href={path.to.file.nonConformance(id)}+ rel="noreferrer"+ >+ <DropdownMenuIcon icon={<LuFile />} />+ <Trans>Report</Trans>+ </a>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>+ <RecordAction+ slot={status === "Registered" ? "primary" : "secondary"}+ >+ <statusFetcher.Form+ method="post"+ action={path.to.issueStatus(id)}+ >+ <input type="hidden" name="status" value="In Progress" />+ <Button+ type="submit"+ leftIcon={<LuCirclePlay />}+ variant={status === "Registered" ? "primary" : "secondary"}+ isDisabled={+ status !== "Registered" ||statusFetcher.state !== "idle" ||!permissions.can("update", "quality")}- onClick={() => {- statusFetcher.submit(- { status: "Registered" },- { method: "post", action: path.to.issueStatus(id) }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- destructive- disabled={- !permissions.can("delete", "quality") ||- !permissions.is("employee") ||- isIssueLocked(status)+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "In Progress"}- onClick={deleteIssueModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Issue</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>-- <HStack>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuFile />}- variant="secondary"- rightIcon={<LuChevronDown />}- >- <Trans>Reports</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- {routeData?.suppliers?.map((s) => {- if (!s.externalLinkId) return null;- const supplier = suppliers.find(- (sup) => sup.id === s.supplierId- );- return (- <DropdownMenuItem key={s.supplierId} asChild>- <Link to={path.to.externalScar(s.externalLinkId)}>- <DropdownMenuIcon icon={<LuExternalLink />} />- {supplier?.name} <Trans>SCAR</Trans>- </Link>- </DropdownMenuItem>- );- })}- <DropdownMenuItem asChild>- <a- target="_blank"- href={path.to.file.nonConformance(id)}- rel="noreferrer">- <DropdownMenuIcon icon={<LuFile />} />- <Trans>Report</Trans>- </a>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <statusFetcher.Form method="post" action={path.to.issueStatus(id)}>- <input type="hidden" name="status" value="In Progress" />- <Button- type="submit"- leftIcon={<LuCirclePlay />}- variant={status === "Registered" ? "primary" : "secondary"}- isDisabled={- status !== "Registered" ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "quality")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "In Progress"- }- >- <Trans>Start</Trans>- </Button>- </statusFetcher.Form>+ <Trans>Start</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>- <statusFetcher.Form method="post" action={path.to.closeIssue(id)}>- <Button- type="submit"- leftIcon={<LuCircleCheck />}- variant={status === "In Progress" ? "primary" : "secondary"}- isDisabled={- status !== "In Progress" ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "quality")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formAction === path.to.closeIssue(id)- }+ <RecordAction+ slot={status === "Registered" ? "secondary" : "primary"}>- <Trans>Complete</Trans>- </Button>- </statusFetcher.Form>- </HStack>- </div>+ <statusFetcher.Form method="post" action={path.to.closeIssue(id)}>+ <Button+ type="submit"+ leftIcon={<LuCircleCheck />}+ variant={status === "In Progress" ? "primary" : "secondary"}+ isDisabled={+ status !== "In Progress" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "quality")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formAction === path.to.closeIssue(id)+ }+ >+ <Trans>Complete</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>+ </>+ }+ />{deleteIssueModal.isOpen && (<ConfirmDeleteaction={path.to.deleteIssue(id)}diff --git a/apps/erp/app/modules/quality/ui/Issue/IssuesTable.tsx b/apps/erp/app/modules/quality/ui/Issue/IssuesTable.tsxindex 01f0c58329..2e670880b6 100644--- a/apps/erp/app/modules/quality/ui/Issue/IssuesTable.tsx+++ b/apps/erp/app/modules/quality/ui/Issue/IssuesTable.tsx@@ -84,6 +84,7 @@ const IssuesTable = memo(({ data, types, count }: IssuesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -93,6 +94,7 @@ const IssuesTable = memo(({ data, types, count }: IssuesTableProps) => {header: t`Status`,cell: ({ row }) => <IssueStatus status={row.original.status} />,meta: {+ mobile: "P2",icon: <LuCircleGauge />,filter: {type: "static",@@ -116,6 +118,7 @@ const IssuesTable = memo(({ data, types, count }: IssuesTableProps) => {/>),meta: {+ mobile: "P2",icon: <LuOctagonX />,filter: {type: "static",@@ -219,6 +222,7 @@ const IssuesTable = memo(({ data, types, count }: IssuesTableProps) => {<EmployeeAvatar employeeId={row.original.assignee} />),meta: {+ mobile: "P3",filter: {type: "static",options: people.map((employee) => ({diff --git a/apps/erp/app/modules/quality/ui/IssueTypes/IssueTypesTable.tsx b/apps/erp/app/modules/quality/ui/IssueTypes/IssueTypesTable.tsxindex d50d64cfbb..008eecc219 100644--- a/apps/erp/app/modules/quality/ui/IssueTypes/IssueTypesTable.tsx+++ b/apps/erp/app/modules/quality/ui/IssueTypes/IssueTypesTable.tsx@@ -39,6 +39,7 @@ const IssueTypesTable = memo(({ data, count }: IssueTypesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuOctagonX />}}diff --git a/apps/erp/app/modules/quality/ui/IssueWorkflows/IssueWorkflowForm.tsx b/apps/erp/app/modules/quality/ui/IssueWorkflows/IssueWorkflowForm.tsxindex adaaacda27..4533763326 100644--- a/apps/erp/app/modules/quality/ui/IssueWorkflows/IssueWorkflowForm.tsx+++ b/apps/erp/app/modules/quality/ui/IssueWorkflows/IssueWorkflowForm.tsx@@ -148,7 +148,7 @@ const IssueWorkflowForm = ({/><VStackspacing={4}- className="py-12 px-4 max-w-[50rem] h-full mx-auto gap-2"+ className="py-12 px-4 max-w-[50rem] h-full mx-auto gap-2 compact:pt-4"><HStack className="w-full justify-between"><VStack spacing={0}>@@ -272,7 +272,7 @@ const IssueWorkflowForm = ({key={action.id}type="button"onClick={() => handleAddAction(action.id)}- className="flex items-center gap-2 px-3 py-2 border border-dashed rounded-lg hover:bg-accent hover:text-accent-foreground transition-colors text-left text-sm"+ className="flex items-center gap-2 px-3 py-2 border border-dashed rounded-lg hover:bg-accent hover:text-accent-foreground transition-colors text-left text-sm compact:min-h-11"><CheckboxonClick={(e) => e.preventDefault()}diff --git a/apps/erp/app/modules/quality/ui/IssueWorkflows/IssueWorkflowsTable.tsx b/apps/erp/app/modules/quality/ui/IssueWorkflows/IssueWorkflowsTable.tsxindex 955b550a99..111926c9a9 100644--- a/apps/erp/app/modules/quality/ui/IssueWorkflows/IssueWorkflowsTable.tsx+++ b/apps/erp/app/modules/quality/ui/IssueWorkflows/IssueWorkflowsTable.tsx@@ -54,6 +54,7 @@ const IssueWorkflowsTable = memo(</div>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -67,6 +68,7 @@ const IssueWorkflowsTable = memo(</div>),meta: {+ mobile: "P3",icon: <LuDna />}},@@ -80,6 +82,7 @@ const IssueWorkflowsTable = memo(</div>),meta: {+ mobile: "P2",icon: <LuChartNoAxesColumnIncreasing />}}diff --git a/apps/erp/app/modules/quality/ui/RequiredActions/RequiredActionsTable.tsx b/apps/erp/app/modules/quality/ui/RequiredActions/RequiredActionsTable.tsxindex 7a01f2c1cf..709a0a63a5 100644--- a/apps/erp/app/modules/quality/ui/RequiredActions/RequiredActionsTable.tsx+++ b/apps/erp/app/modules/quality/ui/RequiredActions/RequiredActionsTable.tsx@@ -48,13 +48,17 @@ const RequiredActionsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuSquareCheck />}},{accessorKey: "active",header: t`Active`,- cell: ({ row }) => <Checkbox checked={row.original.active} />+ cell: ({ row }) => <Checkbox checked={row.original.active} />,+ meta: {+ mobile: "P2"+ }}];return defaultColumns;diff --git a/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegisterCard.tsx b/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegisterCard.tsxindex 2550c443c2..0cee2c00b4 100644--- a/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegisterCard.tsx+++ b/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegisterCard.tsx@@ -235,7 +235,7 @@ function RiskRegisterCardItem({</p>)}</div>- <div className="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity">+ <div className="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity compact:opacity-100"><IconButtonaria-label={t`Edit`}icon={<LuSettings2 className="h-4 w-4" />}diff --git a/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegistersTable.tsx b/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegistersTable.tsxindex 6e19114dce..6b98673d54 100644--- a/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegistersTable.tsx+++ b/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegistersTable.tsx@@ -6,6 +6,7 @@ import {MENU_ITEM_SHORTCUTS,MenuIcon,MenuItem,+ useCompact,useDisclosure} from "@carbon/react";import { getItemById, getItemReadableId } from "@carbon/utils";@@ -68,6 +69,7 @@ const RiskRegistersTable = memo(({ data, count }: RiskRegistersTableProps) => {const [people] = usePeople();const { t } = useLingui();+ const isCompact = useCompact();const permissions = usePermissions();const deleteModal = useDisclosure();const [selectedRisk, setSelectedRisk] = useState<Risk | null>(null);@@ -101,7 +103,8 @@ const RiskRegistersTable = memo(({ data, count }: RiskRegistersTableProps) => {)}</div></Hyperlink>- )+ ),+ meta: { mobile: "P1" }},{accessorKey: "type",@@ -110,6 +113,7 @@ const RiskRegistersTable = memo(({ data, count }: RiskRegistersTableProps) => {return <RiskType type={row.original.type} />;},meta: {+ mobile: "P2",icon: <LuShapes />,filter: {type: "static",@@ -147,8 +151,17 @@ const RiskRegistersTable = memo(({ data, count }: RiskRegistersTableProps) => {{accessorKey: "source",header: t`Source`,- cell: (item) => <Enumerable value={item.getValue<string>()} />,+ // Phones: line 2 is muted context, not a second row of pills.+ cell: (item) =>+ isCompact ? (+ <span className="text-muted-foreground">+ {item.getValue<string>()}+ </span>+ ) : (+ <Enumerable value={item.getValue<string>()} />+ ),meta: {+ mobile: "P3",icon: <LuDna />,filter: {type: "static",@@ -164,6 +177,7 @@ const RiskRegistersTable = memo(({ data, count }: RiskRegistersTableProps) => {header: t`Status`,cell: ({ row }) => <RiskStatus status={row.original.status} />,meta: {+ mobile: "P2",icon: <LuStar />,filter: {type: "static",@@ -242,7 +256,7 @@ const RiskRegistersTable = memo(({ data, count }: RiskRegistersTableProps) => {}];return defaultColumns;- }, [people, items, workCenters.options.map, t]);+ }, [people, items, workCenters.options.map, t, isCompact]);const renderContextMenu = useCallback<(row: Risk) => JSX.Element>((row) => (diff --git a/apps/erp/app/modules/resources/ui/Abilities/AbilitiesTable.tsx b/apps/erp/app/modules/resources/ui/Abilities/AbilitiesTable.tsxindex 49bd02aaae..edfcc06a56 100644--- a/apps/erp/app/modules/resources/ui/Abilities/AbilitiesTable.tsx+++ b/apps/erp/app/modules/resources/ui/Abilities/AbilitiesTable.tsx@@ -51,6 +51,7 @@ const AbilitiesTable = memo(({ data, count }: AbilitiesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuAward />}},@@ -63,6 +64,8 @@ const AbilitiesTable = memo(({ data, count }: AbilitiesTableProps) => {</span>),meta: {+ mobile: "P3",+ mobileLabel: true,icon: <LuCalendarClock />}},diff --git a/apps/erp/app/modules/resources/ui/Abilities/AbilityEmployeesTable.tsx b/apps/erp/app/modules/resources/ui/Abilities/AbilityEmployeesTable.tsxindex 63367e0167..26081da2e2 100644--- a/apps/erp/app/modules/resources/ui/Abilities/AbilityEmployeesTable.tsx+++ b/apps/erp/app/modules/resources/ui/Abilities/AbilityEmployeesTable.tsx@@ -69,6 +69,7 @@ const AbilityEmployeesTable = memo(<EmployeeAvatar employeeId={row.original.employeeId} />),meta: {+ mobile: "P1",icon: <LuUser />}},@@ -79,6 +80,7 @@ const AbilityEmployeesTable = memo(<EmployeeAbilityStatus employeeAbility={row.original} />),meta: {+ mobile: "P2",filterHeader: t`Status`,icon: <LuAward />,// Values must match getEmployeeAbilityStatus's `kind`.@@ -103,6 +105,7 @@ const AbilityEmployeesTable = memo(<span className="text-muted-foreground">—</span>),meta: {+ mobile: "P3",icon: <LuCalendarDays />}},@@ -116,6 +119,7 @@ const AbilityEmployeesTable = memo(<span className="text-muted-foreground">—</span>),meta: {+ mobile: "P2",icon: <LuCalendarClock />}}diff --git a/apps/erp/app/modules/resources/ui/Contractors/ContractorsTable.tsx b/apps/erp/app/modules/resources/ui/Contractors/ContractorsTable.tsxindex 4b4a28fd8e..e958b532c9 100644--- a/apps/erp/app/modules/resources/ui/Contractors/ContractorsTable.tsx+++ b/apps/erp/app/modules/resources/ui/Contractors/ContractorsTable.tsx@@ -54,7 +54,8 @@ const ContractorsTable = memo(({ data, count }: ContractorsTableProps) => {{row.original.fullName ?? row.original.email ?? "Unknown"}</Hyperlink></HStack>- )+ ),+ meta: { mobile: "P1" }},{id: "supplierId",@@ -63,6 +64,7 @@ const ContractorsTable = memo(({ data, count }: ContractorsTableProps) => {<SupplierAvatar supplierId={row.original.supplierId} />),meta: {+ mobile: "P3",filter: {type: "static",options: suppliers.map((supplier) => ({@@ -109,7 +111,8 @@ const ContractorsTable = memo(({ data, count }: ContractorsTableProps) => {{accessorKey: "hoursPerWeek",header: t`Hours per Week`,- cell: (item) => item.getValue()+ cell: (item) => item.getValue(),+ meta: { mobile: "P2" }}];diff --git a/apps/erp/app/modules/resources/ui/FailureModes/FailureModesTable.tsx b/apps/erp/app/modules/resources/ui/FailureModes/FailureModesTable.tsxindex 159a8642ec..ae6dee4830 100644--- a/apps/erp/app/modules/resources/ui/FailureModes/FailureModesTable.tsx+++ b/apps/erp/app/modules/resources/ui/FailureModes/FailureModesTable.tsx@@ -37,6 +37,7 @@ const FailureModesTable = memo(({ data, count }: FailureModesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuCircleAlert />}},@@ -45,6 +46,7 @@ const FailureModesTable = memo(({ data, count }: FailureModesTableProps) => {header: t`Type`,cell: ({ row }) => <Enumerable value={row.original.type} />,meta: {+ mobile: "P3",icon: <LuShapes />,filter: {type: "static",diff --git a/apps/erp/app/modules/resources/ui/Locations/LocationsTable.tsx b/apps/erp/app/modules/resources/ui/Locations/LocationsTable.tsxindex 8b2a7179ca..6bb1c7a5e6 100644--- a/apps/erp/app/modules/resources/ui/Locations/LocationsTable.tsx+++ b/apps/erp/app/modules/resources/ui/Locations/LocationsTable.tsx@@ -2,7 +2,12 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { MENU_ITEM_SHORTCUTS, MenuIcon, MenuItem } from "@carbon/react";+import {+ MENU_ITEM_SHORTCUTS,+ MenuIcon,+ MenuItem,+ useCompact+} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import type { ColumnDef } from "@tanstack/react-table";import { memo, useCallback, useMemo } from "react";@@ -33,6 +38,7 @@ type LocationsTableProps = {const LocationsTable = memo(({ data, count }: LocationsTableProps) => {const { t } = useLingui();+ const isCompact = useCompact();const navigate = useNavigate();const permissions = usePermissions();const [params] = useUrlParams();@@ -54,14 +60,26 @@ const LocationsTable = memo(({ data, count }: LocationsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuMapPin />}},{accessorKey: "addressLine1",header: t`Address`,- cell: (item) => item.getValue(),+ cell: (item) =>+ // Phones: line 2 is the joined address (street, city, state).+ isCompact+ ? [+ item.row.original.addressLine1,+ item.row.original.city,+ item.row.original.stateProvince+ ]+ .filter(Boolean)+ .join(", ")+ : item.getValue(),meta: {+ mobile: "P3",icon: <LuHouse />}},@@ -130,7 +148,7 @@ const LocationsTable = memo(({ data, count }: LocationsTableProps) => {}];return [...defaultColumns, ...customColumns];- }, [people, customColumns, t]);+ }, [people, customColumns, isCompact, t]);const renderContextMenu = useCallback((row: (typeof data)[number]) => {diff --git a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchExplorer.tsx b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchExplorer.tsxindex 67ddac9a0a..6426a1ebc7 100644--- a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchExplorer.tsx+++ b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchExplorer.tsx@@ -382,7 +382,7 @@ function MaintenanceExplorerChildItem({icon={<LuEllipsisVertical />}variant="ghost"size="sm"- className="absolute right-1 top-1 flex-shrink-0 opacity-0 group-hover/child:opacity-100 data-[state=open]:opacity-100 text-foreground/70 hover:text-foreground"+ className="absolute right-1 top-1 flex-shrink-0 opacity-0 group-hover/child:opacity-100 data-[state=open]:opacity-100 text-foreground/70 hover:text-foreground compact:opacity-100"/></DropdownMenuTrigger><DropdownMenuContent>diff --git a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchForm.tsx b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchForm.tsxindex f9e66e6ab0..8a8ebd2b3b 100644--- a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchForm.tsx+++ b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchForm.tsx@@ -205,7 +205,7 @@ const MaintenanceDispatchForm = ({<Booleanbordered- className="col-span-2"+ className="col-span-2 compact:col-span-1"name="takesWorkCenterOffline"label={t`Takes work center offline`}description={t`While this dispatch is open, the work center is unavailable to the schedule (until the planned end time, or until the dispatch is completed).`}diff --git a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchHeader.tsx b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchHeader.tsxindex 7391d40fcf..33ae419788 100644--- a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchHeader.tsx+++ b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchHeader.tsx@@ -4,28 +4,20 @@import {Button,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import {LuCircleCheck,LuCirclePlay,- LuEllipsisVertical,LuLoaderCircle,LuTrash} from "react-icons/lu";-import { Link, useFetcher, useParams } from "react-router";+import { useFetcher, useParams } from "react-router";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";import { path } from "~/utils/path";@@ -48,117 +40,113 @@ const MaintenanceDispatchHeader = () => {const statusFetcher = useFetcher<{}>();const deleteModal = useDisclosure();+ const statusBadge = <MaintenanceStatus status={status} />;+ const menuItems = (+ <>+ <DropdownMenuItem+ disabled={+ !["In Progress", "Completed"].includes(status ?? "") ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "resources")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Open" },+ {+ method: "post",+ action: path.to.maintenanceDispatchStatus(dispatchId)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ destructive+ disabled={+ isLocked ||+ !permissions.can("delete", "resources") ||+ !permissions.is("employee")+ }+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Dispatch</Trans>+ </DropdownMenuItem>+ </>+ );++ // Phones put the next status transition in the primary slot.+ const isStartable = status === "Open" || status === "Assigned";+return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0}>- <HStack>- <Link to={path.to.maintenanceDispatch(dispatchId)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.dispatch?.maintenanceDispatchId}</span>- </Heading>- </Link>- <MaintenanceStatus status={status} />- <Copy text={routeData?.dispatch?.maintenanceDispatchId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- !["In Progress", "Completed"].includes(status ?? "") ||+ <RecordHeader+ title={routeData?.dispatch?.maintenanceDispatchId}+ titleTo={path.to.maintenanceDispatch(dispatchId)}+ copyValue={routeData?.dispatch?.maintenanceDispatchId ?? ""}+ menu={menuItems}+ status={statusBadge}+ actions={+ <>+ <RecordAction slot={isStartable ? "primary" : "secondary"}>+ <statusFetcher.Form+ method="post"+ action={path.to.maintenanceDispatchStatus(dispatchId)}+ >+ <input type="hidden" name="status" value="In Progress" />+ <Button+ type="submit"+ leftIcon={<LuCirclePlay />}+ variant={+ status === "Open" || status === "Assigned"+ ? "primary"+ : "secondary"+ }+ isDisabled={+ !["Open", "Assigned"].includes(status ?? "") ||statusFetcher.state !== "idle" ||!permissions.can("update", "resources")}- onClick={() => {- statusFetcher.submit(- { status: "Open" },- {- method: "post",- action: path.to.maintenanceDispatchStatus(dispatchId)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- destructive- disabled={- isLocked ||- !permissions.can("delete", "resources") ||- !permissions.is("employee")+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "In Progress"}- onClick={deleteModal.onOpen}>- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Dispatch</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>+ <Trans>Start</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>- <HStack>- <statusFetcher.Form- method="post"- action={path.to.maintenanceDispatchStatus(dispatchId)}- >- <input type="hidden" name="status" value="In Progress" />- <Button- type="submit"- leftIcon={<LuCirclePlay />}- variant={- status === "Open" || status === "Assigned"- ? "primary"- : "secondary"- }- isDisabled={- !["Open", "Assigned"].includes(status ?? "") ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "resources")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "In Progress"- }- >- <Trans>Start</Trans>- </Button>- </statusFetcher.Form>-- <statusFetcher.Form- method="post"- action={path.to.maintenanceDispatchStatus(dispatchId)}- >- <input type="hidden" name="status" value="Completed" />- <Button- type="submit"- leftIcon={<LuCircleCheck />}- variant={status === "In Progress" ? "primary" : "secondary"}- isDisabled={- status !== "In Progress" ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "resources")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Completed"- }- >- <Trans>Complete</Trans>- </Button>- </statusFetcher.Form>- </HStack>- </div>+ <RecordAction slot={isStartable ? "secondary" : "primary"}>+ <statusFetcher.Form+ method="post"+ action={path.to.maintenanceDispatchStatus(dispatchId)}+ >+ <input type="hidden" name="status" value="Completed" />+ <Button+ type="submit"+ leftIcon={<LuCircleCheck />}+ variant={status === "In Progress" ? "primary" : "secondary"}+ isDisabled={+ status !== "In Progress" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "resources")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Completed"+ }+ >+ <Trans>Complete</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>+ </>+ }+ />{deleteModal.isOpen && (<ConfirmDeleteaction={path.to.deleteMaintenanceDispatch(dispatchId)}diff --git a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchNotes.tsx b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchNotes.tsxindex c3a22d0f76..844ae3e445 100644--- a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchNotes.tsx+++ b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchNotes.tsx@@ -33,6 +33,7 @@ import {Thead,Tr,toast,+ useCompact,useDebounce} from "@carbon/react";import { Editor } from "@carbon/react/Editor";@@ -187,6 +188,7 @@ function MaintenanceFilesContent({isReadOnly: boolean;}) {const { t } = useLingui();+ const isCompact = useCompact();const { carbon } = useCarbon();const { company } = useUser();const revalidator = useRevalidator();@@ -370,7 +372,8 @@ function MaintenanceFilesContent({)}</Tbody></Table>- {!isReadOnly && <FileDropzone onDrop={onDrop} />}+ {/* Phones: the header Upload already opens the same picker. */}+ {!isReadOnly && !isCompact && <FileDropzone onDrop={onDrop} />}</>);}diff --git a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchesTable.tsx b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchesTable.tsxindex ac5d275826..3faba5583d 100644--- a/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchesTable.tsx+++ b/apps/erp/app/modules/resources/ui/Maintenance/MaintenanceDispatchesTable.tsx@@ -91,6 +91,7 @@ const MaintenanceDispatchesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -115,6 +116,7 @@ const MaintenanceDispatchesTable = memo();},meta: {+ mobile: "P3",icon: <LuBuilding />,filter: {type: "static",@@ -133,6 +135,7 @@ const MaintenanceDispatchesTable = memo(return <MaintenanceSource source={source} />;},meta: {+ mobile: "P2",icon: <LuDna />,filter: {type: "static",@@ -152,6 +155,7 @@ const MaintenanceDispatchesTable = memo(return <MaintenanceStatus status={status} />;},meta: {+ mobile: "P2",icon: <LuStar />,filter: {type: "static",diff --git a/apps/erp/app/modules/resources/ui/MaintenanceSchedule/MaintenanceSchedulesTable.tsx b/apps/erp/app/modules/resources/ui/MaintenanceSchedule/MaintenanceSchedulesTable.tsxindex 4e7ec021b8..34d2df9ffc 100644--- a/apps/erp/app/modules/resources/ui/MaintenanceSchedule/MaintenanceSchedulesTable.tsx+++ b/apps/erp/app/modules/resources/ui/MaintenanceSchedule/MaintenanceSchedulesTable.tsx@@ -104,13 +104,15 @@ const MaintenanceSchedulesTable = memo(header: t`Schedule Name`,cell: ({ row }) => (<Hyperlink to={row.original.id!}>{row.original.name}</Hyperlink>- )+ ),+ meta: { mobile: "P1" }},{accessorKey: "workCenterName",header: t`Work Center`,cell: ({ row }) => <Enumerable value={row.original.workCenterName} />,meta: {+ mobile: "P3",icon: <LuBuilding />}},@@ -231,6 +233,7 @@ const MaintenanceSchedulesTable = memo("-"),meta: {+ mobile: "P2",icon: <LuCalendar />}}diff --git a/apps/erp/app/modules/resources/ui/Partners/PartnersTable.tsx b/apps/erp/app/modules/resources/ui/Partners/PartnersTable.tsxindex 37185062c4..521667bbbd 100644--- a/apps/erp/app/modules/resources/ui/Partners/PartnersTable.tsx+++ b/apps/erp/app/modules/resources/ui/Partners/PartnersTable.tsx@@ -55,6 +55,7 @@ const PartnersTable = memo(({ data, count }: PartnersTableProps) => {</HStack>),meta: {+ mobile: "P1",filter: {type: "static",options: suppliers.map((supplier) => ({@@ -66,7 +67,8 @@ const PartnersTable = memo(({ data, count }: PartnersTableProps) => {},{header: t`Location`,- cell: ({ row }) => `${row.original.city}, ${row.original.state}`+ cell: ({ row }) => `${row.original.city}, ${row.original.state}`,+ meta: { mobile: "P3" }},// {// accessorKey: "abilityName",@@ -85,7 +87,8 @@ const PartnersTable = memo(({ data, count }: PartnersTableProps) => {{accessorKey: "hoursPerWeek",header: t`Hours per Week`,- cell: (item) => item.getValue()+ cell: (item) => item.getValue(),+ meta: { mobile: "P2" }}];diff --git a/apps/erp/app/modules/resources/ui/Processes/ProcessesTable.tsx b/apps/erp/app/modules/resources/ui/Processes/ProcessesTable.tsxindex 31d495af40..61f4f1ff29 100644--- a/apps/erp/app/modules/resources/ui/Processes/ProcessesTable.tsx+++ b/apps/erp/app/modules/resources/ui/Processes/ProcessesTable.tsx@@ -99,6 +99,7 @@ const ProcessesTable = memo(({ data, count }: ProcessesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuRedoDot />}},@@ -126,6 +127,7 @@ const ProcessesTable = memo(({ data, count }: ProcessesTableProps) => {);},meta: {+ mobile: "P2",icon: <LuFactory />,filter: {type: "static",@@ -159,6 +161,7 @@ const ProcessesTable = memo(({ data, count }: ProcessesTableProps) => {/>),meta: {+ mobile: "P3",icon: <LuBuilding2 />,filter: {type: "static",diff --git a/apps/erp/app/modules/resources/ui/Suggestions/SuggestionsTable.tsx b/apps/erp/app/modules/resources/ui/Suggestions/SuggestionsTable.tsxindex 58f353f74f..74910867c0 100644--- a/apps/erp/app/modules/resources/ui/Suggestions/SuggestionsTable.tsx+++ b/apps/erp/app/modules/resources/ui/Suggestions/SuggestionsTable.tsx@@ -64,6 +64,7 @@ const SuggestionsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuFileText />}},@@ -81,6 +82,7 @@ const SuggestionsTable = memo(</HStack>),meta: {+ mobile: "P3",icon: <LuUser />,exportValue: (row) => row.employeeName,filter: {@@ -105,6 +107,7 @@ const SuggestionsTable = memo(</HStack>),meta: {+ mobile: "P2",filter: {type: "static",options: tags?.map((tag) => ({@@ -123,6 +126,7 @@ const SuggestionsTable = memo(<DateTime value={item.getValue<string>()} variant="date" />),meta: {+ mobile: "P2",icon: <LuCalendar />}}diff --git a/apps/erp/app/modules/resources/ui/Training/TrainingExplorer.tsx b/apps/erp/app/modules/resources/ui/Training/TrainingExplorer.tsxindex be2e81c820..0c1a16efbc 100644--- a/apps/erp/app/modules/resources/ui/Training/TrainingExplorer.tsx+++ b/apps/erp/app/modules/resources/ui/Training/TrainingExplorer.tsx@@ -421,7 +421,7 @@ function TrainingQuestionItem({<DropdownMenuTrigger asChild><IconButtonaria-label={t`More`}- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/resources/ui/Training/TrainingHeader.tsx b/apps/erp/app/modules/resources/ui/Training/TrainingHeader.tsxindex 71b621024f..e838d85f01 100644--- a/apps/erp/app/modules/resources/ui/Training/TrainingHeader.tsx+++ b/apps/erp/app/modules/resources/ui/Training/TrainingHeader.tsx@@ -4,28 +4,16 @@import {Button,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,- useDisclosure,- VStack+ useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";-import {- LuEllipsisVertical,- LuPanelLeft,- LuPanelRight,- LuTrash-} from "react-icons/lu";+import { LuTrash } from "react-icons/lu";import { useFetcher, useParams } from "react-router";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";import type { Training } from "~/modules/resources";@@ -66,65 +54,51 @@ const TrainingHeader = () => {});};+ const statusBadge = (+ // @ts-expect-error TS2322+ <TrainingStatus status={routeData?.training?.status} />+ );+ const menuItems = (+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "resources") || !permissions.is("employee")+ }+ destructive+ onClick={deleteDisclosure.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Training</Trans>+ </DropdownMenuItem>+ );+return (- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 px-4 py-2 bg-card border-b border-border h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <VStack spacing={0} className="flex-grow">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Heading size="h4" className="flex items-center gap-2">- <span>{displayName}</span>- {/* @ts-expect-error TS2322 */}- <TrainingStatus status={routeData?.training?.status} />- </Heading>- <Copy text={displayName} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "resources") ||- !permissions.is("employee")- }- destructive- onClick={deleteDisclosure.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Training</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </HStack>- </VStack>- <div className="flex flex-shrink-0 gap-2 items-center justify-end">- {isDraft && (- <Button- isDisabled={!permissions.can("update", "people") || isPublishing}- isLoading={isPublishing}- onClick={onPublish}- >- <Trans>Publish</Trans>- </Button>- )}- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </div>+ <>+ <RecordHeader+ title={displayName}+ copyValue={displayName}+ menu={menuItems}+ status={statusBadge}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ {isDraft && (+ <RecordAction slot="primary">+ <Button+ isDisabled={+ !permissions.can("update", "people") || isPublishing+ }+ isLoading={isPublishing}+ onClick={onPublish}+ >+ <Trans>Publish</Trans>+ </Button>+ </RecordAction>+ )}+ </>+ }+ />{deleteDisclosure.isOpen && (<ConfirmDeleteaction={path.to.deleteTraining(id)}@@ -139,7 +113,7 @@ const TrainingHeader = () => {}}/>)}- </div>+ </>);};diff --git a/apps/erp/app/modules/resources/ui/Training/TrainingsTable.tsx b/apps/erp/app/modules/resources/ui/Training/TrainingsTable.tsxindex bd81cf3be8..d3c3f43c32 100644--- a/apps/erp/app/modules/resources/ui/Training/TrainingsTable.tsx+++ b/apps/erp/app/modules/resources/ui/Training/TrainingsTable.tsx@@ -61,6 +61,7 @@ const TrainingsTable = memo(({ data, count, tags }: TrainingsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookOpen />}},@@ -69,6 +70,7 @@ const TrainingsTable = memo(({ data, count, tags }: TrainingsTableProps) => {header: t`Status`,cell: ({ row }) => <TrainingStatus status={row.original.status} />,meta: {+ mobile: "P2",filter: {type: "static",options: [@@ -96,6 +98,7 @@ const TrainingsTable = memo(({ data, count, tags }: TrainingsTableProps) => {</Badge>),meta: {+ mobile: "P2",filter: {type: "static",options: [@@ -168,6 +171,7 @@ const TrainingsTable = memo(({ data, count, tags }: TrainingsTableProps) => {<EmployeeAvatar employeeId={row.original.assignee} />),meta: {+ mobile: "P3",icon: <LuUser />}},diff --git a/apps/erp/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx b/apps/erp/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsxindex 2172753b33..92ce39c754 100644--- a/apps/erp/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx+++ b/apps/erp/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx@@ -135,6 +135,7 @@ const WorkCentersTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuLocateFixed />}},@@ -156,6 +157,7 @@ const WorkCentersTable = memo(/>),meta: {+ mobile: "P3",icon: <LuRedoDot />,filter: {type: "static",diff --git a/apps/erp/app/modules/sales/ui/Customer/CustomerForm.tsx b/apps/erp/app/modules/sales/ui/Customer/CustomerForm.tsxindex 774aaaccc6..9d9f811810 100644--- a/apps/erp/app/modules/sales/ui/Customer/CustomerForm.tsx+++ b/apps/erp/app/modules/sales/ui/Customer/CustomerForm.tsx@@ -210,7 +210,7 @@ const CustomerForm = ({<CustomFormFields table="customer" /></div></ModalCardBody>- <ModalCardFooter>+ <ModalCardFooter sticky={type === "card" && !isEditing}><HStack><Submit isDisabled={isDisabled}><Trans>Save</Trans>diff --git a/apps/erp/app/modules/sales/ui/Customer/CustomerHeader.tsx b/apps/erp/app/modules/sales/ui/Customer/CustomerHeader.tsxindex d84ebf8be7..79b148374f 100644--- a/apps/erp/app/modules/sales/ui/Customer/CustomerHeader.tsx+++ b/apps/erp/app/modules/sales/ui/Customer/CustomerHeader.tsx@@ -36,6 +36,10 @@ import { useAuditLog } from "~/components/AuditLog";import { Enumerable } from "~/components/Enumerable";import { Tags } from "~/components/Form";import { useCustomerTypes } from "~/components/Form/CustomerType";+import {+ RecordHero,+ RecordPhoneChrome+} from "~/components/Layout/RecordHeader";import { ConfirmDelete } from "~/components/Modals";import { usePermissions, useRouteData, useUser } from "~/hooks";import type { action } from "~/routes/x+/settings+/tags";@@ -96,11 +100,30 @@ const CustomerHeader = () => {[customerId, fetcher.submit]);+ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={!permissions.can("delete", "sales")}+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Customer</Trans>+ </DropdownMenuItem>+ </>+ );return (<>+ {/* The app bar titles the record with its name, so no hero. */}+ {/* No hero; it still zeroes --header-height on phones. */}+ <RecordHero />+ <RecordPhoneChrome menu={menuItems} copyValue={customerId} /><VStack><Card>- <HStack className="justify-between items-start">+ <HStack className="justify-between items-start compact:hidden"><CardHeader><CardTitle className="flex items-center gap-2"><span>{routeData?.customer?.name}</span>@@ -113,19 +136,7 @@ const CustomerHeader = () => {size="sm"/></DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={!permissions.can("delete", "sales")}- destructive- onClick={deleteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Customer</Trans>- </DropdownMenuItem>- </DropdownMenuContent>+ <DropdownMenuContent>{menuItems}</DropdownMenuContent></DropdownMenu><Copytext={customerId}diff --git a/apps/erp/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx b/apps/erp/app/modules/sales/ui/Customer/CustomerPaymentForm.tsxindex 12e8434d4d..88f7b630fe 100644--- a/apps/erp/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx+++ b/apps/erp/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx@@ -79,7 +79,7 @@ const CustomerPaymentForm = ({ initialValues }: CustomerPaymentFormProps) => {<CustomFormFields table="customerPayment" /></div></CardContent>- <CardFooter>+ <CardFooter className="compact:[&>*]:flex-1 compact:[&>div>*]:flex-1 compact:[&_button]:h-11"><HStack><Submit isDisabled={isDisabled}><Trans>Save</Trans>diff --git a/apps/erp/app/modules/sales/ui/Customer/CustomerShippingForm.tsx b/apps/erp/app/modules/sales/ui/Customer/CustomerShippingForm.tsxindex 5e94823958..9bf7a4e59c 100644--- a/apps/erp/app/modules/sales/ui/Customer/CustomerShippingForm.tsx+++ b/apps/erp/app/modules/sales/ui/Customer/CustomerShippingForm.tsx@@ -106,7 +106,7 @@ const CustomerShippingForm = ({ initialValues }: CustomerShippingFormProps) => {<CustomFormFields table="customerShipping" /></div></CardContent>- <CardFooter>+ <CardFooter className="compact:[&>*]:flex-1 compact:[&>div>*]:flex-1 compact:[&_button]:h-11"><HStack><Submit isDisabled={isDisabled}><Trans>Save</Trans>diff --git a/apps/erp/app/modules/sales/ui/Customer/CustomerTaxForm.tsx b/apps/erp/app/modules/sales/ui/Customer/CustomerTaxForm.tsxindex 92b70c091b..b4e0f8759b 100644--- a/apps/erp/app/modules/sales/ui/Customer/CustomerTaxForm.tsx+++ b/apps/erp/app/modules/sales/ui/Customer/CustomerTaxForm.tsx@@ -100,7 +100,7 @@ const CustomerTaxForm = ({ initialValues }: CustomerTaxFormProps) => {) : (<div />)}- <div className="col-span-3">+ <div className="col-span-3 compact:col-span-full"><Booleanname="taxExempt"label={t`Tax Exempt`}@@ -159,7 +159,7 @@ const CustomerTaxForm = ({ initialValues }: CustomerTaxFormProps) => {</div>)}</CardContent>- <CardFooter>+ <CardFooter className="compact:[&>*]:flex-1 compact:[&>div>*]:flex-1 compact:[&_button]:h-11"><HStack><Submit isDisabled={isDisabled}><Trans>Save</Trans>diff --git a/apps/erp/app/modules/sales/ui/CustomerPortals/CustomerPortalsTable.ee.tsx b/apps/erp/app/modules/sales/ui/CustomerPortals/CustomerPortalsTable.ee.tsxindex 39ae578e3e..d8e6e61a1f 100644--- a/apps/erp/app/modules/sales/ui/CustomerPortals/CustomerPortalsTable.ee.tsx+++ b/apps/erp/app/modules/sales/ui/CustomerPortals/CustomerPortalsTable.ee.tsx@@ -52,7 +52,8 @@ const CustomerPortalsTable = memo(</Hyperlink>),meta: {- icon: <LuSquareUser />+ icon: <LuSquareUser />,+ mobile: "P1"}},{@@ -75,7 +76,8 @@ const CustomerPortalsTable = memo();},meta: {- icon: <LuExternalLink />+ icon: <LuExternalLink />,+ mobile: "P3"}}];diff --git a/apps/erp/app/modules/sales/ui/CustomerStatuses/CustomerStatusesTable.tsx b/apps/erp/app/modules/sales/ui/CustomerStatuses/CustomerStatusesTable.tsxindex 71af04be0f..7e935406a6 100644--- a/apps/erp/app/modules/sales/ui/CustomerStatuses/CustomerStatusesTable.tsx+++ b/apps/erp/app/modules/sales/ui/CustomerStatuses/CustomerStatusesTable.tsx@@ -40,6 +40,7 @@ const CustomerStatusesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuStar />}}diff --git a/apps/erp/app/modules/sales/ui/CustomerTypes/CustomerTypesTable.tsx b/apps/erp/app/modules/sales/ui/CustomerTypes/CustomerTypesTable.tsxindex b6e99a3efe..7a1f9ad53a 100644--- a/apps/erp/app/modules/sales/ui/CustomerTypes/CustomerTypesTable.tsx+++ b/apps/erp/app/modules/sales/ui/CustomerTypes/CustomerTypesTable.tsx@@ -41,6 +41,7 @@ const CustomerTypesTable = memo(({ data, count }: CustomerTypesTableProps) => {/>),meta: {+ mobile: "P1",icon: <LuShapes />}}diff --git a/apps/erp/app/modules/sales/ui/Customers/CustomersTable.tsx b/apps/erp/app/modules/sales/ui/Customers/CustomersTable.tsxindex b926ff9907..98dd4ec481 100644--- a/apps/erp/app/modules/sales/ui/Customers/CustomersTable.tsx+++ b/apps/erp/app/modules/sales/ui/Customers/CustomersTable.tsx@@ -97,6 +97,7 @@ const CustomersTable = memo(</div>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -105,6 +106,7 @@ const CustomersTable = memo(header: t`Status`,cell: (item) => <Enumerable value={item.getValue<string>()} />,meta: {+ mobile: "P2",filter: {type: "static",options: customerStatuses?.map((status) => ({@@ -127,6 +129,7 @@ const CustomersTable = memo(return <Enumerable value={customerType ?? ""} />;},meta: {+ mobile: "P2",icon: <LuShapes />,filter: {type: "static",diff --git a/apps/erp/app/modules/sales/ui/NoQuoteReasons/NoQuoteReasonsTable.tsx b/apps/erp/app/modules/sales/ui/NoQuoteReasons/NoQuoteReasonsTable.tsxindex 53a9f33a35..e52638f91e 100644--- a/apps/erp/app/modules/sales/ui/NoQuoteReasons/NoQuoteReasonsTable.tsx+++ b/apps/erp/app/modules/sales/ui/NoQuoteReasons/NoQuoteReasonsTable.tsx@@ -39,6 +39,7 @@ const NoQuoteReasonsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}}diff --git a/apps/erp/app/modules/sales/ui/Pricing/PriceListScopeEmpty.tsx b/apps/erp/app/modules/sales/ui/Pricing/PriceListScopeEmpty.tsxindex 35c0cca565..2137cc50dc 100644--- a/apps/erp/app/modules/sales/ui/Pricing/PriceListScopeEmpty.tsx+++ b/apps/erp/app/modules/sales/ui/Pricing/PriceListScopeEmpty.tsx@@ -26,7 +26,7 @@ export function PriceListScopeEmpty({heading={t`Price Lists`}description={t`Pick a customer or customer type to view their pricing.`}>- <div className="flex justify-center [&>[role=combobox]]:!min-w-[400px]">+ <div className="flex justify-center [&>[role=combobox]]:!min-w-[400px] compact:[&>[role=combobox]]:!min-w-0 compact:[&>[role=combobox]]:w-full compact:[&>[role=combobox]]:h-11 compact:[&>[role=combobox]]:rounded-md compact:[&>[role=combobox]]:text-base"><ScopePickersize="md"value={value}diff --git a/apps/erp/app/modules/sales/ui/Pricing/PriceOverrideForm.tsx b/apps/erp/app/modules/sales/ui/Pricing/PriceOverrideForm.tsxindex bc6a45c19b..f5f56f1505 100644--- a/apps/erp/app/modules/sales/ui/Pricing/PriceOverrideForm.tsx+++ b/apps/erp/app/modules/sales/ui/Pricing/PriceOverrideForm.tsx@@ -213,7 +213,7 @@ const PriceOverrideForm = ({companyId={company?.id}/>- <div className="grid grid-cols-2 gap-3 w-full">+ <div className="grid grid-cols-2 gap-3 w-full compact:grid-cols-1"><BooleanFieldname="active"label={t`Active`}@@ -227,7 +227,7 @@ const PriceOverrideForm = ({/></div>- <div className="grid grid-cols-2 gap-3 w-full">+ <div className="grid grid-cols-2 gap-3 w-full compact:grid-cols-1"><DatePicker name="validFrom" label={t`Valid From`} /><DatePickername="validTo"diff --git a/apps/erp/app/modules/sales/ui/Pricing/PriceOverridesTable.tsx b/apps/erp/app/modules/sales/ui/Pricing/PriceOverridesTable.tsxindex bd8d1f49da..27473e5b90 100644--- a/apps/erp/app/modules/sales/ui/Pricing/PriceOverridesTable.tsx+++ b/apps/erp/app/modules/sales/ui/Pricing/PriceOverridesTable.tsx@@ -159,7 +159,7 @@ const PriceListTable = memo(</VStack></HStack>),- meta: { icon: <LuBookMarked /> }+ meta: { icon: <LuBookMarked />, mobile: "P1" }},{accessorKey: "itemPostingGroupId",@@ -178,7 +178,8 @@ const PriceListTable = memo(label: <Enumerable value={group.label} />}))},- icon: <LuGroup />+ icon: <LuGroup />,+ mobile: "P3"}},{@@ -189,7 +190,10 @@ const PriceListTable = memo({currencyFormatter.format(row.original.basePrice)}</span>),- meta: { icon: <LuCircleDollarSign /> }+ meta: {+ icon: <LuCircleDollarSign />,+ mobile: hasScope ? undefined : "P2"+ }}];@@ -217,7 +221,7 @@ const PriceListTable = memo(/></HStack>),- meta: { icon: <LuCircleDollarSign /> }+ meta: { icon: <LuCircleDollarSign />, mobile: "P2" }},{accessorKey: "source",diff --git a/apps/erp/app/modules/sales/ui/Pricing/PricingRulesTable.tsx b/apps/erp/app/modules/sales/ui/Pricing/PricingRulesTable.tsxindex 17354aa648..47141a7192 100644--- a/apps/erp/app/modules/sales/ui/Pricing/PricingRulesTable.tsx+++ b/apps/erp/app/modules/sales/ui/Pricing/PricingRulesTable.tsx@@ -100,6 +100,7 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuTag />}},@@ -126,6 +127,7 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {);},meta: {+ mobile: "P2",filter: {type: "static",options: pricingRuleTypes.map((type) => ({@@ -270,6 +272,7 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {return <div className="flex flex-col items-start gap-1">{parts}</div>;},meta: {+ mobile: "P3",icon: <LuSquareUser />,exportValue: (row) => {const labels: string[] = [];@@ -393,6 +396,7 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {</Badge>),meta: {+ mobile: "P2",filter: {type: "static",options: [diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsxindex bd82b526dc..8140247e0d 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx@@ -154,7 +154,7 @@ function makeItem(to={getLinkToItemDetails(material.itemType, material.itemId)}onClick={(e) => e.stopPropagation()}>- <LuExternalLink className="h-4 w-4 opacity-0 group-hover:opacity-100" />+ <LuExternalLink className="h-4 w-4 opacity-0 group-hover:opacity-100 compact:opacity-100" /></Link>)}</div>@@ -841,7 +841,7 @@ function MaterialForm({onChange={(newValue) => {setItemData((d) => ({ ...d, description: newValue }));}}- className="col-span-2"+ className="col-span-2 compact:col-span-full"/>{itemData.methodType !== "Make to Order" && (<NumberControlleddiff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsxindex 7c51f597f6..53c311fc9c 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx@@ -976,7 +976,10 @@ function AttributesForm({<Input name="name" label={t`Name`} /></div>- <VStack spacing={2} className="w-full col-span-2">+ <VStack+ spacing={2}+ className="w-full col-span-2 compact:col-span-full"+ ><Label>Description</Label><EditorinitialValue={description}@@ -1222,7 +1225,10 @@ function AttributesListItem({<Input name="name" label={t`Name`} /></div>- <VStack spacing={2} className="w-full col-span-2">+ <VStack+ spacing={2}+ className="w-full col-span-2 compact:col-span-full"+ ><Label>Description</Label><EditorinitialValue={description}@@ -2015,7 +2021,7 @@ function OperationForm({onChange={(newValue) => {setProcessData((d) => ({ ...d, description: newValue }));}}- className="col-span-2"+ className="col-span-2 compact:col-span-full"/><Selectdiff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteExplorer.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteExplorer.tsxindex 4d89536573..95d1ee4e64 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteExplorer.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteExplorer.tsx@@ -518,7 +518,7 @@ function QuoteLineItem({<IconButtonaria-label={disclosure.isOpen ? "Hide" : "Show"}className={cn(- "animate opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100",+ "animate opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100",disclosure.isOpen && "-rotate-180")}icon={<LuChevronDown />}@@ -534,7 +534,7 @@ function QuoteLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label="More"- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}size="md"variant="solid"diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteForm.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteForm.tsxindex 6c64d8cb7c..98b867f172 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteForm.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteForm.tsx@@ -264,7 +264,7 @@ const QuoteForm = ({ initialValues }: QuoteFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isDisabled ||diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteHeader.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteHeader.tsxindex 1dc4149a56..08a5c95c8b 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteHeader.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteHeader.tsx@@ -12,9 +12,6 @@ import {DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,- Heading,- HStack,- IconButton,Input,InputGroup,InputRightElement,@@ -38,14 +35,11 @@ import {LuCircleStop,LuCircleX,LuCopy,- LuEllipsisVertical,LuExternalLink,LuEye,LuFile,LuGitBranchPlus,LuLoaderCircle,- LuPanelLeft,- LuPanelRight,LuShare2,LuTrash,LuTrophy@@ -54,6 +48,7 @@ import { Link, useFetcher, useParams } from "react-router";import { RevisionSuffix } from "~/components";import { useAuditLog } from "~/components/AuditLog";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";import { path } from "~/utils/path";@@ -106,238 +101,237 @@ const QuoteHeader = () => {variant: "dropdown"});+ // Phones lead the action bar with the step the desktop highlights; Lost+ // sits beside Won while the quote is out with the customer.+ const isDraft = routeData?.quote?.status === "Draft";+ const isWinnable = ["Sent", "Ordered", "Partial"].includes(+ routeData?.quote?.status ?? ""+ );+ const finalizeSlot = isDraft ? "primary" : "overflow";+ const wonSlot = isWinnable ? "primary" : "overflow";+ const lostSlot =+ routeData?.quote?.status === "Sent" ? "secondary" : "overflow";+ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.copy}+ onClick={() => {+ setAsRevision(false);+ createRevisionModal.onOpen();+ }}+ >+ <DropdownMenuIcon icon={<LuCopy />} />+ <Trans>Copy Quote</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ onClick={() => {+ setAsRevision(true);+ createRevisionModal.onOpen();+ }}+ >+ <DropdownMenuIcon icon={<LuGitBranchPlus />} />+ <Trans>Create Quote Revision</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ disabled={+ isDraft ||+ (routeData?.opportunity?.salesOrders.length ?? 0) > 0 ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "sales")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.quoteStatus(quoteId)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ !permissions.can("delete", "sales") ||+ !permissions.is("employee") ||+ isQuoteLocked(routeData?.quote?.status)+ }+ destructive+ onClick={deleteQuoteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Quote</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadge = <QuoteStatus status={routeData?.quote?.status} />;+ // The ID with its revision; phones show it under the app bar title,+ // which names the record without the revision.+ const titleNode = (+ <span className="flex items-center gap-0">+ <span>{routeData?.quote?.quoteId}</span>+ <RevisionSuffix revisionId={routeData?.quote?.revisionId} />+ </span>+ );return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.quoteDetails(quoteId)}>- <Heading- size="h4"- className="flex items-center justify-start gap-0"- >- <span>{routeData?.quote?.quoteId}</span>- <RevisionSuffix revisionId={routeData?.quote?.revisionId} />- </Heading>- </Link>- <Copy text={getQuoteDisplayId(routeData?.quote)} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.copy}- onClick={() => {- setAsRevision(false);- createRevisionModal.onOpen();- }}- >- <DropdownMenuIcon icon={<LuCopy />} />- <Trans>Copy Quote</Trans>- </DropdownMenuItem>- <DropdownMenuItem- onClick={() => {- setAsRevision(true);- createRevisionModal.onOpen();- }}- >- <DropdownMenuIcon icon={<LuGitBranchPlus />} />- <Trans>Create Quote Revision</Trans>- </DropdownMenuItem>- <DropdownMenuItem- disabled={- routeData?.quote?.status === "Draft" ||- (routeData?.opportunity?.salesOrders.length ?? 0) > 0 ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "sales")- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.quoteStatus(quoteId)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- !permissions.can("delete", "sales") ||- !permissions.is("employee") ||- isQuoteLocked(routeData?.quote?.status)- }- destructive- onClick={deleteQuoteModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Quote</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <QuoteStatus status={routeData?.quote?.status} />- </HStack>- <HStack>+ <RecordHeader+ title={titleNode}+ subtitle={+ (routeData?.quote?.revisionId ?? 0) > 0 ? titleNode : undefined+ }+ titleTo={path.to.quoteDetails(quoteId)}+ copyValue={getQuoteDisplayId(routeData?.quote)}+ menu={menuItems}+ status={statusBadge}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>{routeData?.quote.externalLinkId &&routeData?.quote.status === "Sent" ? (- <Button- onClick={shareModal.onOpen}- leftIcon={<LuShare2 />}- variant="secondary"- >- <Trans>Share</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button+ onClick={shareModal.onOpen}+ leftIcon={<LuShare2 />}+ variant="secondary"+ >+ <Trans>Share</Trans>+ </Button>+ </RecordAction>) : (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuEye />}- variant="secondary"- rightIcon={<LuChevronDown />}- >- <Trans>Preview</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- {routeData?.quote.externalLinkId && (+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuEye />}+ variant="secondary"+ rightIcon={<LuChevronDown />}+ >+ <Trans>Preview</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ {routeData?.quote.externalLinkId && (+ <DropdownMenuItem asChild>+ <a+ target="_blank"+ href={path.to.externalQuote(+ routeData.quote.externalLinkId+ )}+ rel="noreferrer"+ >+ <DropdownMenuIcon icon={<LuExternalLink />} />+ <Trans>Digital Quote</Trans>+ </a>+ </DropdownMenuItem>+ )}<DropdownMenuItem asChild><atarget="_blank"- href={path.to.externalQuote(- routeData.quote.externalLinkId- )}+ href={path.to.file.quote(quoteId)}rel="noreferrer">- <DropdownMenuIcon icon={<LuExternalLink />} />- <Trans>Digital Quote</Trans>+ <DropdownMenuIcon icon={<LuFile />} />+ <Trans>PDF</Trans></a></DropdownMenuItem>- )}- <DropdownMenuItem asChild>- <a- target="_blank"- href={path.to.file.quote(quoteId)}- rel="noreferrer"- >- <DropdownMenuIcon icon={<LuFile />} />- <Trans>PDF</Trans>- </a>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>)}- <Button- onClick={finalizeModal.onOpen}- isDisabled={- routeData?.quote?.status !== "Draft" ||- !permissions.can("update", "sales") ||- !eligibleLines?.length- }- variant={- routeData?.quote?.status === "Draft" ? "primary" : "secondary"- }- leftIcon={<LuCheckCheck />}- >- <Trans>Finalize</Trans>- </Button>-- <Button- isDisabled={- routeData?.quote?.status !== "Sent" ||- !permissions.can("update", "sales")- }- leftIcon={<LuTrophy />}- variant={- ["Sent", "Ordered", "Partial"].includes(- routeData?.quote?.status ?? ""- )- ? "primary"- : "secondary"- }- onClick={convertToOrderModal.onOpen}- >- <Trans>Won</Trans>- </Button>+ <RecordAction slot={finalizeSlot}>+ <Button+ onClick={finalizeModal.onOpen}+ isDisabled={+ routeData?.quote?.status !== "Draft" ||+ !permissions.can("update", "sales") ||+ !eligibleLines?.length+ }+ variant={isDraft ? "primary" : "secondary"}+ leftIcon={<LuCheckCheck />}+ >+ <Trans>Finalize</Trans>+ </Button>+ </RecordAction>- <statusFetcher.Form- method="post"- action={path.to.quoteStatus(quoteId)}- >- <input type="hidden" name="status" value="Lost" />+ <RecordAction slot={wonSlot}><ButtonisDisabled={routeData?.quote?.status !== "Sent" ||- statusFetcher.state !== "idle" ||!permissions.can("update", "sales")}- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Lost"- }- leftIcon={<LuCircleX />}- type="submit"- variant={- ["Sent", "Lost"].includes(routeData?.quote?.status ?? "")- ? "destructive"- : "secondary"- }+ leftIcon={<LuTrophy />}+ variant={isWinnable ? "primary" : "secondary"}+ onClick={convertToOrderModal.onOpen}>- <Trans>Lost</Trans>+ <Trans>Won</Trans></Button>- </statusFetcher.Form>+ </RecordAction>- {routeData?.quote?.status === "Draft" && (+ <RecordAction slot={lostSlot}><statusFetcher.Formmethod="post"action={path.to.quoteStatus(quoteId)}>- <input type="hidden" name="status" value="Cancelled" />+ <input type="hidden" name="status" value="Lost" /><ButtonisDisabled={+ routeData?.quote?.status !== "Sent" ||statusFetcher.state !== "idle" ||!permissions.can("update", "sales")}isLoading={statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Cancelled"+ statusFetcher.formData?.get("status") === "Lost"}- leftIcon={<LuCircleStop />}+ leftIcon={<LuCircleX />}type="submit"- variant="secondary"+ variant={+ ["Sent", "Lost"].includes(routeData?.quote?.status ?? "")+ ? "destructive"+ : "secondary"+ }>- <Trans>Cancel</Trans>+ <Trans>Lost</Trans></Button></statusFetcher.Form>- )}+ </RecordAction>- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>- </div>+ {isDraft && (+ <RecordAction slot="overflow">+ <statusFetcher.Form+ method="post"+ action={path.to.quoteStatus(quoteId)}+ >+ <input type="hidden" name="status" value="Cancelled" />+ <Button+ isDisabled={+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "sales")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Cancelled"+ }+ leftIcon={<LuCircleStop />}+ type="submit"+ variant="secondary"+ >+ <Trans>Cancel</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>+ )}+ </>+ }+ />{finalizeModal.isOpen && (<QuoteFinalizeModalquote={routeData?.quote}diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteLineForm.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteLineForm.tsxindex f6929dc929..1bc1e678d8 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteLineForm.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteLineForm.tsx@@ -427,7 +427,7 @@ const QuoteLineForm = ({)}<VStack><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3">- <div className="col-span-2 grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min">+ <div className="col-span-2 compact:col-span-full grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min"><ItemautoFocusname="itemId"diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsxindex ddc3f61cdb..21546a3dfd 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx@@ -178,12 +178,12 @@ const LineItems = ({{line.thumbnailPath ? (<imgalt={line.itemReadableId!}- className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg"+ className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg compact:size-14"src={getPrivateUrl(line.thumbnailPath)}/>) : (- <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4">- <LuImage className="w-16 h-16 text-muted-foreground" />+ <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4 compact:size-14 compact:p-3">+ <LuImage className="w-16 h-16 text-muted-foreground compact:size-8" /></div>)}@@ -192,7 +192,7 @@ const LineItems = ({className="flex flex-col cursor-pointer w-full"onClick={() => toggleOpen(line.id!)}>- <div className="flex items-center gap-x-4 justify-between flex-grow">+ <div className="flex items-center gap-x-4 justify-between flex-grow compact:flex-wrap compact:gap-y-2"><HStack spacing={2} className="min-w-0 flex-shrink"><Heading className="truncate">{line.itemReadableId}diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuotesTable.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuotesTable.tsxindex 5236cc2bfe..05eb28c51f 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuotesTable.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuotesTable.tsx@@ -91,6 +91,7 @@ const QuotesTable = memo(({ data, count }: QuotesTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -101,6 +102,7 @@ const QuotesTable = memo(({ data, count }: QuotesTableProps) => {<CustomerAvatar customerId={row.original.customerId} />),meta: {+ mobile: "P3",filter: {type: "static",options: customers?.map((customer) => ({@@ -121,6 +123,7 @@ const QuotesTable = memo(({ data, count }: QuotesTableProps) => {const completedLines = row.original.completedLines ?? 0;return status === "Draft" ? (<BarProgress+ className="compact:w-24"gradientprogress={lines === 0 ? 0 : (completedLines / lines) * 100}/>@@ -129,6 +132,7 @@ const QuotesTable = memo(({ data, count }: QuotesTableProps) => {);},meta: {+ mobile: "P2",filter: {type: "static",options: quoteStatusType.map((status) => ({diff --git a/apps/erp/app/modules/sales/ui/ReturnReasons/ReturnReasonsTable.tsx b/apps/erp/app/modules/sales/ui/ReturnReasons/ReturnReasonsTable.tsxindex a219e5fa9d..a8d814c985 100644--- a/apps/erp/app/modules/sales/ui/ReturnReasons/ReturnReasonsTable.tsx+++ b/apps/erp/app/modules/sales/ui/ReturnReasons/ReturnReasonsTable.tsx@@ -45,6 +45,7 @@ const ReturnReasonsTable = memo(({ data, count }: ReturnReasonsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderExplorer.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderExplorer.tsxindex 4e41795fb5..40e219c2ef 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderExplorer.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderExplorer.tsx@@ -409,7 +409,7 @@ function SalesOrderLineItem({<IconButtonaria-label={disclosure.isOpen ? "Hide" : "Show"}className={cn(- "animate opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100",+ "animate opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100",disclosure.isOpen && "-rotate-180")}icon={<LuChevronDown />}@@ -424,7 +424,7 @@ function SalesOrderLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label="More"- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}size="md"variant="solid"diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderForm.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderForm.tsxindex 5d716dc9a4..002cf955b8 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderForm.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderForm.tsx@@ -287,7 +287,7 @@ const SalesOrderForm = ({ initialValues }: SalesOrderFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isEditingdiff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderHeader.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderHeader.tsxindex 41df118b84..78ad7c7ac4 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderHeader.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderHeader.tsx@@ -7,16 +7,13 @@ import { useRuleViolations } from "@carbon/ee/rules";import { SelectControlled, ValidatedForm } from "@carbon/form";import {Button,- Copy,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,- Heading,HStack,- IconButton,MENU_ITEM_SHORTCUTS,Modal,ModalBody,@@ -38,13 +35,10 @@ import {LuCirclePlus,LuCircleStop,LuCreditCard,- LuEllipsisVertical,LuEye,LuFile,LuGitCompare,LuLoaderCircle,- LuPanelLeft,- LuPanelRight,LuTrash,LuTruck,LuUndo2@@ -55,6 +49,7 @@ import { useAuditLog } from "~/components/AuditLog";import { CSVLink } from "~/components/CSVLink";import { CustomerContact, EmailRecipients } from "~/components/Form";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import Confirm from "~/components/Modals/Confirm/Confirm";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";@@ -278,191 +273,206 @@ const SalesOrderHeader = () => {routeData?.salesOrder?.salesOrderId]);+ // Phones lead the action bar with the control the desktop highlights for+ // this status, with Invoice beside Ship when both are due.+ const orderStatus = routeData?.salesOrder?.status ?? "";+ const isDraft = orderStatus === "Draft";+ const isShipStep = ["To Ship", "To Ship and Invoice"].includes(orderStatus);+ const isInvoiceStep = ["To Invoice", "To Ship and Invoice"].includes(+ orderStatus+ );+ const confirmSlot = isDraft ? "primary" : "overflow";+ const shipSlot = isShipStep ? "primary" : "overflow";+ const invoiceSlot = !isInvoiceStep+ ? "overflow"+ : isShipStep+ ? "secondary"+ : "primary";++ const menuItems = (+ <>+ {auditLogTrigger}+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={+ !["To Ship and Invoice", "To Ship"].includes(+ routeData?.salesOrder?.status ?? ""+ ) ||+ !permissions.can("create", "production") ||+ !permissions.is("employee") ||+ !linesRequireJobs+ }+ onClick={salesOrderToJobsModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuGitCompare />} />+ <Trans>Convert Lines to Jobs</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem asChild>+ <CSVLink+ data={csvExportData}+ filename={`${routeData?.salesOrder?.salesOrderId}.csv`}+ >+ <DropdownMenuIcon icon={<LuFile />} />+ <Trans>Export Lines to CSV</Trans>+ </CSVLink>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ disabled={+ ["Draft"].includes(routeData?.salesOrder?.status ?? "") ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "sales")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.salesOrderStatus(orderId)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ destructive+ disabled={+ isLocked ||+ !permissions.can("delete", "sales") ||+ !permissions.is("employee")+ }+ onClick={deleteSalesOrderModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete Sales Order</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadges = (+ <>+ <SalesStatus+ status={routeData?.salesOrder?.status}+ jobs={+ routeData?.salesOrder?.jobs as Array<{+ salesOrderLineId: string;+ productionQuantity: number;+ quantityComplete: number;+ status: string;+ }>+ }+ lines={+ routeData?.salesOrder?.lines as Array<{+ id: string;+ methodType:+ | "Purchase to Order"+ | "Make to Order"+ | "Pull from Inventory";+ saleQuantity: number;+ }>+ }+ />+ </>+ );return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.salesOrderDetails(orderId)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.salesOrder?.salesOrderId}</span>- </Heading>- </Link>- <Copy text={routeData?.salesOrder?.salesOrderId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- {auditLogTrigger}- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- !["To Ship and Invoice", "To Ship"].includes(- routeData?.salesOrder?.status ?? ""- ) ||- !permissions.can("create", "production") ||- !permissions.is("employee") ||- !linesRequireJobs- }- onClick={salesOrderToJobsModal.onOpen}- >- <DropdownMenuIcon icon={<LuGitCompare />} />- <Trans>Convert Lines to Jobs</Trans>- </DropdownMenuItem>- <DropdownMenuItem asChild>- <CSVLink- data={csvExportData}- filename={`${routeData?.salesOrder?.salesOrderId}.csv`}- >- <DropdownMenuIcon icon={<LuFile />} />- <Trans>Export Lines to CSV</Trans>- </CSVLink>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem- disabled={- ["Draft"].includes(routeData?.salesOrder?.status ?? "") ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "sales")- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.salesOrderStatus(orderId)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- destructive- disabled={- isLocked ||- !permissions.can("delete", "sales") ||- !permissions.is("employee")- }- onClick={deleteSalesOrderModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete Sales Order</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <SalesStatus- status={routeData?.salesOrder?.status}- jobs={- routeData?.salesOrder?.jobs as Array<{- salesOrderLineId: string;- productionQuantity: number;- quantityComplete: number;- status: string;- }>- }- lines={- routeData?.salesOrder?.lines as Array<{- id: string;- methodType:- | "Purchase to Order"- | "Make to Order"- | "Pull from Inventory";- saleQuantity: number;- }>- }- />- </HStack>- <HStack>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuEye />}- variant="secondary"- rightIcon={<LuChevronDown />}- >- <Trans>Preview</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem asChild>- <a- target="_blank"- href={path.to.file.salesOrder(orderId)}- rel="noreferrer"+ <RecordHeader+ title={routeData?.salesOrder?.salesOrderId}+ titleTo={path.to.salesOrderDetails(orderId)}+ copyValue={routeData?.salesOrder?.salesOrderId ?? ""}+ menu={menuItems}+ status={statusBadges}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuEye />}+ variant="secondary"+ rightIcon={<LuChevronDown />}>- <DropdownMenuIcon icon={<LuFile />} />- <Trans>PDF</Trans>- </a>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>+ <Trans>Preview</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuItem asChild>+ <a+ target="_blank"+ href={path.to.file.salesOrder(orderId)}+ rel="noreferrer"+ >+ <DropdownMenuIcon icon={<LuFile />} />+ <Trans>PDF</Trans>+ </a>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>- <Button- leftIcon={<LuCheckCheck />}- variant={- routeData?.salesOrder?.status === "Draft"- ? "primary"- : "secondary"- }- onClick={confirmDisclosure.onOpen}- isDisabled={- !["Draft", "Needs Approval"].includes(- routeData?.salesOrder?.status ?? ""- ) ||- routeData?.lines.length === 0 ||- !permissions.can("update", "sales")- }- >- <Trans>Confirm</Trans>- </Button>+ <RecordAction slot={confirmSlot}>+ <Button+ leftIcon={<LuCheckCheck />}+ variant={isDraft ? "primary" : "secondary"}+ onClick={confirmDisclosure.onOpen}+ isDisabled={+ !["Draft", "Needs Approval"].includes(+ routeData?.salesOrder?.status ?? ""+ ) ||+ routeData?.lines.length === 0 ||+ !permissions.can("update", "sales")+ }+ >+ <Trans>Confirm</Trans>+ </Button>+ </RecordAction>- <Button- variant="secondary"- leftIcon={<LuCircleStop />}- onClick={cancelDisclosure.onOpen}- isDisabled={- ["Cancelled", "Closed", "Completed", "Invoiced"].includes(- routeData?.salesOrder?.status ?? ""- ) ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "sales")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Cancelled"- }- >- <Trans>Cancel</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button+ variant="secondary"+ leftIcon={<LuCircleStop />}+ onClick={cancelDisclosure.onOpen}+ isDisabled={+ ["Cancelled", "Closed", "Completed", "Invoiced"].includes(+ routeData?.salesOrder?.status ?? ""+ ) ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "sales")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Cancelled"+ }+ >+ <Trans>Cancel</Trans>+ </Button>+ </RecordAction><Suspensefallback={<>- <Button leftIcon={<LuTruck />} variant="secondary" isLoading>- <Trans>Loading...</Trans>- </Button>- <Button- leftIcon={<LuCreditCard />}- variant="secondary"- isLoading- >- <Trans>Loading...</Trans>- </Button>+ <RecordAction slot={shipSlot}>+ <Button+ leftIcon={<LuTruck />}+ variant="secondary"+ isLoading+ >+ <Trans>Loading...</Trans>+ </Button>+ </RecordAction>+ <RecordAction slot={invoiceSlot}>+ <Button+ leftIcon={<LuCreditCard />}+ variant="secondary"+ isLoading+ >+ <Trans>Loading...</Trans>+ </Button>+ </RecordAction></>}>@@ -475,193 +485,166 @@ const SalesOrderHeader = () => {return (<>{shipments.length > 0 ? (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuTruck />}- variant={- ["To Ship", "To Ship and Invoice"].includes(- routeData?.salesOrder?.status ?? ""- )- ? "primary"- : "secondary"- }- rightIcon={<LuChevronDown />}- >- <Trans>Shipments</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- ![- "To Ship",- "To Ship and Invoice",- "To Invoice"- ].includes(routeData?.salesOrder?.status ?? "")- }- onClick={() => {- ship(routeData?.salesOrder);- }}- >- <DropdownMenuIcon icon={<LuCirclePlus />} />- <Trans>New Shipment</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- {shipments.map((shipment) => (- <DropdownMenuItem key={shipment.id} asChild>- <Link to={path.to.shipment(shipment.id)}>- <DropdownMenuIcon icon={<LuTruck />} />- <HStack spacing={8}>- <span>{shipment.shipmentId}</span>- <ShipmentStatus- status={shipment.status}- invoiced={shipment.invoiced}- />- </HStack>- </Link>+ <RecordAction slot={shipSlot}>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuTruck />}+ variant={isShipStep ? "primary" : "secondary"}+ rightIcon={<LuChevronDown />}+ >+ <Trans>Shipments</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ <DropdownMenuItem+ disabled={+ ![+ "To Ship",+ "To Ship and Invoice",+ "To Invoice"+ ].includes(+ routeData?.salesOrder?.status ?? ""+ )+ }+ onClick={() => {+ ship(routeData?.salesOrder);+ }}+ >+ <DropdownMenuIcon icon={<LuCirclePlus />} />+ <Trans>New Shipment</Trans></DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>+ <DropdownMenuSeparator />+ {shipments.map((shipment) => (+ <DropdownMenuItem key={shipment.id} asChild>+ <Link to={path.to.shipment(shipment.id)}>+ <DropdownMenuIcon icon={<LuTruck />} />+ <HStack spacing={8}>+ <span>{shipment.shipmentId}</span>+ <ShipmentStatus+ status={shipment.status}+ invoiced={shipment.invoiced}+ />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>) : (- <Button- leftIcon={<LuTruck />}- isDisabled={- !["To Ship", "To Ship and Invoice"].includes(- routeData?.salesOrder?.status ?? ""- )- }- variant={- ["To Ship", "To Ship and Invoice"].includes(- routeData?.salesOrder?.status ?? ""- )- ? "primary"- : "secondary"- }- onClick={() => {- ship(routeData?.salesOrder);- }}- >- <Trans>Ship</Trans>- </Button>+ <RecordAction slot={shipSlot}>+ <Button+ leftIcon={<LuTruck />}+ isDisabled={!isShipStep}+ variant={isShipStep ? "primary" : "secondary"}+ onClick={() => {+ ship(routeData?.salesOrder);+ }}+ >+ <Trans>Ship</Trans>+ </Button>+ </RecordAction>)}{invoices?.length > 0 ? (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuCreditCard />}- rightIcon={<LuChevronDown />}- variant={- ["To Invoice", "To Ship and Invoice"].includes(- routeData?.salesOrder?.status ?? ""- )- ? "primary"- : "secondary"- }- >- <Trans>Invoices</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- <DropdownMenuItem- disabled={- !["To Invoice", "To Ship and Invoice"].includes(- routeData?.salesOrder?.status ?? ""- )- }- onClick={() => {- invoice(routeData?.salesOrder);- }}- >- <DropdownMenuIcon icon={<LuCirclePlus />} />- <Trans>New Invoice</Trans>- </DropdownMenuItem>- <DropdownMenuSeparator />- {invoices.map((invoice) => (- <DropdownMenuItem key={invoice.id} asChild>- <Link to={path.to.salesInvoice(invoice.id!)}>- <DropdownMenuIcon icon={<LuCreditCard />} />- <HStack spacing={8}>- <span>{invoice.invoiceId}</span>- <SalesInvoiceStatus- status={invoice.status}- />- </HStack>- </Link>+ <RecordAction slot={invoiceSlot}>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuCreditCard />}+ rightIcon={<LuChevronDown />}+ variant={+ isInvoiceStep ? "primary" : "secondary"+ }+ >+ <Trans>Invoices</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuItem+ disabled={!isInvoiceStep}+ onClick={() => {+ invoice(routeData?.salesOrder);+ }}+ >+ <DropdownMenuIcon icon={<LuCirclePlus />} />+ <Trans>New Invoice</Trans></DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>+ <DropdownMenuSeparator />+ {invoices.map((invoice) => (+ <DropdownMenuItem key={invoice.id} asChild>+ <Link to={path.to.salesInvoice(invoice.id!)}>+ <DropdownMenuIcon icon={<LuCreditCard />} />+ <HStack spacing={8}>+ <span>{invoice.invoiceId}</span>+ <SalesInvoiceStatus+ status={invoice.status}+ />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>) : (- <Button- leftIcon={<LuCreditCard />}- isDisabled={- !["To Invoice", "To Ship and Invoice"].includes(- routeData?.salesOrder?.status ?? ""- )- }- variant={- ["To Invoice", "To Ship and Invoice"].includes(- routeData?.salesOrder?.status ?? ""- )- ? "primary"- : "secondary"- }- onClick={() => {- invoice(routeData?.salesOrder);- }}- >- <Trans>Invoice</Trans>- </Button>+ <RecordAction slot={invoiceSlot}>+ <Button+ leftIcon={<LuCreditCard />}+ isDisabled={!isInvoiceStep}+ variant={isInvoiceStep ? "primary" : "secondary"}+ onClick={() => {+ invoice(routeData?.salesOrder);+ }}+ >+ <Trans>Invoice</Trans>+ </Button>+ </RecordAction>)}{salesReturnOrders.length > 0 && (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- leftIcon={<LuUndo2 />}- rightIcon={<LuChevronDown />}- variant="secondary"- >- <Trans>RMAs</Trans>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- {salesReturnOrders.map((returnOrder) => (- <DropdownMenuItem key={returnOrder.id} asChild>- <Link- to={path.to.salesReturnOrder(returnOrder.id)}- >- <DropdownMenuIcon icon={<LuUndo2 />} />- <HStack spacing={8}>- <span>- {returnOrder.salesReturnOrderId}- </span>- <SalesReturnOrderStatus- status={returnOrder.status}- />- </HStack>- </Link>- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>+ <RecordAction slot="overflow">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ leftIcon={<LuUndo2 />}+ rightIcon={<LuChevronDown />}+ variant="secondary"+ >+ <Trans>RMAs</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ {salesReturnOrders.map((returnOrder) => (+ <DropdownMenuItem key={returnOrder.id} asChild>+ <Link+ to={path.to.salesReturnOrder(+ returnOrder.id+ )}+ >+ <DropdownMenuIcon icon={<LuUndo2 />} />+ <HStack spacing={8}>+ <span>+ {returnOrder.salesReturnOrderId}+ </span>+ <SalesReturnOrderStatus+ status={returnOrder.status}+ />+ </HStack>+ </Link>+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>)}</>);}}</Await></Suspense>-- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>- </div>+ </>+ }+ />{salesOrderToJobsModal.isOpen && (<Confirmtitle={t`Convert Lines to Jobs`}diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderLineForm.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderLineForm.tsxindex 74bd8652e7..60520a45bf 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderLineForm.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderLineForm.tsx@@ -503,7 +503,7 @@ const SalesOrderLineForm = ({><HStackclassName={cn(- "w-full justify-between items-start",+ "w-full justify-between items-start compact:flex-col compact:items-stretch compact:space-x-0",type === "modal" && "pr-16")}>@@ -577,7 +577,7 @@ const SalesOrderLineForm = ({)}</ModalCardDescription></ModalCardHeader>- <div className="flex-shrink-0 flex items-center gap-2">+ <div className="flex-shrink-0 flex items-center gap-2 compact:min-w-0 compact:overflow-x-auto compact:scroll-fade-x compact:px-4 compact:pb-2 compact:empty:hidden">{!isEditing && (<TabsList><TabsTrigger value="item">diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderShipmentForm.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderShipmentForm.tsxindex 743628e711..0af3859299 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderShipmentForm.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderShipmentForm.tsx@@ -173,7 +173,7 @@ const SalesOrderShipmentForm = forwardRef</><Input name="trackingNumber" label={t`Tracking Number`} />- <div className="col-span-3">+ <div className="col-span-3 compact:col-span-full"><Booleanname="dropShipment"label={t`Drop Shipment`}diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderSummary.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderSummary.tsxindex 5e95426efe..1176bc5daa 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderSummary.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderSummary.tsx@@ -396,12 +396,12 @@ function LineItems({{line.thumbnailPath ? (<imgalt={line.itemReadableId!}- className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg"+ className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg compact:size-14"src={getPrivateUrl(line.thumbnailPath)}/>) : (- <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4">- <LuImage className="w-16 h-16 text-muted-foreground" />+ <div className="w-24 h-24 shrink-0 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-4 compact:size-14 compact:p-3">+ <LuImage className="w-16 h-16 text-muted-foreground compact:size-8" /></div>)}@@ -415,8 +415,11 @@ function LineItems({children need w-full because VStack is items-start, whichsizes each child to its own content and leaves truncateinert no matter how narrow the column gets. */}- <div className="flex items-center justify-between w-full">- <VStack spacing={0} className="flex-1 min-w-0">+ <div className="flex items-center justify-between w-full compact:flex-wrap compact:gap-y-2">+ <VStack+ spacing={0}+ className="flex-1 min-w-0 compact:basis-full"+ ><HStack spacing={2} className="flex min-w-0 w-full"><Heading className="truncate">{line.salesOrderLineType === "Fixed Asset"@@ -443,7 +446,7 @@ function LineItems({</VStack><VStackspacing={2}- className="flex-shrink-0 items-end w-auto"+ className="flex-shrink-0 items-end w-auto compact:basis-full compact:items-start"><HStack spacing={4}><MotionMoney@@ -497,7 +500,7 @@ function LineItems({<Badge variant={jobVariant}>{jobLabel}</Badge>{jobs.length > 0 && (<Tooltip>- <TooltipTrigger>+ <TooltipTrigger className="compact:hit-area"><Badge variant="secondary">{jobs.length} <Trans>Jobs</Trans><LuEllipsisVertical className="w-3 h-3 ml-2" />diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsxindex 26c052b246..d00077303f 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx@@ -136,6 +136,7 @@ const SalesOrdersTable = memo(({ data, count }: SalesOrdersTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -146,6 +147,7 @@ const SalesOrdersTable = memo(({ data, count }: SalesOrdersTableProps) => {return <CustomerAvatar customerId={row.original.customerId} />;},meta: {+ mobile: "P3",filter: {type: "static",options: customers?.map((customer) => ({@@ -161,6 +163,7 @@ const SalesOrdersTable = memo(({ data, count }: SalesOrdersTableProps) => {header: t`Status`,cell: ({ row }) => <SalesStatus status={row.original.displayStatus} />,meta: {+ mobile: "P2",filter: {type: "static",options: salesOrderStatusType.map((status) => ({@@ -350,6 +353,7 @@ const SalesOrdersTable = memo(({ data, count }: SalesOrdersTableProps) => {header: t`Order Total`,cell: (item) => currencyFormatter.format(item.getValue<number>()),meta: {+ mobile: "P2",icon: <LuDollarSign />,formatter: currencyFormatter.format,renderTotal: truediff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQExplorer.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQExplorer.tsxindex abe64f94ce..aacf07f998 100644--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQExplorer.tsx+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQExplorer.tsx@@ -444,7 +444,7 @@ function SalesRFQLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label="More"- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}variant="solid"onClick={(e) => e.stopPropagation()}diff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQForm.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQForm.tsxindex 50802a712d..486460caad 100644--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQForm.tsx+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQForm.tsx@@ -180,7 +180,7 @@ const SalesRFQForm = ({ initialValues }: SalesRFQFormProps) => {onExtractionComplete={handleExtractionComplete}/></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={!isDraft ||diff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQHeader.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQHeader.tsxindex a16efa7406..530d25d09c 100644--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQHeader.tsx+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQHeader.tsx@@ -10,15 +10,8 @@ import {AlertDescription,AlertTitle,Button,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,Modal,ModalBody,@@ -36,19 +29,17 @@ import { useState } from "react";import {LuCircleCheck,LuCircleX,- LuEllipsisVertical,LuLoaderCircle,- LuPanelLeft,- LuPanelRight,LuTrash,LuTriangleAlert} from "react-icons/lu";import { RiProgress4Line } from "react-icons/ri";import type { FetcherWithComponents } from "react-router";-import { Link, useFetcher, useParams } from "react-router";+import { useFetcher, useParams } from "react-router";import { z } from "zod";import { zfd } from "zod-form-data";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData, useUser } from "~/hooks";import { path } from "~/utils/path";@@ -80,154 +71,127 @@ const SalesRFQHeader = () => {const statusFetcher = useFetcher<{}>();+ // Phones lead the action bar with the step the desktop highlights; No+ // Quote sits beside Quote while both are open.+ const readyForQuoteSlot = status === "Draft" ? "primary" : "overflow";+ const isQuotable = ["Ready for Quote", "Quoted"].includes(status);+ const quoteSlot = isQuotable ? "primary" : "overflow";+ const noQuoteSlot = status === "Ready for Quote" ? "secondary" : "overflow";+ const menuItems = (+ <>+ <DropdownMenuItem+ disabled={+ routeData?.rfqSummary?.status === "Draft" ||+ (routeData?.opportunity?.quotes.length ?? 0) > 0 ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "sales")+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.salesRfqStatus(rfqId)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={+ isLocked ||+ !permissions.can("delete", "sales") ||+ !permissions.is("employee")+ }+ destructive+ onClick={deleteRFQModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete RFQ</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadge = <SalesRFQStatus status={routeData?.rfqSummary?.status} />;return (- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide ">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.salesRfqDetails(rfqId)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{routeData?.rfqSummary?.rfqId}</span>- </Heading>- </Link>- <Copy text={routeData?.rfqSummary?.rfqId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- routeData?.rfqSummary?.status === "Draft" ||- (routeData?.opportunity?.quotes.length ?? 0) > 0 ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "sales")- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.salesRfqStatus(rfqId)+ <>+ <RecordHeader+ title={routeData?.rfqSummary?.rfqId}+ titleTo={path.to.salesRfqDetails(rfqId)}+ copyValue={routeData?.rfqSummary?.rfqId ?? ""}+ menu={menuItems}+ status={statusBadge}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>+ {routeData?.rfqSummary?.customerId ? (+ <RecordAction slot={readyForQuoteSlot}>+ <statusFetcher.Form+ method="post"+ action={path.to.salesRfqStatus(rfqId)}+ >+ <input type="hidden" name="status" value="Ready for Quote" />+ <Button+ isDisabled={+ status !== "Draft" ||+ routeData?.lines?.length === 0 ||+ !permissions.can("update", "sales")}- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={- isLocked ||- !permissions.can("delete", "sales") ||- !permissions.is("employee")- }- destructive- onClick={deleteRFQModal.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete RFQ</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <SalesRFQStatus status={routeData?.rfqSummary?.status} />- </HStack>- <HStack>- {routeData?.rfqSummary?.customerId ? (- <statusFetcher.Form- method="post"- action={path.to.salesRfqStatus(rfqId)}- >- <input type="hidden" name="status" value="Ready for Quote" />+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") ===+ "Ready for Quote"+ }+ leftIcon={<LuCircleCheck />}+ variant={status === "Draft" ? "primary" : "secondary"}+ type="submit"+ >+ <Trans>Ready for Quote</Trans>+ </Button>+ </statusFetcher.Form>+ </RecordAction>+ ) : (+ <RecordAction slot={readyForQuoteSlot}>+ <Button+ isDisabled={+ status !== "Ready for Quote" ||+ routeData?.lines?.length === 0 ||+ !permissions.can("update", "sales")+ }+ leftIcon={<LuCircleCheck />}+ variant={status === "Draft" ? "primary" : "secondary"}+ onClick={requiresCustomerAlert.onOpen}+ >+ <Trans>Ready for Quote</Trans>+ </Button>+ </RecordAction>+ )}++ <RecordAction slot={quoteSlot}><Button+ isLoading={statusFetcher.state !== "idle"}isDisabled={- status !== "Draft" ||+ status !== "Ready for Quote" ||routeData?.lines?.length === 0 ||- !permissions.can("update", "sales")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Ready for Quote"+ !permissions.can("create", "sales")}- leftIcon={<LuCircleCheck />}- variant={status === "Draft" ? "primary" : "secondary"}+ leftIcon={<RiProgress4Line />}type="submit"+ variant={isQuotable ? "primary" : "secondary"}+ onClick={convertToQuoteModal.onOpen}>- <Trans>Ready for Quote</Trans>+ <Trans>Quote</Trans></Button>- </statusFetcher.Form>- ) : (- <Button- isDisabled={- status !== "Ready for Quote" ||- routeData?.lines?.length === 0 ||- !permissions.can("update", "sales")- }- leftIcon={<LuCircleCheck />}- variant={status === "Draft" ? "primary" : "secondary"}- onClick={requiresCustomerAlert.onOpen}- >- <Trans>Ready for Quote</Trans>- </Button>- )}-- <Button- isLoading={statusFetcher.state !== "idle"}- isDisabled={- status !== "Ready for Quote" ||- routeData?.lines?.length === 0 ||- !permissions.can("create", "sales")- }- leftIcon={<RiProgress4Line />}- type="submit"- variant={- ["Ready for Quote", "Quoted"].includes(status)- ? "primary"- : "secondary"- }- onClick={convertToQuoteModal.onOpen}- >- <Trans>Quote</Trans>- </Button>- {/* <statusFetcher.Form- method="post"- action={path.to.salesRfqStatus(rfqId)}- >- <input type="hidden" name="status" value="Closed" />- <Button- isDisabled={- status !== "Ready for Quote" ||- statusFetcher.state !== "idle" ||- !permissions.can("update", "sales")- }- isLoading={- statusFetcher.state !== "idle" &&- statusFetcher.formData?.get("status") === "Closed"- }- leftIcon={<LuCircleX />}- type="submit"- variant={- ["Ready for Quote", "Closed"].includes(status)- ? "destructive"- : "secondary"- }- >- No Quote- </Button>- </statusFetcher.Form> */}+ </RecordAction>+ {/* <statusFetcher.Form+ method="post"+ action={path.to.salesRfqStatus(rfqId)}+ >+ <input type="hidden" name="status" value="Closed" /><Button- onClick={noQuoteReasonModal.onOpen}isDisabled={status !== "Ready for Quote" ||statusFetcher.state !== "idle" ||@@ -238,23 +202,41 @@ const SalesRFQHeader = () => {statusFetcher.formData?.get("status") === "Closed"}leftIcon={<LuCircleX />}+ type="submit"variant={["Ready for Quote", "Closed"].includes(status)? "destructive": "secondary"}>- <Trans>No Quote</Trans>+ No Quote</Button>-- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>+ </statusFetcher.Form> */}+ <RecordAction slot={noQuoteSlot}>+ <Button+ onClick={noQuoteReasonModal.onOpen}+ isDisabled={+ status !== "Ready for Quote" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "sales")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Closed"+ }+ leftIcon={<LuCircleX />}+ variant={+ ["Ready for Quote", "Closed"].includes(status)+ ? "destructive"+ : "secondary"+ }+ >+ <Trans>No Quote</Trans>+ </Button>+ </RecordAction>+ </>+ }+ />{convertToQuoteModal.isOpen && (<ConvertToQuoteModallines={routeData?.lines ?? []}@@ -287,7 +269,7 @@ const SalesRFQHeader = () => {}}/>)}- </div>+ </>);};diff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQLineForm.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQLineForm.tsxindex b5e758a2b2..f62fb51fac 100644--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQLineForm.tsx+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQLineForm.tsx@@ -266,7 +266,7 @@ const SalesRFQLineForm = ({/><VStack><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3">- <div className="col-span-2 grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min">+ <div className="col-span-2 compact:col-span-full grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-2 auto-rows-min"><InputControlledname="customerPartId"label={t`Customer Part Number`}diff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQsTable.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQsTable.tsxindex f0e2d135d2..b3821a8164 100644--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQsTable.tsx+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQsTable.tsx@@ -74,6 +74,7 @@ const SalesRFQsTable = memo(({ data, count }: SalesRFQsTableProps) => {</HStack>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -85,6 +86,7 @@ const SalesRFQsTable = memo(({ data, count }: SalesRFQsTableProps) => {<CustomerAvatar customerId={row.original.customerId} />),meta: {+ mobile: "P3",filter: {type: "static",options: customers?.map((customer) => ({@@ -103,6 +105,7 @@ const SalesRFQsTable = memo(({ data, count }: SalesRFQsTableProps) => {return <SalesRFQStatus status={status} />;},meta: {+ mobile: "P2",filter: {type: "static",options: salesRFQStatusType.map((status) => ({diff --git a/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderExplorer.tsx b/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderExplorer.tsxindex 4630382315..2e4ba068f0 100644--- a/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderExplorer.tsx+++ b/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderExplorer.tsx@@ -320,7 +320,7 @@ function SalesReturnOrderLineItem({<IconButtonaria-label={disclosure.isOpen ? t`Hide` : t`Show`}className={cn(- "animate opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100",+ "animate opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100",disclosure.isOpen && "-rotate-180")}icon={<LuChevronDown />}@@ -335,7 +335,7 @@ function SalesReturnOrderLineItem({<DropdownMenuTrigger asChild><IconButtonaria-label="More"- className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100"+ className="opacity-0 group-hover:opacity-100 group-active:opacity-100 data-[state=open]:opacity-100 compact:opacity-100"icon={<LuEllipsisVertical />}size="md"variant="solid"diff --git a/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderForm.tsx b/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderForm.tsxindex 39c867d9e6..fd89ee5545 100644--- a/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderForm.tsx+++ b/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderForm.tsx@@ -217,7 +217,7 @@ const SalesReturnOrderForm = ({ initialValues }: SalesReturnOrderFormProps) => {</div></VStack></CardContent>- <CardFooter>+ <CardFooter sticky={!isEditing}><SubmitisDisabled={isEditingdiff --git a/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderHeader.tsx b/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderHeader.tsxindex 0be56fe2da..3b9aac461e 100644--- a/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderHeader.tsx+++ b/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrderHeader.tsx@@ -4,15 +4,8 @@import {Button,- Copy,- DropdownMenu,- DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,- DropdownMenuTrigger,- Heading,- HStack,- IconButton,MENU_ITEM_SHORTCUTS,useDisclosure} from "@carbon/react";@@ -21,13 +14,10 @@ import {LuCheckCheck,LuCircleStop,LuCreditCard,- LuEllipsisVertical,LuFile,LuGitCompare,LuLoaderCircle,LuPackageCheck,- LuPanelLeft,- LuPanelRight,LuTrash,LuTruck} from "react-icons/lu";@@ -39,6 +29,7 @@ import {useSubmit} from "react-router";import { usePanels } from "~/components/Layout";+import { RecordAction, RecordHeader } from "~/components/Layout/RecordHeader";import Confirm from "~/components/Modals/Confirm/Confirm";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import { usePermissions, useRouteData } from "~/hooks";@@ -104,191 +95,186 @@ const SalesReturnOrderHeader = () => {const canUpdate = permissions.can("update", "sales");+ const menuItems = (+ <>+ <DropdownMenuItem+ disabled={+ !["To Receive", "Cancelled"].includes(status ?? "") ||+ statusFetcher.state !== "idle" ||+ !canUpdate+ }+ onClick={() => {+ statusFetcher.submit(+ { status: "Draft" },+ {+ method: "post",+ action: path.to.salesReturnOrderStatus(id)+ }+ );+ }}+ >+ <DropdownMenuIcon icon={<LuLoaderCircle />} />+ <Trans>Reopen</Trans>+ </DropdownMenuItem>+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ destructive+ disabled={+ !["Draft", "Cancelled"].includes(status ?? "") ||+ !permissions.can("delete", "sales") ||+ !permissions.is("employee")+ }+ onClick={deleteDisclosure.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete RMA</Trans>+ </DropdownMenuItem>+ </>+ );+ const statusBadge = <SalesReturnOrderStatus status={status} />;return (<>- <div className="flex flex-shrink-0 items-center justify-between gap-x-4 p-2 bg-card border-b h-[var(--header-height)] overflow-x-auto scrollbar-hide">- <HStack className="w-full justify-between">- <HStack>- <IconButton- aria-label={t`Toggle Explorer`}- icon={<LuPanelLeft />}- onClick={toggleExplorer}- variant="ghost"- />- <Link to={path.to.salesReturnOrderDetails(id)}>- <Heading size="h4" className="flex items-center gap-2">- <span>{salesReturnOrder.salesReturnOrderId}</span>- </Heading>- </Link>- <Copy text={salesReturnOrder.salesReturnOrderId ?? ""} />- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`More options`}- icon={<LuEllipsisVertical />}- variant="secondary"- size="sm"- />- </DropdownMenuTrigger>- <DropdownMenuContent>- <DropdownMenuItem- disabled={- !["To Receive", "Cancelled"].includes(status ?? "") ||- statusFetcher.state !== "idle" ||- !canUpdate- }- onClick={() => {- statusFetcher.submit(- { status: "Draft" },- {- method: "post",- action: path.to.salesReturnOrderStatus(id)- }- );- }}- >- <DropdownMenuIcon icon={<LuLoaderCircle />} />- <Trans>Reopen</Trans>- </DropdownMenuItem>- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- destructive- disabled={- !["Draft", "Cancelled"].includes(status ?? "") ||- !permissions.can("delete", "sales") ||- !permissions.is("employee")- }- onClick={deleteDisclosure.onOpen}- >- <DropdownMenuIcon icon={<LuTrash />} />- <Trans>Delete RMA</Trans>- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- <SalesReturnOrderStatus status={status} />- </HStack>- <HStack>+ <RecordHeader+ title={salesReturnOrder.salesReturnOrderId}+ titleTo={path.to.salesReturnOrderDetails(id)}+ copyValue={salesReturnOrder.salesReturnOrderId ?? ""}+ menu={menuItems}+ status={statusBadge}+ onToggleExplorer={toggleExplorer}+ onToggleProperties={toggleProperties}+ actions={+ <>{status !== "Draft" && (- <Button leftIcon={<LuFile />} variant="secondary" asChild>- <a- target="_blank"- href={path.to.file.salesReturnOrder(id)}- rel="noreferrer"- >- <Trans>PDF</Trans>- </a>- </Button>+ <RecordAction slot="overflow">+ <Button leftIcon={<LuFile />} variant="secondary" asChild>+ <a+ target="_blank"+ href={path.to.file.salesReturnOrder(id)}+ rel="noreferrer"+ >+ <Trans>PDF</Trans>+ </a>+ </Button>+ </RecordAction>)}{status === "Draft" && (- <Button- leftIcon={<LuCheckCheck />}- variant="primary"- isDisabled={routeData.lines.length === 0 || !canUpdate}- onClick={confirmDisclosure.onOpen}- >- <Trans>Confirm</Trans>- </Button>+ <RecordAction slot="primary">+ <Button+ leftIcon={<LuCheckCheck />}+ variant="primary"+ isDisabled={routeData.lines.length === 0 || !canUpdate}+ onClick={confirmDisclosure.onOpen}+ >+ <Trans>Confirm</Trans>+ </Button>+ </RecordAction>)}{["Draft", "To Receive"].includes(status ?? "") && (- <Button- variant="secondary"- leftIcon={<LuCircleStop />}- isDisabled={!canUpdate}- onClick={cancelDisclosure.onOpen}- >- <Trans>Cancel</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button+ variant="secondary"+ leftIcon={<LuCircleStop />}+ isDisabled={!canUpdate}+ onClick={cancelDisclosure.onOpen}+ >+ <Trans>Cancel</Trans>+ </Button>+ </RecordAction>)}{status === "To Receive" && (- <Button- variant="primary"- leftIcon={<LuPackageCheck />}- isDisabled={- isCreatingDocument || !permissions.can("create", "inventory")- }- onClick={receive}- >- <Trans>Receive</Trans>- </Button>- )}-- {!["Draft", "Cancelled"].includes(status ?? "") &&- hasReceivedQuantity &&- hasReturnToCustomerLine && (+ <RecordAction slot="primary"><Button- variant="secondary"- leftIcon={<LuTruck />}+ variant="primary"+ leftIcon={<LuPackageCheck />}isDisabled={isCreatingDocument ||!permissions.can("create", "inventory")}- onClick={shipBack}+ onClick={receive}>- <Trans>Ship</Trans>+ <Trans>Receive</Trans></Button>- )}+ </RecordAction>+ )}- {!["Draft", "Cancelled"].includes(status ?? "") && (- <>- {hasReceivedQuantity && (+ {!["Draft", "Cancelled"].includes(status ?? "") &&+ hasReceivedQuantity &&+ hasReturnToCustomerLine && (+ <RecordAction slot="overflow"><Button- leftIcon={<LuCreditCard />}variant="secondary"- isDisabled={!permissions.can("create", "invoicing")}- onClick={creditDisclosure.onOpen}+ leftIcon={<LuTruck />}+ isDisabled={+ isCreatingDocument ||+ !permissions.can("create", "inventory")+ }+ onClick={shipBack}>- <Trans>Issue Credit</Trans>+ <Trans>Ship</Trans></Button>+ </RecordAction>+ )}++ {!["Draft", "Cancelled"].includes(status ?? "") && (+ <>+ {hasReceivedQuantity && (+ <RecordAction slot="overflow">+ <Button+ leftIcon={<LuCreditCard />}+ variant="secondary"+ isDisabled={!permissions.can("create", "invoicing")}+ onClick={creditDisclosure.onOpen}+ >+ <Trans>Issue Credit</Trans>+ </Button>+ </RecordAction>)}{salesReturnOrder.replacementSalesOrderId ? (- <Button- leftIcon={<LuGitCompare />}- variant="secondary"- asChild- >- <Link- to={path.to.salesOrder(- salesReturnOrder.replacementSalesOrderId- )}+ <RecordAction slot="overflow">+ <Button+ leftIcon={<LuGitCompare />}+ variant="secondary"+ asChild>- <Trans>Replacement Order</Trans>- </Link>- </Button>+ <Link+ to={path.to.salesOrder(+ salesReturnOrder.replacementSalesOrderId+ )}+ >+ <Trans>Replacement Order</Trans>+ </Link>+ </Button>+ </RecordAction>) : (- <Button- leftIcon={<LuGitCompare />}- variant="secondary"- isLoading={replacementFetcher.state !== "idle"}- isDisabled={- replacementFetcher.state !== "idle" ||- !permissions.can("create", "sales")- }- onClick={() => {- replacementFetcher.submit(null, {- method: "post",- action: path.to.salesReturnOrderReplacement(id)- });- }}- >- <Trans>Create Replacement</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button+ leftIcon={<LuGitCompare />}+ variant="secondary"+ isLoading={replacementFetcher.state !== "idle"}+ isDisabled={+ replacementFetcher.state !== "idle" ||+ !permissions.can("create", "sales")+ }+ onClick={() => {+ replacementFetcher.submit(null, {+ method: "post",+ action: path.to.salesReturnOrderReplacement(id)+ });+ }}+ >+ <Trans>Create Replacement</Trans>+ </Button>+ </RecordAction>)}</>)}-- <IconButton- aria-label={t`Toggle Properties`}- icon={<LuPanelRight />}- onClick={toggleProperties}- variant="ghost"- />- </HStack>- </HStack>- </div>+ </>+ }+ />{confirmDisclosure.isOpen && (<Confirmdiff --git a/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrdersTable.tsx b/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrdersTable.tsxindex 8aa928c74e..42b9a1ac7e 100644--- a/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrdersTable.tsx+++ b/apps/erp/app/modules/sales/ui/SalesReturnOrders/SalesReturnOrdersTable.tsx@@ -74,6 +74,7 @@ const SalesReturnOrdersTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -84,6 +85,7 @@ const SalesReturnOrdersTable = memo(<CustomerAvatar customerId={row.original.customerId} />),meta: {+ mobile: "P3",filter: {type: "static",options: customers?.map((customer) => ({@@ -104,6 +106,7 @@ const SalesReturnOrdersTable = memo(<SalesReturnOrderStatus status={row.original.status} />),meta: {+ mobile: "P2",filter: {type: "static",options: salesReturnOrderStatusType.map((status) => ({diff --git a/apps/erp/app/modules/sales/ui/SalesRules/SalesRulesGroups.tsx b/apps/erp/app/modules/sales/ui/SalesRules/SalesRulesGroups.tsxindex 42124b4087..06e354a328 100644--- a/apps/erp/app/modules/sales/ui/SalesRules/SalesRulesGroups.tsx+++ b/apps/erp/app/modules/sales/ui/SalesRules/SalesRulesGroups.tsx@@ -96,10 +96,13 @@ const SalesRulesGroups = memo(({ rules }: SalesRulesGroupsProps) => {<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))] bg-card"><VStackspacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"+ className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4 compact:py-4"><div className="flex flex-col gap-1 w-full">- <Heading size="h3" className="tracking-tight text-balance">+ <Heading+ size="h3"+ className="tracking-tight text-balance compact:sr-only"+ ><Trans>Sales Rules</Trans></Heading><p className="max-w-[72ch] text-sm text-muted-foreground text-pretty">@@ -179,23 +182,28 @@ const SalesRuleCard = memo(({ rule }: { rule: SalesRuleListItem }) => {<Accordion type="multiple" className="w-full"><AccordionItem value={rule.id} className="border-none"><div className="relative">- <AccordionTrigger className="px-6 py-6 hover:no-underline w-full">- <HStack spacing={4} className="flex-1 justify-between pr-12">- <div className="flex items-center gap-3 min-w-0">+ <AccordionTrigger className="px-6 py-6 hover:no-underline w-full compact:px-4 compact:py-4 compact:min-w-0">+ <HStack+ spacing={4}+ className="flex-1 justify-between pr-12 compact:min-w-0 compact:flex-wrap compact:space-x-0 compact:gap-2 compact:pr-14"+ >+ <div className="flex items-center gap-3 min-w-0 compact:basis-full"><Heading size="h4" as="h3" className="truncate">{rule.name}</Heading>{rule.severity === "error" ? (- <Badge variant="red">+ <Badge variant="red" className="compact:shrink-0"><Trans>Error</Trans></Badge>) : (- <Badge variant="yellow">+ <Badge variant="yellow" className="compact:shrink-0"><Trans>Warn</Trans></Badge>)}{broadcastLabel && (- <Badge variant="outline">{broadcastLabel}</Badge>+ <Badge variant="outline" className="compact:shrink-0">+ {broadcastLabel}+ </Badge>)}</div><Statusdiff --git a/apps/erp/app/modules/sales/ui/SalesRules/SalesRulesTable.tsx b/apps/erp/app/modules/sales/ui/SalesRules/SalesRulesTable.tsxindex 73e53bd638..8d526418dd 100644--- a/apps/erp/app/modules/sales/ui/SalesRules/SalesRulesTable.tsx+++ b/apps/erp/app/modules/sales/ui/SalesRules/SalesRulesTable.tsx@@ -76,7 +76,7 @@ const SalesRulesTable = memo(({ data, count }: SalesRulesTableProps) => {<Enumerable value={row.original.name} /></Hyperlink>),- meta: { icon: <LuShieldCheck /> }+ meta: { icon: <LuShieldCheck />, mobile: "P1" }},{accessorKey: "severity",@@ -90,7 +90,8 @@ const SalesRulesTable = memo(({ data, count }: SalesRulesTableProps) => {<Badge variant="yellow"><Trans>Warn</Trans></Badge>- )+ ),+ meta: { mobile: "P3" }},{accessorKey: "surfaces",@@ -123,7 +124,8 @@ const SalesRulesTable = memo(({ data, count }: SalesRulesTableProps) => {<Status color="gray"><Trans>Inactive</Trans></Status>- )+ ),+ meta: { mobile: "P2" }},{accessorKey: "assignmentCount",diff --git a/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx b/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsxindex f8ced70b0d..ef2ed9f38e 100644--- a/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx+++ b/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx@@ -75,6 +75,7 @@ const ApiKeysTable = memo(({ data, count }: ApiKeysTableProps) => {<Hyperlink to={row.original.id!}>{row.original.name}</Hyperlink>),meta: {+ mobile: "P1",icon: <LuTag />}},@@ -137,6 +138,7 @@ const ApiKeysTable = memo(({ data, count }: ApiKeysTableProps) => {return <EmployeeAvatar employeeId={row.original.createdBy} />;},meta: {+ mobile: "P3",icon: <LuUser />,filter: {type: "static",@@ -170,6 +172,7 @@ const ApiKeysTable = memo(({ data, count }: ApiKeysTableProps) => {);},meta: {+ mobile: "P2",icon: <LuCalendar />}},diff --git a/apps/erp/app/modules/settings/ui/Approvals/ApprovalRuleCard.ee.tsx b/apps/erp/app/modules/settings/ui/Approvals/ApprovalRuleCard.ee.tsxindex 5aa924fe11..7e155e7f2a 100644--- a/apps/erp/app/modules/settings/ui/Approvals/ApprovalRuleCard.ee.tsx+++ b/apps/erp/app/modules/settings/ui/Approvals/ApprovalRuleCard.ee.tsx@@ -74,9 +74,13 @@ const ApprovalRuleCard = memo(<Accordion type="multiple" className="w-full"><AccordionItem value={rule.id} className="border-none"><div className="relative">- <AccordionTrigger className="px-6 py-8 hover:no-underline w-full">+ <AccordionTrigger className="px-6 py-8 hover:no-underline w-full compact:px-4 compact:py-4"><HStack spacing={4} className="flex-1 justify-between pr-12">- <Heading size="h4" as="h3">+ <Heading+ size="h4"+ as="h3"+ className="compact:text-left compact:min-w-0"+ >{approvalDocumentTypeLabel[documentType]}{approvalDocumentTypesWithAmounts.includes(documentType@@ -87,7 +91,7 @@ const ApprovalRuleCard = memo(</Heading><Statuscolor={rule.enabled ? "green" : "gray"}- className="text-xs font-medium"+ className="text-xs font-medium compact:shrink-0">{rule.enabled ? (<Trans>Enabled</Trans>diff --git a/apps/erp/app/modules/settings/ui/Approvals/ApprovalRules.ee.tsx b/apps/erp/app/modules/settings/ui/Approvals/ApprovalRules.ee.tsxindex d5d067ec02..32546c7150 100644--- a/apps/erp/app/modules/settings/ui/Approvals/ApprovalRules.ee.tsx+++ b/apps/erp/app/modules/settings/ui/Approvals/ApprovalRules.ee.tsx@@ -48,8 +48,8 @@ const ApprovalRules = memo(return (<ScrollArea className="h-full w-full">- <div className="py-12 px-4 max-w-[60rem] mx-auto">- <div className="mb-8">+ <div className="py-12 px-4 max-w-[60rem] mx-auto compact:py-3">+ <div className="mb-8 compact:hidden"><Heading size="h2"><Trans>Approval Rules</Trans></Heading>@@ -58,7 +58,7 @@ const ApprovalRules = memo(<VStack spacing={4}><Card><CardHeader>- <div className="flex items-center justify-between">+ <div className="flex items-center justify-between compact:flex-col compact:items-start compact:gap-3"><div><CardTitle className="text-lg"><Trans>Purchase Orders</Trans>@@ -101,7 +101,7 @@ const ApprovalRules = memo(<Card><CardHeader>- <div className="flex items-center justify-between">+ <div className="flex items-center justify-between compact:flex-col compact:items-start compact:gap-3"><div><CardTitle className="text-lg"><Trans>Quality Documents</Trans>@@ -146,7 +146,7 @@ const ApprovalRules = memo(<Card><CardHeader>- <div className="flex items-center justify-between">+ <div className="flex items-center justify-between compact:flex-col compact:items-start compact:gap-3"><div><CardTitle className="text-lg"><Trans>Suppliers</Trans>diff --git a/apps/erp/app/modules/settings/ui/AuditLog/AuditLogTable.tsx b/apps/erp/app/modules/settings/ui/AuditLog/AuditLogTable.tsxindex 9c22da9238..9cd22d99a8 100644--- a/apps/erp/app/modules/settings/ui/AuditLog/AuditLogTable.tsx+++ b/apps/erp/app/modules/settings/ui/AuditLog/AuditLogTable.tsx@@ -154,6 +154,7 @@ const AuditLogTable = memo(({ entries, count }: AuditLogTableProps) => {);},meta: {+ mobile: "P1",filter: {type: "static",options: getEntityTypes().map((entityType) => ({@@ -182,6 +183,7 @@ const AuditLogTable = memo(({ entries, count }: AuditLogTableProps) => {);},meta: {+ mobile: "P2",filter: {type: "static",options: [@@ -195,6 +197,7 @@ const AuditLogTable = memo(({ entries, count }: AuditLogTableProps) => {{accessorKey: "actorId",header: t`Changed By`,+ meta: { mobile: "P3" },cell: ({ row }) => {const entry = row.original;return entry.actorId ? (@@ -227,6 +230,7 @@ const AuditLogTable = memo(({ entries, count }: AuditLogTableProps) => {{accessorKey: "createdAt",header: t`When`,+ meta: { mobile: "P2" },cell: ({ row }) => (<span className="text-sm text-muted-foreground"><DateTime value={row.original.createdAt} variant="absolute" />diff --git a/apps/erp/app/modules/settings/ui/Backups/BackupContentsInfo.tsx b/apps/erp/app/modules/settings/ui/Backups/BackupContentsInfo.tsxindex fd7e0a6f9a..54cce3f82e 100644--- a/apps/erp/app/modules/settings/ui/Backups/BackupContentsInfo.tsx+++ b/apps/erp/app/modules/settings/ui/Backups/BackupContentsInfo.tsx@@ -41,7 +41,7 @@ export function BackupContentsInfo() {<buttontype="button"aria-label={t`What a backup contains`}- className="text-muted-foreground hover:text-foreground"+ className="text-muted-foreground hover:text-foreground compact:hit-area"><LuInfo className="h-3.5 w-3.5" /></button>diff --git a/apps/erp/app/modules/settings/ui/Backups/BackupSourcePicker.tsx b/apps/erp/app/modules/settings/ui/Backups/BackupSourcePicker.tsxindex 413b0df95e..724bfe248b 100644--- a/apps/erp/app/modules/settings/ui/Backups/BackupSourcePicker.tsx+++ b/apps/erp/app/modules/settings/ui/Backups/BackupSourcePicker.tsx@@ -37,7 +37,7 @@ type UploadState =| { phase: "unpacking" };const triggerClass =- "bg-transparent text-foreground flex h-10 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input px-3 py-2 text-sm shadow-xs outline-none focus:border-ring focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50";+ "bg-transparent text-foreground flex h-10 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input px-3 py-2 text-sm shadow-xs outline-none focus:border-ring focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 compact:h-11 compact:text-base";// One control combining your backups + upload new. Selecting one sets the// hidden `source` field the restore form submits.diff --git a/apps/erp/app/modules/settings/ui/Companies/CompaniesTreeView.tsx b/apps/erp/app/modules/settings/ui/Companies/CompaniesTreeView.tsxindex 15573d25f6..f0d37f45d0 100644--- a/apps/erp/app/modules/settings/ui/Companies/CompaniesTreeView.tsx+++ b/apps/erp/app/modules/settings/ui/Companies/CompaniesTreeView.tsx@@ -88,7 +88,7 @@ function CompaniesFlow({><ControlsshowInteractive={false}- className="!bg-card !border-border !shadow-sm [&>button]:!bg-card [&>button]:!border-border [&>button]:!text-foreground [&>button:hover]:!bg-accent"+ className="!bg-card !border-border !shadow-sm compact:!left-auto compact:!right-0 compact:[&>button]:!size-11 [&>button]:!bg-card [&>button]:!border-border [&>button]:!text-foreground [&>button:hover]:!bg-accent"/><Backgroundvariant={BackgroundVariant.Dots}@@ -149,7 +149,7 @@ export function CompaniesTreeView({}, [initialNodes, initialEdges, setNodes, setEdges]);return (- <div className="h-[calc(100dvh-(var(--header-height))-61px)] w-full overflow-hidden">+ <div className="h-[calc(100dvh-(var(--header-height))-61px)] w-full overflow-hidden compact:h-[calc(100dvh-var(--topbar-height)-var(--content-inset,0px)-61px)]"><ReactFlowProvider><CompaniesFlownodes={nodes}diff --git a/apps/erp/app/modules/settings/ui/Companies/CompanyNode.tsx b/apps/erp/app/modules/settings/ui/Companies/CompanyNode.tsxindex 2fcfeba8c5..8170ebe424 100644--- a/apps/erp/app/modules/settings/ui/Companies/CompanyNode.tsx+++ b/apps/erp/app/modules/settings/ui/Companies/CompanyNode.tsx@@ -80,7 +80,7 @@ function CompanyNodeComponent({ data }: NodeProps & { data: CompanyNodeData }) {<DropdownMenu><DropdownMenuTrigger asChild><button- className="ml-auto shrink-0 rounded-md p-1 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 focus:opacity-100"+ className="ml-auto shrink-0 rounded-md p-1 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 focus:opacity-100 compact:opacity-100 compact:hit-area"aria-label="Actions"><LuEllipsisVertical className="size-3.5 text-muted-foreground" />diff --git a/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTable.tsx b/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTable.tsxindex 9bbbece3a8..107caf4ec7 100644--- a/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTable.tsx+++ b/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTable.tsx@@ -49,6 +49,7 @@ const CustomFieldsTable = memo(({ data, count }: CustomFieldsTableProps) => {</div>),meta: {+ mobile: "P1",icon: <LuDatabase />}},@@ -57,6 +58,7 @@ const CustomFieldsTable = memo(({ data, count }: CustomFieldsTableProps) => {header: t`Module`,cell: ({ row }) => <Enumerable value={row.original.module} />,meta: {+ mobile: "P2",icon: <LuLayoutGrid />,filter: {type: "static",@@ -69,6 +71,7 @@ const CustomFieldsTable = memo(({ data, count }: CustomFieldsTableProps) => {},{header: t`Fields`,+ meta: { mobile: "P2" },cell: ({ row }) => (<HStack className="text-xs text-muted-foreground"><LuList />diff --git a/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTableDetail.tsx b/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTableDetail.tsxindex a074b1fff4..a0ac7cdb3a 100644--- a/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTableDetail.tsx+++ b/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTableDetail.tsx@@ -37,6 +37,7 @@ import {import { Link, useFetcher, useParams } from "react-router";import { New } from "~/components";import { ConfirmDelete } from "~/components/Modals";+import { NewPlacementContext } from "~/components/New";import { useUrlParams } from "~/hooks";import type { AttributeDataType } from "~/modules/people";import type { CustomField, CustomFieldsTableType } from "~/modules/settings";@@ -231,9 +232,12 @@ const CustomFieldCategoryDetail = ({)}</DrawerBody><DrawerFooter>- <Button asChild size="md">- <New label={t`Custom Field`} to={`new?${params?.toString()}`} />- </Button>+ {/* Inline on phones too: the app bar sits under this drawer. */}+ <NewPlacementContext.Provider value="inline">+ <Button asChild size="md">+ <New label={t`Custom Field`} to={`new?${params?.toString()}`} />+ </Button>+ </NewPlacementContext.Provider></DrawerFooter></DrawerContent></Drawer>diff --git a/apps/erp/app/modules/settings/ui/Integrations/AccountMapping.tsx b/apps/erp/app/modules/settings/ui/Integrations/AccountMapping.tsxindex ca71148882..c0bfb6b061 100644--- a/apps/erp/app/modules/settings/ui/Integrations/AccountMapping.tsx+++ b/apps/erp/app/modules/settings/ui/Integrations/AccountMapping.tsx@@ -346,14 +346,14 @@ export function AccountMapping({</div>{grouped.length === 0 ? (- <div className="flex w-full items-center justify-center rounded-lg border border-border py-8 text-sm text-muted-foreground">+ <div className="flex w-full items-center justify-center rounded-lg border border-border py-8 text-sm text-muted-foreground compact:border-0 compact:rounded-none"><Trans>No accounts match your search</Trans></div>) : (grouped.map((group) => (<div key={group.class} className="flex w-full flex-col gap-1"><Subheading variant="heavy">{group.class}</Subheading>- <div className="w-full rounded-lg border border-border">+ <div className="w-full rounded-lg border border-border compact:border-0 compact:p-0 compact:rounded-none"><div className="flex w-full flex-col divide-y divide-border">{group.accounts.map((account) => {const mapping = mappedById.get(account.id);@@ -624,7 +624,7 @@ function MatchByCodeDrawer({<Trans>No unmapped accounts match a provider code</Trans></div>) : (- <div className="w-full rounded-lg border border-border">+ <div className="w-full rounded-lg border border-border compact:border-0 compact:p-0 compact:rounded-none"><Table><Thead><Tr>@@ -800,7 +800,7 @@ function AiSuggestModal({<Trans>AI couldn't confidently match any accounts</Trans></div>) : (- <div className="w-full rounded-lg border border-border">+ <div className="w-full rounded-lg border border-border compact:border-0 compact:p-0 compact:rounded-none"><Table><Thead><Tr>diff --git a/apps/erp/app/modules/settings/ui/Integrations/AccountingSyncControl.tsx b/apps/erp/app/modules/settings/ui/Integrations/AccountingSyncControl.tsxindex 1d94c66646..1538a38b3e 100644--- a/apps/erp/app/modules/settings/ui/Integrations/AccountingSyncControl.tsx+++ b/apps/erp/app/modules/settings/ui/Integrations/AccountingSyncControl.tsx@@ -35,7 +35,7 @@ export function AccountingSyncControl({const isBlocked = !checked && unmappedRequiredCount > 0;return (- <div className="flex items-start justify-between gap-4 rounded-md border border-border bg-muted/40 px-3 py-2">+ <div className="flex items-start justify-between gap-4 rounded-md border border-border bg-muted/40 px-3 py-2 compact:border-0 compact:p-0 compact:rounded-none compact:bg-transparent"><div className="flex min-w-0 flex-col gap-1"><div className="flex items-center gap-2"><span className="text-sm font-medium">diff --git a/apps/erp/app/modules/settings/ui/Integrations/DimensionMapping.tsx b/apps/erp/app/modules/settings/ui/Integrations/DimensionMapping.tsxindex badd0268cf..b6ea620959 100644--- a/apps/erp/app/modules/settings/ui/Integrations/DimensionMapping.tsx+++ b/apps/erp/app/modules/settings/ui/Integrations/DimensionMapping.tsx@@ -286,7 +286,7 @@ export function DimensionMapping({)}</p>)}- <div className="w-full rounded-lg border border-border">+ <div className="w-full rounded-lg border border-border compact:border-0 compact:p-0 compact:rounded-none">{rows.length === 0 ? (<div className="flex w-full items-center justify-center py-8 text-sm text-muted-foreground"><Trans>No dimension slots configured</Trans>@@ -571,7 +571,7 @@ function MappingSection({</div><p className="text-xs text-muted-foreground">{description}</p></div>- <div className="w-full rounded-lg border border-border">+ <div className="w-full rounded-lg border border-border compact:border-0 compact:p-0 compact:rounded-none">{count === 0 ? (<div className="flex w-full items-center justify-center py-8 text-sm text-muted-foreground">{emptyMessage}@@ -770,7 +770,7 @@ function MatchByNameDrawer({<Trans>No unmapped values match a provider option name</Trans></div>) : (- <div className="w-full rounded-lg border border-border">+ <div className="w-full rounded-lg border border-border compact:border-0 compact:p-0 compact:rounded-none"><Table><Thead><Tr>diff --git a/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx b/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsxindex 5d2ea366eb..ce388c66d8 100644--- a/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx+++ b/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx@@ -911,7 +911,7 @@ export function IntegrationForm({</div>)}{installed && installMode && (- <div className="flex flex-col gap-1 rounded-md border border-border bg-muted/40 px-3 py-2">+ <div className="flex flex-col gap-1 rounded-md border border-border bg-muted/40 px-3 py-2 compact:border-0 compact:p-0 compact:rounded-none compact:bg-transparent"><div className="flex items-center gap-2"><Badge variant="secondary">{installMode.label}</Badge>{installMode.detail && (diff --git a/apps/erp/app/modules/settings/ui/ItarCertifications/ItarCertificationsTable.tsx b/apps/erp/app/modules/settings/ui/ItarCertifications/ItarCertificationsTable.tsxindex 8ecc141cda..08faa0c86e 100644--- a/apps/erp/app/modules/settings/ui/ItarCertifications/ItarCertificationsTable.tsx+++ b/apps/erp/app/modules/settings/ui/ItarCertifications/ItarCertificationsTable.tsx@@ -43,13 +43,13 @@ const ItarCertificationsTable = memo(accessorKey: "name",header: t`Name`,cell: (item) => item.getValue() ?? dash,- meta: { icon: <LuUser /> }+ meta: { mobile: "P1", icon: <LuUser /> }},{accessorKey: "email",header: t`Email`,cell: (item) => item.getValue() ?? dash,- meta: { icon: <LuMail /> }+ meta: { mobile: "P3", icon: <LuMail /> }},{accessorKey: "lastLogin",@@ -64,7 +64,7 @@ const ItarCertificationsTable = memo(accessorKey: "certVersion",header: t`Cert Version`,cell: ({ row }) => row.original.certVersion ?? t`Not certified`,- meta: { icon: <LuBadgeCheck /> }+ meta: { mobile: "P2", icon: <LuBadgeCheck /> }},{accessorKey: "certifiedAt",diff --git a/apps/erp/app/modules/settings/ui/Printing/AssignmentsCard.tsx b/apps/erp/app/modules/settings/ui/Printing/AssignmentsCard.tsxindex 4f47e5c2dd..5486b7b2d3 100644--- a/apps/erp/app/modules/settings/ui/Printing/AssignmentsCard.tsx+++ b/apps/erp/app/modules/settings/ui/Printing/AssignmentsCard.tsx@@ -16,6 +16,7 @@ import {CardHeader,CardTitle,Combobox,+ cn,Switch,toast} from "@carbon/react";@@ -302,9 +303,13 @@ function AssignmentRow({return (<div- className={`flex items-center justify-between py-2.5 ${isIndented ? "pl-7" : ""} ${!isBold ? "border-t border-border/50" : ""}`}+ className={cn(+ "flex items-center justify-between py-2.5 compact:flex-col compact:items-stretch compact:gap-2",+ isIndented && "pl-7",+ !isBold && "border-t border-border/50"+ )}>- <div className="flex items-center gap-2">+ <div className="flex items-center gap-2 compact:min-w-0"><div className="size-7 bg-muted rounded-lg flex items-center justify-center shrink-0"><span className="size-4 text-muted-foreground">{icon}</span></div>@@ -315,8 +320,8 @@ function AssignmentRow({</span></div>- <div className="flex items-center gap-4">- <div className="w-[320px]">+ <div className="flex items-center gap-4 compact:w-full compact:justify-between">+ <div className="w-[320px] compact:w-auto compact:flex-1 compact:min-w-0"><Comboboxsize="sm"value={printerRouteId ?? ""}@@ -327,7 +332,7 @@ function AssignmentRow({/></div>- <div className="flex items-center gap-1.5">+ <div className="flex items-center gap-1.5 compact:shrink-0"><Switchvariant="small"checked={autoPrint}diff --git a/apps/erp/app/modules/settings/ui/Printing/PrintJobsTable.tsx b/apps/erp/app/modules/settings/ui/Printing/PrintJobsTable.tsxindex ec3eb195c8..b3d505fca1 100644--- a/apps/erp/app/modules/settings/ui/Printing/PrintJobsTable.tsx+++ b/apps/erp/app/modules/settings/ui/Printing/PrintJobsTable.tsx@@ -276,6 +276,7 @@ const PrintJobsTable = memo(({ jobs, count }: PrintJobsTableProps) => {);},meta: {+ mobile: "P2",filter: {type: "static",options: [@@ -297,6 +298,7 @@ const PrintJobsTable = memo(({ jobs, count }: PrintJobsTableProps) => {</div>),meta: {+ mobile: "P1",icon: <LuFileText />}},@@ -369,6 +371,7 @@ const PrintJobsTable = memo(({ jobs, count }: PrintJobsTableProps) => {</span>),meta: {+ mobile: "P3",icon: <LuCalendar />}}diff --git a/apps/erp/app/modules/settings/ui/Printing/PrintersCard.tsx b/apps/erp/app/modules/settings/ui/Printing/PrintersCard.tsxindex 8cc4130ea2..e9b6cf93a3 100644--- a/apps/erp/app/modules/settings/ui/Printing/PrintersCard.tsx+++ b/apps/erp/app/modules/settings/ui/Printing/PrintersCard.tsx@@ -88,7 +88,7 @@ export function PrintersCard({return (<><Card>- <HStack className="w-full justify-between items-start">+ <HStack className="w-full justify-between items-start compact:flex-col compact:items-stretch compact:gap-0"><CardHeader><CardTitle><Trans>Printers</Trans>@@ -97,7 +97,7 @@ export function PrintersCard({<Trans>Physical printers available for assignment.</Trans></CardDescription></CardHeader>- <CardAction className="py-6">+ <CardAction className="py-6 compact:pt-0 compact:pb-4 compact:px-4"><ButtonleftIcon={<LuPlus />}onClick={() => {diff --git a/apps/erp/app/modules/settings/ui/Sequences/SequencesTable.tsx b/apps/erp/app/modules/settings/ui/Sequences/SequencesTable.tsxindex 167f2d2cf0..367f4d423d 100644--- a/apps/erp/app/modules/settings/ui/Sequences/SequencesTable.tsx+++ b/apps/erp/app/modules/settings/ui/Sequences/SequencesTable.tsx@@ -41,6 +41,7 @@ const SequencesTable = memo(({ data, count }: SequencesTableProps) => {<Hyperlink to={row.original.table}>{row.original.name}</Hyperlink>),meta: {+ mobile: "P1",icon: <LuText />}},@@ -49,6 +50,7 @@ const SequencesTable = memo(({ data, count }: SequencesTableProps) => {header: t`Prefix`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",icon: <LuTextCursor />}},@@ -57,6 +59,7 @@ const SequencesTable = memo(({ data, count }: SequencesTableProps) => {header: t`Current`,cell: (item) => item.getValue(),meta: {+ mobile: "P2",icon: <LuArrowRight />}},diff --git a/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequencesTable.tsx b/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequencesTable.tsxindex 76ced05b19..d8fc386af7 100644--- a/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequencesTable.tsx+++ b/apps/erp/app/modules/settings/ui/SerialNumbers/ItemSerialSequencesTable.tsx@@ -48,6 +48,7 @@ const ItemSerialSequencesTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuPackage />,filter: {type: "static",@@ -63,6 +64,7 @@ const ItemSerialSequencesTable = memo(header: t`Name`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",icon: <LuText />}},@@ -71,6 +73,7 @@ const ItemSerialSequencesTable = memo(header: t`Prefix`,cell: (item) => item.getValue(),meta: {+ mobile: "P2",icon: <LuTextCursor />}},diff --git a/apps/erp/app/modules/settings/ui/Webhooks/WebhooksTable.tsx b/apps/erp/app/modules/settings/ui/Webhooks/WebhooksTable.tsxindex 00cf6458e1..762cf4c676 100644--- a/apps/erp/app/modules/settings/ui/Webhooks/WebhooksTable.tsx+++ b/apps/erp/app/modules/settings/ui/Webhooks/WebhooksTable.tsx@@ -89,6 +89,7 @@ const WebhooksTable = memo(({ data, count }: WebhooksTableProps) => {</div>),meta: {+ mobile: "P1",icon: <LuTag />}},@@ -116,6 +117,7 @@ const WebhooksTable = memo(({ data, count }: WebhooksTableProps) => {</div>),meta: {+ mobile: "P3",icon: <LuDatabase />,filter: {type: "static",@@ -133,6 +135,7 @@ const WebhooksTable = memo(({ data, count }: WebhooksTableProps) => {/>),meta: {+ mobile: "P2",icon: <LuPercent />}},diff --git a/apps/erp/app/modules/users/ui/Customers/CustomerAccountsTable.tsx b/apps/erp/app/modules/users/ui/Customers/CustomerAccountsTable.tsxindex 8cba18efef..82bf2926c6 100644--- a/apps/erp/app/modules/users/ui/Customers/CustomerAccountsTable.tsx+++ b/apps/erp/app/modules/users/ui/Customers/CustomerAccountsTable.tsx@@ -120,6 +120,7 @@ const CustomerAccountsTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuUser />}},@@ -153,6 +154,7 @@ const CustomerAccountsTable = memo(header: t`Customer`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",icon: <LuSquareUser />,filter: {type: "static",@@ -186,6 +188,7 @@ const CustomerAccountsTable = memo(header: t`Active`,cell: (item) => <Checkbox isChecked={item.getValue<boolean>()} />,meta: {+ mobile: "P2",icon: <LuUserCheck />,filter: {type: "static",diff --git a/apps/erp/app/modules/users/ui/EmployeeTypes/EmployeeTypesTable.ee.tsx b/apps/erp/app/modules/users/ui/EmployeeTypes/EmployeeTypesTable.ee.tsxindex 0d0ed6fdd1..fceaaa8040 100644--- a/apps/erp/app/modules/users/ui/EmployeeTypes/EmployeeTypesTable.ee.tsx+++ b/apps/erp/app/modules/users/ui/EmployeeTypes/EmployeeTypesTable.ee.tsx@@ -38,6 +38,7 @@ const EmployeeTypesTable = memo(({ data, count }: EmployeeTypesTableProps) => {),meta: {+ mobile: "P1",icon: <LuUsers />}}diff --git a/apps/erp/app/modules/users/ui/Employees/EmployeesTable.tsx b/apps/erp/app/modules/users/ui/Employees/EmployeesTable.tsxindex c55563a2f6..4515ee4fc0 100644--- a/apps/erp/app/modules/users/ui/Employees/EmployeesTable.tsx+++ b/apps/erp/app/modules/users/ui/Employees/EmployeesTable.tsx@@ -121,6 +121,7 @@ const EmployeesTable = memo(),meta: {+ mobile: "P1",icon: <LuUser />}},@@ -156,6 +157,7 @@ const EmployeesTable = memo(return email;},meta: {+ mobile: "P3",icon: <LuMail />}},@@ -170,6 +172,7 @@ const EmployeesTable = memo(/>),meta: {+ mobile: "P2",filter: {type: "static",options: employeeTypes.map((type) => ({@@ -194,6 +197,7 @@ const EmployeesTable = memo(return <Badge variant="secondary">{t`Inactive`}</Badge>;},meta: {+ mobile: "P2",filter: {type: "static",options: [diff --git a/apps/erp/app/modules/users/ui/Groups/GroupsTable.tsx b/apps/erp/app/modules/users/ui/Groups/GroupsTable.tsxindex 170849785b..b2056257b3 100644--- a/apps/erp/app/modules/users/ui/Groups/GroupsTable.tsx+++ b/apps/erp/app/modules/users/ui/Groups/GroupsTable.tsx@@ -63,6 +63,7 @@ const GroupsTable = memo(({ data, count }: GroupsTableProps) => {</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -90,6 +91,7 @@ const GroupsTable = memo(({ data, count }: GroupsTableProps) => {</AvatarGroup>),meta: {+ mobile: "P3",icon: <LuUsers />}}diff --git a/apps/erp/app/modules/users/ui/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx b/apps/erp/app/modules/users/ui/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsxindex a6fe6bb215..294518774d 100644--- a/apps/erp/app/modules/users/ui/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx+++ b/apps/erp/app/modules/users/ui/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx@@ -117,6 +117,7 @@ const SupplierAccountsTable = memo(</HStack>),meta: {+ mobile: "P1",icon: <LuUser />}},@@ -150,6 +151,7 @@ const SupplierAccountsTable = memo(header: t`Supplier`,cell: (item) => item.getValue(),meta: {+ mobile: "P3",icon: <LuContainer />,filter: {type: "static",@@ -183,6 +185,7 @@ const SupplierAccountsTable = memo(header: t`Active`,cell: (item) => <Checkbox isChecked={item.getValue<boolean>()} />,meta: {+ mobile: "P2",icon: <LuUserCheck />,filter: {type: "static",diff --git a/apps/erp/app/modules/workflows/ui/Builder/BuilderControls.tsx b/apps/erp/app/modules/workflows/ui/Builder/BuilderControls.tsxindex f5b96188cd..0d0fec9704 100644--- a/apps/erp/app/modules/workflows/ui/Builder/BuilderControls.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/BuilderControls.tsx@@ -121,7 +121,7 @@ export function BuilderControls({ panOnScroll, onTogglePanOnScroll }: Props) {<MiniMappannablezoomable- className="!static !m-0 rounded-lg border shadow-sm"+ className="!static !m-0 rounded-lg border shadow-sm compact:!hidden"style={{ width: 180, height: 120 }}/></Panel>diff --git a/apps/erp/app/modules/workflows/ui/Builder/BuilderHeader.tsx b/apps/erp/app/modules/workflows/ui/Builder/BuilderHeader.tsxindex 25cc6a8eab..205abb8500 100644--- a/apps/erp/app/modules/workflows/ui/Builder/BuilderHeader.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/BuilderHeader.tsx@@ -15,6 +15,7 @@ import {Tooltip,TooltipContent,TooltipTrigger,+ useCompact,useDisclosure} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";@@ -22,6 +23,11 @@ import { useEffect, useRef, useState } from "react";import { LuLock, LuPencil } from "react-icons/lu";import { useFetcher } from "react-router";import { VersionMenu } from "~/components";+import {+ RecordAction,+ RecordHero,+ RecordPhoneChrome+} from "~/components/Layout/RecordHeader";import { usePermissions } from "~/hooks";import { path } from "~/utils/path";import type {@@ -58,7 +64,14 @@ function SaveMarker() {// Renaming is a property of the workflow, not of the version being viewed, so a// published (read-only) version is still renameable — only the permission gates it.-function WorkflowTitle({ workflow }: { workflow: WorkflowDetail }) {+// `inHero`: the phone hero wraps the title in its own h1 and sets its size.+function WorkflowTitle({+ workflow,+ inHero = false+}: {+ workflow: WorkflowDetail;+ inHero?: boolean;+}) {const { t } = useLingui();const permissions = usePermissions();const fetcher = useFetcher<{ success: boolean }>();@@ -69,6 +82,10 @@ function WorkflowTitle({ workflow }: { workflow: WorkflowDetail }) {// Show the in-flight name so the title never flickers back before revalidation.const pending = fetcher.formData?.get("name");const name = typeof pending === "string" && pending ? pending : workflow.name;+ const Heading = inHero ? "span" : "h1";+ const headingClassName = inHero+ ? "truncate"+ : "truncate text-sm font-semibold";function commit(raw: string) {if (settled.current) return;@@ -90,7 +107,7 @@ function WorkflowTitle({ workflow }: { workflow: WorkflowDetail }) {}if (!permissions.can("update", "workflows")) {- return <h1 className="truncate text-sm font-semibold">{name}</h1>;+ return <Heading className={headingClassName}>{name}</Heading>;}if (isEditing) {@@ -98,7 +115,11 @@ function WorkflowTitle({ workflow }: { workflow: WorkflowDetail }) {<inputautoFocusaria-label={t`Workflow name`}- className="w-64 max-w-full bg-transparent text-sm font-semibold focus:outline-none"+ className={+ inHero+ ? "w-full bg-transparent font-semibold focus:outline-none"+ : "w-64 max-w-full bg-transparent text-sm font-semibold focus:outline-none"+ }defaultValue={name}onFocus={(e) => e.currentTarget.select()}onBlur={(e) => commit(e.currentTarget.value)}@@ -126,8 +147,8 @@ function WorkflowTitle({ workflow }: { workflow: WorkflowDetail }) {setIsEditing(true);}}>- <h1 className="truncate text-sm font-semibold">{name}</h1>- <LuPencil className="size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/title:opacity-100" />+ <Heading className={headingClassName}>{name}</Heading>+ <LuPencil className="size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/title:opacity-100 compact:size-4 compact:opacity-100" /></button>);}@@ -146,6 +167,7 @@ export function BuilderHeader({const isVersionLocked = useBuilderStore((state) => state.isVersionLocked);const canEdit = useBuilderStore((state) => state.canEdit);const isReadOnly = isVersionLocked || !canEdit;+ const isCompact = useCompact();const publishFetcher = useFetcher<{ok?: boolean;@@ -178,125 +200,158 @@ export function BuilderHeader({});};- return (- <header className="flex h-[var(--topbar-height)] shrink-0 items-center gap-3 border-b px-4">- <WorkflowTitle workflow={workflow} />-- {isReadOnly && (- <Tooltip>- <TooltipTrigger asChild>- <span className="text-muted-foreground">- <LuLock className="size-3.5" />- </span>- </TooltipTrigger>- <TooltipContent>- {isPublishedVersion ? (- <Trans>- This version is published. Create a new version to edit.- </Trans>- ) : (- <Trans>You do not have permission to edit workflows</Trans>- )}- </TooltipContent>- </Tooltip>- )}-- <div className="ml-auto flex items-center gap-2">- <SaveMarker />- <VersionMenu- versions={versions}- currentVersionId={versionId}- getKey={(v) => v.id}- getHref={(v) => `${path.to.workflow(workflow.id)}?version=${v.id}`}- label={current && <span>Version {current.versionNumber}</span>}- renderLabel={(v) => <span>Version {v.versionNumber}</span>}- renderStatus={(v) => (- <WorkflowVersionStatus- isPublished={v.id === workflow.publishedVersionId}- />- )}- onNewVersion={- permissions.can("create", "workflows")- ? () => {- const formData = new FormData();- formData.set("copyFromVersionId", versionId);- versionFetcher.submit(formData, {- method: "post",- action: path.to.workflowVersionNew(workflow.id)- });- }- : undefined- }- />+ const lockIndicator = (+ <Tooltip>+ <TooltipTrigger asChild>+ <span className="text-muted-foreground">+ <LuLock className="size-3.5" />+ </span>+ </TooltipTrigger>+ <TooltipContent>{isPublishedVersion ? (- <Button- variant="secondary"- isDisabled={!permissions.can("update", "workflows")}- onClick={confirmUnpublish.onOpen}- >- <Trans>Unpublish</Trans>- </Button>+ <Trans>+ This version is published. Create a new version to edit.+ </Trans>) : (- <Button- isDisabled={- !permissions.can("update", "workflows") ||- publishFetcher.state !== "idle"- }- isLoading={publishFetcher.state !== "idle"}- onClick={() => {- // Replacing a published version is worth asking about; a first publish is not.- if (published) confirmPublish.onOpen();- else publish();- }}- >- <Trans>Publish</Trans>- </Button>+ <Trans>You do not have permission to edit workflows</Trans>)}- </div>+ </TooltipContent>+ </Tooltip>+ );- {confirmUnpublish.isOpen && (- <ConfirmUnpublishWorkflow- workflowId={workflow.id}- name={workflow.name}- onClose={confirmUnpublish.onClose}- />- )}+ return (+ <>+ <RecordHero+ title={<WorkflowTitle workflow={workflow} inHero />}+ status={+ <>+ {isReadOnly && lockIndicator}+ <SaveMarker />+ </>+ }+ />+ <RecordPhoneChrome />+ <header className="flex h-[var(--topbar-height)] shrink-0 items-center gap-3 border-b px-4 compact:hidden">+ {/* One title on phones: its rename input lives in the hero there. */}+ {!isCompact && <WorkflowTitle workflow={workflow} />}- {/* Hand-rolled rather than `Confirm`: publish posts `versionId` and reads the returned- issues back off its own fetcher to outline the failing nodes. */}- {confirmPublish.isOpen && current && published && (- <Modal- open- onOpenChange={(open) => {- if (!open) confirmPublish.onClose();- }}- >- <ModalOverlay />- <ModalContent>- <ModalHeader>- <ModalTitle>{t`Publish Version ${current.versionNumber}?`}</ModalTitle>- </ModalHeader>- <ModalBody>- <p className="text-sm text-muted-foreground">- {t`Version ${published.versionNumber} is published now and will be replaced.`}- </p>- </ModalBody>- <ModalFooter>- <Button variant="secondary" onClick={confirmPublish.onClose}>- <Trans>Cancel</Trans>+ {isReadOnly && lockIndicator}++ <div className="ml-auto flex items-center gap-2">+ <SaveMarker />+ <RecordAction slot="overflow">+ <VersionMenu+ versions={versions}+ currentVersionId={versionId}+ getKey={(v) => v.id}+ getHref={(v) =>+ `${path.to.workflow(workflow.id)}?version=${v.id}`+ }+ label={+ current && (+ <span>+ <Trans>Version {current.versionNumber}</Trans>+ </span>+ )+ }+ renderLabel={(v) => (+ <span>+ <Trans>Version {v.versionNumber}</Trans>+ </span>+ )}+ renderStatus={(v) => (+ <WorkflowVersionStatus+ isPublished={v.id === workflow.publishedVersionId}+ />+ )}+ onNewVersion={+ permissions.can("create", "workflows")+ ? () => {+ const formData = new FormData();+ formData.set("copyFromVersionId", versionId);+ versionFetcher.submit(formData, {+ method: "post",+ action: path.to.workflowVersionNew(workflow.id)+ });+ }+ : undefined+ }+ />+ </RecordAction>+ {isPublishedVersion ? (+ <RecordAction slot="primary">+ <Button+ variant="secondary"+ isDisabled={!permissions.can("update", "workflows")}+ onClick={confirmUnpublish.onOpen}+ >+ <Trans>Unpublish</Trans></Button>+ </RecordAction>+ ) : (+ <RecordAction slot="primary"><Button+ isDisabled={+ !permissions.can("update", "workflows") ||+ publishFetcher.state !== "idle"+ }+ isLoading={publishFetcher.state !== "idle"}onClick={() => {- confirmPublish.onClose();- publish();+ // Replacing a published version is worth asking about; a first publish is not.+ if (published) confirmPublish.onOpen();+ else publish();}}><Trans>Publish</Trans></Button>- </ModalFooter>- </ModalContent>- </Modal>- )}- </header>+ </RecordAction>+ )}+ </div>++ {confirmUnpublish.isOpen && (+ <ConfirmUnpublishWorkflow+ workflowId={workflow.id}+ name={workflow.name}+ onClose={confirmUnpublish.onClose}+ />+ )}++ {/* Hand-rolled rather than `Confirm`: publish posts `versionId` and reads the returned+ issues back off its own fetcher to outline the failing nodes. */}+ {confirmPublish.isOpen && current && published && (+ <Modal+ open+ onOpenChange={(open) => {+ if (!open) confirmPublish.onClose();+ }}+ >+ <ModalOverlay />+ <ModalContent>+ <ModalHeader>+ <ModalTitle>{t`Publish Version ${current.versionNumber}?`}</ModalTitle>+ </ModalHeader>+ <ModalBody>+ <p className="text-sm text-muted-foreground">+ {t`Version ${published.versionNumber} is published now and will be replaced.`}+ </p>+ </ModalBody>+ <ModalFooter>+ <Button variant="secondary" onClick={confirmPublish.onClose}>+ <Trans>Cancel</Trans>+ </Button>+ <Button+ onClick={() => {+ confirmPublish.onClose();+ publish();+ }}+ >+ <Trans>Publish</Trans>+ </Button>+ </ModalFooter>+ </ModalContent>+ </Modal>+ )}+ </header>+ </>);}diff --git a/apps/erp/app/modules/workflows/ui/Builder/NodeCard.tsx b/apps/erp/app/modules/workflows/ui/Builder/NodeCard.tsxindex 37e29af1e4..15d79a6d27 100644--- a/apps/erp/app/modules/workflows/ui/Builder/NodeCard.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/NodeCard.tsx@@ -124,6 +124,8 @@ export function NodeCard({<divclassName={cn("relative rounded-lg border bg-card shadow-sm transition-[box-shadow,opacity]",+ // Phones: a card is at most the screen wide, whatever its inline width.+ "compact:max-w-[calc(100vw-32px)]",isSelected && "border-primary ring-2 ring-primary/20",connectionState === "compatible" &&"border-primary ring-2 ring-primary/40",diff --git a/apps/erp/app/modules/workflows/ui/Builder/NodePalette.tsx b/apps/erp/app/modules/workflows/ui/Builder/NodePalette.tsxindex f2a358e215..e2ca4e19fe 100644--- a/apps/erp/app/modules/workflows/ui/Builder/NodePalette.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/NodePalette.tsx@@ -6,11 +6,16 @@ import { NODE_DRAG_TYPE } from "./constants";import { useBuilderStore } from "./context";import { NODE_KIND_META, NODE_KIND_ORDER } from "./nodes/meta";-export function NodePalette() {+type NodePaletteProps = {+ /** Called after a step is added by tap (the phone sheet closes on it). */+ onAdd?: () => void;+};++export function NodePalette({ onAdd }: NodePaletteProps = {}) {const addNode = useBuilderStore((state) => state.addNode);return (- <aside className="flex h-full flex-col gap-1 overflow-y-auto border-r bg-card p-2">+ <aside className="flex h-full flex-col gap-1 overflow-y-auto border-r bg-card p-2 compact:border-r-0 compact:bg-transparent compact:p-0">{NODE_KIND_ORDER.map((type) => {const meta = NODE_KIND_META[type];@@ -23,18 +28,21 @@ export function NodePalette() {event.dataTransfer.setData(NODE_DRAG_TYPE, type);event.dataTransfer.effectAllowed = "move";}}- onClick={() => addNode(type)}- className="flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent active:scale-[0.96]"+ onClick={() => {+ addNode(type);+ onAdd?.();+ }}+ className="flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent active:scale-[0.96] compact:min-h-11 compact:items-center compact:gap-3 compact:py-2"><div className="flex size-7 shrink-0 items-center justify-center rounded-md bg-primary text-primary-foreground"><meta.Icon className="size-3.5" /></div>- <div className="min-w-0 flex-1 pt-0.5">- <div className="text-xs font-medium leading-none">+ <div className="min-w-0 flex-1 pt-0.5 compact:pt-0">+ <div className="text-xs font-medium leading-none compact:text-[15px] compact:leading-tight">{meta.name}</div>{meta.description && (- <div className="mt-0.5 truncate text-[10px] leading-snug text-muted-foreground">+ <div className="mt-0.5 truncate text-[10px] leading-snug text-muted-foreground compact:text-[13px]">{meta.description}</div>)}diff --git a/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunPanel.tsx b/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunPanel.tsxindex 3e4f46b4ef..7a10e65b8f 100644--- a/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunPanel.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunPanel.tsx@@ -51,15 +51,16 @@ export function TestRunPanel() {result !== null && result.error !== null && !result.steps.length;return (- <div className="flex h-full flex-col border-l border-border">- <div className="flex items-center gap-2 border-b border-border p-3">+ <div className="flex h-full flex-col border-l border-border compact:border-l-0">+ {/* Phones show this panel in a full-screen sheet, whose own × closes it. */}+ <div className="flex items-center gap-2 border-b border-border p-3 compact:min-h-11 compact:pr-14"><span className="text-sm font-semibold"><Trans>Test run</Trans></span>{result && <RunStatus status={result.status} />}<IconButtonaria-label={t`Close`}- className="ml-auto"+ className="ml-auto compact:hidden"icon={<LuX />}size="sm"variant="ghost"diff --git a/apps/erp/app/modules/workflows/ui/Builder/WorkflowBuilder.tsx b/apps/erp/app/modules/workflows/ui/Builder/WorkflowBuilder.tsxindex 1a42bbd6c0..aca941340d 100644--- a/apps/erp/app/modules/workflows/ui/Builder/WorkflowBuilder.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/WorkflowBuilder.tsx@@ -4,10 +4,18 @@import type { WorkflowNodeType } from "@carbon/ee/workflows";import {+ BottomSheet,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle,+ IconButton,ResizableHandle,ResizablePanel,- ResizablePanelGroup+ ResizablePanelGroup,+ useCompact} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";import type { IsValidConnection } from "@xyflow/react";import {Background,@@ -16,7 +24,9 @@ import {useReactFlow} from "@xyflow/react";import type { KeyboardEvent } from "react";-import { useCallback } from "react";+import { useCallback, useState } from "react";+import { LuPlus } from "react-icons/lu";+import { AppBarActions } from "~/components/Layout/Mobile";import type { BuilderEdge, BuilderNode } from "../../types";import type { WorkflowCanvasState } from "../../workflows.models";import { BuilderControls } from "./BuilderControls";@@ -48,6 +58,9 @@ export function WorkflowBuilder({canvasState,canPersistCanvasState}: Props) {+ const { t } = useLingui();+ const isCompact = useCompact();+ const [paletteOpen, setPaletteOpen] = useState(false);const store = useBuilderStoreApi();const { screenToFlowPosition } = useReactFlow();const { panOnScroll, togglePanOnScroll, onMoveEnd, initialViewport } =@@ -72,6 +85,8 @@ export function WorkflowBuilder({const onConnect = useBuilderStore((state) => state.onConnect);const setSelected = useBuilderStore((state) => state.setSelected);const addNode = useBuilderStore((state) => state.addNode);+ const setTestRunResult = useBuilderStore((state) => state.setTestRunResult);+ const setTestRunStatus = useBuilderStore((state) => state.setTestRunStatus);const isValidConnection = useCallback<IsValidConnection>((connection) => {@@ -115,6 +130,108 @@ export function WorkflowBuilder({}}, []);+ const canvas = (+ <div+ className="relative h-full"+ onKeyDown={onKeyDown}+ onDrop={onDrop}+ onDragOver={(event) => {+ event.preventDefault();+ event.dataTransfer.dropEffect = "move";+ }}+ >+ <ReactFlow<BuilderNode, BuilderEdge>+ nodes={nodes}+ edges={edges}+ onNodesChange={onNodesChange}+ onEdgesChange={onEdgesChange}+ onConnect={onConnect}+ isValidConnection={isValidConnection}+ onNodeClick={(_, node) => setSelected(node.id)}+ onPaneClick={() => setSelected(null)}+ nodeTypes={nodeTypes}+ edgeTypes={edgeTypes}+ proOptions={proOptions}+ minZoom={0.25}+ maxZoom={2}+ fitViewOptions={FIT_VIEW_OPTIONS}+ {...(initialViewport+ ? { defaultViewport: initialViewport }+ : { fitView: true })}+ onMoveEnd={onMoveEnd}+ nodesDraggable={canMoveNodes}+ nodesConnectable={!isReadOnly}+ elementsSelectable+ // Delete only. Backspace is too easy to hit by accident, and there+ // is no undo — autosave persists the deletion a second later.+ deleteKeyCode={isReadOnly ? null : ["Delete"]}+ onlyRenderVisibleElements+ defaultEdgeOptions={{ type: "workflow" }}+ panOnScroll={panOnScroll}+ zoomOnScroll={!panOnScroll}+ >+ <Background variant={BackgroundVariant.Dots} gap={24} size={1} />+ <BuilderControls+ panOnScroll={panOnScroll}+ onTogglePanOnScroll={togglePanOnScroll}+ />+ </ReactFlow>+ </div>+ );++ // Phones: the canvas fills the page. The palette opens from the app bar +,+ // and a test run's result opens as a full-screen sheet; closing it discards+ // the result, as the desktop panel's close does.+ if (isCompact) {+ return (+ <div className="flex-1 overflow-hidden">+ {canvas}+ {!isReadOnly && (+ <>+ <AppBarActions>+ <IconButton+ aria-label={t`Add step`}+ icon={<LuPlus />}+ variant="ghost"+ size="lg"+ onClick={() => setPaletteOpen(true)}+ />+ </AppBarActions>+ <BottomSheet open={paletteOpen} onOpenChange={setPaletteOpen}>+ <BottomSheetContent>+ <BottomSheetHeader>+ <BottomSheetTitle>+ <Trans>Add step</Trans>+ </BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody>+ <NodePalette onAdd={() => setPaletteOpen(false)} />+ </BottomSheetBody>+ </BottomSheetContent>+ </BottomSheet>+ </>+ )}+ <BottomSheet+ open={showResults}+ onOpenChange={(open) => {+ if (open) return;+ setTestRunResult(null);+ setTestRunStatus("idle");+ }}+ >+ <BottomSheetContent size="full">+ <BottomSheetTitle className="sr-only">+ <Trans>Test run</Trans>+ </BottomSheetTitle>+ <div className="min-h-0 flex-1">+ <TestRunPanel />+ </div>+ </BottomSheetContent>+ </BottomSheet>+ </div>+ );+ }+return (<ResizablePanelGroupdirection="horizontal"@@ -134,52 +251,7 @@ export function WorkflowBuilder({)}{!isReadOnly && <ResizableHandle withHandle />}<ResizablePanel id="canvas" order={2} defaultSize={62} minSize={30}>- <div- className="relative h-full"- onKeyDown={onKeyDown}- onDrop={onDrop}- onDragOver={(event) => {- event.preventDefault();- event.dataTransfer.dropEffect = "move";- }}- >- <ReactFlow<BuilderNode, BuilderEdge>- nodes={nodes}- edges={edges}- onNodesChange={onNodesChange}- onEdgesChange={onEdgesChange}- onConnect={onConnect}- isValidConnection={isValidConnection}- onNodeClick={(_, node) => setSelected(node.id)}- onPaneClick={() => setSelected(null)}- nodeTypes={nodeTypes}- edgeTypes={edgeTypes}- proOptions={proOptions}- minZoom={0.25}- maxZoom={2}- fitViewOptions={FIT_VIEW_OPTIONS}- {...(initialViewport- ? { defaultViewport: initialViewport }- : { fitView: true })}- onMoveEnd={onMoveEnd}- nodesDraggable={canMoveNodes}- nodesConnectable={!isReadOnly}- elementsSelectable- // Delete only. Backspace is too easy to hit by accident, and there- // is no undo — autosave persists the deletion a second later.- deleteKeyCode={isReadOnly ? null : ["Delete"]}- onlyRenderVisibleElements- defaultEdgeOptions={{ type: "workflow" }}- panOnScroll={panOnScroll}- zoomOnScroll={!panOnScroll}- >- <Background variant={BackgroundVariant.Dots} gap={24} size={1} />- <BuilderControls- panOnScroll={panOnScroll}- onTogglePanOnScroll={togglePanOnScroll}- />- </ReactFlow>- </div>+ {canvas}</ResizablePanel>{showResults && <ResizableHandle withHandle />}{showResults && (diff --git a/apps/erp/app/modules/workflows/ui/Builder/config/InlineNodeName.tsx b/apps/erp/app/modules/workflows/ui/Builder/config/InlineNodeName.tsxindex 15af068044..1e7328b5e8 100644--- a/apps/erp/app/modules/workflows/ui/Builder/config/InlineNodeName.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/config/InlineNodeName.tsx@@ -100,7 +100,7 @@ export function InlineNodeName({ name, isReadOnly, isTaken, onCommit }: Props) {<span className="truncate text-xs font-semibold">{nodeNameLabel(name)}</span>- <LuPencil className="size-2.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/name:opacity-100" />+ <LuPencil className="size-2.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/name:opacity-100 compact:opacity-100" /></button></div>);diff --git a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunDetail.tsx b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunDetail.tsxindex d2b2437ff9..9455b5cb24 100644--- a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunDetail.tsx+++ b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunDetail.tsx@@ -57,7 +57,7 @@ function RunIdentifiers({ run }: { run: WorkflowRunDetailType }) {<div className="space-y-1"><buttontype="button"- className="text-xs text-muted-foreground underline underline-offset-2"+ className="text-xs text-muted-foreground underline underline-offset-2 compact:hit-area"onClick={() => setRaw((p) => !p)}>{raw ? t`Hide raw` : t`Show raw`}diff --git a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunSteps.tsx b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunSteps.tsxindex 368505936e..d1c212b525 100644--- a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunSteps.tsx+++ b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunSteps.tsx@@ -176,7 +176,7 @@ function StepRow({<div className="border-b border-border/50"><buttontype="button"- className="w-full flex items-center gap-3 py-3 px-3 hover:bg-muted/50 transition-colors text-left"+ className="w-full flex items-center gap-3 py-3 px-3 hover:bg-muted/50 transition-colors text-left compact:flex-wrap compact:gap-y-1"onClick={() => hasDetail && setExpanded((p) => !p)}disabled={!hasDetail}>@@ -215,7 +215,7 @@ function StepRow({<p className="text-xs text-muted-foreground">{step.statusReason}</p>)}</div>- <div className="ml-auto flex items-center gap-2 shrink-0">+ <div className="ml-auto flex items-center gap-2 shrink-0 compact:ml-0 compact:basis-full compact:pl-[52px]"><span className="text-xs text-muted-foreground tabular-nums">{durationLabel(step.durationMs)}</span>@@ -227,7 +227,7 @@ function StepRow({<div className="px-10 pb-3 space-y-3"><buttontype="button"- className="text-xs text-muted-foreground underline underline-offset-2"+ className="text-xs text-muted-foreground underline underline-offset-2 compact:hit-area"onClick={() => setRaw((p) => !p)}>{raw ? t`Show summary` : t`Show raw`}diff --git a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunsTable.tsx b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunsTable.tsxindex d686f34ef2..01421c4d9a 100644--- a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunsTable.tsx+++ b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunsTable.tsx@@ -56,7 +56,7 @@ const WorkflowRunsTable = memo(({ data, count }: WorkflowRunsTableProps) => {</HStack></Hyperlink>),- meta: { icon: <LuHash /> }+ meta: { mobile: "P1", icon: <LuHash /> }},{accessorKey: "workflowId",@@ -68,6 +68,7 @@ const WorkflowRunsTable = memo(({ data, count }: WorkflowRunsTableProps) => {</Hyperlink>),meta: {+ mobile: "P3",icon: <LuLink />,filterHeader: t`Workflow`,exportValue: (row: WorkflowRunListItem) =>@@ -123,7 +124,7 @@ const WorkflowRunsTable = memo(({ data, count }: WorkflowRunsTableProps) => {const ms = row.original.durationMs;return ms != null ? formatDurationMilliseconds(ms) : "—";},- meta: { icon: <LuClock /> }+ meta: { mobile: "P2", icon: <LuClock /> }},{accessorKey: "ownerId",diff --git a/apps/erp/app/modules/workflows/ui/WorkflowsTable.tsx b/apps/erp/app/modules/workflows/ui/WorkflowsTable.tsxindex 809c95b48f..c66451c15f 100644--- a/apps/erp/app/modules/workflows/ui/WorkflowsTable.tsx+++ b/apps/erp/app/modules/workflows/ui/WorkflowsTable.tsx@@ -34,6 +34,7 @@ import {import { useNavigate } from "react-router";import { EmployeeAvatar, Hyperlink, Table } from "~/components";import { ConfirmDelete } from "~/components/Modals";+import { NewAction } from "~/components/New";import { usePermissions } from "~/hooks";import { usePeople } from "~/stores";import { path } from "~/utils/path";@@ -74,7 +75,7 @@ const WorkflowsTable = memo({row.original.name}</Hyperlink>),- meta: { icon: <LuWorkflow /> }+ meta: { mobile: "P1", icon: <LuWorkflow /> }},{accessorKey: "description",@@ -93,7 +94,7 @@ const WorkflowsTable = memo(</Tooltip>);},- meta: { icon: <LuText /> }+ meta: { mobile: "P3", icon: <LuText /> }},{id: "status",@@ -107,6 +108,7 @@ const WorkflowsTable = memo();},meta: {+ mobile: "P2",icon: <LuBadgeCheck />,filterHeader: t`Status`,filter: {@@ -258,12 +260,14 @@ const WorkflowsTable = memo(count={count}primaryAction={permissions.can("create", "workflows") && (- <Button- leftIcon={<LuCirclePlus />}- onClick={newDisclosure.onOpen}- >- {t`New Workflow`}- </Button>+ <NewAction label={t`New Workflow`} onClick={newDisclosure.onOpen}>+ <Button+ leftIcon={<LuCirclePlus />}+ onClick={newDisclosure.onOpen}+ >+ {t`New Workflow`}+ </Button>+ </NewAction>)}renderContextMenu={renderContextMenu}diff --git a/apps/erp/app/root.tsx b/apps/erp/app/root.tsxindex d20d9ba4cf..d565c7f7de 100644--- a/apps/erp/app/root.tsx+++ b/apps/erp/app/root.tsx@@ -18,6 +18,7 @@ import { requestMiddleware } from "@carbon/logger/middleware.server";import { timedMiddleware } from "@carbon/logger/tracing.server";import { createInvalidationMiddleware } from "@carbon/query/cache";import {+ CompactProvider,OperatingSystemContextProvider,Toaster,TooltipProvider,@@ -27,6 +28,7 @@ import { RootErrorBoundary } from "@carbon/react/ErrorBoundary";import type { Theme } from "@carbon/utils";import {colorSchemeHintScript,+ getCompactHint,getPreferenceHeaders,isSearchParamOnlyNavigation,modeValidator,@@ -168,6 +170,7 @@ export async function loader({ request, context }: LoaderFunctionArgs) {XERO_CLIENT_ID},...getMode(request),+ compact: getCompactHint(request),preferences: getPreferenceHeaders(request),result: context.get(flashResultContext),theme: getTheme(request)@@ -252,10 +255,16 @@ export function Document({lang={lang}className={`${mode} h-full overflow-x-hidden`}style={themeStyle}+ // Opts the ERP into the `compact:` (phone) variant; MES does not set it.+ // CompactProvider below is the JS half of the same opt-in.+ data-compact-ui=""><head><meta charSet="utf-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />+ <meta+ name="viewport"+ content="width=device-width, initial-scale=1, viewport-fit=cover"+ />{/* Before any paint: records the OS color scheme for a `system` userand reloads once if the server rendered the wrong mode. */}<script@@ -327,24 +336,26 @@ export default function App() {return (<QueryClientProvider client={queryClient}><OperatingSystemContextProvider platform={prefs.platform}>- <LocaleProvider locale={appLanguage} catalog={catalog}>- <I18nProvider locale={prefs.locale}>- <TooltipProvider>- <MotionConfig reducedMotion="user">- <Document- mode={mode}- theme={theme}- lang={appLanguage}- env={env}- >- <Outlet />- {/* Renders nothing outside development; the package strips itself. */}- <ReactQueryDevtools buttonPosition="bottom-right" />- </Document>- </MotionConfig>- </TooltipProvider>- </I18nProvider>- </LocaleProvider>+ <CompactProvider initialCompact={loaderData?.compact ?? false}>+ <LocaleProvider locale={appLanguage} catalog={catalog}>+ <I18nProvider locale={prefs.locale}>+ <TooltipProvider>+ <MotionConfig reducedMotion="user">+ <Document+ mode={mode}+ theme={theme}+ lang={appLanguage}+ env={env}+ >+ <Outlet />+ {/* Renders nothing outside development; the package strips itself. */}+ <ReactQueryDevtools buttonPosition="bottom-right" />+ </Document>+ </MotionConfig>+ </TooltipProvider>+ </I18nProvider>+ </LocaleProvider>+ </CompactProvider></OperatingSystemContextProvider></QueryClientProvider>);diff --git a/apps/erp/app/routes/share+/customer.$id.tsx b/apps/erp/app/routes/share+/customer.$id.tsxindex 92ea8115fb..418d5f9451 100644--- a/apps/erp/app/routes/share+/customer.$id.tsx+++ b/apps/erp/app/routes/share+/customer.$id.tsx@@ -204,6 +204,7 @@ export default function CustomerPortal() {</div>),meta: {+ mobile: "P1",icon: <LuBookMarked />}},@@ -226,6 +227,7 @@ export default function CustomerPortal() {);},meta: {+ mobile: "P2",filter: {type: "static",options: salesOrderStatusType.map((status) => ({@@ -271,6 +273,7 @@ export default function CustomerPortal() {{accessorKey: "promisedDate",header: "Due Date",+ meta: { mobile: "P2" },cell: ({ row }) => (<DateTimevalue={@@ -285,6 +288,7 @@ export default function CustomerPortal() {{accessorKey: "readableId",header: "Part Number",+ meta: { mobile: "P3" },cell: ({ row }) => row.original.readableId},{diff --git a/apps/erp/app/routes/x+/_index.tsx b/apps/erp/app/routes/x+/_index.tsxindex e0f13f8357..5957ee99c3 100644--- a/apps/erp/app/routes/x+/_index.tsx+++ b/apps/erp/app/routes/x+/_index.tsx@@ -45,7 +45,7 @@ import {} from "react-icons/lu";import { RxMagnifyingGlass } from "react-icons/rx";import type { LoaderFunctionArgs } from "react-router";-import { Link, useFetcher, useLoaderData } from "react-router";+import { useFetcher, useLoaderData } from "react-router";import {ClaudeIcon,CodexIcon,@@ -54,6 +54,7 @@ import {} from "~/components/AgentToolIcons";import { Greeting } from "~/components/Greeting";import CreateMenu from "~/components/Layout/Topbar/CreateMenu";+import { ModuleCard } from "~/components/ModuleCard";import {useAllModules,useModules,@@ -68,7 +69,6 @@ import {} from "~/hooks/useImplementationNavItem";import type { RecentDocument } from "~/hooks/useRecentlyViewed";import { useUIStore } from "~/stores/ui";-import type { Authenticated, NavItem } from "~/types";import { path } from "~/utils/path";import { copyToClipboard } from "~/utils/string";@@ -158,7 +158,7 @@ export default function AppIndexRoute() {return (<div className="relative w-full h-full overflow-hidden"><div className="relative z-10 w-full h-full overflow-y-auto">- <div className="max-w-7xl mx-auto p-8">+ <div className="max-w-7xl mx-auto p-8 compact:p-4"><div className="mb-8">{!CONTROLLED_ENVIRONMENT && (<OnboardAgentWidget dismissed={agentDismissed} />@@ -166,23 +166,26 @@ export default function AppIndexRoute() {<Greetinghour={greeting.hour}pick={greeting.pick}- className="mt-6 mx-auto max-w-[30ch] text-center font-medium"+ className="mt-6 mx-auto max-w-[30ch] text-center font-medium compact:mt-0"/><div className="mt-8 flex items-center gap-3"><SearchBar />- <CreateMenu- trigger={- <Button- size="lg"- variant="outline"- leftIcon={<LuCirclePlus />}- rightIcon={<LuChevronDown />}- className="shrink-0 h-11"- >- <Trans>New</Trans>- </Button>- }- />+ {/* Phones create from the Create tab. */}+ <div className="contents compact:hidden">+ <CreateMenu+ trigger={+ <Button+ size="lg"+ variant="outline"+ leftIcon={<LuCirclePlus />}+ rightIcon={<LuChevronDown />}+ className="shrink-0 h-11"+ >+ <Trans>New</Trans>+ </Button>+ }+ />+ </div></div></div><ImplementationData>@@ -235,7 +238,7 @@ export default function AppIndexRoute() {<SectionLabel><Trans>Modules</Trans></SectionLabel>- <div className="grid grid-cols-1 sm:grid-cols-2 gap-4">+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-4 compact:grid-cols-3 compact:gap-3">{modules.filter((mod) => mod.key !== "settings").map((module) => (@@ -269,7 +272,7 @@ function SearchBar() {><RxMagnifyingGlass className="w-4 h-4 shrink-0" /><span className="text-base truncate">{t`Search`}</span>- <div className="ml-auto flex items-center gap-1">+ <div className="ml-auto flex items-center gap-1 compact:hidden"><KeyCap>{modifierKey}</KeyCap><KeyCap>K</KeyCap></div>@@ -339,13 +342,13 @@ function OnboardAgentWidget({ dismissed: initial }: { dismissed: boolean }) {// No gap: the pill stays perfectly centered because the ✕ slot collapses to// zero width when idle. On hover (or keyboard focus) the slot animates open,// sliding the pill left to make room — the movement IS the reveal.- <div className="group flex items-center justify-center">+ <div className="group flex items-center justify-center compact:mb-6"><Tooltip><TooltipTrigger asChild><buttontype="button"onClick={handleCopy}- className="flex items-center gap-3 h-9 pl-4 pr-4 max-w-full rounded-full border border-border bg-muted/30 text-sm font-medium text-foreground hover:bg-muted/50 transition-colors active:scale-[0.98]"+ className="flex items-center gap-3 h-9 compact:h-11 pl-4 pr-4 max-w-full rounded-full border border-border bg-muted/30 text-sm font-medium text-foreground hover:bg-muted/50 transition-colors active:scale-[0.98]">{/* min-w-0 + overflow-hidden lets the label clip instead ofwrapping to a second line on narrow screens — the icons keep@@ -364,7 +367,7 @@ function OnboardAgentWidget({ dismissed: initial }: { dismissed: boolean }) {<Trans>Copies a setup prompt for your AI coding tool</Trans></TooltipContent></Tooltip>- <div className="w-0 overflow-hidden transition-[width] duration-200 ease-out group-hover:w-8 group-focus-within:w-8">+ <div className="w-0 overflow-hidden transition-[width] duration-200 ease-out group-hover:w-8 group-focus-within:w-8 compact:w-8"><Tooltip><TooltipTrigger asChild><IconButton@@ -374,7 +377,7 @@ function OnboardAgentWidget({ dismissed: initial }: { dismissed: boolean }) {size="sm"isRoundonClick={dismiss}- className="ml-2 text-muted-foreground rounded-full opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-within:opacity-100"+ className="ml-2 text-muted-foreground rounded-full opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-within:opacity-100 compact:opacity-100"/></TooltipTrigger><TooltipContent>@@ -492,28 +495,8 @@ const RecentDocumentRow = ({variant="ghost"size="sm"onClick={onRemove}- className="absolute right-2 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity"+ className="absolute right-2 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity compact:opacity-100"/></div>);};--const ModuleCard = ({ module }: { module: Authenticated<NavItem> }) => {- const Anchor = module.external ? Link : PrefetchLink;- return (- <Anchor- to={module.to}- {...(module.external- ? { target: "_blank", rel: "noopener noreferrer" }- : {})}- className="flex items-center gap-4 p-4 rounded-lg border border-border group bg-muted/20 hover:border-foreground/20 cursor-pointer transition-colors duration-200"- >- <div className="shrink-0 p-2.5 rounded-lg border border-border group-hover:border-foreground/20 transition-colors">- <module.icon className="text-xl" />- </div>- <span className="text-sm py-1 px-4 border border-border rounded-full group-hover:bg-background font-medium tracking-tight transition-colors">- {module.name}- </span>- </Anchor>- );-};diff --git a/apps/erp/app/routes/x+/_layout.tsx b/apps/erp/app/routes/x+/_layout.tsxindex 80b2e0eea1..6c40524d6f 100644--- a/apps/erp/app/routes/x+/_layout.tsx+++ b/apps/erp/app/routes/x+/_layout.tsx@@ -35,6 +35,7 @@ import {ItarUserCertification,SidebarProvider,TooltipProvider,+ useCompact,useKeyboardWedge,useNProgress} from "@carbon/react";@@ -61,6 +62,11 @@ import {PrimaryNavigation,Topbar} from "~/components/Layout";+import {+ MobileAppBar,+ MobileBottomChrome,+ MobileTabBar+} from "~/components/Layout/Mobile";import MfaEnrollmentRequired from "~/components/MfaEnrollmentRequired";import SessionLockOverlay from "~/components/SessionLockOverlay";import ShortcutHelp from "~/components/ShortcutHelp";@@ -364,6 +370,7 @@ export async function loader({ request }: LoaderFunctionArgs) {export default function AuthenticatedRoute() {const loaderData = useLoaderData<typeof loader>();+ const isCompact = useCompact();const {company,session,@@ -526,6 +533,11 @@ export default function AuthenticatedRoute() {><PrimaryNavigation /><div className="flex flex-1 flex-col min-w-0 overflow-hidden bg-card md:mt-2 md:mr-2 md:mb-2 md:rounded-2xl md:border md:border-border shadow-md relative z-10">+ {/* Phones: app bar on top, tab bar or a page's bottom+ bar below <main>, in flow. Mounted only on phones so+ their hooks (notifications, sheets) never run on+ desktop. */}+ {isCompact && <MobileAppBar />}<Topbar /><main className="flex-1 overflow-y-auto scrollbar-hide relative"><ModuleSidebarLayout>@@ -535,6 +547,11 @@ export default function AuthenticatedRoute() {<Outlet key={companyId} /></ModuleSidebarLayout></main>+ {isCompact && (+ <MobileBottomChrome>+ <MobileTabBar />+ </MobileBottomChrome>+ )}</div></SidebarProvider><TrainingPaneldiff --git a/apps/erp/app/routes/x+/account+/_layout.tsx b/apps/erp/app/routes/x+/account+/_layout.tsxindex 229f9c98b2..065ee6053e 100644--- a/apps/erp/app/routes/x+/account+/_layout.tsx+++ b/apps/erp/app/routes/x+/account+/_layout.tsx@@ -7,6 +7,7 @@ import { msg } from "@lingui/core/macro";import type { MetaFunction } from "react-router";import { Outlet } from "react-router";import { GroupedContentSidebar } from "~/components/Layout";+import { SettingsPage } from "~/components/SettingsPage";import useAccountSubmodules from "~/modules/account/ui/useAccountSubmodules";import type { Handle } from "~/utils/handle";import { path } from "~/utils/path";@@ -35,9 +36,9 @@ export default function AccountRoute() {spacing={0}className="overflow-y-auto scrollbar-hide h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack spacing={4} className="py-12 px-4 max-w-[60rem] h-full mx-auto">+ <SettingsPage><Outlet />- </VStack>+ </SettingsPage></VStack>);}diff --git a/apps/erp/app/routes/x+/account+/security.tsx b/apps/erp/app/routes/x+/account+/security.tsxindex aa50988233..20c197a69a 100644--- a/apps/erp/app/routes/x+/account+/security.tsx+++ b/apps/erp/app/routes/x+/account+/security.tsx@@ -294,7 +294,7 @@ export default function AccountSecurity() {{passkeysEnabled && (<Card><CardHeader>- <HStack className="justify-between">+ <HStack className="justify-between compact:flex-col compact:items-stretch compact:gap-3"><div><CardTitle><Trans>Passkeys</Trans>@@ -329,7 +329,7 @@ export default function AccountSecurity() {<HStackkey={pk.id}spacing={4}- className="w-full justify-between p-3 rounded-lg border border-border cursor-pointer transition-colors hover:bg-muted/40"+ className="w-full justify-between p-3 rounded-lg border border-border cursor-pointer transition-colors hover:bg-muted/40 compact:border-0 compact:p-0 compact:rounded-none"onClick={() => openPasskeyDrawer(pk)}><HStack spacing={3} className="min-w-0">@@ -381,7 +381,7 @@ export default function AccountSecurity() {<Card><CardHeader>- <HStack className="justify-between">+ <HStack className="justify-between compact:flex-col compact:items-stretch compact:gap-3"><div><CardTitle><Trans>Two-factor authentication</Trans>@@ -422,7 +422,7 @@ export default function AccountSecurity() {<HStackkey={factor.id}spacing={4}- className="w-full justify-between p-3 rounded-lg border border-border"+ className="w-full justify-between p-3 rounded-lg border border-border compact:border-0 compact:p-0 compact:rounded-none"><HStack spacing={3} className="min-w-0"><span className="flex items-center justify-center size-9 rounded-lg bg-muted shrink-0">diff --git a/apps/erp/app/routes/x+/accounting+/asset-classes.tsx b/apps/erp/app/routes/x+/accounting+/asset-classes.tsxindex 8f9ec41b7f..57a564dc82 100644--- a/apps/erp/app/routes/x+/accounting+/asset-classes.tsx+++ b/apps/erp/app/routes/x+/accounting+/asset-classes.tsx@@ -3,15 +3,17 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import { requirePermissions } from "@carbon/auth/auth.server";-import { Button, VStack } from "@carbon/react";+import { Button, useCompact, VStack } from "@carbon/react";import { isUnaffectedByNavigation } from "@carbon/utils";import { msg } from "@lingui/core/macro";+import { Trans, useLingui } from "@lingui/react/macro";import { LuCirclePlus } from "react-icons/lu";import type {LoaderFunctionArgs,ShouldRevalidateFunction} from "react-router";import { Outlet, useLoaderData, useNavigate } from "react-router";+import { New } from "~/components";import { usePermissions } from "~/hooks";import { getFixedAssetClasses } from "~/modules/accounting";import { AssetClassesTable } from "~/modules/accounting/ui/FixedAssets";@@ -64,8 +66,10 @@ export async function loader({ request }: LoaderFunctionArgs) {export default function AssetClassesRoute() {const { data, count, taxDepreciationEnabled } =useLoaderData<typeof loader>();+ const { t } = useLingui();const permissions = usePermissions();const navigate = useNavigate();+ const isCompact = useCompact();return (<VStack spacing={0} className="h-full">@@ -74,15 +78,19 @@ export default function AssetClassesRoute() {count={count}taxDepreciationEnabled={taxDepreciationEnabled}primaryAction={- permissions.can("create", "accounting") && (+ permissions.can("create", "accounting") &&+ // Phones: Add becomes the app bar "+" like the other lists.+ (isCompact ? (+ <New label={t`Asset Class`} to={path.to.newAssetClass} />+ ) : (<ButtonleftIcon={<LuCirclePlus />}variant="primary"onClick={() => navigate(path.to.newAssetClass)}>- Add Asset Class+ <Trans>Add Asset Class</Trans></Button>- )+ ))}/><Outlet />diff --git a/apps/erp/app/routes/x+/accounting+/cost-centers.tsx b/apps/erp/app/routes/x+/accounting+/cost-centers.tsxindex f89abecf7b..75f39f2bf0 100644--- a/apps/erp/app/routes/x+/accounting+/cost-centers.tsx+++ b/apps/erp/app/routes/x+/accounting+/cost-centers.tsx@@ -7,7 +7,6 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { getApprovalRulesForApprover } from "@carbon/ee/approvals.server";import {- Heading,HStack,Tabs,TabsContent,@@ -16,7 +15,7 @@ import {} from "@carbon/react";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";-import { useLingui } from "@lingui/react/macro";+import { Trans, useLingui } from "@lingui/react/macro";import { useCallback } from "react";import type {LoaderFunctionArgs,@@ -24,6 +23,7 @@ import type {} from "react-router";import { Outlet, useLoaderData, useNavigate } from "react-router";import { New } from "~/components";+import { SettingsPageHeading } from "~/components/SettingsPage";import { getCostCentersTree } from "~/modules/accounting";import {CostCentersListView,@@ -96,7 +96,9 @@ export default function Route() {return (<Tabs defaultValue="tree" className="w-full"><div className="flex px-4 py-3 items-center space-x-4 justify-between bg-card border-b border-border w-full">- <Heading size="h3">Cost Centers</Heading>+ <SettingsPageHeading>+ <Trans>Cost Centers</Trans>+ </SettingsPageHeading><HStack><TabsList><TabsTrigger value="tree">Tree View</TabsTrigger>diff --git a/apps/erp/app/routes/x+/accounting+/defaults.tsx b/apps/erp/app/routes/x+/accounting+/defaults.tsxindex fd9d83123e..76e4f7dd89 100644--- a/apps/erp/app/routes/x+/accounting+/defaults.tsx+++ b/apps/erp/app/routes/x+/accounting+/defaults.tsx@@ -6,11 +6,12 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";-import { ScrollArea, VStack } from "@carbon/react";+import { ScrollArea } from "@carbon/react";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { data, useLoaderData } from "react-router";+import { SettingsPage } from "~/components/SettingsPage";import { useRouteData } from "~/hooks";import type { AccountListItem } from "~/modules/accounting";import {@@ -103,17 +104,14 @@ export default function AccountDefaultsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >+ <SettingsPage className="gap-4"><AccountDefaultsFormbalanceSheetAccounts={routeData?.balanceSheetAccounts ?? []}incomeStatementAccounts={routeData?.incomeStatementAccounts ?? []}// @ts-expect-error TS2322 - TODO: fix typeinitialValues={defaultAccounts}/>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/accounting+/fixed-assets.tsx b/apps/erp/app/routes/x+/accounting+/fixed-assets.tsxindex 444c918e31..07b96167fd 100644--- a/apps/erp/app/routes/x+/accounting+/fixed-assets.tsx+++ b/apps/erp/app/routes/x+/accounting+/fixed-assets.tsx@@ -3,15 +3,17 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import { requirePermissions } from "@carbon/auth/auth.server";-import { Button, VStack } from "@carbon/react";+import { Button, useCompact, VStack } from "@carbon/react";import { isUnaffectedByNavigation } from "@carbon/utils";import { msg } from "@lingui/core/macro";+import { useLingui } from "@lingui/react/macro";import { LuCirclePlus } from "react-icons/lu";import type {LoaderFunctionArgs,ShouldRevalidateFunction} from "react-router";import { Outlet, useLoaderData, useNavigate } from "react-router";+import { New } from "~/components";import { usePermissions } from "~/hooks";import { getFixedAssetClassesList, getFixedAssets } from "~/modules/accounting";import { FixedAssetsTable } from "~/modules/accounting/ui/FixedAssets";@@ -68,8 +70,10 @@ export async function loader({ request }: LoaderFunctionArgs) {export default function FixedAssetsRoute() {const { data, count, assetClasses } = useLoaderData<typeof loader>();+ const { t } = useLingui();const permissions = usePermissions();const navigate = useNavigate();+ const isCompact = useCompact();return (<VStack spacing={0} className="h-full">@@ -78,7 +82,11 @@ export default function FixedAssetsRoute() {count={count}assetClasses={assetClasses}primaryAction={- permissions.can("create", "accounting") && (+ permissions.can("create", "accounting") &&+ // Phones: Add becomes the app bar "+" like the other lists.+ (isCompact ? (+ <New label={t`Fixed Asset`} to={path.to.newFixedAsset} />+ ) : (<ButtonleftIcon={<LuCirclePlus />}variant="primary"@@ -86,7 +94,7 @@ export default function FixedAssetsRoute() {>Add Fixed Asset</Button>- )+ ))}/><Outlet />diff --git a/apps/erp/app/routes/x+/accounting+/journals.tsx b/apps/erp/app/routes/x+/accounting+/journals.tsxindex 8b812dc908..74e4e63d49 100644--- a/apps/erp/app/routes/x+/accounting+/journals.tsx+++ b/apps/erp/app/routes/x+/accounting+/journals.tsx@@ -6,12 +6,14 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { Button, VStack } from "@carbon/react";import { isUnaffectedByNavigation } from "@carbon/utils";import { msg } from "@lingui/core/macro";+import { Trans, useLingui } from "@lingui/react/macro";import { LuCirclePlus } from "react-icons/lu";import type {LoaderFunctionArgs,ShouldRevalidateFunction} from "react-router";import { Outlet, useFetcher, useLoaderData } from "react-router";+import { NewAction } from "~/components/New";import { usePermissions } from "~/hooks";import { getJournalEntries } from "~/modules/accounting";import { JournalEntriesTable } from "~/modules/accounting/ui/JournalEntries";@@ -58,18 +60,25 @@ export async function loader({ request }: LoaderFunctionArgs) {}function NewJournalEntry() {+ const { t } = useLingui();const fetcher = useFetcher();return (- <fetcher.Form method="post" action="new">- <Button- type="submit"- leftIcon={<LuCirclePlus />}- variant="primary"- isLoading={fetcher.state !== "idle"}- >- Add Journal Entry- </Button>- </fetcher.Form>+ <NewAction+ label={t`Add Journal Entry`}+ isDisabled={fetcher.state !== "idle"}+ onClick={() => fetcher.submit(null, { method: "post", action: "new" })}+ >+ <fetcher.Form method="post" action="new">+ <Button+ type="submit"+ leftIcon={<LuCirclePlus />}+ variant="primary"+ isLoading={fetcher.state !== "idle"}+ >+ <Trans>Add Journal Entry</Trans>+ </Button>+ </fetcher.Form>+ </NewAction>);}diff --git a/apps/erp/app/routes/x+/accounting+/reports.tsx b/apps/erp/app/routes/x+/accounting+/reports.tsxindex 1e28f699cf..92426f567b 100644--- a/apps/erp/app/routes/x+/accounting+/reports.tsx+++ b/apps/erp/app/routes/x+/accounting+/reports.tsx@@ -326,12 +326,13 @@ export default function ReportsIndexRoute() {return (<div className="h-[calc(100dvh-var(--header-height))] w-full overflow-y-auto bg-card">- <div className="mx-auto flex w-full max-w-6xl flex-col gap-8 p-8">- <div className="flex items-center justify-between gap-4">+ <div className="mx-auto flex w-full max-w-6xl flex-col gap-8 p-8 compact:gap-6 compact:p-4">+ {/* Phones: the app bar already titles the page. */}+ <div className="flex items-center justify-between gap-4 compact:[&>h1]:hidden"><Heading as="h1" size="h1"><Trans>Reporting</Trans></Heading>- <InputGroup size="sm" className="w-64">+ <InputGroup size="sm" className="w-64 compact:w-full"><InputLeftElement><LuSearch className="h-4 w-4 text-muted-foreground" /></InputLeftElement>@@ -399,7 +400,9 @@ export default function ReportsIndexRoute() {}><report.icon className="h-4 w-4 shrink-0 text-muted-foreground" />- <span className="text-sm font-medium">{report.name}</span>+ <span className="text-sm font-medium compact:shrink-0 compact:whitespace-nowrap">+ {report.name}+ </span><span className="truncate text-sm text-muted-foreground">{report.description}</span>diff --git a/apps/erp/app/routes/x+/accounting+/years.tsx b/apps/erp/app/routes/x+/accounting+/years.tsxindex 3a1363670c..a68c031a87 100644--- a/apps/erp/app/routes/x+/accounting+/years.tsx+++ b/apps/erp/app/routes/x+/accounting+/years.tsx@@ -6,11 +6,12 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";-import { ScrollArea, VStack } from "@carbon/react";+import { ScrollArea } from "@carbon/react";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useLoaderData } from "react-router";+import { SettingsPage } from "~/components/SettingsPage";import {fiscalYearSettingsValidator,getFiscalCalendarCommitted,@@ -118,15 +119,12 @@ export default function FiscalYearSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >+ <SettingsPage className="gap-4"><FiscalYearSettingsForminitialValues={initialValues}fiscalStartLocked={fiscalStartLocked}/>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/assembly+/$id.tsx b/apps/erp/app/routes/x+/assembly+/$id.tsxindex e0098c5cbc..a1aae561ec 100644--- a/apps/erp/app/routes/x+/assembly+/$id.tsx+++ b/apps/erp/app/routes/x+/assembly+/$id.tsx@@ -698,6 +698,7 @@ export default function AssemblyInstructionRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Steps`}explorer={<AssemblyInstructionExplorersteps={steps}diff --git a/apps/erp/app/routes/x+/change-notice+/new.tsx b/apps/erp/app/routes/x+/change-notice+/new.tsxindex e535df4650..c8262f7370 100644--- a/apps/erp/app/routes/x+/change-notice+/new.tsx+++ b/apps/erp/app/routes/x+/change-notice+/new.tsx@@ -11,6 +11,7 @@ import { datetime, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useLoaderData } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUser } from "~/hooks";import {addChangeNoticeAffectedItem,@@ -183,8 +184,8 @@ export default function ChangeNoticeNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><ChangeNoticeForm initialValues={initialValues} types={types} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/consumable+/$itemId.tsx b/apps/erp/app/routes/x+/consumable+/$itemId.tsxindex 824d5ccf9b..43d05d8a45 100644--- a/apps/erp/app/routes/x+/consumable+/$itemId.tsx+++ b/apps/erp/app/routes/x+/consumable+/$itemId.tsx@@ -8,6 +8,7 @@ import { flash } from "@carbon/auth/session.server";import { useRouteData } from "@carbon/react";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";+import { useLingui } from "@lingui/react/macro";import { Suspense } from "react";import type {LoaderFunctionArgs,@@ -93,6 +94,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {}export default function ConsumableRoute() {+ const { t } = useLingui();const { itemId } = useParams();if (!itemId) throw new Error("Could not find itemId");@@ -111,6 +113,7 @@ export default function ConsumableRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Used In`}explorer={<div className="flex flex-col h-full"><div className="flex-1 overflow-y-auto">diff --git a/apps/erp/app/routes/x+/consumable+/new.tsx b/apps/erp/app/routes/x+/consumable+/new.tsxindex fd1b76fca8..d23f543389 100644--- a/apps/erp/app/routes/x+/consumable+/new.tsx+++ b/apps/erp/app/routes/x+/consumable+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { consumableValidator, upsertConsumable } from "~/modules/items";import { ConsumableForm } from "~/modules/items/ui/Consumables";import { setCustomFields } from "~/utils/form";@@ -85,8 +86,8 @@ export default function ConsumablesNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><ConsumableForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/credits+/new.tsx b/apps/erp/app/routes/x+/credits+/new.tsxindex 2d80a6017f..8a51be4713 100644--- a/apps/erp/app/routes/x+/credits+/new.tsx+++ b/apps/erp/app/routes/x+/credits+/new.tsx@@ -10,6 +10,7 @@ import { datetime, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useLoaderData } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { MemoForm, memoValidator, upsertMemo } from "~/modules/invoicing";import { getCompany, getNextSequence } from "~/modules/settings";import { getCompanyTimeZone } from "~/modules/shared/timezone.server";@@ -120,11 +121,11 @@ export async function action({ request }: ActionFunctionArgs) {export default function NewMemoRoute() {const { initialValues, type } = useLoaderData<typeof loader>();return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><MemoForminitialValues={initialValues}type={type === "supplierCredit" ? "supplierCredit" : "creditMemo"}/>- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/customer+/$customerId.tsx b/apps/erp/app/routes/x+/customer+/$customerId.tsxindex 1b5b7fe28d..923f42c6ba 100644--- a/apps/erp/app/routes/x+/customer+/$customerId.tsx+++ b/apps/erp/app/routes/x+/customer+/$customerId.tsx@@ -80,9 +80,12 @@ export default function CustomerRoute() {<><CustomerHeader /><div- className={cn("grid grid-cols-1 h-full w-full gap-4", {- "md:grid-cols-[1fr_4fr]": isEmployee- })}+ className={cn(+ "grid grid-cols-1 h-full w-full gap-4 compact:h-auto compact:gap-0",+ {+ "md:grid-cols-[1fr_4fr]": isEmployee+ }+ )}>{isEmployee && <CustomerSidebar />}<Outlet />diff --git a/apps/erp/app/routes/x+/customer+/new.tsx b/apps/erp/app/routes/x+/customer+/new.tsxindex 7adc3c5f04..9845d069e2 100644--- a/apps/erp/app/routes/x+/customer+/new.tsx+++ b/apps/erp/app/routes/x+/customer+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useUser } from "~/hooks";import { customerValidator, upsertCustomer } from "~/modules/sales";import { CustomerForm } from "~/modules/sales/ui/Customer";@@ -83,8 +84,8 @@ export default function CustomersNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage className="compact:p-0"><CustomerForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/documents+/search.tsx b/apps/erp/app/routes/x+/documents+/search.tsxindex 6339f58ff8..237ee1ca19 100644--- a/apps/erp/app/routes/x+/documents+/search.tsx+++ b/apps/erp/app/routes/x+/documents+/search.tsx@@ -105,7 +105,7 @@ export default function DocumentsAllRoute() {return (<VStack spacing={0} className="h-full ">- <ResizablePanelGroup direction="horizontal">+ <ResizablePanelGroup direction="horizontal" stackOnCompact><ResizablePanel><DocumentsTabledata={documents}diff --git a/apps/erp/app/routes/x+/fixed-asset+/$fixedAssetId.tsx b/apps/erp/app/routes/x+/fixed-asset+/$fixedAssetId.tsxindex 89489efa98..f88e84701f 100644--- a/apps/erp/app/routes/x+/fixed-asset+/$fixedAssetId.tsx+++ b/apps/erp/app/routes/x+/fixed-asset+/$fixedAssetId.tsx@@ -25,6 +25,7 @@ import {} from "@carbon/react";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";+import { Trans } from "@lingui/react/macro";import {LuChevronDown,LuCircleX,@@ -49,6 +50,10 @@ import {import { DateTime, DocumentHeader } from "~/components";import { AuditLogDrawer } from "~/components/AuditLog";import { Enumerable } from "~/components/Enumerable";+import {+ RecordAction,+ RecordHeroTarget+} from "~/components/Layout/RecordHeader";import { ConfirmDelete } from "~/components/Modals";import { usePermissions, useSettings, useUser } from "~/hooks";import { useCurrencyFormatter } from "~/hooks/useCurrencyFormatter";@@ -146,93 +151,100 @@ export default function FixedAssetDetailRoute() {asset.status === "Active" || asset.status === "Fully Depreciated";const canUpdate = permissions.can("update", "accounting");+ const statusBadge = <FixedAssetStatus status={asset.status as any} />;++ const menuItems = (+ <>+ <DropdownMenuItem onClick={auditDrawer.onOpen}>+ <DropdownMenuIcon icon={<LuHistory />} />+ <Trans>History</Trans>+ </DropdownMenuItem>+ {isDraft && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ shortcut={MENU_ITEM_SHORTCUTS.delete}+ disabled={!permissions.can("delete", "accounting")}+ destructive+ onClick={deleteModal.onOpen}+ >+ <DropdownMenuIcon icon={<LuTrash />} />+ <Trans>Delete</Trans>+ </DropdownMenuItem>+ </>+ )}+ </>+ );+return (<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--content-inset))] overflow-y-auto scrollbar-hide w-full"><div className="h-full p-4 pb-16 w-full max-w-5xl mx-auto space-y-4">{/* Main Details */}+ <RecordHeroTarget bleed /><Card><DocumentHeadertitle={asset.fixedAssetId ?? ""}- status={<FixedAssetStatus status={asset.status as any} />}- menuItems={- <>- <DropdownMenuItem onClick={auditDrawer.onOpen}>- <DropdownMenuIcon icon={<LuHistory />} />- History- </DropdownMenuItem>- {isDraft && (- <>- <DropdownMenuSeparator />+ status={statusBadge}+ menuItems={menuItems}+ actions={+ <RecordAction slot="primary">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ variant="primary"+ size="md"+ rightIcon={<LuChevronDown />}+ >+ <Trans>Actions</Trans>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end"><DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.delete}- disabled={!permissions.can("delete", "accounting")}- destructive- onClick={deleteModal.onOpen}+ shortcut={MENU_ITEM_SHORTCUTS.edit}+ disabled={!canUpdate}+ asChild>- <DropdownMenuIcon icon={<LuTrash />} />- Delete+ <Link to={path.to.fixedAssetDetails(fixedAssetId)}>+ <DropdownMenuIcon icon={<LuPencil />} />+ <Trans>Edit</Trans>+ </Link></DropdownMenuItem>- </>- )}- </>- }- actions={- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- variant="primary"- size="md"- rightIcon={<LuChevronDown />}- >- Actions- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- <DropdownMenuItem- shortcut={MENU_ITEM_SHORTCUTS.edit}- disabled={!canUpdate}- asChild- >- <Link to={path.to.fixedAssetDetails(fixedAssetId)}>- <DropdownMenuIcon icon={<LuPencil />} />- Edit- </Link>- </DropdownMenuItem>- {isDraft && (- <>- <DropdownMenuItem disabled={!canUpdate} asChild>- <Link to={path.to.fixedAssetRegister(fixedAssetId)}>- <DropdownMenuIcon icon={<LuClipboardCheck />} />- Register- </Link>- </DropdownMenuItem>- <DropdownMenuItem asChild>- <Link to={path.to.fixedAssetPurchase(fixedAssetId)}>- <DropdownMenuIcon icon={<LuShoppingCart />} />- Purchase- </Link>- </DropdownMenuItem>- </>- )}- {isActive && (- <>- <DropdownMenuItem asChild>- <Link to={path.to.fixedAssetSell(fixedAssetId)}>- <DropdownMenuIcon icon={<LuStore />} />- Sell- </Link>- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem disabled={!canUpdate} asChild>- <Link to={path.to.fixedAssetDispose(fixedAssetId)}>- <DropdownMenuIcon icon={<LuCircleX />} />- Dispose- </Link>- </DropdownMenuItem>- </>- )}- </DropdownMenuContent>- </DropdownMenu>+ {isDraft && (+ <>+ <DropdownMenuItem disabled={!canUpdate} asChild>+ <Link to={path.to.fixedAssetRegister(fixedAssetId)}>+ <DropdownMenuIcon icon={<LuClipboardCheck />} />+ <Trans>Register</Trans>+ </Link>+ </DropdownMenuItem>+ <DropdownMenuItem asChild>+ <Link to={path.to.fixedAssetPurchase(fixedAssetId)}>+ <DropdownMenuIcon icon={<LuShoppingCart />} />+ <Trans>Purchase</Trans>+ </Link>+ </DropdownMenuItem>+ </>+ )}+ {isActive && (+ <>+ <DropdownMenuItem asChild>+ <Link to={path.to.fixedAssetSell(fixedAssetId)}>+ <DropdownMenuIcon icon={<LuStore />} />+ <Trans>Sell</Trans>+ </Link>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem disabled={!canUpdate} asChild>+ <Link to={path.to.fixedAssetDispose(fixedAssetId)}>+ <DropdownMenuIcon icon={<LuCircleX />} />+ <Trans>Dispose</Trans>+ </Link>+ </DropdownMenuItem>+ </>+ )}+ </DropdownMenuContent>+ </DropdownMenu>+ </RecordAction>}/><CardContent className="space-y-0">diff --git a/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.activity.tsx b/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.activity.tsxindex 28e13a108e..5e98d63213 100644--- a/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.activity.tsx+++ b/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.activity.tsx@@ -281,7 +281,7 @@ export default function ItemInventoryActivityRoute() {}, [carbon, itemId, companyId, locationId]);return (- <div className="w-full space-y-4 pt-6 px-4">+ <div className="w-full space-y-4 pt-6 px-4 compact:p-0"><Heading size="h2" className="mb-4"><Trans>Activity</Trans></Heading>diff --git a/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.tsx b/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.tsxindex 13950d3dda..6caf8e2c0f 100644--- a/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.tsx+++ b/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.tsx@@ -9,14 +9,18 @@ import {ResizableHandle,ResizablePanel,ScrollArea,+ useCompact,VStack} from "@carbon/react";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";+import { useMemo } from "react";import type {LoaderFunctionArgs,ShouldRevalidateFunction} from "react-router";import { Outlet, useLoaderData } from "react-router";+import { useSetAppBarOverride } from "~/components/Layout/Mobile";+import { useUrlParams } from "~/hooks";import InventoryItemHeader from "~/modules/inventory/ui/Inventory/InventoryItemHeader";import { getItem, getPickMethod, upsertPickMethod } from "~/modules/items";import { resolveLocationId } from "~/modules/shared/location.server";@@ -92,6 +96,25 @@ export async function loader({ request, params }: LoaderFunctionArgs) {export default function ItemInventoryRoute() {const { item } = useLoaderData<typeof loader>();+ const isCompact = useCompact();+ const [params] = useUrlParams();+ const itemReadableId = item.readableIdWithRevision ?? item.readableId;+ const backTo = `${path.to.inventory}?${params.toString()}`;++ // Phones show this detail as its own screen: the item ID is the app bar+ // title and Back returns to the list (the panel's ✕ and ID are hidden).+ const appBarOverride = useMemo(+ () =>+ isCompact+ ? {+ kind: "pushed" as const,+ title: itemReadableId,+ backTo+ }+ : null,+ [isCompact, itemReadableId, backTo]+ );+ useSetAppBarOverride(appBarOverride);return (<>@@ -101,14 +124,15 @@ export default function ItemInventoryRoute() {maxSize={70}minSize={25}className="bg-muted"+ compactFocus><ScrollArea className="h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]"><InventoryItemHeader- itemReadableId={item.readableIdWithRevision ?? item.readableId}+ itemReadableId={itemReadableId}// @ts-expect-erroritemType={item.type}/>- <VStack className="p-2">+ <VStack className="p-2 compact:p-4"><Outlet /></VStack></ScrollArea>diff --git a/apps/erp/app/routes/x+/inventory+/quantities.tsx b/apps/erp/app/routes/x+/inventory+/quantities.tsxindex 2cb50d35e3..7b0e0aefa6 100644--- a/apps/erp/app/routes/x+/inventory+/quantities.tsx+++ b/apps/erp/app/routes/x+/inventory+/quantities.tsx@@ -155,7 +155,7 @@ export default function QuantitiesRoute() {return (<VStack spacing={0} className="h-full ">- <ResizablePanelGroup direction="horizontal">+ <ResizablePanelGroup direction="horizontal" stackOnCompact><ResizablePaneldefaultSize={50}maxSize={70}diff --git a/apps/erp/app/routes/x+/issue+/$id.tsx b/apps/erp/app/routes/x+/issue+/$id.tsxindex 6250d89b83..63a2107e76 100644--- a/apps/erp/app/routes/x+/issue+/$id.tsx+++ b/apps/erp/app/routes/x+/issue+/$id.tsx@@ -131,6 +131,7 @@ export default function IssueRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Associations`}explorer={<Suspense fallback={<IssueAssociationsSkeleton />}><Await resolve={associations}>diff --git a/apps/erp/app/routes/x+/issue+/new.tsx b/apps/erp/app/routes/x+/issue+/new.tsxindex 96c3f96a36..1e230d4203 100644--- a/apps/erp/app/routes/x+/issue+/new.tsx+++ b/apps/erp/app/routes/x+/issue+/new.tsx@@ -16,6 +16,7 @@ import { getLocalTimeZone, today } from "@internationalized/date";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useLoaderData } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useUrlParams, useUser } from "~/hooks";import { updateChangeNotice } from "~/modules/items";import {@@ -289,14 +290,14 @@ export default function IssueNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><IssueForminitialValues={initialValues}nonConformanceWorkflows={workflows}nonConformanceTypes={types}requiredActions={requiredActions}/>- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/issue-workflow+/new.tsx b/apps/erp/app/routes/x+/issue-workflow+/new.tsxindex 8cc247de30..e3f8a77c32 100644--- a/apps/erp/app/routes/x+/issue-workflow+/new.tsx+++ b/apps/erp/app/routes/x+/issue-workflow+/new.tsx@@ -6,10 +6,13 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";-import { ScrollArea, useCloseRoute } from "@carbon/react";+import { ScrollArea, useCloseRoute, useCompact } from "@carbon/react";import { redirect } from "@carbon/utils";+import { useLingui } from "@lingui/react/macro";+import { useMemo } from "react";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { data, useLoaderData } from "react-router";+import { useSetAppBarOverride } from "~/components/Layout/Mobile";import { issueWorkflowValidator } from "~/modules/quality/quality.models";import {getRequiredActionsList,@@ -70,6 +73,24 @@ export async function action({ request }: ActionFunctionArgs) {export default function NewIssueWorkflowRoute() {const { requiredActions } = useLoaderData<typeof loader>();const closeRoute = useCloseRoute();+ const isCompact = useCompact();+ const { t } = useLingui();++ // Phones show this create screen as a pushed screen: Back returns to the+ // workflow list (the route has no breadcrumb of its own).+ const appBarOverride = useMemo(+ () =>+ isCompact+ ? {+ kind: "pushed" as const,+ title: t`Issue Workflows`,+ backTo: path.to.issueWorkflows+ }+ : null,+ [isCompact, t]+ );+ useSetAppBarOverride(appBarOverride);+const initialValues = {name: "",content: "{}",diff --git a/apps/erp/app/routes/x+/items+/change-notice+/$id.tsx b/apps/erp/app/routes/x+/items+/change-notice+/$id.tsxindex 2a487ce424..6d2b42ac22 100644--- a/apps/erp/app/routes/x+/items+/change-notice+/$id.tsx+++ b/apps/erp/app/routes/x+/items+/change-notice+/$id.tsx@@ -9,6 +9,7 @@ import { getLogger } from "@carbon/logger";import type { JSONContent } from "@carbon/react";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";+import { useLingui } from "@lingui/react/macro";import type {LoaderFunctionArgs,ShouldRevalidateFunction@@ -320,6 +321,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {}export default function ChangeNoticeIdRoute() {+ const { t } = useLingui();const { id } = useParams();if (!id) throw new Error("Could not find id");// Surfaced to child routes + header/explorer/properties via useRouteData.@@ -337,6 +339,7 @@ export default function ChangeNoticeIdRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Affected Items`}explorer={<ChangeNoticeExplorer />}content={<div className="bg-card h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent w-full">diff --git a/apps/erp/app/routes/x+/job+/$jobId.tsx b/apps/erp/app/routes/x+/job+/$jobId.tsxindex 453758608a..b5eedb304f 100644--- a/apps/erp/app/routes/x+/job+/$jobId.tsx+++ b/apps/erp/app/routes/x+/job+/$jobId.tsx@@ -8,7 +8,7 @@ import { flash } from "@carbon/auth/session.server";import { activeJobStatuses } from "@carbon/database";import { datetime, isUnaffectedByNavigation, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";-import { Trans } from "@lingui/react/macro";+import { Trans, useLingui } from "@lingui/react/macro";import { Suspense, useMemo } from "react";import type {LoaderFunctionArgs,@@ -169,6 +169,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {}export default function JobRoute() {+ const { t } = useLingui();const params = useParams();const { jobId } = params;if (!jobId) throw new Error("Could not find jobId");@@ -182,6 +183,7 @@ export default function JobRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Bill of Materials`}explorer={<div className="w-full h-full p-2"><Suspense fallback={<ExplorerSkeleton />}>diff --git a/apps/erp/app/routes/x+/job+/new.tsx b/apps/erp/app/routes/x+/job+/new.tsxindex 53d3f0b6ff..739725ff7b 100644--- a/apps/erp/app/routes/x+/job+/new.tsx+++ b/apps/erp/app/routes/x+/job+/new.tsx@@ -10,6 +10,7 @@ import { validationError, validator } from "@carbon/form";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useUrlParams, useUser } from "~/hooks";import { getUnreleasedChangeOrderIssue } from "~/modules/items/items.server";import { insertJob, jobValidator } from "~/modules/production";@@ -135,8 +136,8 @@ export default function JobNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><JobForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/maintenance+/$dispatchId.tsx b/apps/erp/app/routes/x+/maintenance+/$dispatchId.tsxindex fb99760fe1..778279683f 100644--- a/apps/erp/app/routes/x+/maintenance+/$dispatchId.tsx+++ b/apps/erp/app/routes/x+/maintenance+/$dispatchId.tsx@@ -10,6 +10,7 @@ import type { JSONContent } from "@carbon/react";import { VStack } from "@carbon/react";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";+import { useLingui } from "@lingui/react/macro";import type {LoaderFunctionArgs,ShouldRevalidateFunction@@ -98,6 +99,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {}export default function MaintenanceDispatchRoute() {+ const { t } = useLingui();const { dispatchId } = useParams();const { dispatch, events, items, files } = useLoaderData<typeof loader>();@@ -112,6 +114,7 @@ export default function MaintenanceDispatchRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Items`}explorer={<MaintenanceDispatchExplorer items={items} events={events} />}diff --git a/apps/erp/app/routes/x+/maintenance+/new.tsx b/apps/erp/app/routes/x+/maintenance+/new.tsxindex 073654b46c..fa102d94ce 100644--- a/apps/erp/app/routes/x+/maintenance+/new.tsx+++ b/apps/erp/app/routes/x+/maintenance+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useLoaderData } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { notifyScheduleInputsChanged } from "~/modules/production";import {getFailureModesList,@@ -121,11 +122,11 @@ export default function NewMaintenanceDispatchRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><MaintenanceDispatchForminitialValues={initialValues}failureModes={failureModes}/>- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/material+/$itemId.tsx b/apps/erp/app/routes/x+/material+/$itemId.tsxindex b33291a7b1..9efe056cdd 100644--- a/apps/erp/app/routes/x+/material+/$itemId.tsx+++ b/apps/erp/app/routes/x+/material+/$itemId.tsx@@ -8,6 +8,7 @@ import { flash } from "@carbon/auth/session.server";import { useRouteData } from "@carbon/react";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";+import { useLingui } from "@lingui/react/macro";import { Suspense } from "react";import type {LoaderFunctionArgs,@@ -96,6 +97,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {}export default function MaterialRoute() {+ const { t } = useLingui();const { itemId } = useParams();if (!itemId) throw new Error("Could not find itemId");@@ -114,6 +116,7 @@ export default function MaterialRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Used In`}explorer={<div className="flex flex-col h-full"><div className="flex-1 overflow-y-auto">diff --git a/apps/erp/app/routes/x+/material+/new.tsx b/apps/erp/app/routes/x+/material+/new.tsxindex edbb7c9dec..393f9b7911 100644--- a/apps/erp/app/routes/x+/material+/new.tsx+++ b/apps/erp/app/routes/x+/material+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { materialValidator, upsertMaterial } from "~/modules/items";import { MaterialForm } from "~/modules/items/ui/Materials";import { getDatabaseClient } from "~/services/database.server";@@ -87,8 +88,8 @@ export default function MaterialsNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><MaterialForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/part+/$itemId.tsx b/apps/erp/app/routes/x+/part+/$itemId.tsxindex ea3a9d1f6e..a4b3e53ec8 100644--- a/apps/erp/app/routes/x+/part+/$itemId.tsx+++ b/apps/erp/app/routes/x+/part+/$itemId.tsx@@ -212,6 +212,7 @@ export default function PartRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={isManufactured ? t`Manufacturing` : t`Used In`}explorer={<div className="flex flex-col h-full">{isManufactured ? (diff --git a/apps/erp/app/routes/x+/part+/new.tsx b/apps/erp/app/routes/x+/part+/new.tsxindex eee28c2266..c8d257899c 100644--- a/apps/erp/app/routes/x+/part+/new.tsx+++ b/apps/erp/app/routes/x+/part+/new.tsx@@ -11,6 +11,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { partValidator, upsertPart } from "~/modules/items";import { PartForm } from "~/modules/items/ui/Parts";import { setCustomFields } from "~/utils/form";@@ -90,8 +91,8 @@ export default function PartsNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><PartForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/payments+/$paymentId.tsx b/apps/erp/app/routes/x+/payments+/$paymentId.tsxindex 71c705d375..e1e899c715 100644--- a/apps/erp/app/routes/x+/payments+/$paymentId.tsx+++ b/apps/erp/app/routes/x+/payments+/$paymentId.tsx@@ -325,7 +325,7 @@ export default function PaymentDetailRoute() {};return (- <VStack spacing={4} className="p-6 max-w-6xl w-full mx-auto">+ <VStack spacing={4} className="p-6 max-w-6xl w-full mx-auto compact:p-4"><PaymentForm key={payment.id} initialValues={initialValues} /><PaymentApplicationsapplications={applications}diff --git a/apps/erp/app/routes/x+/payments+/new.tsx b/apps/erp/app/routes/x+/payments+/new.tsxindex 5231643cf2..166afa35e8 100644--- a/apps/erp/app/routes/x+/payments+/new.tsx+++ b/apps/erp/app/routes/x+/payments+/new.tsx@@ -17,6 +17,7 @@ import {import type { SupabaseClient } from "@supabase/supabase-js";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useLoaderData } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { getCurrencyByCode, getDefaultAccounts } from "~/modules/accounting";import {computeEarlyPaymentDiscounts,@@ -349,11 +350,11 @@ export async function action({ request }: ActionFunctionArgs) {export default function NewPaymentRoute() {const { initialValues, seedInvoiceIds } = useLoaderData<typeof loader>();return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><PaymentForminitialValues={initialValues}seedInvoiceIds={seedInvoiceIds}/>- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/people+/departments.tsx b/apps/erp/app/routes/x+/people+/departments.tsxindex f156de53fc..4ae66807d1 100644--- a/apps/erp/app/routes/x+/people+/departments.tsx+++ b/apps/erp/app/routes/x+/people+/departments.tsx@@ -19,14 +19,15 @@ import {Tabs,TabsContent,TabsList,- TabsTrigger+ TabsTrigger,+ useCompact} from "@carbon/react";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import { Trans, useLingui } from "@lingui/react/macro";import { useCallback, useState } from "react";import { BsThreeDotsVertical } from "react-icons/bs";-import { LuDownload } from "react-icons/lu";+import { LuDownload, LuEllipsis } from "react-icons/lu";import type {LoaderFunctionArgs,ShouldRevalidateFunction@@ -34,6 +35,7 @@ import type {import { Outlet, useLoaderData, useNavigate } from "react-router";import { New } from "~/components";import { ImportCSVModal } from "~/components/ImportCSVModal";+import { AppBarActions } from "~/components/Layout/Mobile";import { getDepartmentsTree } from "~/modules/people";import {DepartmentsListView,@@ -78,6 +80,7 @@ export default function Route() {const { departments } = useLoaderData<typeof loader>();const navigate = useNavigate();const { t } = useLingui();+ const isCompact = useCompact();const handleEdit = useCallback((id: string) => {@@ -109,42 +112,75 @@ export default function Route() {[navigate]);+ const actionsMenuContent = (+ <DropdownMenuContent align="end">+ <DropdownMenuLabel>+ <Trans>Bulk Import</Trans>+ </DropdownMenuLabel>+ <DropdownMenuSeparator />+ <DropdownMenuItem onClick={() => setImportOpen(true)}>+ <DropdownMenuIcon icon={<LuDownload />} />+ {/* Reuses TableHeader's parameterized msgid rather than+ introducing a second one that every catalog would have to+ translate again. */}+ {t`Import ${label} CSV`}+ </DropdownMenuItem>+ </DropdownMenuContent>+ );++ // Phones: List/Tree is a display-mode toggle, so it stays a segmented+ // control instead of the compact underline tab row.+ const segmentedTrigger =+ "compact:hit-area compact:min-h-9 compact:rounded-md compact:border-b-0 compact:px-3 compact:data-[state=active]:bg-card compact:data-[state=active]:shadow-button-base";+return (<Tabs defaultValue="tree" className="w-full"><div className="flex px-4 py-3 items-center space-x-4 justify-between bg-card border-b border-border w-full">- <Heading size="h3">Departments</Heading>+ {/* The app bar already names the section on phones. */}+ <Heading size="h3" className="compact:hidden">+ <Trans>Departments</Trans>+ </Heading><HStack>- <TabsList>- <TabsTrigger value="tree">Tree View</TabsTrigger>- <TabsTrigger value="list">List View</TabsTrigger>+ <TabsList className="compact:w-auto compact:gap-0 compact:rounded-lg compact:border compact:bg-muted compact:p-1">+ <TabsTrigger value="tree" className={segmentedTrigger}>+ <Trans>Tree View</Trans>+ </TabsTrigger>+ <TabsTrigger value="list" className={segmentedTrigger}>+ <Trans>List View</Trans>+ </TabsTrigger></TabsList><Newlabel={t`Department`}to={path.to.newDepartment}variant="primary"/>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- aria-label={t`Table actions`}- variant="secondary"- icon={<BsThreeDotsVertical />}- />- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- <DropdownMenuLabel>- <Trans>Bulk Import</Trans>- </DropdownMenuLabel>- <DropdownMenuSeparator />- <DropdownMenuItem onClick={() => setImportOpen(true)}>- <DropdownMenuIcon icon={<LuDownload />} />- {/* Reuses TableHeader's parameterized msgid rather than- introducing a second one that every catalog would have to- translate again. */}- {t`Import ${label} CSV`}- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>+ {isCompact ? (+ // Phones: the content ⋮ moves to the app bar ⋯.+ <AppBarActions>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton+ aria-label={t`Table actions`}+ variant="ghost"+ size="lg"+ icon={<LuEllipsis />}+ />+ </DropdownMenuTrigger>+ {actionsMenuContent}+ </DropdownMenu>+ </AppBarActions>+ ) : (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton+ aria-label={t`Table actions`}+ variant="secondary"+ icon={<BsThreeDotsVertical />}+ />+ </DropdownMenuTrigger>+ {actionsMenuContent}+ </DropdownMenu>+ )}</HStack></div>diff --git a/apps/erp/app/routes/x+/person+/$personId.timecard.tsx b/apps/erp/app/routes/x+/person+/$personId.timecard.tsxindex 599b1cb744..a6511461f9 100644--- a/apps/erp/app/routes/x+/person+/$personId.timecard.tsx+++ b/apps/erp/app/routes/x+/person+/$personId.timecard.tsx@@ -504,7 +504,7 @@ export default function PersonTimecardRoute() {</Button></HStack>- <TableBase className="table-fixed w-full">+ <TableBase className="table-fixed w-full compact:table-auto compact:min-w-[36rem]"><colgroup><col className="w-[16%]" /><col className="w-[28%]" />@@ -517,13 +517,13 @@ export default function PersonTimecardRoute() {<Th className="whitespace-nowrap"><Trans>Date</Trans></Th>- <Th>+ <Th className="compact:whitespace-nowrap"><Trans>Clock In</Trans></Th>- <Th>+ <Th className="compact:whitespace-nowrap"><Trans>Clock Out</Trans></Th>- <Th className="text-center">+ <Th className="text-center compact:whitespace-nowrap"><Trans>Duration</Trans></Th><Th />@@ -619,7 +619,7 @@ export default function PersonTimecardRoute() {<Tr><TdcolSpan={5}- className="text-center text-muted-foreground py-8"+ className="text-center text-muted-foreground py-8 compact:text-left"><Trans>No time entries for this week</Trans></Td>diff --git a/apps/erp/app/routes/x+/person+/$personId.tsx b/apps/erp/app/routes/x+/person+/$personId.tsxindex 521594d301..62e35c32a3 100644--- a/apps/erp/app/routes/x+/person+/$personId.tsx+++ b/apps/erp/app/routes/x+/person+/$personId.tsx@@ -117,7 +117,7 @@ export default function PersonRoute() {return (<><PersonPreview />- <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-4">+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-4 compact:h-auto compact:gap-0"><PersonSidebarattributeCategories={attributeCategories}timeCardEnabled={timeCardEnabled}diff --git a/apps/erp/app/routes/x+/priority+/_layout.tsx b/apps/erp/app/routes/x+/priority+/_layout.tsxindex 0bd79fa1d4..229d34693b 100644--- a/apps/erp/app/routes/x+/priority+/_layout.tsx+++ b/apps/erp/app/routes/x+/priority+/_layout.tsx@@ -5,6 +5,7 @@import { msg } from "@lingui/core/macro";import type { MetaFunction } from "react-router";import { Outlet } from "react-router";+import { ProductionSections } from "~/modules/production/ui/useProductionSubmodules";import type { Handle } from "~/utils/handle";import { path } from "~/utils/path";@@ -18,7 +19,10 @@ export const handle: Handle = {realtime: ["job", "jobOperation"],breadcrumb: msg`Production`,to: path.to.production,- module: "production"+ module: "production",+ // Phones: this route is a section of its module, so it gets the module's+ // section switcher there (desktop shows no sidebar here, unchanged).+ compactSidebar: ProductionSections};export default function SchedulingRoute() {diff --git a/apps/erp/app/routes/x+/priority+/dates.tsx b/apps/erp/app/routes/x+/priority+/dates.tsxindex afa2ca0539..8d990321b3 100644--- a/apps/erp/app/routes/x+/priority+/dates.tsx+++ b/apps/erp/app/routes/x+/priority+/dates.tsx@@ -23,6 +23,7 @@ import {Separator,Spinner,Switch,+ useCompact,useLocalStorage,VStack} from "@carbon/react";@@ -577,9 +578,14 @@ function DateKanbanSchedule() {const [searchParams] = useSearchParams();const [items, setItems] = useState<JobItem[]>(initialItems);+ // Phones keep their own settings and start without the product image, so+ // more than one card fits on a screen; the Thumbnail toggle still applies.+ const isCompact = useCompact();const [displaySettings, setDisplaySettings] = useLocalStorage(- DISPLAY_SETTINGS_KEY,- defaultDisplaySettings+ isCompact ? `${DISPLAY_SETTINGS_KEY}-compact` : DISPLAY_SETTINGS_KEY,+ isCompact+ ? { ...defaultDisplaySettings, showThumbnail: false }+ : defaultDisplaySettings);useEffect(() => {@@ -752,15 +758,17 @@ function DateKanbanSchedule() {return (<div className="flex flex-col h-full max-h-full overflow-auto relative">- <HStack className="px-4 py-2 flex justify-between bg-card border-b border-border">- <HStack>+ <HStack className="px-4 py-2 flex justify-between bg-card border-b border-border compact:flex-wrap compact:gap-y-2 compact:[&_button]:h-11 compact:[&_button]:min-w-11">+ <HStack className="compact:w-full"><ScheduleNavigation />- <SearchFilter param="search" size="sm" placeholder="Search" />+ <div className="contents compact:block compact:min-w-0 compact:flex-1">+ <SearchFilter param="search" size="sm" placeholder="Search" />+ </div><Filter filters={filters} /></HStack>- <HStack>- <HStack>+ <HStack className="compact:w-full">+ <HStack className="compact:min-w-0 compact:flex-1"><Button variant="secondary" onClick={goToToday}><Trans>Today</Trans></Button>@@ -772,7 +780,10 @@ function DateKanbanSchedule() {/><DropdownMenu><DropdownMenuTrigger asChild>- <Button variant="secondary" className="min-w-[140px]">+ <Button+ variant="secondary"+ className="min-w-[140px] compact:min-w-0 compact:flex-1"+ >{currentDateSpanLabel}</Button></DropdownMenuTrigger>diff --git a/apps/erp/app/routes/x+/priority+/operations.tsx b/apps/erp/app/routes/x+/priority+/operations.tsxindex b92dde5f13..19819fe732 100644--- a/apps/erp/app/routes/x+/priority+/operations.tsx+++ b/apps/erp/app/routes/x+/priority+/operations.tsx@@ -21,6 +21,7 @@ import {TooltipContent,TooltipTrigger,toast,+ useCompact,useInterval,useLocalStorage,useMount,@@ -586,9 +587,14 @@ function KanbanSchedule() {const locations = useLocations();const [items, setItems] = useState<Item[]>(initialItems);+ // Phones keep their own settings and start without the product image, so+ // more than one card fits on a screen; the Thumbnail toggle still applies.+ const isCompact = useCompact();const [displaySettings, setDisplaySettings] = useLocalStorage(- DISPLAY_SETTINGS_KEY,- defaultDisplaySettings+ isCompact ? `${DISPLAY_SETTINGS_KEY}-compact` : DISPLAY_SETTINGS_KEY,+ isCompact+ ? { ...defaultDisplaySettings, showThumbnail: false }+ : defaultDisplaySettings);const mergedDisplaySettings = useMemo(() => ({ ...defaultDisplaySettings, ...displaySettings }),@@ -728,10 +734,13 @@ function KanbanSchedule() {return (<div className="flex flex-col h-full max-h-full overflow-auto relative">- <HStack className="px-4 py-2 justify-between bg-card border-b border-border">- <HStack>+ <HStack className="px-4 py-2 justify-between bg-card border-b border-border compact:flex-wrap compact:gap-y-2 compact:[&_button]:h-11 compact:[&_button]:min-w-11">+ {/* Phones: search takes its own full-width row under the controls. */}+ <HStack className="compact:min-w-0 compact:flex-1 compact:flex-wrap compact:gap-y-2"><ScheduleNavigation />- <SearchFilter param="search" size="sm" placeholder="Search" />+ <div className="contents compact:order-last compact:block compact:min-w-0 compact:basis-full compact:!mx-0">+ <SearchFilter param="search" size="sm" placeholder="Search" />+ </div><Filter filters={filters} /><Tooltip><TooltipTrigger tabIndex={-1} className="text-muted-foreground">@@ -746,7 +755,7 @@ function KanbanSchedule() {</Tooltip></HStack>- <div className="flex items-center gap-2">+ <div className="flex items-center gap-2 compact:self-start"><Popover><PopoverTrigger asChild><IconButtondiff --git a/apps/erp/app/routes/x+/procedure+/$id.tsx b/apps/erp/app/routes/x+/procedure+/$id.tsxindex 37c38c69f2..4b52fa0177 100644--- a/apps/erp/app/routes/x+/procedure+/$id.tsx+++ b/apps/erp/app/routes/x+/procedure+/$id.tsx@@ -7,7 +7,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { getLogger } from "@carbon/logger";import type { JSONContent } from "@carbon/react";-import { generateHTML, useDebounce } from "@carbon/react";+import { generateHTML, useDebounce, useHydrated } from "@carbon/react";import { Editor } from "@carbon/react/Editor";import { isUnaffectedByNavigation, redirect } from "@carbon/utils";import { getLocalTimeZone, today } from "@internationalized/date";@@ -86,6 +86,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {}export default function ProcedureRoute() {+ const { t } = useLingui();const { id } = useParams();if (!id) throw new Error("Could not find id");@@ -98,6 +99,7 @@ export default function ProcedureRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Steps`}explorer={<ProcedureExplorerkey={`explorer-${id}-${procedure.version}`}@@ -197,6 +199,9 @@ function ProcedureEditor() {);const onUploadImage = useImageUpload("job/notes");+ // generateHTML renders "" on the server and React 18 keeps a mismatched+ // innerHTML on hydration, so remount the read-only body once hydrated.+ const isHydrated = useHydrated();return (<div className="flex flex-col w-full h-full">@@ -220,11 +225,12 @@ function ProcedureEditor() {}}/>) : (- <div className="flex flex-col gap-6 w-full h-full p-8">+ <div className="flex flex-col gap-6 w-full h-full p-8 compact:p-4"><h1 className="md:text-3xl text-2xl font-semibold leading-tight tracking-tight text-foreground">{procedureName}</h1><div+ key={isHydrated ? "client" : "server"}className="prose dark:prose-invert"dangerouslySetInnerHTML={{__html: generateHTML(content)diff --git a/apps/erp/app/routes/x+/production+/_index.tsx b/apps/erp/app/routes/x+/production+/_index.tsxindex e19b90059e..0ddacab763 100644--- a/apps/erp/app/routes/x+/production+/_index.tsx+++ b/apps/erp/app/routes/x+/production+/_index.tsx@@ -31,6 +31,7 @@ import {Tooltip,TooltipContent,TooltipTrigger,+ useCompact,VStack} from "@carbon/react";import type { ChartConfig } from "@carbon/react/Chart";@@ -141,6 +142,7 @@ export async function loader({ request }: LoaderFunctionArgs) {export default function ProductionDashboard() {const { t } = useLingui();+ const isCompact = useCompact();const { activeJobs, assignedJobs, unbatchedOperations, events, workCenters } =useLoaderData<typeof loader>();@@ -321,7 +323,7 @@ export default function ProductionDashboard() {return (<div className="flex flex-col gap-4 w-full p-4 h-[calc(100dvh-var(--header-height))] overflow-y-auto scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-muted-foreground bg-card">- <div className="grid w-full gap-y-4 lg:gap-x-4 grid-cols-1 lg:grid-cols-6">+ <div className="grid w-full gap-y-4 lg:gap-x-4 grid-cols-1 lg:grid-cols-6 compact:grid-cols-2 compact:gap-3"><MetricCardclassName="col-span-1 lg:col-span-2"icon={<LuCirclePlay />}@@ -341,7 +343,7 @@ export default function ProductionDashboard() {/><MetricCard- className="col-span-1 lg:col-span-2"+ className="col-span-1 lg:col-span-2 compact:col-span-2"icon={<LuLayers />}title={<Trans>Unbatched Operations</Trans>}value={unbatchedOperations}@@ -349,7 +351,7 @@ export default function ProductionDashboard() {linkLabel={t`Create Batch`}/>- <Card className="col-span-1 lg:col-span-6">+ <Card className="col-span-1 lg:col-span-6 compact:col-span-2"><HStack className="flex-col items-start gap-2 sm:flex-row sm:justify-between sm:items-center"><CardHeader><div className="flex w-full justify-start items-center gap-2">@@ -455,7 +457,8 @@ export default function ProductionDashboard() {data={kpiFetcher.data?.data ?? []}layout="vertical"margin={{- right: 30+ // Phones: room for the top bar's value label.+ right: isCompact ? 48 : 30}}><YAxis@@ -781,7 +784,7 @@ function WorkCenterCards({});return (- <div className="w-full grid grid-cols-6 gap-4">+ <div className="w-full grid grid-cols-6 gap-4 compact:gap-3">{workCenters.map((workCenter) => {const {hasEvents,@@ -809,7 +812,7 @@ function WorkCenterCards({return (<Cardkey={workCenter.id}- className="p-0 h-[300px] col-span-6 lg:col-span-3 xl:col-span-2"+ className="p-0 h-[300px] col-span-6 compact:col-span-full lg:col-span-3 xl:col-span-2"><HStackclassName={cn(diff --git a/apps/erp/app/routes/x+/production+/planning.tsx b/apps/erp/app/routes/x+/production+/planning.tsxindex 6302e56013..62a6658414 100644--- a/apps/erp/app/routes/x+/production+/planning.tsx+++ b/apps/erp/app/routes/x+/production+/planning.tsx@@ -99,7 +99,7 @@ export default function ProductionPlanningRoute() {return (<VStack spacing={0} className="h-full ">- <ResizablePanelGroup direction="horizontal">+ <ResizablePanelGroup direction="horizontal" stackOnCompact><ResizablePaneldefaultSize={50}maxSize={70}diff --git a/apps/erp/app/routes/x+/purchase-invoice+/new.tsx b/apps/erp/app/routes/x+/purchase-invoice+/new.tsxindex 12866a9f74..41bded1a4e 100644--- a/apps/erp/app/routes/x+/purchase-invoice+/new.tsx+++ b/apps/erp/app/routes/x+/purchase-invoice+/new.tsx@@ -17,6 +17,7 @@ import {} from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUrlParams, useUser } from "~/hooks";import { upsertDocument } from "~/modules/documents";import {@@ -258,8 +259,8 @@ export default function PurchaseInvoiceNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><PurchaseInvoiceForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/purchase-order+/new.tsx b/apps/erp/app/routes/x+/purchase-order+/new.tsxindex 0df778928b..1ef12d4a13 100644--- a/apps/erp/app/routes/x+/purchase-order+/new.tsx+++ b/apps/erp/app/routes/x+/purchase-order+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";import { z } from "zod";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUrlParams, useUser } from "~/hooks";import type { PurchaseOrderStatus } from "~/modules/purchasing";import {@@ -107,8 +108,8 @@ export default function PurchaseOrderNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><PurchaseOrderForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/purchase-return-order+/new.tsx b/apps/erp/app/routes/x+/purchase-return-order+/new.tsxindex 0c30e2f073..96d9827209 100644--- a/apps/erp/app/routes/x+/purchase-return-order+/new.tsx+++ b/apps/erp/app/routes/x+/purchase-return-order+/new.tsx@@ -9,6 +9,7 @@ import { validationError, validator } from "@carbon/form";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUrlParams, useUser } from "~/hooks";import {insertPurchaseReturnOrder,@@ -114,8 +115,8 @@ export default function PurchaseReturnOrderNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><PurchaseReturnOrderForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/purchasing+/_index.tsx b/apps/erp/app/routes/x+/purchasing+/_index.tsxindex c333cffbde..b89b719952 100644--- a/apps/erp/app/routes/x+/purchasing+/_index.tsx+++ b/apps/erp/app/routes/x+/purchasing+/_index.tsx@@ -394,7 +394,7 @@ export default function PurchaseDashboard() {return (<div className="flex flex-col gap-4 w-full p-4 h-[calc(100dvh-var(--header-height))] overflow-y-auto scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-muted-foreground bg-card">- <div className="grid w-full gap-4 grid-cols-1 lg:grid-cols-3">+ <div className="grid w-full gap-4 grid-cols-1 lg:grid-cols-3 compact:grid-cols-2 compact:gap-3 compact:[&>:last-child:nth-child(odd)]:col-span-2"><MetricCardicon={<LuPackageSearch />}title={<Trans>Active Supplier Quotes</Trans>}@@ -427,9 +427,9 @@ export default function PurchaseDashboard() {</div><Card>- <HStack className="justify-between items-center">+ <HStack className="justify-between items-center compact:flex-col compact:items-stretch"><CardHeader>- <div className="flex w-full justify-start items-center gap-2">+ <div className="flex w-full justify-start items-center gap-2 compact:flex-wrap"><DropdownMenu><DropdownMenuTrigger asChild><Button@@ -460,11 +460,11 @@ export default function PurchaseDashboard() {onChange={setSupplierId}options={supplierOptions}size="sm"- className="font-medium text-sm min-w-[160px] gap-4"+ className="font-medium text-sm min-w-[160px] gap-4 compact:min-w-0"/></div></CardHeader>- <CardAction className="flex-row items-center gap-2">+ <CardAction className="flex-row items-center gap-2 compact:pt-0"><DateSelectvalue={interval}onValueChange={onIntervalChange}@@ -516,11 +516,11 @@ export default function PurchaseDashboard() {</VStack><LoadingisLoading={isFetching}- className="h-[30dvw] md:h-[23dvw] w-full"+ className="h-[30dvw] md:h-[23dvw] w-full compact:h-[150px]"><ChartContainerconfig={chartConfig}- className="aspect-auto h-[30dvw] md:h-[23dvw] w-full"+ className="aspect-auto h-[30dvw] md:h-[23dvw] w-full compact:h-[150px]"><BarChart accessibilityLayer data={kpiFetcher.data?.data ?? []}><CartesianGrid vertical={false} />@@ -798,7 +798,10 @@ function SupplierQuoteRow({ doc }: { doc: SupplierQuote }) {return (<Tr><Td>- <Hyperlink to={path.to.supplierQuote(doc.id!)}>+ <Hyperlink+ className="compact:min-h-11"+ to={path.to.supplierQuote(doc.id!)}+ ><HStack spacing={1}><LuPackageSearch className="size-4" /><span>{doc.supplierQuoteId}</span>@@ -819,7 +822,10 @@ function PurchaseOrderDocumentRow({ doc }: { doc: PurchaseOrder }) {return (<Tr><Td>- <Hyperlink to={path.to.purchaseOrder(doc.id!)}>+ <Hyperlink+ className="compact:min-h-11"+ to={path.to.purchaseOrder(doc.id!)}+ ><HStack spacing={1}><LuLayoutList className="size-4" /><span>{doc.purchaseOrderId}</span>@@ -840,7 +846,7 @@ function PurchaseInvoiceRow({ doc }: { doc: PurchaseInvoice }) {return (<Tr><Td>- <Hyperlink to={path.to.salesRfq(doc.id!)}>+ <Hyperlink className="compact:min-h-11" to={path.to.salesRfq(doc.id!)}><HStack spacing={1}><LuCreditCard className="size-4" /><span>{doc.invoiceId}</span>@@ -866,7 +872,7 @@ function SupplierApprovalRow({return (<Tr><Td>- <Hyperlink to={path.to.supplier(doc.id)}>+ <Hyperlink className="compact:min-h-11" to={path.to.supplier(doc.id)}><SupplierAvatar supplierId={doc.id} /></Hyperlink></Td>diff --git a/apps/erp/app/routes/x+/purchasing+/planning.tsx b/apps/erp/app/routes/x+/purchasing+/planning.tsxindex 430abbae2b..20591bdc8a 100644--- a/apps/erp/app/routes/x+/purchasing+/planning.tsx+++ b/apps/erp/app/routes/x+/purchasing+/planning.tsx@@ -98,7 +98,7 @@ export default function PurchasingPlanningRoute() {return (<VStack spacing={0} className="h-full ">- <ResizablePanelGroup direction="horizontal">+ <ResizablePanelGroup direction="horizontal" stackOnCompact><ResizablePaneldefaultSize={50}maxSize={70}diff --git a/apps/erp/app/routes/x+/purchasing-rfq+/new.tsx b/apps/erp/app/routes/x+/purchasing-rfq+/new.tsxindex b5c57cb8c9..4c217c472a 100644--- a/apps/erp/app/routes/x+/purchasing-rfq+/new.tsx+++ b/apps/erp/app/routes/x+/purchasing-rfq+/new.tsx@@ -9,6 +9,7 @@ import { validationError, validator } from "@carbon/form";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUser } from "~/hooks";import type { PurchasingRFQStatusType } from "~/modules/purchasing";import {@@ -96,8 +97,8 @@ export default function PurchasingRFQNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><PurchasingRFQForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/quality+/_index.tsx b/apps/erp/app/routes/x+/quality+/_index.tsxindex 5066114426..244ffeef70 100644--- a/apps/erp/app/routes/x+/quality+/_index.tsx+++ b/apps/erp/app/routes/x+/quality+/_index.tsx@@ -27,7 +27,8 @@ import {Td,Th,Thead,- Tr+ Tr,+ useCompact} from "@carbon/react";import type { ChartConfig } from "@carbon/react/Chart";import {@@ -250,6 +251,7 @@ export default function QualityDashboard() {const { t } = useLingui();const { locale } = useLocale();+ const isCompact = useCompact();const localizedChartConfig = useMemo(() =>@@ -385,7 +387,7 @@ export default function QualityDashboard() {return (<div className="flex flex-col gap-4 w-full p-4 h-[calc(100dvh-var(--header-height))] overflow-y-auto scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-muted-foreground bg-card">{/* KPI Cards */}- <div className="grid w-full gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4">+ <div className="grid w-full gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 compact:grid-cols-2 compact:gap-3 compact:[&>:last-child:nth-child(odd)]:col-span-2"><MetricCardicon={<LuCircleAlert />}title={<Trans>Open Issues</Trans>}@@ -420,9 +422,9 @@ export default function QualityDashboard() {{/* Unified Chart Card */}<Card>- <HStack className="justify-between items-center">+ <HStack className="justify-between items-center compact:flex-col compact:items-start compact:gap-2"><CardHeader>- <div className="flex w-full justify-start items-center gap-2">+ <div className="flex w-full justify-start items-center gap-2 compact:flex-wrap"><DropdownMenu><DropdownMenuTrigger asChild><Button@@ -452,7 +454,7 @@ export default function QualityDashboard() {onChange={setIssueTypeId}options={typeOptions}size="sm"- className="font-medium text-sm min-w-[160px]"+ className="font-medium text-sm min-w-[160px] compact:text-sm"/></div></CardHeader>@@ -487,7 +489,7 @@ export default function QualityDashboard() {</CardAction></HStack><CardContent className="flex-col gap-4">- <div className="h-[30dvw] md:h-[23dvw] min-h-[300px]">+ <div className="h-[30dvw] md:h-[23dvw] min-h-[300px] compact:h-[200px] compact:min-h-0">{selectedChart === "weeklyTracking" && (<ChartContainerconfig={localizedChartConfig}@@ -502,7 +504,12 @@ export default function QualityDashboard() {tickFormatter={(v) => formatWeekLabel(v, locale)}minTickGap={32}/>- <YAxis tickLine={false} axisLine={false} />+ <YAxis+ tickLine={false}+ axisLine={false}+ // Phones: the 200pt chart would drop a tick; keep all five like desktop.+ {...(isCompact ? { interval: 0 } : {})}+ /><ChartTooltipcontent={<ChartTooltipContentdiff --git a/apps/erp/app/routes/x+/quote+/new.tsx b/apps/erp/app/routes/x+/quote+/new.tsxindex d196920231..f3f6a5db13 100644--- a/apps/erp/app/routes/x+/quote+/new.tsx+++ b/apps/erp/app/routes/x+/quote+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { getLocalTimeZone, now, toCalendarDate } from "@internationalized/date";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useUrlParams, useUser } from "~/hooks";import type { QuotationStatusType } from "~/modules/sales";import { insertQuote, quoteValidator } from "~/modules/sales";@@ -122,8 +123,8 @@ export default function QuoteNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><QuoteForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/reimbursements+/$reimbursementId._index.tsx b/apps/erp/app/routes/x+/reimbursements+/$reimbursementId._index.tsxindex e10c860bb8..ed82b15f90 100644--- a/apps/erp/app/routes/x+/reimbursements+/$reimbursementId._index.tsx+++ b/apps/erp/app/routes/x+/reimbursements+/$reimbursementId._index.tsx@@ -10,6 +10,11 @@ import { redirect } from "@carbon/utils";import { Trans, useLingui } from "@lingui/react/macro";import type { LoaderFunctionArgs } from "react-router";import { Form, Link, useLoaderData, useNavigation } from "react-router";+import {+ RecordAction,+ RecordHero,+ RecordPhoneChrome+} from "~/components/Layout/RecordHeader";import { Confirm } from "~/components/Modals";import { usePermissions } from "~/hooks";import {@@ -181,40 +186,51 @@ export default function ReimbursementDetailRoute() {return (<VStack spacing={4} className="w-full">- <HStack className="w-full justify-end">+ {/* No hero; it still zeroes --header-height on phones. */}+ <RecordHero />+ <RecordPhoneChrome />+ <HStack className="w-full justify-end compact:hidden">{canPay && (- <Button variant="primary" onClick={payModal.onOpen}>- <Trans>Pay expense</Trans>- </Button>+ <RecordAction slot="primary">+ <Button variant="primary" onClick={payModal.onOpen}>+ <Trans>Pay expense</Trans>+ </Button>+ </RecordAction>)}{isDraft && canUpdate && (- <Button variant="secondary" asChild>- <Link to={path.to.reimbursementEdit(reimbursement.id)}>- <Trans>Edit</Trans>- </Link>- </Button>+ <RecordAction slot="secondary">+ <Button variant="secondary" asChild>+ <Link to={path.to.reimbursementEdit(reimbursement.id)}>+ <Trans>Edit</Trans>+ </Link>+ </Button>+ </RecordAction>)}{canPost && (- <Form- method="post"- action={path.to.reimbursementPost(reimbursement.id)}- >- <Button- type="submit"- variant="primary"- isLoading={- navigation.formAction ===- path.to.reimbursementPost(reimbursement.id)- }+ <RecordAction slot="primary">+ <Form+ method="post"+ action={path.to.reimbursementPost(reimbursement.id)}>- <Trans>Post</Trans>- </Button>- </Form>+ <Button+ type="submit"+ variant="primary"+ isLoading={+ navigation.formAction ===+ path.to.reimbursementPost(reimbursement.id)+ }+ >+ <Trans>Post</Trans>+ </Button>+ </Form>+ </RecordAction>)}{canVoid && (- <Button variant="destructive" onClick={voidModal.onOpen}>- <Trans>Void</Trans>- </Button>+ <RecordAction slot="overflow">+ <Button variant="destructive" onClick={voidModal.onOpen}>+ <Trans>Void</Trans>+ </Button>+ </RecordAction>)}</HStack>diff --git a/apps/erp/app/routes/x+/resources+/_index.tsx b/apps/erp/app/routes/x+/resources+/_index.tsxindex 01fd217c35..aca72598f0 100644--- a/apps/erp/app/routes/x+/resources+/_index.tsx+++ b/apps/erp/app/routes/x+/resources+/_index.tsx@@ -13,6 +13,7 @@ import {CardHeader,CardTitle,Combobox,+ cn,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,@@ -30,6 +31,7 @@ import {Th,Thead,Tr,+ useCompact,VStack} from "@carbon/react";import type { ChartConfig } from "@carbon/react/Chart";@@ -55,7 +57,7 @@ import {LuWrench} from "react-icons/lu";import type { LoaderFunctionArgs } from "react-router";-import { Await, useLoaderData } from "react-router";+import { Await, Link, useLoaderData } from "react-router";import { Bar, BarChart, CartesianGrid, XAxis, YAxis } from "recharts";import { DateSelect, Empty, Hyperlink, MetricCard } from "~/components";import { CSVLink } from "~/components/CSVLink";@@ -136,6 +138,7 @@ export async function loader({ request }: LoaderFunctionArgs) {export default function MaintenanceDashboard() {const { t } = useLingui();+ const isCompact = useCompact();const {openDispatches,openScheduled,@@ -353,7 +356,7 @@ export default function MaintenanceDashboard() {return (<div className="flex flex-col gap-4 w-full p-4 h-[calc(100dvh-var(--header-height))] overflow-y-auto scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-muted-foreground bg-card">- <div className="grid w-full gap-4 grid-cols-1 lg:grid-cols-3">+ <div className="grid w-full gap-4 grid-cols-1 lg:grid-cols-3 compact:grid-cols-2 compact:gap-3 compact:[&>:last-child:nth-child(odd)]:col-span-2"><MetricCardicon={<LuWrench />}title={<Trans>Open Dispatches</Trans>}@@ -386,15 +389,19 @@ export default function MaintenanceDashboard() {</div><Card>- <HStack className="justify-between items-center">+ <HStack className="justify-between items-center compact:flex-col compact:items-stretch compact:space-x-0"><CardHeader>- <div className="flex w-full justify-start items-center gap-2">+ <div className="flex w-full justify-start items-center gap-2 compact:flex-wrap"><DropdownMenu><DropdownMenuTrigger asChild><Buttonvariant="secondary"rightIcon={<LuChevronDown />}- className="hover:bg-background/80"+ className={cn(+ "hover:bg-background/80",+ // Phones: the KPI picker reads as the section title.+ "compact:px-0 compact:bg-transparent compact:shadow-none compact:dark:bg-transparent compact:text-[17px] compact:font-semibold compact:text-foreground"+ )}><span>{kpiLabels[selectedKpiData.key]}</span></Button>@@ -419,7 +426,7 @@ export default function MaintenanceDashboard() {onChange={setWorkCenterId}options={workCenterOptions}size="sm"- className="min-w-[160px] gap-4"+ className="min-w-[160px] gap-4 compact:min-w-0"/></div></CardHeader>@@ -436,6 +443,7 @@ export default function MaintenanceDashboard() {variant="secondary"icon={<LuEllipsisVertical />}aria-label={t`More`}+ className="compact:rounded-full"/></DropdownMenuTrigger><DropdownMenuContent align="end">@@ -481,12 +489,12 @@ export default function MaintenanceDashboard() {</VStack><LoadingisLoading={isFetching}- className="h-[30dvw] md:h-[23dvw] w-full"+ className="h-[30dvw] md:h-[23dvw] w-full compact:h-[150px]">{selectedKpi === "worstPerformingMachines" ? (<ChartContainerconfig={chartConfig}- className="aspect-auto h-[30dvw] md:h-[23dvw] w-full"+ className="aspect-auto h-[30dvw] md:h-[23dvw] w-full compact:h-[150px]"><BarChartaccessibilityLayer@@ -518,7 +526,7 @@ export default function MaintenanceDashboard() {) : (<ChartContainerconfig={chartConfig}- className="aspect-auto h-[30dvw] md:h-[23dvw] w-full"+ className="aspect-auto h-[30dvw] md:h-[23dvw] w-full compact:h-[150px]"><BarChart accessibilityLayer data={kpiFetcher.data?.data ?? []}><CartesianGrid vertical={false} />@@ -526,12 +534,17 @@ export default function MaintenanceDashboard() {dataKey="value"tickLine={false}axisLine={false}+ {...(isCompact ? { width: 64 } : {})}tickFormatter={(value) => {if (["mttr", "mtbf"].includes(selectedKpiData.key)) {- return formatDurationMilliseconds(+ const duration = formatDurationMilliseconds((value as number) * 1000,{ style: "short" });+ // Recharts wraps ticks on spaces; keep "3h, 20m" on one line.+ return isCompact+ ? duration.replace(/ /g, "\u00a0")+ : duration;}if (["sparePartCost"].includes(selectedKpiData.key)) {return currencyFormatter.format(value as number);@@ -657,6 +670,7 @@ type DispatchRow = {function DispatchTable({ data }: { data: DispatchRow[] }) {const workCenters = useWorkCenters();+ const isCompact = useCompact();const getWorkCenterName = (workCenterId: string | null) => {if (!workCenterId) return "-";@@ -664,6 +678,38 @@ function DispatchTable({ data }: { data: DispatchRow[] }) {return wc?.label ?? "-";};+ // Phone: the 4-column table becomes a stacked list; each row opens the dispatch.+ if (isCompact) {+ return (+ <ul className="flex w-full flex-col divide-y divide-border">+ {data.map((dispatch) => (+ <li key={dispatch.id}>+ <Link+ to={path.to.maintenanceDispatch(dispatch.id)}+ className="flex min-h-14 flex-col justify-center gap-1 py-2 active:bg-accent"+ >+ <span className="flex min-w-0 items-center gap-1 text-base font-medium text-foreground">+ <LuWrench className="size-4 shrink-0" />+ <span className="truncate">+ {dispatch.maintenanceDispatchId}+ </span>+ </span>+ <span className="truncate text-[13px] text-muted-foreground">+ {getWorkCenterName(dispatch.workCenterId)}+ </span>+ <span className="flex items-center gap-2">+ <MaintenanceStatus status={dispatch.status} />+ <MaintenanceSource+ source={dispatch.source as (typeof maintenanceSource)[number]}+ />+ </span>+ </Link>+ </li>+ ))}+ </ul>+ );+ }+return (<Table><Thead>diff --git a/apps/erp/app/routes/x+/resources+/assignments.$trainingId.tsx b/apps/erp/app/routes/x+/resources+/assignments.$trainingId.tsxindex c683e1d32c..04d5d59eb5 100644--- a/apps/erp/app/routes/x+/resources+/assignments.$trainingId.tsx+++ b/apps/erp/app/routes/x+/resources+/assignments.$trainingId.tsx@@ -262,7 +262,7 @@ export default function TrainingAssignmentDetailRoute() {</HStack></HStack></DrawerHeader>- <DrawerBody className="p-0">+ <DrawerBody className="p-0 compact:p-0"><VStack spacing={0} className="h-full w-full"><div className="p-4 border-b flex flex-col gap-4 w-full"><div className="relative">diff --git a/apps/erp/app/routes/x+/resources+/assignments.tsx b/apps/erp/app/routes/x+/resources+/assignments.tsxindex e093f4e2d6..194bed773a 100644--- a/apps/erp/app/routes/x+/resources+/assignments.tsx+++ b/apps/erp/app/routes/x+/resources+/assignments.tsx@@ -117,6 +117,7 @@ const TrainingAssignmentsTable = memo(</Hyperlink>),meta: {+ mobile: "P1",icon: <LuBookOpen />}},@@ -135,6 +136,7 @@ const TrainingAssignmentsTable = memo(header: t`Period`,cell: ({ row }) => row.original.currentPeriod ?? "-",meta: {+ mobile: "P3",icon: <LuClock />}},@@ -208,6 +210,7 @@ const TrainingAssignmentsTable = memo(/>),meta: {+ mobile: "P2",icon: <LuChartColumnIncreasing />}}diff --git a/apps/erp/app/routes/x+/sales+/_index.tsx b/apps/erp/app/routes/x+/sales+/_index.tsxindex 0caf523108..60000eda95 100644--- a/apps/erp/app/routes/x+/sales+/_index.tsx+++ b/apps/erp/app/routes/x+/sales+/_index.tsx@@ -381,7 +381,7 @@ export default function SalesDashboard() {return (<div className="flex flex-col gap-4 w-full p-4 h-[calc(100dvh-var(--header-height))] overflow-y-auto scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-muted-foreground bg-card">- <div className="grid w-full gap-4 grid-cols-1 lg:grid-cols-3">+ <div className="grid w-full gap-4 grid-cols-1 lg:grid-cols-3 compact:grid-cols-2 compact:gap-3 compact:[&>:last-child:nth-child(odd)]:col-span-2"><MetricCardicon={<RiProgress2Line />}title={<Trans>Open RFQs</Trans>}@@ -414,9 +414,9 @@ export default function SalesDashboard() {</div><Card>- <HStack className="justify-between items-center">+ <HStack className="justify-between items-center compact:flex-col compact:items-stretch"><CardHeader>- <div className="flex w-full justify-start items-center gap-2">+ <div className="flex w-full justify-start items-center gap-2 compact:flex-wrap"><DropdownMenu><DropdownMenuTrigger asChild><Button@@ -447,11 +447,11 @@ export default function SalesDashboard() {onChange={setCustomerId}options={customerOptions}size="sm"- className="min-w-[160px] gap-4"+ className="min-w-[160px] gap-4 compact:min-w-0"/></div></CardHeader>- <CardAction className="flex-row items-center gap-2">+ <CardAction className="flex-row items-center gap-2 compact:pt-0"><DateSelectvalue={interval}onValueChange={onIntervalChange}@@ -503,7 +503,7 @@ export default function SalesDashboard() {</VStack><LoadingisLoading={isFetching}- className="h-[30dvw] md:h-[23dvw] w-full"+ className="h-[30dvw] md:h-[23dvw] w-full compact:h-[150px]">{selectedKpi === "salesFunnel" ? (<FunnelChart@@ -514,7 +514,7 @@ export default function SalesDashboard() {) : (<ChartContainerconfig={chartConfig}- className="aspect-auto h-[30dvw] md:h-[23dvw] w-full"+ className="aspect-auto h-[30dvw] md:h-[23dvw] w-full compact:h-[150px]"><BarChart accessibilityLayer data={kpiFetcher.data?.data ?? []}><CartesianGrid vertical={false} />@@ -719,7 +719,10 @@ function SalesOrderDocumentRow({ doc }: { doc: SalesOrder }) {return (<Tr><Td>- <Hyperlink to={path.to.salesOrder(doc.id!)}>+ <Hyperlink+ className="compact:min-h-11"+ to={path.to.salesOrder(doc.id!)}+ ><HStack spacing={1}><RiProgress8Line className="size-4" /><span>{doc.salesOrderId}</span>@@ -740,7 +743,7 @@ function QuoteDocumentRow({ doc }: { doc: Quotation }) {return (<Tr><Td>- <Hyperlink to={path.to.quote(doc.id!)}>+ <Hyperlink className="compact:min-h-11" to={path.to.quote(doc.id!)}><HStack spacing={1}><RiProgress4Line className="size-4" /><span>{doc.quoteId}</span>@@ -761,7 +764,7 @@ function RfqDocumentRow({ doc }: { doc: SalesRFQ }) {return (<Tr><Td>- <Hyperlink to={path.to.salesRfq(doc.id!)}>+ <Hyperlink className="compact:min-h-11" to={path.to.salesRfq(doc.id!)}><HStack spacing={1}><RiProgress2Line className="size-4" /><span>{doc.rfqId}</span>diff --git a/apps/erp/app/routes/x+/sales-invoice+/new.tsx b/apps/erp/app/routes/x+/sales-invoice+/new.tsxindex 156f6d2010..75c5d28482 100644--- a/apps/erp/app/routes/x+/sales-invoice+/new.tsx+++ b/apps/erp/app/routes/x+/sales-invoice+/new.tsx@@ -11,6 +11,7 @@ import { validationError, validator } from "@carbon/form";import { getErrorMessage, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUrlParams, useUser } from "~/hooks";import {createSalesInvoiceFromSalesOrder,@@ -154,8 +155,8 @@ export default function SalesInvoiceNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><SalesInvoiceForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/sales-order+/new.tsx b/apps/erp/app/routes/x+/sales-order+/new.tsxindex c2ad013548..834991611a 100644--- a/apps/erp/app/routes/x+/sales-order+/new.tsx+++ b/apps/erp/app/routes/x+/sales-order+/new.tsx@@ -9,6 +9,7 @@ import { validationError, validator } from "@carbon/form";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useUrlParams, useUser } from "~/hooks";import { insertSalesOrder, salesOrderValidator } from "~/modules/sales";import { SalesOrderForm } from "~/modules/sales/ui/SalesOrder";@@ -109,8 +110,8 @@ export default function SalesOrderNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><SalesOrderForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/sales-return-order+/new.tsx b/apps/erp/app/routes/x+/sales-return-order+/new.tsxindex 77338af3a1..7c175a8962 100644--- a/apps/erp/app/routes/x+/sales-return-order+/new.tsx+++ b/apps/erp/app/routes/x+/sales-return-order+/new.tsx@@ -9,6 +9,7 @@ import { validationError, validator } from "@carbon/form";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUrlParams, useUser } from "~/hooks";import {insertSalesReturnOrder,@@ -114,8 +115,8 @@ export default function SalesReturnOrderNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><SalesReturnOrderForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/sales-rfq+/new.tsx b/apps/erp/app/routes/x+/sales-rfq+/new.tsxindex 87e4dc86c8..7f6d537cb6 100644--- a/apps/erp/app/routes/x+/sales-rfq+/new.tsx+++ b/apps/erp/app/routes/x+/sales-rfq+/new.tsx@@ -11,6 +11,7 @@ import { validationError, validator } from "@carbon/form";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUrlParams, useUser } from "~/hooks";import { upsertDocument } from "~/modules/documents";import { resolveItemIdFromExtractedText } from "~/modules/items";@@ -214,8 +215,8 @@ export default function SalesRFQNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><SalesRFQForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/scheduling+/_layout.tsx b/apps/erp/app/routes/x+/scheduling+/_layout.tsxindex 78389765c7..f7bd89be0d 100644--- a/apps/erp/app/routes/x+/scheduling+/_layout.tsx+++ b/apps/erp/app/routes/x+/scheduling+/_layout.tsx@@ -5,6 +5,7 @@import { msg } from "@lingui/core/macro";import type { MetaFunction } from "react-router";import { Outlet } from "react-router";+import { ProductionSections } from "~/modules/production/ui/useProductionSubmodules";import type { Handle } from "~/utils/handle";import { path } from "~/utils/path";@@ -18,7 +19,10 @@ export const handle: Handle = {realtime: ["job", "jobOperation"],breadcrumb: msg`Production`,to: path.to.production,- module: "production"+ module: "production",+ // Phones: this route is a section of its module, so it gets the module's+ // section switcher there (desktop shows no sidebar here, unchanged).+ compactSidebar: ProductionSections};export default function SchedulingRoute() {diff --git a/apps/erp/app/routes/x+/service+/$itemId.tsx b/apps/erp/app/routes/x+/service+/$itemId.tsxindex 0e501e0a11..2b17cf84b6 100644--- a/apps/erp/app/routes/x+/service+/$itemId.tsx+++ b/apps/erp/app/routes/x+/service+/$itemId.tsx@@ -233,6 +233,7 @@ export default function ServiceRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={isManufactured ? t`Manufacturing` : t`Used In`}explorer={<div className="flex flex-col h-full">{isManufactured ? (diff --git a/apps/erp/app/routes/x+/service+/new.tsx b/apps/erp/app/routes/x+/service+/new.tsxindex 82d46f73b8..51de251232 100644--- a/apps/erp/app/routes/x+/service+/new.tsx+++ b/apps/erp/app/routes/x+/service+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { serviceValidator, upsertService } from "~/modules/items";import { ServiceForm } from "~/modules/items/ui/Services";import { setCustomFields } from "~/utils/form";@@ -86,8 +87,8 @@ export default function ServicesNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><ServiceForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/settings+/accounting.tsx b/apps/erp/app/routes/x+/settings+/accounting.tsxindex 2f9c9a1853..a75faae819 100644--- a/apps/erp/app/routes/x+/settings+/accounting.tsx+++ b/apps/erp/app/routes/x+/settings+/accounting.tsx@@ -15,7 +15,6 @@ import {CardFooter,CardHeader,CardTitle,- Heading,HStack,ScrollArea,Switch,@@ -36,6 +35,7 @@ import {Number as NumberInput,Submit} from "~/components/Form";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import { useFlags } from "~/hooks";import { getDefaultAccounts } from "~/modules/accounting";import {@@ -235,13 +235,10 @@ export default function AccountingSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>Accounting</Trans>- </Heading>+ </SettingsPageHeading><Card><CardHeader>@@ -417,7 +414,7 @@ export default function AccountingSettingsRoute() {)}</Card></ValidatedForm>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/audit-logs.details.tsx b/apps/erp/app/routes/x+/settings+/audit-logs.details.tsxindex f8998659b7..626f7958ae 100644--- a/apps/erp/app/routes/x+/settings+/audit-logs.details.tsx+++ b/apps/erp/app/routes/x+/settings+/audit-logs.details.tsx@@ -69,7 +69,7 @@ export default function AuditLogDetailsRoute() {<Trans>All Audit Logs</Trans></DrawerTitle></DrawerHeader>- <DrawerBody className="p-0">+ <DrawerBody className="p-0 compact:p-0"><AuditLogTable entries={entries} count={count} /></DrawerBody></DrawerContent>diff --git a/apps/erp/app/routes/x+/settings+/audit-logs.tsx b/apps/erp/app/routes/x+/settings+/audit-logs.tsxindex 465840708c..2938761335 100644--- a/apps/erp/app/routes/x+/settings+/audit-logs.tsx+++ b/apps/erp/app/routes/x+/settings+/audit-logs.tsx@@ -16,7 +16,7 @@ import {} from "@carbon/ee/audit.server";import { requireFeature } from "@carbon/ee/plan.server";import { getLogger } from "@carbon/logger";-import { Button, Heading, ScrollArea, VStack } from "@carbon/react";+import { Button, ScrollArea } from "@carbon/react";import {isUnaffectedByNavigation,redirect,@@ -31,6 +31,7 @@ import type {ShouldRevalidateFunction} from "react-router";import { Link, Outlet, useLoaderData } from "react-router";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import { usePlanGate } from "~/hooks/usePlanGate";import { AuditLogSettings, AuditLogUpgradeOverlay } from "~/modules/settings";import type { Handle } from "~/utils/handle";@@ -213,14 +214,11 @@ export default function AuditLogRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <div className="flex items-center justify-between w-full">- <Heading size="h3">+ <SettingsPage className="gap-4">+ <div className="flex items-center justify-between w-full compact:justify-end">+ <SettingsPageHeading><Trans>Audit Logs</Trans>- </Heading>+ </SettingsPageHeading>{enabled && (<Button variant="secondary" leftIcon={<LuHistory />} asChild><Link to={path.to.auditLogDetails}>@@ -235,7 +233,7 @@ export default function AuditLogRoute() {controlled={controlled}/>{enabled && <Outlet />}- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/backups.tsx b/apps/erp/app/routes/x+/settings+/backups.tsxindex 30b104a090..521b8e5a89 100644--- a/apps/erp/app/routes/x+/settings+/backups.tsx+++ b/apps/erp/app/routes/x+/settings+/backups.tsx@@ -27,7 +27,6 @@ import {CardFooter,CardHeader,CardTitle,- Heading,HStack,ScrollArea,toast,@@ -50,6 +49,7 @@ import {import { z } from "zod";import { DateTime } from "~/components";import { Confirm } from "~/components/Modals";+import { SettingsPageHeading } from "~/components/SettingsPage";import type { CompanyBackupSummary } from "~/modules/settings";import {deleteCompanyBackup,@@ -601,8 +601,10 @@ export default function BackupsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <div className="py-12 px-4 max-w-[72rem] mx-auto flex flex-col gap-4">- <Heading size="h3">Backups</Heading>+ <div className="py-12 px-4 max-w-[72rem] mx-auto flex flex-col gap-4 compact:py-3">+ <SettingsPageHeading>+ <Trans>Backups</Trans>+ </SettingsPageHeading>{/* Create + Restore — equal-height cards, footers aligned. */}<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-stretch">@@ -864,7 +866,7 @@ export default function BackupsRoute() {<buttontype="button"onClick={openExportProgress}- className="flex w-full items-center justify-between rounded-lg border p-3 text-left transition-colors hover:bg-muted/50"+ className="flex w-full items-center justify-between rounded-lg border p-3 text-left transition-colors hover:bg-muted/50 compact:border-0 compact:p-0 compact:rounded-none"><VStack spacing={0}><span className="text-sm font-medium">@@ -919,7 +921,7 @@ function BackupRow({ file }: { file: CompanyBackupSummary }) {return (<HStack- className={`w-full justify-between border rounded-lg p-3 ${+ className={`w-full justify-between border rounded-lg p-3 compact:border-0 compact:p-0 compact:rounded-none ${file.status === "pending" || isDeleting ? "opacity-70" : ""}`}>diff --git a/apps/erp/app/routes/x+/settings+/billing.tsx b/apps/erp/app/routes/x+/settings+/billing.tsxindex bbbd4011f6..ac34993a39 100644--- a/apps/erp/app/routes/x+/settings+/billing.tsx+++ b/apps/erp/app/routes/x+/settings+/billing.tsx@@ -35,6 +35,7 @@ import { useState } from "react";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { data, Form, useLoaderData, useNavigation } from "react-router";import { z } from "zod";+import { SettingsPage } from "~/components/SettingsPage";import { usePermissions, useUser } from "~/hooks";import type { Handle } from "~/utils/handle";import { path } from "~/utils/path";@@ -192,10 +193,7 @@ export default function PaymentSettings() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >+ <SettingsPage className="gap-4"><Heading size="h3"><Trans>Billing</Trans></Heading>@@ -344,7 +342,7 @@ export default function PaymentSettings() {</ValidatedForm></>)}- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/companies.tsx b/apps/erp/app/routes/x+/settings+/companies.tsxindex 1102a6553a..66106358d1 100644--- a/apps/erp/app/routes/x+/settings+/companies.tsx+++ b/apps/erp/app/routes/x+/settings+/companies.tsx@@ -7,7 +7,6 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { getCarbonServiceRole } from "@carbon/auth/client.server";import { flash } from "@carbon/auth/session.server";import {- Heading,HStack,Tabs,TabsContent,@@ -20,7 +19,7 @@ import {redirect} from "@carbon/utils";import { msg } from "@lingui/core/macro";-import { useLingui } from "@lingui/react/macro";+import { Trans, useLingui } from "@lingui/react/macro";import { useCallback } from "react";import type {LoaderFunctionArgs,@@ -28,6 +27,7 @@ import type {} from "react-router";import { Outlet, useLoaderData, useNavigate } from "react-router";import { New } from "~/components";+import { SettingsPageHeading } from "~/components/SettingsPage";import { getSubsidiaries } from "~/modules/settings";import {CompaniesListView,@@ -92,9 +92,11 @@ export default function SubsidiariesRoute() {return (<Tabs defaultValue="tree" className="w-full">- <div className="flex px-4 py-3 items-center space-x-4 justify-between bg-card border-b border-border w-full">- <Heading size="h3">Companies</Heading>- <HStack>+ <div className="flex px-4 py-3 items-center space-x-4 justify-between bg-card border-b border-border w-full compact:justify-start compact:p-0 compact:border-b-0">+ <SettingsPageHeading>+ <Trans>Companies</Trans>+ </SettingsPageHeading>+ <HStack className="compact:w-full"><TabsList><TabsTrigger value="tree">Tree View</TabsTrigger><TabsTrigger value="list">List View</TabsTrigger>diff --git a/apps/erp/app/routes/x+/settings+/company.tsx b/apps/erp/app/routes/x+/settings+/company.tsxindex f697dbdef0..621773b11d 100644--- a/apps/erp/app/routes/x+/settings+/company.tsx+++ b/apps/erp/app/routes/x+/settings+/company.tsx@@ -16,14 +16,15 @@ import {Copy,Heading,HStack,- ScrollArea,- VStack+ ScrollArea} from "@carbon/react";import { msg } from "@lingui/core/macro";import { Trans, useLingui } from "@lingui/react/macro";import { LuKeySquare, LuRocket } from "react-icons/lu";import type { ActionFunctionArgs } from "react-router";import { data, Link } from "react-router";+import { AppBarActions } from "~/components/Layout/Mobile";+import { SettingsPage } from "~/components/SettingsPage";import { useRouteData } from "~/hooks";import { useImplementationReopenItem } from "~/hooks/useImplementationNavItem";import type { Company as CompanyType } from "~/modules/settings";@@ -140,11 +141,8 @@ export default function Company() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <HStack spacing={1} className="items-center">+ <SettingsPage className="gap-4">+ <HStack spacing={1} className="items-center compact:hidden"><Heading size="h3"><Trans>Company</Trans></Heading>@@ -156,6 +154,15 @@ export default function Company() {className="w-auto"/></HStack>+ <AppBarActions>+ <Copy+ text={company.id ?? ""}+ label={t`Copy company unique identifier`}+ icon={<LuKeySquare />}+ variant="ghost"+ size="lg"+ />+ </AppBarActions><Card><CardHeader><div className="flex items-start justify-between gap-3">@@ -189,7 +196,7 @@ export default function Company() {<CompanyForm company={initialValues} /></CardContent></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/demo-data.tsx b/apps/erp/app/routes/x+/settings+/demo-data.tsxindex 25184615dc..b15462c6f1 100644--- a/apps/erp/app/routes/x+/settings+/demo-data.tsx+++ b/apps/erp/app/routes/x+/settings+/demo-data.tsx@@ -7,12 +7,13 @@ import { assertIsPost, error } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { DATASETS, datasetKeys } from "@carbon/database/datasets";-import { Heading, toast, VStack } from "@carbon/react";+import { toast, VStack } from "@carbon/react";import { msg } from "@lingui/core/macro";import { Trans } from "@lingui/react/macro";import { useEffect, useMemo, useRef, useState } from "react";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { data, useFetcher, useLoaderData, useRevalidator } from "react-router";+import { SettingsPageHeading } from "~/components/SettingsPage";import type { CompanyTemplateRun } from "~/modules/settings";import { getCompanyTemplateRun } from "~/modules/settings";import { purgeCorruptedRows } from "~/modules/settings/backups.server";@@ -300,11 +301,11 @@ export default function DemoDataRoute() {);return (- <VStack spacing={4} className="p-8 w-full max-w-4xl mx-auto">+ <VStack spacing={4} className="p-8 w-full max-w-4xl mx-auto compact:p-4"><VStack spacing={1}>- <Heading size="h3">+ <SettingsPageHeading><Trans>Demo Data</Trans>- </Heading>+ </SettingsPageHeading><p className="text-muted-foreground text-sm"><Trans>Fill this company with a realistic industry story so every screendiff --git a/apps/erp/app/routes/x+/settings+/inventory.tsx b/apps/erp/app/routes/x+/settings+/inventory.tsxindex 096dea3a0c..2a57d7da76 100644--- a/apps/erp/app/routes/x+/settings+/inventory.tsx+++ b/apps/erp/app/routes/x+/settings+/inventory.tsx@@ -22,10 +22,8 @@ import {CardHeader,CardTitle,ChoiceSelect,- Heading,ScrollArea,- toast,- VStack+ toast} from "@carbon/react";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";@@ -42,6 +40,7 @@ import {} from "react-icons/lu";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useFetcher, useLoaderData } from "react-router";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import SettingsSectionHeader from "~/components/SettingsSectionHeader";import {getCompanySettings,@@ -220,13 +219,10 @@ export default function InventorySettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>Inventory</Trans>- </Heading>+ </SettingsPageHeading><SettingsSectionHeader><Trans>Kanban</Trans>@@ -413,7 +409,7 @@ export default function InventorySettingsRoute() {</CardFooter></ValidatedForm></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/items.tsx b/apps/erp/app/routes/x+/settings+/items.tsxindex 704b4309ca..643e533557 100644--- a/apps/erp/app/routes/x+/settings+/items.tsx+++ b/apps/erp/app/routes/x+/settings+/items.tsx@@ -13,7 +13,6 @@ import {CardFooter,CardHeader,CardTitle,- Heading,HStack,ScrollArea,Switch,@@ -26,6 +25,7 @@ import { Trans, useLingui } from "@lingui/react/macro";import { useCallback, useEffect } from "react";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useFetcher, useLoaderData } from "react-router";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import SettingsSectionHeader from "~/components/SettingsSectionHeader";import { plmReleaseControl } from "~/modules/items";import {@@ -203,13 +203,10 @@ export default function ItemsSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>Items</Trans>- </Heading>+ </SettingsPageHeading><SettingsSectionHeader><Trans>Identifiers</Trans>@@ -432,7 +429,7 @@ export default function ItemsSettingsRoute() {</CardFooter></ValidatedForm></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/logos.tsx b/apps/erp/app/routes/x+/settings+/logos.tsxindex e84904c77e..d39da7542a 100644--- a/apps/erp/app/routes/x+/settings+/logos.tsx+++ b/apps/erp/app/routes/x+/settings+/logos.tsx@@ -10,15 +10,14 @@ import {CardDescription,CardHeader,CardTitle,- Heading,- ScrollArea,- VStack+ ScrollArea} from "@carbon/react";import { msg } from "@lingui/core/macro";import { Trans } from "@lingui/react/macro";import { LuMoon, LuSun } from "react-icons/lu";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import { useRouteData } from "~/hooks";import type { Company } from "~/modules/settings";import {@@ -81,15 +80,15 @@ export default function LogosRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack spacing={4} className="py-12 px-4 max-w-[60rem] h-full mx-auto">- <div className="flex w-full justify-between items-center gap-1">- <Heading size="h3">+ <SettingsPage>+ <div className="flex w-full justify-between items-center gap-1 compact:justify-end">+ <SettingsPageHeading><Trans>Logos</Trans>- </Heading>+ </SettingsPageHeading><Badge variant="outline">{maxSizeMB}MB limit</Badge></div>- <div className="grid grid-cols-2 gap-4 w-full">+ <div className="grid grid-cols-2 gap-4 w-full compact:grid-cols-1"><Card><CardHeader><CardTitle className="flex items-center gap-2">@@ -160,7 +159,7 @@ export default function LogosRoute() {<CompanyLogoForm company={company} target="logoWatermark" /></CardContent></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/people.tsx b/apps/erp/app/routes/x+/settings+/people.tsxindex 42b64978af..6bb579e76d 100644--- a/apps/erp/app/routes/x+/settings+/people.tsx+++ b/apps/erp/app/routes/x+/settings+/people.tsx@@ -16,7 +16,6 @@ import {CardHeader,CardTitle,Copy,- Heading,HStack,Modal,ModalBody,@@ -36,6 +35,7 @@ import { Trans } from "@lingui/react/macro";import { useCallback, useEffect, useState } from "react";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useFetcher, useLoaderData } from "react-router";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import { UpgradeOverlayUpgradeButton } from "~/components/UpgradeOverlay";import { usePlanGate } from "~/hooks/usePlanGate";import { getCompanySettings, updateTimeCardSetting } from "~/modules/settings";@@ -175,13 +175,10 @@ export default function PeopleSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>People</Trans>- </Heading>+ </SettingsPageHeading><Card><CardHeader>@@ -198,7 +195,7 @@ export default function PeopleSettingsRoute() {<CardContent><HStack className="justify-between items-center"><VStack className="items-start" spacing={1}>- <HStack className="items-center gap-2">+ <HStack className="items-center gap-2 compact:flex-wrap"><span className="font-medium">{(companySettings as any).consoleEnabled ? (<Trans>Console mode is enabled</Trans>@@ -206,7 +203,7 @@ export default function PeopleSettingsRoute() {<Trans>Console mode is disabled</Trans>)}</span>- <Badge variant="yellow">+ <Badge variant="yellow" className="compact:shrink-0"><Trans>Beta</Trans></Badge></HStack>@@ -249,7 +246,7 @@ export default function PeopleSettingsRoute() {<CardContent><HStack className="justify-between items-center"><VStack className="items-start" spacing={1}>- <HStack className="items-center gap-2">+ <HStack className="items-center gap-2 compact:flex-wrap"><span className="font-medium">{companySettings.timeCardEnabled ? (<Trans>Timecards are enabled</Trans>@@ -257,7 +254,7 @@ export default function PeopleSettingsRoute() {<Trans>Timecards are disabled</Trans>)}</span>- <Badge variant="yellow">+ <Badge variant="yellow" className="compact:shrink-0"><Trans>Beta</Trans></Badge></HStack>@@ -278,7 +275,7 @@ export default function PeopleSettingsRoute() {</HStack></CardContent></Card>- </VStack>+ </SettingsPage>{showPinModal && generatedPin && (<Modal open onOpenChange={(open) => !open && setShowPinModal(false)}>diff --git a/apps/erp/app/routes/x+/settings+/printing.jobs.tsx b/apps/erp/app/routes/x+/settings+/printing.jobs.tsxindex 317268fab4..ce542d6dcf 100644--- a/apps/erp/app/routes/x+/settings+/printing.jobs.tsx+++ b/apps/erp/app/routes/x+/settings+/printing.jobs.tsx@@ -219,7 +219,7 @@ export default function PrintJobsRoute() {<Trans>Print Jobs</Trans></DrawerTitle></DrawerHeader>- <DrawerBody className="p-0">+ <DrawerBody className="p-0 compact:p-0"><PrintJobsTable jobs={jobs} count={count} /></DrawerBody></DrawerContent>diff --git a/apps/erp/app/routes/x+/settings+/printing.tsx b/apps/erp/app/routes/x+/settings+/printing.tsxindex 4f0b107787..5774000c35 100644--- a/apps/erp/app/routes/x+/settings+/printing.tsx+++ b/apps/erp/app/routes/x+/settings+/printing.tsx@@ -16,7 +16,7 @@ import {upsertPrinterRoute} from "@carbon/printing";import { invalidatePrinterCache } from "@carbon/printing/printing.server";-import { Button, Heading, ScrollArea, VStack } from "@carbon/react";+import { Button, ScrollArea } from "@carbon/react";import { isUnaffectedByNavigation, labelSizes, redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import { Trans } from "@lingui/react/macro";@@ -27,6 +27,7 @@ import type {ShouldRevalidateFunction} from "react-router";import { Link, Outlet, useLoaderData } from "react-router";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import { getLocationsList, getWorkCentersList } from "~/modules/resources";import { getCompanySettings, printerRouteValidator } from "~/modules/settings";import { AssignmentsCard, PrintersCard } from "~/modules/settings/ui/Printing";@@ -244,14 +245,11 @@ export default function PrintingSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <div className="flex items-center justify-between w-full">- <Heading size="h3">+ <SettingsPage className="gap-4">+ <div className="flex items-center justify-between w-full compact:justify-end">+ <SettingsPageHeading><Trans>Printing</Trans>- </Heading>+ </SettingsPageHeading><Button variant="secondary" leftIcon={<LuPrinter />} asChild><Link to={path.to.printingSettingsJobs}><Trans>View Prints</Trans>@@ -267,7 +265,7 @@ export default function PrintingSettingsRoute() {locations={locations}workCenters={workCenters}/>- </VStack>+ </SettingsPage><Outlet /></ScrollArea>);diff --git a/apps/erp/app/routes/x+/settings+/production.tsx b/apps/erp/app/routes/x+/settings+/production.tsxindex b512c47e88..ba3aacaf0a 100644--- a/apps/erp/app/routes/x+/settings+/production.tsx+++ b/apps/erp/app/routes/x+/settings+/production.tsx@@ -14,7 +14,6 @@ import {CardFooter,CardHeader,CardTitle,- Heading,HStack,Label,ScrollArea,@@ -31,6 +30,7 @@ import { LuMapPin } from "react-icons/lu";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useFetcher, useLoaderData } from "react-router";import { Users } from "~/components/Form";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import {getCompanySettings,jobCompletedValidator,@@ -331,13 +331,10 @@ export default function ProductionSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>Production</Trans>- </Heading>+ </SettingsPageHeading><Card><CardHeader>@@ -608,7 +605,7 @@ export default function ProductionSettingsRoute() {</CardFooter></ValidatedForm></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/purchasing.tsx b/apps/erp/app/routes/x+/settings+/purchasing.tsxindex 73142d292f..f9f75fc92d 100644--- a/apps/erp/app/routes/x+/settings+/purchasing.tsx+++ b/apps/erp/app/routes/x+/settings+/purchasing.tsx@@ -22,7 +22,6 @@ import {CardFooter,CardHeader,CardTitle,- Heading,HStack,Label,ScrollArea,@@ -39,6 +38,7 @@ import { useFetcher, useLoaderData } from "react-router";import CompanyDefaultAttachmentsCard from "~/components/CompanyDefaultAttachmentsCard";import { EmailRecipients, Users } from "~/components/Form";import Country from "~/components/Form/Country";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import SettingsSectionHeader from "~/components/SettingsSectionHeader";import {accountsPayableBillingAddressValidator,@@ -416,13 +416,10 @@ export default function PurchasingSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>Purchasing</Trans>- </Heading>+ </SettingsPageHeading><SettingsSectionHeader><Trans>Documents</Trans>@@ -833,7 +830,7 @@ export default function PurchasingSettingsRoute() {</CardFooter></ValidatedForm></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/quality.tsx b/apps/erp/app/routes/x+/settings+/quality.tsxindex 1fafd1b98d..146402c7da 100644--- a/apps/erp/app/routes/x+/settings+/quality.tsx+++ b/apps/erp/app/routes/x+/settings+/quality.tsx@@ -20,7 +20,6 @@ import {CardFooter,CardHeader,CardTitle,- Heading,HStack,Label,ScrollArea,@@ -36,6 +35,7 @@ import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useFetcher, useLoaderData } from "react-router";import { z } from "zod";import { Users } from "~/components/Form";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import SettingsSectionHeader from "~/components/SettingsSectionHeader";import { getCompanySettings } from "~/modules/settings";import type { Handle } from "~/utils/handle";@@ -203,13 +203,10 @@ export default function QualitySettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>Quality</Trans>- </Heading>+ </SettingsPageHeading><SettingsSectionHeader><Trans>Notifications</Trans>@@ -407,7 +404,7 @@ export default function QualitySettingsRoute() {</CardFooter></ValidatedForm></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/resources.tsx b/apps/erp/app/routes/x+/settings+/resources.tsxindex 25abe75d27..b2c05c0cd3 100644--- a/apps/erp/app/routes/x+/settings+/resources.tsx+++ b/apps/erp/app/routes/x+/settings+/resources.tsx@@ -13,11 +13,9 @@ import {CardFooter,CardHeader,CardTitle,- Heading,Label,ScrollArea,- toast,- VStack+ toast} from "@carbon/react";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";@@ -26,6 +24,7 @@ import { useEffect } from "react";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useFetcher, useLoaderData } from "react-router";import { Users } from "~/components/Form";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import SettingsSectionHeader from "~/components/SettingsSectionHeader";import {getCompany,@@ -154,13 +153,10 @@ export default function ResourcesSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>Resources</Trans>- </Heading>+ </SettingsPageHeading><SettingsSectionHeader><Trans>Notifications</Trans>@@ -308,7 +304,7 @@ export default function ResourcesSettingsRoute() {</CardFooter></ValidatedForm></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/sales.tsx b/apps/erp/app/routes/x+/settings+/sales.tsxindex d65eaceb00..b07aa30010 100644--- a/apps/erp/app/routes/x+/settings+/sales.tsx+++ b/apps/erp/app/routes/x+/settings+/sales.tsx@@ -22,7 +22,6 @@ import {CardHeader,CardTitle,cn,- Heading,HStack,Label,ScrollArea,@@ -38,6 +37,7 @@ import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useFetcher, useLoaderData } from "react-router";import { EmailRecipients, Users } from "~/components/Form";import Country from "~/components/Form/Country";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import SettingsSectionHeader from "~/components/SettingsSectionHeader";import {accountsReceivableBillingAddressValidator,@@ -375,13 +375,10 @@ export default function SalesSettingsRoute() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"- >- <Heading size="h3">+ <SettingsPage className="gap-4">+ <SettingsPageHeading><Trans>Sales</Trans>- </Heading>+ </SettingsPageHeading><SettingsSectionHeader><Trans>Documents</Trans>@@ -806,7 +803,7 @@ export default function SalesSettingsRoute() {</CardFooter></ValidatedForm></Card>- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/settings+/security.tsx b/apps/erp/app/routes/x+/settings+/security.tsxindex 7c05b27cfc..6ded5cd78e 100644--- a/apps/erp/app/routes/x+/settings+/security.tsx+++ b/apps/erp/app/routes/x+/settings+/security.tsx@@ -52,6 +52,7 @@ import { LuShieldCheck } from "react-icons/lu";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { data, Link, useFetcher, useLoaderData } from "react-router";import { Hidden, Input, Submit, TextArea } from "~/components/Form";+import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import { UpgradeOverlaySection } from "~/components/UpgradeOverlay";import { usePermissions } from "~/hooks";import { usePlanGate } from "~/hooks/usePlanGate";@@ -280,7 +281,7 @@ function SsoDomainRow({const submitting = fetcher.formData?.get("intent");return (- <div className="w-full rounded-md border border-border p-4">+ <div className="w-full rounded-md border border-border p-4 compact:border-0 compact:p-0 compact:rounded-none"><HStack className="w-full justify-between items-center"><HStack spacing={2}><span className="text-sm font-medium font-mono">{domain.domain}</span>@@ -443,14 +444,11 @@ export default function Security() {return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]">- <VStack- spacing={4}- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-8"- >+ <SettingsPage className="gap-8"><div className="flex flex-col gap-1 w-full">- <Heading size="h3">+ <SettingsPageHeading><Trans>Security</Trans>- </Heading>+ </SettingsPageHeading><p className="text-sm text-muted-foreground text-pretty"><Trans>Manage authentication and sign-in requirements for your company.@@ -716,7 +714,7 @@ export default function Security() {)}</>)}- </VStack>+ </SettingsPage></ScrollArea>);}diff --git a/apps/erp/app/routes/x+/supplier+/$supplierId.tsx b/apps/erp/app/routes/x+/supplier+/$supplierId.tsxindex 0158c60b2f..6b8ef8fc22 100644--- a/apps/erp/app/routes/x+/supplier+/$supplierId.tsx+++ b/apps/erp/app/routes/x+/supplier+/$supplierId.tsx@@ -94,7 +94,7 @@ export default function SupplierRoute() {return (<><SupplierHeader />- <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-4">+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-4 compact:h-auto compact:gap-0"><SupplierSidebar /><Outlet /></div>diff --git a/apps/erp/app/routes/x+/supplier+/new.tsx b/apps/erp/app/routes/x+/supplier+/new.tsxindex f6e9bbebdb..0f6ce31187 100644--- a/apps/erp/app/routes/x+/supplier+/new.tsx+++ b/apps/erp/app/routes/x+/supplier+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useSupplierApprovalRequired, useUser } from "~/hooks";import { supplierValidator, upsertSupplier } from "~/modules/purchasing";import SupplierForm from "~/modules/purchasing/ui/Supplier/SupplierForm";@@ -85,8 +86,8 @@ export default function SuppliersNewRoute() {website: ""};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage className="compact:p-0"><SupplierForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/supplier-quote+/new.tsx b/apps/erp/app/routes/x+/supplier-quote+/new.tsxindex 21702864c5..ea1fe7cf21 100644--- a/apps/erp/app/routes/x+/supplier-quote+/new.tsx+++ b/apps/erp/app/routes/x+/supplier-quote+/new.tsx@@ -9,6 +9,7 @@ import { validationError, validator } from "@carbon/form";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useCompanyToday, useUrlParams, useUser } from "~/hooks";import {insertSupplierQuote,@@ -103,8 +104,8 @@ export default function SupplierQuoteNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><SupplierQuoteForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/templates+/_index.tsx b/apps/erp/app/routes/x+/templates+/_index.tsxindex cb62cb99f0..ab893fd42c 100644--- a/apps/erp/app/routes/x+/templates+/_index.tsx+++ b/apps/erp/app/routes/x+/templates+/_index.tsx@@ -4,13 +4,29 @@import { requirePermissions } from "@carbon/auth/auth.server";import { DOCUMENT_CATALOG } from "@carbon/documents/template";-import { Badge, Button, cn, Heading, ScrollArea, VStack } from "@carbon/react";+import { Badge, Button, cn, ScrollArea, VStack } from "@carbon/react";import { Trans } from "@lingui/react/macro";import { LuChevronRight, LuFileText, LuLibrary } from "react-icons/lu";import type { LoaderFunctionArgs } from "react-router";import { Link } from "react-router";+import { GroupedContentSidebar } from "~/components/Layout";+import { SettingsPageHeading } from "~/components/SettingsPage";+import { useSettingsSubmodules } from "~/modules/settings";+import type { Handle } from "~/utils/handle";import { path } from "~/utils/path";+// Phones: the templates list is a section of Settings, so it gets the module's+// section switcher there (desktop shows no sidebar here, unchanged). Only this+// index route: the editor below it is a pushed screen with Back.+function SettingsSections() {+ const { groups } = useSettingsSubmodules();+ return <GroupedContentSidebar groups={groups} />;+}++export const handle: Handle = {+ compactSidebar: SettingsSections+};+export async function loader({ request }: LoaderFunctionArgs) {await requirePermissions(request, { view: "settings", role: "employee" });return null;@@ -35,13 +51,13 @@ export default function DocumentTemplatesIndexRoute() {<ScrollArea className="h-full w-full"><VStackspacing={4}- className="mx-auto h-full max-w-[60rem] gap-6 px-4 py-12"+ className="mx-auto h-full max-w-[60rem] gap-6 px-4 py-12 compact:py-3">- <div className="flex w-full items-start justify-between gap-4">+ <div className="flex w-full items-start justify-between gap-4 compact:flex-col compact:gap-3"><div className="flex flex-col gap-1">- <Heading size="h3">+ <SettingsPageHeading><Trans>Document Templates</Trans>- </Heading>+ </SettingsPageHeading><p className="text-sm text-muted-foreground"><Trans>Customize the layout of your PDF documents — reorder sections,diff --git a/apps/erp/app/routes/x+/templates+/shared.tsx b/apps/erp/app/routes/x+/templates+/shared.tsxindex 4ebb93020f..d0d39e00ab 100644--- a/apps/erp/app/routes/x+/templates+/shared.tsx+++ b/apps/erp/app/routes/x+/templates+/shared.tsx@@ -141,14 +141,14 @@ export default function SharedSectionsRoute() {<ScrollArea className="h-full w-full"><VStackspacing={4}- className="mx-auto h-full max-w-[60rem] gap-6 px-4 py-12"+ className="mx-auto h-full max-w-[60rem] gap-6 px-4 py-12 compact:py-3">- <div className="flex w-full items-start justify-between">+ <div className="flex w-full items-start justify-between compact:flex-col compact:items-stretch compact:gap-3"><div className="flex items-center gap-3"><Linkto={path.to.documentTemplates}aria-label="Back to templates"- className="flex size-8 items-center justify-center rounded-md border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"+ className="flex size-8 items-center justify-center rounded-md border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground compact:shrink-0 compact:hit-area"><LuArrowLeft className="size-4" /></Link>diff --git a/apps/erp/app/routes/x+/tool+/$itemId.tsx b/apps/erp/app/routes/x+/tool+/$itemId.tsxindex 4edcab6530..4fb4af49ec 100644--- a/apps/erp/app/routes/x+/tool+/$itemId.tsx+++ b/apps/erp/app/routes/x+/tool+/$itemId.tsx@@ -196,6 +196,7 @@ export default function ToolRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={isManufactured ? t`Manufacturing` : t`Used In`}explorer={<div className="flex flex-col h-full">{isManufactured ? (diff --git a/apps/erp/app/routes/x+/tool+/new.tsx b/apps/erp/app/routes/x+/tool+/new.tsxindex 593e494369..452626f83a 100644--- a/apps/erp/app/routes/x+/tool+/new.tsx+++ b/apps/erp/app/routes/x+/tool+/new.tsx@@ -10,6 +10,7 @@ import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { toolValidator, upsertTool } from "~/modules/items";import { ToolForm } from "~/modules/items/ui/Tools";import { setCustomFields } from "~/utils/form";@@ -80,8 +81,8 @@ export default function ToolsNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><ToolForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/traceability+/_layout.tsx b/apps/erp/app/routes/x+/traceability+/_layout.tsxindex 8427ed0497..c8e4fc40e8 100644--- a/apps/erp/app/routes/x+/traceability+/_layout.tsx+++ b/apps/erp/app/routes/x+/traceability+/_layout.tsx@@ -5,6 +5,7 @@import { msg } from "@lingui/core/macro";import type { MetaFunction } from "react-router";import { Outlet } from "react-router";+import { InventorySections } from "~/modules/inventory";import type { Handle } from "~/utils/handle";import { path } from "~/utils/path";@@ -17,7 +18,10 @@ export const meta: MetaFunction = () => {export const handle: Handle = {breadcrumb: msg`Inventory`,to: path.to.inventory,- module: "inventory"+ module: "inventory",+ // Phones: this route is a section of its module, so it gets the module's+ // section switcher there (desktop shows no sidebar here, unchanged).+ compactSidebar: InventorySections};export default function TraceabilityLayout() {diff --git a/apps/erp/app/routes/x+/traceability+/graph.tsx b/apps/erp/app/routes/x+/traceability+/graph.tsxindex aa4b56a84c..7aeed27020 100644--- a/apps/erp/app/routes/x+/traceability+/graph.tsx+++ b/apps/erp/app/routes/x+/traceability+/graph.tsx@@ -398,7 +398,7 @@ function TraceabilityRouteInner() {null);return (- <div className="flex bg-card h-[calc(100dvh-var(--topbar-height)-var(--content-inset))] w-full overflow-hidden scrollbar-hide">+ <div className="flex bg-card h-[calc(100dvh-var(--topbar-height)-var(--content-inset))] w-full overflow-hidden scrollbar-hide compact:flex-col"><VStack className="flex-1 min-w-0 h-full" spacing={0}><div className="flex flex-1 w-full h-full overflow-hidden"><div className="w-full h-full">diff --git a/apps/erp/app/routes/x+/training+/$id.tsx b/apps/erp/app/routes/x+/training+/$id.tsxindex 7d50903a98..8534d7bb9b 100644--- a/apps/erp/app/routes/x+/training+/$id.tsx+++ b/apps/erp/app/routes/x+/training+/$id.tsx@@ -86,6 +86,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {}export default function TrainingRoute() {+ const { t } = useLingui();const { id } = useParams();if (!id) throw new Error("Could not find id");@@ -96,6 +97,7 @@ export default function TrainingRoute() {<div className="flex h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-hidden w-full"><div className="flex flex-grow overflow-hidden"><ResizablePanels+ explorerLabel={t`Questions`}explorer={<TrainingExplorer key={`explorer-${id}`} />}content={<div className="bg-card h-[calc(100dvh-var(--topbar-height)-var(--header-height)-var(--content-inset))] overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent w-full">diff --git a/apps/erp/app/routes/x+/users+/operators.tsx b/apps/erp/app/routes/x+/users+/operators.tsxindex e7123fb183..119687f8c1 100644--- a/apps/erp/app/routes/x+/users+/operators.tsx+++ b/apps/erp/app/routes/x+/users+/operators.tsx@@ -123,6 +123,7 @@ const OperatorsTable = memo(<EmployeeAvatar size="sm" employeeId={row.original.id} />),meta: {+ mobile: "P1",icon: <LuUser />}},@@ -153,6 +154,7 @@ const OperatorsTable = memo(/>),meta: {+ mobile: "P3",icon: <LuBriefcase />}},@@ -161,6 +163,7 @@ const OperatorsTable = memo(header: "Active",cell: (item) => <Checkbox isChecked={item.getValue<boolean>()} />,meta: {+ mobile: "P2",filter: {type: "static" as const,options: [diff --git a/apps/erp/app/routes/x+/warehouse-transfer+/new.tsx b/apps/erp/app/routes/x+/warehouse-transfer+/new.tsxindex 07285f66c4..90bfbab374 100644--- a/apps/erp/app/routes/x+/warehouse-transfer+/new.tsx+++ b/apps/erp/app/routes/x+/warehouse-transfer+/new.tsx@@ -9,6 +9,7 @@ import { validationError, validator } from "@carbon/form";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";+import { NewRecordPage } from "~/components/NewRecordPage";import { useUser } from "~/hooks";import {insertWarehouseTransfer,@@ -87,8 +88,8 @@ export default function WarehouseTransferNewRoute() {};return (- <div className="max-w-4xl w-full p-2 sm:p-0 mx-auto mt-0 md:mt-8">+ <NewRecordPage><WarehouseTransferForm initialValues={initialValues} />- </div>+ </NewRecordPage>);}diff --git a/apps/erp/app/routes/x+/workflows+/runs.$runId.tsx b/apps/erp/app/routes/x+/workflows+/runs.$runId.tsxindex ccc64572af..7a157b8a45 100644--- a/apps/erp/app/routes/x+/workflows+/runs.$runId.tsx+++ b/apps/erp/app/routes/x+/workflows+/runs.$runId.tsx@@ -9,7 +9,8 @@ import {DrawerBody,DrawerContent,DrawerHeader,- DrawerTitle+ DrawerTitle,+ useCompact} from "@carbon/react";import { Trans } from "@lingui/react/macro";import type { LoaderFunctionArgs } from "react-router";@@ -79,6 +80,7 @@ export default function WorkflowRunDetailRoute() {const { run, steps, chain, recordNames, truncated } =useLoaderData<typeof loader>();const navigate = useNavigate();+ const isCompact = useCompact();return (<Draweropen@@ -86,13 +88,19 @@ export default function WorkflowRunDetailRoute() {if (!open) navigate(path.to.workflowRuns);}}>- <DrawerContent size="xl">+ <DrawerContent+ size="xl"+ // Phones: no focus ring on the first link when the sheet opens.+ onOpenAutoFocus={(e) => {+ if (isCompact) e.preventDefault();+ }}+ ><DrawerHeader><DrawerTitle><Trans>Run Details</Trans></DrawerTitle></DrawerHeader>- <DrawerBody className="p-0">+ <DrawerBody className="p-0 compact:p-0"><WorkflowRunDetailrun={run}steps={steps}diff --git a/apps/erp/app/stores/ui.ts b/apps/erp/app/stores/ui.tsindex 9b4b548b13..f73176e278 100644--- a/apps/erp/app/stores/ui.ts+++ b/apps/erp/app/stores/ui.ts@@ -18,10 +18,6 @@ interface UIStore {isSidebarOpen: boolean;setSidebarOpen: (open: boolean) => void;toggleSidebar: () => void;- /** True while the current route renders a module content sub-nav. Lets the- * mobile Topbar show a "Sections" trigger only where one exists. */- hasContentSidebar: boolean;- setHasContentSidebar: (has: boolean) => void;suggestionPrefill: SuggestionPrefill | null;requestSuggestion: (prefill: SuggestionPrefill) => void;clearSuggestionRequest: () => void;@@ -37,8 +33,6 @@ export const useUIStore = create<UIStore>()((set) => ({setSidebarOpen: (open) => set({ isSidebarOpen: open }),toggleSidebar: () =>set((state) => ({ isSidebarOpen: !state.isSidebarOpen })),- hasContentSidebar: false,- setHasContentSidebar: (has) => set({ hasContentSidebar: has }),suggestionPrefill: null,requestSuggestion: (prefill) => set({ suggestionPrefill: prefill }),clearSuggestionRequest: () => set({ suggestionPrefill: null })diff --git a/apps/erp/app/utils/handle.ts b/apps/erp/app/utils/handle.tsindex 37a9d7c00d..b8b37c8ab3 100644--- a/apps/erp/app/utils/handle.ts+++ b/apps/erp/app/utils/handle.ts@@ -20,6 +20,9 @@ export type Handle = {// full-screen detail views that provide their own left panel (e.g. the// change-order workspace) so the app doesn't stack two left sidebars.hideModuleSidebar?: boolean;+ // Phones only: the section switcher for a route that is a module section+ // but has no desktop sidebar (desktop is unchanged). Makes it a root screen.+ compactSidebar?: ComponentType;};// A breadcrumb label may be plain text/markup or a Lingui MessageDescriptordiff --git a/packages/config/tailwind/theme.css b/packages/config/tailwind/theme.cssindex 9ae641f22f..05ea91cf60 100644--- a/packages/config/tailwind/theme.css+++ b/packages/config/tailwind/theme.css@@ -7,7 +7,60 @@@custom-variant dark (&:is(.dark *));@custom-variant tall (@media (min-height: 769px));-@custom-variant hover (&:hover);+/* Hover applies where a pointer can hover, at >=768px (byte-identical to the+ old plain `&:hover` on desktop), and in apps without the phone layout (MES,+ starter), so only the ERP's phone layout drops sticky tap highlights. */+@custom-variant hover {+ @media (hover: hover) {+ &:hover {+ @slot;+ }+ }+ @media (width >= 48rem) {+ &:hover {+ @slot;+ }+ }+ :where(html:not([data-compact-ui])) &:hover {+ @slot;+ }+}++/* Phone layout: below 768px AND inside an app that opted in with+ `data-compact-ui` on <html> (the ERP). MES and starter never match, so+ shared primitives stay unchanged there. `rg "compact:"` lists the mobile surface. */+@custom-variant compact {+ @media (width < 48rem) {+ :where([data-compact-ui]) & {+ @slot;+ }+ }+}++/* A 44x44 tap target around a smaller control, drawn by ::after (use as+ `compact:hit-area`). Sets position: relative, so not for absolutely+ positioned elements, and needs the element's ::after to be free. */+@utility hit-area {+ position: relative;+ &::after {+ content: "";+ position: absolute;+ inset: calc(max(0px, (44px - 100%) / 2) * -1);+ }+}++/* Safe-area padding (needs viewport-fit=cover on the viewport meta). */+@utility pb-safe {+ padding-bottom: env(safe-area-inset-bottom);+}++@utility pt-safe {+ padding-top: env(safe-area-inset-top);+}++@utility pb-safe-4 {+ padding-bottom: calc(env(safe-area-inset-bottom) + 1rem);+}@utility bg-gradient-fade {background-image: linear-gradient(@@ -380,3 +433,31 @@line-height: 2.25rem;}}++/*+ * Compact (phone) presentation, ERP only (html[data-compact-ui], < 768px).+ * - Muted text gets a darker token in light mode to pass 4.5:1 on grey.+ * - The app bar is 52px, so frames sized from --topbar-height still fit.+ * - `.truncate` always ends in an ellipsis, whatever text-wrap utility is set.+ * - Toasts sit above the bottom chrome at every compact width; Sonner's own+ * mobileOffset only applies up to 600px.+ */+@media (width < 48rem) {+ html[data-compact-ui] {+ --topbar-height: calc(52px + env(safe-area-inset-top));+ }++ html[data-compact-ui]:not(.dark) {+ --muted-foreground: 220 3.8% 42% !important;+ }++ /* `text-pretty` / `text-balance` (CardTitle, Heading) reset the wrap mode+ that `truncate` sets, so a truncated title wrapped instead of ending in "…". */+ html[data-compact-ui] .truncate {+ white-space: nowrap;+ }++ html[data-compact-ui] [data-sonner-toaster][data-y-position="bottom"] {+ bottom: calc(var(--content-inset, 0px) + 16px);+ }+}diff --git a/packages/form/src/components/Boolean.tsx b/packages/form/src/components/Boolean.tsxindex 5ce67bf6c0..3c50c66cca 100644--- a/packages/form/src/components/Boolean.tsx+++ b/packages/form/src/components/Boolean.tsx@@ -118,7 +118,7 @@ const Boolean = forwardRef<HTMLInputElement, FormBooleanProps>(<LabelWithHelp termId={termId}>{label}</LabelWithHelp></FormLabel>)}- <HStack>+ <HStack className="compact:-ml-1"><Switchvariant={variant}{...getInputProps()}diff --git a/packages/form/src/components/Hidden.tsx b/packages/form/src/components/Hidden.tsxindex 67c04e31fe..e1a9f91d1f 100644--- a/packages/form/src/components/Hidden.tsx+++ b/packages/form/src/components/Hidden.tsx@@ -25,7 +25,11 @@ const Hidden = forwardRef<HTMLInputElement, HiddenProps>(});return (- <FormControl isInvalid={!!error}>+ // Phones: an empty hidden field must not take a row in the form.+ <FormControl+ isInvalid={!!error}+ className={error ? undefined : "compact:hidden"}+ ><InputBaseref={ref}{...inputProps}diff --git a/packages/form/src/components/Select.tsx b/packages/form/src/components/Select.tsxindex bc246aafc8..84562c2709 100644--- a/packages/form/src/components/Select.tsx+++ b/packages/form/src/components/Select.tsx@@ -181,7 +181,9 @@ export const SelectBase = forwardRef<HTMLButtonElement, SelectBaseProps>(const isNonInteractive = isReadOnly || isDisabled;return (- <HStack spacing={1}>+ // Phones: Radix's hidden native <select> follows the trigger, so a+ // space-x margin would end the trigger 4px short; use a gap instead.+ <HStack spacing={1} className="compact:space-x-0 compact:gap-1">{isInlinePreview && value && (<span className="flex flex-grow line-clamp-1 items-center">{inline(value, options)}@@ -197,7 +199,11 @@ export const SelectBase = forwardRef<HTMLButtonElement, SelectBaseProps>(ref={ref}size={size}{...props}- className={cn(!isInlinePreview && "min-w-[160px] relative")}+ className={cn(+ !isInlinePreview && "min-w-[160px] relative",+ isInlinePreview &&+ "compact:relative compact:after:absolute compact:after:-inset-2.5"+ )}inline={isInlinePreview}disabled={isNonInteractive}hideIcon={isLoading}diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 737dc2a634..d13fd92b4a 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} verschrottet"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} ausgewählt"@@ -1448,6 +1449,9 @@ msgstr "Notizen zu Ihrer Entscheidung hinzufügen..."msgid "Add Approval Requirement"msgstr "Genehmigungsanforderung hinzufügen"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "Authentifikator-App hinzufügen"@@ -1505,6 +1509,9 @@ msgstr "Kopfzeile hinzufügen"msgid "Add Item"msgstr "Element hinzufügen"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "Zeile hinzufügen"@@ -1620,6 +1627,9 @@ msgstr "Ersatzteil hinzufügen"msgid "Add station"msgstr "Station hinzufügen"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "Schritt hinzufügen"@@ -1709,6 +1719,9 @@ msgstr "Erweitert"msgid "Affected item not found."msgstr "Betroffenes Element nicht gefunden."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "Nach"@@ -2743,6 +2756,9 @@ msgstr "Montagen"msgid "Assembly"msgstr "Montage"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "Montageanleitung"@@ -2833,6 +2849,9 @@ msgstr "Weist diese Lagereinheit einem Arbeitsplatz (Linienlager) zu"msgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Weist diese Einheit einem Arbeitsplatz zum Linienlager zu, sodass Werker sie in der Produktionsansicht sehen; wird von der übergeordneten Einheit geerbt, sofern dort festgelegt."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "Annahmen"@@ -3233,6 +3252,9 @@ msgstr "Blockiert durch {0}"msgid "Blocking sync"msgstr "Blockierendes Synchronisieren"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "Maschine blockieren"@@ -3389,6 +3411,9 @@ msgstr "Nach Standort"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "Durch die Anmeldung stimmen Sie den <0>Nutzungsbedingungen</0> und der <1>Datenschutzrichtlinie</1> zu."+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "CAD-Modell"@@ -3829,6 +3854,9 @@ msgstr "Wählen Sie eine Seriennummer"msgid "choose a supplier for {0} on the job"msgstr "Wählen Sie einen Lieferant für {0} beim Fertigungsauftrag aus"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "Wählen Sie eine andere Datei"@@ -3868,6 +3896,9 @@ msgstr "Löschen"msgid "Clear due date"msgstr "Fälligkeitsdatum löschen"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "Filter löschen"@@ -4505,6 +4536,9 @@ msgstr "Link in die Zwischenablage kopiert"msgid "Copied setup prompt to your clipboard"msgstr "Rüst-Ansage in die Zwischenablage kopiert"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "Kopiert!"@@ -4892,8 +4926,7 @@ msgstr "Besetzung"msgid "Create"msgstr "Erstellen"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Erstelle {0}"@@ -5902,12 +5935,18 @@ msgstr "Feiertag löschen"msgid "Delete Inspection Plan"msgstr "Prüfplan löschen"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "Problem löschen"msgid "Delete Item Group"msgstr "Artikelgruppe löschen"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "Buchungszeile löschen"@@ -6221,6 +6260,9 @@ msgstr "Abschreibungsstartdatum"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Leiten Sie die Haltbarkeit dieses Artikels von der kürzesten Haltbarkeit seiner Komponenten ab und ignorieren Sie das obige Feld „Tage\"."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "Beschreibung"@@ -7090,6 +7132,9 @@ msgstr "Webhook bearbeiten"msgid "Edit Work Center"msgstr "Arbeitsplatz bearbeiten"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "Beseitigt"@@ -7719,9 +7764,6 @@ msgstr "Der Verfall beginnt, wenn das ausgewählte Verfahren beginnt."msgid "Expiry trace"msgstr "Verfallsdatum-Nachverfolgung"-msgid "Explorer"-msgstr "Explorer"-msgid "Export"msgstr "Exportieren"@@ -8243,9 +8285,18 @@ msgstr "füllt einen Durchlauf"msgid "Filter"msgstr "Filter"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "Filtern nach…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "Abschließen"@@ -8820,6 +8871,9 @@ msgstr "Hat Arbeitsgänge, die nicht eingeplant werden können"msgid "Headers"msgstr "Header"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "fehlerfrei"@@ -8886,6 +8940,9 @@ msgstr "Feiertagsname"msgid "Holidays"msgstr "Feiertage"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "Telefon zu Hause"@@ -10309,6 +10366,9 @@ msgstr "Listenparameter"msgid "List view"msgstr "Listenansicht"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Live-Neuladen"msgid "Load"msgstr "Auslastung"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "Neuere laden"@@ -10519,6 +10582,9 @@ msgstr "MACRS-Eigenschaftsklasse"msgid "Magic link"msgstr "Magic Link"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "Hauptbau (nach dem letzten Schritt)"@@ -10597,6 +10663,10 @@ msgstr "Auftragsfertigung"msgid "Make tracked entities available again"msgstr "Verfolgbare Entitäten wieder verfügbar machen"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "Macht dieses Dokument wieder aktiv."@@ -11687,6 +11757,9 @@ msgstr "Keine {0} Synchronisierungsvorgänge"msgid "No {0} yet"msgstr "Noch keine {0}"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "Keine Qualifikationen hinzugefügt"@@ -12365,6 +12438,9 @@ msgstr "Keine anderen Artikel an diesem Ort haben Bestand zum Entnehmen."msgid "Nothing here matches your search and filters."msgstr "Nichts hier entspricht Ihrer Suche und Ihren Filtern."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "Nichts im Archiv"@@ -12686,9 +12762,6 @@ msgstr "Offene Fertigungsaufträge"msgid "Open menu"msgstr "Menü öffnen"-msgid "Open navigation"-msgstr "Navigation öffnen"-msgid "Open payables by supplier and age"msgstr "Offene Verbindlichkeiten nach Lieferant und Fälligkeitsdauer"@@ -13049,6 +13122,9 @@ msgstr "Verfallsdatum auf {label} übersteuern."msgid "Overtime"msgstr "Überstunden"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "Vorhandene überschreiben"@@ -13212,6 +13288,9 @@ msgstr "Fügen Sie die Metadaten-XML ein, wenn Ihr Identitätsanbieter keine Metmsgid "Path"msgstr "Pfad"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "Zahlen"@@ -13707,6 +13786,9 @@ msgstr "Aktuelle Woche"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Drücken Sie ? auf einer beliebigen Seite, um diese Liste zu öffnen. Tastaturkürzel werden ignoriert, wenn Sie in ein Feld eingeben."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Zurück"@@ -14090,6 +14172,9 @@ msgstr "Aus Bestand entnehmen"msgid "Pull, map, and load your data"msgstr "Ziehen Sie Ihre Daten ab, ordnen Sie sie zu und laden Sie sie"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "Einkauf & Herstellung aus MRP"@@ -14384,6 +14469,9 @@ msgstr "Vierteljährlich"msgid "Question"msgstr "Frage"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "In Warteschlange"@@ -14510,6 +14598,9 @@ msgstr "Rohstoffe"msgid "Raw Materials (default)"msgstr "Rohstoffe (Standard)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "Auf ersten offenen Tag umbuchen"@@ -15316,6 +15407,9 @@ msgstr "Ergebnisse"msgid "Results per page"msgstr "Ergebnisse pro Seite"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "Empfang fortsetzen"@@ -15427,12 +15521,18 @@ msgstr "Reverse-Charge-Verfahren Umsatzsteuer"msgid "Reverse Charge Sales Tax (default)"msgstr "Reverse-Charge-Verfahren Umsatzsteuer (Standard)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "Stornieren Sie die zugehörigen Buchungssatzeinträge"msgid "Reversed"msgstr "Storniert"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "Zurücksetzen"@@ -15882,6 +15982,9 @@ msgstr "Kontakte speichern"msgid "Save dimension settings"msgstr "Dimensionseinstellungen speichern"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "Methode speichern"@@ -15903,6 +16006,9 @@ msgstr "Gespeichert"msgid "Saved view"msgstr "Gespeicherte Ansicht"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "Gespeicherte Ansichten"@@ -16050,6 +16156,9 @@ msgstr "Suchen"msgid "Search {gaugeTypeName}..."msgstr "Nach {gaugeTypeName} suchen..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "Konten durchsuchen"@@ -16155,9 +16264,6 @@ msgstr "Geheimnis in die Zwischenablage kopiert"msgid "Section"msgstr "Abschnitt"-msgid "Sections"-msgstr "Abschnitte"-msgid "Secure your account with 2FA"msgstr "Schützen Sie Ihr Konto mit 2FA"@@ -16363,6 +16469,9 @@ msgstr "Mengen auswählen"msgid "Select Reason"msgstr "Grund auswählen"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "Zeile auswählen"@@ -16421,6 +16530,9 @@ msgstr "Selbstbedienung"msgid "Self-serve reference at docs.carbon.ms"msgstr "Selbstbedienungs-Referenz unter docs.carbon.ms"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "Senden"@@ -16861,6 +16973,9 @@ msgstr "{0} zeigen"msgid "Show {0} more"msgstr "{0} weitere anzeigen"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "{label} zeigen"@@ -16929,6 +17044,9 @@ msgstr "Zeige {0} von {totalCount} — verfeinern Sie Ihre Suche"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "Zeige {0} von {totalFiltered} — verfeinern Sie Ihre Suche"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "Anzeige in {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "Lösungsingenieur"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "Einige aus dem PDF extrahierte Zeilen konnten nicht automatisch Ihren Bestandsartikeln zugeordnet werden. Überprüfen und ordnen Sie jede Zeile unten zu."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Einige Datensätze werden nicht zurückkommen. Geben Sie <0>{CONFIRM_WORD}</0> ein, um fortzufahren."msgid "Some Shifts"msgstr "Einige Schichten"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "Etwas ist schief gelaufen. Bitte versuchen Sie es erneut."@@ -17427,6 +17539,9 @@ msgstr "Beendet neue Kaufvorschläge für den alten Teil nach diesem Datum."msgid "Storage client not available"msgstr "Speicherclient nicht verfügbar"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "Lagerungsregeln"@@ -17552,9 +17667,6 @@ msgstr "Prüfung einreichen"msgid "Submitted By"msgstr "Eingereicht von"-msgid "Submodules"-msgstr "Untermodule"-msgid "substance"msgstr "Substanz"@@ -17844,6 +17956,9 @@ msgstr "Wechseln"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Schalten Sie ein Modul aus, um es überall zu entfernen: Anforderungen, Daten, Schulung, Umfang."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "Zum Schwenkmodus wechseln"@@ -19616,6 +19731,9 @@ msgstr "Verfolgte Materialien werden nach Kommissionierauftrag vorabausgewähltmsgid "Tracking"msgstr "Verfolgung"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "Verfolgungsmethode"@@ -19706,6 +19824,9 @@ msgstr "Transit & Institution"msgid "Trash"msgstr "Papierkorb"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "Rohbilanz"@@ -20003,9 +20124,6 @@ msgstr "Unbenannte Zeile"msgid "Untitled step"msgstr "Unbenannter Schritt"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "Ungenutzte kommissionierte Materialien werden vom Arbeitsplatz zurück ins Lager geleitet."@@ -20406,6 +20524,12 @@ msgstr "Überprüfen Sie Ihre E-Mail"msgid "Version"msgstr "Version"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "Version {0} ist jetzt veröffentlicht und wird ersetzt."@@ -21286,6 +21410,9 @@ msgstr "Arbeitssitzungen zu Konfiguration und Daten"msgid "Worst Performing Machines"msgstr "Schlechteste Maschinen"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "Abwertungskonto"diff --git a/packages/locale/locales/de/mes.po b/packages/locale/locales/de/mes.poindex fa9bc83f65..ab5dbe67a0 100644--- a/packages/locale/locales/de/mes.po+++ b/packages/locale/locales/de/mes.po@@ -215,6 +215,9 @@ msgstr "verfügbar"msgid "Available"msgstr "Verfügbar"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "Zurück zum Los"@@ -295,6 +298,9 @@ msgstr "Prüfen Sie Ihre E-Mail"msgid "Choose a job"msgstr "Wählen Sie einen Fertigungsauftrag"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "Löschen"@@ -406,8 +412,7 @@ msgstr "In die Zwischenablage kopieren"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Kosten der ungeplanten Instandhaltung der letzten {0} Tage"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Erstelle {0}"@@ -696,6 +701,9 @@ msgstr "Zurück zur Operation"msgid "Go to onboarding"msgstr "Gehen Sie zum Onboarding"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "Beschreibung ausblenden"@@ -1179,6 +1187,9 @@ msgstr "Von Werker durchgeführt"msgid "Optional"msgstr "Optional"+msgid "Options"+msgstr ""+msgid "or"msgstr "oder"@@ -1273,6 +1284,9 @@ msgstr "Wartungsplan abgelaufen"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Drücken Sie ? auf jeder Seite, um diese Liste zu öffnen. Tastaturverknüpfungen werden ignoriert, während Sie in einem Feld tippen."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Zurück"@@ -1917,6 +1931,9 @@ msgstr "Arbeitsplatzanzeigen"msgid "Work instructions"msgstr "Arbeitsanweisungen"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "Ja"diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex 2f0ea5640c..8ff25381d6 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} scrapped"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} selected"@@ -1448,6 +1449,9 @@ msgstr "Add any notes about your decision..."msgid "Add Approval Requirement"msgstr "Add Approval Requirement"+msgid "Add Asset Class"+msgstr "Add Asset Class"+msgid "Add Authenticator App"msgstr "Add Authenticator App"@@ -1505,6 +1509,9 @@ msgstr "Add header"msgid "Add Item"msgstr "Add Item"+msgid "Add Journal Entry"+msgstr "Add Journal Entry"+msgid "Add Line"msgstr "Add Line"@@ -1620,6 +1627,9 @@ msgstr "Add Spare Part"msgid "Add station"msgstr "Add station"+msgid "Add step"+msgstr "Add step"+msgid "Add Step"msgstr "Add Step"@@ -1709,6 +1719,9 @@ msgstr "Advanced"msgid "Affected item not found."msgstr "Affected item not found."+msgid "Affected Items"+msgstr "Affected Items"+msgid "After"msgstr "After"@@ -2743,6 +2756,9 @@ msgstr "Assemblies"msgid "Assembly"msgstr "Assembly"+msgid "assembly instruction"+msgstr "assembly instruction"+msgid "Assembly instruction"msgstr "Assembly instruction"@@ -2833,6 +2849,9 @@ msgstr "Assigns this storage unit to a work center (lineside)"msgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."+msgid "Associations"+msgstr "Associations"+msgid "Assumptions"msgstr "Assumptions"@@ -3233,6 +3252,9 @@ msgstr "Blocked by {0}"msgid "Blocking sync"msgstr "Blocking sync"+msgid "Blocks"+msgstr "Blocks"+msgid "Blocks Machine"msgstr "Blocks Machine"@@ -3389,6 +3411,9 @@ msgstr "By Location"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"+msgid "By you · edited <0/>"+msgstr "By you · edited <0/>"+msgid "CAD Model"msgstr "CAD Model"@@ -3829,6 +3854,9 @@ msgstr "Choose a serial number"msgid "choose a supplier for {0} on the job"msgstr "choose a supplier for {0} on the job"+msgid "Choose an option"+msgstr "Choose an option"+msgid "Choose another file"msgstr "Choose another file"@@ -3868,6 +3896,9 @@ msgstr "Clear"msgid "Clear due date"msgstr "Clear due date"+msgid "Clear filters"+msgstr "Clear filters"+msgid "Clear Filters"msgstr "Clear Filters"@@ -4505,6 +4536,9 @@ msgstr "Copied link to clipboard"msgid "Copied setup prompt to your clipboard"msgstr "Copied setup prompt to your clipboard"+msgid "Copied to clipboard"+msgstr "Copied to clipboard"+msgid "Copied!"msgstr "Copied!"@@ -4892,8 +4926,7 @@ msgstr "Coverage"msgid "Create"msgstr "Create"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Create {0}"@@ -5902,12 +5935,18 @@ msgstr "Delete Holiday"msgid "Delete Inspection Plan"msgstr "Delete Inspection Plan"+msgid "Delete Instruction"+msgstr "Delete Instruction"+msgid "Delete Issue"msgstr "Delete Issue"msgid "Delete Item Group"msgstr "Delete Item Group"+msgid "Delete Job"+msgstr "Delete Job"+msgid "Delete Journal Entry"msgstr "Delete Journal Entry"@@ -6221,6 +6260,9 @@ msgstr "Depreciation Start Date"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."+msgid "Descending"+msgstr "Descending"+msgid "Description"msgstr "Description"@@ -7090,6 +7132,9 @@ msgstr "Edit Webhook"msgid "Edit Work Center"msgstr "Edit Work Center"+msgid "edited <0/>"+msgstr "edited <0/>"+msgid "Eliminated"msgstr "Eliminated"@@ -7719,9 +7764,6 @@ msgstr "Expiry begins when the selected process starts."msgid "Expiry trace"msgstr "Expiry trace"-msgid "Explorer"-msgstr "Explorer"-msgid "Export"msgstr "Export"@@ -8243,9 +8285,18 @@ msgstr "fills a run"msgid "Filter"msgstr "Filter"+msgid "Filter & sort"+msgstr "Filter & sort"++msgid "Filter and sort"+msgstr "Filter and sort"+msgid "Filter by…"msgstr "Filter by…"+msgid "Filters"+msgstr "Filters"+msgid "Finalize"msgstr "Finalize"@@ -8820,6 +8871,9 @@ msgstr "Has operations that can't be scheduled"msgid "Headers"msgstr "Headers"+msgid "Heading {level}"+msgstr "Heading {level}"+msgid "healthy"msgstr "healthy"@@ -8886,6 +8940,9 @@ msgstr "Holiday Name"msgid "Holidays"msgstr "Holidays"+msgid "Home"+msgstr "Home"+msgid "Home Phone"msgstr "Home Phone"@@ -10309,6 +10366,9 @@ msgstr "List Parameters"msgid "List view"msgstr "List view"+msgid "List View"+msgstr "List View"+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Live reloading"msgid "Load"msgstr "Load"+msgid "Load more"+msgstr "Load more"+msgid "Load newer"msgstr "Load newer"@@ -10519,6 +10582,9 @@ msgstr "MACRS Property Class"msgid "Magic link"msgstr "Magic link"+msgid "Main"+msgstr "Main"+msgid "Main build (after its last step)"msgstr "Main build (after its last step)"@@ -10597,6 +10663,10 @@ msgstr "Make to Order"msgid "Make tracked entities available again"msgstr "Make tracked entities available again"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgid "Makes this document active again."msgstr "Makes this document active again."@@ -11687,6 +11757,9 @@ msgstr "No {0} sync operations"msgid "No {0} yet"msgstr "No {0} yet"+msgid "No {title} yet"+msgstr "No {title} yet"+msgid "No abilities added"msgstr "No abilities added"@@ -12365,6 +12438,9 @@ msgstr "Nothing else at this location has stock to pull from."msgid "Nothing here matches your search and filters."msgstr "Nothing here matches your search and filters."+msgid "Nothing here yet"+msgstr "Nothing here yet"+msgid "Nothing in the archive"msgstr "Nothing in the archive"@@ -12686,9 +12762,6 @@ msgstr "Open jobs"msgid "Open menu"msgstr "Open menu"-msgid "Open navigation"-msgstr "Open navigation"-msgid "Open payables by supplier and age"msgstr "Open payables by supplier and age"@@ -13049,6 +13122,9 @@ msgstr "Override the expiration on {label}."msgid "Overtime"msgstr "Overtime"+msgid "Overview"+msgstr "Overview"+msgid "Overwrite Existing"msgstr "Overwrite Existing"@@ -13212,6 +13288,9 @@ msgstr "Paste the metadata XML if your identity provider does not publish a metamsgid "Path"msgstr "Path"+msgid "Pause"+msgstr "Pause"+msgid "Pay"msgstr "Pay"@@ -13707,6 +13786,9 @@ msgstr "Present Week"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."+msgid "Press '/' for commands"+msgstr "Press '/' for commands"+msgid "Prev"msgstr "Prev"@@ -14090,6 +14172,9 @@ msgstr "Pull from Inventory"msgid "Pull, map, and load your data"msgstr "Pull, map, and load your data"+msgid "Purchase"+msgstr "Purchase"+msgid "Purchase & manufacture from MRP"msgstr "Purchase & manufacture from MRP"@@ -14384,6 +14469,9 @@ msgstr "Quarterly"msgid "Question"msgstr "Question"+msgid "Questions"+msgstr "Questions"+msgid "Queued"msgstr "Queued"@@ -14510,6 +14598,9 @@ msgstr "Raw Materials"msgid "Raw Materials (default)"msgstr "Raw Materials (default)"+msgid "Re-convert Model"+msgstr "Re-convert Model"+msgid "Re-date to first open day"msgstr "Re-date to first open day"@@ -15316,6 +15407,9 @@ msgstr "Results"msgid "Results per page"msgstr "Results per page"+msgid "Resume"+msgstr "Resume"+msgid "Resume Receiving"msgstr "Resume Receiving"@@ -15427,12 +15521,18 @@ msgstr "Reverse Charge Sales Tax"msgid "Reverse Charge Sales Tax (default)"msgstr "Reverse Charge Sales Tax (default)"+msgid "Reverse Entry"+msgstr "Reverse Entry"+msgid "Reverse the related journal entries"msgstr "Reverse the related journal entries"msgid "Reversed"msgstr "Reversed"+msgid "Reversing Entry"+msgstr "Reversing Entry"+msgid "Revert"msgstr "Revert"@@ -15882,6 +15982,9 @@ msgstr "Save contacts"msgid "Save dimension settings"msgstr "Save dimension settings"+msgid "Save Draft"+msgstr "Save Draft"+msgid "Save Method"msgstr "Save Method"@@ -15903,6 +16006,9 @@ msgstr "Saved"msgid "Saved view"msgstr "Saved view"+msgid "Saved views"+msgstr "Saved views"+msgid "Saved Views"msgstr "Saved Views"@@ -16050,6 +16156,9 @@ msgstr "Search"msgid "Search {gaugeTypeName}..."msgstr "Search {gaugeTypeName}..."+msgid "Search {title}"+msgstr "Search {title}"+msgid "Search accounts"msgstr "Search accounts"@@ -16155,9 +16264,6 @@ msgstr "Secret copied to clipboard"msgid "Section"msgstr "Section"-msgid "Sections"-msgstr "Sections"-msgid "Secure your account with 2FA"msgstr "Secure your account with 2FA"@@ -16363,6 +16469,9 @@ msgstr "Select Quantities"msgid "Select Reason"msgstr "Select Reason"+msgid "Select row"+msgstr "Select row"+msgid "Select Row"msgstr "Select Row"@@ -16421,6 +16530,9 @@ msgstr "Self-serve"msgid "Self-serve reference at docs.carbon.ms"msgstr "Self-serve reference at docs.carbon.ms"+msgid "Sell"+msgstr "Sell"+msgid "Send"msgstr "Send"@@ -16861,6 +16973,9 @@ msgstr "Show {0}"msgid "Show {0} more"msgstr "Show {0} more"+msgid "Show {count} results"+msgstr "Show {count} results"+msgid "Show {label}"msgstr "Show {label}"@@ -16929,6 +17044,9 @@ msgstr "Showing {0} of {totalCount} — refine your search"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "Showing {0} of {totalFiltered} — refine your search"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr "Showing {firstShown}–{lastShown} of {total}"+msgid "Showing in {parentCurrency}"msgstr "Showing in {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "Solutions Engineer"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."-msgid "Some quantities are negative."-msgstr "Some quantities are negative."-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgid "Some Shifts"msgstr "Some Shifts"-msgid "Some stock has no storage unit."-msgstr "Some stock has no storage unit."-msgid "Something went wrong. Please try again."msgstr "Something went wrong. Please try again."@@ -17427,6 +17539,9 @@ msgstr "Stops new purchase suggestions for the old part after this date."msgid "Storage client not available"msgstr "Storage client not available"+msgid "Storage Rule"+msgstr "Storage Rule"+msgid "Storage Rules"msgstr "Storage Rules"@@ -17552,9 +17667,6 @@ msgstr "Submit Inspection"msgid "Submitted By"msgstr "Submitted By"-msgid "Submodules"-msgstr "Submodules"-msgid "substance"msgstr "substance"@@ -17844,6 +17956,9 @@ msgstr "Switch"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."+msgid "Switch company"+msgstr "Switch company"+msgid "Switch to pan mode"msgstr "Switch to pan mode"@@ -19616,6 +19731,9 @@ msgstr "Tracked material is pre-selected by pick order (FEFO), even without a pimsgid "Tracking"msgstr "Tracking"+msgid "Tracking ID"+msgstr "Tracking ID"+msgid "Tracking method"msgstr "Tracking method"@@ -19706,6 +19824,9 @@ msgstr "Transit & Institution"msgid "Trash"msgstr "Trash"+msgid "Tree View"+msgstr "Tree View"+msgid "Trial Balance"msgstr "Trial Balance"@@ -20003,9 +20124,6 @@ msgstr "Untitled line"msgid "Untitled step"msgstr "Untitled step"-msgid "Untracked"-msgstr "Untracked"-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "Unused picked material flushed back from the work center to the warehouse."@@ -20406,6 +20524,12 @@ msgstr "Verify your email"msgid "Version"msgstr "Version"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr "Version {0}"+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "Version {0} is published now and will be replaced."@@ -21286,6 +21410,9 @@ msgstr "Working sessions on configuration and data"msgid "Worst Performing Machines"msgstr "Worst Performing Machines"+msgid "Write a note…"+msgstr "Write a note…"+msgid "Write-Down Account"msgstr "Write-Down Account"diff --git a/packages/locale/locales/en/mes.po b/packages/locale/locales/en/mes.poindex 2152f01434..3cfb3e206c 100644--- a/packages/locale/locales/en/mes.po+++ b/packages/locale/locales/en/mes.po@@ -215,6 +215,9 @@ msgstr "available"msgid "Available"msgstr "Available"+msgid "Back"+msgstr "Back"+msgid "Back to batch"msgstr "Back to batch"@@ -295,6 +298,9 @@ msgstr "Check your email"msgid "Choose a job"msgstr "Choose a job"+msgid "Choose an option"+msgstr "Choose an option"+msgid "Clear"msgstr "Clear"@@ -406,8 +412,7 @@ msgstr "Copy to clipboard"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Cost of unplanned maintenance, last {0} days"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Create {0}"@@ -696,6 +701,9 @@ msgstr "Go back to operation"msgid "Go to onboarding"msgstr "Go to onboarding"+msgid "Heading {level}"+msgstr "Heading {level}"+msgid "Hide description"msgstr "Hide description"@@ -1179,6 +1187,9 @@ msgstr "Operator Performed"msgid "Optional"msgstr "Optional"+msgid "Options"+msgstr "Options"+msgid "or"msgstr "or"@@ -1273,6 +1284,9 @@ msgstr "PM schedule lapsed"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."+msgid "Press '/' for commands"+msgstr "Press '/' for commands"+msgid "Prev"msgstr "Prev"@@ -1917,6 +1931,9 @@ msgstr "Work Center Displays"msgid "Work instructions"msgstr "Work instructions"+msgid "Write a note…"+msgstr "Write a note…"+msgid "Yes"msgstr "Yes"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 170c88dfe6..df139e72c2 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} desechado"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} seleccionados"@@ -1448,6 +1449,9 @@ msgstr "Agregue notas sobre su decisión..."msgid "Add Approval Requirement"msgstr "Agregar Requisito de Aprobación"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "Agregar aplicación de autenticación"@@ -1505,6 +1509,9 @@ msgstr "Agregar encabezado"msgid "Add Item"msgstr "Agregar Artículo"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "Agregar Línea"@@ -1620,6 +1627,9 @@ msgstr "Agregar Pieza de Repuesto"msgid "Add station"msgstr "Agregar estación"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "Agregar paso"@@ -1709,6 +1719,9 @@ msgstr "Avanzado"msgid "Affected item not found."msgstr "Elemento afectado no encontrado."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "Después"@@ -2743,6 +2756,9 @@ msgstr "Asambleas"msgid "Assembly"msgstr "Ensamblaje"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "Instrucción de ensamblaje"@@ -2833,6 +2849,9 @@ msgstr "Asigna esta unidad de almacenamiento a un centro de trabajo (pie de línmsgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Asigna esta unidad a un centro de trabajo para material de pie de línea, de modo que los operarios la vean en la vista de producción; se hereda de la unidad padre cuando se establece allí."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "Supuestos"@@ -3233,6 +3252,9 @@ msgstr "Bloqueado por {0}"msgid "Blocking sync"msgstr "Sincronización de bloqueo"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "Bloquea la máquina"@@ -3389,6 +3411,9 @@ msgstr "Por Ubicación"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "Al iniciar sesión, aceptas los <0>Términos de Servicio</0> y la <1>Política de Privacidad.</1>"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "Modelo CAD"@@ -3829,6 +3854,9 @@ msgstr "Elige un número de serie"msgid "choose a supplier for {0} on the job"msgstr "elegir un proveedor para {0} en la orden de trabajo"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "Elegir otro archivo"@@ -3868,6 +3896,9 @@ msgstr "Limpiar"msgid "Clear due date"msgstr "Borrar fecha de vencimiento"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "Limpiar filtros"@@ -4505,6 +4536,9 @@ msgstr "Enlace copiado al portapapeles"msgid "Copied setup prompt to your clipboard"msgstr "Indicación de preparación copiada al portapapeles"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "¡Copiado!"@@ -4892,8 +4926,7 @@ msgstr "Cobertura"msgid "Create"msgstr "Crear"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Crear {0}"@@ -5902,12 +5935,18 @@ msgstr "Eliminar Día Festivo"msgid "Delete Inspection Plan"msgstr "Eliminar Plan de Inspección"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "Eliminar Problema"msgid "Delete Item Group"msgstr "Eliminar grupo de artículos"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "Eliminar apunte"@@ -6221,6 +6260,9 @@ msgstr "Fecha de Inicio de Depreciación"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Deriva la vida de anaquel del artículo de la vida de anaquel más corta de sus componentes, ignorando el campo Días arriba."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "Descripción"@@ -7090,6 +7132,9 @@ msgstr "Editar Webhook"msgid "Edit Work Center"msgstr "Editar Centro de Trabajo"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "Eliminado"@@ -7719,9 +7764,6 @@ msgstr "La caducidad comienza cuando se inicia el proceso seleccionado."msgid "Expiry trace"msgstr "Trazabilidad de caducidad"-msgid "Explorer"-msgstr "Explorador"-msgid "Export"msgstr "Exportar"@@ -8243,9 +8285,18 @@ msgstr "completa una tandada"msgid "Filter"msgstr "Filtro"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "Filtrar por…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "Finalizar"@@ -8820,6 +8871,9 @@ msgstr "Tiene operaciones que no pueden ser programadas"msgid "Headers"msgstr "Encabezados"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "saludable"@@ -8886,6 +8940,9 @@ msgstr "Nombre del Día Festivo"msgid "Holidays"msgstr "Días festivos"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "Teléfono de Casa"@@ -10309,6 +10366,9 @@ msgstr "Parámetros de Lista"msgid "List view"msgstr "Vista de lista"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Recarga en vivo"msgid "Load"msgstr "Carga"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "Cargar más recientes"@@ -10519,6 +10582,9 @@ msgstr "Clase de Propiedad MACRS"msgid "Magic link"msgstr "Enlace mágico"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "Construcción principal (después de su último paso)"@@ -10597,6 +10663,10 @@ msgstr "Fabricar bajo pedido"msgid "Make tracked entities available again"msgstr "Hacer que las entidades rastreadas estén disponibles nuevamente"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "Activa este documento nuevamente."@@ -11687,6 +11757,9 @@ msgstr "Sin operaciones de sincronización de {0}"msgid "No {0} yet"msgstr "Sin {0} aún"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "Sin habilidades añadidas"@@ -12365,6 +12438,9 @@ msgstr "Nada más en esta ubicación tiene stock para extraer."msgid "Nothing here matches your search and filters."msgstr "Nada aquí coincide con tu búsqueda y filtros."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "Nada en el archivo"@@ -12686,9 +12762,6 @@ msgstr "Órdenes de trabajo abiertas"msgid "Open menu"msgstr "Abrir menú"-msgid "Open navigation"-msgstr "Abrir navegación"-msgid "Open payables by supplier and age"msgstr "Cuentas por pagar abiertas por proveedor y antigüedad"@@ -13049,6 +13122,9 @@ msgstr "Sobrescribir la caducidad en {label}."msgid "Overtime"msgstr "Horas extras"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "Sobrescribir Existente"@@ -13212,6 +13288,9 @@ msgstr "Pegue el XML de metadatos si su proveedor de identidad no publica una URmsgid "Path"msgstr "Ruta"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "Pagar"@@ -13707,6 +13786,9 @@ msgstr "Semana actual"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Presiona ? en cualquier página para abrir esta lista. Los atajos se ignoran mientras escribes en un campo."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Anterior"@@ -14090,6 +14172,9 @@ msgstr "Tomar del inventario"msgid "Pull, map, and load your data"msgstr "Extraer, asignar y cargar sus datos"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "Comprar y fabricar desde MRP"@@ -14384,6 +14469,9 @@ msgstr "Trimestral"msgid "Question"msgstr "Pregunta"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "En cola"@@ -14510,6 +14598,9 @@ msgstr "Materias Primas"msgid "Raw Materials (default)"msgstr "Materias Primas (predeterminado)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "Redatar al primer día abierto"@@ -15316,6 +15407,9 @@ msgstr "Resultados"msgid "Results per page"msgstr "Resultados por página"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "Reanudar recepción"@@ -15427,12 +15521,18 @@ msgstr "Impuesto a las ventas de cargo inverso"msgid "Reverse Charge Sales Tax (default)"msgstr "Impuesto a las ventas de cargo inverso (predeterminado)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "Revertir los asientos de diario relacionados"msgid "Reversed"msgstr "Revertido"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "Revertir"@@ -15882,6 +15982,9 @@ msgstr "Guardar contactos"msgid "Save dimension settings"msgstr "Guardar configuración de dimensión"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "Guardar Método"@@ -15903,6 +16006,9 @@ msgstr "Guardado"msgid "Saved view"msgstr "Vista guardada"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "Vistas Guardadas"@@ -16050,6 +16156,9 @@ msgstr "Buscar"msgid "Search {gaugeTypeName}..."msgstr "Buscar {gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "Buscar cuentas"@@ -16155,9 +16264,6 @@ msgstr "Código secreto copiado al portapapeles"msgid "Section"msgstr "Sección"-msgid "Sections"-msgstr "Secciones"-msgid "Secure your account with 2FA"msgstr "Asegura tu cuenta con 2FA"@@ -16363,6 +16469,9 @@ msgstr "Seleccionar Cantidades"msgid "Select Reason"msgstr "Seleccionar Razón"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "Seleccionar fila"@@ -16421,6 +16530,9 @@ msgstr "Autoservicio"msgid "Self-serve reference at docs.carbon.ms"msgstr "Referencia de autoservicio en docs.carbon.ms"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "Enviar"@@ -16861,6 +16973,9 @@ msgstr "Mostrar {0}"msgid "Show {0} more"msgstr "Mostrar {0} más"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "Mostrar {label}"@@ -16929,6 +17044,9 @@ msgstr "Mostrando {0} de {totalCount} — refina tu búsqueda"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "Mostrando {0} de {totalFiltered} — refina tu búsqueda"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "Mostrando en {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "Ingeniero de Soluciones"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "Algunas líneas extraídas del PDF no se pudieron asignar automáticamente a sus artículos de inventario. Revise y asigne cada línea a continuación."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Algunos registros no volverán. Escriba <0>{CONFIRM_WORD}</0> para continuar."msgid "Some Shifts"msgstr "Algunos turnos"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "Algo salió mal. Por favor, inténtalo de nuevo."@@ -17427,6 +17539,9 @@ msgstr "Detiene las sugerencias de compra para la pieza anterior después de estmsgid "Storage client not available"msgstr "Cliente de almacenamiento no disponible"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "Reglas de Almacenamiento"@@ -17552,9 +17667,6 @@ msgstr "Enviar Inspección"msgid "Submitted By"msgstr "Enviado por"-msgid "Submodules"-msgstr "Submódulos"-msgid "substance"msgstr "Sustancia"@@ -17844,6 +17956,9 @@ msgstr "Cambiar"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Desactiva un módulo para eliminarlo en todas partes: Requisitos, Datos, Capacitación, Alcance."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "Cambiar a modo panorámico"@@ -19616,6 +19731,9 @@ msgstr "El material rastreado se preselecciona por orden de picking (FEFO), inclmsgid "Tracking"msgstr "Seguimiento"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "Método de seguimiento"@@ -19706,6 +19824,9 @@ msgstr "Tránsito e institución"msgid "Trash"msgstr "Papelera"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "Balance de prueba"@@ -20003,9 +20124,6 @@ msgstr "Línea sin título"msgid "Untitled step"msgstr "Paso sin título"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "Material recogido no utilizado devuelto desde el centro de trabajo al almacén."@@ -20406,6 +20524,12 @@ msgstr "Verifica tu correo electrónico"msgid "Version"msgstr "Versión"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "Versión {0} está publicada ahora y será reemplazada."@@ -21286,6 +21410,9 @@ msgstr "Sesiones de trabajo sobre configuración y datos"msgid "Worst Performing Machines"msgstr "Máquinas con Peor Desempeño"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "Cuenta de Deterioro"diff --git a/packages/locale/locales/es/mes.po b/packages/locale/locales/es/mes.poindex 4796181501..39ae0a20b0 100644--- a/packages/locale/locales/es/mes.po+++ b/packages/locale/locales/es/mes.po@@ -215,6 +215,9 @@ msgstr "disponible"msgid "Available"msgstr "Disponible"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "Volver al lote de producción"@@ -295,6 +298,9 @@ msgstr "Revise su correo electrónico"msgid "Choose a job"msgstr "Elegir una orden de trabajo"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "Limpiar"@@ -406,8 +412,7 @@ msgstr "Copiar al portapapeles"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Costo del mantenimiento no planificado, últimos {0} días"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Crear {0}"@@ -696,6 +701,9 @@ msgstr "Volver a la operación"msgid "Go to onboarding"msgstr "Ir a la incorporación"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "Ocultar descripción"@@ -1179,6 +1187,9 @@ msgstr "Realizado por operador"msgid "Optional"msgstr "Opcional"+msgid "Options"+msgstr ""+msgid "or"msgstr "o"@@ -1273,6 +1284,9 @@ msgstr "Cronograma de PM caducado"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Presione ? en cualquier página para abrir la lista. Los atajos se ignoran mientras escribe en un campo."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Anterior"@@ -1917,6 +1931,9 @@ msgstr "Pantallas del Centro de Trabajo"msgid "Work instructions"msgstr "Instrucciones de trabajo"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "Sí"diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex c1f532f6d1..7904f67046 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} rebuté"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} sélectionnés"@@ -1448,6 +1449,9 @@ msgstr "Ajoutez des notes sur votre décision..."msgid "Add Approval Requirement"msgstr "Ajouter une exigence d'approbation"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "Ajouter une application d'authentification"@@ -1505,6 +1509,9 @@ msgstr "Ajouter un en-tête"msgid "Add Item"msgstr "Ajouter un article"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "Ajouter une ligne"@@ -1620,6 +1627,9 @@ msgstr "Ajouter une pièce de rechange"msgid "Add station"msgstr "Ajouter une station"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "Ajouter une étape"@@ -1709,6 +1719,9 @@ msgstr "Avancé"msgid "Affected item not found."msgstr "Article affecté non trouvé."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "Après"@@ -2743,6 +2756,9 @@ msgstr "Assemblages"msgid "Assembly"msgstr "Assemblage"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "Instruction d'assemblage"@@ -2833,6 +2849,9 @@ msgstr "Attribue cette unité de stockage à un poste de travail (bord de ligne)msgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Attribue cette unité à un poste de travail pour les matériaux du bord de ligne, afin que les opérateurs les voient dans la vue de production ; hérité de l'unité parente lorsqu'il est défini là."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "Hypothèses"@@ -3233,6 +3252,9 @@ msgstr "Bloqué par {0}"msgid "Blocking sync"msgstr "Synchronisation bloquante"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "Bloque la machine"@@ -3389,6 +3411,9 @@ msgstr "Par Emplacement"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "En vous connectant, vous acceptez les <0>Conditions d'utilisation</0> et la <1>Politique de confidentialité.</1>"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "Modèle CAO"@@ -3829,6 +3854,9 @@ msgstr "Choisir un numéro de série"msgid "choose a supplier for {0} on the job"msgstr "choisir un fournisseur pour {0} sur l'ordre de fabrication"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "Choisir un autre fichier"@@ -3868,6 +3896,9 @@ msgstr "Effacer"msgid "Clear due date"msgstr "Effacer la date d'échéance"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "Effacer les filtres"@@ -4505,6 +4536,9 @@ msgstr "Lien copié dans le presse-papiers"msgid "Copied setup prompt to your clipboard"msgstr "Invite de Réglage copiée dans votre presse-papiers"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "Copié !"@@ -4892,8 +4926,7 @@ msgstr "Couverture"msgid "Create"msgstr "Créer"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Créer {0}"@@ -5902,12 +5935,18 @@ msgstr "Supprimer le jour férié"msgid "Delete Inspection Plan"msgstr "Supprimer le plan de contrôle"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "Supprimer le problème"msgid "Delete Item Group"msgstr "Supprimer le groupe d'articles"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "Supprimer la ligne d'écriture"@@ -6221,6 +6260,9 @@ msgstr "Date de Début de l'Amortissement"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Dériver la durée de conservation de cet article à partir de la durée de conservation la plus courte de ses composants, en ignorant le champ Jours ci-dessus."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "Description"@@ -7090,6 +7132,9 @@ msgstr "Modifier le Webhook"msgid "Edit Work Center"msgstr "Modifier le poste de travail"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "Éliminé"@@ -7719,9 +7764,6 @@ msgstr "La péremption débute quand le procédé sélectionné démarre."msgid "Expiry trace"msgstr "Trace de péremption"-msgid "Explorer"-msgstr "Explorateur"-msgid "Export"msgstr "Exporter"@@ -8243,9 +8285,18 @@ msgstr "complète un lot"msgid "Filter"msgstr "Filtre"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "Filtrer par…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "Finaliser"@@ -8820,6 +8871,9 @@ msgstr "Contient des opérations qui ne peuvent pas être planifiées"msgid "Headers"msgstr "En-têtes"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "sain"@@ -8886,6 +8940,9 @@ msgstr "Nom du jour férié"msgid "Holidays"msgstr "Jours fériés"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "Téléphone personnel"@@ -10309,6 +10366,9 @@ msgstr "Paramètres de liste"msgid "List view"msgstr "Vue en liste"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Rechargement en direct"msgid "Load"msgstr "Charge"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "Charger les plus récents"@@ -10519,6 +10582,9 @@ msgstr "Classe de Propriété MACRS"msgid "Magic link"msgstr "Lien magique"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "Construction principale (après sa dernière étape)"@@ -10597,6 +10663,10 @@ msgstr "Fabrication à la commande"msgid "Make tracked entities available again"msgstr "Rendre les entités suivies disponibles à nouveau"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "Rend ce document actif à nouveau."@@ -11687,6 +11757,9 @@ msgstr "Aucune opération de synchronisation {0}"msgid "No {0} yet"msgstr "Pas encore de {0}"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "Aucune compétence ajoutée"@@ -12365,6 +12438,9 @@ msgstr "Aucun autre article à cet endroit n'a de stock à prélever."msgid "Nothing here matches your search and filters."msgstr "Rien ici ne correspond à votre recherche et vos filtres."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "Rien dans l'archive"@@ -12686,9 +12762,6 @@ msgstr "Ordres de fabrication ouverts"msgid "Open menu"msgstr "Ouvrir le menu"-msgid "Open navigation"-msgstr "Ouvrir la navigation"-msgid "Open payables by supplier and age"msgstr "Dettes fournisseurs ouvertes par fournisseur et ancienneté"@@ -13049,6 +13122,9 @@ msgstr "Modifier la date d'expiration sur {label}."msgid "Overtime"msgstr "Heures supplémentaires"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "Remplacer l'existant"@@ -13212,6 +13288,9 @@ msgstr "Collez le XML de métadonnées si votre fournisseur d'identité ne publimsgid "Path"msgstr "Chemin"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "Payer"@@ -13707,6 +13786,9 @@ msgstr "Semaine en cours"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Appuyez sur ? sur n'importe quelle page pour ouvrir cette liste. Les raccourcis sont ignorés pendant que vous tapez dans un champ."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Précédent"@@ -14090,6 +14172,9 @@ msgstr "Prélever du stock"msgid "Pull, map, and load your data"msgstr "Extraire, mapper et charger vos données"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "Acheter et fabriquer à partir de MRP"@@ -14384,6 +14469,9 @@ msgstr "Trimestriel"msgid "Question"msgstr "Question"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "En file d'attente"@@ -14510,6 +14598,9 @@ msgstr "Matières Premières"msgid "Raw Materials (default)"msgstr "Matières Premières (par défaut)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "Redater au premier jour ouvert"@@ -15316,6 +15407,9 @@ msgstr "Résultats"msgid "Results per page"msgstr "Résultats par page"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "Reprendre la réception"@@ -15427,12 +15521,18 @@ msgstr "Taxe de vente d'autoliquidation"msgid "Reverse Charge Sales Tax (default)"msgstr "Taxe de vente d'autoliquidation (défaut)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "Inverser les écritures comptables associées"msgid "Reversed"msgstr "Extourné"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "Annuler"@@ -15882,6 +15982,9 @@ msgstr "Enregistrer les contacts"msgid "Save dimension settings"msgstr "Enregistrer les paramètres d'axe analytique"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "Enregistrer la méthode"@@ -15903,6 +16006,9 @@ msgstr "Enregistré"msgid "Saved view"msgstr "Vue enregistrée"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "Vues enregistrées"@@ -16050,6 +16156,9 @@ msgstr "Rechercher"msgid "Search {gaugeTypeName}..."msgstr "Rechercher {gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "Rechercher les comptes"@@ -16155,9 +16264,6 @@ msgstr "Secret copié dans le presse-papiers"msgid "Section"msgstr "Section"-msgid "Sections"-msgstr "Sections"-msgid "Secure your account with 2FA"msgstr "Sécurisez votre compte avec l'authentification à deux facteurs"@@ -16363,6 +16469,9 @@ msgstr "Sélectionner les quantités"msgid "Select Reason"msgstr "Sélectionner une Raison"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "Sélectionner la ligne"@@ -16421,6 +16530,9 @@ msgstr "Libre-service"msgid "Self-serve reference at docs.carbon.ms"msgstr "Référence en libre-service sur docs.carbon.ms"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "Envoyer"@@ -16861,6 +16973,9 @@ msgstr "Afficher {0}"msgid "Show {0} more"msgstr "Afficher {0} supplémentaires"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "Afficher {label}"@@ -16929,6 +17044,9 @@ msgstr "Affichage de {0} sur {totalCount} — affinez votre recherche"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "Affichage de {0} sur {totalFiltered} — affinez votre recherche"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "Affichage en {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "Ingénieur Solutions"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "Certaines lignes extraites du PDF n'ont pas pu être automatiquement associées à vos articles. Passez en revue et associez chaque ligne ci-dessous."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Certains enregistrements ne reviendront pas. Tapez <0>{CONFIRM_WORD}</0> pour continuer."msgid "Some Shifts"msgstr "Certaines équipes"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "Quelque chose s'est mal passé. Veuillez réessayer."@@ -17427,6 +17539,9 @@ msgstr "Arrête les nouvelles suggestions d'achat pour l'ancienne pièce aprèsmsgid "Storage client not available"msgstr "Client de stockage non disponible"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "Règles de stockage"@@ -17552,9 +17667,6 @@ msgstr "Soumettre le contrôle"msgid "Submitted By"msgstr "Soumis par"-msgid "Submodules"-msgstr "Sous-modules"-msgid "substance"msgstr "Substance"@@ -17844,6 +17956,9 @@ msgstr "Basculer"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Désactiver un module le supprime partout : Exigences, Données, Formation, Portée."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "Passer en mode panoramique"@@ -19616,6 +19731,9 @@ msgstr "Le matériel suivi est pré-sélectionné par ordre de prélèvement (FEmsgid "Tracking"msgstr "Suivi"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "Méthode de suivi"@@ -19706,6 +19824,9 @@ msgstr "Transit et institution"msgid "Trash"msgstr "Corbeille"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "Balance de vérification"@@ -20003,9 +20124,6 @@ msgstr "Ligne sans titre"msgid "Untitled step"msgstr "Étape sans titre"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "Matière prélevée inutilisée renvoyée du poste de travail à l'entrepôt."@@ -20406,6 +20524,12 @@ msgstr "Vérifiez votre email"msgid "Version"msgstr "Version"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "La version {0} est publiée maintenant et sera remplacée."@@ -21286,6 +21410,9 @@ msgstr "Séances de travail sur la configuration et les données"msgid "Worst Performing Machines"msgstr "Machines les plus défaillantes"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "Compte de dépréciation"diff --git a/packages/locale/locales/fr/mes.po b/packages/locale/locales/fr/mes.poindex 0b4b32e1fd..0bbedc1006 100644--- a/packages/locale/locales/fr/mes.po+++ b/packages/locale/locales/fr/mes.po@@ -215,6 +215,9 @@ msgstr "disponible"msgid "Available"msgstr "Disponible"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "Retour au lot de production"@@ -295,6 +298,9 @@ msgstr "Vérifiez votre e-mail"msgid "Choose a job"msgstr "Choisir un ordre de fabrication"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "Effacer"@@ -406,8 +412,7 @@ msgstr "Copier dans le presse-papiers"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Coût de la maintenance imprévue, {0} derniers jours"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Créer {0}"@@ -696,6 +701,9 @@ msgstr "Revenir à l'opération"msgid "Go to onboarding"msgstr "Aller à l'onboarding"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "Masquer la description"@@ -1179,6 +1187,9 @@ msgstr "Effectué par l'opérateur"msgid "Optional"msgstr "Optionnel"+msgid "Options"+msgstr ""+msgid "or"msgstr "ou"@@ -1273,6 +1284,9 @@ msgstr "Calendrier PM dépassé"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Appuyez sur ? n'importe où pour ouvrir cette liste. Les raccourcis sont ignorés lorsque vous tapez dans un champ."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Précédent"@@ -1917,6 +1931,9 @@ msgstr "Affichages des postes de travail"msgid "Work instructions"msgstr "Modes opératoires"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "Oui"diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 9c72247248..c0318f4202 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} स्क्रैप किया गया"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} चुने गए"@@ -1448,6 +1449,9 @@ msgstr "अपने निर्णय के बारे में कोईmsgid "Add Approval Requirement"msgstr "अनुमोदन आवश्यकता जोड़ें"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "ऑथेंटिकेटर ऐप जोड़ें"@@ -1505,6 +1509,9 @@ msgstr "शीर्षक जोड़ें"msgid "Add Item"msgstr "आइटम जोड़ें"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "लाइन जोड़ें"@@ -1620,6 +1627,9 @@ msgstr "स्पेयर पार्ट जोड़ें"msgid "Add station"msgstr "स्टेशन जोड़ें"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "चरण जोड़ें"@@ -1709,6 +1719,9 @@ msgstr "उन्नत"msgid "Affected item not found."msgstr "प्रभावित आइटम नहीं मिला।"+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "के बाद"@@ -2743,6 +2756,9 @@ msgstr "असेंबलीज"msgid "Assembly"msgstr "असेंबली"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "असेंबली निर्देश"@@ -2833,6 +2849,9 @@ msgstr "यह भंडारण इकाई को वर्क सेंटmsgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "इकाई को लाइनसाइड सामग्री के लिए वर्क सेंटर में असाइन करता है, इसलिए ऑपरेटर इसे उत्पादन दृश्य में देखते हैं; मूल इकाई में सेट किए जाने पर मूल इकाई से विरासत में मिलता है।"+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "मान्यताएँ"@@ -3233,6 +3252,9 @@ msgstr "{0} द्वारा अवरुद्ध"msgid "Blocking sync"msgstr "ब्लॉकिंग सिंक"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "मशीन को ब्लॉक करता है"@@ -3389,6 +3411,9 @@ msgstr "स्थान के अनुसार"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "साइन इन करके, आप <0>सेवा की शर्तें</0> और <1>गोपनीयता नीति</1> से सहमत हैं।"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "CAD मॉडल"@@ -3829,6 +3854,9 @@ msgstr "एक सीरियल नंबर चुनें"msgid "choose a supplier for {0} on the job"msgstr "जॉब पर {0} के लिए एक आपूर्तिकर्ता चुनें"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "दूसरी फ़ाइल चुनें"@@ -3868,6 +3896,9 @@ msgstr "साफ़ करें"msgid "Clear due date"msgstr "नियत तिथि साफ करें"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "फ़िल्टर साफ़ करें"@@ -4505,6 +4536,9 @@ msgstr "क्लिपबोर्ड में लिंक कॉपी कmsgid "Copied setup prompt to your clipboard"msgstr "सेटअप प्रॉम्प्ट आपके क्लिपबोर्ड में कॉपी किया गया"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "कॉपी हो गया!"@@ -4892,8 +4926,7 @@ msgstr "कवरेज"msgid "Create"msgstr "बनाएं"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "{0} बनाएं"@@ -5902,12 +5935,18 @@ msgstr "छुट्टी हटाएं"msgid "Delete Inspection Plan"msgstr "निरीक्षण योजना हटाएं"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "समस्या हटाएं"msgid "Delete Item Group"msgstr "आइटम समूह हटाएं"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "जर्नल प्रविष्टि हटाएँ"@@ -6221,6 +6260,9 @@ msgstr "मूल्यह्रास प्रारंभ तिथि"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "इस आइटम की शेल्फ लाइफ को इसके घटकों की सबसे कम शेल्फ लाइफ से निकालें, ऊपर दिए गए डेज़ फील्ड को अनदेखा करते हुए।"+msgid "Descending"+msgstr ""+msgid "Description"msgstr "विवरण"@@ -7090,6 +7132,9 @@ msgstr "वेबहुक संपादित करें"msgid "Edit Work Center"msgstr "वर्क सेंटर संपादित करें"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "समाप्त किया गया"@@ -7719,9 +7764,6 @@ msgstr "समाप्ति तब शुरू होती है जब चmsgid "Expiry trace"msgstr "समाप्ति ट्रेस"-msgid "Explorer"-msgstr "एक्सप्लोरर"-msgid "Export"msgstr "निर्यात करें"@@ -8243,9 +8285,18 @@ msgstr "एक रन को भरता है"msgid "Filter"msgstr "फ़िल्टर करें"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "द्वारा फ़िल्टर करें…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "अंतिम रूप दें"@@ -8820,6 +8871,9 @@ msgstr "ऐसे ऑपरेशन हैं जिन्हें शेडmsgid "Headers"msgstr "हेडर"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "स्वस्थ"@@ -8886,6 +8940,9 @@ msgstr "छुट्टी का नाम"msgid "Holidays"msgstr "छुट्टियाँ"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "होम फोन"@@ -10309,6 +10366,9 @@ msgstr "सूची पैरामीटर"msgid "List view"msgstr "सूची दृश्य"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "लाइव रीलोडिंग"msgid "Load"msgstr "भार"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "नया लोड करें"@@ -10519,6 +10582,9 @@ msgstr "MACRS संपत्ति वर्ग"msgid "Magic link"msgstr "मैजिक लिंक"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "मुख्य निर्माण (इसके अंतिम चरण के बाद)"@@ -10597,6 +10663,10 @@ msgstr "ऑर्डर पर निर्माण"msgid "Make tracked entities available again"msgstr "ट्रैक किए गए इकाइयों को फिर से उपलब्ध करें"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "यह दस्तावेज़ फिर से सक्रिय करता है।"@@ -11687,6 +11757,9 @@ msgstr "कोई {0} सिंक ऑपरेशन नहीं"msgid "No {0} yet"msgstr "अभी कोई {0} नहीं"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "कोई कौशल जोड़ा नहीं गया"@@ -12365,6 +12438,9 @@ msgstr "इस स्थान पर कोई अन्य स्टॉक नmsgid "Nothing here matches your search and filters."msgstr "यहां कुछ भी आपकी खोज और फ़िल्टर से मेल नहीं खाता।"+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "आर्काइव में कुछ नहीं है"@@ -12686,9 +12762,6 @@ msgstr "खुली जॉबें"msgid "Open menu"msgstr "मेनू खोलें"-msgid "Open navigation"-msgstr "नेविगेशन खोलें"-msgid "Open payables by supplier and age"msgstr "आपूर्तिकर्ता और आयु के अनुसार खुली देय राशि"@@ -13049,6 +13122,9 @@ msgstr "{label} पर समाप्ति को ओवरराइड करmsgid "Overtime"msgstr "ओवरटाइम"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "मौजूदा को अधिलेखित करें"@@ -13212,6 +13288,9 @@ msgstr "मेटाडेटा XML को पेस्ट करें यदmsgid "Path"msgstr "पथ"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "भुगतान करें"@@ -13707,6 +13786,9 @@ msgstr "वर्तमान सप्ताह"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "किसी भी पृष्ठ पर ? दबाएं इस सूची को खोलने के लिए। जब आप किसी फ़ील्ड में टाइप करते हैं तो शॉर्टकट अनदेखा किए जाते हैं।"+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "पिछला"@@ -14090,6 +14172,9 @@ msgstr "इन्वेंटरी से लें"msgid "Pull, map, and load your data"msgstr "अपना डेटा खींचें, मैप करें, और लोड करें"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "MRP से खरीद और निर्माण करें"@@ -14384,6 +14469,9 @@ msgstr "त्रैमासिक"msgid "Question"msgstr "प्रश्न"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "कतार में"@@ -14510,6 +14598,9 @@ msgstr "कच्चा माल"msgid "Raw Materials (default)"msgstr "कच्चा माल (डिफ़ॉल्ट)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "पहले खुले दिन को फिर से डेट करें"@@ -15316,6 +15407,9 @@ msgstr "परिणाम"msgid "Results per page"msgstr "प्रति पृष्ठ परिणाम"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "प्राप्ति को फिर से शुरू करें"@@ -15427,12 +15521,18 @@ msgstr "रिवर्स चार्ज बिक्रय कर"msgid "Reverse Charge Sales Tax (default)"msgstr "रिवर्स चार्ज बिक्रय कर (डिफ़ॉल्ट)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "संबंधित जर्नल प्रविष्टियों को उलट दें"msgid "Reversed"msgstr "प्रतिवर्तित"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "पूर्ववत् करें"@@ -15882,6 +15982,9 @@ msgstr "संपर्क सहेजें"msgid "Save dimension settings"msgstr "आयाम सेटिंग्स सहेजें"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "विधि सहेजें"@@ -15903,6 +16006,9 @@ msgstr "सहेजा गया"msgid "Saved view"msgstr "सहेजा गया दृश्य"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "सहेजे गए दृश्य"@@ -16050,6 +16156,9 @@ msgstr "खोजें"msgid "Search {gaugeTypeName}..."msgstr "{gaugeTypeName} खोजें..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "खातों को खोजें"@@ -16155,9 +16264,6 @@ msgstr "गुप्त क्लिपबोर्ड में कॉपीmsgid "Section"msgstr "अनुभाग"-msgid "Sections"-msgstr "अनुभाग"-msgid "Secure your account with 2FA"msgstr "2FA के साथ अपने खाते को सुरक्षित करें"@@ -16363,6 +16469,9 @@ msgstr "मात्रा चुनें"msgid "Select Reason"msgstr "कारण चुनें"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "पंक्ति चुनें"@@ -16421,6 +16530,9 @@ msgstr "स्व-सेवा"msgid "Self-serve reference at docs.carbon.ms"msgstr "docs.carbon.ms पर स्व-सेवा संदर्भ"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "भेजें"@@ -16861,6 +16973,9 @@ msgstr "{0} दिखाएँ"msgid "Show {0} more"msgstr "{0} और दिखाएं"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "{label} दिखाएँ"@@ -16929,6 +17044,9 @@ msgstr "{0} of {totalCount} दिखा रहे हैं — अपनीmsgid "Showing {0} of {totalFiltered} — refine your search"msgstr "{0} of {totalFiltered} दिखा रहे हैं — अपनी खोज को परिष्कृत करें"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "में दिखाई दे रहा है {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "समाधान इंजीनियर"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "PDF से निकाली गई कुछ पंक्तियों को आपकी इन्वेंटरी आइटम्स से स्वचालित रूप से मैप नहीं किया जा सका। नीचे प्रत्येक पंक्ति की समीक्षा करें और मैप करें।"-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "कुछ रिकॉर्ड वापस नहीं आएंगे। जारी रखने के लिए <0>{CONFIRM_WORD}</0> टाइप करें।"msgid "Some Shifts"msgstr "कुछ शिफ्ट"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "कुछ गलत हो गया। कृपया पुनः प्रयास करें।"@@ -17427,6 +17539,9 @@ msgstr "इस तारीख के बाद पुराने पार्msgid "Storage client not available"msgstr "स्टोरेज क्लाइंट उपलब्ध नहीं है"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "भंडारण नियम"@@ -17552,9 +17667,6 @@ msgstr "निरीक्षण सबमिट करें"msgid "Submitted By"msgstr "द्वारा प्रस्तुत"-msgid "Submodules"-msgstr "उप-मॉड्यूल"-msgid "substance"msgstr "पदार्थ"@@ -17844,6 +17956,9 @@ msgstr "स्विच करें"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "मॉड्यूल को बंद करने से यह हर जगह हटा दिया जाता है: आवश्यकताएँ, डेटा, प्रशिक्षण, दायरा।"+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "पैन मोड में स्विच करें"@@ -19616,6 +19731,9 @@ msgstr "ट्रैक की गई सामग्री को पिकिmsgid "Tracking"msgstr "ट्रैकिंग"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "ट्रैकिंग विधि"@@ -19706,6 +19824,9 @@ msgstr "ट्रांजिट और संस्था"msgid "Trash"msgstr "ट्रैश"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "परीक्षण शेष"@@ -20003,9 +20124,6 @@ msgstr "बिना शीर्षक की पंक्ति"msgid "Untitled step"msgstr "बिना शीर्षक वाला चरण"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "अप्रयुक्त सामग्री को वर्क सेंटर से गोदाम में वापस भेजा गया।"@@ -20406,6 +20524,12 @@ msgstr "अपनी ईमेल सत्यापित करें"msgid "Version"msgstr "संस्करण"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "संस्करण {0} अभी प्रकाशित है और प्रतिस्थापित किया जाएगा।"@@ -21286,6 +21410,9 @@ msgstr "कॉन्फ़िगरेशन और डेटा पर काmsgid "Worst Performing Machines"msgstr "सबसे खराब प्रदर्शन करने वाली मशीनें"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "अवमूल्यन खाता"diff --git a/packages/locale/locales/hi/mes.po b/packages/locale/locales/hi/mes.poindex 397d892f81..d447e7adb4 100644--- a/packages/locale/locales/hi/mes.po+++ b/packages/locale/locales/hi/mes.po@@ -215,6 +215,9 @@ msgstr "उपलब्ध"msgid "Available"msgstr "उपलब्ध"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "बैच पर वापस"@@ -295,6 +298,9 @@ msgstr "अपना ईमेल जांचें"msgid "Choose a job"msgstr "एक जॉब चुनें"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "साफ़ करें"@@ -406,8 +412,7 @@ msgstr "क्लिपबोर्ड पर कॉपी करें"msgid "Cost of unplanned maintenance, last {0} days"msgstr "अनियोजित रखरखाव की लागत, पिछले {0} दिन"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "{0} बनाएं"@@ -696,6 +701,9 @@ msgstr "ऑपरेशन पर वापस जाएं"msgid "Go to onboarding"msgstr "ऑनबोर्डिंग पर जाएं"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "विवरण छिपाएं"@@ -1179,6 +1187,9 @@ msgstr "ऑपरेटर द्वारा निष्पादित"msgid "Optional"msgstr "वैकल्पिक"+msgid "Options"+msgstr ""+msgid "or"msgstr "या"@@ -1273,6 +1284,9 @@ msgstr "PM शेड्यूल समाप्त"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "किसी भी पृष्ठ पर ? दबाएँ इस सूची को खोलने के लिए। जब आप किसी फील्ड में टाइप करते हैं, तो शॉर्टकट को अनदेखा किया जाता है।"+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "पिछला"@@ -1917,6 +1931,9 @@ msgstr "वर्क सेंटर डिस्प्ले"msgid "Work instructions"msgstr "कार्य निर्देश"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "हां"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex a0a601cd52..3d7d33f58e 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} scartato"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} selezionati"@@ -1448,6 +1449,9 @@ msgstr "Aggiungi qualsiasi nota sulla tua decisione..."msgid "Add Approval Requirement"msgstr "Aggiungi Requisito di Approvazione"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "Aggiungi app autenticatore"@@ -1505,6 +1509,9 @@ msgstr "Aggiungi intestazione"msgid "Add Item"msgstr "Aggiungi Articolo"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "Aggiungi Riga"@@ -1620,6 +1627,9 @@ msgstr "Aggiungi Pezzo di Ricambio"msgid "Add station"msgstr "Aggiungi stazione"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "Aggiungi Passaggio"@@ -1709,6 +1719,9 @@ msgstr "Avanzate"msgid "Affected item not found."msgstr "Elemento interessato non trovato."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "Dopo"@@ -2743,6 +2756,9 @@ msgstr "Assiemi"msgid "Assembly"msgstr "Assemblaggio"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "Istruzioni di assemblaggio"@@ -2833,6 +2849,9 @@ msgstr "Assegna questa unità di stoccaggio a un centro di lavoro (bordo linea)"msgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Assegna questa unità a un centro di lavoro per il materiale a bordo linea, in modo che gli operatori lo vedano nella visualizzazione della produzione; ereditato dall'unità padre se impostato lì."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "Presupposti"@@ -3233,6 +3252,9 @@ msgstr "Bloccato da {0}"msgid "Blocking sync"msgstr "Sincronizzazione bloccante"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "Blocca macchina"@@ -3389,6 +3411,9 @@ msgstr "Per Ubicazione"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "Accedendo, accetti i <0>Termini di Servizio</0> e l'<1>Informativa sulla Privacy.</1>"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "Modello CAD"@@ -3829,6 +3854,9 @@ msgstr "Scegli un numero di serie"msgid "choose a supplier for {0} on the job"msgstr "scegli un fornitore per {0} nell'ordine di produzione"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "Scegli un altro file"@@ -3868,6 +3896,9 @@ msgstr "Cancella"msgid "Clear due date"msgstr "Cancella data di scadenza"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "Cancella Filtri"@@ -4505,6 +4536,9 @@ msgstr "Collegamento copiato negli appunti"msgid "Copied setup prompt to your clipboard"msgstr "Prompt di configurazione copiato negli appunti"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "Copiato!"@@ -4892,8 +4926,7 @@ msgstr "Copertura"msgid "Create"msgstr "Crea"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Crea {0}"@@ -5902,12 +5935,18 @@ msgstr "Elimina Festività"msgid "Delete Inspection Plan"msgstr "Elimina Piano di controllo"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "Elimina Problema"msgid "Delete Item Group"msgstr "Elimina gruppo articoli"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "Elimina Riga di registrazione"@@ -6221,6 +6260,9 @@ msgstr "Data di Inizio Ammortamento"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Derivare la durata di conservazione di questo articolo dalla durata di conservazione più breve dei suoi componenti, ignorando il campo Giorni sopra."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "Descrizione"@@ -7090,6 +7132,9 @@ msgstr "Modifica Webhook"msgid "Edit Work Center"msgstr "Modifica Centro di Lavoro"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "Eliminato"@@ -7719,9 +7764,6 @@ msgstr "La scadenza inizia quando il processo selezionato si avvia."msgid "Expiry trace"msgstr "Traccia scadenza"-msgid "Explorer"-msgstr "Esploratore"-msgid "Export"msgstr "Esporta"@@ -8243,9 +8285,18 @@ msgstr "riempie una lavorazione"msgid "Filter"msgstr "Filtro"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "Filtra per…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "Finalizza"@@ -8820,6 +8871,9 @@ msgstr "Ha operazioni che non possono essere programmate"msgid "Headers"msgstr "Intestazioni"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "sano"@@ -8886,6 +8940,9 @@ msgstr "Nome Festività"msgid "Holidays"msgstr "Festività"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "Telefono Casa"@@ -10309,6 +10366,9 @@ msgstr "Parametri Elenco"msgid "List view"msgstr "Vista elenco"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Ricaricamento in tempo reale"msgid "Load"msgstr "Carico"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "Carica più recenti"@@ -10519,6 +10582,9 @@ msgstr "Classe di Proprietà MACRS"msgid "Magic link"msgstr "Link Magico"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "Costruzione principale (dopo il suo ultimo passo)"@@ -10597,6 +10663,10 @@ msgstr "Produzione su commessa"msgid "Make tracked entities available again"msgstr "Rendi le entità tracciate disponibili di nuovo"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "Rende questo documento attivo di nuovo."@@ -11687,6 +11757,9 @@ msgstr "Nessuna operazione di sincronizzazione {0}"msgid "No {0} yet"msgstr "Nessun {0} ancora"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "Nessuna competenza aggiunta"@@ -12365,6 +12438,9 @@ msgstr "Niente altro in questa posizione ha stock da cui prelevare."msgid "Nothing here matches your search and filters."msgstr "Niente qui corrisponde alla tua ricerca e ai tuoi filtri."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "Niente nell'archivio"@@ -12686,9 +12762,6 @@ msgstr "Ordini di produzione aperti"msgid "Open menu"msgstr "Apri menu"-msgid "Open navigation"-msgstr "Apri navigazione"-msgid "Open payables by supplier and age"msgstr "Debiti aperti per fornitore e anzianità"@@ -13049,6 +13122,9 @@ msgstr "Forza la scadenza su {label}."msgid "Overtime"msgstr "Straordinario"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "Sovrascrivi Esistente"@@ -13212,6 +13288,9 @@ msgstr "Incolla l'XML dei metadati se il tuo provider di identità non pubblicamsgid "Path"msgstr "Percorso"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "Paga"@@ -13707,6 +13786,9 @@ msgstr "Settimana corrente"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Premi ? su qualsiasi pagina per aprire questo elenco. I tasti di scelta rapida vengono ignorati mentre digiti in un campo."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Prec"@@ -14090,6 +14172,9 @@ msgstr "Preleva da magazzino"msgid "Pull, map, and load your data"msgstr "Estrai, mappa e carica i tuoi dati"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "Acquista e produci da MRP"@@ -14384,6 +14469,9 @@ msgstr "Trimestrale"msgid "Question"msgstr "Domanda"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "In coda"@@ -14510,6 +14598,9 @@ msgstr "Materie Prime"msgid "Raw Materials (default)"msgstr "Materie Prime (predefinito)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "Ricalibrare al primo giorno aperto"@@ -15316,6 +15407,9 @@ msgstr "Risultati"msgid "Results per page"msgstr "Risultati per pagina"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "Riprendi ricezione"@@ -15427,12 +15521,18 @@ msgstr "Imposta di vendita con inversione contabile"msgid "Reverse Charge Sales Tax (default)"msgstr "Imposta di vendita con inversione contabile (predefinito)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "Inverti le voci della prima nota correlate"msgid "Reversed"msgstr "Stornato"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "Ripristina"@@ -15882,6 +15982,9 @@ msgstr "Salva contatti"msgid "Save dimension settings"msgstr "Salva impostazioni dimensionali"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "Salva Metodo"@@ -15903,6 +16006,9 @@ msgstr "Salvato"msgid "Saved view"msgstr "Vista salvata"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "Viste salvate"@@ -16050,6 +16156,9 @@ msgstr "Cerca"msgid "Search {gaugeTypeName}..."msgstr "Cerca {gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "Cerca account"@@ -16155,9 +16264,6 @@ msgstr "Segreto copiato negli appunti"msgid "Section"msgstr "Sezione"-msgid "Sections"-msgstr "Sezioni"-msgid "Secure your account with 2FA"msgstr "Proteggi il tuo account con 2FA"@@ -16363,6 +16469,9 @@ msgstr "Seleziona Quantità"msgid "Select Reason"msgstr "Seleziona Motivo"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "Seleziona Riga"@@ -16421,6 +16530,9 @@ msgstr "Self-service"msgid "Self-serve reference at docs.carbon.ms"msgstr "Riferimento self-service su docs.carbon.ms"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "Invia"@@ -16861,6 +16973,9 @@ msgstr "Mostra {0}"msgid "Show {0} more"msgstr "Mostra altri {0}"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "Mostra {label}"@@ -16929,6 +17044,9 @@ msgstr "Mostrando {0} di {totalCount} — raffina la tua ricerca"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "Visualizzazione {0} di {totalFiltered} — perfeziona la ricerca"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "Visualizzazione in {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "Solutions Engineer"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "Alcune righe estratte dal PDF non potevano essere mappate automaticamente ai tuoi articoli. Rivedi e mappa ogni riga di seguito."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Alcuni record non torneranno. Digita <0>{CONFIRM_WORD}</0> per continuare."msgid "Some Shifts"msgstr "Alcuni turni"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "Qualcosa è andato storto. Riprova."@@ -17427,6 +17539,9 @@ msgstr "Interrompe le nuove proposte di acquisto per il vecchio componente dopomsgid "Storage client not available"msgstr "Client di archiviazione non disponibile"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "Regole di Archiviazione"@@ -17552,9 +17667,6 @@ msgstr "Invia controllo"msgid "Submitted By"msgstr "Inviato da"-msgid "Submodules"-msgstr "Sottomoduli"-msgid "substance"msgstr "Sostanza"@@ -17844,6 +17956,9 @@ msgstr "Cambia"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Disattiva un modulo per rimuoverlo ovunque: Requisiti, Dati, Formazione, Ambito."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "Passa alla modalità panorama"@@ -19616,6 +19731,9 @@ msgstr "Il materiale tracciato è preselezionato per ordine di prelievo (FEFO),msgid "Tracking"msgstr "Tracciamento"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "Metodo di tracciamento"@@ -19706,6 +19824,9 @@ msgstr "Transito e Istituzione"msgid "Trash"msgstr "Cestino"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "Bilancio di verifica"@@ -20003,9 +20124,6 @@ msgstr "Riga senza titolo"msgid "Untitled step"msgstr "Passo senza titolo"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "Materiale prelevato non utilizzato reso dal centro di lavoro al deposito."@@ -20406,6 +20524,12 @@ msgstr "Verifica la tua email"msgid "Version"msgstr "Versione"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "La versione {0} è ora pubblicata e sarà sostituita."@@ -21286,6 +21410,9 @@ msgstr "Sessioni di lavoro su configurazione e dati"msgid "Worst Performing Machines"msgstr "Macchine con Prestazioni Peggiori"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "Conto di Svalutazione"diff --git a/packages/locale/locales/it/mes.po b/packages/locale/locales/it/mes.poindex 6067fb32b5..0b43bb941e 100644--- a/packages/locale/locales/it/mes.po+++ b/packages/locale/locales/it/mes.po@@ -215,6 +215,9 @@ msgstr "disponibile"msgid "Available"msgstr "Disponibile"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "Torna al lotto di produzione"@@ -295,6 +298,9 @@ msgstr "Controlla la tua email"msgid "Choose a job"msgstr "Scegli un ordine di produzione"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "Cancella"@@ -406,8 +412,7 @@ msgstr "Copia negli appunti"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Costo della manutenzione non pianificata, ultimi {0} giorni"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Crea {0}"@@ -696,6 +701,9 @@ msgstr "Torna all'operazione"msgid "Go to onboarding"msgstr "Vai all'onboarding"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "Nascondi descrizione"@@ -1179,6 +1187,9 @@ msgstr "Eseguito dall'Operatore"msgid "Optional"msgstr "Facoltativo"+msgid "Options"+msgstr ""+msgid "or"msgstr "o"@@ -1273,6 +1284,9 @@ msgstr "Pianificazione PM scaduta"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Premi ? su qualsiasi pagina per aprire questo elenco. Le scorciatoie vengono ignorate mentre digiti in un campo."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Precedente"@@ -1917,6 +1931,9 @@ msgstr "Display del Centro di Lavoro"msgid "Work instructions"msgstr "Istruzioni di lavoro"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "Sì"diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex 71333df158..18f5f2cdf6 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0}廃棄"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} 件選択"@@ -1448,6 +1449,9 @@ msgstr "あなたの決定についてのメモを追加してください..."msgid "Add Approval Requirement"msgstr "承認要求事項を追加"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "認証器アプリを追加"@@ -1505,6 +1509,9 @@ msgstr "ヘッダーを追加"msgid "Add Item"msgstr "アイテムを追加"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "行を追加"@@ -1620,6 +1627,9 @@ msgstr "予備品を追加"msgid "Add station"msgstr "ステーションを追加"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "ステップを追加"@@ -1709,6 +1719,9 @@ msgstr "詳細"msgid "Affected item not found."msgstr "影響を受けるアイテムが見つかりません。"+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "後"@@ -2743,6 +2756,9 @@ msgstr "アセンブリ"msgid "Assembly"msgstr "組立"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "組立指示"@@ -2833,6 +2849,9 @@ msgstr "この保管ユニットを作業区(ラインサイド)に割り当msgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "この保管ユニットをラインサイド材料用の作業区に割り当てます。作業者は生産ビューでそれを参照できます。親ユニットで設定されている場合、そこから継承されます。"+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "前提条件"@@ -3233,6 +3252,9 @@ msgstr "{0}によってブロックされています"msgid "Blocking sync"msgstr "ブロッキング同期"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "機械をブロック"@@ -3389,6 +3411,9 @@ msgstr "場所別"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "サインインすることで、<0>利用規約</0>および<1>プライバシーポリシー</1>に同意するものとします。"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "CADモデル"@@ -3829,6 +3854,9 @@ msgstr "シリアル番号を選択"msgid "choose a supplier for {0} on the job"msgstr "製造指図上の{0}の仕入先を選択してください"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "別のファイルを選択"@@ -3868,6 +3896,9 @@ msgstr "クリア"msgid "Clear due date"msgstr "期日をクリア"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "絞り込みをクリア"@@ -4505,6 +4536,9 @@ msgstr "クリップボードにリンクをコピーしました"msgid "Copied setup prompt to your clipboard"msgstr "セットアップ プロンプトをクリップボードにコピーしました"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "コピーしました!"@@ -4892,8 +4926,7 @@ msgstr "配置"msgid "Create"msgstr "作成"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "{0}を作成"@@ -5902,12 +5935,18 @@ msgstr "休日を削除"msgid "Delete Inspection Plan"msgstr "検査計画を削除"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "問題を削除"msgid "Delete Item Group"msgstr "アイテムグループを削除"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "仕訳行を削除"@@ -6221,6 +6260,9 @@ msgstr "減価償却開始日"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "この品目の保存期間を、その構成要素の最短保存期間から導出し、上記の日数フィールドを無視します。"+msgid "Descending"+msgstr ""+msgid "Description"msgstr "説明"@@ -7090,6 +7132,9 @@ msgstr "Webhookを編集"msgid "Edit Work Center"msgstr "作業区を編集"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "削除済み"@@ -7719,9 +7764,6 @@ msgstr "選択した工法が開始すると使用期限が開始します。"msgid "Expiry trace"msgstr "使用期限トレース"-msgid "Explorer"-msgstr "エクスプローラー"-msgid "Export"msgstr "エクスポート"@@ -8243,9 +8285,18 @@ msgstr "1 ラン分を満たす"msgid "Filter"msgstr "絞り込み"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "絞り込み…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "確定"@@ -8820,6 +8871,9 @@ msgstr "スケジュール化できない工程があります"msgid "Headers"msgstr "ヘッダー"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "正常"@@ -8886,6 +8940,9 @@ msgstr "休日名"msgid "Holidays"msgstr "休日"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "自宅電話"@@ -10309,6 +10366,9 @@ msgstr "リストパラメータ"msgid "List view"msgstr "リスト表示"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "ライブリロード中"msgid "Load"msgstr "負荷"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "新しいものを読み込む"@@ -10519,6 +10582,9 @@ msgstr "MACRS資産クラス"msgid "Magic link"msgstr "マジックリンク"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "メインビルド(最後のステップ後)"@@ -10597,6 +10663,10 @@ msgstr "受注生産"msgid "Make tracked entities available again"msgstr "追跡対象エンティティを再度利用可能にする"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "この文書を再度有効にします。"@@ -11687,6 +11757,9 @@ msgstr "{0}の同期操作はありません。"msgid "No {0} yet"msgstr "まだ{0}がありません"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "スキルが追加されていません"@@ -12365,6 +12438,9 @@ msgstr "この場所には他に引き出す在庫がありません。"msgid "Nothing here matches your search and filters."msgstr "検索と絞り込み条件に一致するものがありません"+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "アーカイブに何もありません"@@ -12686,9 +12762,6 @@ msgstr "オープン製造指図"msgid "Open menu"msgstr "メニューを開く"-msgid "Open navigation"-msgstr "ナビゲーションを開く"-msgid "Open payables by supplier and age"msgstr "仕入先・日数別オープン買掛金"@@ -13049,6 +13122,9 @@ msgstr "有効期限を {label} で上書きします。"msgid "Overtime"msgstr "残業"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "既存を上書き"@@ -13212,6 +13288,9 @@ msgstr "IDプロバイダーがメタデータURLを公開していない場合msgid "Path"msgstr "パス"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "支払う"@@ -13707,6 +13786,9 @@ msgstr "今週"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "任意のページで?キーを押すと、このリストが表示されます。フィールドに入力中はショートカットが無視されます。"+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "前へ"@@ -14090,6 +14172,9 @@ msgstr "在庫から引当"msgid "Pull, map, and load your data"msgstr "データをプル、マップ、ロードする"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "MRPから購入・製造"@@ -14384,6 +14469,9 @@ msgstr "四半期ごと"msgid "Question"msgstr "質問"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "キュー待ち"@@ -14510,6 +14598,9 @@ msgstr "原材料"msgid "Raw Materials (default)"msgstr "原材料(デフォルト)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "最初の営業日に再日付け"@@ -15316,6 +15407,9 @@ msgstr "結果"msgid "Results per page"msgstr "ページあたりの結果数"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "受信を再開"@@ -15427,12 +15521,18 @@ msgstr "リバースチャージ売上税"msgid "Reverse Charge Sales Tax (default)"msgstr "リバースチャージ売上税(デフォルト)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "関連する仕訳エントリを取り消す"msgid "Reversed"msgstr "反対仕訳済"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "リバート"@@ -15882,6 +15982,9 @@ msgstr "担当者を保存"msgid "Save dimension settings"msgstr "ディメンション設定を保存"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "メソッドを保存"@@ -15903,6 +16006,9 @@ msgstr "保存済み"msgid "Saved view"msgstr "保存済みの表示"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "保存済みビュー"@@ -16050,6 +16156,9 @@ msgstr "検索"msgid "Search {gaugeTypeName}..."msgstr "{gaugeTypeName} を検索..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "アカウントを検索"@@ -16155,9 +16264,6 @@ msgstr "シークレットをクリップボードにコピーしました"msgid "Section"msgstr "セクション"-msgid "Sections"-msgstr "セクション"-msgid "Secure your account with 2FA"msgstr "2FAでアカウントを保護"@@ -16363,6 +16469,9 @@ msgstr "数量を選択"msgid "Select Reason"msgstr "理由を選択してください"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "行を選択"@@ -16421,6 +16530,9 @@ msgstr "セルフサービス"msgid "Self-serve reference at docs.carbon.ms"msgstr "セルフサービスリファレンス(docs.carbon.ms)"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "送信"@@ -16861,6 +16973,9 @@ msgstr "{0}を表示"msgid "Show {0} more"msgstr "あと{0}個表示"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "{label}を表示"@@ -16929,6 +17044,9 @@ msgstr "{0} / {totalCount} を表示中 — 検索を絞り込みます"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "{totalFiltered}中{0}を表示中 — 検索を絞り込む"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "{parentCurrency}で表示"@@ -17068,18 +17186,12 @@ msgstr "ソリューションズエンジニア"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "PDFから抽出された一部の明細は在庫品目に自動的にマップできませんでした。以下の各明細を確認してマップしてください。"-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "いくつかのレコードは戻りません。続行するには<0>{CONFIRM_WORD}</0>と入力してください。"msgid "Some Shifts"msgstr "一部のシフト"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "何か問題が発生しました。もう一度お試しください。"@@ -17427,6 +17539,9 @@ msgstr "この日付以降、旧部品の新規購買提案が行われなくなmsgid "Storage client not available"msgstr "ストレージクライアントは利用できません。"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "保管ルール"@@ -17552,9 +17667,6 @@ msgstr "検査を提出"msgid "Submitted By"msgstr "提出者"-msgid "Submodules"-msgstr "サブモジュール"-msgid "substance"msgstr "物質"@@ -17844,6 +17956,9 @@ msgstr "切り替え"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "モジュールをオフにするとすべての場所から削除されます:要求事項、データ、教育訓練、スコープ。"+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "パンモードに切り替え"@@ -19616,6 +19731,9 @@ msgstr "追跡される材料は、ピッキングリストがない場合でもmsgid "Tracking"msgstr "追跡"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "追跡方法"@@ -19706,6 +19824,9 @@ msgstr "トランジット・機関番号"msgid "Trash"msgstr "ゴミ箱"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "試算表"@@ -20003,9 +20124,6 @@ msgstr "無題の行"msgid "Untitled step"msgstr "無題のステップ"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "未使用のピッキング済み材料が作業区から倉庫に戻されました。"@@ -20406,6 +20524,12 @@ msgstr "メールアドレスを確認"msgid "Version"msgstr "バージョン"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "バージョン {0} は現在公開済であり、置き換えられます。"@@ -21286,6 +21410,9 @@ msgstr "設定とデータに関するワーキングセッション"msgid "Worst Performing Machines"msgstr "最も性能が低い機械"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "評価減勘定"diff --git a/packages/locale/locales/ja/mes.po b/packages/locale/locales/ja/mes.poindex dbb2bb60c4..396167cb44 100644--- a/packages/locale/locales/ja/mes.po+++ b/packages/locale/locales/ja/mes.po@@ -215,6 +215,9 @@ msgstr "利用可能"msgid "Available"msgstr "利用可能"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "バッチへ戻る"@@ -295,6 +298,9 @@ msgstr "メールを確認してください"msgid "Choose a job"msgstr "製造指図を選択"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "クリア"@@ -406,8 +412,7 @@ msgstr "クリップボードにコピー"msgid "Cost of unplanned maintenance, last {0} days"msgstr "過去{0}日間の未計画保全原価"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "{0}を作成"@@ -696,6 +701,9 @@ msgstr "操作に戻る"msgid "Go to onboarding"msgstr "オンボーディングに移動"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "説明を非表示"@@ -1179,6 +1187,9 @@ msgstr "作業者が実施"msgid "Optional"msgstr "オプション"+msgid "Options"+msgstr ""+msgid "or"msgstr "または"@@ -1273,6 +1284,9 @@ msgstr "PM スケジュール失効"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "任意のページで「?」を押すとこのリストが表示されます。フィールドへの入力中はショートカットが無視されます。"+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "前へ"@@ -1917,6 +1931,9 @@ msgstr "作業区ディスプレイ"msgid "Work instructions"msgstr "作業手順書"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "はい"diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.poindex 7a2a53efef..b97245d0c5 100644--- a/packages/locale/locales/ko/erp.po+++ b/packages/locale/locales/ko/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} 폐기됨"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0}개 선택됨"@@ -1448,6 +1449,9 @@ msgstr "결정에 대한 메모를 추가하세요..."msgid "Add Approval Requirement"msgstr "승인 요구사항 추가"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "인증 앱 추가"@@ -1505,6 +1509,9 @@ msgstr "헤더 추가"msgid "Add Item"msgstr "품목 추가"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "라인 추가"@@ -1620,6 +1627,9 @@ msgstr "예비 부품 추가"msgid "Add station"msgstr "스테이션 추가"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "단계 추가"@@ -1709,6 +1719,9 @@ msgstr "고급"msgid "Affected item not found."msgstr "영향받는 항목을 찾을 수 없습니다."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "이후"@@ -2743,6 +2756,9 @@ msgstr "조립품"msgid "Assembly"msgstr "조립"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "조립 지시사항"@@ -2833,6 +2849,9 @@ msgstr "이 보관 단위를 작업장(라인사이드)에 할당합니다"msgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "라인사이드 자재를 위해 이 보관 단위를 작업장에 할당하므로 작업자들이 생산 화면에서 볼 수 있습니다. 부모 단위에 설정되면 상속됩니다."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "가정사항"@@ -3233,6 +3252,9 @@ msgstr "{0}에 의해 차단됨"msgid "Blocking sync"msgstr "동기화 차단"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "기계 차단"@@ -3389,6 +3411,9 @@ msgstr "위치별"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "로그인하면 <0>서비스 약관</0> 및 <1>개인정보 처리방침</1>에 동의하는 것으로 간주됩니다."+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "CAD 모델"@@ -3829,6 +3854,9 @@ msgstr "시리얼 번호를 선택하십시오"msgid "choose a supplier for {0} on the job"msgstr "작업 지시의 {0}에 대한 공급업체를 선택하세요"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "다른 파일을 선택하세요"@@ -3868,6 +3896,9 @@ msgstr "지우기"msgid "Clear due date"msgstr "마감일 지우기"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "필터 지우기"@@ -4505,6 +4536,9 @@ msgstr "링크가 클립보드에 복사됨"msgid "Copied setup prompt to your clipboard"msgstr "셋업 프롬프트를 클립보드에 복사했습니다"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "복사되었습니다!"@@ -4892,8 +4926,7 @@ msgstr "배치"msgid "Create"msgstr "생성"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "{0} 생성"@@ -5902,12 +5935,18 @@ msgstr "휴일 삭제"msgid "Delete Inspection Plan"msgstr "검사 계획 삭제"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "이슈 삭제"msgid "Delete Item Group"msgstr "품목 그룹 삭제"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "분개장 항목 삭제"@@ -6221,6 +6260,9 @@ msgstr "감가상각 시작일"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "이 품목의 보존 기간을 위의 Days 필드를 무시하고 구성 요소의 가장 짧은 보존 기간에서 도출합니다."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "설명"@@ -7090,6 +7132,9 @@ msgstr "웹훅 편집"msgid "Edit Work Center"msgstr "작업장 편집"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "제거됨"@@ -7719,9 +7764,6 @@ msgstr "유통기한은 선택된 공법이 시작될 때 시작됩니다."msgid "Expiry trace"msgstr "유통기한 추적"-msgid "Explorer"-msgstr "탐색기"-msgid "Export"msgstr "내보내기"@@ -8243,9 +8285,18 @@ msgstr "실행을 채움"msgid "Filter"msgstr "필터"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "필터링…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "확정"@@ -8820,6 +8871,9 @@ msgstr "일정을 짤 수 없는 공정이 있습니다"msgid "Headers"msgstr "헤더"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "정상"@@ -8886,6 +8940,9 @@ msgstr "휴일 이름"msgid "Holidays"msgstr "휴일"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "자택 전화번호"@@ -10309,6 +10366,9 @@ msgstr "목록 파라미터"msgid "List view"msgstr "목록 보기"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "실시간 새로고침"msgid "Load"msgstr "부하"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "최신 항목 불러오기"@@ -10519,6 +10582,9 @@ msgstr "MACRS 자산 분류"msgid "Magic link"msgstr "매직 링크"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "메인 빌드 (마지막 단계 후)"@@ -10597,6 +10663,10 @@ msgstr "주문 생산"msgid "Make tracked entities available again"msgstr "추적되는 항목을 다시 가용하게 합니다"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "이 문서를 다시 활성 상태로 만듭니다."@@ -11687,6 +11757,9 @@ msgstr "{0} 동기화 작업 없음"msgid "No {0} yet"msgstr "아직 {0}이(가) 없습니다"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "추가된 역량이 없습니다"@@ -12365,6 +12438,9 @@ msgstr "이 위치에는 더 이상 가져올 재고가 없습니다."msgid "Nothing here matches your search and filters."msgstr "검색 및 필터와 일치하는 항목이 없습니다."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "보관함이 비어 있습니다"@@ -12686,9 +12762,6 @@ msgstr "미결 작업 지시"msgid "Open menu"msgstr "메뉴 열기"-msgid "Open navigation"-msgstr "탐색 열기"-msgid "Open payables by supplier and age"msgstr "공급업체 및 기간별 미결 매입채무"@@ -13049,6 +13122,9 @@ msgstr "{label}의 유효기한을 재정의합니다."msgid "Overtime"msgstr "초과근무"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "기존 항목 덮어쓰기"@@ -13212,6 +13288,9 @@ msgstr "자격 증명 공급자가 메타데이터 URL을 게시하지 않는msgid "Path"msgstr "경로"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "지불"@@ -13707,6 +13786,9 @@ msgstr "현재 주"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "모든 페이지에서 ? 를 누르면 이 목록이 열립니다. 입력 필드에 입력 중일 때는 단축키가 작동하지 않습니다."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "이전"@@ -14090,6 +14172,9 @@ msgstr "재고 사용"msgid "Pull, map, and load your data"msgstr "데이터를 가져와서 매핑하고 로드하세요"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "MRP 기반 구매 및 제조"@@ -14384,6 +14469,9 @@ msgstr "분기별"msgid "Question"msgstr "질문"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "대기열"@@ -14510,6 +14598,9 @@ msgstr "원자재"msgid "Raw Materials (default)"msgstr "원자재 (기본값)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "첫 개설 날짜로 다시 설정"@@ -15316,6 +15407,9 @@ msgstr "결과"msgid "Results per page"msgstr "페이지당 결과 수"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "수령 재개"@@ -15427,12 +15521,18 @@ msgstr "역청구 판매세"msgid "Reverse Charge Sales Tax (default)"msgstr "역청구 판매세 (기본값)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "관련 전표를 역분개합니다."msgid "Reversed"msgstr "역분개됨"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "복원"@@ -15882,6 +15982,9 @@ msgstr "담당자 저장"msgid "Save dimension settings"msgstr "차원 설정 저장"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "저장 방법"@@ -15903,6 +16006,9 @@ msgstr "저장됨"msgid "Saved view"msgstr "저장된 보기"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "저장된 보기"@@ -16050,6 +16156,9 @@ msgstr "검색"msgid "Search {gaugeTypeName}..."msgstr "검색 {gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "계정 검색"@@ -16155,9 +16264,6 @@ msgstr "시크릿이 클립보드에 복사되었습니다"msgid "Section"msgstr "섹션"-msgid "Sections"-msgstr "섹션"-msgid "Secure your account with 2FA"msgstr "2FA로 계정 보호"@@ -16363,6 +16469,9 @@ msgstr "수량 선택"msgid "Select Reason"msgstr "사유 선택"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "행 선택"@@ -16421,6 +16530,9 @@ msgstr "셀프서비스"msgid "Self-serve reference at docs.carbon.ms"msgstr "docs.carbon.ms에서 셀프서비스 참고자료 확인"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "전송"@@ -16861,6 +16973,9 @@ msgstr "{0} 표시"msgid "Show {0} more"msgstr "{0}개 더 표시"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "{label} 표시"@@ -16929,6 +17044,9 @@ msgstr "{0}개/총 {totalCount}개 표시 — 검색 범위 좁혀보기"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "{0}개 표시 (총 {totalFiltered}개) — 검색을 세밀하게 조정하세요"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "{parentCurrency}로 표시"@@ -17068,18 +17186,12 @@ msgstr "솔루션 엔지니어"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "PDF에서 추출된 일부 라인을 재고 품목에 자동으로 매핑할 수 없습니다. 아래에서 각 라인을 검토하고 매핑하세요."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "일부 레코드는 돌아오지 않습니다. 계속하려면 <0>{CONFIRM_WORD}</0>를 입력하세요."msgid "Some Shifts"msgstr "일부 교대조"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "문제가 발생했습니다. 다시 시도해 주세요."@@ -17427,6 +17539,9 @@ msgstr "이 날짜 이후로 기존 부품에 대한 새로운 구매 제안을msgid "Storage client not available"msgstr "저장소 클라이언트를 사용할 수 없습니다."+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "저장 규칙"@@ -17552,9 +17667,6 @@ msgstr "검사 제출"msgid "Submitted By"msgstr "제출자"-msgid "Submodules"-msgstr "하위 모듈"-msgid "substance"msgstr "재질"@@ -17844,6 +17956,9 @@ msgstr "전환"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "모듈을 끄면 요구사항, 데이터, 교육, 범위 등 모든 곳에서 제거됩니다."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "팬 모드로 전환"@@ -19616,6 +19731,9 @@ msgstr "추적 자재는 피킹 리스트가 없어도 피킹 순서(FEFO)에msgid "Tracking"msgstr "추적"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "추적 방법"@@ -19706,6 +19824,9 @@ msgstr "운송 및 기관"msgid "Trash"msgstr "휴지통"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "시산표"@@ -20003,9 +20124,6 @@ msgstr "제목 없는 라인"msgid "Untitled step"msgstr "제목 없는 단계"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "작업장에서 창고로 반환된 미사용 선택 재료."@@ -20406,6 +20524,12 @@ msgstr "이메일을 인증하세요"msgid "Version"msgstr "버전"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "버전 {0}이 지금 게시되었으며 교체될 예정입니다."@@ -21286,6 +21410,9 @@ msgstr "설정 및 데이터에 대한 작업 세션"msgid "Worst Performing Machines"msgstr "성능이 가장 낮은 기계"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "평가감 계정"diff --git a/packages/locale/locales/ko/mes.po b/packages/locale/locales/ko/mes.poindex 88019ba952..8293d3223d 100644--- a/packages/locale/locales/ko/mes.po+++ b/packages/locale/locales/ko/mes.po@@ -215,6 +215,9 @@ msgstr "가용"msgid "Available"msgstr "가용"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "배치로 돌아가기"@@ -295,6 +298,9 @@ msgstr "이메일을 확인하세요"msgid "Choose a job"msgstr "작업 지시 선택"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "지우기"@@ -406,8 +412,7 @@ msgstr "클립보드에 복사"msgid "Cost of unplanned maintenance, last {0} days"msgstr "계획되지 않은 유지보수의 원가, 최근 {0}일"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "{0} 생성"@@ -696,6 +701,9 @@ msgstr "공정작업으로 돌아가기"msgid "Go to onboarding"msgstr "온보딩으로 이동"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "설명 숨기기"@@ -1179,6 +1187,9 @@ msgstr "작업자 수행"msgid "Optional"msgstr "선택 사항"+msgid "Options"+msgstr ""+msgid "or"msgstr "또는"@@ -1273,6 +1284,9 @@ msgstr "PM 일정 만료됨"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "어느 페이지에서나 ?를 누르세요. 필드에 입력하는 동안 단축키가 무시됩니다."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "이전"@@ -1917,6 +1931,9 @@ msgstr "작업장 화면"msgid "Work instructions"msgstr "작업 표준서"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "예"diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex 497c246d30..287e4df12a 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} braki"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} wybrane"@@ -1448,6 +1449,9 @@ msgstr "Dodaj dowolne notatki dotyczące Twojej decyzji..."msgid "Add Approval Requirement"msgstr "Dodaj Wymaganie Zatwierdzenia"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "Dodaj aplikację Authenticator"@@ -1505,6 +1509,9 @@ msgstr "Dodaj nagłówek"msgid "Add Item"msgstr "Dodaj element"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "Dodaj linię"@@ -1620,6 +1627,9 @@ msgstr "Dodaj część zamienną"msgid "Add station"msgstr "Dodaj stanowisko"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "Dodaj krok"@@ -1709,6 +1719,9 @@ msgstr "Zaawansowane"msgid "Affected item not found."msgstr "Element dotknięty zmianą nie został znaleziony."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "Po"@@ -2743,6 +2756,9 @@ msgstr "Zespoły"msgid "Assembly"msgstr "Montaż"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "Instrukcja montażu"@@ -2833,6 +2849,9 @@ msgstr "Przypisuje tę jednostkę magazynową do stanowiska roboczego (magazyn pmsgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Przypisuje tę jednostkę do stanowiska roboczego dla materiału magazynu przyliniowego, aby operatorzy widzieli ją w widoku produkcji; odziedziczone z jednostki nadrzędnej, jeśli tam zostały ustawione."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "Założenia"@@ -3233,6 +3252,9 @@ msgstr "Zablokowane przez {0}"msgid "Blocking sync"msgstr "Synchronizacja blokująca"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "Blokuje maszynę"@@ -3389,6 +3411,9 @@ msgstr "Wg lokalizacji"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "Logując się, wyrażasz zgodę na <0>Warunki korzystania z usługi</0> i <1>Politykę prywatności.</1>"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "Model CAD"@@ -3829,6 +3854,9 @@ msgstr "Wybierz numer seryjny"msgid "choose a supplier for {0} on the job"msgstr "wybierz dostawcę dla {0} na zleceniu produkcyjnym"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "Wybierz inny plik"@@ -3868,6 +3896,9 @@ msgstr "Wyczysc"msgid "Clear due date"msgstr "Wyczyść datę terminu"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "Wyczyść filtry"@@ -4505,6 +4536,9 @@ msgstr "Skopiowano link do schowka"msgid "Copied setup prompt to your clipboard"msgstr "Skopiowano monit przezbrojenia do schowka"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "Skopiowano!"@@ -4892,8 +4926,7 @@ msgstr "Pokrycie"msgid "Create"msgstr "Utwórz"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Utwórz {0}"@@ -5902,12 +5935,18 @@ msgstr "Usuń Święto"msgid "Delete Inspection Plan"msgstr "Usuń plan kontroli"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "Usuń Problem"msgid "Delete Item Group"msgstr "Usuń grupę artykułów"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "Usuń zapis księgowy"@@ -6221,6 +6260,9 @@ msgstr "Data Rozpoczęcia Amortyzacji"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Oblicz okres przydatności tego artykułu na podstawie najkrótszego okresu przydatności jego komponentów, ignorując powyższe pole Dni."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "Opis"@@ -7090,6 +7132,9 @@ msgstr "Edytuj Webhook"msgid "Edit Work Center"msgstr "Edytuj Stanowisko robocze"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "Wyeliminowane"@@ -7719,9 +7764,6 @@ msgstr "Termin ważności rozpoczyna się, gdy wybrany proces się uruchamia."msgid "Expiry trace"msgstr "Śledzenie terminu ważności"-msgid "Explorer"-msgstr "Eksplorator"-msgid "Export"msgstr "Eksportuj"@@ -8243,9 +8285,18 @@ msgstr "wypełnia przebieg"msgid "Filter"msgstr "Filtr"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "Filtruj wg…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "Sfinalizuj"@@ -8820,6 +8871,9 @@ msgstr "Ma operacje, które nie można zaplanować"msgid "Headers"msgstr "Nagłówki"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "zdrowy"@@ -8886,6 +8940,9 @@ msgstr "Nazwa Dnia Wolnego"msgid "Holidays"msgstr "Święta"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "Telefon domowy"@@ -10309,6 +10366,9 @@ msgstr "Parametry listy"msgid "List view"msgstr "Widok listy"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Odświeżanie na żywo"msgid "Load"msgstr "Obciążenie"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "Załaduj nowsze"@@ -10519,6 +10582,9 @@ msgstr "Klasa Właściwości MACRS"msgid "Magic link"msgstr "Magiczny link"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "Główny montaż (po ostatnim kroku)"@@ -10597,6 +10663,10 @@ msgstr "Produkcja na zamówienie"msgid "Make tracked entities available again"msgstr "Udostępnij śledzone jednostki ponownie"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "Ponownie aktywuje ten dokument."@@ -11687,6 +11757,9 @@ msgstr "Brak operacji synchronizacji {0}"msgid "No {0} yet"msgstr "Jeszcze brak {0}"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "Brak dodanych umiejętności"@@ -12365,6 +12438,9 @@ msgstr "W tym miejscu nic innego nie ma zapasów do pobrania."msgid "Nothing here matches your search and filters."msgstr "Nic tutaj nie odpowiada Twojemu wyszukiwaniu i filtrom."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "Nic w archiwum"@@ -12686,9 +12762,6 @@ msgstr "Otwarte zlecenia produkcyjne"msgid "Open menu"msgstr "Otwórz menu"-msgid "Open navigation"-msgstr "Otwórz nawigację"-msgid "Open payables by supplier and age"msgstr "Otwarte zobowiązania wg dostawcy i wieku"@@ -13049,6 +13122,9 @@ msgstr "Nadpisz termin ważności na {label}."msgid "Overtime"msgstr "Nadgodziny"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "Zastąp istniejące"@@ -13212,6 +13288,9 @@ msgstr "Wklej kod XML metadanych, jeśli Twój dostawca tożsamości nie publikumsgid "Path"msgstr "Ścieżka"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "Opłacić"@@ -13707,6 +13786,9 @@ msgstr "Bieżący tydzień"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Naciśnij ? na dowolnej stronie, aby otworzyć tę listę. Skróty są ignorowane, gdy wpisujesz tekst w polu."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Poprz"@@ -14090,6 +14172,9 @@ msgstr "Pobierz z magazynu"msgid "Pull, map, and load your data"msgstr "Pobierz, mapuj i załaduj swoje dane"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "Zakup i produkcja z MRP"@@ -14384,6 +14469,9 @@ msgstr "Kwartalnie"msgid "Question"msgstr "Pytanie"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "W kolejce"@@ -14510,6 +14598,9 @@ msgstr "Surowce"msgid "Raw Materials (default)"msgstr "Surowce (domyślnie)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "Zmień datę na pierwszy otwarty dzień"@@ -15316,6 +15407,9 @@ msgstr "Wyniki"msgid "Results per page"msgstr "Wyniki na stronę"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "Wznów Odbieranie"@@ -15427,12 +15521,18 @@ msgstr "Odwrotne obciążenie podatkiem od sprzedaży"msgid "Reverse Charge Sales Tax (default)"msgstr "Odwrotne obciążenie podatkiem od sprzedaży (domyślnie)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "Wycofaj powiązane wpisy w dowodach księgowych"msgid "Reversed"msgstr "Wystornowano"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "Przywróć"@@ -15882,6 +15982,9 @@ msgstr "Zapisz kontakty"msgid "Save dimension settings"msgstr "Zapisz ustawienia wymiarów"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "Zapisz metodę"@@ -15903,6 +16006,9 @@ msgstr "Zapisano"msgid "Saved view"msgstr "Zapisany widok"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "Zapisane widoki"@@ -16050,6 +16156,9 @@ msgstr "Szukaj"msgid "Search {gaugeTypeName}..."msgstr "Szukaj {gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "Wyszukaj konta"@@ -16155,9 +16264,6 @@ msgstr "Sekretna wartość skopiowana do schowka"msgid "Section"msgstr "Sekcja"-msgid "Sections"-msgstr "Sekcje"-msgid "Secure your account with 2FA"msgstr "Zabezpiecz swoje konto za pomocą 2FA"@@ -16363,6 +16469,9 @@ msgstr "Wybierz ilości"msgid "Select Reason"msgstr "Wybierz Przyczynę"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "Wybierz wiersz"@@ -16421,6 +16530,9 @@ msgstr "Samoobsługowy"msgid "Self-serve reference at docs.carbon.ms"msgstr "Samodzielna dokumentacja na docs.carbon.ms"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "Wyslij"@@ -16861,6 +16973,9 @@ msgstr "Pokaż {0}"msgid "Show {0} more"msgstr "Pokaż {0} więcej"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "Pokaż {label}"@@ -16929,6 +17044,9 @@ msgstr "Wyświetlanie {0} z {totalCount} — uściśl wyszukiwanie"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "Pokazuję {0} z {totalFiltered} — sprecyzuj wyszukiwanie"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "Wyświetlanie w {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "Inżynier Rozwiązań"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "Niektóre pozycje wyodrębnione z pliku PDF nie mogły być automatycznie zmapowane do artykułów z twoich zapasów. Przejrzyj i zamapuj każdą pozycję poniżej."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Niektóre rekordy nie wrócą. Wpisz <0>{CONFIRM_WORD}</0> aby kontynuować."msgid "Some Shifts"msgstr "Niektóre zmiany"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "Coś poszło nie tak. Spróbuj ponownie."@@ -17427,6 +17539,9 @@ msgstr "Wstrzymuje nowe propozycje zakupów dla starej części po tej dacie."msgid "Storage client not available"msgstr "Klient magazynu niedostępny"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "Reguły przechowywania"@@ -17552,9 +17667,6 @@ msgstr "Prześlij kontrolę"msgid "Submitted By"msgstr "Przesłane przez"-msgid "Submodules"-msgstr "Podmoduły"-msgid "substance"msgstr "Substancja"@@ -17844,6 +17956,9 @@ msgstr "Przełącz"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Wyłącz moduł, aby go usunąć wszędzie: Wymagania, Dane, Szkolenie, Zakres."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "Przełącz na tryb panoramy"@@ -19616,6 +19731,9 @@ msgstr "Materiał śledzony jest wstępnie wybierany według kolejności poborumsgid "Tracking"msgstr "Śledzenie"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "Metoda śledzenia"@@ -19706,6 +19824,9 @@ msgstr "Tranzyt i Instytucja"msgid "Trash"msgstr "Kosz"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "Bilans próbny"@@ -20003,9 +20124,6 @@ msgstr "Linia bez tytułu"msgid "Untitled step"msgstr "Krok bez tytułu"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "Materiał pobrany, ale nieużywany, zwracany ze stanowiska roboczego do magazynu."@@ -20406,6 +20524,12 @@ msgstr "Zweryfikuj swój email"msgid "Version"msgstr "Wersja"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "Wersja {0} jest teraz opublikowana i zostanie zastąpiona."@@ -21286,6 +21410,9 @@ msgstr "Sesje robocze dotyczące konfiguracji i danych"msgid "Worst Performing Machines"msgstr "Maszyny o najgorszych wynikach"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "Konto odpisu aktualizującego"diff --git a/packages/locale/locales/pl/mes.po b/packages/locale/locales/pl/mes.poindex b98394793a..d03ef4909f 100644--- a/packages/locale/locales/pl/mes.po+++ b/packages/locale/locales/pl/mes.po@@ -215,6 +215,9 @@ msgstr "dostępne"msgid "Available"msgstr "Dostępne"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "Powrót do partii produkcyjnej"@@ -295,6 +298,9 @@ msgstr "Sprawdź swoją skrzynkę e-mail"msgid "Choose a job"msgstr "Wybierz zlecenie produkcyjne"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "Wyczyść"@@ -406,8 +412,7 @@ msgstr "Kopiuj do schowka"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Koszt nieplanowanego utrzymania ruchu, ostatnie {0} dni"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Utwórz {0}"@@ -696,6 +701,9 @@ msgstr "Wróć do operacji"msgid "Go to onboarding"msgstr "Przejdź do wdrożenia"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "Ukryj opis"@@ -1179,6 +1187,9 @@ msgstr "Wykonane przez operatora"msgid "Optional"msgstr "Opcjonalnie"+msgid "Options"+msgstr ""+msgid "or"msgstr "lub"@@ -1273,6 +1284,9 @@ msgstr "Harmonogram PM wygasł"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Naciśnij ? na dowolnej stronie, aby otworzyć tę listę. Skróty klawiszowe są ignorowane podczas wpisywania w polu."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Poprzedni"@@ -1917,6 +1931,9 @@ msgstr "Wyświetlacze stanowiska roboczego"msgid "Work instructions"msgstr "Instrukcje robocze"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "Tak"diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex 9802184c3a..7775e1cc1f 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} descartado"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} selecionados"@@ -1448,6 +1449,9 @@ msgstr "Adicione qualquer observação sobre sua decisão..."msgid "Add Approval Requirement"msgstr "Adicionar Requisito de Aprovação"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "Adicionar Aplicação Autenticadora"@@ -1505,6 +1509,9 @@ msgstr "Adicionar cabeçalho"msgid "Add Item"msgstr "Adicionar Item"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "Adicionar Linha"@@ -1620,6 +1627,9 @@ msgstr "Adicionar Peça de Reposição"msgid "Add station"msgstr "Adicionar estação"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "Adicionar Etapa"@@ -1709,6 +1719,9 @@ msgstr "Avançado"msgid "Affected item not found."msgstr "Item afetado não encontrado."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "Após"@@ -2743,6 +2756,9 @@ msgstr "Montagens"msgid "Assembly"msgstr "Montagem"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "Instrução de montagem"@@ -2833,6 +2849,9 @@ msgstr "Atribui esta unidade de armazenamento a um centro de trabalho (borda demsgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Atribui esta unidade a um centro de trabalho para material de borda de linha, para que os operadores a vejam na visualização de produção; herdada da unidade pai quando configurada lá."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "Premissas"@@ -3233,6 +3252,9 @@ msgstr "Bloqueado por {0}"msgid "Blocking sync"msgstr "Sincronização bloqueante"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "Bloqueia Máquina"@@ -3389,6 +3411,9 @@ msgstr "Por Local"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "Ao fazer login, você concorda com os <0>Termos de Serviço</0> e a <1>Política de Privacidade.</1>"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "Modelo CAD"@@ -3829,6 +3854,9 @@ msgstr "Escolha um número de série"msgid "choose a supplier for {0} on the job"msgstr "escolher um fornecedor para {0} na ordem de produção"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "Escolher outro arquivo"@@ -3868,6 +3896,9 @@ msgstr "Limpar"msgid "Clear due date"msgstr "Limpar data de vencimento"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "Limpar Filtros"@@ -4505,6 +4536,9 @@ msgstr "Link copiado para a área de transferência"msgid "Copied setup prompt to your clipboard"msgstr "Prompt de setup copiado para sua área de transferência"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "Copiado!"@@ -4892,8 +4926,7 @@ msgstr "Cobertura"msgid "Create"msgstr "Criar"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Criar {0}"@@ -5902,12 +5935,18 @@ msgstr "Excluir Feriado"msgid "Delete Inspection Plan"msgstr "Excluir plano de inspeção"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "Excluir requisição"msgid "Delete Item Group"msgstr "Excluir grupo de itens"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "Excluir lançamento"@@ -6221,6 +6260,9 @@ msgstr "Data de Início da Depreciação"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Derivar a vida de prateleira deste item da menor vida de prateleira de seus componentes, ignorando o campo Dias acima."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "Descrição"@@ -7090,6 +7132,9 @@ msgstr "Editar Webhook"msgid "Edit Work Center"msgstr "Editar Centro de Trabalho"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "Eliminado"@@ -7719,9 +7764,6 @@ msgstr "A validade começa quando o processo selecionado é iniciado."msgid "Expiry trace"msgstr "Rastreamento de validade"-msgid "Explorer"-msgstr "Explorador"-msgid "Export"msgstr "Exportar"@@ -8243,9 +8285,18 @@ msgstr "completa uma execução"msgid "Filter"msgstr "Filtro"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "Filtrar por…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "Finalizar"@@ -8820,6 +8871,9 @@ msgstr "Tem operações que não podem ser programadas"msgid "Headers"msgstr "Cabeçalhos"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "íntegro"@@ -8886,6 +8940,9 @@ msgstr "Nome do Feriado"msgid "Holidays"msgstr "Feriados"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "Telefone Residencial"@@ -10309,6 +10366,9 @@ msgstr "Parâmetros de Lista"msgid "List view"msgstr "Visualização em lista"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Recarregamento ao vivo"msgid "Load"msgstr "Carga"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "Carregar mais recentes"@@ -10519,6 +10582,9 @@ msgstr "Classe de Propriedade MACRS"msgid "Magic link"msgstr "Link mágico"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "Montagem principal (após sua última etapa)"@@ -10597,6 +10663,10 @@ msgstr "Fabricação sob encomenda"msgid "Make tracked entities available again"msgstr "Disponibilizar entidades rastreadas novamente"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "Torna este documento ativo novamente."@@ -11687,6 +11757,9 @@ msgstr "Sem operações de sincronização {0}"msgid "No {0} yet"msgstr "Nenhum {0} ainda"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "Nenhuma habilidade adicionada"@@ -12365,6 +12438,9 @@ msgstr "Nada mais neste local tem estoque para puxar."msgid "Nothing here matches your search and filters."msgstr "Nada aqui corresponde à sua pesquisa e filtros."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "Nada no arquivo"@@ -12686,9 +12762,6 @@ msgstr "Ordens de produção abertas"msgid "Open menu"msgstr "Abrir menu"-msgid "Open navigation"-msgstr "Abrir navegação"-msgid "Open payables by supplier and age"msgstr "Contas a pagar em aberto por fornecedor e idade"@@ -13049,6 +13122,9 @@ msgstr "Sobrescrita da expiração em {label}."msgid "Overtime"msgstr "Horas Extras"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "Sobrescrever Existente"@@ -13212,6 +13288,9 @@ msgstr "Cole o XML de metadados se seu provedor de identidade não publicar um Umsgid "Path"msgstr "Caminho"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "Pagar"@@ -13707,6 +13786,9 @@ msgstr "Semana atual"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Pressione ? em qualquer página para abrir esta lista. Os atalhos são ignorados enquanto você digita em um campo."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Anterior"@@ -14090,6 +14172,9 @@ msgstr "Retirar do estoque"msgid "Pull, map, and load your data"msgstr "Extrair, mapear e carregar seus dados"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "Comprar e fabricar a partir do MRP"@@ -14384,6 +14469,9 @@ msgstr "Trimestral"msgid "Question"msgstr "Pergunta"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "Na fila"@@ -14510,6 +14598,9 @@ msgstr "Matérias-Primas"msgid "Raw Materials (default)"msgstr "Matérias-Primas (padrão)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "Re-datar para o primeiro dia aberto"@@ -15316,6 +15407,9 @@ msgstr "Resultados"msgid "Results per page"msgstr "Resultados por página"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "Retomar Recebimento"@@ -15427,12 +15521,18 @@ msgstr "Imposto de vendas de cobrança reversa"msgid "Reverse Charge Sales Tax (default)"msgstr "Imposto de vendas de cobrança reversa (padrão)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "Reverter os lançamentos do diário relacionados"msgid "Reversed"msgstr "Estornado"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "Reverter"@@ -15882,6 +15982,9 @@ msgstr "Salvar contatos"msgid "Save dimension settings"msgstr "Salvar configurações de dimensão"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "Salvar Método"@@ -15903,6 +16006,9 @@ msgstr "Salvo"msgid "Saved view"msgstr "Visualização salva"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "Visualizações Salvas"@@ -16050,6 +16156,9 @@ msgstr "Pesquisar"msgid "Search {gaugeTypeName}..."msgstr "Pesquisar {gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "Pesquisar contas"@@ -16155,9 +16264,6 @@ msgstr "Segredo copiado para a área de transferência"msgid "Section"msgstr "Seção"-msgid "Sections"-msgstr "Seções"-msgid "Secure your account with 2FA"msgstr "Proteja sua conta com 2FA"@@ -16363,6 +16469,9 @@ msgstr "Selecionar Quantidades"msgid "Select Reason"msgstr "Selecionar Motivo"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "Selecionar Linha"@@ -16421,6 +16530,9 @@ msgstr "Autoatendimento"msgid "Self-serve reference at docs.carbon.ms"msgstr "Referência de autoatendimento em docs.carbon.ms"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "Enviar"@@ -16861,6 +16973,9 @@ msgstr "Mostrar {0}"msgid "Show {0} more"msgstr "Mostrar {0} a mais"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "Mostrar {label}"@@ -16929,6 +17044,9 @@ msgstr "Mostrando {0} de {totalCount} — refine sua pesquisa"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "Mostrando {0} de {totalFiltered} — refine sua pesquisa"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "Exibindo em {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "Engenheiro de Soluções"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "Algumas linhas extraídas do PDF não puderam ser mapeadas automaticamente para seus itens de inventário. Revise e mapeie cada linha abaixo."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Alguns registros não voltarão. Digite <0>{CONFIRM_WORD}</0> para continuar."msgid "Some Shifts"msgstr "Alguns Turnos"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "Algo deu errado. Tente novamente."@@ -17427,6 +17539,9 @@ msgstr "Interrompe novas sugestões de compra da peça antiga após esta data."msgid "Storage client not available"msgstr "Cliente de armazenamento não disponível"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "Regras de Armazenamento"@@ -17552,9 +17667,6 @@ msgstr "Enviar Inspeção"msgid "Submitted By"msgstr "Enviado por"-msgid "Submodules"-msgstr "Submódulos"-msgid "substance"msgstr "Substância"@@ -17844,6 +17956,9 @@ msgstr "Alternar"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Desative um módulo para removê-lo em todos os lugares: Requisitos, Dados, Treinamento, Escopo."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "Mudar para modo pan"@@ -19616,6 +19731,9 @@ msgstr "Material rastreado é pré-selecionado por ordem de separação (FEFO),msgid "Tracking"msgstr "Rastreamento"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "Método de rastreamento"@@ -19706,6 +19824,9 @@ msgstr "Trânsito e Instituição"msgid "Trash"msgstr "Lixo"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "Balancete"@@ -20003,9 +20124,6 @@ msgstr "Linha sem título"msgid "Untitled step"msgstr "Etapa sem título"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "Material coletado não utilizado devolvido do centro de trabalho para o armazém."@@ -20406,6 +20524,12 @@ msgstr "Verifique seu email"msgid "Version"msgstr "Versão"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "Versão {0} está publicada agora e será substituída."@@ -21286,6 +21410,9 @@ msgstr "Sessões de trabalho sobre configuração e dados"msgid "Worst Performing Machines"msgstr "Máquinas com Pior Desempenho"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "Conta de desvalorização"diff --git a/packages/locale/locales/pt/mes.po b/packages/locale/locales/pt/mes.poindex 54f5bd7ea0..22010d87be 100644--- a/packages/locale/locales/pt/mes.po+++ b/packages/locale/locales/pt/mes.po@@ -215,6 +215,9 @@ msgstr "disponível"msgid "Available"msgstr "Disponível"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "Voltar ao lote de produção"@@ -295,6 +298,9 @@ msgstr "Verifique seu e-mail"msgid "Choose a job"msgstr "Escolha uma ordem de produção"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "Limpar"@@ -406,8 +412,7 @@ msgstr "Copiar para a área de transferência"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Custo de manutenção não planejada, últimos {0} dias"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Criar {0}"@@ -696,6 +701,9 @@ msgstr "Voltar para operação"msgid "Go to onboarding"msgstr "Ir para integração"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "Ocultar descrição"@@ -1179,6 +1187,9 @@ msgstr "Realizado pelo Operador"msgid "Optional"msgstr "Opcional"+msgid "Options"+msgstr ""+msgid "or"msgstr "ou"@@ -1273,6 +1284,9 @@ msgstr "Cronograma de PM expirou"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Pressione ? em qualquer página para abrir esta lista. Os atalhos são ignorados enquanto você digita em um campo."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Anterior"@@ -1917,6 +1931,9 @@ msgstr "Exibições do Centro de Trabalho"msgid "Work instructions"msgstr "Instruções de trabalho"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "Sim"diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex c127c2ef24..51bbfd71a6 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} брак"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} выбрано"@@ -1448,6 +1449,9 @@ msgstr "Добавьте примечания о вашем решении..."msgid "Add Approval Requirement"msgstr "Добавить требование утверждения"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "Добавить приложение-аутентификатор"@@ -1505,6 +1509,9 @@ msgstr "Добавить заголовок"msgid "Add Item"msgstr "Добавить элемент"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "Добавить строку"@@ -1620,6 +1627,9 @@ msgstr "Добавить запасную часть"msgid "Add station"msgstr "Добавить рабочее место"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "Добавить шаг"@@ -1709,6 +1719,9 @@ msgstr "Дополнительно"msgid "Affected item not found."msgstr "Затронутый элемент не найден."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "После"@@ -2743,6 +2756,9 @@ msgstr "Сборки"msgid "Assembly"msgstr "Сборка"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "Инструкция сборки"@@ -2833,6 +2849,9 @@ msgstr "Назначает данную единицу хранения рабоmsgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Назначает данную единицу рабочему центру для прилинейного запаса материала, чтобы операторы видели его в представлении производства; наследуется от родительской единицы, если установлено там."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "Предположения"@@ -3233,6 +3252,9 @@ msgstr "Заблокировано {0}"msgid "Blocking sync"msgstr "Блокировка синхронизации"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "Блокирует станок"@@ -3389,6 +3411,9 @@ msgstr "По местоположению"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "Подписываясь, вы соглашаетесь с <0>Условиями обслуживания</0> и <1>Политикой конфиденциальности.</1>"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "3D модель"@@ -3829,6 +3854,9 @@ msgstr "Выберите серийный номер"msgid "choose a supplier for {0} on the job"msgstr "выберите поставщика для {0} в производственном заказе"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "Выбрать другой файл"@@ -3868,6 +3896,9 @@ msgstr "Очистить"msgid "Clear due date"msgstr "Очистить срок выполнения"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "Очистить фильтры"@@ -4505,6 +4536,9 @@ msgstr "Ссылка скопирована в буфер обмена"msgid "Copied setup prompt to your clipboard"msgstr "Приглашение наладки скопировано в буфер обмена"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "Скопировано!"@@ -4892,8 +4926,7 @@ msgstr "Покрытие"msgid "Create"msgstr "Создать"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Создать {0}"@@ -5902,12 +5935,18 @@ msgstr "Удалить праздник"msgid "Delete Inspection Plan"msgstr "Удалить план контроля"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "Удалить проблему"msgid "Delete Item Group"msgstr "Удалить группу позиций"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "Удалить проводку"@@ -6221,6 +6260,9 @@ msgstr "Дата начала амортизации"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Рассчитать срок хранения этой номенклатуры на основе кратчайшего срока хранения её компонентов, игнорируя поле «Дни» выше."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "Описание"@@ -7090,6 +7132,9 @@ msgstr "Изменить вебхук"msgid "Edit Work Center"msgstr "Изменить рабочий центр"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "Исключено"@@ -7719,9 +7764,6 @@ msgstr "Срок годности начинается при запуске вmsgid "Expiry trace"msgstr "Трассировка срока годности"-msgid "Explorer"-msgstr "Обозреватель"-msgid "Export"msgstr "Экспортировать"@@ -8243,9 +8285,18 @@ msgstr "заполняет цикл"msgid "Filter"msgstr "Фильтровать"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "Фильтровать по…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "Завершить"@@ -8820,6 +8871,9 @@ msgstr "Имеет операции, которые не могут быть сmsgid "Headers"msgstr "Заголовки"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "здоровый"@@ -8886,6 +8940,9 @@ msgstr "Название праздника"msgid "Holidays"msgstr "Праздники"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "Домашний телефон"@@ -10309,6 +10366,9 @@ msgstr "Параметры списка"msgid "List view"msgstr "Вид списка"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Живая перезагрузка"msgid "Load"msgstr "Нагрузка"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "Загрузить новые"@@ -10519,6 +10582,9 @@ msgstr "Класс имущества MACRS"msgid "Magic link"msgstr "Волшебная ссылка"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "Основная сборка (после последнего шага)"@@ -10597,6 +10663,10 @@ msgstr "Производство под заказ"msgid "Make tracked entities available again"msgstr "Сделать отслеживаемые объекты доступными снова"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "Делает этот документ активным снова."@@ -11687,6 +11757,9 @@ msgstr "Нет операций синхронизации {0}"msgid "No {0} yet"msgstr "Пока нет {0}"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "Нет добавленных навыков"@@ -12365,6 +12438,9 @@ msgstr "На этом месте больше нечего извлекать иmsgid "Nothing here matches your search and filters."msgstr "Здесь нет ничего, соответствующего вашему поиску и фильтрам."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "Ничего в архиве"@@ -12686,9 +12762,6 @@ msgstr "Открытые производственные заказы"msgid "Open menu"msgstr "Открыть меню"-msgid "Open navigation"-msgstr "Открыть навигацию"-msgid "Open payables by supplier and age"msgstr "Открытая кредиторская задолженность по поставщикам и срокам"@@ -13049,6 +13122,9 @@ msgstr "Переопределить срок действия для {label}."msgid "Overtime"msgstr "Переработки"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "Перезаписать существующие"@@ -13212,6 +13288,9 @@ msgstr "Вставьте XML метаданных, если ваш поставmsgid "Path"msgstr "Путь"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "Оплатить"@@ -13707,6 +13786,9 @@ msgstr "Текущая неделя"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Нажмите ? на любой странице, чтобы открыть этот список. Сочетания клавиш игнорируются при вводе текста в поле."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Пред"@@ -14090,6 +14172,9 @@ msgstr "Со склада"msgid "Pull, map, and load your data"msgstr "Извлеките, сопоставьте и загрузите ваши данные"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "Закупка и производство из MRP"@@ -14384,6 +14469,9 @@ msgstr "Ежеквартально"msgid "Question"msgstr "Вопрос"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "В очереди"@@ -14510,6 +14598,9 @@ msgstr "Сырьё и материалы"msgid "Raw Materials (default)"msgstr "Сырьё и материалы (по умолчанию)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "Перенести дату на первый открытый день"@@ -15316,6 +15407,9 @@ msgstr "Результаты"msgid "Results per page"msgstr "Результатов на странице"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "Возобновить получение"@@ -15427,12 +15521,18 @@ msgstr "Налог на продажи с обратным взиманием"msgid "Reverse Charge Sales Tax (default)"msgstr "Налог на продажи с обратным взиманием (по умолчанию)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "Отменить связанные записи операций"msgid "Reversed"msgstr "Сторнировано"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "Восстановить"@@ -15882,6 +15982,9 @@ msgstr "Сохранить контактные лица"msgid "Save dimension settings"msgstr "Сохранить настройки измерений"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "Сохранить метод"@@ -15903,6 +16006,9 @@ msgstr "Сохранено"msgid "Saved view"msgstr "Сохраненное представление"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "Сохраненные представления"@@ -16050,6 +16156,9 @@ msgstr "Поиск"msgid "Search {gaugeTypeName}..."msgstr "Поиск {gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "Поиск счетов"@@ -16155,9 +16264,6 @@ msgstr "Секрет скопирован в буфер обмена"msgid "Section"msgstr "Раздел"-msgid "Sections"-msgstr "Разделы"-msgid "Secure your account with 2FA"msgstr "Защитите свою учетную запись с помощью 2FA"@@ -16363,6 +16469,9 @@ msgstr "Выберите количества"msgid "Select Reason"msgstr "Выбрать причину"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "Выбрать строку"@@ -16421,6 +16530,9 @@ msgstr "Самообслуживание"msgid "Self-serve reference at docs.carbon.ms"msgstr "Справочная информация для самостоятельного использования на docs.carbon.ms"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "Отправить"@@ -16861,6 +16973,9 @@ msgstr "Показать {0}"msgid "Show {0} more"msgstr "Показать еще {0}"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "Показать {label}"@@ -16929,6 +17044,9 @@ msgstr "Показано {0} из {totalCount} — уточните поиск"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "Показано {0} из {totalFiltered} — уточните поиск"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "Отображение в {parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "Инженер решений"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "Некоторые строки, извлеченные из PDF, не удалось автоматически сопоставить с вашими номенклатурными позициями. Проверьте и сопоставьте каждую строку ниже."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Некоторые записи не вернутся. Введите <0>{CONFIRM_WORD}</0> для продолжения."msgid "Some Shifts"msgstr "Некоторые смены"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "Что-то пошло не так. Пожалуйста, попробуйте еще раз."@@ -17427,6 +17539,9 @@ msgstr "Останавливает новые предложения по закmsgid "Storage client not available"msgstr "Клиент хранилища недоступен"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "Правила хранения"@@ -17552,9 +17667,6 @@ msgstr "Отправить контроль"msgid "Submitted By"msgstr "Отправлено"-msgid "Submodules"-msgstr "Подмодули"-msgid "substance"msgstr "Вещество"@@ -17844,6 +17956,9 @@ msgstr "Переключить"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Отключите модуль, чтобы удалить его везде: Требования, Данные, Обучение, Область охвата."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "Переключиться в режим панорамы"@@ -19616,6 +19731,9 @@ msgstr "Отслеживаемый материал предварительноmsgid "Tracking"msgstr "Отслеживание"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "Метод отслеживания"@@ -19706,6 +19824,9 @@ msgstr "Транзит и учреждение"msgid "Trash"msgstr "Корзина"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "Сальдовая ведомость"@@ -20003,9 +20124,6 @@ msgstr "Безымянная строка"msgid "Untitled step"msgstr "Шаг без названия"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "Неиспользованный отобранный материал поступает обратно из рабочего центра на склад."@@ -20406,6 +20524,12 @@ msgstr "Подтвердите вашу электронную почту"msgid "Version"msgstr "Версия"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "Версия {0} опубликована сейчас и будет заменена."@@ -21286,6 +21410,9 @@ msgstr "Рабочие сессии по конфигурации и данныmsgid "Worst Performing Machines"msgstr "Худшие станки"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "Счет уценки"diff --git a/packages/locale/locales/ru/mes.po b/packages/locale/locales/ru/mes.poindex b36d2a5c1b..21bb616477 100644--- a/packages/locale/locales/ru/mes.po+++ b/packages/locale/locales/ru/mes.po@@ -215,6 +215,9 @@ msgstr "доступно"msgid "Available"msgstr "Доступно"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "Вернуться к серии"@@ -295,6 +298,9 @@ msgstr "Проверьте вашу электронную почту"msgid "Choose a job"msgstr "Выбрать производственный заказ"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "Очистить"@@ -406,8 +412,7 @@ msgstr "Копировать в буфер обмена"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Себестоимость внепланового техобслуживания за последние {0} дней"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "Создать {0}"@@ -696,6 +701,9 @@ msgstr "Вернуться к операции"msgid "Go to onboarding"msgstr "Перейти к первоначальной настройке"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "Скрыть описание"@@ -1179,6 +1187,9 @@ msgstr "Выполнено оператором"msgid "Optional"msgstr "Опционально"+msgid "Options"+msgstr ""+msgid "or"msgstr "или"@@ -1273,6 +1284,9 @@ msgstr "График обслуживания истек"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Нажмите ? на любой странице, чтобы открыть этот список. Горячие клавиши отключены при вводе в поле."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Назад"@@ -1917,6 +1931,9 @@ msgstr "Дисплеи рабочего центра"msgid "Work instructions"msgstr "Рабочие инструкции"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "Да"diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex cbfa9e64ac..0e8e008304 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} hurdaya alındı"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} seçildi"@@ -1448,6 +1449,9 @@ msgstr "Kararınızla ilgili herhangi bir not ekleyin..."msgid "Add Approval Requirement"msgstr "Onay Gereklilik Ekle"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "Kimlik Doğrulayıcı Uygulaması Ekle"@@ -1505,6 +1509,9 @@ msgstr "Başlık ekle"msgid "Add Item"msgstr "Öğe Ekle"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "Satır Ekle"@@ -1620,6 +1627,9 @@ msgstr "Yedek Parça Ekle"msgid "Add station"msgstr "İstasyon ekle"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "Adım Ekle"@@ -1709,6 +1719,9 @@ msgstr "Gelişmiş"msgid "Affected item not found."msgstr "Etkilenen öğe bulunamadı."+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "Sonra"@@ -2743,6 +2756,9 @@ msgstr "Montajlar"msgid "Assembly"msgstr "Montaj"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "Montaj talimatı"@@ -2833,6 +2849,9 @@ msgstr "Bu depolama birimini bir iş merkezine atar (hat yanı)"msgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "Bu birimi hat yanı malzemesi için bir iş merkezine atar; böylece operatörler bunu üretim görünümünde görürler; orada ayarlandığında ana birimden devralınır."+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "Varsayımlar"@@ -3233,6 +3252,9 @@ msgstr "Bloklandı: {0}"msgid "Blocking sync"msgstr "Engelleme senkronizasyonu"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "Makineyi Engeller"@@ -3389,6 +3411,9 @@ msgstr "Konuma Göre"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "Oturum açarak <0>Hizmet Şartları</0> ve <1>Gizlilik Politikası</1>'na katılıyorsunuz."+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "CAD Modeli"@@ -3829,6 +3854,9 @@ msgstr "Bir seri numarası seçin"msgid "choose a supplier for {0} on the job"msgstr "İş emirde {0} için bir tedarikçi seçin"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "Başka bir dosya seç"@@ -3868,6 +3896,9 @@ msgstr "Temizle"msgid "Clear due date"msgstr "Son tarihi temizle"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "Filtreleri Temizle"@@ -4505,6 +4536,9 @@ msgstr "Bağlantı panoya kopyalandı"msgid "Copied setup prompt to your clipboard"msgstr "Hazırlık istemi panonuza kopyalandı"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "Kopyalandı!"@@ -4892,8 +4926,7 @@ msgstr "Vardiya katılımı"msgid "Create"msgstr "Oluştur"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "{0} Oluştur"@@ -5902,12 +5935,18 @@ msgstr "Tatili Sil"msgid "Delete Inspection Plan"msgstr "Kontrol planını sil"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "Sorunu Sil"msgid "Delete Item Group"msgstr "Öğe Grubunu Sil"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "Yevmiye Kaydını Sil"@@ -6221,6 +6260,9 @@ msgstr "Amortisman Başlangıç Tarihi"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "Bu öğenin raf ömrünü, bileşenlerinin en kısa raf ömründen türet, yukarıdaki Günler alanını yok say."+msgid "Descending"+msgstr ""+msgid "Description"msgstr "Açıklama"@@ -7090,6 +7132,9 @@ msgstr "Webhook Düzenle"msgid "Edit Work Center"msgstr "İş Merkezi Düzenle"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "Ortadan Kaldırılmış"@@ -7719,9 +7764,6 @@ msgstr "Son kullanma tarihi seçilen işlem başladığında başlar."msgid "Expiry trace"msgstr "Son kullanma tarihi izi"-msgid "Explorer"-msgstr "Gezgin"-msgid "Export"msgstr "Dışa Aktar"@@ -8243,9 +8285,18 @@ msgstr "bir seriyi doldurur"msgid "Filter"msgstr "Filtre"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "Filtrele…"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "Onayla"@@ -8820,6 +8871,9 @@ msgstr "Planlanmayan operasyonları var"msgid "Headers"msgstr "Başlıklar"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "sağlıklı"@@ -8886,6 +8940,9 @@ msgstr "Tatil Adı"msgid "Holidays"msgstr "Tatiller"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "Ev Telefonu"@@ -10309,6 +10366,9 @@ msgstr "Liste Parametreleri"msgid "List view"msgstr "Liste görünümü"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "Canlı yeniden yükleniyor"msgid "Load"msgstr "Yük"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "Daha yenisini yükle"@@ -10519,6 +10582,9 @@ msgstr "MACRS Mülk Sınıfı"msgid "Magic link"msgstr "Sihirli Bağlantı"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "Ana montaj (son adımından sonra)"@@ -10597,6 +10663,10 @@ msgstr "Siparişe göre üretim"msgid "Make tracked entities available again"msgstr "İzlenen varlıkları tekrar kullanılabilir hale getirir"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "Bu belgeyi tekrar aktif hale getirir."@@ -11687,6 +11757,9 @@ msgstr "{0} senkronizasyon işlemi yok"msgid "No {0} yet"msgstr "Henüz {0} yok"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "Hiçbir yetkinlik eklenmedi"@@ -12365,6 +12438,9 @@ msgstr "Bu konumda çekilecek başka hiçbir stok yok."msgid "Nothing here matches your search and filters."msgstr "Burada arama ve filtrelerinizle eşleşen hiçbir şey yok."+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "Arşivde hiçbir şey yok"@@ -12686,9 +12762,6 @@ msgstr "Açık İş emirleri"msgid "Open menu"msgstr "Menüyü aç"-msgid "Open navigation"-msgstr "Gezinmeyi aç"-msgid "Open payables by supplier and age"msgstr "Tedarikçi ve yaşa göre açık borçlar"@@ -13049,6 +13122,9 @@ msgstr "{label} üzerindeki son kullanmayı geçersiz kıl."msgid "Overtime"msgstr "Fazla Mesai"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "Mevcut Olanı Üzerine Yaz"@@ -13212,6 +13288,9 @@ msgstr "Kimlik sağlayıcınız bir meta veri URL'si yayınlamıyorsa meta verimsgid "Path"msgstr "Yol"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "Öde"@@ -13707,6 +13786,9 @@ msgstr "Mevcut Hafta"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Bu listeyi açmak için herhangi bir sayfada ? tuşuna basın. Bir alana yazı yazarken kısayollar yoksayılır."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Önceki"@@ -14090,6 +14172,9 @@ msgstr "Stoktan kullan"msgid "Pull, map, and load your data"msgstr "Verilerinizi çekin, eşleyin ve yükleyin"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "MRP'den satın al ve üretim yap"@@ -14384,6 +14469,9 @@ msgstr "Üç Aylık"msgid "Question"msgstr "Soru"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "Kuyrukta"@@ -14510,6 +14598,9 @@ msgstr "Hammadde"msgid "Raw Materials (default)"msgstr "Hammadde (varsayılan)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "İlk açık güne yeniden tarihlendir"@@ -15316,6 +15407,9 @@ msgstr "Sonuçlar"msgid "Results per page"msgstr "Sayfa başına sonuçlar"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "Alımı Devam Et"@@ -15427,12 +15521,18 @@ msgstr "Ters yükleme satış vergisi"msgid "Reverse Charge Sales Tax (default)"msgstr "Ters yükleme satış vergisi (varsayılan)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "İlgili muhasebe fişi kayıtlarını ters kayıt yap"msgid "Reversed"msgstr "Ters kayıt yapıldı"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "Geri Al"@@ -15882,6 +15982,9 @@ msgstr "İlgili Kişileri Kaydet"msgid "Save dimension settings"msgstr "Boyut ayarlarını kaydet"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "Yöntemi Kaydet"@@ -15903,6 +16006,9 @@ msgstr "Kaydedildi"msgid "Saved view"msgstr "Kaydedilmiş görünüm"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "Kaydedilen Görünümler"@@ -16050,6 +16156,9 @@ msgstr "Ara"msgid "Search {gaugeTypeName}..."msgstr "Ara {gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "Hesapları arayın"@@ -16155,9 +16264,6 @@ msgstr "Gizli, panoya kopyalandı"msgid "Section"msgstr "Bölüm"-msgid "Sections"-msgstr "Bölümler"-msgid "Secure your account with 2FA"msgstr "Hesabınızı 2FA ile güvenli hale getirin"@@ -16363,6 +16469,9 @@ msgstr "Miktarları Seçin"msgid "Select Reason"msgstr "Nedeni Seç"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "Satırı Seç"@@ -16421,6 +16530,9 @@ msgstr "Kendi kendine hizmet"msgid "Self-serve reference at docs.carbon.ms"msgstr "Kendi kendine yardım referansı docs.carbon.ms adresinde"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "Gönder"@@ -16861,6 +16973,9 @@ msgstr "{0}'ı göster"msgid "Show {0} more"msgstr "{0} daha göster"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "{label}'ı göster"@@ -16929,6 +17044,9 @@ msgstr "{0} / {totalCount} gösteriliyor — aramanızı daraltın"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "{0} / {totalFiltered} gösteriliyor — aramanızı daraltın"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "{parentCurrency} cinsinden gösteriliyor"@@ -17068,18 +17186,12 @@ msgstr "Çözüm Mühendisi"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "PDF'den çıkarılan bazı satırlar stok kartlarınıza otomatik olarak eşleştirilemedi. Aşağıdaki her satırı gözden geçirin ve eşleştirin."-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "Bazı kayıtlar geri gelmeyecek. Devam etmek için <0>{CONFIRM_WORD}</0> yazın."msgid "Some Shifts"msgstr "Bazı Vardiyalar"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "Bir şeyler ters gitti. Lütfen tekrar deneyin."@@ -17427,6 +17539,9 @@ msgstr "Bu tarihten sonra eski parça için yeni satın alma önerilerini durdurmsgid "Storage client not available"msgstr "Depolama istemcisi kullanılamıyor"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "Depolama Kuralları"@@ -17552,9 +17667,6 @@ msgstr "Muayeneyi Gönder"msgid "Submitted By"msgstr "Gönderen"-msgid "Submodules"-msgstr "Alt modüller"-msgid "substance"msgstr "Madde"@@ -17844,6 +17956,9 @@ msgstr "Değiştir"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "Bir modülü kapatarak her yerden kaldırın: Gereklilikler, Veriler, Eğitim, Kapsam."+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "Pan moduna geç"@@ -19616,6 +19731,9 @@ msgstr "İzlenen malzeme, toplama listesi olmasa bile toplama sırasına (FEFO)msgid "Tracking"msgstr "Takip"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "İzleme yöntemi"@@ -19706,6 +19824,9 @@ msgstr "Geçiş ve Kurum"msgid "Trash"msgstr "Çöp Kutusu"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "Mizan"@@ -20003,9 +20124,6 @@ msgstr "Başlıksız satır"msgid "Untitled step"msgstr "Başlıksız Adım"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "İş merkezinden depoya geri gönderilen kullanılmayan alınan malzeme."@@ -20406,6 +20524,12 @@ msgstr "E-posta adresinizi doğrulayın"msgid "Version"msgstr "Sürüm"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "Sürüm {0} şu anda yayınlandı ve değiştirilecektir."@@ -21286,6 +21410,9 @@ msgstr "Yapılandırma ve veri üzerinde çalışma oturumları"msgid "Worst Performing Machines"msgstr "En kötü performans gösteren makineler"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "Değer Düşüklüğü Hesabı"diff --git a/packages/locale/locales/tr/mes.po b/packages/locale/locales/tr/mes.poindex f0e28187d1..2706680727 100644--- a/packages/locale/locales/tr/mes.po+++ b/packages/locale/locales/tr/mes.po@@ -215,6 +215,9 @@ msgstr "kullanılabilir"msgid "Available"msgstr "Kullanılabilir"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "Partiye geri dön"@@ -295,6 +298,9 @@ msgstr "E-postanızı kontrol edin"msgid "Choose a job"msgstr "İş emri seç"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "Temizle"@@ -406,8 +412,7 @@ msgstr "Panoya kopyala"msgid "Cost of unplanned maintenance, last {0} days"msgstr "Planlanmamış bakım maliyeti, son {0} gün"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "{0} Oluştur"@@ -696,6 +701,9 @@ msgstr "İşleme geri dön"msgid "Go to onboarding"msgstr "Başlangıç adımına git"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "Açıklamayı gizle"@@ -1179,6 +1187,9 @@ msgstr "Operatör Tarafından Yapıldı"msgid "Optional"msgstr "İsteğe bağlı"+msgid "Options"+msgstr ""+msgid "or"msgstr "veya"@@ -1273,6 +1284,9 @@ msgstr "PM zamanlaması süresi doldu"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "Herhangi bir sayfada bu listeyi açmak için ? tuşuna basın. Bir alan içinde yazarken kısayollar yoksayılır."+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "Önceki"@@ -1917,6 +1931,9 @@ msgstr "İş Merkezi Ekranları"msgid "Work instructions"msgstr "İş talimatları"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "Evet"diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex ccd8ec8a75..1dab927522 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -224,6 +224,7 @@ msgid "{0} scrapped"msgstr "{0} 报废"#. placeholder {0}: selected.length+#. placeholder {0}: selectedRows.lengthmsgid "{0} selected"msgstr "{0} 已选择"@@ -1448,6 +1449,9 @@ msgstr "添加关于您的决定的任何备注..."msgid "Add Approval Requirement"msgstr "添加审批要求"+msgid "Add Asset Class"+msgstr ""+msgid "Add Authenticator App"msgstr "添加身份验证器应用"@@ -1505,6 +1509,9 @@ msgstr "添加标题"msgid "Add Item"msgstr "添加项目"+msgid "Add Journal Entry"+msgstr ""+msgid "Add Line"msgstr "添加行"@@ -1620,6 +1627,9 @@ msgstr "添加备件"msgid "Add station"msgstr "添加工位"+msgid "Add step"+msgstr ""+msgid "Add Step"msgstr "添加步骤"@@ -1709,6 +1719,9 @@ msgstr "高级"msgid "Affected item not found."msgstr "未找到受影响的项目。"+msgid "Affected Items"+msgstr ""+msgid "After"msgstr "之后"@@ -2743,6 +2756,9 @@ msgstr "装配件"msgid "Assembly"msgstr "装配"+msgid "assembly instruction"+msgstr ""+msgid "Assembly instruction"msgstr "装配说明"@@ -2833,6 +2849,9 @@ msgstr "将此存储单元分配给工作中心(线边)"msgid "Assigns this unit to a work center for lineside material, so operators see it on the production view; inherited from the parent unit when set there."msgstr "将此库位分配给工作中心以进行线边物料管理,使操作员能在生产视图上看到;从父库位继承该设置。"+msgid "Associations"+msgstr ""+msgid "Assumptions"msgstr "假设"@@ -3233,6 +3252,9 @@ msgstr "被 {0} 阻止"msgid "Blocking sync"msgstr "阻止同步"+msgid "Blocks"+msgstr ""+msgid "Blocks Machine"msgstr "阻止机器"@@ -3389,6 +3411,9 @@ msgstr "按位置"msgid "By signing in, you agree to the <0>Terms of Service</0> and <1>Privacy Policy.</1>"msgstr "通过登录,您同意<0>服务条款</0>和<1>隐私政策。</1>"+msgid "By you · edited <0/>"+msgstr ""+msgid "CAD Model"msgstr "CAD 模型"@@ -3829,6 +3854,9 @@ msgstr "选择序列号"msgid "choose a supplier for {0} on the job"msgstr "为工单上的{0}选择供应商"+msgid "Choose an option"+msgstr ""+msgid "Choose another file"msgstr "选择另一个文件"@@ -3868,6 +3896,9 @@ msgstr "清除"msgid "Clear due date"msgstr "清除到期日"+msgid "Clear filters"+msgstr ""+msgid "Clear Filters"msgstr "清除筛选"@@ -4505,6 +4536,9 @@ msgstr "已复制链接到剪贴板"msgid "Copied setup prompt to your clipboard"msgstr "已将换型提示复制到剪贴板"+msgid "Copied to clipboard"+msgstr ""+msgid "Copied!"msgstr "已复制!"@@ -4892,8 +4926,7 @@ msgstr "覆盖范围"msgid "Create"msgstr "创建"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "创建 {0}"@@ -5902,12 +5935,18 @@ msgstr "删除假期"msgid "Delete Inspection Plan"msgstr "删除检验计划"+msgid "Delete Instruction"+msgstr ""+msgid "Delete Issue"msgstr "删除问题"msgid "Delete Item Group"msgstr "删除物品组"+msgid "Delete Job"+msgstr ""+msgid "Delete Journal Entry"msgstr "删除分录"@@ -6221,6 +6260,9 @@ msgstr "折旧开始日期"msgid "Derive this item's shelf life from the shortest shelf life of its components, ignoring the Days field above."msgstr "从其组件的最短保质期推导该物料的保质期,忽略上面的天数字段。"+msgid "Descending"+msgstr ""+msgid "Description"msgstr "描述"@@ -7090,6 +7132,9 @@ msgstr "编辑 Webhook"msgid "Edit Work Center"msgstr "编辑工作中心"+msgid "edited <0/>"+msgstr ""+msgid "Eliminated"msgstr "已消除"@@ -7719,9 +7764,6 @@ msgstr "有效期从选定的流程开始时开始。"msgid "Expiry trace"msgstr "有效期追踪"-msgid "Explorer"-msgstr "浏览器"-msgid "Export"msgstr "导出"@@ -8243,9 +8285,18 @@ msgstr "可组成一个生产批次"msgid "Filter"msgstr "筛选"+msgid "Filter & sort"+msgstr ""++msgid "Filter and sort"+msgstr ""+msgid "Filter by…"msgstr "按…筛选"+msgid "Filters"+msgstr ""+msgid "Finalize"msgstr "完成"@@ -8820,6 +8871,9 @@ msgstr "有无法排程的工序"msgid "Headers"msgstr "标头"+msgid "Heading {level}"+msgstr ""+msgid "healthy"msgstr "健康"@@ -8886,6 +8940,9 @@ msgstr "假期名称"msgid "Holidays"msgstr "假期"+msgid "Home"+msgstr ""+msgid "Home Phone"msgstr "家庭电话"@@ -10309,6 +10366,9 @@ msgstr "列表参数"msgid "List view"msgstr "列表视图"+msgid "List View"+msgstr ""+#. placeholder {0}: inputLabel(batch.first)#. placeholder {1}: inputLabel(batch.second)msgid "Lists are wired into both {0} and {1}, so this step cannot tell which one to repeat over. Leave a list on only one of them."@@ -10323,6 +10383,9 @@ msgstr "实时重新加载"msgid "Load"msgstr "负荷"+msgid "Load more"+msgstr ""+msgid "Load newer"msgstr "加载更新"@@ -10519,6 +10582,9 @@ msgstr "MACRS资产类别"msgid "Magic link"msgstr "魔法链接"+msgid "Main"+msgstr ""+msgid "Main build (after its last step)"msgstr "主装配(在其最后一步后)"@@ -10597,6 +10663,10 @@ msgstr "按订单生产"msgid "Make tracked entities available again"msgstr "使跟踪的实体再次可用"+#. placeholder {0}: instruction.version+msgid "Make version {0} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it."+msgstr ""+msgid "Makes this document active again."msgstr "再次启用此文件。"@@ -11687,6 +11757,9 @@ msgstr "无{0}个同步操作"msgid "No {0} yet"msgstr "还没有{0}"+msgid "No {title} yet"+msgstr ""+msgid "No abilities added"msgstr "没有添加技能"@@ -12365,6 +12438,9 @@ msgstr "此位置没有其他可提取的库存。"msgid "Nothing here matches your search and filters."msgstr "没有与您的搜索和过滤条件匹配的内容。"+msgid "Nothing here yet"+msgstr ""+msgid "Nothing in the archive"msgstr "存档中没有任何内容"@@ -12686,9 +12762,6 @@ msgstr "未结工单"msgid "Open menu"msgstr "打开菜单"-msgid "Open navigation"-msgstr "打开导航"-msgid "Open payables by supplier and age"msgstr "按供应商和期限打开应付款项"@@ -13049,6 +13122,9 @@ msgstr "覆盖 {label} 上的过期日期。"msgid "Overtime"msgstr "加班"+msgid "Overview"+msgstr ""+msgid "Overwrite Existing"msgstr "覆盖现有"@@ -13212,6 +13288,9 @@ msgstr "如果您的身份提供商未发布元数据 URL,请粘贴元数据 XMLmsgid "Path"msgstr "路径"+msgid "Pause"+msgstr ""+msgid "Pay"msgstr "支付"@@ -13707,6 +13786,9 @@ msgstr "本周"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "在任意页面上按 ? 打开此列表。在字段中输入时快捷键被忽略。"+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "上一页"@@ -14090,6 +14172,9 @@ msgstr "从库存领用"msgid "Pull, map, and load your data"msgstr "拉取、映射和加载您的数据"+msgid "Purchase"+msgstr ""+msgid "Purchase & manufacture from MRP"msgstr "从 MRP 采购和制造"@@ -14384,6 +14469,9 @@ msgstr "每季度"msgid "Question"msgstr "问题"+msgid "Questions"+msgstr ""+msgid "Queued"msgstr "排队中"@@ -14510,6 +14598,9 @@ msgstr "原材料"msgid "Raw Materials (default)"msgstr "原材料(默认)"+msgid "Re-convert Model"+msgstr ""+msgid "Re-date to first open day"msgstr "重新日期至第一个开放日"@@ -15316,6 +15407,9 @@ msgstr "结果"msgid "Results per page"msgstr "每页结果数"+msgid "Resume"+msgstr ""+msgid "Resume Receiving"msgstr "恢复接收"@@ -15427,12 +15521,18 @@ msgstr "反向收费销售税"msgid "Reverse Charge Sales Tax (default)"msgstr "反向收费销售税 (默认)"+msgid "Reverse Entry"+msgstr ""+msgid "Reverse the related journal entries"msgstr "反转相关凭证条目"msgid "Reversed"msgstr "已冲销"+msgid "Reversing Entry"+msgstr ""+msgid "Revert"msgstr "还原"@@ -15882,6 +15982,9 @@ msgstr "保存联系人"msgid "Save dimension settings"msgstr "保存维度设置"+msgid "Save Draft"+msgstr ""+msgid "Save Method"msgstr "保存方法"@@ -15903,6 +16006,9 @@ msgstr "已保存"msgid "Saved view"msgstr "已保存视图"+msgid "Saved views"+msgstr ""+msgid "Saved Views"msgstr "已保存的视图"@@ -16050,6 +16156,9 @@ msgstr "搜索"msgid "Search {gaugeTypeName}..."msgstr "搜索{gaugeTypeName}..."+msgid "Search {title}"+msgstr ""+msgid "Search accounts"msgstr "搜索账户"@@ -16155,9 +16264,6 @@ msgstr "密码已复制到剪贴板"msgid "Section"msgstr "部分"-msgid "Sections"-msgstr "部分"-msgid "Secure your account with 2FA"msgstr "使用2FA保护您的账户"@@ -16363,6 +16469,9 @@ msgstr "选择数量"msgid "Select Reason"msgstr "选择原因"+msgid "Select row"+msgstr ""+msgid "Select Row"msgstr "选择行"@@ -16421,6 +16530,9 @@ msgstr "自助服务"msgid "Self-serve reference at docs.carbon.ms"msgstr "自助参考文档,位于 docs.carbon.ms"+msgid "Sell"+msgstr ""+msgid "Send"msgstr "发送"@@ -16861,6 +16973,9 @@ msgstr "显示 {0}"msgid "Show {0} more"msgstr "显示{0}个更多"+msgid "Show {count} results"+msgstr ""+msgid "Show {label}"msgstr "显示 {label}"@@ -16929,6 +17044,9 @@ msgstr "显示 {0} 个,共 {totalCount} 个 — 优化搜索"msgid "Showing {0} of {totalFiltered} — refine your search"msgstr "显示 {0} / {totalFiltered} — 优化您的搜索"+msgid "Showing {firstShown}–{lastShown} of {total}"+msgstr ""+msgid "Showing in {parentCurrency}"msgstr "显示货币:{parentCurrency}"@@ -17068,18 +17186,12 @@ msgstr "解决方案工程师"msgid "Some lines extracted from the PDF could not be automatically mapped to your inventory items. Review and map each line below."msgstr "从 PDF 提取的某些行无法自动映射到你的库存物料。查看并映射下面的每一行。"-msgid "Some quantities are negative."-msgstr ""-msgid "Some records won't come back. Type <0>{CONFIRM_WORD}</0> to continue."msgstr "某些记录不会回来。输入 <0>{CONFIRM_WORD}</0> 继续。"msgid "Some Shifts"msgstr "某些班次"-msgid "Some stock has no storage unit."-msgstr ""-msgid "Something went wrong. Please try again."msgstr "出现问题。请重试。"@@ -17427,6 +17539,9 @@ msgstr "在此日期之后停止旧零件的新采购建议。"msgid "Storage client not available"msgstr "存储客户端不可用"+msgid "Storage Rule"+msgstr ""+msgid "Storage Rules"msgstr "存储规则"@@ -17552,9 +17667,6 @@ msgstr "提交检验"msgid "Submitted By"msgstr "提交者"-msgid "Submodules"-msgstr "子模块"-msgid "substance"msgstr "物质"@@ -17844,6 +17956,9 @@ msgstr "切换"msgid "Switch a module off to remove it everywhere: Requirements, Data, Training, Scope."msgstr "关闭一个模块以从所有位置移除它:要求、数据、培训、范围。"+msgid "Switch company"+msgstr ""+msgid "Switch to pan mode"msgstr "切换到平移模式"@@ -19616,6 +19731,9 @@ msgstr "追踪原材料按拣货顺序(先到期先出)预选,即使没有msgid "Tracking"msgstr "追踪"+msgid "Tracking ID"+msgstr ""+msgid "Tracking method"msgstr "跟踪方法"@@ -19706,6 +19824,9 @@ msgstr "中转与机构"msgid "Trash"msgstr "垃圾桶"+msgid "Tree View"+msgstr ""+msgid "Trial Balance"msgstr "试算平衡表"@@ -20003,9 +20124,6 @@ msgstr "未命名行"msgid "Untitled step"msgstr "未命名步骤"-msgid "Untracked"-msgstr ""-msgid "Unused picked material flushed back from the work center to the warehouse."msgstr "未使用的已拣货物料从工作中心冲回至仓库。"@@ -20406,6 +20524,12 @@ msgstr "验证您的电子邮件"msgid "Version"msgstr "版本"+#. placeholder {0}: current.versionNumber+#. placeholder {0}: instruction.version+#. placeholder {0}: v.versionNumber+msgid "Version {0}"+msgstr ""+#. placeholder {0}: published.versionNumbermsgid "Version {0} is published now and will be replaced."msgstr "版本{0}现已发布,将被替换。"@@ -21286,6 +21410,9 @@ msgstr "配置和数据工作会议"msgid "Worst Performing Machines"msgstr "性能最差的机器"+msgid "Write a note…"+msgstr ""+msgid "Write-Down Account"msgstr "减值账户"diff --git a/packages/locale/locales/zh/mes.po b/packages/locale/locales/zh/mes.poindex 6142f622c5..0460d13acd 100644--- a/packages/locale/locales/zh/mes.po+++ b/packages/locale/locales/zh/mes.po@@ -215,6 +215,9 @@ msgstr "可用"msgid "Available"msgstr "可用"+msgid "Back"+msgstr ""+msgid "Back to batch"msgstr "返回生产批次"@@ -295,6 +298,9 @@ msgstr "请查收邮件"msgid "Choose a job"msgstr "选择工单"+msgid "Choose an option"+msgstr ""+msgid "Clear"msgstr "清除"@@ -406,8 +412,7 @@ msgstr "复制到剪贴板"msgid "Cost of unplanned maintenance, last {0} days"msgstr "过去 {0} 天的计划外维护成本"-#. placeholder {0}: search.trim() === "" ? (createLabel ?? label) : search-#. placeholder {0}: search.trim() === "" ? label : search+#. placeholder {0}: search.trim() === "" ? createLabel : searchmsgid "Create {0}"msgstr "创建 {0}"@@ -696,6 +701,9 @@ msgstr "返回操作"msgid "Go to onboarding"msgstr "前往入门"+msgid "Heading {level}"+msgstr ""+msgid "Hide description"msgstr "隐藏描述"@@ -1179,6 +1187,9 @@ msgstr "操作员执行"msgid "Optional"msgstr "可选"+msgid "Options"+msgstr ""+msgid "or"msgstr "或"@@ -1273,6 +1284,9 @@ msgstr "PM排程已逾期"msgid "Press ? on any page to open this list. Shortcuts are ignored while you type in a field."msgstr "在任何页面按 ? 打开此列表。在字段中输入时快捷键不可用。"+msgid "Press '/' for commands"+msgstr ""+msgid "Prev"msgstr "上一个"@@ -1917,6 +1931,9 @@ msgstr "工作中心显示屏"msgid "Work instructions"msgstr "作业指导书"+msgid "Write a note…"+msgstr ""+msgid "Yes"msgstr "是"diff --git a/packages/react/src/ActionPresentation.tsx b/packages/react/src/ActionPresentation.tsxnew file mode 100644index 0000000000..33e242b187--- /dev/null+++ b/packages/react/src/ActionPresentation.tsx@@ -0,0 +1,39 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { ReactNode } from "react";+import { createContext, useContext } from "react";++/**+ * How a record action renders on phones, set by the ERP's RecordAction:+ * - `bar`: a cell of the bottom action bar, filled (`primary`) or outline+ * (`secondary`) whatever variant the caller passed.+ * - `row`: a row of the ⋯ action sheet; choosing it calls `onSelect` (closes+ * the sheet).+ * Desktop and everything outside a RecordAction see `null`.+ */+export type ActionPresentation =+ | { kind: "bar"; emphasis: "primary" | "secondary" }+ | { kind: "row"; onSelect: () => void };++const Context = createContext<ActionPresentation | null>(null);++export const ActionPresentationProvider = Context.Provider;++export function useActionPresentation() {+ return useContext(Context);+}++/**+ * Popup contents start a new scope: a dialog an action opens renders its own+ * buttons normally, not as bar cells or sheet rows. (Context crosses portals;+ * the dialog is still a React child of the action.)+ */+export function ActionPresentationBoundary({+ children+}: {+ children: ReactNode;+}) {+ return <Context.Provider value={null}>{children}</Context.Provider>;+}diff --git a/packages/react/src/Avatar.tsx b/packages/react/src/Avatar.tsxindex 28708cf366..ec049dd4cd 100644--- a/packages/react/src/Avatar.tsx+++ b/packages/react/src/Avatar.tsx@@ -72,6 +72,7 @@ const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(className)}alt={name ?? "avatar"}+ data-avatar={size ?? "sm"}src={src}onError={() => setError(true)}/>@@ -86,6 +87,7 @@ const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(className)}style={name ? { background, color } : undefined}+ data-avatar={size ?? "sm"}{...props}ref={ref}>diff --git a/packages/react/src/BottomSheet.tsx b/packages/react/src/BottomSheet.tsxindex d7bc4f5786..730da4ec08 100644--- a/packages/react/src/BottomSheet.tsx+++ b/packages/react/src/BottomSheet.tsx@@ -4,6 +4,7 @@"use client";+import { useLingui } from "@lingui/react/macro";import * as DialogPrimitive from "@radix-ui/react-dialog";import type {ComponentPropsWithoutRef,@@ -11,11 +12,22 @@ import type {HTMLAttributes} from "react";import { forwardRef } from "react";+import { LuChevronLeft, LuX } from "react-icons/lu";+import { ActionPresentationBoundary } from "./ActionPresentation";import { ClientOnly } from "./ClientOnly";+import { useCompact } from "./Compact";+import { DialogRoot, useDialogDismissable } from "./Modal";import { cn } from "./utils/cn";-const BottomSheet = DialogPrimitive.Root;+/**+ * A sheet that slides up from the bottom. Every compact (phone) sheet shares+ * this anatomy: grabber, header with optional Back and a close ×, a scrolling+ * body and a sticky footer above the safe area. The compact+ * parts only apply inside an app that opted into the `compact:` variant, so+ * other callers (MES) render as before.+ */+const BottomSheet = DialogRoot;const BottomSheetTrigger = DialogPrimitive.Trigger;@@ -36,55 +48,141 @@ const BottomSheetOverlay = forwardRef<));BottomSheetOverlay.displayName = "BottomSheetOverlay";+type BottomSheetContentProps = ComponentPropsWithoutRef<+ typeof DialogPrimitive.Content+> & {+ /** `auto` fits the content up to 88dvh; `full` covers the screen. */+ size?: "auto" | "full";+};+const BottomSheetContent = forwardRef<ElementRef<typeof DialogPrimitive.Content>,- ComponentPropsWithoutRef<typeof DialogPrimitive.Content>->(({ className, children, ...props }, ref) => (- <ClientOnly fallback={null}>- {() => (- <DialogPrimitive.Portal>- <BottomSheetOverlay />- <DialogPrimitive.Content- ref={ref}- className={cn(- "fixed inset-x-0 bottom-0 z-[70] flex flex-col rounded-t-2xl bg-background shadow-lg duration-300",- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",- className- )}- {...props}- >- <div className="mx-auto mt-3 mb-2 h-1.5 w-12 shrink-0 rounded-full bg-muted-foreground/20" />- {children}- </DialogPrimitive.Content>- </DialogPrimitive.Portal>- )}- </ClientOnly>-));+ BottomSheetContentProps+>(({ className, children, size = "auto", ...props }, ref) => {+ const { t } = useLingui();+ const isCompact = useCompact();+ const dismissable = useDialogDismissable();+ return (+ <ClientOnly fallback={null}>+ {() => (+ <DialogPrimitive.Portal>+ <BottomSheetOverlay />+ <DialogPrimitive.Content+ ref={ref}+ className={cn(+ "fixed inset-x-0 bottom-0 z-[70] flex flex-col rounded-t-2xl bg-background shadow-lg duration-300",+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",+ "compact:max-h-[88dvh] compact:rounded-t-[14px] compact:bg-popover compact:pb-safe",+ size === "full" &&+ "compact:h-[calc(100dvh-env(safe-area-inset-top)-12px)] compact:max-h-none",+ className+ )}+ {...props}+ >+ <div+ className={cn(+ "mx-auto mt-3 mb-2 h-1.5 w-12 shrink-0 rounded-full bg-muted-foreground/20",+ "compact:mt-2 compact:mb-1 compact:h-[5px] compact:w-9"+ )}+ />+ <ActionPresentationBoundary>{children}</ActionPresentationBoundary>+ {isCompact && dismissable && (+ <DialogPrimitive.Close+ aria-label={t`Close`}+ className="absolute top-3 right-1 flex size-11 items-center justify-center rounded-full text-muted-foreground outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50"+ >+ <LuX className="size-5" />+ </DialogPrimitive.Close>+ )}+ </DialogPrimitive.Content>+ </DialogPrimitive.Portal>+ )}+ </ClientOnly>+ );+});BottomSheetContent.displayName = "BottomSheetContent";const BottomSheetHeader = ({className,...props}: HTMLAttributes<HTMLDivElement>) => (- <div className={cn("px-6 pb-2 text-center", className)} {...props} />+ <div+ className={cn(+ "px-6 pb-2 text-center",+ "compact:relative compact:flex compact:min-h-11 compact:shrink-0 compact:items-center compact:justify-center compact:px-14 compact:pb-2",+ className+ )}+ {...props}+ />);BottomSheetHeader.displayName = "BottomSheetHeader";+/** ‹ Back in a sheet header, for drill-in sheets. */+const BottomSheetBack = ({+ className,+ onClick+}: {+ className?: string;+ onClick: () => void;+}) => {+ const { t } = useLingui();+ return (+ <button+ type="button"+ aria-label={t`Back`}+ onClick={onClick}+ className={cn(+ "absolute left-1 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full text-foreground outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",+ className+ )}+ >+ <LuChevronLeft className="size-6" />+ </button>+ );+};+BottomSheetBack.displayName = "BottomSheetBack";+const BottomSheetBody = ({className,...props}: HTMLAttributes<HTMLDivElement>) => (- <div className={cn("px-6 pb-6", className)} {...props} />+ <div+ className={cn(+ "px-6 pb-6",+ "compact:min-h-0 compact:flex-1 compact:overflow-y-auto compact:px-4 compact:pb-4",+ className+ )}+ {...props}+ />);BottomSheetBody.displayName = "BottomSheetBody";+/** Sticky footer of full-width buttons above the safe area. */+const BottomSheetFooter = ({+ className,+ ...props+}: HTMLAttributes<HTMLDivElement>) => (+ <div+ className={cn(+ "sticky bottom-0 flex shrink-0 gap-2 border-t border-border bg-inherit px-4 pt-3 pb-4 [&>*]:flex-1",+ className+ )}+ {...props}+ />+);+BottomSheetFooter.displayName = "BottomSheetFooter";+const BottomSheetTitle = forwardRef<ElementRef<typeof DialogPrimitive.Title>,ComponentPropsWithoutRef<typeof DialogPrimitive.Title>>(({ className, ...props }, ref) => (<DialogPrimitive.Titleref={ref}- className={cn("text-sm font-medium text-muted-foreground", className)}+ className={cn(+ "text-sm font-medium text-muted-foreground",+ "compact:truncate compact:text-[17px] compact:font-semibold compact:text-foreground",+ className+ )}{...props}/>));@@ -104,10 +202,12 @@ BottomSheetDescription.displayName = "BottomSheetDescription";export {BottomSheet,+ BottomSheetBack,BottomSheetBody,BottomSheetClose,BottomSheetContent,BottomSheetDescription,+ BottomSheetFooter,BottomSheetHeader,BottomSheetTitle,BottomSheetTriggerdiff --git a/packages/react/src/Button.tsx b/packages/react/src/Button.tsxindex ac3d90faf3..632baedf06 100644--- a/packages/react/src/Button.tsx+++ b/packages/react/src/Button.tsx@@ -5,8 +5,10 @@import { Slot, Slottable } from "@radix-ui/react-slot";import type { VariantProps } from "class-variance-authority";import { cva } from "class-variance-authority";-import type { ButtonHTMLAttributes, ReactElement } from "react";+import type { ButtonHTMLAttributes, MouseEvent, ReactElement } from "react";import { cloneElement, forwardRef, useCallback, useRef } from "react";+import { useActionPresentation } from "./ActionPresentation";+import { HitArea } from "./Compact";import type { ShortcutInput } from "./hooks/useShortcutKeys";import { useShortcutKeys } from "./hooks/useShortcutKeys";import { ShortcutKey } from "./ShortcutKey";@@ -168,6 +170,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>() => {const Comp = asChild ? Slot : "button";const innerRef = useRef<HTMLButtonElement>(null);+ const presentation = useActionPresentation();// The badge shows the first binding; the rest are silent alternatives.const primaryShortcut = Array.isArray(shortcut) ? shortcut[0] : shortcut;const badgeShortcut =@@ -200,19 +203,42 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(disabled: Boolean(isDisabled || props.disabled || isLoading)});+ // Phones, inside a record action: a bottom-bar cell or an action-sheet+ // row (see ActionPresentation).+ const isRow = presentation?.kind === "row";+ const onClick = isRow+ ? (event: MouseEvent<HTMLButtonElement>) => {+ props.onClick?.(event);+ if (event.defaultPrevented || props["aria-haspopup"]) return;+ // Next task, so a submit button's form is still mounted when the+ // browser submits it.+ setTimeout(presentation.onSelect, 0);+ }+ : props.onClick;+return (<Comp{...props}+ onClick={onClick}className={cn(buttonVariants({- variant,- size,+ variant:+ presentation?.kind === "bar"+ ? presentation.emphasis+ : isRow+ ? "ghost"+ : variant,+ size: presentation ? "lg" : size,isDisabled,isIcon,isLoading,isRound,className- })+ }),+ presentation?.kind === "bar" && "w-full min-w-0",+ isRow &&+ "h-12 w-full min-w-0 shrink justify-start rounded-sm px-3 text-[15px] font-normal text-foreground shadow-none",+ isRow && variant === "destructive" && "text-destructive")}type={asChild ? undefined : (props.type ?? "button")}// `isLoading` disables too. It already blocks the keyboard path via@@ -226,6 +252,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(role={asChild ? undefined : "button"}ref={mergeRefs(ref, innerRef)}>+ <HitArea />{isLoading && (<Spinner className={cn("size-4 flex-shrink-0", !isIcon && "mr-2")} />)}diff --git a/packages/react/src/Card.tsx b/packages/react/src/Card.tsxindex 186bbc430a..8243d6239a 100644--- a/packages/react/src/Card.tsx+++ b/packages/react/src/Card.tsx@@ -12,6 +12,7 @@ import {} from "react";import { LuChevronDown, LuChevronUp } from "react-icons/lu";import { IconButton } from "./IconButton";+import { compactFooterClassName } from "./Modal";import { cn } from "./utils/cn";interface CardProps extends HTMLAttributes<HTMLDivElement> {@@ -110,7 +111,7 @@ const CardAttribute = forwardRef<<divref={ref}className={cn(- "flex flex-row md:flex-col items-start justify-start gap-2",+ "flex flex-row md:flex-col items-start justify-start gap-2 compact:min-h-12 compact:items-center compact:justify-between",className)}{...props}@@ -124,7 +125,7 @@ const CardAttributes = forwardRef<>(({ className, ...props }, ref) => (<divref={ref}- className={cn("flex flex-col md:flex-row gap-8", className)}+ className={cn("flex flex-col md:flex-row gap-8 compact:gap-0", className)}{...props}/>));@@ -167,7 +168,7 @@ const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(<divref={ref}className={cn(- "flex flex-col gap-1 px-6 py-4 text-muted-foreground",+ "flex flex-col gap-1 px-6 py-4 text-muted-foreground compact:px-4 compact:py-3",context?.isCollapsed && "cursor-pointer",className)}@@ -212,11 +213,13 @@ const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(if (context?.isCollapsed) {return null;}+ // Phones flatten the panel under its header. When the header before it is+ // hidden on phones, the panel is the card's top edge, so it stays rounded.return (<divref={ref}className={cn(- "flex flex-col flex-1 p-6 rounded-xl border border-border bg-card dark:bg-muted/40",+ "flex flex-col flex-1 p-6 rounded-xl border border-border bg-card dark:bg-muted/40 compact:p-4 compact:rounded-t-none compact:border-x-0 compact:border-b-0 compact:[&:is([class~='compact:hidden']+*)]:rounded-t-xl compact:[&:is([class~='compact:hidden']+*)]:border-t-0",className)}{...props}@@ -226,8 +229,13 @@ const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>();CardContent.displayName = "CardContent";-const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(- ({ className, ...props }, ref) => {+type CardFooterProps = HTMLAttributes<HTMLDivElement> & {+ /** Phones: pin the footer's actions to the bottom of the screen. */+ sticky?: boolean;+};++const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(+ ({ className, sticky = false, ...props }, ref) => {const context = useContext(CardContext);if (context?.isCollapsed) {return null;@@ -235,7 +243,14 @@ const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(return (<divref={ref}- className={cn("flex items-center py-4 px-6 gap-2", className)}+ className={cn(+ "flex items-center py-4 px-6 gap-2 compact:px-4",+ // Phones: the same full-width 44pt actions as a sheet footer.+ sticky && compactFooterClassName,+ sticky &&+ "compact:z-10 compact:border-t compact:border-border compact:bg-card compact:pb-safe-4",+ className+ )}{...props}/>);diff --git a/packages/react/src/Checkbox.tsx b/packages/react/src/Checkbox.tsxindex 1bc18f0f57..7ab8a1ae9e 100644--- a/packages/react/src/Checkbox.tsx+++ b/packages/react/src/Checkbox.tsx@@ -25,6 +25,8 @@ const Checkbox = forwardRef<className={cn("peer size-4 shrink-0 rounded-[4px] border border-muted-foreground/50 shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",isIndeterminate && "bg-primary text-primary-foreground",+ // Phones: a 44x44 hit area around the visual box.+ "compact:hit-area",className)}{...props}diff --git a/packages/react/src/ChoiceSelect.tsx b/packages/react/src/ChoiceSelect.tsxindex 9a30666e4c..22ff307b7d 100644--- a/packages/react/src/ChoiceSelect.tsx+++ b/packages/react/src/ChoiceSelect.tsx@@ -210,6 +210,7 @@ function ChoiceSelectMulti<V extends string>({"hover:bg-accent/40","outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","disabled:cursor-not-allowed disabled:opacity-50",+ "compact:h-11 compact:text-base",selected.length === 0 && "text-muted-foreground",className)}diff --git a/packages/react/src/CodeBlockHighlighted.tsx b/packages/react/src/CodeBlockHighlighted.tsxindex b57048d12e..1f7eeaee87 100644--- a/packages/react/src/CodeBlockHighlighted.tsx+++ b/packages/react/src/CodeBlockHighlighted.tsx@@ -73,7 +73,7 @@ const CodeBlockHighlighted = ({</ShikiHighlighter>{showCopy && (- <div className="invisible absolute right-0 top-0 opacity-0 transition-opacity group-hover:visible group-hover:opacity-100">+ <div className="invisible absolute right-0 top-0 opacity-0 transition-opacity group-hover:visible group-hover:opacity-100 compact:opacity-100"><Button size="sm" onClick={handleCopyCode}>{showCopied ? "Copied" : "Copy"}</Button>diff --git a/packages/react/src/Combobox.tsx b/packages/react/src/Combobox.tsxindex 53c2cce33b..86d15c9af3 100644--- a/packages/react/src/Combobox.tsx+++ b/packages/react/src/Combobox.tsx@@ -3,21 +3,15 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import { useLingui } from "@lingui/react/macro";-import { useVirtualizer } from "@tanstack/react-virtual";import { matchSorter, rankings } from "match-sorter";import type { ComponentPropsWithoutRef, ReactNode } from "react";-import { forwardRef, useMemo, useRef, useState } from "react";-import { LuCheck, LuPlus, LuSettings2, LuX } from "react-icons/lu";-import {- Command,- CommandEmpty,- CommandGroup,- CommandInput,- CommandItem,- CommandTrigger-} from "./Command";+import { forwardRef, useMemo, useState } from "react";+import { LuPlus, LuSettings2, LuX } from "react-icons/lu";+import { CommandTrigger } from "./Command";import { HStack } from "./HStack";import { IconButton } from "./IconButton";+import type { PickerListOption } from "./PickerList";+import { PickerList, usePickerOpenAutoFocus } from "./PickerList";import { Popover, PopoverContent, PopoverTrigger } from "./Popover";import { Spinner } from "./Spinner";import { TruncatedTooltipText } from "./TruncatedTooltipText";@@ -88,6 +82,7 @@ const Combobox = forwardRef<HTMLButtonElement, ComboboxProps>(// it — honor it instead of silently overwriting it below.const isReadOnly = isReadOnlyProp || disabled;const [open, setOpen] = useState(false);+ const openAutoFocus = usePickerOpenAutoFocus(options.length);const isInlinePreview = !!inline;const selectedOption = useMemo(() => options.find((option) => option.value === value),@@ -182,6 +177,7 @@ const Combobox = forwardRef<HTMLButtonElement, ComboboxProps>(align="start"onWheel={(e) => e.stopPropagation()}onTouchMove={(e) => e.stopPropagation()}+ onOpenAutoFocus={openAutoFocus}className="w-auto min-w-[max(var(--radix-popover-trigger-width),14rem)] max-w-[min(560px,calc(100vw-2rem))] p-1">{/* Zero-height sizer: the widest option, so the auto width fits it@@ -196,13 +192,21 @@ const Combobox = forwardRef<HTMLButtonElement, ComboboxProps>({emptyMessage && options.length === 0 ? (emptyMessage) : (- <VirtualizedCommand+ <PickerListoptions={options}- filter={filter}+ filter={filter ?? filterComboboxOptions}+ selectionMode="single"value={value}- onChange={onChange}itemHeight={itemHeight}- setOpen={setOpen}+ getItemValue={getComboboxItemValue}+ isChecked={(_, itemValue) => itemValue === value}+ isHelperPadded={(_, itemValue) => itemValue === value}+ emptyMessage={t`No option found.`}+ onSelect={(item, { setSearch }) => {+ onChange?.(item.value);+ setSearch("");+ setOpen(false);+ }}/>)}</PopoverContent>@@ -224,15 +228,6 @@ Combobox.displayName = "Combobox";export { Combobox };-type VirtualizedCommandProps = {- options: ComboboxOption[];- filter?: ComboboxFilter;- value?: string;- onChange?: (selected: string) => void;- itemHeight: number;- setOpen: (open: boolean) => void;-};-const labelOf = (option: ComboboxOption) =>typeof option.label === "string"? option.label@@ -262,136 +257,7 @@ export function filterComboboxOptions(});}-function VirtualizedCommand({- options,- filter = filterComboboxOptions,- value,- onChange,- itemHeight,- setOpen-}: VirtualizedCommandProps) {- const { t } = useLingui();- const [search, setSearch] = useState("");- const parentRef = useRef<HTMLDivElement>(null);-- const filteredOptions = useMemo(- () => filter(options, search),- [options, search, filter]- );-- const virtualizer = useVirtualizer({- count: filteredOptions.length,- getScrollElement: () => parentRef.current,- estimateSize: () => itemHeight,- overscan: 12- });-- const items = virtualizer.getVirtualItems();-- return (- <Command shouldFilter={false}>- <CommandInput- value={search}- onValueChange={setSearch}- placeholder={t`Search...`}- className="h-9"- />- <CommandEmpty>{t`No option found.`}</CommandEmpty>- <div- ref={parentRef}- className="overflow-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent pt-1"- style={{- height: `${Math.min(filteredOptions.length, 6) * itemHeight + 4}px`- }}- >- <CommandGroup- style={{- height: `${virtualizer.getTotalSize()}px`,- width: "100%",- position: "relative"- }}- >- {items.map((virtualRow) => {- const item = filteredOptions[virtualRow.index]!;- const itemValue =- typeof item.label === "string"- ? CSS.escape(item.label) + CSS.escape(item.helper ?? "")- : reactNodeToString(item.label);- const itemHoverText =- typeof item.label === "string"- ? [item.label, item.helper].filter(Boolean).join(" - ")- : [reactNodeToString(item.label), item.helper]- .filter(Boolean)- .join(" - ");-- return (- <CommandItem- key={item.value}- value={- typeof item.label === "string"- ? CSS.escape(item.label) + CSS.escape(item.helper ?? "")- : reactNodeToString(item.label)- }- onSelect={() => {- onChange?.(item.value);- setSearch("");- setOpen(false);- }}- style={{- position: "absolute",- top: 0,- left: 0,- width: "100%",- height: `${itemHeight}px`,- transform: `translateY(${virtualRow.start}px)`- }}- >- {item.helper ? (- <div- className={cn(- "flex flex-col min-w-0 flex-1",- itemValue === value && "pr-2"- )}- >- <TruncatedTooltipText- className="block w-full truncate"- tooltip={itemHoverText}- >- {item.label}- </TruncatedTooltipText>- <div className="flex items-center justify-between gap-2 text-xs text-muted-foreground">- <TruncatedTooltipText- className="truncate flex-1"- tooltip={itemHoverText}- >- {item.helper}- </TruncatedTooltipText>- {item.helperRight && (- <span className="flex-shrink-0">- {item.helperRight}- </span>- )}- </div>- </div>- ) : (- <TruncatedTooltipText- className="truncate flex-1"- tooltip={itemHoverText}- >- {item.label}- </TruncatedTooltipText>- )}- <LuCheck- className={cn(- "ml-auto h-4 w-4",- itemValue === value ? "opacity-100" : "opacity-0 hidden"- )}- />- </CommandItem>- );- })}- </CommandGroup>- </div>- </Command>- );-}+const getComboboxItemValue = (item: PickerListOption) =>+ typeof item.label === "string"+ ? CSS.escape(item.label) + CSS.escape(item.helper ?? "")+ : reactNodeToString(item.label);diff --git a/packages/react/src/Command.tsx b/packages/react/src/Command.tsxindex 7c39601ace..3da27375dd 100644--- a/packages/react/src/Command.tsx+++ b/packages/react/src/Command.tsx@@ -14,8 +14,10 @@ import type {HTMLAttributes} from "react";import { forwardRef } from "react";+import { LuChevronDown } from "react-icons/lu";import { RxMagnifyingGlass } from "react-icons/rx";+import { HitArea, useCompact } from "./Compact";import { Modal, ModalContent, ModalTitle } from "./Modal";import { cn } from "./utils/cn";@@ -106,9 +108,9 @@ const commandInputTextFieldVariants = cva(variants: {size: {lg: "h-12 rounded-lg px-4 text-base",- md: "h-10 rounded-md px-4 text-sm",- sm: "h-8 rounded-md px-3 text-sm",- xs: "h-6 rounded px-2 text-sm"+ md: "h-10 rounded-md px-4 text-sm compact:h-11 compact:text-base",+ sm: "h-8 rounded-md px-3 text-sm compact:h-11 compact:text-base",+ xs: "h-6 rounded px-2 text-sm compact:h-11 compact:text-base"},isInvalid: {true: "border-destructive ring-destructive focus-visible:ring-destructive",@@ -283,15 +285,20 @@ const commandTriggerVariants = cva(variants: {size: {lg: "h-12 px-4 py-3 rounded-lg text-base space-x-4",- md: "h-10 px-3 py-2 rounded-md text-sm space-x-3",- sm: "h-8 px-3 py-2 rounded-md text-sm space-x-2"+ md: "h-10 px-3 py-2 rounded-md text-sm space-x-3 compact:h-11 compact:text-base",+ sm: "h-8 px-3 py-2 rounded-md text-sm space-x-2 compact:h-11 compact:text-base"},asButton: {false:"text-foreground flex w-full whitespace-nowrap rounded-md border border-input shadow-xs data-[placeholder]:text-muted-foreground outline-none focus:border-ring focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 overflow-hidden",- true: "text-foreground relative font-medium shrink-0 group inline-flex select-none transform-gpu initial:border-none disabled:opacity-50 focus:!outline-none focus:!ring-0 active:!outline-none active:!ring-0 after:pointer-events-none after:absolute after:-inset-[3px] after:rounded-lg after:border after:border-blue-500 after:opacity-0 after:ring-2 after:ring-blue-500/20 after:transition-opacity focus-visible:after:opacity-100 active:after:opacity-0 before:pointer-events-none before:bg-gradient-to-b before:transition-opacity before:from-white/[0.12] before:absolute before:inset-0 before:z-[1] before:rounded before:opacity-0 bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 shadow-button-base hover:scale-100 focus-visible:scale-100 transition-[background-color,color,transform,box-shadow] duration-150 ease-in-out"+ true: "text-foreground relative font-medium shrink-0 group inline-flex select-none transform-gpu initial:border-none disabled:opacity-50 focus:!outline-none focus:!ring-0 active:!outline-none active:!ring-0 after:pointer-events-none after:absolute after:-inset-[3px] after:rounded-lg after:border after:border-blue-500 after:opacity-0 after:ring-2 after:ring-blue-500/20 after:transition-opacity focus-visible:after:opacity-100 active:after:opacity-0 before:pointer-events-none before:bg-gradient-to-b before:transition-opacity before:from-white/[0.12] before:absolute before:inset-0 before:z-[1] before:rounded before:opacity-0 bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 shadow-button-base hover:scale-100 focus-visible:scale-100 transition-[background-color,color,transform,box-shadow] duration-150 ease-in-out compact:rounded-full compact:overflow-visible"}},+ compoundVariants: [+ { size: "lg", asButton: true, class: "compact:h-8 compact:text-sm" },+ { size: "md", asButton: true, class: "compact:h-8 compact:text-sm" },+ { size: "sm", asButton: true, class: "compact:h-8 compact:text-sm" }+ ],defaultVariants: {size: "md",asButton: false@@ -305,8 +312,8 @@ export const multiSelectTriggerVariants = cva(variants: {size: {lg: "text-base",- md: "text-sm",- sm: "text-xs"+ md: "text-sm compact:text-base",+ sm: "text-xs compact:text-base"},hasSelections: {true: "h-full",@@ -332,7 +339,7 @@ export const multiSelectTriggerVariants = cva({size: "md",hasSelections: false,- class: "h-10"+ class: "h-10 compact:h-11"},{size: "sm",@@ -342,7 +349,7 @@ export const multiSelectTriggerVariants = cva({size: "sm",hasSelections: false,- class: "h-8"+ class: "h-8 compact:h-11"}],defaultVariants: {@@ -360,27 +367,38 @@ interface CommandTriggerProps}const CommandTrigger = forwardRef<ElementRef<"button">, CommandTriggerProps>(- ({ asButton = false, size, className, children, icon, ...props }, ref) => (- <button- ref={ref}- type="button"- className={cn(- commandTriggerVariants({- size,- asButton- }),- className- )}- {...props}- >- {children}- {icon ? (- icon- ) : (- <RxMagnifyingGlass className="size-4 flex-shrink-0 opacity-50" />- )}- </button>- )+ ({ asButton = false, size, className, children, icon, ...props }, ref) => {+ // Only mounted on phones: the trigger's `[&>span]:line-clamp-1` would+ // otherwise un-hide the hit-area span on desktop.+ const isCompact = useCompact();+ return (+ <button+ ref={ref}+ type="button"+ className={cn(+ commandTriggerVariants({+ size,+ asButton+ }),+ className+ )}+ {...props}+ >+ {asButton && isCompact && <HitArea />}+ {children}+ {icon ? (+ icon+ ) : (+ <>+ {/* Phones: a picker's trailing indicator is ⌄. It comes first so+ the desktop magnifier stays the last child (space-x). */}+ <LuChevronDown className="hidden size-4 flex-shrink-0 opacity-50 compact:block" />+ <RxMagnifyingGlass className="size-4 flex-shrink-0 opacity-50 compact:hidden" />+ </>+ )}+ </button>+ );+ });CommandTrigger.displayName = "CommandTrigger";diff --git a/packages/react/src/Compact.tsx b/packages/react/src/Compact.tsxnew file mode 100644index 0000000000..95eea1843e--- /dev/null+++ b/packages/react/src/Compact.tsx@@ -0,0 +1,85 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { COMPACT_QUERY, compactHintCookie } from "@carbon/utils";+import type { ReactNode } from "react";+import {+ createContext,+ useContext,+ useEffect,+ useSyncExternalStore+} from "react";++type CompactProviderProps = {+ /** Server hint (cookie or user agent), used until the media query is read. */+ initialCompact: boolean;+ children: ReactNode;+};++/**+ * Opts the app into the compact (phone) layout. The CSS half of the opt-in is+ * `data-compact-ui` on <html>; set both.+ */+const Context = createContext<{ initialCompact: boolean } | null>(null);++export const CompactProvider = ({+ initialCompact,+ children+}: CompactProviderProps) => {+ // Record the viewport (and every breakpoint crossing) in the hint cookie, so+ // the next request renders the right layout on the server.+ useEffect(() => {+ const mql = window.matchMedia(COMPACT_QUERY);+ const write = () => {+ document.cookie = compactHintCookie(mql.matches);+ };+ write();+ mql.addEventListener("change", write);+ return () => mql.removeEventListener("change", write);+ }, []);++ return (+ <Context.Provider value={{ initialCompact }}>{children}</Context.Provider>+ );+};++const subscribe = (onChange: () => void) => {+ const mql = window.matchMedia(COMPACT_QUERY);+ mql.addEventListener("change", onChange);+ return () => mql.removeEventListener("change", onChange);+};++const getSnapshot = () => window.matchMedia(COMPACT_QUERY).matches;++/** Viewport below md, regardless of the compact opt-in. */+export function useIsMobile(): boolean {+ const context = useContext(Context);+ return useSyncExternalStore(+ subscribe,+ getSnapshot,+ () => context?.initialCompact ?? false+ );+}++/**+ * True when the app opted into the compact layout and the viewport is below+ * md. Use it only where the component tree must change; style-only changes+ * use the `compact:` variant. False without a provider.+ */+export function useCompact(): boolean {+ const isMobile = useIsMobile();+ return useContext(Context) !== null && isMobile;+}++/**+ * Phones: a 44x44 tap target around a smaller control. A child element rather+ * than the control's ::after, which already draws the focus ring. Place it+ * first inside a `relative` control; it renders `display: none` elsewhere.+ */+export const HitArea = () => (+ <span+ aria-hidden+ className="hidden compact:absolute compact:m-0 compact:block compact:-inset-[max(0px,calc((44px-100%)/2))]"+ />+);diff --git a/packages/react/src/Context.tsx b/packages/react/src/Context.tsxindex bd91b174c6..26bdd98474 100644--- a/packages/react/src/Context.tsx+++ b/packages/react/src/Context.tsx@@ -13,25 +13,31 @@ import type {import { forwardRef } from "react";import { LuChevronRight, LuCircle } from "react-icons/lu";import { RxCheck } from "react-icons/rx";-+import { ActionPresentationBoundary } from "./ActionPresentation";+import { useCompact } from "./Compact";+import {+ compactPart,+ MenuSheetCheckboxItem,+ MenuSheetContent,+ MenuSheetContextTrigger,+ MenuSheetGroup,+ MenuSheetItem,+ MenuSheetLabel,+ MenuSheetPortal,+ MenuSheetRadioGroup,+ MenuSheetRadioItem,+ MenuSheetRoot,+ MenuSheetSeparator,+ MenuSheetSub,+ MenuSheetSubContent,+ MenuSheetSubTrigger+} from "./MenuSheet";import { ShortcutKey } from "./ShortcutKey";import type { MenuItemShortcut } from "./shortcuts";import { cn } from "./utils/cn";import { withMenuShortcuts } from "./utils/menuShortcut";-const ContextMenu = ContextMenuPrimitive.Root;--const ContextMenuTrigger = ContextMenuPrimitive.Trigger;--const ContextMenuGroup = ContextMenuPrimitive.Group;--const ContextMenuPortal = ContextMenuPrimitive.Portal;--const ContextMenuSub = ContextMenuPrimitive.Sub;--const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;--const ContextMenuSubTrigger = forwardRef<+const DesktopContextMenuSubTrigger = forwardRef<ElementRef<typeof ContextMenuPrimitive.SubTrigger>,ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {inset?: boolean;@@ -50,43 +56,54 @@ const ContextMenuSubTrigger = forwardRef<<LuChevronRight className="ml-auto h-4 w-4" /></ContextMenuPrimitive.SubTrigger>));-ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;+DesktopContextMenuSubTrigger.displayName =+ ContextMenuPrimitive.SubTrigger.displayName;-const ContextMenuSubContent = forwardRef<+const DesktopContextMenuSubContent = forwardRef<ElementRef<typeof ContextMenuPrimitive.SubContent>,ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>->(({ className, onKeyDown, ...props }, ref) => (- <ContextMenuPrimitive.SubContent- ref={ref}- onKeyDown={withMenuShortcuts(onKeyDown)}- className={cn(- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- className- )}- {...props}- />-));-ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;--const ContextMenuContent = forwardRef<- ElementRef<typeof ContextMenuPrimitive.Content>,- ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>->(({ className, onKeyDown, ...props }, ref) => (- <ContextMenuPrimitive.Portal>- <ContextMenuPrimitive.Content+>(({ className, onKeyDown, children, ...props }, ref) => {+ return (+ <ContextMenuPrimitive.SubContentref={ref}onKeyDown={withMenuShortcuts(onKeyDown)}className={cn(- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",className)}{...props}- />- </ContextMenuPrimitive.Portal>-));-ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;+ >+ {children}+ </ContextMenuPrimitive.SubContent>+ );+});+DesktopContextMenuSubContent.displayName =+ ContextMenuPrimitive.SubContent.displayName;++const DesktopContextMenuContent = forwardRef<+ ElementRef<typeof ContextMenuPrimitive.Content>,+ ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>+>(({ className, onKeyDown, children, ...props }, ref) => {+ return (+ <ContextMenuPrimitive.Portal>+ <ContextMenuPrimitive.Content+ ref={ref}+ onKeyDown={withMenuShortcuts(onKeyDown)}+ className={cn(+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ className+ )}+ {...props}+ >+ <ActionPresentationBoundary>{children}</ActionPresentationBoundary>+ </ContextMenuPrimitive.Content>+ </ContextMenuPrimitive.Portal>+ );+});+DesktopContextMenuContent.displayName =+ ContextMenuPrimitive.Content.displayName;-const ContextMenuItem = forwardRef<+const DesktopContextMenuItem = forwardRef<ElementRef<typeof ContextMenuPrimitive.Item>,ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {inset?: boolean;@@ -129,9 +146,9 @@ const ContextMenuItem = forwardRef<</ContextMenuPrimitive.Item>));-ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;+DesktopContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;-const ContextMenuCheckboxItem = forwardRef<+const DesktopContextMenuCheckboxItem = forwardRef<ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>>(({ className, children, checked, ...props }, ref) => (@@ -152,10 +169,10 @@ const ContextMenuCheckboxItem = forwardRef<{children}</ContextMenuPrimitive.CheckboxItem>));-ContextMenuCheckboxItem.displayName =+DesktopContextMenuCheckboxItem.displayName =ContextMenuPrimitive.CheckboxItem.displayName;-const ContextMenuRadioItem = forwardRef<+const DesktopContextMenuRadioItem = forwardRef<ElementRef<typeof ContextMenuPrimitive.RadioItem>,ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>>(({ className, children, ...props }, ref) => (@@ -175,9 +192,10 @@ const ContextMenuRadioItem = forwardRef<{children}</ContextMenuPrimitive.RadioItem>));-ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;+DesktopContextMenuRadioItem.displayName =+ ContextMenuPrimitive.RadioItem.displayName;-const ContextMenuLabel = forwardRef<+const DesktopContextMenuLabel = forwardRef<ElementRef<typeof ContextMenuPrimitive.Label>,ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {inset?: boolean;@@ -193,9 +211,9 @@ const ContextMenuLabel = forwardRef<{...props}/>));-ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;+DesktopContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;-const ContextMenuSeparator = forwardRef<+const DesktopContextMenuSeparator = forwardRef<ElementRef<typeof ContextMenuPrimitive.Separator>,ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>>(({ className, ...props }, ref) => (@@ -205,7 +223,8 @@ const ContextMenuSeparator = forwardRef<{...props}/>));-ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;+DesktopContextMenuSeparator.displayName =+ ContextMenuPrimitive.Separator.displayName;const ContextMenuShortcut = ({className,@@ -223,6 +242,90 @@ const ContextMenuShortcut = ({};ContextMenuShortcut.displayName = "ContextMenuShortcut";+/*+ * Phones render each part from MenuSheet (a bottom sheet) instead of Radix's+ * menu; see MenuSheet.tsx.+ */+const ContextMenu = (+ props: ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Root>+) =>+ useCompact() ? (+ <MenuSheetRoot {...props} />+ ) : (+ <ContextMenuPrimitive.Root {...props} />+ );+const ContextMenuTrigger = compactPart(+ ContextMenuPrimitive.Trigger,+ MenuSheetContextTrigger,+ "ContextMenuTrigger"+);+const ContextMenuGroup = compactPart(+ ContextMenuPrimitive.Group,+ MenuSheetGroup,+ "ContextMenuGroup"+);+const ContextMenuPortal = (+ props: ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Portal>+) =>+ useCompact() ? (+ <MenuSheetPortal {...props} />+ ) : (+ <ContextMenuPrimitive.Portal {...props} />+ );+const ContextMenuSub = (+ props: ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Sub>+) =>+ useCompact() ? (+ <MenuSheetSub {...props} />+ ) : (+ <ContextMenuPrimitive.Sub {...props} />+ );+const ContextMenuRadioGroup = compactPart(+ ContextMenuPrimitive.RadioGroup,+ MenuSheetRadioGroup,+ "ContextMenuRadioGroup"+);+const ContextMenuSubTrigger = compactPart(+ DesktopContextMenuSubTrigger,+ MenuSheetSubTrigger,+ "ContextMenuSubTrigger"+);+const ContextMenuSubContent = compactPart(+ DesktopContextMenuSubContent,+ MenuSheetSubContent,+ "ContextMenuSubContent"+);+const ContextMenuContent = compactPart(+ DesktopContextMenuContent,+ MenuSheetContent,+ "ContextMenuContent"+);+const ContextMenuItem = compactPart(+ DesktopContextMenuItem,+ MenuSheetItem,+ "ContextMenuItem"+);+const ContextMenuCheckboxItem = compactPart(+ DesktopContextMenuCheckboxItem,+ MenuSheetCheckboxItem,+ "ContextMenuCheckboxItem"+);+const ContextMenuRadioItem = compactPart(+ DesktopContextMenuRadioItem,+ MenuSheetRadioItem,+ "ContextMenuRadioItem"+);+const ContextMenuLabel = compactPart(+ DesktopContextMenuLabel,+ MenuSheetLabel,+ "ContextMenuLabel"+);+const ContextMenuSeparator = compactPart(+ DesktopContextMenuSeparator,+ MenuSheetSeparator,+ "ContextMenuSeparator"+);+export {ContextMenu,ContextMenuCheckboxItem,diff --git a/packages/react/src/CreateableCombobox.tsx b/packages/react/src/CreateableCombobox.tsxindex f16ba37055..ebd1ca23ce 100644--- a/packages/react/src/CreateableCombobox.tsx+++ b/packages/react/src/CreateableCombobox.tsx@@ -3,19 +3,14 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import { useLingui } from "@lingui/react/macro";-import { useVirtualizer } from "@tanstack/react-virtual";import type { ComponentPropsWithoutRef, ReactNode } from "react";-import { forwardRef, useEffect, useMemo, useRef, useState } from "react";-import { LuCheck, LuPlus, LuSettings2, LuX } from "react-icons/lu";-import {- Command,- CommandGroup,- CommandInput,- CommandItem,- CommandTrigger-} from "./Command";+import { forwardRef, useEffect, useMemo, useState } from "react";+import { LuPlus, LuSettings2, LuX } from "react-icons/lu";+import { CommandTrigger } from "./Command";import { HStack } from "./HStack";import { IconButton } from "./IconButton";+import type { PickerListOption } from "./PickerList";+import { PickerList, usePickerOpenAutoFocus } from "./PickerList";import { Popover, PopoverContent, PopoverTrigger } from "./Popover";import { TruncatedTooltipText } from "./TruncatedTooltipText";import { cn } from "./utils/cn";@@ -77,6 +72,7 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>(const isReadOnly = isReadOnlyProp || disabled;const [open, setOpen] = useState(false);const [search, setSearch] = useState("");+ const openAutoFocus = usePickerOpenAutoFocus(options.length);// Reset the search box whenever the dropdown closes.useEffect(() => {@@ -182,6 +178,7 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>(align="start"onWheel={(e) => e.stopPropagation()}onTouchMove={(e) => e.stopPropagation()}+ onOpenAutoFocus={openAutoFocus}className={cn("w-auto max-w-[min(560px,calc(100vw-2rem))] p-1",// Inline mode's trigger is a small icon button, so falling back to@@ -202,17 +199,33 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>({emptyMessage && options.length === 0 ? (emptyMessage) : (- <VirtualizedCommand- label={label}+ <PickerListoptions={options}- selected={selected}+ filter={filterCreatableComboboxOptions}+ selectionMode="single"value={value}itemHeight={itemHeight}search={search}- onChange={onChange}- onCreateOption={onCreateOption}- setOpen={setOpen}- setSearch={setSearch}+ onSearchChange={setSearch}+ creatable+ createLabel={label}+ showCreateOptionOnEmpty+ getItemValue={getCreatableComboboxItemValue}+ isChecked={(item) =>+ !!selected?.includes(item.value) || item.value === value+ }+ isHelperPadded={(item) =>+ !selected?.includes(item.value) && item.value === value+ }+ onSelect={(item, { isCreateOption }) => {+ if (isCreateOption) {+ onCreateOption?.(search);+ } else if (!selected?.includes(item.value)) {+ onChange?.(item.value);+ setSearch("");+ }+ setOpen(false);+ }}/>)}</PopoverContent>@@ -234,195 +247,22 @@ CreatableCombobox.displayName = "CreatableCombobox";export { CreatableCombobox };-type VirtualizedCommandProps = {- options: CreatableComboboxProps["options"];- selected?: string[];- value?: string;- label?: string;- itemHeight: number;- search: string;- onChange?: (selected: string) => void;- onCreateOption?: (inputValue: string) => void;- setOpen: (open: boolean) => void;- setSearch: (search: string) => void;-};--function VirtualizedCommand({- options,- label,- selected,- value,- itemHeight,- search,- setSearch,- onChange,- onCreateOption,- setOpen-}: VirtualizedCommandProps) {- const { t } = useLingui();- const parentRef = useRef<HTMLDivElement>(null);-- const filteredOptions = useMemo(() => {- const filtered = search- ? options.filter((option) => {- const value =- typeof option.label === "string"- ? `${option.label} ${option.helper}`- : reactNodeToString(option.label);-- return value.toLowerCase().includes(search.toLowerCase());- })- : options;-- const isExactMatch = options.some((option) => {- const labelValue =- typeof option.label === "string"- ? option.label- : reactNodeToString(option.label);- return [labelValue.toLowerCase(), option.helper?.toLowerCase()].includes(- search.toLowerCase()- );- });-- return isExactMatch- ? filtered- : [- ...filtered,- {- label: t`New`,- value: "create"- }- ];- }, [options, search, t]);-- const virtualizer = useVirtualizer({- count: filteredOptions.length,- getScrollElement: () => parentRef.current,- estimateSize: () => itemHeight,- overscan: 12- });-- const items = virtualizer.getVirtualItems();-- return (- <Command shouldFilter={false}>- <CommandInput- value={search}- onValueChange={setSearch}- placeholder={t`Search...`}- className="h-9"- />- <CommandGroup>- <div- ref={parentRef}- className="overflow-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent"- style={{- height: `${Math.min(filteredOptions.length, 6) * itemHeight + 4}px`- }}- >- <div- style={{- height: `${virtualizer.getTotalSize()}px`,- width: "100%",- position: "relative"- }}- >- {items.map((virtualRow) => {- const item = filteredOptions[virtualRow.index]!;- const itemHoverText =- typeof item.label === "string"- ? [item.label, item.helper].filter(Boolean).join(" - ")- : [reactNodeToString(item.label), item.helper]- .filter(Boolean)- .join(" - ");+const filterCreatableComboboxOptions = (+ options: PickerListOption[],+ search: string+) =>+ search+ ? options.filter((option) => {+ const value =+ typeof option.label === "string"+ ? `${option.label} ${option.helper ?? ""}`+ : reactNodeToString(option.label);- const isSelected = !!selected?.includes(item.value);- const isCreateOption = item.value === "create";+ return value.toLowerCase().includes(search.toLowerCase());+ })+ : options;- return (- <CommandItem- key={item.value}- value={- typeof item.label === "string"- ? CSS.escape(item.label) + CSS.escape(item.helper ?? "")- : undefined- }- onSelect={() => {- if (isCreateOption) {- onCreateOption?.(search);- } else if (!isSelected) {- onChange?.(item.value);- setSearch("");- }- setOpen(false);- }}- style={{- position: "absolute",- top: 0,- left: 0,- width: "100%",- height: `${itemHeight}px`,- transform: `translateY(${virtualRow.start}px)`- }}- className="flex items-center justify-between min-w-0"- >- {isCreateOption ? (- <div className="flex items-center min-w-0 flex-1">- <span>- {t`Create ${search.trim() === "" ? label : search}`}- </span>- </div>- ) : item.helper ? (- <div- className={cn(- "flex flex-col min-w-0 flex-1",- isSelected || (item.value === value && "pr-2")- )}- >- <TruncatedTooltipText- className="block w-full truncate"- tooltip={itemHoverText}- >- {item.label}- </TruncatedTooltipText>- <div className="flex items-center justify-between gap-2 text-xs text-muted-foreground">- <TruncatedTooltipText- className="truncate flex-1"- tooltip={itemHoverText}- >- {item.helper}- </TruncatedTooltipText>- {item.helperRight && (- <span className="flex-shrink-0">- {item.helperRight}- </span>- )}- </div>- </div>- ) : (- <TruncatedTooltipText- className="truncate flex-1"- tooltip={itemHoverText}- >- {item.label}- </TruncatedTooltipText>- )}- {!isCreateOption && (- <LuCheck- className={cn(- "ml-auto h-4 w-4 flex-shrink-0",- isSelected || item.value === value- ? "opacity-100"- : "opacity-0 hidden"- )}- />- )}- </CommandItem>- );- })}- </div>- </div>- </CommandGroup>- </Command>- );-}+const getCreatableComboboxItemValue = (item: PickerListOption) =>+ typeof item.label === "string"+ ? CSS.escape(item.label) + CSS.escape(item.helper ?? "")+ : undefined;diff --git a/packages/react/src/CreateableMultiSelect.tsx b/packages/react/src/CreateableMultiSelect.tsxindex d4aeeaf762..5bc289fdae 100644--- a/packages/react/src/CreateableMultiSelect.tsx+++ b/packages/react/src/CreateableMultiSelect.tsx@@ -3,21 +3,14 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import { useLingui } from "@lingui/react/macro";-import { useVirtualizer } from "@tanstack/react-virtual";-import { CommandEmpty } from "cmdk";import type { ComponentPropsWithoutRef, ReactNode } from "react";-import { forwardRef, useId, useMemo, useRef, useState } from "react";-import { FaRegSquare, FaSquareCheck } from "react-icons/fa6";+import { forwardRef, useId, useMemo, useState } from "react";import { LuCirclePlus, LuSettings2 } from "react-icons/lu";-import {- Command,- CommandGroup,- CommandInput,- CommandItem,- CommandTrigger-} from "./Command";+import { CommandTrigger } from "./Command";import { HStack } from "./HStack";import { IconButton } from "./IconButton";+import type { PickerListOption } from "./PickerList";+import { PickerList, usePickerOpenAutoFocus } from "./PickerList";import { Popover, PopoverContent, PopoverTrigger } from "./Popover";import { TruncatedTooltipText } from "./TruncatedTooltipText";import { cn } from "./utils/cn";@@ -87,6 +80,7 @@ const CreatableMultiSelect = forwardRef<const isReadOnly = isReadOnlyProp || disabled;const [open, setOpen] = useState(false);const [search, setSearch] = useState("");+ const openAutoFocus = usePickerOpenAutoFocus(options.length);const id = useId();@@ -182,6 +176,7 @@ const CreatableMultiSelect = forwardRef<align="end"onWheel={(e) => e.stopPropagation()}onTouchMove={(e) => e.stopPropagation()}+ onOpenAutoFocus={openAutoFocus}className="w-auto min-w-[max(var(--radix-popover-trigger-width),11rem)] max-w-[min(560px,calc(100vw-2rem))] p-1">{/* Zero-height sizer: the widest option, so the auto width fits it@@ -195,18 +190,32 @@ const CreatableMultiSelect = forwardRef<{emptyMessage && options.length === 0 ? (emptyMessage) : (- <VirtualizedCommand+ <PickerListoptions={options}- selected={value}- onChange={onChange}- onCreateOption={onCreateOption}+ filter={filterCreatableMultiSelectOptions}+ selectionMode="multiple"itemHeight={itemHeight}- setOpen={setOpen}- label={label}- createLabel={createLabel}search={search}- setSearch={setSearch}+ onSearchChange={setSearch}+ creatable+ createLabel={createLabel ?? label}showCreateOptionOnEmpty={showCreateOptionOnEmpty}+ getItemValue={getCreatableMultiSelectItemValue}+ isChecked={(item) => value.includes(item.value)}+ emptyMessage={t`No matches. Type to create one.`}+ onSelect={(item, { isCreateOption }) => {+ if (isCreateOption) {+ onCreateOption?.(search);+ setSearch("");+ } else {+ onChange(+ value.includes(item.value)+ ? value.filter((current) => current !== item.value)+ : [...value, item.value]+ );+ }+ setOpen(true);+ }}/>)}</PopoverContent>@@ -219,183 +228,23 @@ CreatableMultiSelect.displayName = "CreatableMultiSelect";export { CreatableMultiSelect };-type VirtualizedCommandProps = {- options: CreatableMultiSelectProps["options"];- selected: string[];- onChange: (selected: string[]) => void;- onCreateOption?: (inputValue: string) => void;- itemHeight: number;- setOpen: (open: boolean) => void;- label?: string;- createLabel?: string;- search: string;- setSearch: (search: string) => void;- showCreateOptionOnEmpty?: boolean;-};--function VirtualizedCommand({- options,- selected,- onChange,- onCreateOption,- itemHeight,- setOpen,- label,- createLabel,- search,- setSearch,- showCreateOptionOnEmpty = false-}: VirtualizedCommandProps) {- const { t } = useLingui();- const parentRef = useRef<HTMLDivElement>(null);-- const filteredOptions = useMemo(() => {- const filtered = search- ? options.filter((option) => {- const value =- typeof option.label === "string"- ? `${option.label} ${option.helper}`- : reactNodeToString(option.label);-- return value.toLowerCase().includes(search.toLowerCase());- })- : options;-- const isExactMatch = options.some((option) =>- [option.label.toLowerCase(), option.helper?.toLowerCase()].includes(- search.toLowerCase()- )- );-- const trimmedSearch = search.trim();- if (isExactMatch || (trimmedSearch === "" && !showCreateOptionOnEmpty)) {- return filtered;- }-- return [- ...filtered,- {- label: t`New`,- value: "create"- }- ];- }, [options, search, showCreateOptionOnEmpty, t]);-- const virtualizer = useVirtualizer({- count: filteredOptions.length,- getScrollElement: () => parentRef.current,- estimateSize: () => itemHeight,- overscan: 12- });-- const items = virtualizer.getVirtualItems();-- return (- <Command shouldFilter={false}>- <CommandInput- value={search}- onValueChange={setSearch}- placeholder={t`Search...`}- className="h-9"- />- <div- ref={parentRef}- className="overflow-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent pt-1"- style={{- height: `${Math.min(filteredOptions.length, 6) * itemHeight + 4}px`- }}- >- <CommandEmpty>{t`No matches. Type to create one.`}</CommandEmpty>- <CommandGroup- style={{- height: `${virtualizer.getTotalSize()}px`,- width: "100%",- position: "relative"- }}- >- {items.map((virtualRow) => {- const item = filteredOptions[virtualRow.index]!;- const isSelected = selected.includes(item.value);- const isCreateOption = item.value === "create";- const itemHoverText = [item.label, item.helper]- .filter(Boolean)- .join(" - ");-- return (- <CommandItem- key={item.value}- value={- typeof item.label === "string"- ? item.label.replace(/"/g, '\\"') +- item.helper?.replace(/"/g, '\\"')- : undefined- }- onSelect={() => {- if (isCreateOption) {- onCreateOption?.(search);- setSearch("");- } else {- onChange(- isSelected- ? selected.filter((value) => value !== item.value)- : [...selected, item.value]- );- }- setOpen(true);- }}- style={{- position: "absolute",- top: 0,- left: 0,- width: "100%",- height: `${itemHeight}px`,- transform: `translateY(${virtualRow.start}px)`- }}- >- <div className="flex justify-start items-center gap-1 px-2 min-w-0 flex-1">- {isCreateOption ? (- <>- <LuCirclePlus className="mr-1.5 flex-shrink-0" />- <span>{t`Create ${search.trim() === "" ? (createLabel ?? label) : search}`}</span>- </>- ) : (- <>- {isSelected ? (- <FaSquareCheck className="mr-1.5 text-primary flex-shrink-0" />- ) : (- <FaRegSquare className="mr-1.5 text-muted-foreground flex-shrink-0" />- )}- {item.helper ? (- <div className="flex flex-col min-w-0 flex-1">- <TruncatedTooltipText- className="block w-full truncate"- tooltip={itemHoverText}- >- {item.label}- </TruncatedTooltipText>- <TruncatedTooltipText- className="text-xs text-muted-foreground truncate"- tooltip={itemHoverText}- >- {item.helper}- </TruncatedTooltipText>- </div>- ) : (- <TruncatedTooltipText- className="truncate flex-1"- tooltip={itemHoverText}- >- {item.label}- </TruncatedTooltipText>- )}- </>- )}- </div>- </CommandItem>- );- })}- </CommandGroup>- </div>- </Command>- );-}+const filterCreatableMultiSelectOptions = (+ options: PickerListOption[],+ search: string+) =>+ search+ ? options.filter((option) => {+ const value =+ typeof option.label === "string"+ ? `${option.label} ${option.helper ?? ""}`+ : reactNodeToString(option.label);++ return value.toLowerCase().includes(search.toLowerCase());+ })+ : options;++const getCreatableMultiSelectItemValue = (item: PickerListOption) =>+ typeof item.label === "string"+ ? item.label.replace(/"/g, '\\"') ++ (item.helper?.replace(/"/g, '\\"') ?? "")+ : undefined;diff --git a/packages/react/src/Date/components/Button.tsx b/packages/react/src/Date/components/Button.tsxindex a91ae028ff..f019809054 100644--- a/packages/react/src/Date/components/Button.tsx+++ b/packages/react/src/Date/components/Button.tsx@@ -34,8 +34,8 @@ export const FieldButton = ({ size = "md", ...props }: FieldButtonProps) => {const { buttonProps } = useButton(props, ref);const sizeClasses = {- sm: "h-8 w-8 px-2",- md: "h-10 w-10 px-3",+ sm: "h-8 w-8 px-2 compact:h-11 compact:w-11",+ md: "h-10 w-10 px-3 compact:h-11 compact:w-11",lg: "h-12 w-12 px-4"};diff --git a/packages/react/src/Date/components/DateSegment.tsx b/packages/react/src/Date/components/DateSegment.tsxindex 997c67b8d9..2537e03b48 100644--- a/packages/react/src/Date/components/DateSegment.tsx+++ b/packages/react/src/Date/components/DateSegment.tsx@@ -11,8 +11,8 @@ import clsx from "clsx";import { useId, useRef } from "react";const segmentSizeVariants = {- sm: "text-sm",- md: "text-sm",+ sm: "text-sm compact:text-base",+ md: "text-sm compact:text-base",lg: "text-base"} as const;diff --git a/packages/react/src/DateTime.tsx b/packages/react/src/DateTime.tsxindex 958e0dfed3..71cd79213a 100644--- a/packages/react/src/DateTime.tsx+++ b/packages/react/src/DateTime.tsx@@ -192,6 +192,8 @@ const DateTime = ({suppressHydrationWarningclassName={cn("cursor-pointer whitespace-nowrap underline decoration-muted-foreground/50 decoration-dotted underline-offset-[3px] transition-colors hover:decoration-foreground/70",+ // Phones: the hover tooltip is off, so nothing hints it is interactive.+ "compact:no-underline compact:cursor-auto",className)}>diff --git a/packages/react/src/Drawer.tsx b/packages/react/src/Drawer.tsxindex 9ef529e5e5..b2654b9051 100644--- a/packages/react/src/Drawer.tsx+++ b/packages/react/src/Drawer.tsx@@ -15,8 +15,14 @@ import type {import { forwardRef } from "react";import { LuX } from "react-icons/lu";+import { ActionPresentationBoundary } from "./ActionPresentation";import { ClientOnly } from "./ClientOnly";-import { DialogRoot, useDialogDismissable } from "./Modal";+import { useCompact } from "./Compact";+import {+ compactFooterClassName,+ DialogRoot,+ useDialogDismissable+} from "./Modal";import { cn } from "./utils/cn";const Drawer = DialogRoot;@@ -25,17 +31,20 @@ const DrawerTrigger = DialogPrimitive.Trigger;const DrawerCloseButton = DialogPrimitive.Close;-const portalVariants = cva("fixed inset-0 z-50 flex p-3", {- variants: {- position: {- top: "items-start",- bottom: "items-end",- left: "justify-start",- right: "justify-end"- }- },- defaultVariants: { position: "right" }-});+const portalVariants = cva(+ "fixed inset-0 z-50 flex p-3 compact:p-0 compact:items-end",+ {+ variants: {+ position: {+ top: "items-start",+ bottom: "items-end",+ left: "justify-start",+ right: "justify-end"+ }+ },+ defaultVariants: { position: "right" }+ }+);interface DrawerPortalPropsextends DialogPrimitive.DialogPortalProps,@@ -54,7 +63,7 @@ const DrawerOverlay = forwardRef<>(({ className, children, ...props }, ref) => (<DialogPrimitive.OverlayclassName={cn(- "fixed inset-0 z-50 bg-black/20 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",+ "fixed inset-0 z-50 bg-black/20 compact:bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",className)}{...props}@@ -70,6 +79,8 @@ const DrawerBody = ({<divclassName={cn("flex flex-col flex-1 items-start justify-start overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent w-full p-6 bg-card dark:bg-muted/40 rounded-xl border border-border",+ // A caller that wants the body flush on phones passes `compact:p-0`.+ "compact:min-h-0 compact:rounded-none compact:border-x-0 compact:p-4",className)}{...props}@@ -78,7 +89,7 @@ const DrawerBody = ({DrawerBody.displayName = "DrawerBody";const sheetVariants = cva(- "flex flex-col z-50 scale-100 bg-accent dark:bg-card opacity-100 shadow-button-base dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)] border border-border transition-[background-color,box-shadow,border-color] duration-100 focus-visible:outline-none focus-visible:ring-0 rounded-xl",+ "flex flex-col z-50 scale-100 bg-accent dark:bg-card opacity-100 shadow-button-base dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)] border border-border transition-[background-color,box-shadow,border-color] duration-100 focus-visible:outline-none focus-visible:ring-0 rounded-xl compact:max-h-[calc(100dvh-env(safe-area-inset-top)-12px)] compact:w-full compact:max-w-none compact:overflow-hidden compact:rounded-t-[14px] compact:rounded-b-none compact:border-0 compact:bg-card compact:h-auto compact:[&>form]:min-h-0",{variants: {position: {@@ -95,7 +106,9 @@ const sheetVariants = cva(md: "",lg: "",xl: "",- full: ""+ // Phones: sheets fit their content (the form shrinks under the max+ // height so its body scrolls); `full` keeps the whole height.+ full: "compact:h-[calc(100dvh-env(safe-area-inset-top)-12px)]"}},compoundVariants: [@@ -191,6 +204,7 @@ const DrawerContent = forwardRef<ref) => {const dismissable = useDialogDismissable();+ const isCompact = useCompact();return (<ClientOnly fallback={null}>{() => (@@ -200,12 +214,24 @@ const DrawerContent = forwardRef<ref={ref}className={cn(sheetVariants({ position, size }), className)}{...props}+ onOpenAutoFocus={(event) => {+ // Phones: focusing the first field pops the keyboard (or a+ // picker that opens on focus) over the form; keep focus on+ // the sheet itself.+ if (isCompact) event.preventDefault();+ props.onOpenAutoFocus?.(event);+ }}>- {children}+ {isCompact && (+ <div className="mx-auto mt-1.5 h-[5px] w-9 shrink-0 rounded-full bg-muted-foreground/20" />+ )}+ <ActionPresentationBoundary>+ {children}+ </ActionPresentationBoundary>{dismissable && (<DialogPrimitive.Closetype="button"- className="absolute right-4 top-3 rounded-full p-2 opacity-70 transition-opacity hover:opacity-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none data-[state=open]:bg-secondary"+ className="absolute right-4 top-3 rounded-full p-2 opacity-70 transition-opacity hover:opacity-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none data-[state=open]:bg-secondary compact:right-1 compact:top-[15px] compact:flex compact:size-11 compact:items-center compact:justify-center compact:p-0"><LuX className="h-5 w-5" /><span className="sr-only">Close</span>@@ -227,6 +253,7 @@ const DrawerHeader = ({<divclassName={cn("flex flex-col flex-0 gap-1 text-left px-6 py-4 text-muted-foreground",+ "compact:min-h-[52px] compact:justify-center compact:px-4 compact:py-2 compact:pr-14",className)}{...props}@@ -241,6 +268,9 @@ const DrawerFooter = ({<divclassName={cn("flex flex-0 sm:flex-row flex-col-reverse px-6 py-4 sm:justify-end sm:space-x-2",+ compactFooterClassName,+ // Phones: above the safe area.+ "compact:gap-2 compact:space-x-0 compact:pt-3 compact:pb-safe-4",className)}{...props}diff --git a/packages/react/src/Dropdown.tsx b/packages/react/src/Dropdown.tsxindex cfcb573308..6ded6e5831 100644--- a/packages/react/src/Dropdown.tsx+++ b/packages/react/src/Dropdown.tsx@@ -13,25 +13,31 @@ import type {} from "react";import { cloneElement, forwardRef } from "react";import { LuCheck, LuChevronRight } from "react-icons/lu";-+import { ActionPresentationBoundary } from "./ActionPresentation";+import { BottomSheetTrigger } from "./BottomSheet";+import { useCompact } from "./Compact";+import {+ compactPart,+ MenuSheetCheckboxItem,+ MenuSheetContent,+ MenuSheetGroup,+ MenuSheetItem,+ MenuSheetLabel,+ MenuSheetPortal,+ MenuSheetRadioGroup,+ MenuSheetRadioItem,+ MenuSheetRoot,+ MenuSheetSeparator,+ MenuSheetSub,+ MenuSheetSubContent,+ MenuSheetSubTrigger+} from "./MenuSheet";import { ShortcutKey } from "./ShortcutKey";import type { MenuItemShortcut } from "./shortcuts";import { cn } from "./utils/cn";import { withMenuShortcuts } from "./utils/menuShortcut";-const DropdownMenu = DropdownMenuPrimitive.Root;--const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;--const DropdownMenuGroup = DropdownMenuPrimitive.Group;--const DropdownMenuPortal = DropdownMenuPrimitive.Portal;--const DropdownMenuSub = DropdownMenuPrimitive.Sub;--const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;--const DropdownMenuSubTrigger = forwardRef<+const DesktopDropdownMenuSubTrigger = forwardRef<ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {inset?: boolean;@@ -50,44 +56,53 @@ const DropdownMenuSubTrigger = forwardRef<<LuChevronRight className="ml-auto h-4 w-4" /></DropdownMenuPrimitive.SubTrigger>));-DropdownMenuSubTrigger.displayName =+DesktopDropdownMenuSubTrigger.displayName =DropdownMenuPrimitive.SubTrigger.displayName;-const DropdownMenuSubContent = forwardRef<+const DesktopDropdownMenuSubContent = forwardRef<ElementRef<typeof DropdownMenuPrimitive.SubContent>,ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>->(({ className, onKeyDown, ...props }, ref) => (- <DropdownMenuPrimitive.SubContent- ref={ref}- onKeyDown={withMenuShortcuts(onKeyDown)}- className={cn(- "z-50 origin-(--radix-dropdown-menu-content-transform-origin) min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 shadow-md dark:shadow-[0px_0px_0px_0.5px_rgba(0,0,0,1),_0px_4px_4px_rgba(0,0,0,0.24)]",- className- )}- {...props}- />-));-DropdownMenuSubContent.displayName =- DropdownMenuPrimitive.SubContent.displayName;--const DropdownMenuContent = forwardRef<- ElementRef<typeof DropdownMenuPrimitive.Content>,- ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>->(({ className, sideOffset = 4, onKeyDown, ...props }, ref) => (- <DropdownMenuPrimitive.Portal>- <DropdownMenuPrimitive.Content+>(({ className, onKeyDown, children, ...props }, ref) => {+ return (+ <DropdownMenuPrimitive.SubContentref={ref}onKeyDown={withMenuShortcuts(onKeyDown)}- sideOffset={sideOffset}className={cn(- "z-50 origin-(--radix-dropdown-menu-content-transform-origin) min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 shadow-md dark:shadow-[0px_0px_0px_0.5px_rgba(0,0,0,1),_0px_4px_4px_rgba(0,0,0,0.24)]",+ "z-50 origin-(--radix-dropdown-menu-content-transform-origin) min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 shadow-md dark:shadow-[0px_0px_0px_0.5px_rgba(0,0,0,1),_0px_4px_4px_rgba(0,0,0,0.24)]",className)}{...props}- />- </DropdownMenuPrimitive.Portal>-));-DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;+ >+ {children}+ </DropdownMenuPrimitive.SubContent>+ );+});+DesktopDropdownMenuSubContent.displayName =+ DropdownMenuPrimitive.SubContent.displayName;++const DesktopDropdownMenuContent = forwardRef<+ ElementRef<typeof DropdownMenuPrimitive.Content>,+ ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>+>(({ className, sideOffset = 4, onKeyDown, children, ...props }, ref) => {+ return (+ <DropdownMenuPrimitive.Portal>+ <DropdownMenuPrimitive.Content+ ref={ref}+ onKeyDown={withMenuShortcuts(onKeyDown)}+ sideOffset={sideOffset}+ className={cn(+ "z-50 origin-(--radix-dropdown-menu-content-transform-origin) min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 shadow-md dark:shadow-[0px_0px_0px_0.5px_rgba(0,0,0,1),_0px_4px_4px_rgba(0,0,0,0.24)]",+ className+ )}+ {...props}+ >+ <ActionPresentationBoundary>{children}</ActionPresentationBoundary>+ </DropdownMenuPrimitive.Content>+ </DropdownMenuPrimitive.Portal>+ );+});+DesktopDropdownMenuContent.displayName =+ DropdownMenuPrimitive.Content.displayName;export interface DropdownMenuIconProps extends ComponentPropsWithoutRef<"svg"> {icon: ReactElement;@@ -96,14 +111,14 @@ export interface DropdownMenuIconProps extends ComponentPropsWithoutRef<"svg"> {const DropdownMenuIcon = forwardRef<ElementRef<"span">, DropdownMenuIconProps>(({ className, icon, children, ...props }, ref) => {return cloneElement(icon, {- className: cn("mr-2 h-4 w-4", className),+ className: cn("mr-2 h-4 w-4 compact:mr-0 compact:size-5", className),...props});});DropdownMenuIcon.displayName = "DropdownMenuIcon";-const DropdownMenuItem = forwardRef<+const DesktopDropdownMenuItem = forwardRef<ElementRef<typeof DropdownMenuPrimitive.Item>,ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {inset?: boolean;@@ -146,9 +161,9 @@ const DropdownMenuItem = forwardRef<</DropdownMenuPrimitive.Item>));-DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;+DesktopDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;-const DropdownMenuCheckboxItem = forwardRef<+const DesktopDropdownMenuCheckboxItem = forwardRef<ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>>(({ className, children, checked, ...props }, ref) => (@@ -169,10 +184,10 @@ const DropdownMenuCheckboxItem = forwardRef<{children}</DropdownMenuPrimitive.CheckboxItem>));-DropdownMenuCheckboxItem.displayName =+DesktopDropdownMenuCheckboxItem.displayName =DropdownMenuPrimitive.CheckboxItem.displayName;-const DropdownMenuRadioItem = forwardRef<+const DesktopDropdownMenuRadioItem = forwardRef<ElementRef<typeof DropdownMenuPrimitive.RadioItem>,ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>>(({ className, children, ...props }, ref) => (@@ -192,9 +207,10 @@ const DropdownMenuRadioItem = forwardRef<</span></DropdownMenuPrimitive.RadioItem>));-DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;+DesktopDropdownMenuRadioItem.displayName =+ DropdownMenuPrimitive.RadioItem.displayName;-const DropdownMenuLabel = forwardRef<+const DesktopDropdownMenuLabel = forwardRef<ElementRef<typeof DropdownMenuPrimitive.Label>,ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {inset?: boolean;@@ -210,9 +226,9 @@ const DropdownMenuLabel = forwardRef<{...props}/>));-DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;+DesktopDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;-const DropdownMenuSeparator = forwardRef<+const DesktopDropdownMenuSeparator = forwardRef<ElementRef<typeof DropdownMenuPrimitive.Separator>,ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>>(({ className, ...props }, ref) => (@@ -225,7 +241,8 @@ const DropdownMenuSeparator = forwardRef<{...props}/>));-DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;+DesktopDropdownMenuSeparator.displayName =+ DropdownMenuPrimitive.Separator.displayName;const DropdownMenuShortcut = ({className,@@ -240,6 +257,90 @@ const DropdownMenuShortcut = ({};DropdownMenuShortcut.displayName = "DropdownMenuShortcut";+/*+ * Phones render each part from MenuSheet (a bottom sheet) instead of Radix's+ * menu; see MenuSheet.tsx.+ */+const DropdownMenu = (+ props: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>+) =>+ useCompact() ? (+ <MenuSheetRoot {...props} />+ ) : (+ <DropdownMenuPrimitive.Root {...props} />+ );+const DropdownMenuTrigger = compactPart(+ DropdownMenuPrimitive.Trigger,+ BottomSheetTrigger,+ "DropdownMenuTrigger"+);+const DropdownMenuGroup = compactPart(+ DropdownMenuPrimitive.Group,+ MenuSheetGroup,+ "DropdownMenuGroup"+);+const DropdownMenuPortal = (+ props: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>+) =>+ useCompact() ? (+ <MenuSheetPortal {...props} />+ ) : (+ <DropdownMenuPrimitive.Portal {...props} />+ );+const DropdownMenuSub = (+ props: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub>+) =>+ useCompact() ? (+ <MenuSheetSub {...props} />+ ) : (+ <DropdownMenuPrimitive.Sub {...props} />+ );+const DropdownMenuRadioGroup = compactPart(+ DropdownMenuPrimitive.RadioGroup,+ MenuSheetRadioGroup,+ "DropdownMenuRadioGroup"+);+const DropdownMenuSubTrigger = compactPart(+ DesktopDropdownMenuSubTrigger,+ MenuSheetSubTrigger,+ "DropdownMenuSubTrigger"+);+const DropdownMenuSubContent = compactPart(+ DesktopDropdownMenuSubContent,+ MenuSheetSubContent,+ "DropdownMenuSubContent"+);+const DropdownMenuContent = compactPart(+ DesktopDropdownMenuContent,+ MenuSheetContent,+ "DropdownMenuContent"+);+const DropdownMenuItem = compactPart(+ DesktopDropdownMenuItem,+ MenuSheetItem,+ "DropdownMenuItem"+);+const DropdownMenuCheckboxItem = compactPart(+ DesktopDropdownMenuCheckboxItem,+ MenuSheetCheckboxItem,+ "DropdownMenuCheckboxItem"+);+const DropdownMenuRadioItem = compactPart(+ DesktopDropdownMenuRadioItem,+ MenuSheetRadioItem,+ "DropdownMenuRadioItem"+);+const DropdownMenuLabel = compactPart(+ DesktopDropdownMenuLabel,+ MenuSheetLabel,+ "DropdownMenuLabel"+);+const DropdownMenuSeparator = compactPart(+ DesktopDropdownMenuSeparator,+ MenuSheetSeparator,+ "DropdownMenuSeparator"+);+export {DropdownMenu,DropdownMenuCheckboxItem,diff --git a/packages/react/src/Editor/Editor.tsx b/packages/react/src/Editor/Editor.tsxindex 45a67760ce..6946ba2266 100644--- a/packages/react/src/Editor/Editor.tsx+++ b/packages/react/src/Editor/Editor.tsx@@ -24,9 +24,11 @@ import {Placeholder,renderItems} from "@carbon/tiptap";+import { useLingui } from "@lingui/react/macro";import TextStyle from "@tiptap/extension-text-style";import { lazy, Suspense, useEffect, useMemo, useRef, useState } from "react";import { toast } from "sonner";+import { useCompact } from "../Compact";import { Separator } from "../Separator";import { cn } from "../utils/cn";import { ColorSelector } from "./components/ColorSelector";@@ -118,8 +120,21 @@ const Editor = ({toolbar,title}: EditorProp) => {+ const { t } = useLingui();+ const isCompact = useCompact();const titleMode = !!title;const titlePlaceholder = title?.placeholder ?? "Untitled";+ // The editor reads its extensions only once on mount, so the placeholder+ // reads the current (translated) text through a ref. Phones have no "/" key+ // to press, so the body text differs there.+ const placeholderTextRef = useRef<(node: any) => string>(() => "");+ placeholderTextRef.current = (node) => {+ if (node.type.name === "heading") {+ const level = node.attrs.level;+ return t`Heading ${level}`;+ }+ return isCompact ? t`Write a note…` : t`Press '/' for commands`;+ };const [openNode, setOpenNode] = useState(false);const [openColor, setOpenColor] = useState(false);const [openLink, setOpenLink] = useState(false);@@ -189,26 +204,26 @@ const Editor = ({);const extensions = useMemo(() => {- // In title mode, swap the default placeholder for one that labels the- // locked first block "Untitled", and add the title-lock extension.+ // Replaces the default placeholder. In title mode it also labels the+ // locked first block "Untitled", and the title-lock extension is added.+ const placeholder = Placeholder.configure({+ placeholder: ({ node, pos }: { node: any; pos: number }) =>+ titleMode && pos === 0+ ? titlePlaceholder+ : placeholderTextRef.current(node),+ includeChildren: true+ });const base = titleMode? [...defaultExtensions.filter((ext) => (ext as { name?: string }).name !== "placeholder"),- Placeholder.configure({- placeholder: ({ node, pos }: { node: any; pos: number }) => {- if (pos === 0) return titlePlaceholder;- if (node.type.name === "heading") {- return `Heading ${node.attrs.level}`;- }- return "Press '/' for commands";- },- includeChildren: true- }),+ placeholder,DocumentTitle]- : defaultExtensions;+ : defaultExtensions.map((ext) =>+ (ext as { name?: string }).name === "placeholder" ? placeholder : ext+ );return [...base,@@ -286,7 +301,7 @@ const Editor = ({"prose dark:prose-invert focus:outline-none max-w-full",// Flush toolbar: pad the content, not the toolbar, and leave a// gap below the sticky toolbar.- titleMode && "px-8 pt-6 pb-24"+ titleMode && "px-8 pt-6 pb-24 compact:px-4")}}}diff --git a/packages/react/src/Editor/components/Toolbar.tsx b/packages/react/src/Editor/components/Toolbar.tsxindex 6ba027efe3..b9206de55a 100644--- a/packages/react/src/Editor/components/Toolbar.tsx+++ b/packages/react/src/Editor/components/Toolbar.tsx@@ -33,6 +33,8 @@ export const Toolbar = ({ className }: { className?: string }) => {<divclassName={cn("sticky top-0 z-10 flex w-full flex-wrap items-center gap-1 border-b border-border bg-card p-2",+ // Phones: one scrolling row instead of wrapping onto several.+ "compact:flex-nowrap compact:overflow-x-auto compact:scrollbar-hide compact:scroll-fade-x compact:[&>*]:shrink-0",className)}>diff --git a/packages/react/src/Enumerable.tsx b/packages/react/src/Enumerable.tsxindex 952ff77a55..c2803c78d5 100644--- a/packages/react/src/Enumerable.tsx+++ b/packages/react/src/Enumerable.tsx@@ -4,6 +4,7 @@import type { Color } from "@carbon/utils";import { getColor, getColorByValue } from "@carbon/utils";+import { createContext, useContext } from "react";import type { BadgeProps } from "./Badge";import { Badge } from "./Badge";import { useMode } from "./hooks";@@ -13,9 +14,19 @@ type EnumerableProps = BadgeProps & {color?: Color;};+/**+ * Phones: inside a compact row's context line, enumerated values read as plain+ * text instead of colour badges (the row's status pills stay badges).+ */+const EnumerableAsTextContext = createContext(false);+const EnumerableAsText = EnumerableAsTextContext.Provider;+const useEnumerableAsText = () => useContext(EnumerableAsTextContext);+const Enumerable = ({ value, color, ...props }: EnumerableProps) => {const mode = useMode();+ const asText = useContext(EnumerableAsTextContext);if (!value) return null;+ if (asText) return <span>{value}</span>;const style = color ? getColor(color, mode) : getColorByValue(value, mode);return (@@ -28,4 +39,4 @@ const Enumerable = ({ value, color, ...props }: EnumerableProps) => {);};-export { Enumerable };+export { Enumerable, EnumerableAsText, useEnumerableAsText };diff --git a/packages/react/src/Form/FormLabel.tsx b/packages/react/src/Form/FormLabel.tsxindex e9b221dc94..efc74b776d 100644--- a/packages/react/src/Form/FormLabel.tsx+++ b/packages/react/src/Form/FormLabel.tsx@@ -33,7 +33,7 @@ export const FormLabel = forwardRef<<label{...labelProps}ref={ref}- className="flex items-center justify-between"+ className="flex items-center justify-between compact:gap-2"// {...props}><span@@ -42,9 +42,9 @@ export const FormLabel = forwardRef<{children}</span>{(isOptional || onConfigure) && (- <div className="flex items-center gap-1">+ <div className="flex items-center gap-1 compact:gap-2">{isOptional && (- <span className="text-muted-foreground text-xxs">+ <span className="text-muted-foreground text-xxs compact:text-xs"><Trans>Optional</Trans></span>)}diff --git a/packages/react/src/HoverCard.tsx b/packages/react/src/HoverCard.tsxindex 06859ecc46..4cd57e6c5e 100644--- a/packages/react/src/HoverCard.tsx+++ b/packages/react/src/HoverCard.tsx@@ -5,31 +5,113 @@"use client";import * as HoverCardPrimitive from "@radix-ui/react-hover-card";+import { Slot } from "@radix-ui/react-slot";import type { ComponentPropsWithoutRef, ElementRef } from "react";import { forwardRef } from "react";+import { ActionPresentationBoundary } from "./ActionPresentation";+import { BottomSheet, BottomSheetTrigger } from "./BottomSheet";+import { useCompact } from "./Compact";+import { PopupSheetContent } from "./PopupSheet";import { cn } from "./utils/cn";-const HoverCard = HoverCardPrimitive.Root;+/*+ * Phones cannot hover: there a hover card is a real bottom sheet (a Radix+ * Dialog) that a tap on the trigger opens. Desktop keeps hover.+ */+const HoverCard = ({+ open,+ defaultOpen,+ onOpenChange,+ children,+ ...props+}: ComponentPropsWithoutRef<typeof HoverCardPrimitive.Root>) => {+ const isCompact = useCompact();+ return isCompact ? (+ <BottomSheet+ open={open}+ defaultOpen={defaultOpen}+ onOpenChange={onOpenChange}+ >+ {children}+ </BottomSheet>+ ) : (+ <HoverCardPrimitive.Root+ open={open}+ defaultOpen={defaultOpen}+ onOpenChange={onOpenChange}+ {...props}+ >+ {children}+ </HoverCardPrimitive.Root>+ );+};-const HoverCardTrigger = HoverCardPrimitive.Trigger;+const HoverCardTrigger = forwardRef<+ ElementRef<typeof HoverCardPrimitive.Trigger>,+ ComponentPropsWithoutRef<typeof HoverCardPrimitive.Trigger>+>(({ asChild, ...props }, ref) => {+ const isCompact = useCompact();+ if (!isCompact) {+ return (+ <HoverCardPrimitive.Trigger ref={ref} asChild={asChild} {...props} />+ );+ }+ // The desktop trigger is an <a>; a tap must open the sheet, not follow it.+ const Comp = asChild ? Slot : "a";+ return (+ <BottomSheetTrigger asChild>+ <Comp+ ref={ref}+ {...props}+ onClick={(event) => {+ props.onClick?.(event);+ event.preventDefault();+ }}+ />+ </BottomSheetTrigger>+ );+});+HoverCardTrigger.displayName = HoverCardPrimitive.Trigger.displayName;const HoverCardContent = forwardRef<ElementRef<typeof HoverCardPrimitive.Content>,ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>->(({ className, align = "center", sideOffset = 4, ...props }, ref) => (- <HoverCardPrimitive.Portal>- <HoverCardPrimitive.Content- ref={ref}- align={align}- sideOffset={sideOffset}- className={cn(- "relative z-[100] origin-(--radix-hover-card-content-transform-origin) w-64 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- className- )}- {...props}- />- </HoverCardPrimitive.Portal>-));+>(+ (+ { className, align = "center", sideOffset = 4, children, ...props },+ ref+ ) => {+ const isCompact = useCompact();+ if (isCompact) {+ return (+ <PopupSheetContent+ ref={ref}+ label={props["aria-label"]}+ className={className}+ {...props}+ >+ {children}+ </PopupSheetContent>+ );+ }+ return (+ <HoverCardPrimitive.Portal>+ <HoverCardPrimitive.Content+ ref={ref}+ align={align}+ sideOffset={sideOffset}+ className={cn(+ "relative z-[100] origin-(--radix-hover-card-content-transform-origin) w-64 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ className+ )}+ {...props}+ >+ <ActionPresentationBoundary>{children}</ActionPresentationBoundary>+ </HoverCardPrimitive.Content>+ </HoverCardPrimitive.Portal>+ );+ }+);HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;export { HoverCard, HoverCardContent, HoverCardTrigger };diff --git a/packages/react/src/Input.tsx b/packages/react/src/Input.tsxindex 0db0cc9293..fad9e7e722 100644--- a/packages/react/src/Input.tsx+++ b/packages/react/src/Input.tsx@@ -19,9 +19,9 @@ const inputGroupVariants = cva(variants: {size: {lg: "h-12 rounded-lg",- md: "h-10 rounded-md",- sm: "h-8 rounded-md",- xs: "h-6 rounded"+ md: "h-10 rounded-md compact:h-11",+ sm: "h-8 rounded-md compact:h-11",+ xs: "h-6 rounded compact:h-11"},isDisabled: {true: "opacity-50 disabled:cursor-not-allowed",@@ -115,9 +115,9 @@ export const inputVariants = cva(variants: {size: {lg: "h-12 rounded-lg px-4 text-base",- md: "h-10 rounded-md px-4 text-sm",- sm: "h-8 rounded-md px-3 text-sm",- xs: "h-6 rounded px-2 text-sm"+ md: "h-10 rounded-md px-4 text-sm compact:h-11 compact:text-base",+ sm: "h-8 rounded-md px-3 text-sm compact:h-11 compact:text-base",+ xs: "h-6 rounded px-2 text-sm compact:h-11 compact:text-base"},isInputGroup: {true: "h-auto outline-none focus-within:outline-none",@@ -244,9 +244,9 @@ const inputAddonVariants = cva(},size: {lg: "h-12 px-3",- md: "h-10 px-3",- sm: "h-8 px-2",- xs: "h-6 px-1"+ md: "h-10 px-3 compact:h-11",+ sm: "h-8 px-2 compact:h-11",+ xs: "h-6 px-1 compact:h-11"},isDisabled: {true: "opacity-50 cursor-not-allowed bg-muted text-muted-foreground",@@ -354,9 +354,9 @@ const inputElementVariants = cva(variants: {size: {lg: "h-12",- md: "h-10",- sm: "h-8",- xs: "h-6"+ md: "h-10 compact:h-11",+ sm: "h-8 compact:h-11",+ xs: "h-6 compact:h-11"},placement: {left: "pl-2",diff --git a/packages/react/src/LabelWithHelp.tsx b/packages/react/src/LabelWithHelp.tsxindex 97495c8169..7727ecc90f 100644--- a/packages/react/src/LabelWithHelp.tsx+++ b/packages/react/src/LabelWithHelp.tsx@@ -63,7 +63,9 @@ export function LabelWithHelp({// -2px vertical margin collapses the button's margin-box back to// the text line height so the row height is identical either way;// the hover ring overhangs harmlessly and the icon stays in line.- isInline ? "h-4 w-4" : "h-5 w-5 -my-0.5"+ isInline ? "h-4 w-4" : "h-5 w-5 -my-0.5",+ // Tap target on phones: an invisible 44px hit area around the icon.+ "compact:hit-area")}><LuInfodiff --git a/packages/react/src/MenuSheet.tsx b/packages/react/src/MenuSheet.tsxnew file mode 100644index 0000000000..e33bba5d5e--- /dev/null+++ b/packages/react/src/MenuSheet.tsx@@ -0,0 +1,458 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { useLingui } from "@lingui/react/macro";+import type * as DialogPrimitive from "@radix-ui/react-dialog";+import { Slot } from "@radix-ui/react-slot";+import type {+ ComponentPropsWithoutRef,+ ElementRef,+ ElementType,+ MouseEvent,+ PointerEvent,+ ReactNode+} from "react";+import {+ createContext,+ forwardRef,+ useContext,+ useId,+ useRef,+ useState+} from "react";+import { LuCheck, LuChevronRight } from "react-icons/lu";+import {+ BottomSheet,+ BottomSheetBack,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle+} from "./BottomSheet";+import { useCompact } from "./Compact";+import type { PopperPositionProps } from "./PopupSheet";+import { cn } from "./utils/cn";++/*+ * Phones: a dropdown or context menu shown as a real bottom sheet (a Radix+ * Dialog), not Radix's menu. Radix menu items only work inside Radix's menu+ * content, so the menu's parts switch to these on compact. A submenu opens as+ * a drill-in page with ‹ Back.+ */++type Page = { id: string; label: ReactNode };++type MenuSheetState = {+ setOpen: (open: boolean) => void;+ pages: Page[];+ push: (page: Page) => void;+ pop: () => void;+};++const MenuSheetContext = createContext<MenuSheetState | null>(null);++function useMenuSheet() {+ const context = useContext(MenuSheetContext);+ if (!context) throw new Error("Menu parts must be used within a menu");+ return context;+}++/** The page an item belongs to: `null` is the menu's first page. */+const LevelContext = createContext<string | null>(null);++/** True when the item's page is the one showing. */+function useOnPage() {+ const { pages } = useMenuSheet();+ const level = useContext(LevelContext);+ return (pages.at(-1)?.id ?? null) === level;+}++export function MenuSheetRoot({+ open: openProp,+ defaultOpen,+ onOpenChange,+ children+}: {+ open?: boolean;+ defaultOpen?: boolean;+ onOpenChange?: (open: boolean) => void;+ children?: ReactNode;+}) {+ const [uncontrolledOpen, setUncontrolledOpen] = useState(+ defaultOpen ?? false+ );+ const [pages, setPages] = useState<Page[]>([]);+ const open = openProp ?? uncontrolledOpen;+ const setOpen = (next: boolean) => {+ if (openProp === undefined) setUncontrolledOpen(next);+ if (!next) setPages([]);+ onOpenChange?.(next);+ };++ return (+ <MenuSheetContext.Provider+ value={{+ setOpen,+ pages,+ push: (page) => setPages((p) => [...p, page]),+ pop: () => setPages((p) => p.slice(0, -1))+ }}+ >+ <BottomSheet open={open} onOpenChange={setOpen}>+ {children}+ </BottomSheet>+ </MenuSheetContext.Provider>+ );+}++const LONG_PRESS_MS = 500;++/**+ * A context menu's trigger: a right-click, or a touch held still for half a+ * second, opens the sheet.+ */+export const MenuSheetContextTrigger = forwardRef<+ HTMLSpanElement,+ ComponentPropsWithoutRef<"span"> & { asChild?: boolean; disabled?: boolean }+>(({ asChild, disabled, onContextMenu, onPointerDown, ...props }, ref) => {+ const { setOpen } = useMenuSheet();+ const timer = useRef<ReturnType<typeof setTimeout>>();+ const clear = () => clearTimeout(timer.current);+ const Comp = asChild ? Slot : "span";+ return (+ <Comp+ ref={ref}+ {...props}+ onContextMenu={(event: MouseEvent<HTMLSpanElement>) => {+ onContextMenu?.(event);+ if (disabled || event.defaultPrevented) return;+ event.preventDefault();+ setOpen(true);+ }}+ onPointerDown={(event: PointerEvent<HTMLSpanElement>) => {+ onPointerDown?.(event);+ if (disabled || event.pointerType !== "touch") return;+ clear();+ timer.current = setTimeout(() => setOpen(true), LONG_PRESS_MS);+ }}+ onPointerUp={clear}+ onPointerMove={clear}+ onPointerCancel={clear}+ />+ );+});+MenuSheetContextTrigger.displayName = "MenuSheetContextTrigger";++export const MenuSheetContent = forwardRef<+ HTMLDivElement,+ Omit<ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, "title"> &+ PopperPositionProps & { loop?: unknown }+>(+ (+ {+ className,+ children,+ side: _side,+ sideOffset: _sideOffset,+ align: _align,+ alignOffset: _alignOffset,+ arrowPadding: _arrowPadding,+ avoidCollisions: _avoidCollisions,+ collisionBoundary: _collisionBoundary,+ collisionPadding: _collisionPadding,+ sticky: _sticky,+ hideWhenDetached: _hideWhenDetached,+ updatePositionStrategy: _updatePositionStrategy,+ loop: _loop,+ ...props+ },+ ref+ ) => {+ const { t } = useLingui();+ const { pages, pop } = useMenuSheet();+ const page = pages.at(-1);+ const label = props["aria-label"];+ return (+ <BottomSheetContent ref={ref} {...props}>+ <BottomSheetHeader>+ {page ? <BottomSheetBack onClick={pop} /> : null}+ <BottomSheetTitle className={page || label ? undefined : "sr-only"}>+ {page?.label ?? label ?? t`Options`}+ </BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody>+ <div+ role="menu"+ className={cn("flex flex-col", className, "w-full max-w-none")}+ >+ {children}+ </div>+ </BottomSheetBody>+ </BottomSheetContent>+ );+ }+);+MenuSheetContent.displayName = "MenuSheetContent";++const rowClassName =+ "relative flex min-h-12 w-full select-none items-center gap-3 rounded-sm px-3 text-left text-[15px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent active:bg-accent disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50";++type ItemProps = Omit<ComponentPropsWithoutRef<"button">, "onSelect"> & {+ asChild?: boolean;+ disabled?: boolean;+ destructive?: boolean;+ inset?: boolean;+ /** A menu-only key; phones have no keyboard to press it with. */+ shortcut?: unknown;+ textValue?: string;+ /** As Radix: call `event.preventDefault()` to keep the menu open. */+ onSelect?: (event: Event) => void;+};++/** Runs `onSelect` as Radix does, then closes unless it was prevented. */+function useSelect(onSelect?: (event: Event) => void) {+ const { setOpen } = useMenuSheet();+ return () => {+ const event = new Event("menu.itemSelect", { cancelable: true });+ onSelect?.(event);+ if (!event.defaultPrevented) setOpen(false);+ };+}++export const MenuSheetItem = forwardRef<HTMLButtonElement, ItemProps>(+ (+ {+ asChild,+ disabled,+ destructive,+ inset: _inset,+ shortcut: _shortcut,+ textValue: _textValue,+ onSelect,+ onClick,+ className,+ ...props+ },+ ref+ ) => {+ const onPage = useOnPage();+ const select = useSelect(onSelect);+ if (!onPage) return null;+ const Comp = asChild ? Slot : "button";+ return (+ <Comp+ ref={ref}+ role="menuitem"+ type={asChild ? undefined : "button"}+ disabled={asChild ? undefined : disabled}+ aria-disabled={disabled || undefined}+ className={cn(+ rowClassName,+ destructive && "text-destructive",+ className+ )}+ onClick={(event: MouseEvent<HTMLButtonElement>) => {+ onClick?.(event);+ if (disabled || event.defaultPrevented) return;+ select();+ }}+ {...props}+ />+ );+ }+);+MenuSheetItem.displayName = "MenuSheetItem";++export const MenuSheetCheckboxItem = forwardRef<+ HTMLButtonElement,+ ItemProps & {+ checked?: boolean | "indeterminate";+ onCheckedChange?: (checked: boolean) => void;+ }+>(({ checked, onCheckedChange, onSelect, children, ...props }, ref) => (+ <MenuSheetItem+ ref={ref}+ role="menuitemcheckbox"+ aria-checked={checked === "indeterminate" ? "mixed" : Boolean(checked)}+ onSelect={(event) => {+ onCheckedChange?.(checked !== true);+ onSelect?.(event);+ }}+ {...props}+ >+ <span className="flex size-5 shrink-0 items-center justify-center">+ {checked ? <LuCheck className="size-5 text-primary" /> : null}+ </span>+ {children}+ </MenuSheetItem>+));+MenuSheetCheckboxItem.displayName = "MenuSheetCheckboxItem";++const RadioContext = createContext<{+ value?: string;+ onValueChange?: (value: string) => void;+}>({});++export function MenuSheetRadioGroup({+ value,+ onValueChange,+ children,+ className+}: {+ value?: string;+ onValueChange?: (value: string) => void;+ children?: ReactNode;+ className?: string;+}) {+ return (+ <RadioContext.Provider value={{ value, onValueChange }}>+ <div role="group" className={className}>+ {children}+ </div>+ </RadioContext.Provider>+ );+}++export const MenuSheetRadioItem = forwardRef<+ HTMLButtonElement,+ ItemProps & { value: string }+>(({ value, onSelect, children, ...props }, ref) => {+ const radio = useContext(RadioContext);+ const checked = radio.value === value;+ return (+ <MenuSheetItem+ ref={ref}+ role="menuitemradio"+ aria-checked={checked}+ onSelect={(event) => {+ radio.onValueChange?.(value);+ onSelect?.(event);+ }}+ {...props}+ >+ <span className="min-w-0 flex-1">{children}</span>+ {checked ? <LuCheck className="size-5 shrink-0 text-primary" /> : null}+ </MenuSheetItem>+ );+});+MenuSheetRadioItem.displayName = "MenuSheetRadioItem";++export const MenuSheetLabel = forwardRef<+ HTMLDivElement,+ ComponentPropsWithoutRef<"div"> & { inset?: boolean }+>(({ className, inset: _inset, ...props }, ref) => {+ const onPage = useOnPage();+ if (!onPage) return null;+ return (+ <div+ ref={ref}+ className={cn(+ "px-3 pt-3 pb-1 text-xs font-medium uppercase tracking-[0.04em] text-muted-foreground",+ className+ )}+ {...props}+ />+ );+});+MenuSheetLabel.displayName = "MenuSheetLabel";++export const MenuSheetSeparator = forwardRef<+ HTMLHRElement,+ ComponentPropsWithoutRef<"hr">+>(({ className, ...props }, ref) => {+ const onPage = useOnPage();+ if (!onPage) return null;+ return (+ <hr+ ref={ref}+ className={cn("my-2 h-px border-0 bg-border", className)}+ {...props}+ />+ );+});+MenuSheetSeparator.displayName = "MenuSheetSeparator";++const SubContext = createContext<string | null>(null);++export function MenuSheetSub({ children }: { children?: ReactNode }) {+ const id = useId();+ return <SubContext.Provider value={id}>{children}</SubContext.Provider>;+}++export function MenuSheetGroup({+ className,+ ...props+}: ComponentPropsWithoutRef<"div">) {+ return <div role="group" className={className} {...props} />;+}++/** A row that opens its submenu as the sheet's next page. */+export const MenuSheetSubTrigger = forwardRef<HTMLButtonElement, ItemProps>(+ (+ {+ children,+ disabled,+ className,+ inset: _inset,+ textValue: _textValue,+ shortcut: _shortcut,+ onSelect: _onSelect,+ ...props+ },+ ref+ ) => {+ const subId = useContext(SubContext);+ const { push } = useMenuSheet();+ const onPage = useOnPage();+ if (!onPage || !subId) return null;+ return (+ <button+ ref={ref}+ type="button"+ role="menuitem"+ aria-haspopup="menu"+ disabled={disabled}+ className={cn(rowClassName, className)}+ {...props}+ onClick={() => push({ id: subId, label: children })}+ >+ {children}+ <LuChevronRight className="ml-auto size-5 shrink-0 text-muted-foreground" />+ </button>+ );+ }+);+MenuSheetSubTrigger.displayName = "MenuSheetSubTrigger";++/** A submenu's items: they show only on its page. */+export function MenuSheetSubContent({ children }: { children?: ReactNode }) {+ const subId = useContext(SubContext);+ return (+ <LevelContext.Provider value={subId}>{children}</LevelContext.Provider>+ );+}++/**+ * A menu part that renders `Phone` on compact and the Radix `Desktop` part+ * elsewhere, with the same props, so call sites stay unchanged.+ */+export function compactPart<T extends ElementType>(+ Desktop: T,+ Phone: ElementType,+ displayName?: string+) {+ const Part = forwardRef<ElementRef<T>, ComponentPropsWithoutRef<T>>(+ (props, ref) => {+ const Comp: ElementType = useCompact() ? Phone : Desktop;+ return <Comp ref={ref} {...props} />;+ }+ );+ Part.displayName = displayName;+ return Part;+}++/** Phones: menu contents render in the sheet, not a portal of their own. */+export function MenuSheetPortal({ children }: { children?: ReactNode }) {+ return <>{children}</>;+}diff --git a/packages/react/src/Menubar.tsx b/packages/react/src/Menubar.tsxindex 13c51eee69..75eacfbd93 100644--- a/packages/react/src/Menubar.tsx+++ b/packages/react/src/Menubar.tsx@@ -15,6 +15,8 @@ const Menubar = forwardRef<HTMLDivElement, ComponentProps<"div">>({...props}className={cn("min-h-[2.5rem] flex items-center bg-card border border-border rounded-lg justify-start p-1 w-full space-x-1 scrollbar-hide dark:border-none dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)]",+ // Phones: the bar scrolls sideways (with a fade) instead of clipping.+ "compact:overflow-x-auto compact:scroll-fade-x compact:[&>*]:shrink-0",className)}>diff --git a/packages/react/src/Modal.tsx b/packages/react/src/Modal.tsxindex 119e8fb05c..23235c6286 100644--- a/packages/react/src/Modal.tsx+++ b/packages/react/src/Modal.tsx@@ -16,7 +16,9 @@ import type {import { createContext, forwardRef, useContext } from "react";import { LuX } from "react-icons/lu";+import { ActionPresentationBoundary } from "./ActionPresentation";import { ClientOnly } from "./ClientOnly";+import { useCompact } from "./Compact";import { cn } from "./utils/cn";// A dialog held open with no `onOpenChange` cannot be closed by the X, Escape@@ -56,6 +58,8 @@ const ModalOverlay = forwardRef<// 'bg-alternative/90 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',"bg-alternative/90","z-50 fixed inset-0 grid place-items-center overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",+ // Phones: a bottom sheet over a dimmed screen.+ "compact:place-items-end compact:overflow-hidden compact:bg-black/40",className)}@@ -112,6 +116,7 @@ const ModalContentVariants = cva("data-[state=open]:slide-in-from-left-[0%] data-[state=open]:slide-in-from-top-[0%]","sm:rounded-2xl md:w-full","bg-card focus-visible:outline-none focus-visible:ring-0",+ "compact:max-h-[88dvh] compact:max-w-none compact:rounded-t-[14px] compact:rounded-b-none compact:border-0 compact:pt-5 compact:pb-safe compact:data-[state=open]:slide-in-from-bottom-4","dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)]"),{@@ -151,6 +156,7 @@ const ModalContent = forwardRef<ref) => {const dismissable = useDialogDismissable();+ const isCompact = useCompact();return (<ClientOnly fallback={null}>{() => (@@ -160,16 +166,28 @@ const ModalContent = forwardRef<ref={ref}className={cn(ModalContentVariants({ size }), className)}onOpenAutoFocus={(event) => {+ // Phones: focusing the first field pops the keyboard over+ // the sheet before the user has done anything.+ if (isCompact) event.preventDefault();onOpenAutoFocus?.(event);if (!event.defaultPrevented) focusPrimaryAction(event);}}{...props}>- {children}+ {/* Phones: the same grabber as a drawer sheet. */}+ {isCompact && (+ <div+ aria-hidden+ className="absolute left-1/2 top-1.5 h-[5px] w-9 -translate-x-1/2 rounded-full bg-muted-foreground/20"+ />+ )}+ <ActionPresentationBoundary>+ {children}+ </ActionPresentationBoundary>{withCloseButton && dismissable && (<DialogPrimitive.Closetype="button"- className="absolute right-4 top-4 rounded-full opacity-70 transition-opacity hover:opacity-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-foreground-muted p-3 hover:bg-accent/80"+ className="absolute right-4 top-4 rounded-full opacity-70 transition-opacity hover:opacity-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-foreground-muted p-3 hover:bg-accent/80 compact:right-1 compact:top-1 compact:flex compact:size-11 compact:items-center compact:justify-center compact:p-0"><LuX className="h-4 w-4" /><span className="sr-only">Close</span>@@ -192,6 +210,7 @@ const ModalHeader = ({<divclassName={cn("flex flex-col shrink-0 space-y-1.5 text-center sm:text-left mb-4 px-6",+ "compact:mb-3 compact:px-4 compact:pr-14 compact:text-left",className)}{...props}@@ -205,6 +224,7 @@ const ModalBody = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (// py-1 keeps the 3px focus ring of the first/last field inside the// scroll clip; -mt-1/mb-3 cancel it so the layout is unchanged."relative w-full min-h-0 overflow-y-auto -mt-1 py-1 px-6 mb-3",+ "compact:px-4","scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent",className)}@@ -213,6 +233,16 @@ const ModalBody = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => ();ModalBody.displayName = "ModalBody";+/**+ * Phones: a dialog footer becomes a sticky row of full-width 44px actions in+ * the thumb zone. Footers often wrap their buttons in an HStack, so its+ * children are stretched too and its space-x margins are cleared. The submit+ * action moves to the right end ([Cancel][Save]) whatever the source order.+ * Shared by ModalFooter and DrawerFooter.+ */+export const compactFooterClassName =+ "compact:sticky compact:bottom-0 compact:flex-row compact:px-4 compact:[&>*]:flex-1 compact:[&>div]:flex compact:[&>div]:w-full compact:[&>div]:gap-2 compact:[&>div>*]:flex-1 compact:[&>div>*]:mx-0 compact:[&_button]:h-11 compact:[&_[type=submit]]:order-last";+const ModalFooter = ({className,onKeyDown,@@ -226,6 +256,8 @@ const ModalFooter = ({}}className={cn("flex flex-col-reverse shrink-0 sm:flex-row sm:justify-end gap-2 px-6 py-3 border-t border-border bg-muted/40 sm:rounded-b-2xl",+ compactFooterClassName,+ "compact:rounded-none compact:bg-card compact:pb-3",className)}{...props}diff --git a/packages/react/src/ModalCard.tsx b/packages/react/src/ModalCard.tsxindex ee2459b74d..f6e143964e 100644--- a/packages/react/src/ModalCard.tsx+++ b/packages/react/src/ModalCard.tsx@@ -123,15 +123,15 @@ ModalCardDescription.displayName = "ModalCardDescription";const ModalCardFooter = forwardRef<ElementRef<typeof ModalFooter> | ElementRef<typeof CardFooter>,- | ComponentPropsWithoutRef<typeof ModalFooter>- | ComponentPropsWithoutRef<typeof CardFooter>->((props, ref) => {+ ComponentPropsWithoutRef<typeof CardFooter>+>(({ sticky, ...props }, ref) => {const type = useModalCardType();if (type === "card") {- return <CardFooter {...props} ref={ref} />;+ return <CardFooter {...props} sticky={sticky} ref={ref} />;}+ // A modal's footer is already pinned on phones.return <ModalFooter {...props} />;});ModalCardFooter.displayName = "ModalCardFooter";diff --git a/packages/react/src/MultiSelect.tsx b/packages/react/src/MultiSelect.tsxindex df7ca584f7..5af1b3ecb9 100644--- a/packages/react/src/MultiSelect.tsx+++ b/packages/react/src/MultiSelect.tsx@@ -3,21 +3,14 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import { useLingui } from "@lingui/react/macro";-import { useVirtualizer } from "@tanstack/react-virtual";import type { ComponentPropsWithoutRef, ReactNode } from "react";-import { forwardRef, useId, useMemo, useRef, useState } from "react";-import { FaRegSquare, FaSquareCheck } from "react-icons/fa6";+import { forwardRef, useId, useState } from "react";import { LuCirclePlus, LuSettings2, LuX } from "react-icons/lu";-import {- Command,- CommandEmpty,- CommandGroup,- CommandInput,- CommandItem,- CommandTrigger-} from "./Command";+import { CommandTrigger } from "./Command";import { HStack } from "./HStack";import { IconButton } from "./IconButton";+import type { PickerListOption } from "./PickerList";+import { PickerList, usePickerOpenAutoFocus } from "./PickerList";import { Popover, PopoverContent, PopoverTrigger } from "./Popover";import { TruncatedTooltipText } from "./TruncatedTooltipText";import { cn } from "./utils/cn";@@ -76,6 +69,7 @@ const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(const isReadOnly = isReadOnlyProp || disabled;const [open, setOpen] = useState(false);const [search, setSearch] = useState("");+ const openAutoFocus = usePickerOpenAutoFocus(options.length);const id = useId();@@ -156,19 +150,30 @@ const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(align="end"onWheel={(e) => e.stopPropagation()}onTouchMove={(e) => e.stopPropagation()}+ onOpenAutoFocus={openAutoFocus}className="min-w-[var(--radix-popover-trigger-width)] p-1">{emptyMessage && options.length === 0 ? (emptyMessage) : (- <VirtualizedCommand+ <PickerListoptions={options}- value={value}- onChange={onChange}+ filter={filterMultiSelectOptions}+ selectionMode="multiple"itemHeight={itemHeight}- setOpen={setOpen}search={search}- setSearch={setSearch}+ onSearchChange={setSearch}+ getItemValue={getMultiSelectItemValue}+ isChecked={(option) => value.includes(option.value)}+ emptyMessage={t`No option found.`}+ onSelect={(option) => {+ onChange(+ value.includes(option.value)+ ? value.filter((item) => item !== option.value)+ : [...value, option.value]+ );+ setOpen(true);+ }}/>)}</PopoverContent>@@ -190,125 +195,23 @@ MultiSelect.displayName = "MultiSelect";export { MultiSelect };-type VirtualizedCommandProps = {- options: MultiSelectProps["options"];- value: string[];- onChange: (selected: string[]) => void;- itemHeight: number;- setOpen: (open: boolean) => void;- search: string;- setSearch: (search: string) => void;-};--function VirtualizedCommand({- options,- value,- onChange,- itemHeight,- setOpen,- search,- setSearch-}: VirtualizedCommandProps) {- const { t } = useLingui();- const parentRef = useRef<HTMLDivElement>(null);-- const filteredOptions = useMemo(() => {- return search- ? options.filter((option) => {- const value =- typeof option.label === "string"- ? `${option.label} ${option.helper ?? ""}`- : reactNodeToString(option.label);-- return value.toLowerCase().includes(search.toLowerCase());- })- : options;- }, [options, search]);-- const virtualizer = useVirtualizer({- count: filteredOptions.length,- getScrollElement: () => parentRef.current,- estimateSize: () => itemHeight,- overscan: 12- });-- const items = virtualizer.getVirtualItems();-- return (- <Command shouldFilter={false}>- <CommandInput- value={search}- onValueChange={setSearch}- placeholder={t`Search...`}- className="h-9"- />- <CommandEmpty>{t`No option found.`}</CommandEmpty>- <div- ref={parentRef}- className="overflow-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent pt-1"- style={{- height: `${Math.min(filteredOptions.length, 6) * itemHeight + 4}px`- }}- >- <CommandGroup- style={{- height: `${virtualizer.getTotalSize()}px`,- width: "100%",- position: "relative"- }}- >- {items.map((virtualRow) => {- const option = filteredOptions[virtualRow.index]!;- const isSelected = value.includes(option.value);-- return (- <CommandItem- key={option.value}- value={- typeof option.label === "string"- ? option.label.replace(/"/g, '\\"') +- (option.helper?.replace(/"/g, '\\"') ?? "")- : undefined- }- onSelect={() => {- onChange(- isSelected- ? value.filter((item) => item !== option.value)- : [...value, option.value]- );- setOpen(true);- }}- style={{- position: "absolute",- top: 0,- left: 0,- width: "100%",- height: `${itemHeight}px`,- transform: `translateY(${virtualRow.start}px)`- }}- >- <div className="flex items-center justify-start gap-2">- {isSelected ? (- <FaSquareCheck className="mr-1.5 text-primary shrink-0" />- ) : (- <FaRegSquare className="mr-1.5 text-muted-foreground shrink-0" />- )}- {option.helper ? (- <div className="flex flex-col min-w-0">- <p className="line-clamp-1">{option.label}</p>- <p className="text-xs text-muted-foreground line-clamp-1">- {option.helper}- </p>- </div>- ) : (- <span className="line-clamp-1 min-w-0">{option.label}</span>- )}- </div>- </CommandItem>- );- })}- </CommandGroup>- </div>- </Command>- );-}+const filterMultiSelectOptions = (+ options: PickerListOption[],+ search: string+) =>+ search+ ? options.filter((option) => {+ const value =+ typeof option.label === "string"+ ? `${option.label} ${option.helper ?? ""}`+ : reactNodeToString(option.label);++ return value.toLowerCase().includes(search.toLowerCase());+ })+ : options;++const getMultiSelectItemValue = (option: PickerListOption) =>+ typeof option.label === "string"+ ? option.label.replace(/"/g, '\\"') ++ (option.helper?.replace(/"/g, '\\"') ?? "")+ : undefined;diff --git a/packages/react/src/NavRail.tsx b/packages/react/src/NavRail.tsxindex a4d2f781fc..bd46249244 100644--- a/packages/react/src/NavRail.tsx+++ b/packages/react/src/NavRail.tsx@@ -345,7 +345,7 @@ export const NavRailItem = forwardRef<HTMLButtonElement, NavRailItemProps>(className={cn("absolute left-7 right-3 min-w-32 group-data-[state=expanded]:left-12","flex items-center gap-2",- "opacity-0 group-data-[state=expanded]:opacity-100"+ "opacity-0 group-data-[state=expanded]:opacity-100 compact:opacity-100")}><span@@ -434,7 +434,7 @@ export function NavRailBrand({</span><spanaria-hidden- className="min-w-0 flex-1 truncate opacity-0 transition-opacity duration-200 group-data-[state=expanded]:opacity-100"+ className="min-w-0 flex-1 truncate opacity-0 transition-opacity duration-200 group-data-[state=expanded]:opacity-100 compact:opacity-100">{label}</span>@@ -457,7 +457,7 @@ export function NavRailGroup({aria-hiddenclassName="absolute inset-x-0 top-1/2 mx-auto h-px w-6 bg-border opacity-100 transition-opacity duration-200 group-data-[state=expanded]:opacity-0"/>- <span className="absolute inset-0 flex items-center px-2 text-[11px] font-medium uppercase tracking-wider text-foreground/50 whitespace-nowrap opacity-0 transition-opacity duration-200 group-data-[state=expanded]:opacity-100">+ <span className="absolute inset-0 flex items-center px-2 text-[11px] font-medium uppercase tracking-wider text-foreground/50 whitespace-nowrap opacity-0 transition-opacity duration-200 group-data-[state=expanded]:opacity-100 compact:opacity-100">{label}</span></div>diff --git a/packages/react/src/Number.tsx b/packages/react/src/Number.tsxindex a1eee46fee..1b726f84c1 100644--- a/packages/react/src/Number.tsx+++ b/packages/react/src/Number.tsx@@ -79,8 +79,11 @@ const NumberInputStepper = ({}: React.HTMLAttributes<HTMLElement>) => {return (<div+ data-number-stepperclassName={cn("absolute right-0 top-0 z-10 m-px flex h-[calc(100%-2px)] w-6 flex-col",+ // Phones: − and + side by side, each a 44pt target.+ "compact:w-[88px] compact:flex-row-reverse",className)}{...props}@@ -95,7 +98,10 @@ const NumberInput = forwardRef<HTMLInputElement, InputProps>(ref={ref}isReadOnly={isDisabled || isReadOnly}isDisabled={isDisabled}- className={cn("pr-6", className)}+ className={cn(+ "pr-6 compact:[&:has(~[data-number-stepper])]:pr-[92px]",+ className+ )}onFocus={(e) => {(e.target as HTMLInputElement).select();onFocus?.(e);@@ -117,7 +123,7 @@ const NumberIncrementStepper = ({slot="increment"className={cn([- "flex flex-1 select-none items-center justify-center rounded-tr-md border-l border-border leading-none text-foreground transition-colors duration-100",+ "flex flex-1 select-none items-center justify-center rounded-tr-md border-l border-border leading-none text-foreground transition-colors duration-100 compact:rounded-none compact:rounded-r-md compact:hit-area",// Pressed"pressed:bg-slate-100 dark:pressed:bg-slate-700",// Disabled@@ -139,7 +145,7 @@ const NumberDecrementStepper = ({slot="decrement"className={cn([- "flex flex-1 select-none items-center justify-center rounded-br-md border-l border-t border-border leading-none text-foreground transition-colors duration-100",+ "flex flex-1 select-none items-center justify-center rounded-br-md border-l border-t border-border leading-none text-foreground transition-colors duration-100 compact:rounded-none compact:border-t-0 compact:hit-area",// Pressed"pressed:bg-slate-100 dark:pressed:bg-slate-700",// Disableddiff --git a/packages/react/src/PickerList.tsx b/packages/react/src/PickerList.tsxnew file mode 100644index 0000000000..be3ec21edf--- /dev/null+++ b/packages/react/src/PickerList.tsx@@ -0,0 +1,393 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { useLingui } from "@lingui/react/macro";+import { useVirtualizer } from "@tanstack/react-virtual";+import { CommandEmpty as CommandPrimitiveEmpty } from "cmdk";+import type { ReactNode } from "react";+import { useMemo, useRef, useState } from "react";+import { FaRegSquare, FaSquareCheck } from "react-icons/fa6";+import { LuCheck, LuCirclePlus } from "react-icons/lu";+import {+ Command,+ CommandEmpty,+ CommandGroup,+ CommandInput,+ CommandItem+} from "./Command";+import { useCompact } from "./Compact";+import { TruncatedTooltipText } from "./TruncatedTooltipText";+import { cn } from "./utils/cn";+import { reactNodeToString } from "./utils/react";++export type PickerListOption = {+ label: string | JSX.Element;+ value: string;+ helper?: string;+ helperRight?: string;+ /** Extra search text, matched but never rendered. */+ keywords?: string;+};++export type PickerListFilter = (+ options: PickerListOption[],+ search: string+) => PickerListOption[];++export type PickerListSelectContext = {+ search: string;+ setSearch: (search: string) => void;+ /** The synthetic "Create …" row of a creatable picker. */+ isCreateOption: boolean;+};++export type PickerListProps = {+ options: PickerListOption[];+ /** The picker's own matching; each picker keeps its own rules. */+ filter: PickerListFilter;+ itemHeight: number;+ /** "single" ends a row with ✓; "multiple" starts it with a checkbox. */+ selectionMode: "single" | "multiple";+ /** The cmdk item value of a row (each picker escapes it differently). */+ getItemValue: (option: PickerListOption) => string | undefined;+ /** Whether the row shows as chosen (✓ or a checked box). */+ isChecked: (+ option: PickerListOption,+ itemValue: string | undefined+ ) => boolean;+ /** Single mode: pads the helper column of the row (`pr-2`). */+ isHelperPadded?: (+ option: PickerListOption,+ itemValue: string | undefined+ ) => boolean;+ /** Single mode: the picker's current value. On phones it always gets the ✓. */+ value?: string;+ onSelect: (+ option: PickerListOption,+ context: PickerListSelectContext+ ) => void;+ /** Controlled search. Leave both unset to keep the search inside the list. */+ search?: string;+ onSearchChange?: (search: string) => void;+ emptyMessage?: ReactNode;+ /** Appends a "Create …" row unless the search exactly matches an option. */+ creatable?: boolean;+ /** Names the thing created while the search is empty. */+ createLabel?: string;+ showCreateOptionOnEmpty?: boolean;+};++/** Phones: the search field takes focus on open only past this many options. */+const SEARCH_AUTOFOCUS_MIN_OPTIONS = 7;+const COMPACT_ITEM_HEIGHT = 44;++const labelOf = (option: PickerListOption) =>+ typeof option.label === "string"+ ? option.label+ : reactNodeToString(option.label);++const preventAutoFocus = (event: Event) => event.preventDefault();++/**+ * `onOpenAutoFocus` for a picker's `PopoverContent`: on phones the search+ * field is focused (keyboard up) only when there are more than 7 options.+ * Desktop keeps Radix's default focus.+ */+export function usePickerOpenAutoFocus(+ optionCount: number+): ((event: Event) => void) | undefined {+ const isCompact = useCompact();+ return isCompact && optionCount <= SEARCH_AUTOFOCUS_MIN_OPTIONS+ ? preventAutoFocus+ : undefined;+}++/**+ * The searchable, virtualized option list shared by Combobox,+ * CreatableCombobox, MultiSelect and CreatableMultiSelect.+ *+ * Desktop markup is kept exactly as each picker rendered it before the+ * extraction: the small structural differences between creatable and plain+ * pickers (empty-state placement, group nesting, row classes) follow+ * `creatable` and `selectionMode`. On phones rows are 44px, the list grows+ * to the sheet height and text is plain (no hover tooltips).+ */+function PickerList({+ options,+ filter,+ itemHeight: itemHeightProp,+ selectionMode,+ getItemValue,+ isChecked,+ isHelperPadded,+ value,+ onSelect,+ search: searchProp,+ onSearchChange,+ emptyMessage,+ creatable = false,+ createLabel,+ showCreateOptionOnEmpty = false+}: PickerListProps) {+ const { t } = useLingui();+ const isCompact = useCompact();+ const itemHeight = isCompact ? COMPACT_ITEM_HEIGHT : itemHeightProp;+ const [ownSearch, setOwnSearch] = useState("");+ const search = searchProp ?? ownSearch;+ const setSearch = onSearchChange ?? setOwnSearch;+ const parentRef = useRef<HTMLDivElement>(null);++ const filteredOptions = useMemo<PickerListOption[]>(() => {+ const filtered = filter(options, search);+ if (!creatable) return filtered;++ const isExactMatch = options.some((option) =>+ [labelOf(option).toLowerCase(), option.helper?.toLowerCase()].includes(+ search.toLowerCase()+ )+ );++ if (isExactMatch || (search.trim() === "" && !showCreateOptionOnEmpty)) {+ return filtered;+ }++ return [+ ...filtered,+ {+ label: t`New`,+ value: "create"+ }+ ];+ }, [options, search, filter, creatable, showCreateOptionOnEmpty, t]);++ const virtualizer = useVirtualizer({+ count: filteredOptions.length,+ getScrollElement: () => parentRef.current,+ estimateSize: () => itemHeight,+ overscan: 12+ });++ const items = virtualizer.getVirtualItems();++ const isCreatableSingle = creatable && selectionMode === "single";+ const scrollerClassName = cn(+ isCreatableSingle+ ? "overflow-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent"+ : "overflow-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent pt-1",+ "compact:max-h-[calc(88dvh-120px)]"+ );+ const scrollerStyle = {+ height: `${+ (+ isCompact ? filteredOptions.length : Math.min(filteredOptions.length, 6)+ ) *+ itemHeight ++ 4+ }px`+ };+ const groupStyle = {+ height: `${virtualizer.getTotalSize()}px`,+ width: "100%",+ position: "relative" as const+ };++ const createText = t`Create ${search.trim() === "" ? createLabel : search}`;++ const rows = items.map((virtualRow) => {+ const item = filteredOptions[virtualRow.index]!;+ const itemValue = getItemValue(item);+ const isCreateOption = creatable && item.value === "create";+ const itemHoverText = [labelOf(item), item.helper]+ .filter(Boolean)+ .join(" - ");+ const checked =+ isChecked(item, itemValue) ||+ (isCompact &&+ selectionMode === "single" &&+ value !== undefined &&+ item.value === value);++ return (+ <CommandItem+ key={item.value}+ value={itemValue}+ onSelect={() => {+ onSelect(item, { search, setSearch, isCreateOption });+ }}+ style={{+ position: "absolute",+ top: 0,+ left: 0,+ width: "100%",+ height: `${itemHeight}px`,+ transform: `translateY(${virtualRow.start}px)`+ }}+ className={+ isCreatableSingle+ ? "flex items-center justify-between min-w-0"+ : undefined+ }+ >+ {selectionMode === "single" ? (+ <>+ {isCreateOption ? (+ <div className="flex items-center min-w-0 flex-1">+ <span>{createText}</span>+ </div>+ ) : item.helper ? (+ <div+ className={cn(+ "flex flex-col min-w-0 flex-1",+ isHelperPadded?.(item, itemValue) && "pr-2"+ )}+ >+ <TruncatedTooltipText+ className="block w-full truncate"+ tooltip={itemHoverText}+ enabled={!isCompact}+ >+ {item.label}+ </TruncatedTooltipText>+ <div className="flex items-center justify-between gap-2 text-xs text-muted-foreground">+ <TruncatedTooltipText+ className="truncate flex-1"+ tooltip={itemHoverText}+ enabled={!isCompact}+ >+ {item.helper}+ </TruncatedTooltipText>+ {item.helperRight && (+ <span className="flex-shrink-0">{item.helperRight}</span>+ )}+ </div>+ </div>+ ) : (+ <TruncatedTooltipText+ className="truncate flex-1"+ tooltip={itemHoverText}+ enabled={!isCompact}+ >+ {item.label}+ </TruncatedTooltipText>+ )}+ {!isCreateOption && (+ <LuCheck+ className={cn(+ "ml-auto h-4 w-4",+ creatable && "flex-shrink-0",+ checked ? "opacity-100" : "opacity-0 hidden"+ )}+ />+ )}+ </>+ ) : creatable ? (+ <div className="flex justify-start items-center gap-1 px-2 min-w-0 flex-1">+ {isCreateOption ? (+ <>+ <LuCirclePlus className="mr-1.5 flex-shrink-0" />+ <span>{createText}</span>+ </>+ ) : (+ <>+ {checked ? (+ <FaSquareCheck className="mr-1.5 text-primary flex-shrink-0" />+ ) : (+ <FaRegSquare className="mr-1.5 text-muted-foreground flex-shrink-0" />+ )}+ {item.helper ? (+ <div className="flex flex-col min-w-0 flex-1">+ <TruncatedTooltipText+ className="block w-full truncate"+ tooltip={itemHoverText}+ enabled={!isCompact}+ >+ {item.label}+ </TruncatedTooltipText>+ <TruncatedTooltipText+ className="text-xs text-muted-foreground truncate"+ tooltip={itemHoverText}+ enabled={!isCompact}+ >+ {item.helper}+ </TruncatedTooltipText>+ </div>+ ) : (+ <TruncatedTooltipText+ className="truncate flex-1"+ tooltip={itemHoverText}+ enabled={!isCompact}+ >+ {item.label}+ </TruncatedTooltipText>+ )}+ </>+ )}+ </div>+ ) : (+ <div className="flex items-center justify-start gap-2">+ {checked ? (+ <FaSquareCheck className="mr-1.5 text-primary shrink-0" />+ ) : (+ <FaRegSquare className="mr-1.5 text-muted-foreground shrink-0" />+ )}+ {item.helper ? (+ <div className="flex flex-col min-w-0">+ <p className="line-clamp-1">{item.label}</p>+ <p className="text-xs text-muted-foreground line-clamp-1">+ {item.helper}+ </p>+ </div>+ ) : (+ <span className="line-clamp-1 min-w-0">{item.label}</span>+ )}+ </div>+ )}+ </CommandItem>+ );+ });++ // Creatable multi-select puts its (unstyled) empty state inside the scroller;+ // the plain pickers put the styled one above it.+ const emptyInsideScroller = creatable && selectionMode === "multiple";++ return (+ <Command shouldFilter={false}>+ <CommandInput+ value={search}+ onValueChange={setSearch}+ placeholder={t`Search...`}+ className="h-9 compact:h-11 compact:text-base"+ />+ {isCreatableSingle ? (+ <CommandGroup>+ <div+ ref={parentRef}+ className={scrollerClassName}+ style={scrollerStyle}+ >+ <div style={groupStyle}>{rows}</div>+ </div>+ </CommandGroup>+ ) : (+ <>+ {emptyMessage !== undefined && !emptyInsideScroller && (+ <CommandEmpty>{emptyMessage}</CommandEmpty>+ )}+ <div+ ref={parentRef}+ className={scrollerClassName}+ style={scrollerStyle}+ >+ {emptyMessage !== undefined && emptyInsideScroller && (+ <CommandPrimitiveEmpty>{emptyMessage}</CommandPrimitiveEmpty>+ )}+ <CommandGroup style={groupStyle}>{rows}</CommandGroup>+ </div>+ </>+ )}+ </Command>+ );+}++export { PickerList };diff --git a/packages/react/src/Popover.tsx b/packages/react/src/Popover.tsxindex 7576e5b919..af231677e7 100644--- a/packages/react/src/Popover.tsx+++ b/packages/react/src/Popover.tsx@@ -5,34 +5,117 @@"use client";import * as PopoverPrimitive from "@radix-ui/react-popover";+import { Slot } from "@radix-ui/react-slot";import type { ComponentPropsWithoutRef, ElementRef } from "react";import { forwardRef } from "react";-+import { ActionPresentationBoundary } from "./ActionPresentation";+import {+ BottomSheet,+ BottomSheetClose,+ BottomSheetTrigger+} from "./BottomSheet";+import { useCompact } from "./Compact";+import { PopupSheetContent } from "./PopupSheet";import { cn } from "./utils/cn";-const Popover = PopoverPrimitive.Root;+/*+ * Phones show a popover as a real bottom sheet (a Radix Dialog): each part+ * switches to its Dialog counterpart, so call sites stay unchanged.+ */+const Popover = ({+ open,+ defaultOpen,+ onOpenChange,+ modal,+ children+}: ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>) => {+ const isCompact = useCompact();+ return isCompact ? (+ <BottomSheet+ open={open}+ defaultOpen={defaultOpen}+ onOpenChange={onOpenChange}+ >+ {children}+ </BottomSheet>+ ) : (+ <PopoverPrimitive.Root+ open={open}+ defaultOpen={defaultOpen}+ onOpenChange={onOpenChange}+ modal={modal}+ >+ {children}+ </PopoverPrimitive.Root>+ );+};-const PopoverTrigger = PopoverPrimitive.Trigger;+const PopoverTrigger = forwardRef<+ ElementRef<typeof PopoverPrimitive.Trigger>,+ ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>+>((props, ref) => {+ const isCompact = useCompact();+ return isCompact ? (+ <BottomSheetTrigger ref={ref} {...props} />+ ) : (+ <PopoverPrimitive.Trigger ref={ref} {...props} />+ );+});+PopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;-const PopoverAnchor = PopoverPrimitive.Anchor;+/** Phones: a sheet has no anchor, so this renders its element plainly. */+const PopoverAnchor = forwardRef<+ ElementRef<typeof PopoverPrimitive.Anchor>,+ ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>+>(({ asChild, ...props }, ref) => {+ const isCompact = useCompact();+ if (!isCompact) {+ return <PopoverPrimitive.Anchor ref={ref} asChild={asChild} {...props} />;+ }+ const Comp = asChild ? Slot : "div";+ return <Comp ref={ref} {...props} />;+});+PopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;const PopoverContent = forwardRef<ElementRef<typeof PopoverPrimitive.Content>,ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>->(({ className, align = "center", sideOffset = 4, ...props }, ref) => (- <PopoverPrimitive.Portal>- <PopoverPrimitive.Content- ref={ref}- align={align}- sideOffset={sideOffset}- className={cn(- "z-50 origin-(--radix-popover-content-transform-origin) rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- className- )}- {...props}- />- </PopoverPrimitive.Portal>-));+>(+ (+ { className, align = "center", sideOffset = 4, children, ...props },+ ref+ ) => {+ const isCompact = useCompact();+ if (isCompact) {+ return (+ <PopupSheetContent+ ref={ref}+ label={props["aria-label"]}+ className={className}+ {...props}+ >+ {children}+ </PopupSheetContent>+ );+ }+ return (+ <PopoverPrimitive.Portal>+ <PopoverPrimitive.Content+ ref={ref}+ align={align}+ sideOffset={sideOffset}+ className={cn(+ "z-50 origin-(--radix-popover-content-transform-origin) rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ className+ )}+ {...props}+ >+ <ActionPresentationBoundary>{children}</ActionPresentationBoundary>+ </PopoverPrimitive.Content>+ </PopoverPrimitive.Portal>+ );+ }+);PopoverContent.displayName = PopoverPrimitive.Content.displayName;const PopoverHeader = forwardRef<@@ -65,7 +148,18 @@ const PopoverFooter = forwardRef<));PopoverFooter.displayName = "PopoverFooter";-const PopoverClose = PopoverPrimitive.Close;+const PopoverClose = forwardRef<+ ElementRef<typeof PopoverPrimitive.Close>,+ ComponentPropsWithoutRef<typeof PopoverPrimitive.Close>+>((props, ref) => {+ const isCompact = useCompact();+ return isCompact ? (+ <BottomSheetClose ref={ref} {...props} />+ ) : (+ <PopoverPrimitive.Close ref={ref} {...props} />+ );+});+PopoverClose.displayName = PopoverPrimitive.Close.displayName;export {Popover,diff --git a/packages/react/src/PopupSheet.tsx b/packages/react/src/PopupSheet.tsxnew file mode 100644index 0000000000..6e48558867--- /dev/null+++ b/packages/react/src/PopupSheet.tsx@@ -0,0 +1,88 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { useLingui } from "@lingui/react/macro";+import type * as DialogPrimitive from "@radix-ui/react-dialog";+import type { ComponentPropsWithoutRef, ReactNode } from "react";+import { forwardRef } from "react";+import {+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle+} from "./BottomSheet";+import { cn } from "./utils/cn";++/** Positioning props a popper content takes that a bottom sheet has no use for. */+export type PopperPositionProps = {+ side?: unknown;+ sideOffset?: unknown;+ align?: unknown;+ alignOffset?: unknown;+ arrowPadding?: unknown;+ avoidCollisions?: unknown;+ collisionBoundary?: unknown;+ collisionPadding?: unknown;+ sticky?: unknown;+ hideWhenDetached?: unknown;+ updatePositionStrategy?: unknown;+};++type PopupSheetContentProps = Omit<+ ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,+ "title"+> &+ PopperPositionProps & {+ /** Shown as the sheet's title; a hidden fallback names it otherwise. */+ label?: ReactNode;+ children?: ReactNode;+ };++/**+ * Phones: a popover-like surface (popover, hover card) shown as a bottom+ * sheet. The caller's className styles the body; its width classes give way+ * to the sheet's full width.+ */+export const PopupSheetContent = forwardRef<+ HTMLDivElement,+ PopupSheetContentProps+>(+ (+ {+ label,+ className,+ children,+ side: _side,+ sideOffset: _sideOffset,+ align: _align,+ alignOffset: _alignOffset,+ arrowPadding: _arrowPadding,+ avoidCollisions: _avoidCollisions,+ collisionBoundary: _collisionBoundary,+ collisionPadding: _collisionPadding,+ sticky: _sticky,+ hideWhenDetached: _hideWhenDetached,+ updatePositionStrategy: _updatePositionStrategy,+ ...props+ },+ ref+ ) => {+ const { t } = useLingui();+ return (+ <BottomSheetContent ref={ref} {...props}>+ <BottomSheetHeader>+ <BottomSheetTitle className={label ? undefined : "sr-only"}>+ {label ?? t`Details`}+ </BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody>+ <div className={cn("text-[15px]", className, "w-full max-w-none")}>+ {children}+ </div>+ </BottomSheetBody>+ </BottomSheetContent>+ );+ }+);+PopupSheetContent.displayName = "PopupSheetContent";diff --git a/packages/react/src/Radio.tsx b/packages/react/src/Radio.tsxindex bb8d78688d..f8f09d46c8 100644--- a/packages/react/src/Radio.tsx+++ b/packages/react/src/Radio.tsx@@ -35,6 +35,8 @@ const RadioGroupItem = forwardRef<ref={ref}className={cn("aspect-square size-4 shrink-0 rounded-full border-2 border-muted-foreground/50 shadow-xs transition-[color,box-shadow,border-color] outline-none hover:border-primary focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:text-primary dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=checked]:text-primary-foreground",+ // Phones: a 44x44 hit area around the visual dot.+ "compact:hit-area",className)}{...props}diff --git a/packages/react/src/Resizable.tsx b/packages/react/src/Resizable.tsxindex 435ede9238..30d114b432 100644--- a/packages/react/src/Resizable.tsx+++ b/packages/react/src/Resizable.tsx@@ -4,29 +4,86 @@"use client";+import { createContext, forwardRef, useContext } from "react";import { LuGripVertical } from "react-icons/lu";+import type { ImperativePanelHandle } from "react-resizable-panels";import * as ResizablePrimitive from "react-resizable-panels";import { ClientOnly } from "./ClientOnly";+import { useCompact } from "./Compact";import { cn } from "./utils/cn";+/** True inside a group that `stackOnCompact` turned into plain blocks. */+const StackedContext = createContext(false);+const ResizablePanelGroup = ({className,+ children,+ stackOnCompact,...props-}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (- <ClientOnly fallback={null}>- {() => (- <ResizablePrimitive.PanelGroup- className={cn(- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",- className- )}- {...props}- />- )}- </ClientOnly>-);--const ResizablePanel = ResizablePrimitive.Panel;+}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup> & {+ /**+ * Phones: render the panes as plain full-width blocks with no handles, one+ * at a time. A pane marked `compactFocus` hides its siblings while mounted.+ */+ stackOnCompact?: boolean;+}) => {+ const isCompact = useCompact();++ if (stackOnCompact && isCompact) {+ return (+ <StackedContext.Provider value={true}>+ <div+ className={cn(+ "flex h-full w-full flex-col [&:has(>[data-compact-focus])>:not([data-compact-focus])]:hidden",+ className+ )}+ >+ {children}+ </div>+ </StackedContext.Provider>+ );+ }++ return (+ <ClientOnly fallback={null}>+ {() => (+ <ResizablePrimitive.PanelGroup+ className={cn(+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",+ className+ )}+ {...props}+ >+ {children}+ </ResizablePrimitive.PanelGroup>+ )}+ </ClientOnly>+ );+};++const ResizablePanel = forwardRef<+ ImperativePanelHandle,+ React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Panel> & {+ /** In a stacked group (phones), this pane replaces its siblings. */+ compactFocus?: boolean;+ }+>(({ compactFocus, ...props }, ref) => {+ const isStacked = useContext(StackedContext);++ if (isStacked) {+ return (+ <div+ data-compact-focus={compactFocus || undefined}+ className={cn("flex h-full min-h-0 w-full flex-col", props.className)}+ >+ {props.children}+ </div>+ );+ }++ return <ResizablePrimitive.Panel ref={ref} {...props} />;+});+ResizablePanel.displayName = "ResizablePanel";const ResizableHandle = ({withHandle,@@ -34,20 +91,25 @@ const ResizableHandle = ({...props}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {withHandle?: boolean;-}) => (- <ResizablePrimitive.PanelResizeHandle- className={cn(- "relative flex w-px items-center justify-center bg-foreground/10 after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",- className- )}- {...props}- >- {withHandle && (- <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">- <LuGripVertical className="h-3 w-3" />- </div>- )}- </ResizablePrimitive.PanelResizeHandle>-);+}) => {+ const isStacked = useContext(StackedContext);+ if (isStacked) return null;++ return (+ <ResizablePrimitive.PanelResizeHandle+ className={cn(+ "relative flex w-px items-center justify-center bg-foreground/10 after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",+ className+ )}+ {...props}+ >+ {withHandle && (+ <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">+ <LuGripVertical className="h-3 w-3" />+ </div>+ )}+ </ResizablePrimitive.PanelResizeHandle>+ );+};export { ResizableHandle, ResizablePanel, ResizablePanelGroup };diff --git a/packages/react/src/RichText/Toolbar/Toolbar.tsx b/packages/react/src/RichText/Toolbar/Toolbar.tsxindex b1c1b2a1a1..95fe97c1e0 100644--- a/packages/react/src/RichText/Toolbar/Toolbar.tsx+++ b/packages/react/src/RichText/Toolbar/Toolbar.tsx@@ -20,7 +20,7 @@ const Toolbar: EditorComponent = ({ editor }) => {return (<TooltipProvider><div className="w-full border-b border-border p-2">- <div className="flex flex-wrap gap-2">+ <div className="flex flex-wrap gap-2 compact:flex-nowrap compact:overflow-x-auto compact:scrollbar-hide compact:scroll-fade-x compact:[&>*]:shrink-0"><Paragraph editor={editor} /><HeadingOne editor={editor} /><HeadingTwo editor={editor} />diff --git a/packages/react/src/Select.tsx b/packages/react/src/Select.tsxindex 0643b27d1f..71efec347d 100644--- a/packages/react/src/Select.tsx+++ b/packages/react/src/Select.tsx@@ -16,13 +16,44 @@ import {LuChevronUp} from "react-icons/lu";+import { useCompact } from "./Compact";+import { compactPart } from "./MenuSheet";+import {+ SelectSheetContent,+ SelectSheetGroup,+ SelectSheetItem,+ SelectSheetLabel,+ SelectSheetRoot,+ SelectSheetSeparator,+ SelectSheetTrigger,+ SelectSheetValue+} from "./SelectSheet";import { cn } from "./utils/cn";-const Select = SelectPrimitive.Root;+/*+ * Phones render each part from SelectSheet (a bottom sheet) instead of Radix's+ * select; see SelectSheet.tsx.+ */+const Select = (+ props: ComponentPropsWithoutRef<typeof SelectPrimitive.Root>+) =>+ useCompact() ? (+ <SelectSheetRoot {...props} />+ ) : (+ <SelectPrimitive.Root {...props} />+ );-const SelectGroup = SelectPrimitive.Group;+const SelectGroup = compactPart(+ SelectPrimitive.Group,+ SelectSheetGroup,+ "SelectGroup"+);-const SelectValue = SelectPrimitive.Value;+const SelectValue = compactPart(+ SelectPrimitive.Value,+ SelectSheetValue,+ "SelectValue"+);const selectTriggerVariants = cva("bg-transparent text-foreground flex w-full items-center justify-between whitespace-nowrap rounded-md border border-input shadow-xs transition-[color,box-shadow] data-[placeholder]:text-muted-foreground outline-none focus:border-ring focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>span]:min-w-0 [&>span]:truncate",@@ -30,8 +61,8 @@ const selectTriggerVariants = cva(variants: {size: {lg: "h-12 px-4 py-3 rounded-lg text-base space-x-4",- md: "h-10 px-3 py-2 rounded-md text-sm space-x-3",- sm: "h-8 px-3 py-2 rounded text-xs space-x-2"+ md: "h-10 px-3 py-2 rounded-md text-sm space-x-3 compact:h-11 compact:text-base",+ sm: "h-8 px-3 py-2 rounded text-xs space-x-2 compact:h-11 compact:text-base"}},defaultVariants: {@@ -50,26 +81,29 @@ interface SelectTriggerPropsconst SelectTrigger = forwardRef<ElementRef<typeof SelectPrimitive.Trigger>,SelectTriggerProps->(({ size, className, children, hideIcon, inline, ...props }, ref) => (- <SelectPrimitive.Trigger- ref={ref}- className={cn(- !inline &&- selectTriggerVariants({- size- }),- className- )}- {...props}- >- {children}- {!hideIcon && !inline && (- <SelectPrimitive.Icon asChild>- <LuChevronsUpDown className="h-4 w-4 flex-shrink-0 opacity-50" />- </SelectPrimitive.Icon>- )}- </SelectPrimitive.Trigger>-));+>(({ size, className, children, hideIcon, inline, ...props }, ref) => {+ const isCompact = useCompact();+ const Trigger = isCompact ? SelectSheetTrigger : SelectPrimitive.Trigger;+ const icon = (+ <LuChevronsUpDown className="h-4 w-4 flex-shrink-0 opacity-50" />+ );+ return (+ <Trigger+ ref={ref}+ className={cn(!inline && selectTriggerVariants({ size }), className)}+ {...props}+ >+ {children}+ {!hideIcon && !inline ? (+ isCompact ? (+ icon+ ) : (+ <SelectPrimitive.Icon asChild>{icon}</SelectPrimitive.Icon>+ )+ ) : null}+ </Trigger>+ );+});SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;const SelectScrollUpButton = forwardRef<@@ -107,39 +141,47 @@ const SelectScrollDownButton = forwardRef<SelectScrollDownButton.displayName =SelectPrimitive.ScrollDownButton.displayName;-const SelectContent = forwardRef<+const DesktopSelectContent = forwardRef<ElementRef<typeof SelectPrimitive.Content>,ComponentPropsWithoutRef<typeof SelectPrimitive.Content>->(({ className, children, position = "popper", ...props }, ref) => (- <SelectPrimitive.Portal>- <SelectPrimitive.Content- ref={ref}- className={cn(- "relative z-50 origin-(--radix-select-content-transform-origin) max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- position === "popper" &&- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",- className- )}- position={position}- {...props}- >- <SelectScrollUpButton />- <SelectPrimitive.Viewport- className={cn(- "p-1",- position === "popper" &&- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] max-h-[300px] overflow-y-auto"- )}- >- {children}- </SelectPrimitive.Viewport>- <SelectScrollDownButton />- </SelectPrimitive.Content>- </SelectPrimitive.Portal>-));-SelectContent.displayName = SelectPrimitive.Content.displayName;+>(+ (+ { className, children, position: positionProp = "popper", ...props },+ ref+ ) => {+ const position = positionProp;+ return (+ <SelectPrimitive.Portal>+ <SelectPrimitive.Content+ ref={ref}+ className={cn(+ "relative z-50 origin-(--radix-select-content-transform-origin) max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ position === "popper" &&+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",+ className+ )}+ position={position}+ {...props}+ >+ <SelectScrollUpButton />+ <SelectPrimitive.Viewport+ className={cn(+ "p-1",+ position === "popper" &&+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] max-h-[300px] overflow-y-auto"+ )}+ >+ {children}+ </SelectPrimitive.Viewport>+ <SelectScrollDownButton />+ </SelectPrimitive.Content>+ </SelectPrimitive.Portal>+ );+ }+);+DesktopSelectContent.displayName = SelectPrimitive.Content.displayName;-const SelectLabel = forwardRef<+const DesktopSelectLabel = forwardRef<ElementRef<typeof SelectPrimitive.Label>,ComponentPropsWithoutRef<typeof SelectPrimitive.Label>>(({ className, ...props }, ref) => (@@ -152,9 +194,9 @@ const SelectLabel = forwardRef<{...props}/>));-SelectLabel.displayName = SelectPrimitive.Label.displayName;+DesktopSelectLabel.displayName = SelectPrimitive.Label.displayName;-const SelectItem = forwardRef<+const DesktopSelectItem = forwardRef<ElementRef<typeof SelectPrimitive.Item>,ComponentPropsWithoutRef<typeof SelectPrimitive.Item> & {/**@@ -192,9 +234,9 @@ const SelectItem = forwardRef<)}</SelectPrimitive.Item>));-SelectItem.displayName = SelectPrimitive.Item.displayName;+DesktopSelectItem.displayName = SelectPrimitive.Item.displayName;-const SelectSeparator = forwardRef<+const DesktopSelectSeparator = forwardRef<ElementRef<typeof SelectPrimitive.Separator>,ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>>(({ className, ...props }, ref) => (@@ -204,7 +246,28 @@ const SelectSeparator = forwardRef<{...props}/>));-SelectSeparator.displayName = SelectPrimitive.Separator.displayName;+DesktopSelectSeparator.displayName = SelectPrimitive.Separator.displayName;++const SelectContent = compactPart(+ DesktopSelectContent,+ SelectSheetContent,+ "SelectContent"+);+const SelectLabel = compactPart(+ DesktopSelectLabel,+ SelectSheetLabel,+ "SelectLabel"+);+const SelectItem = compactPart(+ DesktopSelectItem,+ SelectSheetItem,+ "SelectItem"+);+const SelectSeparator = compactPart(+ DesktopSelectSeparator,+ SelectSheetSeparator,+ "SelectSeparator"+);export {Select,diff --git a/packages/react/src/SelectSheet.tsx b/packages/react/src/SelectSheet.tsxnew file mode 100644index 0000000000..66c31b4ee9--- /dev/null+++ b/packages/react/src/SelectSheet.tsx@@ -0,0 +1,325 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { useLingui } from "@lingui/react/macro";+import type * as DialogPrimitive from "@radix-ui/react-dialog";+import type { ComponentPropsWithoutRef, ReactNode } from "react";+import { createContext, forwardRef, useContext, useRef, useState } from "react";+import { LuCheck } from "react-icons/lu";+import {+ BottomSheet,+ BottomSheetBody,+ BottomSheetContent,+ BottomSheetHeader,+ BottomSheetTitle,+ BottomSheetTrigger+} from "./BottomSheet";+import { useIsomorphicLayoutEffect } from "./hooks/useIsomorphicLayoutEffect";+import type { PopperPositionProps } from "./PopupSheet";+import { cn } from "./utils/cn";++/*+ * Phones: a select shown as a real bottom sheet (a Radix Dialog) listing its+ * options, not Radix's select. Radix select items only work inside Radix's+ * select content, so the select's parts switch to these on compact.+ */++type SelectSheetState = {+ value: string | undefined;+ select: (value: string) => void;+ open: boolean;+ /** Each item's label by value, so the trigger can show the chosen one. */+ labelOf: (value: string) => ReactNode;+ register: (value: string, label: ReactNode) => void;+ disabled?: boolean;+};++const SelectSheetContext = createContext<SelectSheetState | null>(null);++function useSelectSheet() {+ const context = useContext(SelectSheetContext);+ if (!context) throw new Error("Select parts must be used within a Select");+ return context;+}++export function SelectSheetRoot({+ value: valueProp,+ defaultValue,+ onValueChange,+ open: openProp,+ defaultOpen,+ onOpenChange,+ name,+ disabled,+ required,+ children+}: {+ value?: string;+ defaultValue?: string;+ onValueChange?: (value: string) => void;+ open?: boolean;+ defaultOpen?: boolean;+ onOpenChange?: (open: boolean) => void;+ name?: string;+ disabled?: boolean;+ required?: boolean;+ dir?: unknown;+ autoComplete?: unknown;+ form?: unknown;+ children?: ReactNode;+}) {+ const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);+ const [uncontrolledOpen, setUncontrolledOpen] = useState(+ defaultOpen ?? false+ );+ const value = valueProp ?? uncontrolledValue;+ const open = openProp ?? uncontrolledOpen;+ const labels = useRef(new Map<string, ReactNode>());+ // Items register their labels after the trigger renders; re-render once+ // when the chosen value's label first arrives.+ const [, setVersion] = useState(0);++ const setOpen = (next: boolean) => {+ if (openProp === undefined) setUncontrolledOpen(next);+ onOpenChange?.(next);+ };++ return (+ <SelectSheetContext.Provider+ value={{+ value,+ open,+ disabled,+ select: (next) => {+ if (valueProp === undefined) setUncontrolledValue(next);+ onValueChange?.(next);+ setOpen(false);+ },+ labelOf: (v) => labels.current.get(v),+ register: (v, label) => {+ const isNew = !labels.current.has(v);+ labels.current.set(v, label);+ if (isNew && v === value) setVersion((n) => n + 1);+ }+ }}+ >+ <BottomSheet open={open} onOpenChange={setOpen}>+ {children}+ </BottomSheet>+ {name ? (+ <input+ type="hidden"+ name={name}+ value={value ?? ""}+ required={required}+ />+ ) : null}+ </SelectSheetContext.Provider>+ );+}++/** Opens the sheet; the caller's Select trigger markup renders inside it. */+export const SelectSheetTrigger = forwardRef<+ HTMLButtonElement,+ ComponentPropsWithoutRef<"button"> & { asChild?: boolean }+>(({ disabled, asChild: _asChild, ...props }, ref) => {+ const { value, disabled: rootDisabled } = useSelectSheet();+ return (+ <BottomSheetTrigger asChild>+ <button+ ref={ref}+ type="button"+ disabled={disabled || rootDisabled}+ data-placeholder={value ? undefined : ""}+ {...props}+ />+ </BottomSheetTrigger>+ );+});+SelectSheetTrigger.displayName = "SelectSheetTrigger";++export function SelectSheetValue({+ placeholder,+ children,+ className+}: {+ placeholder?: ReactNode;+ children?: ReactNode;+ className?: string;+}) {+ const { value, labelOf } = useSelectSheet();+ const label = children ?? (value ? labelOf(value) : undefined);+ return (+ <span className={cn("pointer-events-none", className)}>+ {label ?? placeholder}+ </span>+ );+}++/** True while items only record their labels (the sheet is closed). */+const RegistryContext = createContext(false);++export const SelectSheetContent = forwardRef<+ HTMLDivElement,+ Omit<ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, "title"> &+ PopperPositionProps & { position?: unknown }+>(+ (+ {+ className,+ children,+ position: _position,+ side: _side,+ sideOffset: _sideOffset,+ align: _align,+ alignOffset: _alignOffset,+ arrowPadding: _arrowPadding,+ avoidCollisions: _avoidCollisions,+ collisionBoundary: _collisionBoundary,+ collisionPadding: _collisionPadding,+ sticky: _sticky,+ hideWhenDetached: _hideWhenDetached,+ updatePositionStrategy: _updatePositionStrategy,+ ...props+ },+ ref+ ) => {+ const { t } = useLingui();+ const { open } = useSelectSheet();+ const label = props["aria-label"];+ return (+ <>+ {open ? null : (+ <RegistryContext.Provider value>{children}</RegistryContext.Provider>+ )}+ <BottomSheetContent ref={ref} {...props}>+ <BottomSheetHeader>+ <BottomSheetTitle className={label ? undefined : "sr-only"}>+ {label ?? t`Choose an option`}+ </BottomSheetTitle>+ </BottomSheetHeader>+ <BottomSheetBody>+ <div+ role="listbox"+ className={cn("flex flex-col", className, "w-full max-w-none")}+ >+ {children}+ </div>+ </BottomSheetBody>+ </BottomSheetContent>+ </>+ );+ }+);+SelectSheetContent.displayName = "SelectSheetContent";++export const SelectSheetItem = forwardRef<+ HTMLButtonElement,+ ComponentPropsWithoutRef<"button"> & {+ value: string;+ textValue?: string;+ helper?: string;+ helperRight?: string;+ }+>(+ (+ {+ value,+ textValue: _textValue,+ helper,+ helperRight,+ disabled,+ className,+ children,+ ...props+ },+ ref+ ) => {+ const sheet = useSelectSheet();+ const registryOnly = useContext(RegistryContext);+ // Before paint, so the trigger shows the label on its first frame.+ useIsomorphicLayoutEffect(() => {+ sheet.register(value, children);+ });+ if (registryOnly) return null;++ const checked = sheet.value === value;+ return (+ <button+ ref={ref}+ type="button"+ role="option"+ aria-selected={checked}+ disabled={disabled}+ className={cn(+ "relative flex min-h-12 w-full select-none items-center gap-3 rounded-sm px-3 text-left text-[15px] text-foreground outline-none hover:bg-accent focus-visible:bg-accent active:bg-accent disabled:pointer-events-none disabled:opacity-50",+ className+ )}+ onClick={() => sheet.select(value)}+ {...props}+ >+ <span className="flex min-w-0 flex-1 flex-col">+ <span className="truncate">{children}</span>+ {helper ? (+ <span className="flex items-center justify-between gap-2 text-xs text-muted-foreground">+ <span className="truncate">{helper}</span>+ {helperRight ? (+ <span className="shrink-0">{helperRight}</span>+ ) : null}+ </span>+ ) : null}+ </span>+ {checked ? <LuCheck className="size-5 shrink-0 text-primary" /> : null}+ </button>+ );+ }+);+SelectSheetItem.displayName = "SelectSheetItem";++export function SelectSheetGroup({+ className,+ ...props+}: ComponentPropsWithoutRef<"div">) {+ const registryOnly = useContext(RegistryContext);+ return registryOnly ? (+ <>{props.children}</>+ ) : (+ <div role="group" className={className} {...props} />+ );+}++export const SelectSheetLabel = forwardRef<+ HTMLDivElement,+ ComponentPropsWithoutRef<"div">+>(({ className, ...props }, ref) => {+ const registryOnly = useContext(RegistryContext);+ if (registryOnly) return null;+ return (+ <div+ ref={ref}+ className={cn(+ "px-3 pt-3 pb-1 text-xs font-medium uppercase tracking-[0.04em] text-muted-foreground",+ className+ )}+ {...props}+ />+ );+});+SelectSheetLabel.displayName = "SelectSheetLabel";++export const SelectSheetSeparator = forwardRef<+ HTMLHRElement,+ ComponentPropsWithoutRef<"hr">+>(({ className, ...props }, ref) => {+ const registryOnly = useContext(RegistryContext);+ if (registryOnly) return null;+ return (+ <hr+ ref={ref}+ className={cn("my-2 h-px border-0 bg-border", className)}+ {...props}+ />+ );+});+SelectSheetSeparator.displayName = "SelectSheetSeparator";diff --git a/packages/react/src/ShortcutKey.tsx b/packages/react/src/ShortcutKey.tsxindex 339a877c1d..e58331b8f4 100644--- a/packages/react/src/ShortcutKey.tsx+++ b/packages/react/src/ShortcutKey.tsx@@ -72,7 +72,14 @@ export const ShortcutKey = ({);return (- <span className={cn(shortcutKeyVariants[variant], className)}>+ <span+ className={cn(+ shortcutKeyVariants[variant],+ // Phones have no keyboard shortcuts to hint at.+ "compact:hidden",+ className+ )}+ ><span className="sr-only">{readableShortcut}</span><span aria-hidden="true" className="contents">{modifiers.map((k) => (diff --git a/packages/react/src/SplitButton.tsx b/packages/react/src/SplitButton.tsxindex 27a5452f41..4b22405321 100644--- a/packages/react/src/SplitButton.tsx+++ b/packages/react/src/SplitButton.tsx@@ -4,6 +4,10 @@import { forwardRef } from "react";import { LuChevronDown } from "react-icons/lu";+import {+ ActionPresentationBoundary,+ useActionPresentation+} from "./ActionPresentation";import { Button } from "./Button";import {DropdownMenu,@@ -47,52 +51,76 @@ const SplitButton = forwardRef<HTMLButtonElement, SplitButtonProps>(},ref) => {+ // Phones, in a record action's bar cell or sheet row: the main button+ // fills the space and the chevron keeps a 44pt cell. Its own Buttons+ // render plainly (the boundary) so only these classes apply.+ const presentation = useActionPresentation();+ const presented = presentation !== null;+ const mainVariant =+ presentation?.kind === "bar"+ ? presentation.emphasis+ : presentation?.kind === "row"+ ? "ghost"+ : variant;return (- <div className="flex">- <Button- ref={ref}- onClick={onClick}- leftIcon={leftIcon}- variant={variant}- size={size}- isLoading={isLoading}- isDisabled={isDisabled}- className={cn(- `rounded-r-none before:rounded-r-none hover:scale-100 focus-visible:scale-100`,- className- )}- >- {children}- </Button>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- variant={variant}- size={size}- isDisabled={isDisabled || isLoading}- className={cn(- "rounded-l-none border-l px-1 before:rounded-l-none border-none shadow-none",- variant === "primary" &&- "dark:shadow-[inset_0px_0.5px_0px_rgb(255_255_255_/_0.32)] dark:hover:shadow-button-primary hover:scale-100 focus-visible:scale-100"- )}- >- <LuChevronDown />- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent>- {dropdownItems.map((item, index) => (- <DropdownMenuItem- key={index}- onClick={item.onClick}- disabled={item.disabled}+ <ActionPresentationBoundary>+ <div className={cn("flex", presented && "w-full min-w-0")}>+ <Button+ ref={ref}+ onClick={+ presentation?.kind === "row"+ ? () => {+ onClick?.();+ setTimeout(presentation.onSelect, 0);+ }+ : onClick+ }+ leftIcon={leftIcon}+ variant={mainVariant}+ size={presented ? "lg" : size}+ isLoading={isLoading}+ isDisabled={isDisabled}+ className={cn(+ `rounded-r-none before:rounded-r-none hover:scale-100 focus-visible:scale-100`,+ presented && "min-w-0 flex-1",+ presentation?.kind === "row" &&+ "h-12 justify-start rounded-sm px-3 text-[15px] font-normal text-foreground shadow-none",+ className+ )}+ >+ {children}+ </Button>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ variant={mainVariant}+ size={presented ? "lg" : size}+ isDisabled={isDisabled || isLoading}+ className={cn(+ "rounded-l-none border-l px-1 before:rounded-l-none border-none shadow-none",+ mainVariant === "primary" &&+ "dark:shadow-[inset_0px_0.5px_0px_rgb(255_255_255_/_0.32)] dark:hover:shadow-button-primary hover:scale-100 focus-visible:scale-100",+ presented && "w-11 shrink-0 justify-center px-0"+ )}>- {item.icon && <DropdownMenuIcon icon={item.icon} />}- {item.label}- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>- </div>+ <LuChevronDown />+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent>+ {dropdownItems.map((item, index) => (+ <DropdownMenuItem+ key={index}+ onClick={item.onClick}+ disabled={item.disabled}+ >+ {item.icon && <DropdownMenuIcon icon={item.icon} />}+ {item.label}+ </DropdownMenuItem>+ ))}+ </DropdownMenuContent>+ </DropdownMenu>+ </div>+ </ActionPresentationBoundary>);});diff --git a/packages/react/src/Switch.tsx b/packages/react/src/Switch.tsxindex 58fe1102d3..53971d9d87 100644--- a/packages/react/src/Switch.tsx+++ b/packages/react/src/Switch.tsx@@ -42,6 +42,8 @@ const Switch = forwardRef<<SwitchPrimitives.RootclassName={cn("group flex items-center transition-colors focus-visible:outline-none",+ // Phones: a 44x44 hit area around the visual switch.+ "compact:hit-area",container,className)}diff --git a/packages/react/src/Table.tsx b/packages/react/src/Table.tsxindex 8a107322b7..56609ae946 100644--- a/packages/react/src/Table.tsx+++ b/packages/react/src/Table.tsx@@ -21,7 +21,7 @@ const Table = forwardRef<</div>) : (<div className="rounded-md w-full overflow-hidden">- <div className="relative w-full overflow-auto">+ <div className="relative w-full overflow-auto compact:scroll-fade-x"><tableref={ref}className={cn("w-full caption-bottom text-sm", className)}diff --git a/packages/react/src/Tabs.tsx b/packages/react/src/Tabs.tsxindex adc2497ea0..ba4b9e75f1 100644--- a/packages/react/src/Tabs.tsx+++ b/packages/react/src/Tabs.tsx@@ -23,6 +23,8 @@ const TabsList = forwardRef<// around the triggers is uniform on every side (a fixed h-* squeezed// them, and a border-b read as an extra pixel of bottom padding)"inline-flex items-center justify-center rounded-[0.5rem] bg-muted p-1 text-muted-foreground border border-border",+ // Phones: an underline tab row that scrolls sideways, inset 16pt.+ "compact:flex compact:w-full compact:justify-start compact:gap-5 compact:overflow-x-auto compact:scrollbar-hide compact:rounded-none compact:border-0 compact:border-b compact:bg-transparent compact:p-0 compact:px-4",className)}{...props}@@ -41,6 +43,7 @@ const TabsTrigger = forwardRef<className={cn("inline-flex items-center justify-center whitespace-nowrap rounded-[6px] border border-transparent px-3 py-1 text-sm font-medium transition-[background-color,color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-button-base",+ "compact:min-h-11 compact:min-w-11 compact:shrink-0 compact:rounded-none compact:border-0 compact:border-b-2 compact:border-transparent compact:px-0 compact:text-[15px] compact:data-[state=active]:border-foreground compact:data-[state=active]:bg-transparent compact:data-[state=active]:shadow-none",className)}diff --git a/packages/react/src/Textarea.tsx b/packages/react/src/Textarea.tsxindex b6901a7118..71d6e4bdc9 100644--- a/packages/react/src/Textarea.tsx+++ b/packages/react/src/Textarea.tsx@@ -13,8 +13,8 @@ const textareaVariants = cva({variants: {size: {- sm: "rounded-md px-3 py-1 text-sm",- md: "rounded-md px-3 py-2 text-sm",+ sm: "rounded-md px-3 py-1 text-sm compact:text-base",+ md: "rounded-md px-3 py-2 text-sm compact:text-base",lg: "rounded-lg px-4 py-3 text-base"}},diff --git a/packages/react/src/Tooltip.tsx b/packages/react/src/Tooltip.tsxindex 2a54ab0aa9..76c41b6964 100644--- a/packages/react/src/Tooltip.tsx+++ b/packages/react/src/Tooltip.tsx@@ -6,8 +6,17 @@import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";import type { ReactElement } from "react";-import { forwardRef, isValidElement } from "react";+import {+ createContext,+ forwardRef,+ isValidElement,+ useContext,+ useEffect,+ useId,+ useState+} from "react";+import { useCompact } from "./Compact";import { cn } from "./utils/cn";/**@@ -44,14 +53,69 @@ type RootProps = TooltipPrimitive.Root.Props & {delayDuration?: number;};+/**+ * Phones cannot hover. On compact an uncontrolled tooltip opens on tap+ * instead, but only when the tap does not land on a control the trigger wraps,+ * so icons, badges and ⓘ reveal their text while buttons and links keep doing+ * their job and keep their aria-label. Desktop is unchanged.+ */+const TapToggleContext = createContext<{+ id: string;+ toggle: () => void;+} | null>(null);++const INTERACTIVE =+ 'a[href],button,input,select,textarea,[role="button"],[role="link"],[role="menuitem"],[role="checkbox"],[role="switch"],[role="tab"],[role="combobox"]';++const TapToggleRoot = ({+ onOpenChange,+ ...props+}: TooltipPrimitive.Root.Props) => {+ const id = useId();+ const [open, setOpen] = useState(false);++ useEffect(() => {+ if (!open) return;+ const close = (event: PointerEvent) => {+ const target = event.target as Element | null;+ if (!target?.closest?.(`[data-tooltip-tap="${id}"]`)) setOpen(false);+ };+ document.addEventListener("pointerdown", close);+ return () => document.removeEventListener("pointerdown", close);+ }, [id, open]);++ return (+ <TapToggleContext.Provider value={{ id, toggle: () => setOpen((o) => !o) }}>+ <TooltipPrimitive.Root+ {...props}+ open={open}+ onOpenChange={(next, ...rest) => {+ // Only a tap opens it; dismissals (Escape, blur) still close it.+ if (!next) setOpen(false);+ onOpenChange?.(next, ...rest);+ }}+ />+ </TapToggleContext.Provider>+ );+};++const TooltipRoot = (props: TooltipPrimitive.Root.Props) => {+ const isCompact = useCompact();+ return isCompact && props.open === undefined ? (+ <TapToggleRoot {...props} />+ ) : (+ <TooltipPrimitive.Root {...props} />+ );+};+// Without its own delay a tooltip joins the surrounding provider, so once one is// open its neighbours open at once instead of each waiting out the delay again.const Tooltip = ({ delayDuration, ...props }: RootProps) =>delayDuration === undefined ? (- <TooltipPrimitive.Root {...props} />+ <TooltipRoot {...props} />) : (<TooltipPrimitive.Provider delay={delayDuration}>- <TooltipPrimitive.Root {...props} />+ <TooltipRoot {...props} /></TooltipPrimitive.Provider>);Tooltip.displayName = "Tooltip";@@ -62,7 +126,25 @@ type TriggerProps = TooltipPrimitive.Trigger.Props & {};const TooltipTrigger = forwardRef<HTMLButtonElement, TriggerProps>(- ({ asChild, children, ...props }, ref) => {+ ({ asChild, children, ...rest }, ref) => {+ const tap = useContext(TapToggleContext);+ const props = tap+ ? {+ ...rest,+ "data-tooltip-tap": tap.id,+ onClick: (+ event: Parameters<NonNullable<TriggerProps["onClick"]>>[0]+ ) => {+ rest.onClick?.(event);+ const hit = (event.target as Element).closest(INTERACTIVE);+ // Base UI's own trigger button (no asChild) is not a wrapped control.+ const isOwnButton = !asChild && hit === event.currentTarget;+ if (hit && !isOwnButton && event.currentTarget.contains(hit))+ return;+ tap.toggle();+ }+ }+ : rest;if (asChild && isValidElement(children)) {return (<TooltipPrimitive.Trigger@@ -129,33 +211,44 @@ const TooltipContent = forwardRef<HTMLDivElement, ContentProps>(...props},ref- ) => (- <TooltipPrimitive.Portal- container={- elevated && typeof document !== "undefined" ? document.body : undefined- }- >- <TooltipPrimitive.Positioner- side={side}- sideOffset={sideOffset}- align={align}- alignOffset={alignOffset}- className={elevated ? "z-[9999]" : "z-50"}+ ) => {+ // Phones have no hover: a tooltip shows only when tapped open (see+ // TapToggleRoot); controlled tooltips stay hidden.+ const isCompact = useCompact();+ const tap = useContext(TapToggleContext);+ if (isCompact && !tap) return null;+ return (+ <TooltipPrimitive.Portal+ container={+ elevated && typeof document !== "undefined"+ ? document.body+ : undefined+ }>- <TooltipPrimitive.Popup- ref={ref}- className={cn(- "z-50 w-fit max-w-xs overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md",- "origin-[var(--transform-origin)] transition-[transform,opacity] duration-150",- "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",- "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",- className- )}- {...props}- />- </TooltipPrimitive.Positioner>- </TooltipPrimitive.Portal>- )+ <TooltipPrimitive.Positioner+ side={side}+ sideOffset={sideOffset}+ align={align}+ alignOffset={alignOffset}+ className={elevated ? "z-[9999]" : "z-50"}+ >+ <TooltipPrimitive.Popup+ ref={ref}+ data-tooltip-tap={tap?.id}+ className={cn(+ "z-50 w-fit max-w-xs overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md",+ "origin-[var(--transform-origin)] transition-[transform,opacity] duration-150",+ "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",+ "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",+ "compact:max-w-[calc(100vw-32px)] compact:text-[15px]",+ className+ )}+ {...props}+ />+ </TooltipPrimitive.Positioner>+ </TooltipPrimitive.Portal>+ );+ });TooltipContent.displayName = "TooltipContent";diff --git a/packages/react/src/hooks/useEscape.tsx b/packages/react/src/hooks/useEscape.tsxindex 8a7571d00f..5d8335816c 100644--- a/packages/react/src/hooks/useEscape.tsx+++ b/packages/react/src/hooks/useEscape.tsx@@ -9,7 +9,9 @@ export default function useEscape() {useEffect(() => {const listener = (e: KeyboardEvent) => {- if (e.key === "Escape") {+ // A Radix layer (menu, popover, sheet) that closed on this Escape has+ // already handled it.+ if (e.key === "Escape" && !e.defaultPrevented) {callback(e);}};diff --git a/packages/react/src/hooks/useIsMobile.ts b/packages/react/src/hooks/useIsMobile.tsindex 646ede2bba..a5c0099685 100644--- a/packages/react/src/hooks/useIsMobile.ts+++ b/packages/react/src/hooks/useIsMobile.ts@@ -2,22 +2,4 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { useEffect, useState } from "react";--const MOBILE_BREAKPOINT = 768;--export default function useIsMobile() {- const [isMobile, setIsMobile] = useState<boolean | undefined>(undefined);-- useEffect(() => {- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);- const onChange = () => {- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);- };- mql.addEventListener("change", onChange);- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);- return () => mql.removeEventListener("change", onChange);- }, []);-- return !!isMobile;-}+export { useIsMobile as default } from "../Compact";diff --git a/packages/react/src/hooks/useLocalStorage.ts b/packages/react/src/hooks/useLocalStorage.tsindex 19224c139f..5ce51de702 100644--- a/packages/react/src/hooks/useLocalStorage.ts+++ b/packages/react/src/hooks/useLocalStorage.ts@@ -2,20 +2,21 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { useEffect, useState } from "react";+import { useEffect, useRef, useState } from "react";const useLocalStorage = <T>(key: string,initialValue: T): [T, (value: T | ((prev: T) => T)) => void] => {const [storedValue, setStoredValue] = useState(initialValue);+ const initialValueRef = useRef(initialValue);+ initialValueRef.current = initialValue;useEffect(() => {- // Retrieve from localStorage+ // Retrieve from localStorage. A key with nothing stored falls back to the+ // initial value, so switching keys never carries the previous key's value.const item = window.localStorage.getItem(key);- if (item) {- setStoredValue(JSON.parse(item));- }+ setStoredValue(item ? JSON.parse(item) : initialValueRef.current);}, [key]);const setValue = (value: T | ((prev: T) => T)) => {diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsxindex 22c05dc611..c0a80709ec 100644--- a/packages/react/src/index.tsx+++ b/packages/react/src/index.tsx@@ -19,6 +19,8 @@ import {} from "./Accordion";import ActionBar, { ActionBarButton } from "./ActionBar";import { ActionMenu } from "./ActionMenu";+import type { ActionPresentation } from "./ActionPresentation";+import { ActionPresentationProvider } from "./ActionPresentation";import { Alert, AlertDescription, AlertTitle } from "./Alert";import { AutodeskProvider, AutodeskViewer } from "./AutodeskViewer";import type { AvatarProps } from "./Avatar";@@ -34,10 +36,12 @@ import { BarProgress } from "./BarProgress";import { useBotProtection } from "./BotProtection";import {BottomSheet,+ BottomSheetBack,BottomSheetBody,BottomSheetClose,BottomSheetContent,BottomSheetDescription,+ BottomSheetFooter,BottomSheetHeader,BottomSheetTitle,BottomSheetTrigger@@ -87,6 +91,7 @@ import {CommandTrigger,multiSelectTriggerVariants} from "./Command";+import { CompactProvider, useCompact } from "./Compact";import {ContextMenu,ContextMenuCheckboxItem,@@ -148,7 +153,11 @@ import {DropdownMenuSubTrigger,DropdownMenuTrigger} from "./Dropdown";-import { Enumerable } from "./Enumerable";+import {+ Enumerable,+ EnumerableAsText,+ useEnumerableAsText+} from "./Enumerable";import { File } from "./File";import {FormControl,@@ -381,12 +390,15 @@ export {AccordionContent,AccordionItem,AccordionTrigger,+ ActionPresentationProvider,BarProgress,BottomSheet,+ BottomSheetBack,BottomSheetBody,BottomSheetClose,BottomSheetContent,BottomSheetDescription,+ BottomSheetFooter,BottomSheetHeader,BottomSheetTitle,BottomSheetTrigger,@@ -404,6 +416,8 @@ export {AvatarOverflowIndicator,Badge,Enumerable,+ EnumerableAsText,+ useEnumerableAsText,BadgeCloseButton,Button,Card,@@ -426,6 +440,7 @@ export {CollapsibleContent,CollapsibleTrigger,Combobox,+ CompactProvider,filterComboboxOptions,Command,CommandDialog,@@ -685,12 +700,14 @@ export {shortcutKeyVariants,toast,useBotProtection,+ useCompact,useModalCardType,useModalDrawerType,useOperatingSystem,useSidebar};export type {+ ActionPresentation,AvatarProps,BadgeProps,ButtonProps,diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.tsindex b56d2d8763..f0016d8386 100644--- a/packages/utils/src/index.ts+++ b/packages/utils/src/index.ts@@ -66,3 +66,4 @@ export * from "./themes";export * from "./tiptap";export * from "./types";export * from "./url";+export * from "./viewport";diff --git a/packages/utils/src/viewport.test.ts b/packages/utils/src/viewport.test.tsnew file mode 100644index 0000000000..f55c8b7be6--- /dev/null+++ b/packages/utils/src/viewport.test.ts@@ -0,0 +1,64 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { describe, expect, it } from "vitest";+import {+ COMPACT_HINT_COOKIE,+ compactHintCookie,+ getCompactHint+} from "./viewport";++const IPHONE_UA =+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1";+const MAC_CHROME_UA =+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36";++function request(headers: Record<string, string>) {+ return new Request("https://erp.example.com/x", { headers });+}++describe("getCompactHint", () => {+ it("is compact when the cookie says 1", () => {+ expect(+ getCompactHint(+ request({+ cookie: `${COMPACT_HINT_COOKIE}=1`,+ "user-agent": MAC_CHROME_UA+ })+ )+ ).toBe(true);+ });++ it("is not compact when the cookie says 0", () => {+ expect(+ getCompactHint(+ request({ cookie: `${COMPACT_HINT_COOKIE}=0`, "user-agent": IPHONE_UA })+ )+ ).toBe(false);+ });++ it("falls back to the Mobi token for a phone without the cookie", () => {+ expect(getCompactHint(request({ "user-agent": IPHONE_UA }))).toBe(true);+ });++ it("falls back to desktop for a desktop browser without the cookie", () => {+ expect(getCompactHint(request({ "user-agent": MAC_CHROME_UA }))).toBe(+ false+ );+ });+});++describe("compactHintCookie", () => {+ it("writes the value getCompactHint reads back", () => {+ for (const isCompact of [true, false]) {+ const [cookie = ""] = compactHintCookie(isCompact).split(";");+ expect(getCompactHint(request({ cookie }))).toBe(isCompact);+ }+ });++ it("lasts a year on every path", () => {+ expect(compactHintCookie(true)).toContain("Max-Age=31536000");+ expect(compactHintCookie(true)).toContain("Path=/");+ });+});diff --git a/packages/utils/src/viewport.ts b/packages/utils/src/viewport.tsnew file mode 100644index 0000000000..f83efd6e01--- /dev/null+++ b/packages/utils/src/viewport.ts@@ -0,0 +1,39 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import * as cookie from "cookie";++/**+ * Whether the browser's viewport was compact (below the `md` breakpoint) when+ * it last reported. Written by `CompactProvider` so the server renders the+ * phone layout on the first paint instead of swapping after hydration.+ */+export const COMPACT_HINT_COOKIE = "compact";++/** Compact means below Tailwind `md` (48rem), the same query theme.css uses. */+export const COMPACT_QUERY = "(width < 48rem)";++const COMPACT_HINT_MAX_AGE = 31536000;++/** Server: the compact hint from the cookie, else the UA "Mobi" token. */+export function getCompactHint(request: Request): boolean {+ const cookieHeader = request.headers.get("cookie");+ const cookies = cookieHeader ? cookie.parse(cookieHeader) : {};+ const hint = cookies[COMPACT_HINT_COOKIE];+ if (hint === "1") return true;+ if (hint === "0") return false;+ return /Mobi/i.test(request.headers.get("user-agent") ?? "");+}++/**+ * Client: the `document.cookie` string that records whether the viewport is+ * compact, read by `getCompactHint` on the next request.+ */+export function compactHintCookie(isCompact: boolean): string {+ return cookie.serialize(COMPACT_HINT_COOKIE, isCompact ? "1" : "0", {+ maxAge: COMPACT_HINT_MAX_AGE,+ sameSite: "lax",+ path: "/"+ });+}