corrections in plan update and fetch

This commit is contained in:
Julian Krauser 2025-07-10 10:49:30 +02:00
parent db3004fa04
commit 8747baaf2e
5 changed files with 11 additions and 3 deletions

View file

@ -51,6 +51,7 @@ export default abstract class InspectionPointCommandHandler {
.values(
sync.map((s) => ({
...s,
id: points.some((p) => p.id == s.id) ? s.id : undefined,
versionedPlanId,
}))
)

View file

@ -40,7 +40,13 @@ export default abstract class InspectionVersionedPlanCommandHandler {
.into(inspectionPoint)
.values(
inspectionPoints.map((ip) => ({
...ip,
title: ip.title,
description: ip.description,
type: ip.type,
min: ip.min,
max: ip.max,
others: ip.others,
sort: ip.sort,
versionedPlanId: returnId,
}))
)