Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit a0c4dc9
Author: ROTO0504 <[email protected]>
Date:   Mon Nov 4 19:33:03 2024 +0900

    🚧 見た目制作

commit b3edd6f
Author: ROTO0504 <[email protected]>
Date:   Thu Oct 31 18:28:48 2024 +0900

    Squashed commit of the following:

    commit 07e4abb
    Author: ROTO0504 <[email protected]>
    Date:   Thu Oct 31 18:23:37 2024 +0900

        Squashed commit of the following:

        commit 3f0ad5a
        Author: ROTO0504 <[email protected]>
        Date:   Thu Oct 31 18:20:39 2024 +0900

            🚧 bun run test

        commit c50c27f
        Author: ROTO0504 <[email protected]>
        Date:   Thu Oct 31 18:19:05 2024 +0900

            🚧 スタイル以外作成

        commit f5e3c98
        Author: ROTO0504 <[email protected]>
        Date:   Thu Oct 31 16:08:31 2024 +0900

            🚧 toasterを修正

        commit 312c97e
        Author: ROTO0504 <[email protected]>
        Date:   Thu Oct 31 14:30:01 2024 +0900

            🚧 toaster改善

        commit 6725253
        Author: ROTO0504 <[email protected]>
        Date:   Thu Oct 31 14:02:04 2024 +0900

            🚧 test

        commit 90955f5
        Author: ROTO0504 <[email protected]>
        Date:   Thu Oct 31 12:09:01 2024 +0900

            🚧 エラーをtoaster表示へ移行

        commit c12d24b
        Author: ROTO0504 <[email protected]>
        Date:   Wed Oct 30 02:20:56 2024 +0900

            🚧 dialog表示の根本完成
            TODO: ダイアログの表示を完成させる

        commit 4311593
        Author: ROTO0504 <[email protected]>
        Date:   Fri Oct 25 17:22:51 2024 +0900

            🚧  useForm設定完了

        commit e79f00f
        Author: ROTO0504 <[email protected]>
        Date:   Wed Oct 23 19:51:33 2024 +0900

            🚧 useForm前コミット

        commit 6f322da
        Author: ROTO0504 <[email protected]>
        Date:   Mon Oct 21 23:58:39 2024 +0900

            🚧 フォーム作成
            datePickerがよくない

        commit 9e0ec94
        Author: ROTO0504 <[email protected]>
        Date:   Mon Oct 21 02:45:23 2024 +0900

            🚧 company-form 制作開始

    commit a432378
    Author: wappon28dev <[email protected]>
    Date:   Thu Oct 31 04:30:01 2024 +0900

        ✨ テリトリーからシードを割り出せられるように

    commit cafc9b0
    Author: wappon28dev <[email protected]>
    Date:   Thu Oct 31 02:24:47 2024 +0900

        🎨 .prettierrc が尊重されていない……

    commit f56eb0d
    Author: nasubi916 <[email protected]>
    Date:   Thu Oct 31 02:14:42 2024 +0900

        sql demo data insert

    commit 7bab2d0
    Author: nasubi916 <[email protected]>
    Date:   Wed Oct 30 10:06:30 2024 +0900

        bun run test

    commit 1dca0a0
    Author: nasubi916 <[email protected]>
    Date:   Wed Oct 30 10:02:29 2024 +0900

        squash

    commit 3ca859d
    Author: wappon28dev <[email protected]>
    Date:   Wed Oct 30 09:44:00 2024 +0900

        ✨ `calcStatus` の実装

    commit 5bc8c10
    Author: wappon28dev <[email protected]>
    Date:   Sun Oct 27 03:52:26 2024 +0900

        ✨ TableConfig を具象クラスのジェネリクスに追加, factories に fromUserId とか追加

    commit 5be56b9
    Author: nasubi916 <[email protected]>
    Date:   Sat Oct 26 17:49:32 2024 +0900

        miss

    commit 3056ae9
    Author: nasubi916 <[email protected]>
    Date:   Sat Oct 26 17:49:12 2024 +0900

        squash merge

    commit 9097c4c
    Author: wappon28dev <[email protected]>
    Date:   Sat Oct 26 16:50:04 2024 +0900

        ✨ Table 抽象クラスとエラーハンドリング

        - テーブルごとにクラスを実装
          - comments
          - fruits
          - pledges
          - reports
          - sponsor-data
          - categorys
          - projects
          - seeds
          - sowers
          - sponsors
          - territorys
          - users
        - エラーハンドリング追加
        - Table まわりの型ユーティリティーを追加

commit 48ed908
Author: ROTO0504 <[email protected]>
Date:   Sun Oct 27 00:32:17 2024 +0900

    first commit
  • Loading branch information
ROTO0504 committed Nov 5, 2024
1 parent 6f1b135 commit 1c43850
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 1 deletion.
56 changes: 56 additions & 0 deletions src/components/sva/contactField.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { fieldAnatomy } from "@ark-ui/react";
import { sva } from "panda/css";

