Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage #8132

Merged
merged 21 commits into from
Aug 31, 2024
Merged

Stage #8132

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f3544f3
feat: initialize project module entity
GloireMutaliko21 Aug 28, 2024
70d0c71
feat: project module entity and repositories
GloireMutaliko21 Aug 28, 2024
454c8c1
feat: register project modules entity in core entities
GloireMutaliko21 Aug 28, 2024
5339058
feat: add parent-child relationship for modules
GloireMutaliko21 Aug 29, 2024
b40c0c3
fix: module relation remove timelogs
GloireMutaliko21 Aug 29, 2024
035c7e0
fix: project module relations and posgrest migration
GloireMutaliko21 Aug 29, 2024
0d5de3c
feat: sqlite migration for project module
GloireMutaliko21 Aug 29, 2024
236f8c0
feat: project module find services
GloireMutaliko21 Aug 30, 2024
4e8723f
feat: find project modules by employee
GloireMutaliko21 Aug 30, 2024
3dbf330
feat: project module permissions
GloireMutaliko21 Aug 30, 2024
fae592f
feat: add project module DTOs
GloireMutaliko21 Aug 30, 2024
8f2a2ac
feat: project modules APIs
GloireMutaliko21 Aug 30, 2024
247cf34
fix: added missing translates for project modules
GloireMutaliko21 Aug 30, 2024
1c15a8b
fix: project module input find DTO
GloireMutaliko21 Aug 31, 2024
9aea277
fix: packages build issue
rahul-rocket Aug 31, 2024
92200db
fix: optimize code
rahul-rocket Aug 31, 2024
481044e
fix(deepscan): removed unused import
rahul-rocket Aug 31, 2024
58c60c0
Update organization-project-module.service.ts
rahul-rocket Aug 31, 2024
6e8b904
fix(deepscan): removed unnecessary module
rahul-rocket Aug 31, 2024
0d15260
Merge pull request #8119 from ever-co/feat/organization-project-modul…
rahul-rocket Aug 31, 2024
854dc51
Update desktop-timer-app-stage.yml
evereq Aug 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/desktop-timer-app-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
- name: Print environment variable names
run: |
echo "Environment Variable Names:"
printenv | cut -d= -f1

Check warning on line 191 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (printenv)

- name: Build Desktop Timer App
run: 'yarn build:desktop-timer:windows:release:gh'
Expand Down Expand Up @@ -216,6 +216,10 @@
ChocolateyInstall: ''
ChromeWebDriver: ''
COBERTURA_HOME: ''
COMPUTERNAME: ''

Check warning on line 219 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (COMPUTERNAME)
COMSPEC: ''

Check warning on line 220 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (COMSPEC)
CONDA: ''
DEPLOYMENT_BASEPATH: ''

Check warning on line 222 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (BASEPATH)
SBT_HOME: ''
SELENIUM_JAR_PATH: ''
STATS_BLT: ''
Expand All @@ -236,10 +240,49 @@
ANDROID_NDK_LATEST_HOME: ''
ANDROID_NDK_ROOT: ''
ANDROID_SDK_ROOT: ''
GITHUB_ACTION: ''
GITHUB_ACTIONS: ''
GITHUB_ACTION_REF: ''
GITHUB_ACTION_REPOSITORY: ''
GITHUB_ACTOR: ''
GITHUB_ACTOR_ID: ''
GITHUB_API_URL: ''
GITHUB_BASE_REF: ''
GITHUB_ENV: ''
GITHUB_EVENT_NAME: ''
GITHUB_EVENT_PATH: ''
GITHUB_GRAPHQL_URL: ''
GITHUB_HEAD_REF: ''
GITHUB_JOB: ''
GITHUB_OUTPUT: ''
GITHUB_PATH: ''
GITHUB_REF: ''
GITHUB_REF_NAME: ''
GITHUB_REF_PROTECTED: ''
GITHUB_REF_TYPE: ''
GITHUB_REPOSITORY: ''
GITHUB_REPOSITORY_ID: ''
GITHUB_REPOSITORY_OWNER: ''
GITHUB_REPOSITORY_OWNER_ID: ''
GITHUB_RETENTION_DAYS: ''
GITHUB_RUN_ATTEMPT: ''
GITHUB_RUN_ID: ''
GITHUB_RUN_NUMBER: ''
GITHUB_SERVER_URL: ''
GITHUB_SHA: ''
GITHUB_STATE: ''
GITHUB_STEP_SUMMARY: ''
GITHUB_TRIGGERING_ACTOR: ''
GITHUB_WORKFLOW: ''
GITHUB_WORKFLOW_REF: ''
GITHUB_WORKFLOW_SHA: ''
GITHUB_WORKSPACE: ''
GOROOT_1_20_X64: ''
GOROOT_1_21_X64: ''
GOROOT_1_22_X64: ''
GRADLE_HOME: ''
HOMEDRIVE: ''

