This commit is contained in:
chamikaJ
2025-04-17 18:28:54 +05:30
parent f583291d8a
commit 8825b0410a
2837 changed files with 241385 additions and 127578 deletions

View File

@@ -0,0 +1,26 @@
export const projectColors: string[] = [
'#164c9b',
'#3b7ad4',
'#70a6f3',
'#7781ca',
'#9877ca',
'#c178c9',
'#ee87c5',
'#ca7881',
'#75c9c0',
'#75c997',
'#80ca79',
'#aacb78',
'#cbbc78',
'#cb9878',
'#bb774c',
'#905b39',
'#903737',
'#bf4949',
'#f37070',
'#ff9c3c',
'#fbc84c',
'#cbc8a1',
'#a9a9a9',
'#767676',
];

View File

@@ -0,0 +1,70 @@
import React, { ReactNode } from 'react';
import ProjectViewInsights from '@/pages/projects/projectView/insights/project-view-insights';
import ProjectViewFiles from '@/pages/projects/projectView/files/project-view-files';
import ProjectViewMembers from '@/pages/projects/projectView/members/project-view-members';
import ProjectViewUpdates from '@/pages/projects/project-view-1/updates/project-view-updates';
import ProjectViewTaskList from '@/pages/projects/projectView/taskList/project-view-task-list';
import ProjectViewBoard from '@/pages/projects/projectView/board/project-view-board';
// type of a tab items
type TabItems = {
index: number;
key: string;
label: string;
isPinned?: boolean;
element: ReactNode;
};
// settings all element items use for tabs
export const tabItems: TabItems[] = [
{
index: 0,
key: 'tasks-list',
label: 'Task List',
isPinned: true,
element: React.createElement(ProjectViewTaskList),
},
{
index: 1,
key: 'board',
label: 'Board',
isPinned: true,
element: React.createElement(ProjectViewBoard),
},
// {
// index: 2,
// key: 'workload',
// label: 'Workload',
// element: React.createElement(ProjectViewWorkload),
// },
// {
// index: 3,
// key: 'roadmap',
// label: 'Roadmap',
// element: React.createElement(ProjectViewRoadmap),
// },
{
index: 4,
key: 'project-insights-member-overview',
label: 'Insights',
element: React.createElement(ProjectViewInsights),
},
{
index: 5,
key: 'all-attachments',
label: 'Files',
element: React.createElement(ProjectViewFiles),
},
{
index: 6,
key: 'members',
label: 'Members',
element: React.createElement(ProjectViewMembers),
},
{
index: 7,
key: 'updates',
label: 'Updates',
element: React.createElement(ProjectViewUpdates),
},
];

View File

@@ -0,0 +1,71 @@
import React, { ReactNode } from 'react';
import OverviewReports from '@/pages/reporting/overview-reports/overview-reports';
import ProjectsReports from '@/pages/reporting/projects-reports/projects-reports';
import MembersReports from '@/pages/reporting/members-reports/members-reports';
import OverviewTimeReports from '@/pages/reporting/timeReports/overview-time-reports';
import ProjectsTimeReports from '@/pages/reporting/timeReports/projects-time-reports';
import MembersTimeReports from '@/pages/reporting/timeReports/members-time-reports';
import EstimatedVsActualTimeReports from '@/pages/reporting/timeReports/estimated-vs-actual-time-reports';
// Type definition for a menu item
export type ReportingMenuItems = {
key: string;
name: string;
endpoint: string;
element: ReactNode;
children?: ReportingMenuItems[];
};
// Reporting paths and related elements with nested structure
export const reportingsItems: ReportingMenuItems[] = [
{
key: 'overview',
name: 'overview',
endpoint: 'overview',
element: React.createElement(OverviewReports),
},
{
key: 'projects',
name: 'projects',
endpoint: 'projects',
element: React.createElement(ProjectsReports),
},
{
key: 'members',
name: 'members',
endpoint: 'members',
element: React.createElement(MembersReports),
},
{
key: 'time-sheet',
name: 'timeReports',
endpoint: 'time-sheets',
element: null,
children: [
{
key: 'time-sheet-overview',
name: 'overview',
endpoint: 'time-sheet-overview',
element: React.createElement(OverviewTimeReports),
},
{
key: 'time-sheet-projects',
name: 'projects',
endpoint: 'time-sheet-projects',
element: React.createElement(ProjectsTimeReports),
},
{
key: 'time-sheet-members',
name: 'members',
endpoint: 'time-sheet-members',
element: React.createElement(MembersTimeReports),
},
{
key: 'time-sheet-estimate-vs-actual',
name: 'estimateVsActual',
endpoint: 'time-sheet-estimate-vs-actual',
element: React.createElement(EstimatedVsActualTimeReports),
},
],
},
];