/**
* Ark UI の [Popover コンポーネント](https://ark-ui.com/react/docs/components/popover) の基底スタイル
*
* 書き方 refs:
* - https://panda-css.com/docs/concepts/slot-recipes
* - https://ark-ui.com/react/docs/guides/styling#styling-with-panda-css
* - https://speakerdeck.com/ikumatadokoro/panda-css-to-ark-ui-dehazimeruge-ren-kai-fa?slide=31
*/
export const svaContactField = sva({
className: "ContactField",
slots: fieldAnatomy.keys(),
base: {
root: {
display: "grid",
gap: "0.5rem",
gridTemplateColumns: "1fr",
width: "100%",
maxWidth: "700px",
minWidth: "500px",
borderRadius: "md",
},
textarea: {
p: "2",
bg: "white.0",

Check warning on line 27 in src/components/sva/contactField.ts

View workflow job for this annotation

GitHub Actions / build

`white.0` is not a valid color token
height: "200px",
rounded: "md",
shadow: "md",
duration: "200ms",
width: "100%",
},
select: {
p: "2",
bg: "white.0",

Check warning on line 36 in src/components/sva/contactField.ts

View workflow job for this annotation

GitHub Actions / build

`white.0` is not a valid color token
border: "1px solid",
rounded: "md",
shadow: "md",
duration: "200ms",
},
input: {
p: "2",
bg: "white.0",

Check warning on line 44 in src/components/sva/contactField.ts

View workflow job for this annotation

GitHub Actions / build

`white.0` is not a valid color token
rounded: "md",
shadow: "md",
width: "100%",
_open: {
//
},
_closed: {
//
},
},
},
});
100 changes: 99 additions & 1 deletion src/routes/contact/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,103 @@
import { Field } from "@ark-ui/react";
import { createFileRoute } from "@tanstack/react-router";
import { styled as p } from "panda/jsx";
import { useForm } from "react-hook-form";
import { Button } from "@/components/cva/Button";
import { svaContactField } from "@/components/sva/contactField";

export const Route = createFileRoute("/contact/")({
component: () => <div>Hello /contact/!</div>,
component: () => {
const contactField = svaContactField();
const { register } = useForm<FormData>();

type FormData = {
mail: string;
name: string;
subject: string;
content: string;
};

return (
<p.div>
<p.div py={24}>
<p.h1 fontSize="4xl" fontWeight="bold" textAlign="center">
Contact
</p.h1>
</p.div>
<form>
<p.div>
<p.div display="flex" justifyContent="center">
<p.div>
<p.p fontSize="xl" fontWeight="bold" pb={2}>
メールアドレス*
</p.p>
<Field.Root className={contactField.root}>
<Field.Input
className={contactField.input}
{...register("mail", { required: true })}
/>
</Field.Root>
</p.div>
</p.div>
<p.div
display="flex"
justifyContent="center"
pt={{ base: 12, md: 12, xl: 24 }}
>
<p.div>
<p.p fontSize="xl" fontWeight="bold" pb={2}>
お名前*
</p.p>
<Field.Root className={contactField.root}>
<Field.Input
className={contactField.input}
{...register("name", { required: true })}
/>
</Field.Root>
</p.div>
</p.div>
<p.div
display="flex"
justifyContent="center"
pt={{ base: 12, md: 12, xl: 24 }}
>
<p.div>
<p.p fontSize="xl" fontWeight="bold" pb={2}>
件名*
</p.p>
<Field.Root className={contactField.root}>
<Field.Input
className={contactField.input}
{...register("subject", { required: true })}
/>
</Field.Root>
</p.div>
</p.div>
<p.div
display="flex"
justifyContent="center"
pt={{ base: 12, md: 12, xl: 24 }}
>
<p.div>
<p.p fontSize="xl" fontWeight="bold" pb={2}>
本文*
</p.p>
<Field.Root className={contactField.root}>
<Field.Textarea
className={contactField.textarea}
{...register("content", { required: true })}
/>
</Field.Root>
</p.div>
</p.div>
<p.div alignContent="center" py={24}>
<p.div display="flex" justifyContent="center">
<Button type="submit">送信</Button>
</p.div>
</p.div>
</p.div>
</form>
</p.div>
);
},
});
12 changes: 12 additions & 0 deletions supabase/migrations/20241030185409_add-db-fn-of-seeds.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set
check_function_bodies = off;

CREATE
OR REPLACE FUNCTION public.get_seeds_in_territory(territory_id uuid) RETURNS SETOF seeds LANGUAGE sql AS $ function $
select
s.*
from
seeds as s
join territories as t on st_contains(t.zone, s.location)
where
t.territory_id = territory_id $ function $;

0 comments on commit 1c43850

Please sign in to comment.