diff --git a/components/SummaryAgendaItems.tsx b/components/SummaryAgendaItems.tsx index d20e6e4..fc0cc78 100644 --- a/components/SummaryAgendaItems.tsx +++ b/components/SummaryAgendaItems.tsx @@ -81,17 +81,17 @@ const SummaryAgendaItems = ({ onUpdate }: any) => { const getHeading = (itemType: any, workgroup: any) => { switch (itemType) { - + // Only check this section when changing or adding new workgroup case "issues": if (workgroup === "Onboarding Workgroup") return "To carry over for next meeting"; - if (workgroup === "AI Sandbox") return "To carry over for next meeting"; + if (workgroup === "AI Sandbox/Think-tank") return "To carry over for next meeting"; if (workgroup === "WG Sync Call") return "To carry over for next meeting"; // Add more specific conditions for "issues" if needed return "Issues"; // Default for "issues" case "discussionPoints": if (workgroup === "Onboarding Workgroup") return "In this meeting we discussed"; - if (workgroup === "AI Sandbox") return "In this meeting we discussed"; + if (workgroup === "AI Sandbox/Think-tank") return "In this meeting we discussed"; return "Discussion Points"; case "meetingTopics": diff --git a/components/SummaryMeetingInfo.tsx b/components/SummaryMeetingInfo.tsx index c706229..98cfa6c 100644 --- a/components/SummaryMeetingInfo.tsx +++ b/components/SummaryMeetingInfo.tsx @@ -5,6 +5,7 @@ import { useMyVariable } from '../context/MyVariableContext'; import SelectNames from './SelectNames'; import WorkingDocs from './WorkingDocs'; import TimestampedVideo from './TimestampedVideo'; +import { MeetingTypeSelect } from '../components/meeting/MeetingTypeSelect'; type SummaryMeetingInfoProps = { workgroup: string; @@ -174,7 +175,7 @@ const SummaryMeetingInfo: React.FC = ({ workgroup, onUp }; }); }, []); - + console.log("myVariable", myVariable); return ( <>
@@ -182,23 +183,13 @@ const SummaryMeetingInfo: React.FC = ({ workgroup, onUp
- {myVariable.workgroup?.preferred_template?.meetingInfo?.name == 1 && (<> - - - )} + {myVariable.workgroup?.preferred_template?.meetingInfo?.name == 1 && ( + + )}
{myVariable.workgroup?.preferred_template?.meetingInfo?.date == 1 && (<> diff --git a/components/meeting/MeetingTypeSelect.tsx b/components/meeting/MeetingTypeSelect.tsx new file mode 100644 index 0000000..c28ba34 --- /dev/null +++ b/components/meeting/MeetingTypeSelect.tsx @@ -0,0 +1,39 @@ +// src/components/meeting/MeetingTypeSelect.tsx +import React from 'react'; +import { meetingTypesConfig } from '../../config/meeting/meetingTypesConfig'; +import styles from '../../styles/meetinginfo.module.css'; + +interface MeetingTypeSelectProps { + workgroup: string; + value: string; + onChange: (e: React.ChangeEvent) => void; +} + +export const MeetingTypeSelect: React.FC = ({ + workgroup, + value, + onChange +}) => { + const config = meetingTypesConfig[workgroup] || meetingTypesConfig.default; + + return ( +
+ + +
+ ); +}; \ No newline at end of file diff --git a/config/meeting/meetingTypesConfig.ts b/config/meeting/meetingTypesConfig.ts new file mode 100644 index 0000000..c29130a --- /dev/null +++ b/config/meeting/meetingTypesConfig.ts @@ -0,0 +1,21 @@ +// src/config/meeting/meetingTypesConfig.ts +import { WorkgroupMeetingTypes } from '../../types/meeting'; + +export const meetingTypesConfig: WorkgroupMeetingTypes = { + default: { + defaultType: 'Weekly', + types: [ + { value: 'Weekly', label: 'Weekly' }, + { value: 'Biweekly', label: 'Biweekly' }, + { value: 'Monthly', label: 'Monthly' }, + { value: 'One-off event', label: 'One-off event' }, + ] + }, + 'AI Sandbox/Think-tank': { + defaultType: 'Weekly', + types: [ + { value: 'Sandbox', label: 'Sandbox' }, + { value: 'Think-Tank', label: 'Think-Tank' }, + ] + } +}; \ No newline at end of file diff --git a/pages/api/discord.ts b/pages/api/discord.ts index 68e72ea..c2ee9eb 100644 --- a/pages/api/discord.ts +++ b/pages/api/discord.ts @@ -33,7 +33,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) 'Strategy Guild': process.env.SNET_DISCORD_WEBHOOK_URL, 'LatAm Guild': process.env.SNET_DISCORD_WEBHOOK_URL, 'WG Sync Call': process.env.SNET_DISCORD_WEBHOOK_URL, - 'AI Sandbox': process.env.SNET_DISCORD_WEBHOOK_URL, + 'AI Sandbox/Think-tank': process.env.SNET_DISCORD_WEBHOOK_URL, 'GitHub PBL WG': process.env.SNET_DISCORD_WEBHOOK_URL, }; diff --git a/pages/submit-meeting-summary/index.tsx b/pages/submit-meeting-summary/index.tsx index 9b9350c..328d959 100644 --- a/pages/submit-meeting-summary/index.tsx +++ b/pages/submit-meeting-summary/index.tsx @@ -99,7 +99,7 @@ const SubmitMeetingSummary: NextPage = () => { "Strategy Guild": ["narrative", "decisionItems", "actionItems"], "LatAm Guild": ["narrative", "decisionItems", "actionItems"], "WG Sync Call": ["meetingTopics", "discussion", "decisionItems", "actionItems", "issues"], - "AI Sandbox": ["townHallUpdates", "discussionPoints", "decisionItems", "actionItems", "learningPoints", "issues"], + "AI Sandbox/Think-tank": ["townHallUpdates", "discussionPoints", "decisionItems", "actionItems", "learningPoints", "issues"], "GitHub PBL WG": ["discussionPoints", "decisionItems", "actionItems"] }; // When you add a new Workgroup you need to update this ordermapping and the Discord API with the new workgroup diff --git a/types/meeting.ts b/types/meeting.ts new file mode 100644 index 0000000..b625afe --- /dev/null +++ b/types/meeting.ts @@ -0,0 +1,12 @@ +// src/types/meeting.ts +export type MeetingType = { + value: string; + label: string; + }; + + export type WorkgroupMeetingTypes = { + [key: string]: { + defaultType: string; + types: MeetingType[]; + }; + }; \ No newline at end of file diff --git a/utils/generateMarkdown.js b/utils/generateMarkdown.js index 89c871d..712a1d1 100644 --- a/utils/generateMarkdown.js +++ b/utils/generateMarkdown.js @@ -172,7 +172,7 @@ export function generateMarkdown(summary, order) { break; case 'discussionPoints': if (item.discussionPoints && item.discussionPoints.length > 0) { - if (summary.workgroup == "Onboarding Workgroup" || summary.workgroup == "AI Sandbox") { + if (summary.workgroup == "Onboarding Workgroup" || summary.workgroup == "AI Sandbox/Think-tank") { formatItems("In this meeting we discussed", item.discussionPoints, 'discussionPoints'); } else { formatItems("Discussion Points", item.discussionPoints, 'discussionPoints'); @@ -197,7 +197,7 @@ export function generateMarkdown(summary, order) { break; case 'issues': if (item.issues && item.issues.length > 0) { - if (summary.workgroup == "Onboarding Workgroup" || summary.workgroup == "AI Sandbox") { + if (summary.workgroup == "Onboarding Workgroup" || summary.workgroup == "AI Sandbox/Think-tank") { formatItems("To carry over for next meeting", item.issues, 'issues'); } else if (summary.workgroup == "WG Sync Call") { formatItems("To carry over for next meeting", item.issues, 'issues');