preparing to add positions
This commit is contained in:
7
frontend/src/routes/document/EstimateList.svelte
Normal file
7
frontend/src/routes/document/EstimateList.svelte
Normal file
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<h1>Estimated Times</h1>
|
||||
</div>
|
||||
7
frontend/src/routes/document/ItemList.svelte
Normal file
7
frontend/src/routes/document/ItemList.svelte
Normal file
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<h1>Items</h1>
|
||||
</div>
|
||||
38
frontend/src/routes/document/PositionSelector.svelte
Normal file
38
frontend/src/routes/document/PositionSelector.svelte
Normal file
@@ -0,0 +1,38 @@
|
||||
<script>
|
||||
import { t } from '../../translations.svelte.js';
|
||||
import EstimateList from './EstimateList.svelte';
|
||||
import ItemList from './ItemList.svelte';
|
||||
import TimeList from './TimeList.svelte';
|
||||
|
||||
let { close = () => {}, doc = $bindable({}) } = $props();
|
||||
|
||||
let select = $state(0);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
div{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0,0,0,0.8);
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div>
|
||||
<span class="tabs">
|
||||
<button onclick={() => select=0}>{t('document.items')}</button>
|
||||
<button onclick={() => select=1}>{t('document.timetrack')}</button>
|
||||
<button onclick={() => select=2}>{t('document.estimated_times')}</button>
|
||||
<button onclick={close}>{t('document.abort')}</button>
|
||||
</span>
|
||||
{#if select == 0}
|
||||
<ItemList />
|
||||
{:else if select == 1}
|
||||
<EstimateList />
|
||||
{:else}
|
||||
<TimeList />
|
||||
{/if}
|
||||
</div>
|
||||
7
frontend/src/routes/document/TimeList.svelte
Normal file
7
frontend/src/routes/document/TimeList.svelte
Normal file
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<h1>Times</h1>
|
||||
</div>
|
||||
@@ -6,11 +6,13 @@
|
||||
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
||||
import MultilineEditor from '../../Components/MultilineEditor.svelte';
|
||||
import PositionList from './PositionList.svelte';
|
||||
import PositionSelector from './PositionSelector.svelte';
|
||||
import StateSelector from './StateSelector.svelte';
|
||||
import TemplateSelector from './TemplateSelector.svelte';
|
||||
let { id } = $props();
|
||||
let error = null;
|
||||
let doc = $state(null);
|
||||
let position_select = $state(false);
|
||||
|
||||
let editable = $derived(doc.state == 1);
|
||||
|
||||
@@ -167,7 +169,10 @@
|
||||
<MarkdownEditor bind:value={doc.head} editable={editable} onSet={(val) => submit('head',val)} />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{t('document.positions')}</legend>
|
||||
<legend>
|
||||
{t('document.positions')}
|
||||
<button onclick={() => position_select = true}>{t('document.add_position')}</button>
|
||||
</legend>
|
||||
<PositionList bind:document={doc} {submit} />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@@ -179,3 +184,7 @@
|
||||
<span class="error">laden!</span>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
{#if position_select}
|
||||
<PositionSelector close={() => position_select=false} {doc} />
|
||||
{/if}
|
||||
@@ -5,6 +5,7 @@
|
||||
"document": {
|
||||
"actions": "Aktionen",
|
||||
"add_new": "{0} anlegen",
|
||||
"add_position": "hinzufügen",
|
||||
"amount": "Menge",
|
||||
"bank_account": "Bankverbindung",
|
||||
"code": "Code",
|
||||
|
||||
Reference in New Issue
Block a user