Compare commits
No commits in common. "ef4f41493a41b8b389d5cc71d93a4df272c2f39e" and "91988a26b9cbb8f8f8f33eab3b11609508003e4c" have entirely different histories.
ef4f41493a
...
91988a26b9
@ -31,7 +31,7 @@
|
|||||||
"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
||||||
monospace;
|
monospace;
|
||||||
--color-shell-exterior: #000;
|
--color-shell-exterior: #000;
|
||||||
--color-shell-content: var(--color-background);
|
--color-shell-content: #f7f9fb;
|
||||||
--color-shell-header: #fff;
|
--color-shell-header: #fff;
|
||||||
--color-shell-sidebar: #0e282c;
|
--color-shell-sidebar: #0e282c;
|
||||||
--color-shell-sidebar-top: #0c252a;
|
--color-shell-sidebar-top: #0c252a;
|
||||||
|
|||||||
@ -285,13 +285,3 @@ contrae el menú y conservan la selección y las ayudas del botón de navegació
|
|||||||
Componentes de @repo/rdx-ui independientes de los DTO, consultas y endpoints de Metis Desk. FieldSections recibe secciones, elementos con sectionId opcional y renderItem; presenta una cuadrícula plana cuando no hay secciones, o bloques desplegables accesibles con descripción y «Sin sección». Admite presentación de valores como listas de descripción y apertura ante errores externos.
|
Componentes de @repo/rdx-ui independientes de los DTO, consultas y endpoints de Metis Desk. FieldSections recibe secciones, elementos con sectionId opcional y renderItem; presenta una cuadrícula plana cuando no hay secciones, o bloques desplegables accesibles con descripción y «Sin sección». Admite presentación de valores como listas de descripción y apertura ante errores externos.
|
||||||
|
|
||||||
TemplateSectionsEditor recibe secciones, referencias de campos, nombres, textos traducidos, generador de identidad y onChange. Permite ordenar secciones/campos, editar nombre/descripción, asignar campos y mantener su obligatoriedad mediante SwitchField. El módulo consumidor conserva el estado en React Hook Form y genera UUID v7. Los helpers removeTemplateSection y copyTemplateLayout conservan referencias y remapean identidades respectivamente. No se modifican los componentes vendor.
|
TemplateSectionsEditor recibe secciones, referencias de campos, nombres, textos traducidos, generador de identidad y onChange. Permite ordenar secciones/campos, editar nombre/descripción, asignar campos y mantener su obligatoriedad mediante SwitchField. El módulo consumidor conserva el estado en React Hook Form y genera UUID v7. Los helpers removeTemplateSection y copyTemplateLayout conservan referencias y remapean identidades respectivamente. No se modifican los componentes vendor.
|
||||||
|
|
||||||
## Formularios modales adaptativos
|
|
||||||
|
|
||||||
`FormDialog` admite `size="small" | "medium" | "large"`. Los formularios sencillos mantienen el tamaño pequeño; personas y usuarios emplean el intermedio. `wide` sigue siendo un alias del tamaño grande: 90 % del ancho disponible, con máximo de 1.200 px y márgenes en móvil. No se ensanchan automáticamente las altas sencillas.
|
|
||||||
|
|
||||||
La cabecera permanece visible. Un formulario modal utiliza una raíz flex con altura mínima cero, `FormBody` para campos, errores y ayuda, y `FormActions` como hermano final fuera del cuerpo desplazable. Los botones permanecen dentro del formulario HTML original: se conservan envío por teclado, validación nativa, estados pendientes y cancelación. La ayuda queda al final del cuerpo, inmediatamente antes de las acciones. Los diálogos de consulta conservan el cuerpo desplazable y su pie externo.
|
|
||||||
|
|
||||||
`FormSection` agrupa datos relacionados mediante título accesible y un borde discreto. Activos, recursos y plantillas lo utilizan para sus datos principales. Las características y las secciones del editor se distribuyen en dos bloques por fila cuando el contenedor dispone de al menos 900 px; los controles dentro de cada bloque mantienen una o dos columnas según el espacio. Una plantilla sin secciones puede aprovechar hasta tres columnas de características. Observaciones y ayuda ocupan toda la fila. La disposición responde al espacio del modal, no solo al ancho del navegador.
|
|
||||||
|
|
||||||
El desplazamiento vertical se conserva cuando el contenido supera la altura disponible; no se ocultan campos ni se reduce artificialmente su tamaño para eliminarlo. No se introducen pestañas ni páginas nuevas sin una necesidad específica del formulario.
|
|
||||||
|
|||||||
@ -299,9 +299,5 @@
|
|||||||
"assign": "Section",
|
"assign": "Section",
|
||||||
"help": "Organize fields without changing their values or requirements. Removing a section moves its fields to Unsectioned.",
|
"help": "Organize fields without changing their values or requirements. Removing a section moves its fields to Unsectioned.",
|
||||||
"empty": "This section has no fields yet."
|
"empty": "This section has no fields yet."
|
||||||
},
|
|
||||||
"formLayout": {
|
|
||||||
"identity": "Identification and assignment",
|
|
||||||
"template": "Template details"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -299,9 +299,5 @@
|
|||||||
"assign": "Sección",
|
"assign": "Sección",
|
||||||
"help": "Organiza los campos sin cambiar sus valores ni su obligatoriedad. Al eliminar una sección, sus campos pasan a «Sin sección».",
|
"help": "Organiza los campos sin cambiar sus valores ni su obligatoriedad. Al eliminar una sección, sus campos pasan a «Sin sección».",
|
||||||
"empty": "Esta sección aún no tiene campos."
|
"empty": "Esta sección aún no tiene campos."
|
||||||
},
|
|
||||||
"formLayout": {
|
|
||||||
"identity": "Identificación y asignación",
|
|
||||||
"template": "Datos de la plantilla"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody, FormDialog } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions, FormDialog } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
@ -22,13 +22,11 @@ export function EndRelationshipDialog(props: EndRelationshipDialogProps) {
|
|||||||
open
|
open
|
||||||
title={t("endRelationship")}
|
title={t("endRelationship")}
|
||||||
>
|
>
|
||||||
<FormBody>
|
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
{relationship.values.name} · {sourceName} → {targetName}
|
{relationship.values.name} · {sourceName} → {targetName}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm text-muted-foreground">{t("endRelationshipConfirm")}</p>
|
<p className="text-sm text-muted-foreground">{t("endRelationshipConfirm")}</p>
|
||||||
<InventoryFeedback error={mutation.error} />
|
<InventoryFeedback error={mutation.error} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button
|
<Button
|
||||||
disabled={mutation.isPending}
|
disabled={mutation.isPending}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Label } from "@repo/shadcn-ui/components/label";
|
import { Label } from "@repo/shadcn-ui/components/label";
|
||||||
@ -34,8 +34,7 @@ export function RelationshipForm(props: RelationshipFormProps) {
|
|||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-type`}>{t("relationshipType")}</Label>
|
<Label htmlFor={`${id}-type`}>{t("relationshipType")}</Label>
|
||||||
<SelectWithAction
|
<SelectWithAction
|
||||||
@ -44,10 +43,7 @@ export function RelationshipForm(props: RelationshipFormProps) {
|
|||||||
id={`${id}-type`}
|
id={`${id}-type`}
|
||||||
label={t("relationshipType")}
|
label={t("relationshipType")}
|
||||||
onValueChange={setTypeId}
|
onValueChange={setTypeId}
|
||||||
options={relationshipTypes.map((item) => ({
|
options={relationshipTypes.map((item) => ({ value: item.id, label: item.values.name }))}
|
||||||
value: item.id,
|
|
||||||
label: item.values.name,
|
|
||||||
}))}
|
|
||||||
placeholder={t("chooseRelation")}
|
placeholder={t("chooseRelation")}
|
||||||
required
|
required
|
||||||
value={typeId}
|
value={typeId}
|
||||||
@ -83,7 +79,6 @@ export function RelationshipForm(props: RelationshipFormProps) {
|
|||||||
guidance={t("relationshipGuidance")}
|
guidance={t("relationshipGuidance")}
|
||||||
title={t("helpTitle")}
|
title={t("helpTitle")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={!(typeId && targetId) || mutation.isPending} type="submit">
|
<Button disabled={!(typeId && targetId) || mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FieldSections } from "@repo/rdx-ui/components/field-sections";
|
import { FieldSections } from "@repo/rdx-ui/components/field-sections";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { FormSection } from "@repo/rdx-ui/components/form-section";
|
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -44,10 +43,8 @@ export function AssetForm(props: AssetFormProps) {
|
|||||||
const selectProps = { disabled: mutation.isPending, placeholder: t("noAssignment") };
|
const selectProps = { disabled: mutation.isPending, placeholder: t("noAssignment") };
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-5" disabled={mutation.isPending}>
|
<fieldset className="space-y-5" disabled={mutation.isPending}>
|
||||||
<FormSection title={t("formLayout.identity")}>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
||||||
<Input id={`${prefix}-name`} maxLength={100} required {...form.register("name")} />
|
<Input id={`${prefix}-name`} maxLength={100} required {...form.register("name")} />
|
||||||
@ -67,12 +64,7 @@ export function AssetForm(props: AssetFormProps) {
|
|||||||
onValueChange={selectTemplate}
|
onValueChange={selectTemplate}
|
||||||
options={
|
options={
|
||||||
asset
|
asset
|
||||||
? [
|
? [{ value: asset.values.templateId, label: asset.specification.templateName }]
|
||||||
{
|
|
||||||
value: asset.values.templateId,
|
|
||||||
label: asset.specification.templateName,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
: templates.map((item) => ({ value: item.id, label: item.values.name }))
|
: templates.map((item) => ({ value: item.id, label: item.values.name }))
|
||||||
}
|
}
|
||||||
placeholder={t("chooseValue")}
|
placeholder={t("chooseValue")}
|
||||||
@ -138,7 +130,6 @@ export function AssetForm(props: AssetFormProps) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
|
||||||
{fields.length > 0 && (
|
{fields.length > 0 && (
|
||||||
<section className="space-y-3">
|
<section className="space-y-3">
|
||||||
<h3 className="font-medium">{t("characteristics")}</h3>
|
<h3 className="font-medium">{t("characteristics")}</h3>
|
||||||
@ -206,7 +197,6 @@ export function AssetForm(props: AssetFormProps) {
|
|||||||
scopeNote={t("assetScope")}
|
scopeNote={t("assetScope")}
|
||||||
title={t("helpTitle")}
|
title={t("helpTitle")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -29,8 +29,7 @@ export function BrandForm(props: BrandFormProps) {
|
|||||||
const { t } = useTranslation("assets");
|
const { t } = useTranslation("assets");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending || isReadingLogo}>
|
<fieldset className="space-y-4" disabled={mutation.isPending || isReadingLogo}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={id}>{t("name")}</Label>
|
<Label htmlFor={id}>{t("name")}</Label>
|
||||||
@ -78,7 +77,6 @@ export function BrandForm(props: BrandFormProps) {
|
|||||||
scopeNote={t("globalHelp")}
|
scopeNote={t("globalHelp")}
|
||||||
title={t("helpTitle")}
|
title={t("helpTitle")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending || isReadingLogo} type="submit">
|
<Button disabled={mutation.isPending || isReadingLogo} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -19,8 +19,7 @@ export function CatalogFieldForm(props: CatalogFieldFormProps) {
|
|||||||
const { t } = useTranslation("assets");
|
const { t } = useTranslation("assets");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
||||||
<Input id={`${id}-name`} maxLength={100} required {...form.register("name")} />
|
<Input id={`${id}-name`} maxLength={100} required {...form.register("name")} />
|
||||||
@ -68,7 +67,6 @@ export function CatalogFieldForm(props: CatalogFieldFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<CatalogHelp kind="field" scope={scope} />
|
<CatalogHelp kind="field" scope={scope} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -18,8 +18,7 @@ export function CatalogRelationForm(props: CatalogRelationFormProps) {
|
|||||||
const { t } = useTranslation("assets");
|
const { t } = useTranslation("assets");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={id}>{t("name")}</Label>
|
<Label htmlFor={id}>{t("name")}</Label>
|
||||||
<Input
|
<Input
|
||||||
@ -50,12 +49,7 @@ export function CatalogRelationForm(props: CatalogRelationFormProps) {
|
|||||||
{!symmetric && (
|
{!symmetric && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-inverse`}>{t("inverseName")}</Label>
|
<Label htmlFor={`${id}-inverse`}>{t("inverseName")}</Label>
|
||||||
<Input
|
<Input id={`${id}-inverse`} maxLength={100} required {...form.register("inverseName")} />
|
||||||
id={`${id}-inverse`}
|
|
||||||
maxLength={100}
|
|
||||||
required
|
|
||||||
{...form.register("inverseName")}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
@ -67,7 +61,6 @@ export function CatalogRelationForm(props: CatalogRelationFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<CatalogHelp kind="relation" scope={scope} />
|
<CatalogHelp kind="relation" scope={scope} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { UniqueID } from "@repo/rdx-ddd";
|
import { UniqueID } from "@repo/rdx-ddd";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { FormSection } from "@repo/rdx-ui/components/form-section";
|
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { TemplateSectionsEditor } from "@repo/rdx-ui/components/template-sections-editor";
|
import { TemplateSectionsEditor } from "@repo/rdx-ui/components/template-sections-editor";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -24,9 +23,7 @@ export function CatalogTemplateForm(props: CatalogTemplateFormProps) {
|
|||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<FormSection title={t("formLayout.template")}>
|
|
||||||
<div className="grid gap-4 sm:grid-cols-2">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
||||||
@ -42,7 +39,6 @@ export function CatalogTemplateForm(props: CatalogTemplateFormProps) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-field`}>{t("selectField")}</Label>
|
<Label htmlFor={`${id}-field`}>{t("selectField")}</Label>
|
||||||
<SelectWithAction
|
<SelectWithAction
|
||||||
@ -107,7 +103,6 @@ export function CatalogTemplateForm(props: CatalogTemplateFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<CatalogHelp kind="template" scope={scope} />
|
<CatalogHelp kind="template" scope={scope} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -21,8 +21,7 @@ export function SupportForm(props: SupportFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={prefix}>{t("support.tool")}</Label>
|
<Label htmlFor={prefix}>{t("support.tool")}</Label>
|
||||||
@ -40,11 +39,7 @@ export function SupportForm(props: SupportFormProps) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-destination`}>{t("support.destination")}</Label>
|
<Label htmlFor={`${prefix}-destination`}>{t("support.destination")}</Label>
|
||||||
<Input
|
<Input id={`${prefix}-destination`} maxLength={300} {...form.register("destination")} />
|
||||||
id={`${prefix}-destination`}
|
|
||||||
maxLength={300}
|
|
||||||
{...form.register("destination")}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-state`}>{t("support.state")}</Label>
|
<Label htmlFor={`${prefix}-state`}>{t("support.state")}</Label>
|
||||||
@ -95,7 +90,6 @@ export function SupportForm(props: SupportFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<SupportHelp />
|
<SupportHelp />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -17,8 +17,7 @@ export function SupportToolForm(props: SupportToolFormProps) {
|
|||||||
const { t } = useTranslation("assets");
|
const { t } = useTranslation("assets");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={id}>{t("support.toolName")}</Label>
|
<Label htmlFor={id}>{t("support.toolName")}</Label>
|
||||||
@ -42,7 +41,6 @@ export function SupportToolForm(props: SupportToolFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<SupportHelp tool />
|
<SupportHelp tool />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -36,8 +36,7 @@ export function WorkstationForm(props: WorkstationFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={prefix}>{t("name")}</Label>
|
<Label htmlFor={prefix}>{t("name")}</Label>
|
||||||
@ -174,7 +173,6 @@ export function WorkstationForm(props: WorkstationFormProps) {
|
|||||||
scopeNote={t("workstationScope")}
|
scopeNote={t("workstationScope")}
|
||||||
title={t("helpTitle")}
|
title={t("helpTitle")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button
|
<Button
|
||||||
disabled={
|
disabled={
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody, FormDialog } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions, FormDialog } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
import { Label } from "@repo/shadcn-ui/components/label";
|
import { Label } from "@repo/shadcn-ui/components/label";
|
||||||
@ -23,8 +23,7 @@ export function QuickCreateDialog(props: QuickCreateDialogProps) {
|
|||||||
open
|
open
|
||||||
title={t(target.kind === "system" ? "quickAddSystem" : "quickAddEnvironment")}
|
title={t(target.kind === "system" ? "quickAddSystem" : "quickAddEnvironment")}
|
||||||
>
|
>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
{target.kind === "environment" && (
|
{target.kind === "environment" && (
|
||||||
<p className="text-sm text-muted-foreground">
|
<p className="text-sm text-muted-foreground">
|
||||||
{t("quickEnvironmentContext", { name: target.systemName })}
|
{t("quickEnvironmentContext", { name: target.systemName })}
|
||||||
@ -66,7 +65,6 @@ export function QuickCreateDialog(props: QuickCreateDialogProps) {
|
|||||||
)}
|
)}
|
||||||
<p className="text-sm text-muted-foreground">{t("quickCreateNotice")}</p>
|
<p className="text-sm text-muted-foreground">{t("quickCreateNotice")}</p>
|
||||||
<EntityHelp kind={target.kind} scope={scope} />
|
<EntityHelp kind={target.kind} scope={scope} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "quickSaveSelect")}
|
{t(mutation.isPending ? "saving" : "quickSaveSelect")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import type { ComponentType } from "react";
|
import type { ComponentType } from "react";
|
||||||
import { useId } from "react";
|
import { useId } from "react";
|
||||||
@ -37,8 +37,7 @@ export function AccessFormFields(
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<div className="grid gap-4 sm:grid-cols-2">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
{editableFields.map((field) => (
|
{editableFields.map((field) => (
|
||||||
<div
|
<div
|
||||||
@ -84,7 +83,6 @@ export function AccessFormFields(
|
|||||||
<p className="text-sm text-muted-foreground">{t("configurationHelp")}</p>
|
<p className="text-sm text-muted-foreground">{t("configurationHelp")}</p>
|
||||||
)}
|
)}
|
||||||
<EntityHelp kind={kind} scope={scope} />
|
<EntityHelp kind={kind} scope={scope} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -45,8 +45,7 @@ export function ApplicationConfigurationForm(props: ApplicationConfigurationForm
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="grid gap-4 sm:grid-cols-2">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
@ -161,7 +160,6 @@ export function ApplicationConfigurationForm(props: ApplicationConfigurationForm
|
|||||||
scopeNote={t("applications.scope")}
|
scopeNote={t("applications.scope")}
|
||||||
title={t("applications.help")}
|
title={t("applications.help")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={!ready || mutation.isPending} type="submit">
|
<Button disabled={!ready || mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -21,8 +21,7 @@ export function AssignmentForm(props: AssignmentFormProps) {
|
|||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-department`}>{t("department")}</Label>
|
<Label htmlFor={`${id}-department`}>{t("department")}</Label>
|
||||||
<SelectWithAction
|
<SelectWithAction
|
||||||
@ -76,9 +75,7 @@ export function AssignmentForm(props: AssignmentFormProps) {
|
|||||||
disabled={!!form.watch("endDate")}
|
disabled={!!form.watch("endDate")}
|
||||||
id={`${id}-primary`}
|
id={`${id}-primary`}
|
||||||
label={t("primaryDepartment")}
|
label={t("primaryDepartment")}
|
||||||
onCheckedChange={(checked) =>
|
onCheckedChange={(checked) => form.setValue("isPrimary", checked, { shouldDirty: true })}
|
||||||
form.setValue("isPrimary", checked, { shouldDirty: true })
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<p className="text-xs text-muted-foreground">{t("assignmentHelp")}</p>
|
<p className="text-xs text-muted-foreground">{t("assignmentHelp")}</p>
|
||||||
<CompanyFeedback
|
<CompanyFeedback
|
||||||
@ -87,7 +84,6 @@ export function AssignmentForm(props: AssignmentFormProps) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<EntityHelp kind="assignment" />
|
<EntityHelp kind="assignment" />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -44,8 +44,7 @@ export function CertificateConfigurationForm(props: CertificateConfigurationForm
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="grid gap-4 sm:grid-cols-2">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
@ -143,7 +142,6 @@ export function CertificateConfigurationForm(props: CertificateConfigurationForm
|
|||||||
scopeNote={t("certificates.scope")}
|
scopeNote={t("certificates.scope")}
|
||||||
title={t("certificates.help")}
|
title={t("certificates.help")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={!ready || mutation.isPending} type="submit">
|
<Button disabled={!ready || mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -20,8 +20,7 @@ export function CompanyForm(props: CompanyFormProps) {
|
|||||||
const { t } = useTranslation("companies");
|
const { t } = useTranslation("companies");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
{showTitle && (
|
{showTitle && (
|
||||||
<h2 className="text-lg font-semibold">{t(company ? "editCompany" : "newCompany")}</h2>
|
<h2 className="text-lg font-semibold">{t(company ? "editCompany" : "newCompany")}</h2>
|
||||||
)}
|
)}
|
||||||
@ -55,7 +54,6 @@ export function CompanyForm(props: CompanyFormProps) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<EntityHelp kind="company" />
|
<EntityHelp kind="company" />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -17,8 +17,7 @@ export function DepartmentForm(props: DepartmentFormProps) {
|
|||||||
const { t } = useTranslation("companies");
|
const { t } = useTranslation("companies");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={id}>{t("name")}</Label>
|
<Label htmlFor={id}>{t("name")}</Label>
|
||||||
<Input id={id} maxLength={100} required {...form.register("name")} />
|
<Input id={id} maxLength={100} required {...form.register("name")} />
|
||||||
@ -39,7 +38,6 @@ export function DepartmentForm(props: DepartmentFormProps) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<EntityHelp kind="department" />
|
<EntityHelp kind="department" />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -40,8 +40,7 @@ export function FolderMappingForm(props: FolderMappingFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<FolderMappingTargets
|
<FolderMappingTargets
|
||||||
company={company}
|
company={company}
|
||||||
@ -128,7 +127,6 @@ export function FolderMappingForm(props: FolderMappingFormProps) {
|
|||||||
scopeNote={t("folders.scope")}
|
scopeNote={t("folders.scope")}
|
||||||
title={t("folders.help")}
|
title={t("folders.help")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending || !ready} type="submit">
|
<Button disabled={mutation.isPending || !ready} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -20,17 +20,14 @@ export function InterventionTemplateForm(props: InterventionTemplateFormProps) {
|
|||||||
const { t } = useTranslation("companies");
|
const { t } = useTranslation("companies");
|
||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
||||||
<Input id={`${prefix}-name`} maxLength={160} required {...form.register("name")} />
|
<Input id={`${prefix}-name`} maxLength={160} required {...form.register("name")} />
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-description`}>
|
<Label htmlFor={`${prefix}-description`}>{t("interventionTemplates.description")}</Label>
|
||||||
{t("interventionTemplates.description")}
|
|
||||||
</Label>
|
|
||||||
<Textarea
|
<Textarea
|
||||||
id={`${prefix}-description`}
|
id={`${prefix}-description`}
|
||||||
maxLength={4000}
|
maxLength={4000}
|
||||||
@ -70,7 +67,6 @@ export function InterventionTemplateForm(props: InterventionTemplateFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<InterventionTemplateHelp />
|
<InterventionTemplateHelp />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -52,8 +52,7 @@ export function InterventionForm(props: InterventionFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<InterventionCompanyField
|
<InterventionCompanyField
|
||||||
companies={data.companies}
|
companies={data.companies}
|
||||||
@ -150,7 +149,6 @@ export function InterventionForm(props: InterventionFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<InterventionHelp />
|
<InterventionHelp />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button
|
<Button
|
||||||
disabled={mutation.isPending || !companyId || !lookups.data || lookups.isError}
|
disabled={mutation.isPending || !companyId || !lookups.data || lookups.isError}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Label } from "@repo/shadcn-ui/components/label";
|
import { Label } from "@repo/shadcn-ui/components/label";
|
||||||
import { Textarea } from "@repo/shadcn-ui/components/textarea";
|
import { Textarea } from "@repo/shadcn-ui/components/textarea";
|
||||||
@ -44,8 +44,7 @@ export function MailConfigurationForm(props: MailConfigurationFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={disabled}>
|
<fieldset className="space-y-4" disabled={disabled}>
|
||||||
{legacy && (
|
{legacy && (
|
||||||
<p className="rounded-md border p-3 text-sm">
|
<p className="rounded-md border p-3 text-sm">
|
||||||
@ -110,7 +109,6 @@ export function MailConfigurationForm(props: MailConfigurationFormProps) {
|
|||||||
scopeNote={t("mail.scope")}
|
scopeNote={t("mail.scope")}
|
||||||
title={t("mail.help")}
|
title={t("mail.help")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={disabled || !ready} type="submit">
|
<Button disabled={disabled || !ready} type="submit">
|
||||||
{t(disabled ? "saving" : "save")}
|
{t(disabled ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -31,8 +31,7 @@ export function MailboxUseForm(props: MailboxUseFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-mailbox`}>{t("mailbox.titleSingle")}</Label>
|
<Label htmlFor={`${prefix}-mailbox`}>{t("mailbox.titleSingle")}</Label>
|
||||||
@ -108,7 +107,6 @@ export function MailboxUseForm(props: MailboxUseFormProps) {
|
|||||||
guidance={t("mailbox.useGuidance")}
|
guidance={t("mailbox.useGuidance")}
|
||||||
title={t("mailbox.useHelp")}
|
title={t("mailbox.useHelp")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending || !query.data} type="submit">
|
<Button disabled={mutation.isPending || !query.data} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -19,8 +19,8 @@ export function PersonEditorDialog({
|
|||||||
formActions
|
formActions
|
||||||
onOpenChange={onOpenChange}
|
onOpenChange={onOpenChange}
|
||||||
open={open}
|
open={open}
|
||||||
size="medium"
|
|
||||||
title={t(formProps.person ? "editPerson" : "newPerson")}
|
title={t(formProps.person ? "editPerson" : "newPerson")}
|
||||||
|
wide
|
||||||
>
|
>
|
||||||
<PersonForm {...formProps} key={formProps.person?.id ?? "new"} />
|
<PersonForm {...formProps} key={formProps.person?.id ?? "new"} />
|
||||||
</FormDialog>
|
</FormDialog>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -17,8 +17,7 @@ export function PersonForm(props: PersonFormProps) {
|
|||||||
const { t } = useTranslation("companies");
|
const { t } = useTranslation("companies");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="max-w-2xl space-y-6" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<div className="grid gap-4 sm:grid-cols-2">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
||||||
@ -61,7 +60,6 @@ export function PersonForm(props: PersonFormProps) {
|
|||||||
/>
|
/>
|
||||||
<p className="text-sm text-muted-foreground">{t("personHelp")}</p>
|
<p className="text-sm text-muted-foreground">{t("personHelp")}</p>
|
||||||
<EntityHelp kind="person" />
|
<EntityHelp kind="person" />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -47,8 +47,7 @@ export function PrinterConfigurationForm(props: PrinterConfigurationFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="grid gap-4 sm:grid-cols-2">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
@ -100,8 +99,7 @@ export function PrinterConfigurationForm(props: PrinterConfigurationFormProps) {
|
|||||||
id={`${prefix}-connection`}
|
id={`${prefix}-connection`}
|
||||||
label={t("printers.connection")}
|
label={t("printers.connection")}
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
const parsed =
|
const parsed = PrinterConfigurationInputSchema.shape.connection.safeParse(value);
|
||||||
PrinterConfigurationInputSchema.shape.connection.safeParse(value);
|
|
||||||
if (parsed.success) {
|
if (parsed.success) {
|
||||||
form.setValue("connection", parsed.data);
|
form.setValue("connection", parsed.data);
|
||||||
}
|
}
|
||||||
@ -161,7 +159,6 @@ export function PrinterConfigurationForm(props: PrinterConfigurationFormProps) {
|
|||||||
scopeNote={t("printers.scope")}
|
scopeNote={t("printers.scope")}
|
||||||
title={t("printers.help")}
|
title={t("printers.help")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={!ready || mutation.isPending} type="submit">
|
<Button disabled={!ready || mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -18,8 +18,7 @@ export function ProcessTemplateForm(props: ProcessTemplateFormProps) {
|
|||||||
const { t } = useTranslation("companies");
|
const { t } = useTranslation("companies");
|
||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
||||||
@ -63,12 +62,7 @@ export function ProcessTemplateForm(props: ProcessTemplateFormProps) {
|
|||||||
/>
|
/>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-notes`}>{t("mail.notes")}</Label>
|
<Label htmlFor={`${prefix}-notes`}>{t("mail.notes")}</Label>
|
||||||
<Textarea
|
<Textarea id={`${prefix}-notes`} maxLength={4000} rows={3} {...form.register("notes")} />
|
||||||
id={`${prefix}-notes`}
|
|
||||||
maxLength={4000}
|
|
||||||
rows={3}
|
|
||||||
{...form.register("notes")}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<ProcessFeedback
|
<ProcessFeedback
|
||||||
@ -76,7 +70,6 @@ export function ProcessTemplateForm(props: ProcessTemplateFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<ProcessHelp template />
|
<ProcessHelp template />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -20,8 +20,7 @@ export function ProcessStartForm(props: ProcessStartFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
||||||
@ -88,7 +87,6 @@ export function ProcessStartForm(props: ProcessStartFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<ProcessHelp />
|
<ProcessHelp />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button
|
<Button
|
||||||
disabled={
|
disabled={
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -20,8 +20,7 @@ export function ProcessEditForm(props: ProcessEditFormProps) {
|
|||||||
const { t } = useTranslation("companies");
|
const { t } = useTranslation("companies");
|
||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
||||||
@ -48,12 +47,7 @@ export function ProcessEditForm(props: ProcessEditFormProps) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-notes`}>{t("mail.notes")}</Label>
|
<Label htmlFor={`${prefix}-notes`}>{t("mail.notes")}</Label>
|
||||||
<Textarea
|
<Textarea id={`${prefix}-notes`} maxLength={4000} rows={3} {...form.register("notes")} />
|
||||||
id={`${prefix}-notes`}
|
|
||||||
maxLength={4000}
|
|
||||||
rows={3}
|
|
||||||
{...form.register("notes")}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<p className="text-sm text-muted-foreground">{t("processes.resolutionHelp")}</p>
|
<p className="text-sm text-muted-foreground">{t("processes.resolutionHelp")}</p>
|
||||||
{process.values.tasks.map((task, index) => (
|
{process.values.tasks.map((task, index) => (
|
||||||
@ -65,7 +59,6 @@ export function ProcessEditForm(props: ProcessEditFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<ProcessHelp />
|
<ProcessHelp />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -40,8 +40,7 @@ export function RemoteConnectionForm(props: RemoteConnectionFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-person`}>{t("remote.person")}</Label>
|
<Label htmlFor={`${prefix}-person`}>{t("remote.person")}</Label>
|
||||||
@ -136,7 +135,6 @@ export function RemoteConnectionForm(props: RemoteConnectionFormProps) {
|
|||||||
scopeNote={t("remote.scope")}
|
scopeNote={t("remote.scope")}
|
||||||
title={t("remote.help")}
|
title={t("remote.help")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={!ready || mutation.isPending} type="submit">
|
<Button disabled={!ready || mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
import { Label } from "@repo/shadcn-ui/components/label";
|
import { Label } from "@repo/shadcn-ui/components/label";
|
||||||
@ -17,8 +17,7 @@ export function SiteForm(props: SiteFormProps) {
|
|||||||
const { t } = useTranslation("companies");
|
const { t } = useTranslation("companies");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
{showTitle && <h3 className="text-lg font-semibold">{t(site ? "editSite" : "newSite")}</h3>}
|
{showTitle && <h3 className="text-lg font-semibold">{t(site ? "editSite" : "newSite")}</h3>}
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
||||||
@ -42,7 +41,6 @@ export function SiteForm(props: SiteFormProps) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<EntityHelp kind="site" />
|
<EntityHelp kind="site" />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -23,15 +23,12 @@ export function TeleworkAuthorizationForm(props: TeleworkAuthorizationFormProps)
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-person`}>{t("telework.person")}</Label>
|
<Label htmlFor={`${prefix}-person`}>{t("telework.person")}</Label>
|
||||||
<SelectWithAction
|
<SelectWithAction
|
||||||
action={
|
action={fixed ? undefined : { label: t("newPerson"), onClick: () => setQuick(true) }}
|
||||||
fixed ? undefined : { label: t("newPerson"), onClick: () => setQuick(true) }
|
|
||||||
}
|
|
||||||
disabled={fixed}
|
disabled={fixed}
|
||||||
id={`${prefix}-person`}
|
id={`${prefix}-person`}
|
||||||
label={t("telework.person")}
|
label={t("telework.person")}
|
||||||
@ -99,7 +96,6 @@ export function TeleworkAuthorizationForm(props: TeleworkAuthorizationFormProps)
|
|||||||
scopeNote={t("telework.scope")}
|
scopeNote={t("telework.scope")}
|
||||||
title={t("telework.help")}
|
title={t("telework.help")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -38,8 +38,7 @@ export function TicketForm(props: TicketFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
<fieldset className="space-y-4" disabled={mutation.isPending}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={prefix}>{t("tickets.company")}</Label>
|
<Label htmlFor={prefix}>{t("tickets.company")}</Label>
|
||||||
@ -141,7 +140,6 @@ export function TicketForm(props: TicketFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<TicketHelp />
|
<TicketHelp />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending || !companyId || !lookups.data} type="submit">
|
<Button disabled={mutation.isPending || !companyId || !lookups.data} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -35,8 +35,7 @@ export function WorkProfileForm(props: WorkProfileFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-4" disabled={disabled}>
|
<fieldset className="space-y-4" disabled={disabled}>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={prefix}>{t("profiles.name")}</Label>
|
<Label htmlFor={prefix}>{t("profiles.name")}</Label>
|
||||||
@ -120,7 +119,6 @@ export function WorkProfileForm(props: WorkProfileFormProps) {
|
|||||||
scopeNote={t("profiles.scope")}
|
scopeNote={t("profiles.scope")}
|
||||||
title={t("profiles.help")}
|
title={t("profiles.help")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={disabled || !inventory.data || !access.data} type="submit">
|
<Button disabled={disabled || !inventory.data || !access.data} type="submit">
|
||||||
{t(disabled ? "saving" : "save")}
|
{t(disabled ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
import { Label } from "@repo/shadcn-ui/components/label";
|
import { Label } from "@repo/shadcn-ui/components/label";
|
||||||
@ -15,8 +15,7 @@ export function PasswordForm(props: PasswordFormProps) {
|
|||||||
const { t } = useTranslation("identity");
|
const { t } = useTranslation("identity");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
{showTitle && (
|
{showTitle && (
|
||||||
<h3 className="font-semibold">
|
<h3 className="font-semibold">
|
||||||
{t(target ? "resetPassword" : "changePassword")}
|
{t(target ? "resetPassword" : "changePassword")}
|
||||||
@ -57,7 +56,6 @@ export function PasswordForm(props: PasswordFormProps) {
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<FormFeedback error={mutation.error} success={mutation.isSuccess} />
|
<FormFeedback error={mutation.error} success={mutation.isSuccess} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -24,7 +24,6 @@ export function UserEditorDialog(
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
open={props.open}
|
open={props.open}
|
||||||
size="medium"
|
|
||||||
title={t(
|
title={t(
|
||||||
props.mode === "create"
|
props.mode === "create"
|
||||||
? "createUser"
|
? "createUser"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
import { SwitchField } from "@repo/rdx-ui/components/switch-field";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -16,8 +16,7 @@ export function UserForm(props: UserFormProps) {
|
|||||||
const { t } = useTranslation("identity");
|
const { t } = useTranslation("identity");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
{showTitle && <h3 className="font-semibold">{t(user ? "editUser" : "createUser")}</h3>}
|
{showTitle && <h3 className="font-semibold">{t(user ? "editUser" : "createUser")}</h3>}
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
||||||
@ -73,7 +72,6 @@ export function UserForm(props: UserFormProps) {
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<FormFeedback error={mutation.error} success={mutation.isSuccess} />
|
<FormFeedback error={mutation.error} success={mutation.isSuccess} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -152,9 +152,5 @@
|
|||||||
"assign": "Section",
|
"assign": "Section",
|
||||||
"help": "Organize fields without changing their values or requirements. Removing a section moves its fields to Unsectioned.",
|
"help": "Organize fields without changing their values or requirements. Removing a section moves its fields to Unsectioned.",
|
||||||
"empty": "This section has no fields yet."
|
"empty": "This section has no fields yet."
|
||||||
},
|
|
||||||
"formLayout": {
|
|
||||||
"identity": "Resource identification",
|
|
||||||
"template": "Template details"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -152,9 +152,5 @@
|
|||||||
"assign": "Sección",
|
"assign": "Sección",
|
||||||
"help": "Organiza los campos sin cambiar sus valores ni su obligatoriedad. Al eliminar una sección, sus campos pasan a «Sin sección».",
|
"help": "Organiza los campos sin cambiar sus valores ni su obligatoriedad. Al eliminar una sección, sus campos pasan a «Sin sección».",
|
||||||
"empty": "Esta sección aún no tiene campos."
|
"empty": "Esta sección aún no tiene campos."
|
||||||
},
|
|
||||||
"formLayout": {
|
|
||||||
"identity": "Identificación del recurso",
|
|
||||||
"template": "Datos de la plantilla"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -19,8 +19,7 @@ export function CatalogFieldForm(props: CatalogFieldFormProps) {
|
|||||||
const { t } = useTranslation("resources");
|
const { t } = useTranslation("resources");
|
||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
||||||
<Input id={`${id}-name`} maxLength={100} required {...form.register("name")} />
|
<Input id={`${id}-name`} maxLength={100} required {...form.register("name")} />
|
||||||
@ -68,7 +67,6 @@ export function CatalogFieldForm(props: CatalogFieldFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<CatalogHelp kind="field" scope={scope} />
|
<CatalogHelp kind="field" scope={scope} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { UniqueID } from "@repo/rdx-ddd";
|
import { UniqueID } from "@repo/rdx-ddd";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { FormSection } from "@repo/rdx-ui/components/form-section";
|
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { TemplateSectionsEditor } from "@repo/rdx-ui/components/template-sections-editor";
|
import { TemplateSectionsEditor } from "@repo/rdx-ui/components/template-sections-editor";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
@ -24,9 +23,7 @@ export function CatalogTemplateForm(props: CatalogTemplateFormProps) {
|
|||||||
const id = useId();
|
const id = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-4" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<FormSection title={t("formLayout.template")}>
|
|
||||||
<div className="grid gap-4 sm:grid-cols-2">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${id}-name`}>{t("name")}</Label>
|
||||||
@ -64,7 +61,6 @@ export function CatalogTemplateForm(props: CatalogTemplateFormProps) {
|
|||||||
/>
|
/>
|
||||||
<p className="text-xs text-muted-foreground">{t("templateUsageHelp")}</p>
|
<p className="text-xs text-muted-foreground">{t("templateUsageHelp")}</p>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${id}-field`}>{t("selectField")}</Label>
|
<Label htmlFor={`${id}-field`}>{t("selectField")}</Label>
|
||||||
<SelectWithAction
|
<SelectWithAction
|
||||||
@ -129,7 +125,6 @@ export function CatalogTemplateForm(props: CatalogTemplateFormProps) {
|
|||||||
invalid={Object.keys(form.formState.errors).length > 0}
|
invalid={Object.keys(form.formState.errors).length > 0}
|
||||||
/>
|
/>
|
||||||
<CatalogHelp kind="template" scope={scope} />
|
<CatalogHelp kind="template" scope={scope} />
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
import { ContextHelp } from "@repo/rdx-ui/components/context-help";
|
||||||
import { FieldSections } from "@repo/rdx-ui/components/field-sections";
|
import { FieldSections } from "@repo/rdx-ui/components/field-sections";
|
||||||
import { FormActions, FormBody } from "@repo/rdx-ui/components/form-dialog";
|
import { FormActions } from "@repo/rdx-ui/components/form-dialog";
|
||||||
import { FormSection } from "@repo/rdx-ui/components/form-section";
|
|
||||||
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
import { SelectWithAction } from "@repo/rdx-ui/components/select-with-action";
|
||||||
import { Button } from "@repo/shadcn-ui/components/button";
|
import { Button } from "@repo/shadcn-ui/components/button";
|
||||||
import { Input } from "@repo/shadcn-ui/components/input";
|
import { Input } from "@repo/shadcn-ui/components/input";
|
||||||
@ -43,10 +42,8 @@ export function ResourceForm(props: ResourceFormProps) {
|
|||||||
const prefix = useId();
|
const prefix = useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="flex min-h-0 flex-1 flex-col overflow-hidden" onSubmit={submit}>
|
<form className="space-y-5" onSubmit={submit}>
|
||||||
<FormBody>
|
|
||||||
<fieldset className="space-y-5" disabled={mutation.isPending}>
|
<fieldset className="space-y-5" disabled={mutation.isPending}>
|
||||||
<FormSection title={t("formLayout.identity")}>
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
<Label htmlFor={`${prefix}-name`}>{t("name")}</Label>
|
||||||
<Input id={`${prefix}-name`} maxLength={100} required {...form.register("name")} />
|
<Input id={`${prefix}-name`} maxLength={100} required {...form.register("name")} />
|
||||||
@ -93,7 +90,6 @@ export function ResourceForm(props: ResourceFormProps) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
|
||||||
<ResourceIntegrationFields
|
<ResourceIntegrationFields
|
||||||
fixed={!!resource}
|
fixed={!!resource}
|
||||||
integration={values.integration}
|
integration={values.integration}
|
||||||
@ -151,7 +147,6 @@ export function ResourceForm(props: ResourceFormProps) {
|
|||||||
scopeNote={t(`${helpPrefix}Scope`)}
|
scopeNote={t(`${helpPrefix}Scope`)}
|
||||||
title={t("helpTitle")}
|
title={t("helpTitle")}
|
||||||
/>
|
/>
|
||||||
</FormBody>
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button disabled={mutation.isPending} type="submit">
|
<Button disabled={mutation.isPending} type="submit">
|
||||||
{t(mutation.isPending ? "saving" : "save")}
|
{t(mutation.isPending ? "saving" : "save")}
|
||||||
|
|||||||
@ -29,13 +29,9 @@ export function FieldSections<T extends { sectionId?: string | undefined }>({
|
|||||||
}, [hasErrors]);
|
}, [hasErrors]);
|
||||||
const content = (fields: readonly T[]) =>
|
const content = (fields: readonly T[]) =>
|
||||||
values ? (
|
values ? (
|
||||||
<dl className="grid gap-4 sm:grid-cols-2 @min-[900px]:grid-cols-3">
|
<dl className="grid gap-4 sm:grid-cols-2">{fields.map(renderItem)}</dl>
|
||||||
{fields.map(renderItem)}
|
|
||||||
</dl>
|
|
||||||
) : (
|
) : (
|
||||||
<div className="grid gap-4 sm:grid-cols-2 @min-[900px]:grid-cols-3">
|
<div className="grid gap-4 sm:grid-cols-2">{fields.map(renderItem)}</div>
|
||||||
{fields.map(renderItem)}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
if (!sections.length) {
|
if (!sections.length) {
|
||||||
return content(items);
|
return content(items);
|
||||||
@ -44,7 +40,7 @@ export function FieldSections<T extends { sectionId?: string | undefined }>({
|
|||||||
const ungrouped = items.filter((item) => !(item.sectionId && known.has(item.sectionId)));
|
const ungrouped = items.filter((item) => !(item.sectionId && known.has(item.sectionId)));
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="grid items-start gap-4 @min-[900px]:grid-cols-2"
|
className="space-y-3"
|
||||||
onInvalidCapture={(event) => {
|
onInvalidCapture={(event) => {
|
||||||
// Abrir antes de que el navegador intente enfocar un control inválido oculto.
|
// Abrir antes de que el navegador intente enfocar un control inválido oculto.
|
||||||
if (event.target instanceof HTMLElement) {
|
if (event.target instanceof HTMLElement) {
|
||||||
@ -62,7 +58,7 @@ export function FieldSections<T extends { sectionId?: string | undefined }>({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<details className="@container rounded-md border" key={section.id} open>
|
<details className="rounded-md border" key={section.id} open>
|
||||||
<summary className="cursor-pointer rounded-md px-4 py-3 text-sm font-medium focus-visible:outline-2 focus-visible:outline-ring">
|
<summary className="cursor-pointer rounded-md px-4 py-3 text-sm font-medium focus-visible:outline-2 focus-visible:outline-ring">
|
||||||
{section.name}
|
{section.name}
|
||||||
</summary>
|
</summary>
|
||||||
@ -76,7 +72,7 @@ export function FieldSections<T extends { sectionId?: string | undefined }>({
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{ungrouped.length > 0 && (
|
{ungrouped.length > 0 && (
|
||||||
<section className="col-span-full space-y-3">
|
<section className="space-y-3">
|
||||||
<h4 className="text-sm font-medium">{ungroupedLabel}</h4>
|
<h4 className="text-sm font-medium">{ungroupedLabel}</h4>
|
||||||
{content(ungrouped)}
|
{content(ungrouped)}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -18,7 +18,6 @@ export function FormDialog({
|
|||||||
cancelLabel,
|
cancelLabel,
|
||||||
children,
|
children,
|
||||||
wide = false,
|
wide = false,
|
||||||
size,
|
|
||||||
formActions = false,
|
formActions = false,
|
||||||
}: {
|
}: {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@ -27,39 +26,28 @@ export function FormDialog({
|
|||||||
cancelLabel: string;
|
cancelLabel: string;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
wide?: boolean;
|
wide?: boolean;
|
||||||
size?: "small" | "medium" | "large";
|
|
||||||
formActions?: boolean;
|
formActions?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const width = size ?? (wide ? "large" : "small");
|
|
||||||
const widths = {
|
|
||||||
small: "sm:max-w-xl",
|
|
||||||
medium: "sm:max-w-3xl",
|
|
||||||
large: "sm:w-[90vw] sm:max-w-[1200px]",
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<Dialog onOpenChange={onOpenChange} open={open}>
|
<Dialog onOpenChange={onOpenChange} open={open}>
|
||||||
<DialogContent
|
<DialogContent
|
||||||
className={`flex max-h-[calc(100dvh-2rem)] flex-col gap-0 overflow-hidden p-0 ${widths[width]}`}
|
className={`max-h-[calc(100dvh-2rem)] overflow-y-auto ${wide ? "sm:max-w-3xl" : "sm:max-w-xl"}`}
|
||||||
showCloseButton={true}
|
showCloseButton={true}
|
||||||
>
|
>
|
||||||
<DialogHeader className="shrink-0 border-b px-6 py-5 pr-14">
|
<DialogHeader>
|
||||||
<DialogTitle className="text-lg font-bold">{title}</DialogTitle>
|
<DialogTitle className="text-lg font-bold">{title}</DialogTitle>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div
|
|
||||||
className="@container flex min-h-0 flex-1 flex-col overflow-y-auto px-6 pt-5 pb-5 [&:has([data-slot=form-body])]:overflow-hidden [&:has([data-slot=form-body])]:pb-0"
|
|
||||||
data-slot="form-dialog-content"
|
|
||||||
>
|
|
||||||
<FormCancelContext.Provider value={formActions ? cancelLabel : undefined}>
|
<FormCancelContext.Provider value={formActions ? cancelLabel : undefined}>
|
||||||
{children}
|
{children}
|
||||||
</FormCancelContext.Provider>
|
</FormCancelContext.Provider>
|
||||||
</div>
|
|
||||||
{!formActions && (
|
{!formActions && (
|
||||||
<DialogFooter className="shrink-0 border-t px-6 py-4">
|
<DialogFooter>
|
||||||
<DialogClose render={<Button type="button" variant="outline" />}>
|
<DialogClose render={<Button type="button" variant="outline" />}>
|
||||||
{cancelLabel}
|
{cancelLabel}
|
||||||
</DialogClose>
|
</DialogClose>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
@ -68,7 +56,7 @@ export function FormDialog({
|
|||||||
export function FormActions({ children }: { children: ReactNode }) {
|
export function FormActions({ children }: { children: ReactNode }) {
|
||||||
const cancelLabel = useContext(FormCancelContext);
|
const cancelLabel = useContext(FormCancelContext);
|
||||||
return (
|
return (
|
||||||
<DialogFooter className="shrink-0 border-t bg-popover py-4">
|
<DialogFooter className="border-t pt-4">
|
||||||
{cancelLabel && (
|
{cancelLabel && (
|
||||||
<DialogClose render={<Button type="button" variant="outline" />}>{cancelLabel}</DialogClose>
|
<DialogClose render={<Button type="button" variant="outline" />}>{cancelLabel}</DialogClose>
|
||||||
)}
|
)}
|
||||||
@ -76,12 +64,3 @@ export function FormActions({ children }: { children: ReactNode }) {
|
|||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** El cuerpo se desplaza dentro del formulario; las acciones conservan su submit nativo. */
|
|
||||||
export function FormBody({ children }: { children: ReactNode }) {
|
|
||||||
return (
|
|
||||||
<div className="min-h-0 flex-1 space-y-5 overflow-y-auto pb-5 pr-1" data-slot="form-body">
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
import type { ReactNode } from "react";
|
|
||||||
import { useId } from "react";
|
|
||||||
|
|
||||||
/** Bloque visual reutilizable con título accesible; no altera validación ni datos. */
|
|
||||||
export function FormSection({ title, children }: { title: string; children: ReactNode }) {
|
|
||||||
const id = useId();
|
|
||||||
return (
|
|
||||||
<section aria-labelledby={id} className="space-y-4 rounded-lg border p-4">
|
|
||||||
<h3 className="text-sm font-semibold" id={id}>
|
|
||||||
{title}
|
|
||||||
</h3>
|
|
||||||
{children}
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -87,13 +87,8 @@ export function TemplateSectionsEditor({
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-xs text-muted-foreground">{labels.help}</p>
|
<p className="text-xs text-muted-foreground">{labels.help}</p>
|
||||||
<div className="grid items-start gap-4 @min-[900px]:grid-cols-2">
|
|
||||||
{sections.map((section, index) => (
|
{sections.map((section, index) => (
|
||||||
<fieldset
|
<fieldset className="space-y-3 rounded-md border p-3" disabled={disabled} key={section.id}>
|
||||||
className="space-y-3 rounded-md border p-3"
|
|
||||||
disabled={disabled}
|
|
||||||
key={section.id}
|
|
||||||
>
|
|
||||||
<legend className="sr-only">{section.name || labels.name}</legend>
|
<legend className="sr-only">{section.name || labels.name}</legend>
|
||||||
<div className="flex items-end gap-2">
|
<div className="flex items-end gap-2">
|
||||||
<div className="min-w-0 flex-1 space-y-2">
|
<div className="min-w-0 flex-1 space-y-2">
|
||||||
@ -162,7 +157,6 @@ export function TemplateSectionsEditor({
|
|||||||
{fieldList(section.id)}
|
{fieldList(section.id)}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
))}
|
))}
|
||||||
</div>
|
|
||||||
{fieldList()}
|
{fieldList()}
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -5,111 +5,111 @@
|
|||||||
@custom-variant dark (&:is(.dark *));
|
@custom-variant dark (&:is(.dark *));
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: oklch(0.9911 0 0);
|
--background: oklch(0.9916 0.0050 228.8162);
|
||||||
--foreground: oklch(0.1763 0.0140 258.3572);
|
--foreground: oklch(0.2012 0.0307 210.2063);
|
||||||
--card: oklch(1.0000 0 0);
|
--card: oklch(1.0000 0 0);
|
||||||
--card-foreground: oklch(0.1763 0.0140 258.3572);
|
--card-foreground: oklch(0.2012 0.0307 210.2063);
|
||||||
--popover: oklch(1.0000 0 0);
|
--popover: oklch(1.0000 0 0);
|
||||||
--popover-foreground: oklch(0.1763 0.0140 258.3572);
|
--popover-foreground: oklch(0.2395 0.0455 282.4182);
|
||||||
--primary: oklch(0.5882 0.2309 28.2936);
|
--primary: oklch(0.7040 0.1400 182.5030);
|
||||||
--primary-foreground: oklch(1.0000 0 0);
|
--primary-foreground: oklch(0.9911 0 0);
|
||||||
--secondary: oklch(0.3303 0.0753 267.1046);
|
--secondary: oklch(0.9507 0.0148 196.9072);
|
||||||
--secondary-foreground: oklch(1.0000 0 0);
|
--secondary-foreground: oklch(0.4011 0.0399 210.3561);
|
||||||
--muted: oklch(0.9674 0.0013 286.3752);
|
--muted: oklch(0.9604 0.0096 196.9971);
|
||||||
--muted-foreground: oklch(0.5517 0.0138 285.9385);
|
--muted-foreground: oklch(0.4999 0.0296 211.7976);
|
||||||
--accent: oklch(0.8342 0.0950 7.8239);
|
--accent: oklch(0.9104 0.0460 174.0259);
|
||||||
--accent-foreground: oklch(0.3155 0.1064 18.1157);
|
--accent-foreground: oklch(0.4524 0.0772 194.7689);
|
||||||
--destructive: oklch(0.3999 0.1641 29.2339);
|
--destructive: oklch(0.5993 0.1597 24.9573);
|
||||||
--destructive-foreground: oklch(1.0000 0 0);
|
--destructive-foreground: oklch(1.0000 0 0);
|
||||||
--border: oklch(0.9197 0.0040 286.3202);
|
--border: oklch(0.9093 0.0098 204.9097);
|
||||||
--input: oklch(0.9197 0.0040 286.3202);
|
--input: oklch(0.9093 0.0098 204.9097);
|
||||||
--ring: oklch(0.5882 0.2309 28.2936);
|
--ring: oklch(0.7040 0.1400 182.5030);
|
||||||
--chart-1: oklch(0.5882 0.2309 28.2936);
|
--chart-1: oklch(0.7040 0.1400 182.5030);
|
||||||
--chart-2: oklch(0.3303 0.0753 267.1046);
|
--chart-2: oklch(0.6700 0.1336 230.0356);
|
||||||
--chart-3: oklch(0.8342 0.0950 7.8239);
|
--chart-3: oklch(0.7217 0.1638 297.0816);
|
||||||
--chart-4: oklch(0.8948 0.0509 64.2066);
|
--chart-4: oklch(0.8614 0.1165 74.2273);
|
||||||
--chart-5: oklch(0.7118 0.0129 286.0665);
|
--chart-5: oklch(0.8975 0.0740 131.2181);
|
||||||
--sidebar: oklch(1.0000 0 0);
|
--sidebar: oklch(0.9794 0.0045 214.3282);
|
||||||
--sidebar-foreground: oklch(0.3703 0.0119 285.8054);
|
--sidebar-foreground: oklch(0.2514 0.0307 209.6770);
|
||||||
--sidebar-primary: oklch(0.5882 0.2309 28.2936);
|
--sidebar-primary: oklch(0.7040 0.1400 182.5030);
|
||||||
--sidebar-primary-foreground: oklch(1.0000 0 0);
|
--sidebar-primary-foreground: oklch(0.9859 0.0040 286.3269);
|
||||||
--sidebar-accent: oklch(0.9674 0.0013 286.3752);
|
--sidebar-accent: oklch(0.9104 0.0460 174.0259);
|
||||||
--sidebar-accent-foreground: oklch(0.1763 0.0140 258.3572);
|
--sidebar-accent-foreground: oklch(0.2395 0.0455 282.4182);
|
||||||
--sidebar-border: oklch(0.9674 0.0013 286.3752);
|
--sidebar-border: oklch(0.9202 0.0202 200.6310);
|
||||||
--sidebar-ring: oklch(0.5882 0.2309 28.2936);
|
--sidebar-ring: oklch(0.5606 0.1650 288.1741);
|
||||||
--font-sans: 'Inter', sans-serif;
|
--font-sans: Inter, sans-serif;
|
||||||
--font-serif: 'Georgia', serif;
|
--font-serif: Georgia, serif;
|
||||||
--font-mono: 'JetBrains Mono', monospace;
|
--font-mono: JetBrains Mono, monospace;
|
||||||
--radius: 0.75rem;
|
--radius: 0.5rem;
|
||||||
--shadow-x: 0px;
|
--shadow-x: 0px;
|
||||||
--shadow-y: 4px;
|
--shadow-y: 4px;
|
||||||
--shadow-blur: 10px;
|
--shadow-blur: 10px;
|
||||||
--shadow-spread: -2px;
|
--shadow-spread: 0px;
|
||||||
--shadow-opacity: 0.1;
|
--shadow-opacity: 0.12;
|
||||||
--shadow-color: 0 0% 0%;
|
--shadow-color: #2d2d53;
|
||||||
--shadow-2xs: 0px 4px 10px -2px hsl(0 0% 0% / 0.05);
|
--shadow-2xs: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.06);
|
||||||
--shadow-xs: 0px 4px 10px -2px hsl(0 0% 0% / 0.05);
|
--shadow-xs: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.06);
|
||||||
--shadow-sm: 0px 4px 10px -2px hsl(0 0% 0% / 0.10), 0px 1px 2px -3px hsl(0 0% 0% / 0.10);
|
--shadow-sm: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 1px 2px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow: 0px 4px 10px -2px hsl(0 0% 0% / 0.10), 0px 1px 2px -3px hsl(0 0% 0% / 0.10);
|
--shadow: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 1px 2px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow-md: 0px 4px 10px -2px hsl(0 0% 0% / 0.10), 0px 2px 4px -3px hsl(0 0% 0% / 0.10);
|
--shadow-md: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 2px 4px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow-lg: 0px 4px 10px -2px hsl(0 0% 0% / 0.10), 0px 4px 6px -3px hsl(0 0% 0% / 0.10);
|
--shadow-lg: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 4px 6px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow-xl: 0px 4px 10px -2px hsl(0 0% 0% / 0.10), 0px 8px 10px -3px hsl(0 0% 0% / 0.10);
|
--shadow-xl: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 8px 10px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow-2xl: 0px 4px 10px -2px hsl(0 0% 0% / 0.25);
|
--shadow-2xl: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.30);
|
||||||
--tracking-normal: -0.02em;
|
--tracking-normal: 0em;
|
||||||
--spacing: 0.25rem;
|
--spacing: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
--background: oklch(0.1645 0.0086 274.3354);
|
--background: oklch(0.1396 0.0155 195.5244);
|
||||||
--foreground: oklch(0.9911 0 0);
|
--foreground: oklch(0.9396 0.0097 204.9127);
|
||||||
--card: oklch(0.2145 0.0184 270.4182);
|
--card: oklch(0.1788 0.0202 201.3265);
|
||||||
--card-foreground: oklch(0.9911 0 0);
|
--card-foreground: oklch(0.9396 0.0097 204.9127);
|
||||||
--popover: oklch(0.2145 0.0184 270.4182);
|
--popover: oklch(0.2101 0.0257 280.5303);
|
||||||
--popover-foreground: oklch(0.9911 0 0);
|
--popover-foreground: oklch(0.9294 0.0202 286.0004);
|
||||||
--primary: oklch(0.6453 0.2404 27.3106);
|
--primary: oklch(0.7040 0.1400 182.5030);
|
||||||
--primary-foreground: oklch(1.0000 0 0);
|
--primary-foreground: oklch(1.0000 0 0);
|
||||||
--secondary: oklch(0.2604 0.0471 267.4902);
|
--secondary: oklch(0.2413 0.0307 198.8697);
|
||||||
--secondary-foreground: oklch(1.0000 0 0);
|
--secondary-foreground: oklch(0.8496 0.0299 199.2418);
|
||||||
--muted: oklch(0.2739 0.0055 286.0326);
|
--muted: oklch(0.2185 0.0195 201.5676);
|
||||||
--muted-foreground: oklch(0.7118 0.0129 286.0665);
|
--muted-foreground: oklch(0.6494 0.0304 199.2066);
|
||||||
--accent: oklch(0.6986 0.1954 14.1660);
|
--accent: oklch(0.4370 0.0780 188.2160);
|
||||||
--accent-foreground: oklch(1.0000 0 0);
|
--accent-foreground: oklch(0.7994 0.0596 196.0230);
|
||||||
--destructive: oklch(0.3958 0.1331 25.7230);
|
--destructive: oklch(0.6593 0.2097 25.0107);
|
||||||
--destructive-foreground: oklch(1.0000 0 0);
|
--destructive-foreground: oklch(0.9859 0.0040 286.3269);
|
||||||
--border: oklch(0.2739 0.0055 286.0326);
|
--border: oklch(0.2397 0.0193 201.5913);
|
||||||
--input: oklch(0.2739 0.0055 286.0326);
|
--input: oklch(0.2397 0.0193 201.5913);
|
||||||
--ring: oklch(0.6453 0.2404 27.3106);
|
--ring: oklch(0.7040 0.1400 182.5030);
|
||||||
--chart-1: oklch(0.6453 0.2404 27.3106);
|
--chart-1: oklch(0.7040 0.1400 182.5030);
|
||||||
--chart-2: oklch(0.3986 0.0946 266.8132);
|
--chart-2: oklch(0.6700 0.1336 230.0356);
|
||||||
--chart-3: oklch(0.7570 0.1485 11.9623);
|
--chart-3: oklch(0.7217 0.1638 297.0816);
|
||||||
--chart-4: oklch(0.7824 0.0829 60.0948);
|
--chart-4: oklch(0.8614 0.1165 74.2273);
|
||||||
--chart-5: oklch(0.4419 0.0146 285.7864);
|
--chart-5: oklch(0.8975 0.0740 131.2181);
|
||||||
--sidebar: oklch(0.1645 0.0086 274.3354);
|
--sidebar: oklch(0.1604 0.0209 201.0807);
|
||||||
--sidebar-foreground: oklch(0.7118 0.0129 286.0665);
|
--sidebar-foreground: oklch(0.9396 0.0097 204.9127);
|
||||||
--sidebar-primary: oklch(0.6453 0.2404 27.3106);
|
--sidebar-primary: oklch(0.7040 0.1400 182.5030);
|
||||||
--sidebar-primary-foreground: oklch(1.0000 0 0);
|
--sidebar-primary-foreground: oklch(1.0000 0 0);
|
||||||
--sidebar-accent: oklch(0.2145 0.0184 270.4182);
|
--sidebar-accent: oklch(0.4370 0.0780 188.2160);
|
||||||
--sidebar-accent-foreground: oklch(0.9911 0 0);
|
--sidebar-accent-foreground: oklch(0.9294 0.0202 286.0004);
|
||||||
--sidebar-border: oklch(0.2739 0.0055 286.0326);
|
--sidebar-border: oklch(0.3008 0.0343 281.7840);
|
||||||
--sidebar-ring: oklch(0.6453 0.2404 27.3106);
|
--sidebar-ring: oklch(0.7155 0.1583 288.7763);
|
||||||
--font-sans: 'Inter', sans-serif;
|
--font-sans: Inter, sans-serif;
|
||||||
--font-serif: 'Georgia', serif;
|
--font-serif: Georgia, serif;
|
||||||
--font-mono: 'JetBrains Mono', monospace;
|
--font-mono: JetBrains Mono, monospace;
|
||||||
--radius: 0.75rem;
|
--radius: 0.5rem;
|
||||||
--shadow-x: 0px;
|
--shadow-x: 0px;
|
||||||
--shadow-y: 8px;
|
--shadow-y: 4px;
|
||||||
--shadow-blur: 15px;
|
--shadow-blur: 10px;
|
||||||
--shadow-spread: -3px;
|
--shadow-spread: 0px;
|
||||||
--shadow-opacity: 0.4;
|
--shadow-opacity: 0.12;
|
||||||
--shadow-color: 0 0% 0%;
|
--shadow-color: #2d2d53;
|
||||||
--shadow-2xs: 0px 8px 15px -3px hsl(0 0% 0% / 0.20);
|
--shadow-2xs: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.06);
|
||||||
--shadow-xs: 0px 8px 15px -3px hsl(0 0% 0% / 0.20);
|
--shadow-xs: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.06);
|
||||||
--shadow-sm: 0px 8px 15px -3px hsl(0 0% 0% / 0.40), 0px 1px 2px -4px hsl(0 0% 0% / 0.40);
|
--shadow-sm: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 1px 2px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow: 0px 8px 15px -3px hsl(0 0% 0% / 0.40), 0px 1px 2px -4px hsl(0 0% 0% / 0.40);
|
--shadow: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 1px 2px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow-md: 0px 8px 15px -3px hsl(0 0% 0% / 0.40), 0px 2px 4px -4px hsl(0 0% 0% / 0.40);
|
--shadow-md: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 2px 4px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow-lg: 0px 8px 15px -3px hsl(0 0% 0% / 0.40), 0px 4px 6px -4px hsl(0 0% 0% / 0.40);
|
--shadow-lg: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 4px 6px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow-xl: 0px 8px 15px -3px hsl(0 0% 0% / 0.40), 0px 8px 10px -4px hsl(0 0% 0% / 0.40);
|
--shadow-xl: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.12), 0px 8px 10px -1px hsl(240 29.6875% 25.0980% / 0.12);
|
||||||
--shadow-2xl: 0px 8px 15px -3px hsl(0 0% 0% / 1.00);
|
--shadow-2xl: 0px 4px 10px 0px hsl(240 29.6875% 25.0980% / 0.30);
|
||||||
}
|
}
|
||||||
|
|
||||||
@theme inline {
|
@theme inline {
|
||||||
@ -163,13 +163,6 @@
|
|||||||
--shadow-lg: var(--shadow-lg);
|
--shadow-lg: var(--shadow-lg);
|
||||||
--shadow-xl: var(--shadow-xl);
|
--shadow-xl: var(--shadow-xl);
|
||||||
--shadow-2xl: var(--shadow-2xl);
|
--shadow-2xl: var(--shadow-2xl);
|
||||||
|
|
||||||
--tracking-tighter: calc(var(--tracking-normal) - 0.05em);
|
|
||||||
--tracking-tight: calc(var(--tracking-normal) - 0.025em);
|
|
||||||
--tracking-normal: var(--tracking-normal);
|
|
||||||
--tracking-wide: calc(var(--tracking-normal) + 0.025em);
|
|
||||||
--tracking-wider: calc(var(--tracking-normal) + 0.05em);
|
|
||||||
--tracking-widest: calc(var(--tracking-normal) + 0.1em);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
@ -178,6 +171,5 @@
|
|||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
letter-spacing: var(--tracking-normal);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user