improved handling of null values when mapping entities to json
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { t } from '../../translations.svelte.js';
|
||||
|
||||
import CompanySelector from '../../Components/CompanySelector.svelte';
|
||||
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
||||
import Settings from './Settings.svelte';
|
||||
let showSettings = $state(false);
|
||||
let ready = $derived(!!project.name.trim())
|
||||
@@ -11,7 +12,7 @@
|
||||
|
||||
let project = $state({
|
||||
name:'',
|
||||
description:'',
|
||||
description : { source : '', rendered : '' },
|
||||
settings:{
|
||||
show_closed:false
|
||||
}
|
||||
@@ -53,21 +54,44 @@
|
||||
</legend>
|
||||
<fieldset>
|
||||
<legend>{t('basic_data')}</legend>
|
||||
<label>
|
||||
<CompanySelector caption={t('no_company')} {onselect} />
|
||||
{t('company_optional')}
|
||||
</label>
|
||||
<label>
|
||||
<input type="text" bind:value={project.name}/>
|
||||
{t('Name')}
|
||||
</label>
|
||||
<label>
|
||||
<textarea bind:value={project.description}></textarea>
|
||||
{t('description')}
|
||||
</label>
|
||||
{#if !showSettings}
|
||||
<button onclick={() => showSettings = true}>{t('extended_settings')}</button>
|
||||
{/if}
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{t('company_optional')}
|
||||
</th>
|
||||
<td>
|
||||
<CompanySelector caption={t('no_company')} {onselect} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{t('Name')}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" bind:value={project.name}/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{t('description')}
|
||||
</th>
|
||||
<td>
|
||||
<MarkdownEditor bind:value={project.description} simple={true} />
|
||||
</td>
|
||||
</tr>
|
||||
{#if !showSettings}
|
||||
<tr>
|
||||
<th>
|
||||
{t('settings')}
|
||||
</th>
|
||||
<td>
|
||||
<button onclick={() => showSettings = true}>{t('extended_settings')}</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
{#if showSettings}
|
||||
<Settings bind:settings={project.settings}/>
|
||||
|
||||
Reference in New Issue
Block a user