building out frontend and docker
This commit is contained in:
47
src/routes/admin/projects/new/+page.svelte
Normal file
47
src/routes/admin/projects/new/+page.svelte
Normal file
@@ -0,0 +1,47 @@
|
||||
<script lang="ts">
|
||||
import { enhance } from '$app/forms';
|
||||
import { resolve } from '$app/paths';
|
||||
import ProjectFields from '#lib/components/ProjectFields.svelte';
|
||||
import type { PageProps } from './$types';
|
||||
|
||||
let { form }: PageProps = $props();
|
||||
let saving = $state(false);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Add project | SharePoint to ACC sync</title>
|
||||
</svelte:head>
|
||||
|
||||
<div class="page">
|
||||
<div class="section">
|
||||
<a class="small" href={resolve('/admin')}>Back to projects</a>
|
||||
<h1>Add project</h1>
|
||||
<p class="muted">
|
||||
Pick the SharePoint folder to copy from and the ACC folder to copy into. The first sync starts
|
||||
within a few minutes, or right away with Run now.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form
|
||||
method="POST"
|
||||
class="form"
|
||||
use:enhance={() => {
|
||||
saving = true;
|
||||
return async ({ update }) => {
|
||||
await update({ reset: false });
|
||||
saving = false;
|
||||
};
|
||||
}}
|
||||
>
|
||||
{#if form?.error}
|
||||
<div class="notice tone-danger" role="alert">{form.error}</div>
|
||||
{/if}
|
||||
<ProjectFields values={form?.values ?? {}} />
|
||||
<div class="actions">
|
||||
<button class="button primary" disabled={saving}>
|
||||
{saving ? 'Checking folders…' : 'Add project'}
|
||||
</button>
|
||||
<a class="button" href={resolve('/admin')}>Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user