-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from SingularityNET-Archive:development
refactor: Update workgroup references to 'AI Sandbox/Think-tank' and implement MeetingTypeSelect component
- Loading branch information
Showing
8 changed files
with
88 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<HTMLSelectElement>) => void; | ||
} | ||
|
||
export const MeetingTypeSelect: React.FC<MeetingTypeSelectProps> = ({ | ||
workgroup, | ||
value, | ||
onChange | ||
}) => { | ||
const config = meetingTypesConfig[workgroup] || meetingTypesConfig.default; | ||
|
||
return ( | ||
<div className={styles['column-flex']}> | ||
<label className={styles['form-label']}> | ||
Type of meeting: | ||
</label> | ||
<select | ||
name="name" | ||
value={value || config.defaultType} | ||
onChange={onChange} | ||
className={styles['form-select']} | ||
title="Select the type of meeting. If it's a one-off event, please select 'One-off event'" | ||
> | ||
{config.types.map(type => ( | ||
<option key={type.value} value={type.value}> | ||
{type.label} | ||
</option> | ||
))} | ||
</select> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' }, | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// src/types/meeting.ts | ||
export type MeetingType = { | ||
value: string; | ||
label: string; | ||
}; | ||
|
||
export type WorkgroupMeetingTypes = { | ||
[key: string]: { | ||
defaultType: string; | ||
types: MeetingType[]; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters