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