Skip to content
Merged
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
5 changes: 5 additions & 0 deletions components/SelectNames.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ const SelectNames: React.FC<SelectNamesProps> = ({ onSelect, initialValue }) =>
{ value: 'vanilla', label: 'Vanilla' }
];

React.useEffect(() => {
let initialOptions = initialValue ? initialValue.split(", ").map(val => ({ label: val, value: val })) : [];
setSelectedLabels(initialOptions);
}, [initialValue]);

async function handleInputChange(selected: any) {
setSelectedLabels(selected); // Update local state
let labs: string[] = selected.map((item: any) => item.label);
Expand Down
3 changes: 2 additions & 1 deletion components/SummaryTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ const SummaryTemplate = ({ updateMeetings }: SummaryTemplateProps) => {
setLoading(true);

try {
//console.log("test", cleanedFormData)
const data = await saveCustomAgenda(cleanedFormData);
if (data !== false) {
//console.log("Calling updateMeetings with:", summary, data[0].date);
Expand Down Expand Up @@ -281,7 +282,7 @@ const SummaryTemplate = ({ updateMeetings }: SummaryTemplateProps) => {
setMyVariable(updatedMyVariable);
} else {
console.log("Error in saving custom agenda");
}
}
} catch (error) {
console.error("Error submitting the form:", error);
alert("There was an error submitting the meeting summary.");
Expand Down