feat(public-berths): expose booleans, metric variants, timestamps
Bring the public berth feed to verbatim NocoDB parity (all fields except Price, which is held pending an explicit policy decision per the audit follow-ups Q4). Adds: - Berth Approved (boolean) - Water Depth (number) - Width Is Minimum / Water Depth Is Minimum (boolean) - Length / Width / Draft / Water Depth / Nominal Boat Size (Metric) - CreatedAt / UpdatedAt (ISO strings, useful for cache invalidation) Booleans pass through as nullable to preserve NocoDB's tri-state checkbox semantics (true / false / unset). Test fixtures cover the new fields end-to-end including the null-passthrough case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,17 @@ export interface PublicBerth {
|
||||
'Bollard Capacity': string | null;
|
||||
'Nominal Boat Size': number | null;
|
||||
Access: string | null;
|
||||
'Berth Approved': boolean | null;
|
||||
'Water Depth': number | null;
|
||||
'Width Is Minimum': boolean | null;
|
||||
'Water Depth Is Minimum': boolean | null;
|
||||
'Length (Metric)': number | null;
|
||||
'Width (Metric)': number | null;
|
||||
'Draft (Metric)': number | null;
|
||||
'Water Depth (Metric)': number | null;
|
||||
'Nominal Boat Size (Metric)': number | null;
|
||||
CreatedAt: string;
|
||||
UpdatedAt: string;
|
||||
'Map Data'?: PublicMapData;
|
||||
}
|
||||
|
||||
@@ -126,6 +137,17 @@ export function toPublicBerth(
|
||||
'Bollard Capacity': toString(berth.bollardCapacity),
|
||||
'Nominal Boat Size': toNumber(berth.nominalBoatSize),
|
||||
Access: toString(berth.access),
|
||||
'Berth Approved': berth.berthApproved,
|
||||
'Water Depth': toNumber(berth.waterDepth),
|
||||
'Width Is Minimum': berth.widthIsMinimum,
|
||||
'Water Depth Is Minimum': berth.waterDepthIsMinimum,
|
||||
'Length (Metric)': toNumber(berth.lengthM),
|
||||
'Width (Metric)': toNumber(berth.widthM),
|
||||
'Draft (Metric)': toNumber(berth.draftM),
|
||||
'Water Depth (Metric)': toNumber(berth.waterDepthM),
|
||||
'Nominal Boat Size (Metric)': toNumber(berth.nominalBoatSizeM),
|
||||
CreatedAt: berth.createdAt.toISOString(),
|
||||
UpdatedAt: berth.updatedAt.toISOString(),
|
||||
...(mapMapData(mapData) ? { 'Map Data': mapMapData(mapData)! } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user