From 4b42c5235482fe0d3811b4e2936614c79e20d970 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 15 Oct 2022 16:40:58 +0800 Subject: feat: !WIP start of create project page --- code/app/src/routes/(main)/(app)/+layout.svelte | 4 +- .../src/routes/(main)/(app)/projects/+page.svelte | 150 ++++++++++----------- .../routes/(main)/(app)/projects/new/+page.svelte | 43 ++++++ 3 files changed, 119 insertions(+), 78 deletions(-) create mode 100644 code/app/src/routes/(main)/(app)/projects/new/+page.svelte (limited to 'code') diff --git a/code/app/src/routes/(main)/(app)/+layout.svelte b/code/app/src/routes/(main)/(app)/+layout.svelte index 0be6ff3..ad8f3ce 100644 --- a/code/app/src/routes/(main)/(app)/+layout.svelte +++ b/code/app/src/routes/(main)/(app)/+layout.svelte @@ -12,7 +12,7 @@ } from "$lib/components/icons"; import { Dialog, Menu, MenuButton, MenuItem, MenuItems, Transition, TransitionChild, TransitionRoot } from "@rgossiaux/svelte-headlessui"; import { DialogPanel } from "@developermuch/dev-svelte-headlessui"; - import type { ISession } from "$lib/models/ISession"; + import type { ISession } from "$lib/models/internal/ISession"; import { Input } from "$lib/components"; import { end_session } from "$lib/session"; import { goto } from "$app/navigation"; @@ -290,7 +290,7 @@ -
+
diff --git a/code/app/src/routes/(main)/(app)/projects/+page.svelte b/code/app/src/routes/(main)/(app)/projects/+page.svelte index ceb08b4..55e9372 100644 --- a/code/app/src/routes/(main)/(app)/projects/+page.svelte +++ b/code/app/src/routes/(main)/(app)/projects/+page.svelte @@ -21,7 +21,7 @@ tempProjects.push({ id: crypto.randomUUID(), name: faker.word.preposition(), - start: Temporal.Now.plainDateISO(), + start: Temporal.Now.plainDateISO().toLocaleString(), description: faker.lorem.words(3), members: [], status: ProjectStatus.IDLE, @@ -52,85 +52,83 @@ const { filterValue } = pluginStates.filter; -
-
-
-

Projects

-

A list of all the projects in your organsation.

-
-
- -
+
+
+

Projects

+

A list of all the projects in your organsation.

-
- - - {#each $headerRows as headerRow (headerRow.id)} - - - {#each headerRow.cells as cell (cell.id)} - - + + {/each} + + + {/each} + + + {#each $rows as row (row.id)} + + + {#each row.cells as cell (cell.id)} + {@const materialisedCell = cell.render()} + + + + {/each} + + + {/each} + +
-
- - + +
+ +
+ + + {#each $headerRows as headerRow (headerRow.id)} + + + {#each headerRow.cells as cell (cell.id)} + + - - {/each} - - - {/each} - - - {#each $rows as row (row.id)} - - - {#each row.cells as cell (cell.id)} - {@const materialisedCell = cell.render()} - - - - {/each} - - - {/each} - -
+
+ + - {#if props.sort.order === "asc"} - - {:else if props.sort.order === "desc"} - - {:else if !props.sort.disabled} - - {/if} - - {#if cell.id === "status"} - + > + {#if props.sort.order === "asc"} + + {:else if props.sort.order === "desc"} + + {:else if !props.sort.disabled} + {/if} -
-
- {#if cell.id === "name"} - goto_project(materialisedCell.toString())}> - + + {#if cell.id === "status"} + - {:else if cell.id === "status"} - - {:else} - {/if} -
-
+ +
+ {#if cell.id === "name"} + goto_project(materialisedCell.toString())}> + + + {:else if cell.id === "status"} + + {:else} + + {/if} +
diff --git a/code/app/src/routes/(main)/(app)/projects/new/+page.svelte b/code/app/src/routes/(main)/(app)/projects/new/+page.svelte new file mode 100644 index 0000000..4c453dc --- /dev/null +++ b/code/app/src/routes/(main)/(app)/projects/new/+page.svelte @@ -0,0 +1,43 @@ + + +

Create a new project

+
+ +