Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add career opening changes #119

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion frontend_v2/src/app/career/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default function JobPage({ params }: { params: { id: string } }) {
jobDescription,
responsibilities,
jobRequirements,
Qualifications,
} = data;

return (
Expand All @@ -46,7 +47,11 @@ export default function JobPage({ params }: { params: { id: string } }) {

<ItemWrapper title="Responsibilities" value={responsibilities} />

<ItemWrapper title="Job Requirements" value={jobRequirements} />
<ItemWrapper title="Qualifications" value={Qualifications} />

{jobRequirements && (
<ItemWrapper title="Job Requirements" value={jobRequirements} />
)}

<ApplicationModal />
{/* <Button variant={"bridgePrimary"}>
Expand Down
8 changes: 7 additions & 1 deletion frontend_v2/src/app/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,15 @@ export default function RegistrationPage() {
);

const result = await response.json();


if (result.success === false) {
console.log(result);
return toast.error(result.message);
}

//await sendResponse(result);

toast.success("Registration successful!", {
description: `Welcome aboard, ${userForm.name.split(" ")[0]}!`,
});
Expand All @@ -128,6 +131,9 @@ export default function RegistrationPage() {
}
};




const props = {
step,
nextStep,
Expand All @@ -138,7 +144,7 @@ export default function RegistrationPage() {
isRegistering,
};

const openDate = new Date("2024-10-14");
const openDate = new Date("2024-10-6");
const currentDate = new Date();
const isClose = currentDate < openDate;

Expand Down
2 changes: 1 addition & 1 deletion frontend_v2/src/components/career/Openings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function Openings() {
<CardFooter className="flex justify-end">
<Button
className="rounded-full px-12 py-6 border-2 ring-2 ring-red-300 dark:ring-red-500 border-[#E6272729] dark:border-red-500 bg-red-500/10 dark:bg-red-500/20 text-bridgeRed dark:text-white hover:bg-transparent dark:hover:bg-transparent"
onClick={() => router.push(`/career/${1}`)}
onClick={() => router.push(`/career/${job.id}`)}
>
See More
</Button>
Expand Down
89 changes: 85 additions & 4 deletions frontend_v2/src/components/shared/OtherInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { otherSchema } from "@/lib/validators";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import { z } from "zod";
import { useRouter } from "next/navigation";
import {
Form,
FormControl,
Expand All @@ -18,6 +19,7 @@ import { Input } from "../ui/input";
import CustomButton from "./CustomButton";
import { Loader2, MoveRight } from "lucide-react";
import { Textarea } from "../ui/textarea";
import { useState } from "react";

export default function OtherInformation({
step,
Expand All @@ -34,21 +36,44 @@ export default function OtherInformation({
isRegistering: boolean;
submitData: () => void;
}) {
const form = useForm<z.infer<typeof otherSchema>>({
// const router = useRouter();
const [isCheckboxChecked, setIsCheckboxChecked] = useState(false);

const form = useForm<z.infer<typeof otherSchema>>({
resolver: zodResolver(otherSchema),
defaultValues: {
duration:
formData?.course === "Web3 - Solidity" ? "4 Months" : "3 Months",
motivation: "",
achievement: "",
discount: "",
wallet_address: "",
cta: false
},
});


// 2. Define a submit handler.
function onSubmit(values: z.infer<typeof otherSchema>) {

setFormData({ ...formData, ...values });

// Check if a discount code is entered
if (values.discount) {
// Simulate discount code verification
const isDiscountValid = validateDiscountCode(values.discount);
if (!isDiscountValid) {
alert("Invalid discount code. Please try again.");
return;
}
}

function validateDiscountCode(code: string) {
const validCodes = ["DISCOUNT10", "WEB3BRIDGECOD3"];
return validCodes.includes(code);
}
submitData();
// router.push("/payment-success");
}

return (
Expand All @@ -61,7 +86,8 @@ export default function OtherInformation({
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="mt-6 flex flex-col items-center gap-4">
className="mt-6 flex flex-col items-center gap-4"
>
<FormField
control={form.control}
name="duration"
Expand All @@ -83,6 +109,7 @@ export default function OtherInformation({
</FormItem>
)}
/>

<FormField
control={form.control}
name="motivation"
Expand All @@ -105,6 +132,7 @@ export default function OtherInformation({
</FormItem>
)}
/>

<FormField
control={form.control}
name="achievement"
Expand All @@ -125,6 +153,7 @@ export default function OtherInformation({
</FormItem>
)}
/>

<FormField
control={form.control}
name="wallet_address"
Expand Down Expand Up @@ -153,10 +182,62 @@ export default function OtherInformation({
)}
/>

<FormField
control={form.control}
name="discount"
render={({ field }) => (
<FormItem className="space-y-1 w-full">
<FormLabel className="text-xs md:text-sm font-medium">
Discount Code (Optional)
</FormLabel>
<FormControl>
<Input
{...field}
type="text"
name="discount"
placeholder="Enter discount code..."
className="h-12 md:h-14 shadow-none px-4 text-xs md:text-sm"
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>

<FormField
control={form.control}
name="cta"
render={({ field }) => (
<FormItem className="flex items-center space-y-1 w-full">
<FormControl>
<Input
{...field}
type="checkbox"
name="cta"
className="h-5 w-5 mr-2"
id="cta"
checked={isCheckboxChecked}
onChange={(e) => {
field.onChange(e);
setIsCheckboxChecked(e.target.checked);
}}
required
/>
</FormControl>
<FormLabel className="text-xs md:text-sm font-medium">
(required)
</FormLabel>

<FormMessage />
</FormItem>
)}
/>

<CustomButton
variant="default"
disabled={isRegistering || isUpdatingSteps}
className="mt-10 bg-[#FB8888]/10 dark:bg-[#FB8888]/5 hover:bg-[#FB8888]/20 hover:dark:bg-[#FB8888]/10 w-full md:w-full md:max-w-[261px] mx-auto">
disabled={isRegistering || isUpdatingSteps || !isCheckboxChecked} // Disable if checkbox is not checked
className="mt-10 bg-[#FB8888]/10 dark:bg-[#FB8888]/5 hover:bg-[#FB8888]/20 hover:dark:bg-[#FB8888]/10 w-full md:w-full md:max-w-[261px] mx-auto"
>
{isRegistering || isUpdatingSteps ? (
<>
<Loader2 className="w-5 h-5 mr-2 animate-spin" /> Please wait...
Expand Down
26 changes: 26 additions & 0 deletions frontend_v2/src/components/shared/paymentSuccess.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from "react";

const PaymentSuccess = () => {
return (
<div className="min-h-screen bg-gray-100 flex items-center justify-center p-5">
<div className="bg-white p-8 rounded-lg shadow-md w-full max-w-md text-center">
<h1 className="text-3xl font-bold mb-4 text-green-600">
Payment Successful
</h1>
<p className="text-lg text-gray-700 mb-6">
Thank you for your payment. Your transaction was successful.
</p>
<button
className="bg-red-600 text-white font-semibold py-2 px-4 rounded-lg hover:bg-red-700 transition duration-200"
onClick={() =>
(window.location.href = "https://www.web3bridgeafrica.com/")
} // Adjust the redirection as needed
>
Go to Homepage
</button>
</div>
</div>
);
};

export default PaymentSuccess;
56 changes: 17 additions & 39 deletions frontend_v2/src/data/Career.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import clock from "../../public/career/Clock.svg";
import Barbell from "../../public/career/Barbell.svg";
import Confetti from "../../public/career/Confetti.svg";

import RocketLaunch from "../../public/career/RocketLaunch.svg";


export const benefitsData = [
{
icon: clock,
Expand Down Expand Up @@ -31,54 +34,29 @@ export const benefitsData = [

export const allJobOpenings = [
{
title: "Full-Stack Developers",
id:"1",
title: "Video Editor",
tags: ["Full-time"],
category: "Product",
description:
"Due to growing workload, we are looking for experienced and talented Full-Stack Developers to join our fast-paced Engineering team. You will work closely with Product, Design and Marketing to analyze, develop, debug, test, roll-out and support new and existing product features.",
},
{
title: "Senior Product designer",
tags: ["Hybrid", "Full-time"],
category: "Design",
description:
"Since 2019 we've worked on 30+ major projects from 8 different industries that are being used by 500,000+ users and 1000+ businesses from 70+ different countries. Need full-cycle product development or an improvement cycle? Let's talk!",
"We are seeking a talented and passionate Video Editor to join our dynamic media team. The ideal candidate will have a solid foundation in video editing techniques and a keen eye for storytelling. You will contribute to creating captivating content for our various platforms, ensuring our message reaches and resonates with our audience",
},
// {
// title: "Senior Product designer",
// tags: ["Hybrid", "Full-time"],
// category: "Design",
// description:
// "Since 2019 we've worked on 30+ major projects from 8 different industries that are being used by 500,000+ users and 1000+ businesses from 70+ different countries. Need full-cycle product development or an improvement cycle? Let's talk!",
// },
{
title: "Media/Creative Director",
id: "2",
title: "secretary",
tags: ["Full-time"],
category: "Marketing",
description:
"We've worked on 30+ major projects from 8 different industries that are being . Need full-cycle product development or an improvement cycle? Let's talk!",
},
{
title: "Software Development Intern",
tags: ["Internship"],
category: "Product",
description:
"Join our Engineering team as a Software Development Intern. You'll gain hands-on experience working on real projects, collaborating with experienced developers, and learning industry-standard practices in software development.",
},
{
title: "UX/UI Design Intern",
tags: ["Internship"],
category: "Design",
description:
"We're seeking creative and enthusiastic UX/UI Design Interns to assist our design team. You'll be involved in user research, wireframing, prototyping, and contributing to the design of our digital products.",
},
{
title: "Marketing Assistant",
tags: ["Part-time"],
category: "Marketing",
description:
"We're looking for students passionate about marketing to join our team part-time. You'll assist in creating content, managing social media, and learning about digital marketing strategies in a fast-paced environment.",
},
{
title: "Operations Manager",
tags: ["Full-time"],
category: "Operation",
description:
"We're seeking an experienced Operations Manager to oversee and optimize our business processes. You'll work across departments to ensure efficient operations and drive continuous improvement.",
"We are seeking a highly organized and detail-oriented Secretary to join our dynamic team. The Secretary will play a critical role in managing key administrative tasks for our cohort programs and maintaining smooth communication within the team and with external stakeholders. The ideal candidate will be responsible for managing important documents, coordinating schedules, and ensuring the timely execution of tasks.",
},

];

export const categories = [
Expand Down
Loading