Skip to content

Commit f5b8b06

Browse files
talissoncostaclaude
andcommitted
fix: restore /create fallback and improve component structure
- Restore original routing: redirect to /create when no organisations remain after deletion - Improve GeneralTab component structure with semantic divs and gap-2 spacing - Add clarifying comments for API requirements and routing decisions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent c6e2bc0 commit f5b8b06

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

frontend/web/components/pages/organisation-settings/tabs/general-tab/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ type GeneralTabProps = {
1313

1414
export const GeneralTab = ({ organisation }: GeneralTabProps) => {
1515
return (
16-
<div className='col-md-8'>
17-
<SettingTitle>Organisation Information</SettingTitle>
18-
<JSONReference title='Organisation' json={organisation} />
19-
<div className='mt-2'>
16+
<div className='col-md-8 d-flex flex-column gap-2'>
17+
<div>
18+
<SettingTitle>Organisation Information</SettingTitle>
19+
<JSONReference title='Organisation' json={organisation} />
2020
<OrganisationInformation organisation={organisation} />
21+
</div>
22+
<div>
2123
<SettingTitle>Admin Settings</SettingTitle>
2224
<Force2FASetting organisation={organisation} />
2325
<RestrictProjectCreationSetting organisation={organisation} />

frontend/web/components/pages/organisation-settings/tabs/general-tab/sections/DeleteOrganisation.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export const DeleteOrganisation = ({
2727
if (nextOrgId) {
2828
history.replace(`/organisation/${nextOrgId}/projects`)
2929
} else {
30-
history.replace('/organisations')
30+
// Redirect to /create when no organisations remain
31+
history.replace('/create')
3132
}
3233
},
3334
})

frontend/web/components/pages/organisation-settings/tabs/general-tab/sections/admin-settings/Force2FASetting.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const Force2FASetting = ({ organisation }: Force2FASettingProps) => {
1515
await updateOrganisationWithToast(
1616
{
1717
force_2fa: !organisation.force_2fa,
18-
name: organisation.name,
18+
name: organisation.name, // name is required by API
1919
},
2020
organisation.id,
2121
)

frontend/web/components/pages/organisation-settings/tabs/general-tab/sections/admin-settings/RestrictProjectCreationSetting.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const RestrictProjectCreationSetting = ({
2121
const handleToggle = async () => {
2222
await updateOrganisationWithToast(
2323
{
24-
name: organisation.name,
24+
name: organisation.name, // name is required by API
2525
restrict_project_create_to_admin:
2626
!organisation.restrict_project_create_to_admin,
2727
},

0 commit comments

Comments
 (0)