Skip to content

Commit

Permalink
board member - working
Browse files Browse the repository at this point in the history
  • Loading branch information
practice-golang committed Mar 27, 2024
1 parent 1fa32fd commit 5896b0f
Show file tree
Hide file tree
Showing 24 changed files with 81 additions and 24 deletions.
30 changes: 30 additions & 0 deletions frontend/admin/src/routes/board-list/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { onMount, onDestroy, beforeUpdate, afterUpdate } from "svelte";
import { invalidateAll } from "$app/navigation";
import { page } from "$app/stores";
import BoardMember from "./board-member.svelte";
import "$lib/styles/table.css";
Expand Down Expand Up @@ -233,6 +234,17 @@
invalidateAll();
}
let boardMember;
let dialogTitle;
let dialogMessage;
function openBoardMemberDialog() {
dialogTitle = "Board member";
dialogMessage = "Hello!!";
boardMember.showModal();
boardMember.title = "hahaha";
}
onMount(() => {});
afterUpdate(() => {
Expand All @@ -245,6 +257,12 @@
});
</script>

<BoardMember
bind:BoardMember={boardMember}
title={dialogTitle}
message={dialogMessage}
/>

<h1>Boards</h1>

<button
Expand Down Expand Up @@ -284,6 +302,10 @@
{/each}
</select>

<dialog>
<h2>Hello dialog!!</h2>
</dialog>

<table id="boards-list-container">
<thead>
<tr>
Expand Down Expand Up @@ -438,6 +460,14 @@
{/each}

<td>
<!-- <button
type="button"
on:click={() => {
openBoardMemberDialog();
}}
>
Members
</button> -->
<button
type="button"
on:click={() => {
Expand Down
25 changes: 25 additions & 0 deletions frontend/admin/src/routes/board-list/board-member.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script>
export let BoardMember;
export let title;
export let message;
function closeDialog() {
BoardMember.close();
}
</script>

<dialog bind:this={BoardMember} on:close>
<h3>{title}</h3>
<p>{message}</p>
<button on:click={closeDialog}>Cancel</button>
</dialog>

<style>
dialog {
border: 1px solid gray;
width: 80vw;
height: 80vh;
position: fixed;
padding: 20px;
}
</style>
1 change: 1 addition & 0 deletions static/html/admin/_app/immutable/assets/3.757b6d73.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dialog.svelte-12pgist{border:1px solid gray;width:80vw;height:80vh;position:fixed;padding:20px}
1 change: 1 addition & 0 deletions static/html/admin/_app/immutable/assets/_page.757b6d73.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dialog.svelte-12pgist{border:1px solid gray;width:80vw;height:80vh;position:fixed;padding:20px}
1 change: 0 additions & 1 deletion static/html/admin/_app/immutable/chunks/index.ac44e828.js

This file was deleted.

1 change: 1 addition & 0 deletions static/html/admin/_app/immutable/chunks/index.ec07c336.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions static/html/admin/_app/immutable/chunks/paths.729c82dc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var s;const e=((s=globalThis.__sveltekit_17h019z)==null?void 0:s.base)??"/admin";var a;const t=((a=globalThis.__sveltekit_17h019z)==null?void 0:a.assets)??e;export{t as a,e as b};
1 change: 0 additions & 1 deletion static/html/admin/_app/immutable/chunks/paths.d283bbe0.js

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Loading

0 comments on commit 5896b0f

Please sign in to comment.