View File

@@ -0,0 +1,138 @@
import {
BankOutlined,
FileZipOutlined,
GlobalOutlined,
GroupOutlined,
IdcardOutlined,
LockOutlined,
NotificationOutlined,
ProfileOutlined,
TagsOutlined,
TeamOutlined,
UserOutlined,
UserSwitchOutlined,
} from '@ant-design/icons';
import React, { ReactNode } from 'react';
import ProfileSettings from '../../pages/settings/profile/profile-settings';
import NotificationsSettings from '../../pages/settings/notifications/notifications-settings';
import ClientsSettings from '../../pages/settings/clients/clients-settings';
import JobTitlesSettings from '@/pages/settings/job-titles/job-titles-settings';
import LabelsSettings from '../../pages/settings/labels/labels-settings';
import CategoriesSettings from '../../pages/settings/categories/categories-settings';
import ProjectTemplatesSettings from '@/pages/settings/project-templates/project-templates-settings';
import TaskTemplatesSettings from '@/pages/settings/task-templates/task-templates-settings';
import TeamMembersSettings from '@/pages/settings/team-members/team-members-settings';
import TeamsSettings from '../../pages/settings/teams/teams-settings';
import ChangePassword from '@/pages/settings/change-password/change-password';
import LanguageAndRegionSettings from '@/pages/settings/language-and-region/language-and-region-settings';
// type of menu item in settings sidebar
type SettingMenuItems = {
key: string;
name: string;
endpoint: string;
icon: ReactNode;
element: ReactNode;
adminOnly?: boolean;
};
// settings all element items use for sidebar and routes
export const settingsItems: SettingMenuItems[] = [
// Available for everyone
{
key: 'profile',
name: 'profile',
endpoint: 'profile',
icon: React.createElement(UserOutlined),
element: React.createElement(ProfileSettings),
},
{
key: 'notifications',
name: 'notifications',
endpoint: 'notifications',
icon: React.createElement(NotificationOutlined),
element: React.createElement(NotificationsSettings),
},
{
key: 'change-password',
name: 'change-password',
endpoint: 'password',
icon: React.createElement(LockOutlined),
element: React.createElement(ChangePassword),
},
{
key: 'language-and-region',
name: 'language-and-region',
endpoint: 'language-and-region',
icon: React.createElement(GlobalOutlined),
element: React.createElement(LanguageAndRegionSettings),
},
// Admin only items
{
key: 'clients',
name: 'clients',
endpoint: 'clients',
icon: React.createElement(UserSwitchOutlined),
element: React.createElement(ClientsSettings),
adminOnly: true,
},
{
key: 'job-titles',
name: 'job-titles',
endpoint: 'job-titles',
icon: React.createElement(IdcardOutlined),
element: React.createElement(JobTitlesSettings),
adminOnly: true,
},
{
key: 'labels',
name: 'labels',
endpoint: 'labels',
icon: React.createElement(TagsOutlined),
element: React.createElement(LabelsSettings),
adminOnly: true,
},
{
key: 'categories',
name: 'categories',
endpoint: 'categories',
icon: React.createElement(GroupOutlined),
element: React.createElement(CategoriesSettings),
adminOnly: true,
},
// {
// key: 'project-templates',
// name: 'project-templates',
// endpoint: 'project-templates',
// icon: React.createElement(FileZipOutlined),
// element: React.createElement(ProjectTemplatesSettings),
// adminOnly: true,
// },
{
key: 'task-templates',
name: 'task-templates',
endpoint: 'task-templates',
icon: React.createElement(ProfileOutlined),
element: React.createElement(TaskTemplatesSettings),
adminOnly: true,
},
{
key: 'team-members',
name: 'team-members',
endpoint: 'team-members',
icon: React.createElement(TeamOutlined),
element: React.createElement(TeamMembersSettings),
adminOnly: true,
},
{
key: 'teams',
name: 'teams',
endpoint: 'teams',
icon: React.createElement(BankOutlined),
element: React.createElement(TeamsSettings),
adminOnly: true,
},
];
export const getAccessibleSettings = (isAdmin: boolean) => {
return settingsItems.filter(item => !item.adminOnly || isAdmin);
};