cambios en frontend de Lotes (BatchNumberDetails) colocando campos de usuario para visualización y actualización

This commit is contained in:
George committed 2026-08-17 16:46:55 -05:00
1 parent b2fb4e2d0a
commit 266af59bc6
2 files changed
+45 -13

No files matched your search

+13 -13
View File
@@ -196,26 +196,26 @@ export default function BatchForm({ batchId, backPath }: BatchFormProps) {
/> />
<FormattedField <FormattedField
type="date" type="date"
label="Fecha Ingreso" label="Fecha Ingreso (AdmissionDate)"
value={batch.AdmissionDate} value={batch.AdmissionDate}
mode="display" mode="display"
/> />
<FormattedField <FormattedField
type="date" type="date"
label="Fecha Fabricación" label="Fecha Fabricación (ManufacturingDate)"
value={batch.ManufacturingDate} value={batch.ManufacturingDate}
mode="display" mode="display"
/> />
<FormattedField <FormattedField
type="date" type="date"
label="Fecha Vencimiento" label="Fecha Vencimiento (ExpirationDate)"
value={batch.ExpirationDate} value={batch.ExpirationDate}
mode="input" mode="input"
name="ExpirationDate" name="ExpirationDate"
onChange={handleChange} onChange={handleChange}
/> />
<SelectField <SelectField
label="Estado de Aprobación" label="Estado de Aprobación (U_SIS_ESTLOT)"
options={BATCH_STATUS_APROBACION} options={BATCH_STATUS_APROBACION}
value={batch.EstadoAprobacion ?? ""} value={batch.EstadoAprobacion ?? ""}
onChange={handleSelectChange("EstadoAprobacion")} onChange={handleSelectChange("EstadoAprobacion")}
@@ -225,7 +225,7 @@ export default function BatchForm({ batchId, backPath }: BatchFormProps) {
<FormattedField <FormattedField
type="date" type="date"
label="Fecha de Aprobación" label="Fecha de Aprobación (U_SIS_FECAPROB)"
value={batch.FechaAprobacion} value={batch.FechaAprobacion}
mode="input" mode="input"
name="FechaAprobacion" name="FechaAprobacion"
@@ -233,7 +233,7 @@ export default function BatchForm({ batchId, backPath }: BatchFormProps) {
/> />
<FormattedField <FormattedField
type="text" type="text"
label="Responsable de Aprobación" label="Responsable de Aprobación (U_SIS_RESPAPROB)"
value={batch.ResponsableAprobacion} value={batch.ResponsableAprobacion}
mode="input" mode="input"
name="ResponsableAprobacion" name="ResponsableAprobacion"
@@ -241,14 +241,14 @@ export default function BatchForm({ batchId, backPath }: BatchFormProps) {
/> />
<FormattedField <FormattedField
type="text" type="text"
label="Observaciones" label="Observaciones (U_SIS_OBSER)"
value={batch.Observaciones} value={batch.Observaciones}
mode="input" mode="input"
name="Observaciones" name="Observaciones"
onChange={handleChange} onChange={handleChange}
/> />
<SelectField <SelectField
label="Estado de Liberación" label="Estado de Liberación (U_SIS_ESTLIB)"
options={BATCH_STATUS_LIBERACION} options={BATCH_STATUS_LIBERACION}
value={batch.EstadoLiberacion ?? ""} value={batch.EstadoLiberacion ?? ""}
onChange={handleSelectChange("EstadoLiberacion")} onChange={handleSelectChange("EstadoLiberacion")}
@@ -257,7 +257,7 @@ export default function BatchForm({ batchId, backPath }: BatchFormProps) {
/> />
<FormattedField <FormattedField
type="date" type="date"
label="Fecha de Liberación" label="Fecha de Liberación (U_SIS_FECLIB)"
value={batch.FechaLiberacion} value={batch.FechaLiberacion}
mode="input" mode="input"
name="FechaLiberacion" name="FechaLiberacion"
@@ -265,7 +265,7 @@ export default function BatchForm({ batchId, backPath }: BatchFormProps) {
/> />
<FormattedField <FormattedField
type="text" type="text"
label="Hora de Liberación" label="Hora de Liberación (U_SIS_HORAPROB)"
value={batch.HoraAprobacion} value={batch.HoraAprobacion}
mode="input" mode="input"
name="HoraAprobacion" name="HoraAprobacion"
@@ -273,9 +273,9 @@ export default function BatchForm({ batchId, backPath }: BatchFormProps) {
/> />
</div> </div>
<div className="p-3 bg-[var(--color-bg)] border border-[var(--color-border)]"> {/* <div className="p-3 bg-[var(--color-bg)] border border-[var(--color-border)]">
<label className="block text-[var(--color-text-muted)] font-medium mb-1"> <label className="block text-[var(--color-text-muted)] font-medium mb-1">
Detalles / Observaciones Detalles / Observaciones (Details)
</label> </label>
<textarea <textarea
name="Details" name="Details"
@@ -284,7 +284,7 @@ export default function BatchForm({ batchId, backPath }: BatchFormProps) {
rows={3} rows={3}
className="w-full px-2 py-1.5 border border-[var(--color-input-border)] bg-[var(--color-surface)] rounded-none outline-none focus:border-[var(--color-input-focus)] text-xs" className="w-full px-2 py-1.5 border border-[var(--color-input-border)] bg-[var(--color-surface)] rounded-none outline-none focus:border-[var(--color-input-focus)] text-xs"
/> />
</div> </div> */}
<div className="flex justify-end pt-4 border-t border-[var(--color-border-light)] space-x-2"> <div className="flex justify-end pt-4 border-t border-[var(--color-border-light)] space-x-2">
<button <button
@@ -1,5 +1,6 @@
import ListViewTemplate from "../../components/ui/ListViewTemplate"; import ListViewTemplate from "../../components/ui/ListViewTemplate";
import type { Column } from "../../types/table"; import type { Column } from "../../types/table";
import type { FilterConfig } from "../../types/filters";
import { import {
BATCH_STATUS_APROBACION, BATCH_STATUS_APROBACION,
BATCH_STATUS_LIBERACION, BATCH_STATUS_LIBERACION,
@@ -7,10 +8,39 @@ import {
import StatusBadge from "../../components/ui/StatusBadge"; import StatusBadge from "../../components/ui/StatusBadge";
import { getStatusColors } from "../../utils/statusColors"; import { getStatusColors } from "../../utils/statusColors";
const filters: FilterConfig[] = [
{
key: "AdmissionDate",
label: "Fecha Ingreso",
type: "date",
},
{
key: "BatchAttribute1",
label: "Atributo 1",
type: "text",
},
{
key: "BatchAttribute2",
label: "Atributo 2",
type: "text",
},
{
key: "ItemCode",
label: "Código Artículo",
type: "text",
},
{
key: "ItemDescription",
label: "Descripción",
type: "text",
},
];
export default function BatchNumberDetailsList() { export default function BatchNumberDetailsList() {
const columns: Column[] = [ const columns: Column[] = [
{ key: "Batch", title: "Lote", width: "140px" }, { key: "Batch", title: "Lote", width: "140px" },
{ key: "ItemCode", title: "Código Artículo", width: "120px" }, { key: "ItemCode", title: "Código Artículo", width: "120px" },
{ key: "ItemDescription", title: "Descripción", width: "200px" },
{ key: "BatchAttribute1", title: "Atributo 1", width: "100px" }, { key: "BatchAttribute1", title: "Atributo 1", width: "100px" },
{ key: "BatchAttribute2", title: "Atributo 2", width: "100px" }, { key: "BatchAttribute2", title: "Atributo 2", width: "100px" },
{ {
@@ -103,6 +133,7 @@ export default function BatchNumberDetailsList() {
"ManufacturingDate", "ManufacturingDate",
"ExpirationDate", "ExpirationDate",
"ItemCode", "ItemCode",
"ItemDescription",
"Details", "Details",
"U_SIS_ESTLOT", "U_SIS_ESTLOT",
"U_SIS_FECAPROB", "U_SIS_FECAPROB",
@@ -120,6 +151,7 @@ export default function BatchNumberDetailsList() {
defaultSelectedColumn="Batch" defaultSelectedColumn="Batch"
errorMessage="Error al obtener el listado de lotes" errorMessage="Error al obtener el listado de lotes"
rowKey="DocEntry" rowKey="DocEntry"
filters={filters}
/> />
); );
} }