procurement: keep execution fields in processing view
This commit is contained in:
parent
21e5cd2685
commit
2cd2263083
@ -1317,23 +1317,6 @@ export default function ProcurementPage() {
|
||||
rows={2}
|
||||
className="app-input w-full rounded-lg px-3 py-2 text-sm"
|
||||
/>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<input
|
||||
type="date"
|
||||
value={it.expected_delivery_date}
|
||||
onChange={(e) => updateItemRow(idx, { expected_delivery_date: e.target.value })}
|
||||
className="app-input rounded-lg px-3 py-2 text-sm"
|
||||
aria-label="Ожидаемая дата поступления"
|
||||
/>
|
||||
<input
|
||||
type="number"
|
||||
step="0.01"
|
||||
value={it.actual_unit_price}
|
||||
onChange={(e) => updateItemRow(idx, { actual_unit_price: e.target.value })}
|
||||
placeholder="Фактическая цена/ед."
|
||||
className="app-input rounded-lg px-3 py-2 text-sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@ -20,8 +20,6 @@ type ItemDraft = {
|
||||
estimated_unit_price: string;
|
||||
supplier_info: string;
|
||||
linksText: string;
|
||||
expected_delivery_date: string;
|
||||
actual_unit_price: string;
|
||||
};
|
||||
|
||||
const emptyItem: ItemDraft = {
|
||||
@ -32,8 +30,6 @@ const emptyItem: ItemDraft = {
|
||||
estimated_unit_price: "",
|
||||
supplier_info: "",
|
||||
linksText: "",
|
||||
expected_delivery_date: "",
|
||||
actual_unit_price: "",
|
||||
};
|
||||
|
||||
type FormState = {
|
||||
@ -390,8 +386,6 @@ export function useProcurementPage(user: User | null) {
|
||||
estimated_unit_price: String(item.estimated_unit_price || ""),
|
||||
supplier_info: item.supplier_info || "",
|
||||
linksText: Array.isArray(item.links) ? item.links.join("\n") : "",
|
||||
expected_delivery_date: item.expected_delivery_date || "",
|
||||
actual_unit_price: item.actual_unit_price ? String(item.actual_unit_price) : "",
|
||||
}))
|
||||
: [{ ...emptyItem }],
|
||||
});
|
||||
@ -485,8 +479,6 @@ export function useProcurementPage(user: User | null) {
|
||||
estimated_unit_price: item.estimated_unit_price,
|
||||
supplier_info: item.supplier_info || undefined,
|
||||
links: parseLinks(item.linksText),
|
||||
expected_delivery_date: item.expected_delivery_date || undefined,
|
||||
actual_unit_price: item.actual_unit_price || undefined,
|
||||
})),
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user