Skip to content

Commit

Permalink
remove excessive debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
MaHaWo committed Oct 22, 2024
1 parent 3708b30 commit ad4ef8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions frontend/src/lib/components/DataInput/DataInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
$: valid = evalValid(value);
$: highlight = !valid && properties.required === true;
$: showTextField = checkShowTextfield(value);
$: console.log('props: ', properties, 'disabled: ', properties.disabled);
</script>

{#if label}
Expand All @@ -64,7 +63,7 @@
<svelte:component
this={component}
class={highlight
? 'rounded border-2 border-primary-600 dark:border-primary-600 ' + componentClass
? 'border-primary-600 dark:border-primary-600 rounded border-2 ' + componentClass
: componentClass}
bind:value
{...properties}
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/lib/components/UserDataInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@
}
console.log('onmount done: ', data);
});
$: console.log(data, dataIsCurrent);
</script>

<!-- Show big alert message when something is missing -->
Expand Down Expand Up @@ -200,20 +198,24 @@
{#if dataIsCurrent === true}
<Button
type="button"
class="dark:bg-primay-700 w-full bg-primary-700 text-center text-sm text-white hover:bg-primary-800 hover:text-white dark:hover:bg-primary-800"
class="dark:bg-primay-700 bg-primary-700 hover:bg-primary-800 dark:hover:bg-primary-800 w-full text-center text-sm text-white hover:text-white"
on:click={() => {
console.log('dataiscurrent click');
for (let element of data) {
element.props.disabled = false;
}

// README: this forces a rerender. It is necessary because svelte does not react to nested references being changed. There must be a better solution to this? Svelte 5 runes would be one that comes to mind.
data = [...data];

dataIsCurrent = false;
}}
>
<div class="flex items-center justify-center">{$_('userData.changeData')}</div>
</Button>
{:else}
<Button
class="dark:bg-primay-700 w-full bg-primary-700 text-center text-sm text-white hover:bg-primary-800 hover:text-white dark:hover:bg-primary-800"
class="dark:bg-primay-700 bg-primary-700 hover:bg-primary-800 dark:hover:bg-primary-800 w-full text-center text-sm text-white hover:text-white"
type="submit">{$_('userData.submitButtonLabel')}</Button
>
{/if}
Expand Down

0 comments on commit ad4ef8c

Please sign in to comment.