Skip to content

Commit

Permalink
Merge pull request #710 from intuitem/quick_cleanup
Browse files Browse the repository at this point in the history
quick cleanup
  • Loading branch information
monsieurswag authored Aug 7, 2024
2 parents 36d6f25 + 9e4ae20 commit 959faab
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions frontend/src/routes/(app)/users/[id=uuid]/edit/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
<script lang="ts">
import type { PageData } from './$types';
import { page } from '$app/stores';
import ModelForm from '$lib/components/Forms/ModelForm.svelte';
import { UserEditSchema } from '$lib/utils/schemas';
import { page } from '$app/stores';
import { breadcrumbObject } from '$lib/utils/stores';
import type { PageData } from './$types';
import * as m from '$paraglide/messages';
import { goto } from '$app/navigation';
export let data: PageData;
breadcrumbObject.set(data.object);
let debugStyle = '';
let debugClicked = false;
$: if (debugClicked) {
debugStyle = 'border: 50px solid violet;';
} else {
debugStyle = '';
}
let debugCodeElem = null;
let debugText = '...';
</script>

<code style="font-size: 32px;border: 10px solid blue;" bind:this={debugCodeElem}>{debugText}</code>
<div class="card bg-white shadow p-4">
<ModelForm form={data.form} schema={UserEditSchema} model={data.model} />
</div>
<div style={debugStyle} class="card bg-white shadow p-4 mt-2">
<div class="card bg-white shadow p-4 mt-2">
<p class="text-gray-500 text-sm">
{m.setTemporaryPassword1()}
<a
href="{$page.url.pathname}/set-password"
class="text-primary-700 hover:text-primary-500"
data-testid="set-password-btn"
on:click={(e) => {
debugClicked = !debugClicked;
goto(`${$page.url.pathname}/set-password`)
.then((res) => {
debugText = `[THEN] ${res}`;
})
.catch((err) => {
debugText = `[CATCH] ${err}`;
});
}}>{m.setTemporaryPassword()}</a
data-testid="set-password-btn">{m.setTemporaryPassword()}</a
>. {m.setTemporaryPassword2()}.
</p>
</div>

0 comments on commit 959faab

Please sign in to comment.