From 3a94e213496e16e5469caaaa9e41a48544354593 Mon Sep 17 00:00:00 2001 From: THIS ONE IS A LITTLE BIT TRICKY KRUB Date: Wed, 9 Oct 2024 15:32:38 +0700 Subject: [PATCH 01/27] Refactor component and page structure for responsiveness, add project type selection to application page --- src/app/business/apply/page.tsx | 83 +++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 3 deletions(-) diff --git a/src/app/business/apply/page.tsx b/src/app/business/apply/page.tsx index 7e4d166..1878fdd 100644 --- a/src/app/business/apply/page.tsx +++ b/src/app/business/apply/page.tsx @@ -21,6 +21,7 @@ export default function Apply() { const [isForSale, setIsForSale] = useState(""); const [isGenerating, setIsGenarting] = useState(""); const [pitch, setPitch] = useState(""); + const [projectType, setProjectType] = useState([]); const communitySize = [ "N/A", "0-5K", @@ -40,13 +41,28 @@ export default function Apply() { console.error(error); } else { if (BusinessType) { - console.table(); + // console.table(); setIndustry(BusinessType.map((item) => item.value)); } } }; + const fetchProjectType = async () => { + let { data: ProjectType, error } = await supabase + .from("ProjectType") + .select("value"); + + if (error) { + console.error(error); + } else { + if (ProjectType) { + console.table(ProjectType); + setProjectType(ProjectType.map((item) => item.value)); + } + } + }; useEffect(() => { fetchIndustry(); + fetchProjectType(); }, []); return (
@@ -65,7 +81,7 @@ export default function Apply() {

-
+

About your company

All requested information in this section is required. @@ -289,9 +305,70 @@ export default function Apply() {

+ + {/* apply first project */} +
+ {/* header */} +
+

+ Begin Your First Fundraising Project +

+

+ Starting a fundraising project is mandatory for all businesses. This + step is crucial
+ to begin your journey and unlock the necessary tools for raising + funds. +

+ + {/* project's name */} +
+ +
+ +
+
+ + {/* project type */} +
+ +
+ + + Please specify the primary purpose of the funds + +
+
+ + {/* short description */} +
+ +
+ +
+
+
+
{/* Submit */}
-
From c93b05ab45b18239cc0c1ef436b1424bbc3b0345 Mon Sep 17 00:00:00 2001 From: THIS ONE IS A LITTLE BIT TRICKY KRUB Date: Wed, 9 Oct 2024 15:41:35 +0700 Subject: [PATCH 02/27] Refactor component and page structure for responsiveness, add textarea component for project description and pitch deck --- src/app/business/apply/page.tsx | 58 +++++++++++++++++++++++++++++---- src/components/ui/textarea.tsx | 24 ++++++++++++++ 2 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 src/components/ui/textarea.tsx diff --git a/src/app/business/apply/page.tsx b/src/app/business/apply/page.tsx index 1878fdd..5ac5ad8 100644 --- a/src/app/business/apply/page.tsx +++ b/src/app/business/apply/page.tsx @@ -13,6 +13,7 @@ import { } from "@/components/ui/select"; import { createSupabaseClient } from "@/lib/supabase/clientComponentClient"; import { useEffect, useState } from "react"; +import { Textarea } from "@/components/ui/textarea"; export default function Apply() { let supabase = createSupabaseClient(); @@ -20,8 +21,9 @@ export default function Apply() { const [isInUS, setIsInUS] = useState(""); const [isForSale, setIsForSale] = useState(""); const [isGenerating, setIsGenarting] = useState(""); - const [pitch, setPitch] = useState(""); + const [businessPitch, setBusinessPitch] = useState(""); const [projectType, setProjectType] = useState([]); + const [projectPitch, setProjectPitch] = useState(""); const communitySize = [ "N/A", "0-5K", @@ -245,15 +247,15 @@ export default function Apply() {
- +