From 1c43850d400c521c23b506121698516c8ee14c95 Mon Sep 17 00:00:00 2001 From: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:30:35 +0900 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit a0c4dc9e493d58a0c7813cdd01fb24f13d707cef Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Mon Nov 4 19:33:03 2024 +0900 🚧 見た目制作 commit b3edd6fb38ba10659967041133f986393e9374bc Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Thu Oct 31 18:28:48 2024 +0900 Squashed commit of the following: commit 07e4abb44a5bf508aba8b5689a6616d5acdae866 Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Thu Oct 31 18:23:37 2024 +0900 Squashed commit of the following: commit 3f0ad5ab20e1464d091660b9a8b064e1cda2437f Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Thu Oct 31 18:20:39 2024 +0900 🚧 bun run test commit c50c27fc3b3988646fcf1ecb51aa8191beed92ac Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Thu Oct 31 18:19:05 2024 +0900 🚧 スタイル以外作成 commit f5e3c98fa97d00e5c2b9000a68ded7c2abb5f1dd Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Thu Oct 31 16:08:31 2024 +0900 🚧 toasterを修正 commit 312c97edfda418f840ef269d24e85a2325989ae3 Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Thu Oct 31 14:30:01 2024 +0900 🚧 toaster改善 commit 67252531d21b3fb23d0f9ab0d72b2e412c4ee64d Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Thu Oct 31 14:02:04 2024 +0900 🚧 test commit 90955f58da2e3775c2211d309efa6eda0769a300 Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Thu Oct 31 12:09:01 2024 +0900 🚧 エラーをtoaster表示へ移行 commit c12d24be1264b7d741e30925c7a7e8d830acc89c Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Wed Oct 30 02:20:56 2024 +0900 🚧 dialog表示の根本完成 TODO: ダイアログの表示を完成させる commit 431159386918a0b092cb143f4f2bb1e97b3c9452 Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Fri Oct 25 17:22:51 2024 +0900 🚧 useForm設定完了 commit e79f00fb9400f21a4c93e12519f6e9043e750e68 Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Wed Oct 23 19:51:33 2024 +0900 🚧 useForm前コミット commit 6f322da05bb98909b5ccd927f044e2f015b8da77 Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Mon Oct 21 23:58:39 2024 +0900 🚧 フォーム作成 datePickerがよくない commit 9e0ec940fa19d4334eae1ed6a4d40de03caed37a Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Mon Oct 21 02:45:23 2024 +0900 🚧 company-form 制作開始 commit a432378fc45fe9a4caacb9256b52c876b304b9a6 Author: wappon28dev Date: Thu Oct 31 04:30:01 2024 +0900 ✨ テリトリーからシードを割り出せられるように commit cafc9b080d9e5f7047d89be858ef829968146711 Author: wappon28dev Date: Thu Oct 31 02:24:47 2024 +0900 🎨 .prettierrc が尊重されていない…… commit f56eb0d254a222f8487fed980efa3540208cbde6 Author: nasubi916 Date: Thu Oct 31 02:14:42 2024 +0900 sql demo data insert commit 7bab2d0dcc374cd20568ff09db95272b720d03fe Author: nasubi916 Date: Wed Oct 30 10:06:30 2024 +0900 bun run test commit 1dca0a0d44ca629cd64d897016cd5c2719d0c0b9 Author: nasubi916 Date: Wed Oct 30 10:02:29 2024 +0900 squash commit 3ca859dce9918b8b733d41e6876ae6eab5953868 Author: wappon28dev Date: Wed Oct 30 09:44:00 2024 +0900 ✨ `calcStatus` の実装 commit 5bc8c106f971c28cebdcd4f05dbb86656d8438fe Author: wappon28dev Date: Sun Oct 27 03:52:26 2024 +0900 ✨ TableConfig を具象クラスのジェネリクスに追加, factories に fromUserId とか追加 commit 5be56b9b9aac88b3d485e90e058a6709cf006561 Author: nasubi916 Date: Sat Oct 26 17:49:32 2024 +0900 miss commit 3056ae93e0d75fbd23a8994c9255deedddeca1ab Author: nasubi916 Date: Sat Oct 26 17:49:12 2024 +0900 squash merge commit 9097c4c43ee09bb7b42fe6db7afc328c04447301 Author: wappon28dev 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 48ed9081626192940f98eee28a0c708ef993d308 Author: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Sun Oct 27 00:32:17 2024 +0900 first commit --- src/components/sva/contactField.ts | 56 ++++++++++ src/routes/contact/index.tsx | 100 +++++++++++++++++- .../20241030185409_add-db-fn-of-seeds.sql | 12 +++ 3 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 src/components/sva/contactField.ts create mode 100644 supabase/migrations/20241030185409_add-db-fn-of-seeds.sql diff --git a/src/components/sva/contactField.ts b/src/components/sva/contactField.ts new file mode 100644 index 0000000..d77c573 --- /dev/null +++ b/src/components/sva/contactField.ts @@ -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", + height: "200px", + rounded: "md", + shadow: "md", + duration: "200ms", + width: "100%", + }, + select: { + p: "2", + bg: "white.0", + border: "1px solid", + rounded: "md", + shadow: "md", + duration: "200ms", + }, + input: { + p: "2", + bg: "white.0", + rounded: "md", + shadow: "md", + width: "100%", + _open: { + // + }, + _closed: { + // + }, + }, + }, +}); diff --git a/src/routes/contact/index.tsx b/src/routes/contact/index.tsx index 5bc7300..dd9bf74 100644 --- a/src/routes/contact/index.tsx +++ b/src/routes/contact/index.tsx @@ -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: () =>
Hello /contact/!
, + component: () => { + const contactField = svaContactField(); + const { register } = useForm(); + + type FormData = { + mail: string; + name: string; + subject: string; + content: string; + }; + + return ( + + + + Contact + + +
+ + + + + メールアドレス* + + + + + + + + + + お名前* + + + + + + + + + + 件名* + + + + + + + + + + 本文* + + + + + + + + + + + + +
+
+ ); + }, }); diff --git a/supabase/migrations/20241030185409_add-db-fn-of-seeds.sql b/supabase/migrations/20241030185409_add-db-fn-of-seeds.sql new file mode 100644 index 0000000..03358b0 --- /dev/null +++ b/supabase/migrations/20241030185409_add-db-fn-of-seeds.sql @@ -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 $;