- Added functionality to update the organization's calculation method (hourly or man-days) in the Admin Center. - Created a new component for managing the calculation method, including UI elements for selection and saving changes. - Updated API service to handle the new endpoint for updating the calculation method. - Enhanced localization files to support new keys related to the calculation method settings. - Introduced a settings page to manage organization working days and hours alongside the calculation method.
70 lines
1.8 KiB
TypeScript
70 lines
1.8 KiB
TypeScript
import {
|
|
AppstoreOutlined,
|
|
CreditCardOutlined,
|
|
ProfileOutlined,
|
|
TeamOutlined,
|
|
UserOutlined,
|
|
SettingOutlined,
|
|
} from '@/shared/antd-imports';
|
|
import React, { ReactNode, lazy } from 'react';
|
|
const Overview = lazy(() => import('./overview/overview'));
|
|
const Users = lazy(() => import('./users/users'));
|
|
const Teams = lazy(() => import('./teams/teams'));
|
|
const Billing = lazy(() => import('./billing/billing'));
|
|
const Projects = lazy(() => import('./projects/projects'));
|
|
const Settings = lazy(() => import('./settings/settings'));
|
|
|
|
// type of a menu item in admin center sidebar
|
|
type AdminCenterMenuItems = {
|
|
key: string;
|
|
name: string;
|
|
endpoint: string;
|
|
icon: ReactNode;
|
|
element: ReactNode;
|
|
};
|
|
// settings all element items use for sidebar and routes
|
|
export const adminCenterItems: AdminCenterMenuItems[] = [
|
|
{
|
|
key: 'overview',
|
|
name: 'overview',
|
|
endpoint: 'overview',
|
|
icon: React.createElement(AppstoreOutlined),
|
|
element: React.createElement(Overview),
|
|
},
|
|
{
|
|
key: 'users',
|
|
name: 'users',
|
|
endpoint: 'users',
|
|
icon: React.createElement(UserOutlined),
|
|
element: React.createElement(Users),
|
|
},
|
|
{
|
|
key: 'teams',
|
|
name: 'teams',
|
|
endpoint: 'teams',
|
|
icon: React.createElement(TeamOutlined),
|
|
element: React.createElement(Teams),
|
|
},
|
|
{
|
|
key: 'projects',
|
|
name: 'projects',
|
|
endpoint: 'projects',
|
|
icon: React.createElement(ProfileOutlined),
|
|
element: React.createElement(Projects),
|
|
},
|
|
{
|
|
key: 'billing',
|
|
name: 'billing',
|
|
endpoint: 'billing',
|
|
icon: React.createElement(CreditCardOutlined),
|
|
element: React.createElement(Billing),
|
|
},
|
|
{
|
|
key: 'settings',
|
|
name: 'settings',
|
|
endpoint: 'settings',
|
|
icon: React.createElement(SettingOutlined),
|
|
element: React.createElement(Settings),
|
|
},
|
|
];
|