diff --git a/src/backend/data/data.service.ts b/src/backend/data/data.service.ts index 53f5a5e9..8853489c 100644 --- a/src/backend/data/data.service.ts +++ b/src/backend/data/data.service.ts @@ -138,6 +138,7 @@ export class DataApiService implements IDataApiService { ], }) ); + if (!data) { throw new NotFoundError( `Entity '${entity}' with '${columnField}' '${id}' does not exist` diff --git a/src/components/app/button/soft.tsx b/src/components/app/button/soft.tsx index feae1d4a..ec5ff110 100644 --- a/src/components/app/button/soft.tsx +++ b/src/components/app/button/soft.tsx @@ -79,7 +79,9 @@ export function SoftButton({ ); return size === "icon" ? ( - {buttonElement} + + {buttonElement} + ) : ( buttonElement ); diff --git a/src/components/app/form/input/date.tsx b/src/components/app/form/input/date.tsx index 17771cd4..7daabbbd 100644 --- a/src/components/app/form/input/date.tsx +++ b/src/components/app/form/input/date.tsx @@ -118,6 +118,7 @@ export function ControlledFormDateInput({ export function FormDateInput(formInput: IFormDateInput) { const { input, disabled, meta, minDate, maxDate } = formInput; let { value } = input; + if (value && typeof value === "string") { value = new Date(value); input.onChange(value); diff --git a/src/components/app/form/input/label-and-error.tsx b/src/components/app/form/input/label-and-error.tsx index cd690095..2d8a62e0 100644 --- a/src/components/app/form/input/label-and-error.tsx +++ b/src/components/app/form/input/label-and-error.tsx @@ -38,7 +38,7 @@ export function LabelAndError({ formInput, children }: IProps) { > )} {description ? ( - + ) : null} diff --git a/src/components/app/off-canvas.tsx b/src/components/app/off-canvas.tsx index cb39cbf8..8f837e14 100644 --- a/src/components/app/off-canvas.tsx +++ b/src/components/app/off-canvas.tsx @@ -5,6 +5,7 @@ import { Sheet, SheetContent, SheetHeader, SheetTitle } from "../ui/sheet"; import { cn } from "@/lib/utils"; import { Separator } from "../ui/separator"; import { NextPortal } from "./next-portal"; +import { ScrollArea } from "../ui/scroll-area"; export interface IProps { show: boolean; @@ -35,7 +36,7 @@ export function OffCanvas({ show, onClose, title, children, size }: IProps) { {_(title)} - {children} + {children} diff --git a/src/components/app/section-box/index.tsx b/src/components/app/section-box/index.tsx index f25e8fac..3b6970b5 100644 --- a/src/components/app/section-box/index.tsx +++ b/src/components/app/section-box/index.tsx @@ -49,7 +49,7 @@ export function SectionBox({ {_(title)} )} {description ? ( - + ) : null} diff --git a/src/components/app/system-icons.tsx b/src/components/app/system-icons.tsx index 03a5b2fe..68da241e 100644 --- a/src/components/app/system-icons.tsx +++ b/src/components/app/system-icons.tsx @@ -9,24 +9,27 @@ interface IProps { className: string; } -export function SystemIcon({ icon, label, strokeWidth, className }: IProps) { - if (!icon) { - return null; - } +export const SystemIcon = forwardRef( + ({ icon, label, strokeWidth, className }, ref) => { + if (!icon) { + return null; + } - if (icon === "none") { - return null; - } + if (icon === "none") { + return null; + } - const iconSvg = systemIconToSVG(icon, strokeWidth); - return ( - - ); -} + const iconSvg = systemIconToSVG(icon, strokeWidth); + return ( + + ); + } +); export const GrabIcon = forwardRef< SVGSVGElement, diff --git a/src/components/app/table/_Pagination.tsx b/src/components/app/table/_Pagination.tsx index 4c5937cc..820f2e9a 100644 --- a/src/components/app/table/_Pagination.tsx +++ b/src/components/app/table/_Pagination.tsx @@ -50,8 +50,7 @@ export function TablePagination({ onChange={(value) => setPageSize(Number(value))} value={`${pageSize}`} />{" "} - entries of {Intl.NumberFormat("en-US").format(totalRecords)}{" "} - results + of {Intl.NumberFormat("en-US").format(totalRecords)} results @@ -67,6 +66,8 @@ export function TablePagination({ breakLinkClassName={className} pageLinkClassName={className} nextLinkClassName={className} + breakClassName="hidden md:inline-block" + pageClassName="hidden md:inline-block" previousLinkClassName={className} disabledLinkClassName="opacity-70 cursor-not-allowed" containerClassName="flex flex-row items-center gap-1" diff --git a/src/components/app/table/filters/Date/_Selection.tsx b/src/components/app/table/filters/Date/_Selection.tsx index ae62ba13..f76f3223 100644 --- a/src/components/app/table/filters/Date/_Selection.tsx +++ b/src/components/app/table/filters/Date/_Selection.tsx @@ -54,7 +54,7 @@ export function DateSelection({ const currentFilterValue = filterValue?.[field] || ""; const hasCountValue = currentFilterValue?.includes(":"); return ( - <> + {hasCountValue && ( - > + ); } diff --git a/src/components/app/table/index.tsx b/src/components/app/table/index.tsx index f937441f..a2be9f4e 100644 --- a/src/components/app/table/index.tsx +++ b/src/components/app/table/index.tsx @@ -18,6 +18,7 @@ import { cn } from "@/lib/utils"; import { Table as TableRoot } from "@/components/ui/table"; import { Skeleton } from "@/components/ui/skeleton"; import { TableSkeleton } from "../skeleton/table"; +import { ScrollArea } from "@/components/ui/scroll-area"; export { DEFAULT_TABLE_STATE }; @@ -94,8 +95,9 @@ export function Table({ return ( - 0 && !lean, })} > @@ -115,7 +117,7 @@ export function Table({ {previousDataRender} - + {!lean && ( - - {contents.map(({ label, id, muted }) => ( - - {_(label)} - - ))} - + + + {contents.map(({ label, id, muted }) => ( + + {_(label)} + + ))} + + {contents.map(({ id, content }) => ( {content} diff --git a/src/components/app/tooltip/index.tsx b/src/components/app/tooltip/index.tsx index 25b3984e..57dc12ae 100644 --- a/src/components/app/tooltip/index.tsx +++ b/src/components/app/tooltip/index.tsx @@ -9,9 +9,10 @@ import { export interface IProps { children: ReactNode; text: string; + isOverAButton: boolean; } -export function Tooltip({ children, text }: IProps) { +export function Tooltip({ children, text, isOverAButton }: IProps) { if (!text) { // eslint-disable-next-line react/jsx-no-useless-fragment return <>{children}>; @@ -19,7 +20,7 @@ export function Tooltip({ children, text }: IProps) { return ( - {children} + {children} , - React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( + React.ComponentPropsWithoutRef & { + orientation?: "horizontal"; + } +>(({ className, children, orientation, ...props }, ref) => ( {children} - + )); diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx index edb34578..8a72b40c 100644 --- a/src/components/ui/tabs.tsx +++ b/src/components/ui/tabs.tsx @@ -11,7 +11,7 @@ const TabsList = React.forwardRef< - + {isFullWidth ? ( - + )} - key === currentConfigItem - )} - onSubmit={async (values: { key: string; value: string }) => { - await upsertConfigurationMutation.mutateAsync(values); - closeConfigItem(); - }} - /> + + key === currentConfigItem + )} + onSubmit={async (values: { key: string; value: string }) => { + await upsertConfigurationMutation.mutateAsync(values); + closeConfigItem(); + }} + /> + diff --git a/tailwind.config.js b/tailwind.config.js index 8abe8a1a..12f7aca0 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -14,7 +14,6 @@ module.exports = { }, extend: { colors: { - // foreground: "hsl(var(--foreground))", soft: "hsl(var(--dp-soft))", muted: "hsl(var(--dp-muted))", main: "hsl(var(--dp-main))", @@ -29,11 +28,7 @@ module.exports = { "alpha-text": "hsl(var(--dp-primary-alpha-text))", "shade-thick": "hsla(var(--dp-primary), 0.85)", "shade-thick-xl": "hsla(var(--dp-primary), 0.9)", - "shade-thick-xxl": "hsla(var(--dp-primary), 0.95)", }, - // destructive: { - // DEFAULT: "hsl(var(--destructive))", - // }, }, borderRadius: { lg: `var(--radius)`,
{_(title)}