document db no longer storing complete template information in separate table:
- dropped table templates - altered table documents: template_id (ref into templates) → template (name of template) - templates are now picked up by the document registry Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
{#if templates}
|
||||
<select bind:value onchange={onchange}>
|
||||
<option value={0}>{caption}</option>
|
||||
{#each Object.entries(templates) as [id,template]}
|
||||
<option value={template.id}>{template.name}</option>
|
||||
{#each templates as template}
|
||||
<option value={template}>{template}</option>
|
||||
{/each}
|
||||
</select>
|
||||
{:else}
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
<th>{t('template')}:</th>
|
||||
<td>
|
||||
{#if editable}
|
||||
<TemplateSelector company={doc.company.id} bind:value={doc.template.id} onchange={() => update('template_id',doc.template.id)} />
|
||||
<TemplateSelector company={doc.company.id} bind:value={doc.template} onchange={() => update('template_id',doc.template)} />
|
||||
{:else}
|
||||
{doc.template.name}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user