worked on notes
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import { checkUser, tryLogin } from '../user.svelte.js';
|
||||
import { useTinyRouter } from 'svelte-tiny-router';
|
||||
|
||||
let credentials = { username : null, password : null }
|
||||
let credentials = $state({ username : null, password : null });
|
||||
let services = $state([]);
|
||||
const router = useTinyRouter();
|
||||
|
||||
|
||||
@@ -139,5 +139,5 @@
|
||||
{t('sender_local_court')}
|
||||
</label>
|
||||
</fieldset>
|
||||
<button onclick={submit}>{t('create_new')}</button>
|
||||
<button onclick={submit}>{t('create_new_document')}</button>
|
||||
</fieldset>
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
async function loadCompanies(){
|
||||
const url = `${location.protocol}//${location.host.replace('5173','8080')}/api/company/list`;
|
||||
var resp = await fetch(url,{ credentials: 'include'});
|
||||
const resp = await fetch(url,{ credentials: 'include'});
|
||||
if (resp.ok){
|
||||
companies = await resp.json();
|
||||
} else {
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
if (company_id) {
|
||||
for (var comp of companies){
|
||||
for (let comp of companies){
|
||||
if (comp.id == company_id){
|
||||
load(comp);
|
||||
break;
|
||||
@@ -77,7 +77,7 @@
|
||||
</script>
|
||||
|
||||
<fieldset>
|
||||
<legend>{selected_company ? t( 'list_of',selected_company.name) : t('document.list')}</legend>
|
||||
<legend>{selected_company ? t( 'list_of',selected_company.name) : t('document_list')}</legend>
|
||||
{#if error}
|
||||
<div class="error">{error}</div>
|
||||
{/if}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import {onMount} from 'svelte';
|
||||
import {t} from '../../translations.svelte.js';
|
||||
let { caption, value = $bindable(0), onchange = () => console.log('changed')} = $props();
|
||||
let message = t('document.loading');
|
||||
let message = t('loading');
|
||||
let types = $state(null);
|
||||
|
||||
async function loadTypes(){
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import LineEditor from '../../Components/LineEditor.svelte';
|
||||
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
||||
import MultilineEditor from '../../Components/MultilineEditor.svelte';
|
||||
import Notes from '../notes/List.svelte';
|
||||
import PositionList from './PositionList.svelte';
|
||||
import PositionSelector from './PositionSelector.svelte';
|
||||
import StateSelector from './StateSelector.svelte';
|
||||
@@ -229,16 +230,13 @@
|
||||
<button onclick={render} disabled={pdfDisabled}>{t('create_pdf')}</button>
|
||||
<button onclick={() => router.navigate(`/document/${doc.id}/send`)} >{t('send_document')}</button>
|
||||
</fieldset>
|
||||
{#if user.name == 'Stephan Richter'}
|
||||
<fieldset>
|
||||
<legend>TODO</legend>
|
||||
<ul>
|
||||
<li>Preise in der Tabelle neu berechnen, wenn Positionen geändert werden</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<div class="notes">
|
||||
<h3>{t('notes')}</h3>
|
||||
<Notes module="document" entity_id={id} />
|
||||
</div>
|
||||
|
||||
{#if position_select}
|
||||
<PositionSelector close={() => position_select=false} {doc} onSelect={addPosition} />
|
||||
{/if}
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
parent_task = await resp.json();
|
||||
task.parent_task_id = +parent_task_id;
|
||||
project_id = parent_task.project_id;
|
||||
console.log({prj:project_id});
|
||||
error = null;
|
||||
project = null; // TODO
|
||||
} else {
|
||||
@@ -64,7 +63,8 @@
|
||||
if (resp.ok){
|
||||
project = await resp.json();
|
||||
task.project_id = +project_id;
|
||||
task.members = JSON.parse(JSON.stringify(parent_task?parent_task.members:project.members)); // deep copy
|
||||
let member_source = parent_task?parent_task.members:project.members;
|
||||
task.members = JSON.parse(JSON.stringify(member_source)); // deep copy
|
||||
error = null;
|
||||
} else {
|
||||
error = await resp.text();
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
<StateSelector selected={task.status.code} onchange={val => update({status:val})} project_id={task.project_id} />
|
||||
</td>
|
||||
</tr>
|
||||
{#if task.description.rendered}
|
||||
{#if task.description.source}
|
||||
<tr>
|
||||
<th>{t('description')}</th>
|
||||
<td class="description">
|
||||
|
||||
Reference in New Issue
Block a user