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
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export default function AIModelDetailsPage() {
const SAVE_SUCCESS_TOAST_ID = 'ai-model-details-save-success';
const SAVE_ERROR_TOAST_ID = 'ai-model-details-save-error';
const AI_MODEL_VALIDATION_TOAST_ID = 'ai-model-details-validation-toast';
const OPEN_ACCESS_REQUIRED_TOAST_ID = SAVE_SUCCESS_TOAST_ID;
const isValidHttpUrl = (value: string) => {
try {
const parsed = new URL(value);
Expand Down Expand Up @@ -440,7 +441,6 @@ export default function AIModelDetailsPage() {
</div>
);
}
const OPEN_ACCESS_REQUIRED_TOAST_ID = SAVE_SUCCESS_TOAST_ID;
return (
<div className="flex flex-col gap-4 py-6">
{/* Model Type & Domain - side by side */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,10 @@ const Metadata = () => {
<div className="w-full py-4 pr-4 sm:w-1/2 md:w-1/2 lg:w-1/2 xl:w-1/2">
<Combobox
displaySelected
label="SDG Goals *"
label="SDG Goals"
name="sdgs"
required
requiredIndicator={true}
list={
getSDGsList?.data?.sdgs?.map((item: any) => {
const num = item.number
Expand All @@ -503,7 +505,7 @@ const Metadata = () => {
}}
/>
</div>
<div className="w-full py-4 pr-4 sm:w-1/2 md:w-1/2 lg:w-1/2 xl:w-1/2">
<div className="w-full py-4 pl-2 pr-4 sm:w-1/2 md:w-1/2 lg:w-1/2 xl:w-1/2">
<Combobox
displaySelected
name="tags"
Expand All @@ -527,8 +529,10 @@ const Metadata = () => {
<div className="w-full py-4 pr-4 sm:w-1/2 md:w-1/2 lg:w-1/2 xl:w-1/2">
<Combobox
displaySelected
label="Sectors *"
label="Sectors"
name="sectors"
required
requiredIndicator={true}
list={
getSectorsList?.data.sectors?.map((item: TypeSector) => ({
label: item.name,
Expand All @@ -541,22 +545,24 @@ const Metadata = () => {
handleSave({ ...formData, sectors: value });
}}
/>
<Combobox
displaySelected
label="Geographies"
name="geographies"
list={
getGeographiesList?.data?.geographies?.map((item: any) => ({
label: `${item.name}${item.parentId ? ` (${item.parentId.name})` : ''}`,
value: item.id,
})) || []
}
selectedValue={formData.geographies}
onChange={(value) => {
handleChange('geographies', value);
handleSave({ ...formData, geographies: value });
}}
/>
<div className="mt-8 w-full">
<Combobox
displaySelected
label="Geographies"
name="geographies"
list={
getGeographiesList?.data?.geographies?.map((item: any) => ({
label: `${item.name}${item.parentId ? ` (${item.parentId.name})` : ''}`,
value: item.id,
})) || []
}
selectedValue={formData.geographies}
onChange={(value) => {
handleChange('geographies', value);
handleSave({ ...formData, geographies: value });
}}
/>
</div>
</div>
</div>

Expand Down
Loading
Loading