- {items.map(item => {
- const isOthers = item.value === "others";
- const isChecked = item.checked;
- const otherItems = isInterest ? otherInterest : otherEndgoal;
- const setOtherItems = isInterest ? setOtherInterest : setOtherEndgoal;
-
- return (
-
handleChange(item.value, isInterest)}
- >
- {isChecked &&
}
- {isInterest ? (
-
-
-
{item.title}
-
- ) : (
-
{item.title}
- )}
- {isInterest && (
- <>
-
e.stopPropagation()}>
-
-
-
-
This category includes:
-
- {interestGroups[item.value]?.map((group: InterestGroup) => (
- - {group.name}
- ))}
-
+ const renderItems = useCallback(
+ (items: typeof interests | typeof endgoals, isInterest: boolean) => (
+
+ {items.map(item => {
+ const isOthers = item.value === "others";
+ const isChecked = item.checked;
+ const otherItems = isInterest
+ ? otherInterest
+ : otherEndgoal;
+ const setOtherItems = isInterest
+ ? setOtherInterest
+ : setOtherEndgoal;
+
+ return (
+
handleChange(item.value, isInterest)}
+ >
+ {isChecked &&
}
+ {isInterest ? (
+
+
+
{item.title}
- >
- )}
- {isOthers && isChecked && (
-
e.stopPropagation()}>
-
{
- if (e.target.value.length > 0) {
- setOtherItems([...otherItems, e.target.value]);
- e.target.value = "";
+ ) : (
+ {item.title}
+ )}
+ {isInterest && (
+ <>
+ e.stopPropagation()}
+ >
+
+
+
+
This category includes:
+
+ {interestGroups[item.value]?.map(
+ (group: InterestGroup) => (
+ -
+ {group.name}
+
+ )
+ )}
+
+
+ >
+ )}
+ {isOthers && isChecked && (
+ e.stopPropagation()}>
+ {
+ if (e.target.value.length > 0) {
+ setOtherItems([
+ ...otherItems,
+ e.target.value
+ ]);
+ e.target.value = "";
+ }
+ }}
+ onChange={setOtherItems}
+ name={`other_${
+ isInterest
+ ? "interests"
+ : "endgoals"
+ }`}
+ placeHolder={`Specify your ${
+ isInterest ? "interest" : "endgoal"
+ }`}
+ separators={
+ isInterest ? [","] : undefined
}
- }}
- onChange={setOtherItems}
- name={`other_${isInterest ? 'interests' : 'endgoals'}`}
- placeHolder={`Specify your ${isInterest ? 'interest' : 'endgoal'}`}
- separators={isInterest ? [","] : undefined}
- />
-
- )}
-
- );
- })}
-
- ), [handleChange, interestGroups, otherInterest, otherEndgoal]);
+ />
+
+ )}
+
+ );
+ })}
+
+ ),
+ [handleChange, interestGroups, otherInterest, otherEndgoal]
+ );
return (
<>
@@ -206,8 +279,10 @@ export default function UserInterest() {
{stepTwo ? "Pick your goal." : "Please select your interested area"}
-
- {stepTwo ? renderItems(endgoals, false) : renderItems(interests, true)}
+
+ {stepTwo
+ ? renderItems(endgoals, false)
+ : renderItems(interests, true)}
{(stepTwo ? isEndgoalSelected : isInterestSelected) && (
>
);
-}
\ No newline at end of file
+}
diff --git a/src/modules/Common/Authentication/services/onboardingApis.ts b/src/modules/Common/Authentication/services/onboardingApis.ts
index 9c6905945..874bd892a 100644
--- a/src/modules/Common/Authentication/services/onboardingApis.ts
+++ b/src/modules/Common/Authentication/services/onboardingApis.ts
@@ -4,6 +4,8 @@ import { NavigateFunction } from "react-router-dom";
import { useFormik } from "formik";
import { getInfo } from "../../../Dashboard/modules/ConnectDiscord/services/apis";
import { Dispatch, SetStateAction } from "react";
+import { privateGateway } from "@/MuLearnServices/apiGateways";
+import toast from "react-hot-toast";
// Define the type of MyValues
type NN = { name: string; id: string };
@@ -234,6 +236,33 @@ export const getCommunities = ({
setIsLoading && setIsLoading(false);
};
+export const selectOrganization = async ({
+ setIsLoading,
+ userData,
+ navigate
+}: {
+ setIsLoading: Dispatch>;
+ userData: Object;
+ navigate: NavigateFunction;
+}) => {
+ try {
+ setIsLoading(true);
+ const res = await privateGateway.post(
+ "/api/v1/dashboard/user/organization/",
+ userData
+ );
+ if (res.status == 200 && !res.data.hasError) {
+ toast.success(res.data.message.general[0]);
+ navigate("/dashboard/connect-discord");
+ } else {
+ toast.error("Organization selection failed.");
+ }
+ setIsLoading(false);
+ } catch (err: any) {
+ toast.error("Unable to select organization.");
+ }
+};
+
// POST request for registration
export const registerUser = (
setFormSuccess: FormSuccess,
diff --git a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/LcDashboard.module.css b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/LcDashboard.module.css
index 07384052b..4bc69c08d 100644
--- a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/LcDashboard.module.css
+++ b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/LcDashboard.module.css
@@ -161,7 +161,6 @@
width: 45%;
}
.ReportWrapper .DetailSection .Sectionone > div label {
- color: black;
font-size: 18px;
font-weight: 600;
}
@@ -187,7 +186,6 @@
gap: 10px;
}
.ReportWrapper .DetailSection .SectionTwo p {
- color: black;
font-size: 18px;
font-weight: 600;
}
@@ -405,17 +403,37 @@
align-items: flex-start;
}
.HistoryDataWrapper .Headings {
- width: 38%;
+ width: 43%;
text-align: left;
}
.HistoryDataWrapper .detailedSection {
- width: 60%;
+ width: 55%;
}
.HistoryDataWrapper .SectionBottom .Headings > div {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
+.Headings .meetupTags {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ width: 100%;
+
+ .meetupInfoTag {
+ display: flex;
+ gap: 10px;
+ align-items: center;
+ justify-content: start;
+ padding: 5px 10px;
+ background-color: white;
+ color: #456ff6;
+ border: 1px dashed #456ff6;
+ border-radius: 10px;
+ margin: 5px;
+ }
+}
+
.HistoryDataWrapper .SectionBottom .detailedSection {
display: flex !important;
flex-direction: row;
@@ -463,7 +481,7 @@
display: flex;
width: 100%;
justify-content: space-between;
- gap: 2%;
+ gap: 20px;
flex-wrap: wrap;
}
@@ -536,7 +554,7 @@
.ContainerWrapper .ContentWrapper .BottomContainer {
display: flex;
flex-direction: column;
- width: 100%;
+ width: 68%;
gap: 10px;
}
.ContainerWrapper .ContentWrapper .BottomContainer > div {
@@ -556,6 +574,9 @@
.ContainerWrapper .ContentWrapper .TopContainer .sectionOne {
width: 100%;
}
+ .ContainerWrapper .ContentWrapper .TopContainer .BottomContainer {
+ width: 100%;
+ }
.ContainerWrapper .ContentWrapper .TopContainer {
gap: 15px;
}
diff --git a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcHistory.tsx b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcHistory.tsx
index 14d27edaa..aff699a78 100644
--- a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcHistory.tsx
+++ b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcHistory.tsx
@@ -11,6 +11,7 @@ import {
} from "../../../services/utils";
import MuLoader from "@/MuLearnComponents/MuLoader/MuLoader";
import { PowerfulButton } from "@/MuLearnComponents/MuButtons/MuButton";
+import toast from "react-hot-toast";
type Props = {
id: string | undefined;
@@ -37,7 +38,41 @@ const LcHistory = (props: Props) => {
{props.lc?.title}
{getDayOfWeek(props.lc?.meet_time)}
-
+
+ {props.lc.is_lc_member && (
+
+
{
+ navigator.clipboard.writeText(
+ props.lc?.meet_code ??
+ "NOTCOPIED"
+ );
+ toast.success("Code Copied");
+ }}
+ >
+ {" "}
+
+ {props.lc.meet_code}
+
+
+ {props.lc.total_interested}{" "}
+ Interests Submitted
+
+
+ {props.lc.total_joined} Joined
+
+
+ )}
{
Venue:{" "}
@@ -55,19 +90,6 @@ const LcHistory = (props: Props) => {
)
)}
- {props.lc.is_lc_member && (
- <>
-
Meet Code: {props.lc.meet_code}
-
- Total interests:
- {" " + props.lc.total_interested}
-
-
- Total joinees:
- {" " + props.lc.total_joined}
-
- >
- )}
diff --git a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcHome.tsx b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcHome.tsx
index 22cc8ec0f..b2af21824 100644
--- a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcHome.tsx
+++ b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcHome.tsx
@@ -1,6 +1,6 @@
import { Dispatch, SetStateAction, useEffect, useState } from "react";
import styles from "../LcDashboard.module.css";
-import { CalenderIcon, EditLogo, RightArrow } from "../../../assets/svg";
+import { CalenderIcon, RightArrow } from "../../../assets/svg";
import LcReport from "./LcReport";
import { convertToFormatedDate } from "../../../../../utils/common";
import LcMeetCreate from "./LcMeetCreate";
@@ -214,7 +214,8 @@ const LcHome = (props: Props) => {
Kindly schedule a meeting.
-