Skip to content

Commit

Permalink
Revert map_floors key for level LL [MA-157]
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgarwood committed Feb 21, 2024
1 parent 78e90b0 commit 232beb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Models/Transformers/FloorTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ class FloorTransformer extends TransformerAbstract
public function transform(TwillModelContract $floor)
{
$floorPlan = $floor->fileObject('floor_plan');
// For backward compatibility, the key for level LL must be 'map_floor0'.
$mapFloor = $floor->level == 'LL' ? '0' : $floor->level;
return [
"map_floor$floor->level" => [
"map_floor$mapFloor" => [
'label' => $floor->level,
'floor_plan' => $floorPlan ? secure_url('storage/uploads/' . $floorPlan?->uuid) : null,
'anchor_pixel_1' => Floor::ANCHOR_PIXELS[0],
Expand Down

0 comments on commit 232beb0

Please sign in to comment.