update image resolve by entity

This commit is contained in:
Julian Krauser 2025-07-16 12:44:23 +02:00
parent 0fdb77d7ca
commit ca1ca9edc8
2 changed files with 2 additions and 2 deletions

View file

@ -31,7 +31,7 @@ export class damageReport {
type: "text", type: "text",
transformer: { transformer: {
from(value: string): Array<string> { from(value: string): Array<string> {
return value.split(","); return value.split(",").filter((i) => !!i);
}, },
to(value: Array<string>): string { to(value: Array<string>): string {
return value.join(","); return value.join(",");

View file

@ -47,7 +47,7 @@ export default abstract class DamageReportFactory {
description: record.description, description: record.description,
location: record.location, location: record.location,
note: record.note, note: record.note,
images: record.images.filter((i) => !!i), images: record.images,
reportedBy: record?.reportedBy, reportedBy: record?.reportedBy,
...assigned, ...assigned,
maintenance: record.maintenance ? MaintenanceFactory.mapToSingle(record.maintenance) : null, maintenance: record.maintenance ? MaintenanceFactory.mapToSingle(record.maintenance) : null,