- {organization.creditBalance != null
- ? formatCreditsString(organization.creditBalance)
- : "No information access"}
-
-
- WEBKNOSSOS Credits
-
-
-
- >
- );
-}
-
export function PlanExceededAlert({ organization }: { organization: APIOrganization }) {
const hasPlanExpired = hasPricingPlanExpired(organization);
const activeUser = useWkSelector((state) => state.activeUser);
@@ -379,21 +181,21 @@ export function PlanAboutToExceedAlert({ organization }: { organization: APIOrga
),
});
- // else {
- // alerts.push({
- // message:
- // "Your organization is about to exceed the storage space included in your current plan. Upgrade now to avoid your account from being blocked.",
- // actionButton: (
- //
- // ),
- // });
- // }
+ else {
+ alerts.push({
+ message:
+ "Your organization is about to exceed the storage space included in your current plan. Upgrade now to avoid your account from being blocked.",
+ actionButton: (
+
+ ),
+ });
+ }
return (
<>
diff --git a/frontend/javascripts/admin/organization/organization_danger_zone_view.tsx b/frontend/javascripts/admin/organization/organization_danger_zone_view.tsx
new file mode 100644
index 00000000000..86e65b36f7f
--- /dev/null
+++ b/frontend/javascripts/admin/organization/organization_danger_zone_view.tsx
@@ -0,0 +1,66 @@
+import { SettingsCard } from "admin/account/helpers/settings_card";
+import { SettingsTitle } from "admin/account/helpers/settings_title";
+import { deleteOrganization } from "admin/rest_api";
+import { Button, Typography } from "antd";
+import { confirmAsync } from "dashboard/dataset/helper_components";
+import { useState } from "react";
+import type { APIOrganization } from "types/api_types";
+
+export function OrganizationDangerZoneView({ organization }: { organization: APIOrganization }) {
+ const [isDeleting, setIsDeleting] = useState(false);
+
+ async function handleDeleteButtonClicked(): Promise {
+ const isDeleteConfirmed = await confirmAsync({
+ title: "Danger Zone",
+ content: (
+
+
+ You will lose access to all the datasets and annotations uploaded/created as part of
+ this organization!
+
+
+ Unless you are part of another WEBKNOSSOS organization, you can NOT login again with
+ this account and will lose access to WEBKNOSSOS.
+
+
+ Deleting an organization{" "}
+ cannot be undone. Are you certain you
+ want to delete the organization {organization.name}?
+
-
- You will lose access to all the datasets and annotations uploaded/created as part of
- this organization!
-
-
- Unless you are part of another WEBKNOSSOS organization, you can NOT login again with
- this account and will lose access to WEBKNOSSOS.
-
-
- Deleting an organization{" "}
- cannot be undone. Are you certain you
- want to delete the organization {organization.name}?
-
-
- ),
- okText: <>Yes, delete this organization now and log me out.>,
- okType: "danger",
- width: 500,
- });
-
- if (isDeleteConfirmed) {
- setIsDeleting(true);
- await deleteOrganization(organization.id);
- setIsDeleting(false);
- window.location.replace(`${window.location.origin}/dashboard`);
- }
- }
-
- async function handleCopyNameButtonClicked(): Promise {
- await navigator.clipboard.writeText(organization.id);
- Toast.success("Copied organization name to the clipboard.");
- }
-
- const OrgaNameRegexPattern = /^[A-Za-z0-9\\-_\\. ß]+$/;
-
- if (isFetchingData || !organization || !pricingPlanStatus)
- return (
-
Ordering WEBKNOSSOS credits for your organization will send an email to the WEBKNOSSOS
sales team. We typically respond within one business day to discuss payment options and
- purchasing requirements. See our FAQ for more
- information.
+ purchasing requirements. See our{" "}
+
+ FAQ
+ {" "}
+ for more information.
>
diff --git a/frontend/javascripts/admin/rest_api.ts b/frontend/javascripts/admin/rest_api.ts
index 5b4459ef640..97c6c349e8f 100644
--- a/frontend/javascripts/admin/rest_api.ts
+++ b/frontend/javascripts/admin/rest_api.ts
@@ -1722,13 +1722,23 @@ export async function updateOrganization(
name: string,
newUserMailingList: string,
): Promise {
- return Request.sendJSONReceiveJSON(`/api/organizations/${organizationId}`, {
- method: "PATCH",
- data: {
- name,
- newUserMailingList,
+ const updatedOrganization = await Request.sendJSONReceiveJSON(
+ `/api/organizations/${organizationId}`,
+ {
+ method: "PATCH",
+ data: {
+ name,
+ newUserMailingList,
+ },
},
- });
+ );
+
+ return {
+ ...updatedOrganization,
+ paidUntil: updatedOrganization.paidUntil ?? Constants.MAXIMUM_DATE_TIMESTAMP,
+ includedStorageBytes: updatedOrganization.includedStorageBytes ?? Number.POSITIVE_INFINITY,
+ includedUsers: updatedOrganization.includedUsers ?? Number.POSITIVE_INFINITY,
+ };
}
export async function isDatasetAccessibleBySwitching(
diff --git a/frontend/javascripts/navbar.tsx b/frontend/javascripts/navbar.tsx
index 475cf298dd2..9146e5808cf 100644
--- a/frontend/javascripts/navbar.tsx
+++ b/frontend/javascripts/navbar.tsx
@@ -632,12 +632,17 @@ function LoggedInAvatar({
label: orgName,
disabled: true,
},
+ {
+ type: "divider",
+ },
+ {
+ key: "account",
+ label: Account Settings,
+ },
activeOrganization && Utils.isUserAdmin(activeUser)
? {
key: "manage-organization",
- label: (
- Manage Organization
- ),
+ label: Organization Settings,
}
: null,
isMultiMember
@@ -655,10 +660,6 @@ function LoggedInAvatar({
],
}
: null,
- {
- key: "account",
- label: Account Settings,
- },
{
key: "logout",
label: (
diff --git a/frontend/javascripts/router.tsx b/frontend/javascripts/router.tsx
index 071168c64a1..481039d1353 100644
--- a/frontend/javascripts/router.tsx
+++ b/frontend/javascripts/router.tsx
@@ -6,7 +6,7 @@ import StartResetPasswordView from "admin/auth/start_reset_password_view";
import DatasetAddView from "admin/dataset/dataset_add_view";
import JobListView from "admin/job/job_list_view";
import Onboarding from "admin/onboarding";
-import OrganizationEditView from "admin/organization/organization_edit_view";
+import OrganizationView from "admin/organization/organization_view";
import { PricingPlanEnum } from "admin/organization/pricing_plan_utils";
import ProjectCreateView from "admin/project/project_create_view";
import ProjectListView from "admin/project/project_list_view";
@@ -57,11 +57,11 @@ import type { WebknossosState } from "viewer/store";
import HelpButton from "viewer/view/help_modal";
import TracingLayoutView from "viewer/view/layouting/tracing_layout_view";
+import AccountSettingsView from "admin/account/account_settings_view";
import {
getDatasetIdFromNameAndOrganization,
getOrganizationForDataset,
} from "admin/api/disambiguate_legacy_routes";
-import AccountSettingsView from "admin/account/account_settings_view";
import VerifyEmailView from "admin/auth/verify_email_view";
import { DatasetURLImport } from "admin/dataset/dataset_url_import";
import TimeTrackingOverview from "admin/statistic/time_tracking_overview";
@@ -630,7 +630,17 @@ class ReactRouter extends React.Component {
}
+ render={() => }
+ />
+ }
+ />
+ }
/>
+
+
diff --git a/public/images/drawings/add-users-light-mode.svg b/public/images/drawings/add-users-light-mode.svg
new file mode 100644
index 00000000000..31de49bbddc
--- /dev/null
+++ b/public/images/drawings/add-users-light-mode.svg
@@ -0,0 +1,118 @@
+
+
+
diff --git a/public/images/drawings/upgrade-storage-dark-mode.svg b/public/images/drawings/upgrade-storage-dark-mode.svg
new file mode 100644
index 00000000000..14468f050c7
--- /dev/null
+++ b/public/images/drawings/upgrade-storage-dark-mode.svg
@@ -0,0 +1,153 @@
+
+
+
diff --git a/public/images/drawings/upgrade-storage-light-mode.svg b/public/images/drawings/upgrade-storage-light-mode.svg
new file mode 100644
index 00000000000..05fe37708c4
--- /dev/null
+++ b/public/images/drawings/upgrade-storage-light-mode.svg
@@ -0,0 +1,153 @@
+
+
+
diff --git a/unreleased_changes/8679.md b/unreleased_changes/8679.md
new file mode 100644
index 00000000000..c311db9e058
--- /dev/null
+++ b/unreleased_changes/8679.md
@@ -0,0 +1,2 @@
+### Changed
+- Updated the UI for the organizations settings page. [#8679](https://github.com/scalableminds/webknossos/pull/8679)
\ No newline at end of file