diff --git a/src/app/[orgId]/settings/clients/[clientId]/general/page.tsx b/src/app/[orgId]/settings/clients/[clientId]/general/page.tsx index c7171c8d..4dd1068a 100644 --- a/src/app/[orgId]/settings/clients/[clientId]/general/page.tsx +++ b/src/app/[orgId]/settings/clients/[clientId]/general/page.tsx @@ -75,14 +75,14 @@ export default function GeneralPage() { const res = await api.get>( `/org/${client?.orgId}/sites/` ); - + const availableSites = res.data.data.sites .filter((s) => s.type === "newt" && s.subnet) .map((site) => ({ id: site.siteId.toString(), text: site.name })); - + setSites(availableSites); // Filter sites to only include those assigned to the client @@ -173,39 +173,6 @@ export default function GeneralPage() { )} /> - - ( - - {t("sites")} - { - form.setValue( - "siteIds", - newTags as [Tag, ...Tag[]] - ); - }} - enableAutocomplete={true} - autocompleteOptions={sites} - allowDuplicates={false} - restrictTagsToAutocompleteOptions={true} - sortTags={true} - /> - - {t("sitesDescription")} - - - - )} - /> @@ -224,4 +191,4 @@ export default function GeneralPage() { ); -} \ No newline at end of file +} diff --git a/src/app/[orgId]/settings/clients/create/page.tsx b/src/app/[orgId]/settings/clients/create/page.tsx index b7194526..196caca4 100644 --- a/src/app/[orgId]/settings/clients/create/page.tsx +++ b/src/app/[orgId]/settings/clients/create/page.tsx @@ -99,10 +99,7 @@ export default function Page() { id: z.string(), text: z.string() }) - ) - .refine((val) => val.length > 0, { - message: t("siteRequired") - }), + ), subnet: z.string().ip().min(1, { message: t("subnetRequired") }) @@ -293,18 +290,18 @@ export default function Page() { // Fetch available sites - const res = await api.get>( - `/org/${orgId}/sites/` - ); - const sites = res.data.data.sites.filter( - (s) => s.type === "newt" && s.subnet - ); - setSites( - sites.map((site) => ({ - id: site.siteId.toString(), - text: site.name - })) - ); + // const res = await api.get>( + // `/org/${orgId}/sites/` + // ); + // const sites = res.data.data.sites.filter( + // (s) => s.type === "newt" && s.subnet + // ); + // setSites( + // sites.map((site) => ({ + // id: site.siteId.toString(), + // text: site.name + // })) + // ); let olmVersion = "latest"; @@ -468,60 +465,60 @@ export default function Page() { )} /> - ( - - - {t("sites")} - - { - form.setValue( - "siteIds", - olmags as [ - Tag, - ...Tag[] - ] - ); - }} - enableAutocomplete={ - true - } - autocompleteOptions={ - sites - } - allowDuplicates={ - false - } - restrictTagsToAutocompleteOptions={ - true - } - sortTags={true} - /> - - {t("sitesDescription")} - - - - )} - /> + {/* ( */} + {/* */} + {/* */} + {/* {t("sites")} */} + {/* */} + {/* { */} + {/* form.setValue( */} + {/* "siteIds", */} + {/* olmags as [ */} + {/* Tag, */} + {/* ...Tag[] */} + {/* ] */} + {/* ); */} + {/* }} */} + {/* enableAutocomplete={ */} + {/* true */} + {/* } */} + {/* autocompleteOptions={ */} + {/* sites */} + {/* } */} + {/* allowDuplicates={ */} + {/* false */} + {/* } */} + {/* restrictTagsToAutocompleteOptions={ */} + {/* true */} + {/* } */} + {/* sortTags={true} */} + {/* /> */} + {/* */} + {/* {t("sitesDescription")} */} + {/* */} + {/* */} + {/* */} + {/* )} */} + {/* /> */}