Check warning on line 284 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (HOMEDRIVE)
HOMEPATH: ''

Check warning on line 285 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (HOMEPATH)
IEWebDriver: ''
ImageOS: ''
ImageVersion: ''
Expand All @@ -248,10 +291,17 @@
JAVA_HOME_17_X64: ''
JAVA_HOME_21_X64: ''
JAVA_HOME_8_X64: ''
LOCALAPPDATA: ''

Check warning on line 294 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (LOCALAPPDATA)
LOGONSERVER: ''

Check warning on line 295 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (LOGONSERVER)
M2: ''
M2_REPO: ''
MAVEN_OPTS: ''
MonAgentClientLocation: ''
npm_config_prefix: ''
NUMBER_OF_PROCESSORS: ''
OS: ''
PATHEXT: ''

Check warning on line 303 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (PATHEXT)
PERFLOG_LOCATION_SETTING: ''
PGBIN: ''
PGDATA: ''
PGPASSWORD: ''
Expand All @@ -277,6 +327,7 @@
GeckoWebDriver: ''
GHCUP_INSTALL_BASE_PREFIX: ''
GHCUP_MSYS2: ''
RTOOLS44_HOME: ''

Check warning on line 330 in .github/workflows/desktop-timer-app-stage.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (RTOOLS)
RUNNER_ARCH: ''
RUNNER_ENVIRONMENT: ''
RUNNER_NAME: ''
Expand All @@ -286,8 +337,20 @@
RUNNER_TOOL_CACHE: ''
RUNNER_TRACKING_ID: ''
RUNNER_WORKSPACE: ''
USERDOMAIN: ''
USERDOMAIN_ROAMINGPROFILE: ''
USERNAME: ''
USERPROFILE: ''
VCPKG_INSTALLATION_ROOT: ''
WIX: ''
TERM: ''
# HOME: ''
# WINDIR: ''
# ProgramData: ''
# PROGRAMFILES: ''
# ProgramW6432: ''
# ALLUSERSPROFILE: ''
# APPDATA: ''
# COMMONPROGRAMFILES: ''
# CommonProgramFiles(x86)
# CommonProgramW6432
2 changes: 2 additions & 0 deletions packages/contracts/src/employee.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ITimesheet, ITimeSlot } from './timesheet.model';
import { ITask } from './task.model';
import { ICandidate } from './candidate.model';
import { IEmployeeAward } from './employee-award.model';
import { IOrganizationProjectModule } from './organization-project-module.model';

