Skip to content

Commit eff4740

Browse files
fix: pdf generation for on the reservation page
Previously the JSON template lost its opening {, and after the recent async change the PDF flow now waits on that malformed JSON, so .done() never runs and the button appears dead. Also add some default values if `null` values are present
1 parent 098b48f commit eff4740

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
{ldelim}
12
{if $Attributes|default:array()|count > 0}
23
{foreach from=$Attributes item=attribute name=attributes}
34
"{$attribute->Id()}" :
45
[ "{$attribute->Type()}" ,
5-
"{$attribute->Label()|escape:'json'}" ,
6+
"{$attribute->Label()|default:''|escape:'json'}" ,
67
{if $attribute->Type() eq '5'}
7-
"{formatdate date=$attribute->Value() key=embedded_datetime}" ] {if $smarty.foreach.attributes.last}{else},{/if}
8+
"{if $attribute->Value() neq null}{formatdate date=$attribute->Value() key=embedded_datetime}{/if}" ] {if $smarty.foreach.attributes.last}{else},{/if}
89
{else}
9-
"{$attribute->Value()|escape:'json'}" ] {if $smarty.foreach.attributes.last}{else},{/if}
10+
"{$attribute->Value()|default:''|escape:'json'}" ] {if $smarty.foreach.attributes.last}{else},{/if}
1011
{/if}
1112
{/foreach}
1213
{/if}
13-
}
14+
{rdelim}

0 commit comments

Comments
 (0)