Skip to content

Commit

Permalink
Merge pull request #8746 from ever-co/fix/desktop-builds
Browse files Browse the repository at this point in the history
[Fix] Desktop Builds
  • Loading branch information
rahul-rocket authored Jan 23, 2025
2 parents 5ad818d + 082dead commit 9e5549c
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 66 deletions.
2 changes: 2 additions & 0 deletions apps/desktop/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"../../../dist/packages/auth",
"../../../dist/packages/common",
"../../../dist/packages/config",
"../../../dist/packages/constants",
"../../../dist/packages/contracts",
"../../../dist/packages/core",
"../../../dist/packages/desktop-core",
Expand Down Expand Up @@ -146,6 +147,7 @@
"@electron/remote": "^2.0.8",
"@gauzy/auth": "file:../../../dist/packages/auth",
"@gauzy/config": "file:../../../dist/packages/config",
"@gauzy/constants": "file:../../../dist/packages/constants",
"@gauzy/contracts": "file:../../../dist/packages/contracts",
"@gauzy/core": "file:../../../dist/packages/core",
"@gauzy/desktop-core": "file:../../../dist/packages/desktop-core",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ import {
DEFAULT_SCREENSHOT_FREQUENCY_OPTIONS,
DEFAULT_TIME_FORMATS,
DEFAULT_STANDARD_WORK_HOURS_PER_DAY,
DEFAULT_INVITE_EXPIRY_PERIOD
DEFAULT_INVITE_EXPIRY_PERIOD,
TaskProofOfCompletionTypeEnum,
DEFAULT_PROOF_COMPLETION_TYPE,
DEFAULT_TASK_NOTIFY_PERIOD,
DEFAULT_AUTO_CLOSE_ISSUE_PERIOD,
DEFAULT_AUTO_ARCHIVE_ISSUE_PERIOD
} from '@gauzy/constants';
import {
AccountingTemplateTypeEnum,
Expand All @@ -25,18 +30,13 @@ import {
CrudActionEnum,
CurrenciesEnum,
CurrencyPosition,
DEFAULT_TASK_NOTIFY_PERIOD,
DEFAULT_PROOF_COMPLETION_TYPE,
DefaultValueDateTypeEnum,
IAccountingTemplate,
IKeyValuePair,
IOrganization,
RegionsEnum,
WeekDaysEnum,
IOrganizationTaskSetting,
TaskProofOfCompletionTypeEnum,
DEFAULT_AUTO_CLOSE_ISSUE_PERIOD,
DEFAULT_AUTO_ARCHIVE_ISSUE_PERIOD
IOrganizationTaskSetting
} from '@gauzy/contracts';
import { isEmpty } from '@gauzy/ui-core/common';
import {
Expand Down
2 changes: 2 additions & 0 deletions apps/server-api/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"../../../dist/packages/auth",
"../../../dist/packages/common",
"../../../dist/packages/config",
"../../../dist/packages/constants",
"../../../dist/packages/contracts",
"../../../dist/packages/core",
"../../../dist/packages/desktop-core",
Expand Down Expand Up @@ -136,6 +137,7 @@
"@fastify/swagger": "^9.4.0",
"@gauzy/auth": "file:../../../dist/packages/auth",
"@gauzy/config": "file:../../../dist/packages/config",
"@gauzy/constants": "file:../../../dist/packages/constants",
"@gauzy/contracts": "file:../../../dist/packages/contracts",
"@gauzy/core": "file:../../../dist/packages/core",
"@gauzy/desktop-core": "file:../../../dist/packages/desktop-core",
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"../../../dist/packages/auth",
"../../../dist/packages/common",
"../../../dist/packages/config",
"../../../dist/packages/constants",
"../../../dist/packages/contracts",
"../../../dist/packages/core",
"../../../dist/packages/desktop-core",
Expand Down Expand Up @@ -135,6 +136,7 @@
"@electron/remote": "^2.0.8",
"@gauzy/auth": "file:../../../dist/packages/auth",
"@gauzy/config": "file:../../../dist/packages/config",
"@gauzy/constants": "file:../../../dist/packages/constants",
"@gauzy/contracts": "file:../../../dist/packages/contracts",
"@gauzy/core": "file:../../../dist/packages/core",
"@gauzy/desktop-core": "file:../../../dist/packages/desktop-core",
Expand Down
1 change: 1 addition & 0 deletions packages/constants/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './lib/task';
export * from './lib/organization';
28 changes: 28 additions & 0 deletions packages/constants/src/lib/task.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Enumeration for task proof of completion types.
* Defines whether the proof of task completion is publicly visible or private.
*/
export enum TaskProofOfCompletionTypeEnum {
PUBLIC = 'PUBLIC',
PRIVATE = 'PRIVATE'
}

/**
* Default period (in days) before sending a notification about a pending task.
*/
export const DEFAULT_TASK_NOTIFY_PERIOD = 7;

/**
* Default period (in days) before an unresolved issue is automatically closed.
*/
export const DEFAULT_AUTO_CLOSE_ISSUE_PERIOD = 7;

/**
* Default period (in days) before an inactive issue is automatically archived.
*/
export const DEFAULT_AUTO_ARCHIVE_ISSUE_PERIOD = 7;

/**
* Default proof of completion type for a task, set to PRIVATE.
*/
export const DEFAULT_PROOF_COMPLETION_TYPE = TaskProofOfCompletionTypeEnum.PRIVATE;
1 change: 1 addition & 0 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"lib:watch": "yarn nx build contracts --watch"
},
"dependencies": {
"@gauzy/constants": "^0.1.0",
"tslib": "^2.6.2"
},
"devDependencies": {
Expand Down
68 changes: 31 additions & 37 deletions packages/contracts/src/lib/organization-task-setting.model.ts
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
import { TaskProofOfCompletionTypeEnum } from '@gauzy/constants';
import { IRelationalOrganizationProject } from './organization-projects.model';
import { IRelationalOrganizationTeam } from './organization-team.model';
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';

export interface IOrganizationTaskSetting extends IBasePerTenantAndOrganizationEntityModel, IRelationalOrganizationTeam, IRelationalOrganizationProject {
export interface IOrganizationTaskSetting
extends IBasePerTenantAndOrganizationEntityModel,
IRelationalOrganizationTeam,
IRelationalOrganizationProject {
isTasksPrivacyEnabled: boolean;
isTasksMultipleAssigneesEnabled: boolean;
isTasksManualTimeEnabled: boolean;
isTasksGroupEstimationEnabled: boolean;
isTasksEstimationInHoursEnabled: boolean;
isTasksEstimationInStoryPointsEnabled: boolean;

isTasksPrivacyEnabled: boolean;
isTasksMultipleAssigneesEnabled: boolean;
isTasksManualTimeEnabled: boolean;
isTasksGroupEstimationEnabled: boolean;
isTasksEstimationInHoursEnabled: boolean;
isTasksEstimationInStoryPointsEnabled: boolean;
isTasksProofOfCompletionEnabled: boolean;
tasksProofOfCompletionType: TaskProofOfCompletionTypeEnum;

isTasksProofOfCompletionEnabled: boolean;
tasksProofOfCompletionType: TaskProofOfCompletionTypeEnum;
isTasksLinkedEnabled: boolean;
isTasksCommentsEnabled: boolean;
isTasksHistoryEnabled: boolean;
isTasksAcceptanceCriteriaEnabled: boolean;
isTasksDraftsEnabled: boolean;

isTasksLinkedEnabled: boolean;
isTasksCommentsEnabled: boolean;
isTasksHistoryEnabled: boolean;
isTasksAcceptanceCriteriaEnabled: boolean;
isTasksDraftsEnabled: boolean;
isTasksNotifyLeftEnabled: boolean;
tasksNotifyLeftPeriodDays: number;

isTasksNotifyLeftEnabled: boolean;
tasksNotifyLeftPeriodDays: number;
isTasksAutoCloseEnabled: boolean;
tasksAutoClosePeriodDays: number;

isTasksAutoCloseEnabled: boolean;
tasksAutoClosePeriodDays: number;
isTasksAutoArchiveEnabled: boolean;
tasksAutoArchivePeriodDays: number;

isTasksAutoArchiveEnabled: boolean;
tasksAutoArchivePeriodDays: number;

isTasksAutoStatusEnabled: boolean;
}

export enum TaskProofOfCompletionTypeEnum {
PUBLIC = 'PUBLIC',
PRIVATE = 'PRIVATE',
isTasksAutoStatusEnabled: boolean;
}

export interface IOrganizationTaskSettingFindInput extends IBasePerTenantAndOrganizationEntityModel, IRelationalOrganizationTeam, IRelationalOrganizationProject { }
export interface IOrganizationTaskSettingFindInput
extends IBasePerTenantAndOrganizationEntityModel,
IRelationalOrganizationTeam,
IRelationalOrganizationProject {}

export interface IOrganizationTaskSettingCreateInput extends IOrganizationTaskSetting { }

export interface IOrganizationTaskSettingUpdateInput extends Partial<IOrganizationTaskSettingCreateInput> {
id?: IOrganizationTaskSetting['id'];
}
export interface IOrganizationTaskSettingCreateInput extends IOrganizationTaskSetting {}

export const DEFAULT_TASK_NOTIFY_PERIOD = 7;
export const DEFAULT_AUTO_CLOSE_ISSUE_PERIOD = 7;
export const DEFAULT_AUTO_ARCHIVE_ISSUE_PERIOD = 7;
export const DEFAULT_PROOF_COMPLETION_TYPE = TaskProofOfCompletionTypeEnum.PRIVATE;
export interface IOrganizationTaskSettingUpdateInput extends Partial<IOrganizationTaskSettingCreateInput> {}
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
import { RelationId } from 'typeorm';
import {
IOrganizationProject,
IOrganizationTaskSetting,
IOrganizationTeam,
TaskProofOfCompletionTypeEnum,
} from '@gauzy/contracts';
import { TaskProofOfCompletionTypeEnum } from '@gauzy/constants';
import { ID, IOrganizationProject, IOrganizationTaskSetting, IOrganizationTeam } from '@gauzy/contracts';
import { ApiPropertyOptional } from '@nestjs/swagger';
import {
IsBoolean,
IsEnum,
IsNumber,
IsOptional,
IsUUID,
} from 'class-validator';
import {
OrganizationProject,
OrganizationTeam,
TenantOrganizationBaseEntity,
} from '../core/entities/internal';
import { IsBoolean, IsEnum, IsNumber, IsOptional, IsUUID } from 'class-validator';
import { OrganizationProject, OrganizationTeam, TenantOrganizationBaseEntity } from '../core/entities/internal';
import { ColumnIndex, MultiORMColumn, MultiORMEntity, MultiORMManyToOne } from './../core/decorators/entity';
import { MikroOrmOrganizationTaskSettingRepository } from './repository/mikro-orm-organization-task-setting.repository';

@MultiORMEntity('organization_task_setting', { mikroOrmRepository: () => MikroOrmOrganizationTaskSettingRepository })
export class OrganizationTaskSetting extends TenantOrganizationBaseEntity implements IOrganizationTaskSetting {

/**
* Indicates whether tasks privacy features are enabled.
* When true, tasks have privacy features such as restricted visibility.
Expand Down Expand Up @@ -239,7 +224,7 @@ export class OrganizationTaskSetting extends TenantOrganizationBaseEntity implem
@RelationId((it: OrganizationTaskSetting) => it.project)
@ColumnIndex()
@MultiORMColumn({ nullable: true, relationId: true })
projectId?: IOrganizationProject['id'];
projectId?: ID;

/**
* Organization Team
Expand All @@ -259,5 +244,5 @@ export class OrganizationTaskSetting extends TenantOrganizationBaseEntity implem
@RelationId((it: OrganizationTaskSetting) => it.organizationTeam)
@ColumnIndex()
@MultiORMColumn({ nullable: true, relationId: true })
organizationTeamId?: IOrganizationTeam['id'];
organizationTeamId?: ID;
}
1 change: 1 addition & 0 deletions packages/desktop-ui-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@electron/remote": "^2.0.8",
"@fortawesome/angular-fontawesome": "^0.15.0",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@gauzy/constants": "^0.1.0",
"@gauzy/contracts": "^0.1.0",
"@gauzy/desktop-window": "^0.1.0",
"@kurkle/color": "^0.3.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AfterViewInit, Component, ElementRef, Inject, NgZone, OnInit, Optional, ViewChild } from '@angular/core';
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { DEFAULT_SCREENSHOT_FREQUENCY_OPTIONS, LanguagesEnum } from '@gauzy/contracts';
import { DEFAULT_SCREENSHOT_FREQUENCY_OPTIONS } from '@gauzy/constants';
import { LanguagesEnum } from '@gauzy/contracts';
import { NbDialogService, NbToastrService } from '@nebular/theme';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { TranslateService } from '@ngx-translate/core';
Expand Down

0 comments on commit 9e5549c

Please sign in to comment.