export interface IFindMembersInput extends IBasePerTenantAndOrganizationEntityModel {
organizationTeamId: ID;
Expand Down Expand Up @@ -71,6 +72,7 @@ export interface IEmployee extends IBasePerTenantAndOrganizationEntityModel {
expenses?: IExpense[];
timesheets?: ITimesheet[];
tasks?: ITask[];
modules?: IOrganizationProjectModule[];
timeSlots?: ITimeSlot[];
contact?: IContact;
candidate?: ICandidate;
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export * from './organization-expense-category.model';
export * from './organization-language.model';
export * from './organization-positions.model';
export * from './organization-projects.model';
export * from './organization-project-module.model';
export * from './organization-recurring-expense.model';
export * from './organization-sprint.model';
export * from './organization-task-setting.model';
Expand Down
47 changes: 47 additions & 0 deletions packages/contracts/src/organization-project-module.model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { IBasePerTenantAndOrganizationEntityModel, ID } from './base-entity.model';
import { IEmployee } from './employee.model';
import { IRelationalOrganizationProject } from './organization-projects.model';
import { IOrganizationSprint } from './organization-sprint.model';
import { IOrganizationTeam } from './organization-team.model';
import { TaskStatusEnum } from './task-status.model';
import { ITask } from './task.model';
import { IUser } from './user.model';

export interface IRelationalOrganizationProjectModule {
projectModule?: IOrganizationProjectModule;
projectModuleId?: ID;
}

export interface IOrganizationProjectModule
extends IBasePerTenantAndOrganizationEntityModel,
IRelationalOrganizationProject {
name: string;
description?: string;
status?: TaskStatusEnum;
startDate?: Date;
endDate?: Date;
isFavorite?: boolean;
public?: boolean;
parent?: IOrganizationProjectModule;
parentId?: ID; // Optional field for specifying the parent module ID
children?: IOrganizationProjectModule[]; // Modules related as children
manager?: IUser;
managerId?: ID;
creator?: IUser;
creatorId?: ID;
members?: IEmployee[];
organizationSprints?: IOrganizationSprint[];
teams?: IOrganizationTeam[];
tasks?: ITask[];
}

export interface IOrganizationProjectModuleFindInput
extends IBasePerTenantAndOrganizationEntityModel,
Partial<Pick<IOrganizationProjectModule, 'name' | 'status' | 'projectId'>> {
organizationTeamId?: ID;
organizationSprintId?: ID;
}

export interface IOrganizationProjectModuleCreateInput extends Omit<IOrganizationProjectModule, 'id'> {}

export interface IOrganizationProjectModuleUpdateInput extends Partial<IOrganizationProjectModule> {}
10 changes: 6 additions & 4 deletions packages/contracts/src/organization-projects.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ITimeLog } from './timesheet.model';
import { IRelationalImageAsset } from './image-asset.model';
import { IOrganizationTeam } from './organization-team.model';
import { CustomFieldsObject } from './shared-types';
import { IOrganizationProjectModule } from './organization-project-module.model';

export interface IRelationalOrganizationProject {
project?: IOrganizationProject;
Expand Down Expand Up @@ -41,6 +42,7 @@ export interface IOrganizationProject
teams?: IOrganizationTeam[];
timeLogs?: ITimeLog[];
organizationSprints?: IOrganizationSprint[];
modules?: IOrganizationProjectModule[];
taskListType: TaskListTypeEnum;
payments?: IPayment[];
// prefix to project tasks / issues, e.g. GA-XXXX (GA is prefix)
Expand Down Expand Up @@ -73,8 +75,8 @@ export enum OrganizationProjectBudgetTypeEnum {

export interface IOrganizationProjectsFindInput extends IBasePerTenantAndOrganizationEntityModel {
name?: string;
organizationTeamId?: IOrganizationTeam['id'];
organizationContactId?: IOrganizationContact['id'];
organizationTeamId?: ID;
organizationContactId?: ID;
organizationContact?: IOrganizationContact;
public?: boolean;
billable?: boolean;
Expand All @@ -86,7 +88,7 @@ export interface IOrganizationProjectCreateInput
IRelationalImageAsset {
name?: string;
organizationContact?: IOrganizationContact;
organizationContactId?: IOrganizationContact['id'];
organizationContactId?: ID;
startDate?: Date;
endDate?: Date;
billing?: ProjectBillingEnum;
Expand All @@ -108,7 +110,7 @@ export interface IOrganizationProjectCreateInput
}

export interface IOrganizationProjectUpdateInput extends IOrganizationProjectCreateInput, IOrganizationProjectSetting {
id?: IOrganizationContact['id'];
id?: ID;
}

export interface IOrganizationProjectStoreState {
Expand Down
5 changes: 3 additions & 2 deletions packages/contracts/src/organization-sprint.model.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { IOrganizationProjectModule } from './organization-project-module.model';
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
import { IOrganizationProject } from './organization-projects.model';
import { ITask } from './task.model';

export interface IOrganizationSprint
extends IBasePerTenantAndOrganizationEntityModel {
export interface IOrganizationSprint extends IBasePerTenantAndOrganizationEntityModel {
name: string;
projectId: string;
goal?: string;
Expand All @@ -13,6 +13,7 @@ export interface IOrganizationSprint
dayStart?: number; // Enum ((Sunday-Saturday) => (0-7))
project?: IOrganizationProject;
tasks?: ITask[];
modules?: IOrganizationProjectModule[];
}

export enum SprintStartDayEnum {
Expand Down
8 changes: 5 additions & 3 deletions packages/contracts/src/organization-team.model.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { IRelationalEmployee } from './employee.model';
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
import { IBasePerTenantAndOrganizationEntityModel, ID } from './base-entity.model';
import { IOrganizationTeamEmployee } from './organization-team-employee-model';
import { ITag } from './tag.model';
import { ITask } from './task.model';
import { ITimerStatusInput } from './timesheet.model';
import { IRelationalImageAsset } from './image-asset.model';
import { CrudActionEnum } from './organization.model';
import { IOrganizationProject } from './organization-projects.model';
import { IOrganizationProjectModule } from './organization-project-module.model';

export interface IOrganizationTeam extends IBasePerTenantAndOrganizationEntityModel, IRelationalImageAsset {
name: string;
Expand All @@ -16,12 +17,13 @@ export interface IOrganizationTeam extends IBasePerTenantAndOrganizationEntityMo
logo?: string;
prefix?: string;
shareProfileView?: boolean; // If true, all members can view "Worked" tasks and "Daily Plan" tabs of all other employees, By default, it's true
requirePlanToTrack?: boolean; // If true, members can't be able to track time without have a "Daily Plan". By defaut, it's false
requirePlanToTrack?: boolean; // If true, members can't be able to track time without have a "Daily Plan". By default, it's false
public?: boolean;
profile_link?: string;
members?: IOrganizationTeamEmployee[];
managers?: IOrganizationTeamEmployee[];
projects?: IOrganizationProject[];
modules?: IOrganizationProjectModule[];
tags?: ITag[];
tasks?: ITask[];
}
Expand Down Expand Up @@ -64,7 +66,7 @@ export interface IOrganizationTeamStatisticInput extends ITimerStatusInput {

export interface IRelationalOrganizationTeam {
organizationTeam?: IOrganizationTeam;
organizationTeamId?: IOrganizationTeam['id'];
organizationTeamId?: ID;
}

export interface IOrganizationTeamStoreState {
Expand Down
15 changes: 14 additions & 1 deletion packages/contracts/src/role-permission.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,13 @@ export enum PermissionsEnum {
DAILY_PLAN_CREATE = 'DAILY_PLAN_CREATE',
DAILY_PLAN_READ = 'DAILY_PLAN_READ',
DAILY_PLAN_UPDATE = 'DAILY_PLAN_UPDATE',
DAILY_PLAN_DELETE = 'DAILY_PLAN_DELETE'
DAILY_PLAN_DELETE = 'DAILY_PLAN_DELETE',

/** Project Module */
PROJECT_MODULE_CREATE = 'PROJECT_MODULE_CREATE',
PROJECT_MODULE_READ = 'PROJECT_MODULE_READ',
PROJECT_MODULE_UPDATE = 'PROJECT_MODULE_UPDATE',
PROJECT_MODULE_DELETE = 'PROJECT_MODULE_DELETE'
}

export const PermissionGroups = {
Expand Down Expand Up @@ -288,6 +294,13 @@ export const PermissionGroups = {
PermissionsEnum.DAILY_PLAN_DELETE,
/** Daily Plan Permissions End */

/** Project Module Permissions start */
PermissionsEnum.PROJECT_MODULE_CREATE,
PermissionsEnum.PROJECT_MODULE_READ,
PermissionsEnum.PROJECT_MODULE_UPDATE,
PermissionsEnum.PROJECT_MODULE_DELETE,
/** Project Module Permissions start */

/** Organization Team Permissions Start */
PermissionsEnum.ORG_TEAM_ADD,
PermissionsEnum.ORG_TEAM_VIEW,
Expand Down
34 changes: 16 additions & 18 deletions packages/contracts/src/task.model.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import {
IBasePerTenantAndOrganizationEntityModel,
IBaseRelationsEntityModel,
} from './base-entity.model';
import { IBasePerTenantAndOrganizationEntityModel, IBaseRelationsEntityModel, ID } from './base-entity.model';
import { IEmployee } from './employee.model';
import { IInvoiceItem } from './invoice-item.model';
import { IOrganizationProject } from './organization-projects.model';
import { IRelationalOrganizationProject } from './organization-projects.model';
import { IOrganizationSprint } from './organization-sprint.model';
import { IOrganizationTeam } from './organization-team.model';
import { ITag } from './tag.model';
import { IUser } from './user.model';
import { ITaskStatus, TaskStatusEnum } from './task-status.model';
import { ITaskPriority, TaskPriorityEnum } from './task-priority.model';
import { ITaskSize, TaskSizeEnum } from './task-size.model';
import { IRelationalOrganizationProjectModule } from './organization-project-module.model';

export interface ITask extends IBasePerTenantAndOrganizationEntityModel {
export interface ITask
extends IBasePerTenantAndOrganizationEntityModel,
IRelationalOrganizationProject,
IRelationalOrganizationProjectModule {
title: string;
number?: number;
public?: boolean;
Expand All @@ -24,34 +25,31 @@ export interface ITask extends IBasePerTenantAndOrganizationEntityModel {
size?: TaskSizeEnum;
dueDate?: Date;
estimate?: number;
project?: IOrganizationProject;
projectId?: IOrganizationProject['id'];
tags?: ITag[];
members?: IEmployee[];
invoiceItems?: IInvoiceItem[];
teams?: IOrganizationTeam[];
organizationSprint?: IOrganizationSprint;
organizationSprintId?: IOrganizationSprint['id'];
organizationSprintId?: ID;
creator?: IUser;
creatorId?: IUser['id'];
creatorId?: ID;

parent?: ITask;
parentId?: ITask['id']; // Optional field for specifying the parent task ID
parentId?: ID; // Optional field for specifying the parent task ID
children?: ITask[];

taskStatus?: ITaskStatus;
taskSize?: ITaskSize;
taskPriority?: ITaskPriority;
taskStatusId?: ITaskStatus['id'];
taskSizeId?: ITaskSize['id'];
taskPriorityId?: ITaskPriority['id'];
taskStatusId?: ID;
taskSizeId?: ID;
taskPriorityId?: ID;

rootEpic?: ITask;
}

export interface IGetTaskOptions
extends IBasePerTenantAndOrganizationEntityModel {
projectId?: IOrganizationProject['id'];
export interface IGetTaskOptions extends IBasePerTenantAndOrganizationEntityModel {
projectId?: ID;
}

export interface IGetTaskByEmployeeOptions extends IBaseRelationsEntityModel {
Expand All @@ -62,7 +60,7 @@ export type IGetSprintsOptions = IGetTaskOptions;

export enum TaskParticipantEnum {
EMPLOYEES = 'employees',
TEAMS = 'teams',
TEAMS = 'teams'
}

export type ITaskCreateInput = ITask;
Expand Down
Loading
Loading