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

[Feat] Employee Notification & Employee Notification Setting #8758

Merged
merged 36 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a50a57e
feat: create notification models
GloireMutaliko21 Jan 26, 2025
81cecfb
feat: create notification entity
GloireMutaliko21 Jan 26, 2025
12055ef
feat: user notification settings model
GloireMutaliko21 Jan 26, 2025
58e6775
fix: try to resolve issue with circular deps
GloireMutaliko21 Jan 29, 2025
b2542ab
fix: circular deps with import path
GloireMutaliko21 Jan 29, 2025
f130d30
feat: generate Postgres migration
GloireMutaliko21 Jan 30, 2025
c997a84
feat: generate MySQL migration
GloireMutaliko21 Jan 30, 2025
46bd9a4
feat: SQLite user notification migration
GloireMutaliko21 Jan 30, 2025
125f08f
fix: improve entity type base
GloireMutaliko21 Jan 30, 2025
a2081be
feat: user notification event
GloireMutaliko21 Jan 30, 2025
64b20c7
feat: added notification publish method
GloireMutaliko21 Jan 31, 2025
18f17ff
feat: trigger notification on mention, comment and task
GloireMutaliko21 Jan 31, 2025
86d4426
fix: improve create comment input and dto
GloireMutaliko21 Jan 31, 2025
6679b6c
feat: generate migration for user notification settings
GloireMutaliko21 Jan 31, 2025
e6d8e8c
feat: add notification setting service
GloireMutaliko21 Jan 31, 2025
702beeb
feat: check for user setting before creating notification
GloireMutaliko21 Feb 1, 2025
d8c6c99
feat: create default user notification setting on creating notification
GloireMutaliko21 Feb 1, 2025
ad1e41c
feat: user notification setting commands and API
GloireMutaliko21 Feb 1, 2025
ca6f448
feat: improve user notification add hold date
GloireMutaliko21 Feb 4, 2025
3535d6b
fix: core entities remove commented
GloireMutaliko21 Feb 4, 2025
c91b1b1
feat: mark all user notifications as read
GloireMutaliko21 Feb 5, 2025
e1eec3d
feat: added user notification finders APIs
GloireMutaliko21 Feb 5, 2025
dfdc9ce
fix(typos) cspell errors
GloireMutaliko21 Feb 8, 2025
338bd73
fix: user notification settin
GloireMutaliko21 Feb 8, 2025
c23329a
fix: added coderabbit suggestions
GloireMutaliko21 Feb 8, 2025
6a17bdd
Update packages/contracts/src/lib/user-notification-setting.model.ts
GloireMutaliko21 Feb 10, 2025
4cd4c83
fix: added reviews
GloireMutaliko21 Feb 10, 2025
f128cc8
Merge branch 'feat/internal-system-notifications' of https://github.c…
GloireMutaliko21 Feb 10, 2025
d3ced5b
Merge branch 'develop' into feat/internal-system-notifications
GloireMutaliko21 Feb 10, 2025
9bf52f2
fix: user notification validations
GloireMutaliko21 Feb 10, 2025
e8774e1
Merge branch 'develop' into feat/internal-system-notifications
rahul-rocket Feb 10, 2025
afa7223
refactor: rename user notification to employee notification
rahul-rocket Feb 10, 2025
9637910
refactor: rename user notification to employee notification
rahul-rocket Feb 11, 2025
7d79a45
refactor: rename user notification to employee notification
rahul-rocket Feb 11, 2025
5d15910
fix(cspell): typo spelling :-)
rahul-rocket Feb 11, 2025
3487de9
fix: apply suggestions by coderabbitai
rahul-rocket Feb 11, 2025
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
325 changes: 179 additions & 146 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,147 +1,180 @@
{
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals",
"{workspaceRoot}/angular.json",
"{workspaceRoot}/nx.json",
"{workspaceRoot}/tsconfig.base.json"
],
"sharedGlobals": [
"{workspaceRoot}/package.json",
"{workspaceRoot}/tsconfig.json",
"{workspaceRoot}/.eslintrc.json"
],
"production": ["default"]
},
"cli": {
"warnings": {
"typescriptMismatch": false,
"versionMismatch": false
},
"packageManager": "yarn",
"analytics": false,
"defaultCollection": "@nstudio/xplat"
},
"generators": {
"@nx/angular": {
"application": {
"linter": "eslint",
"style": "scss",
"unitTestRunner": "jest",
"e2eTestRunner": "cypress",
"strict": true
},
"library": {
"linter": "eslint",
"style": "scss",
"unitTestRunner": "jest",
"buildable": true,
"publishable": false,
"strict": true
},
"component": {
"style": "scss",
"changeDetection": "OnPush",
"prefix": "ngx",
"inlineStyle": false,
"inlineTemplate": false,
"skipTests": false
},
"directive": {
"prefix": "ngx",
"skipTests": false
},
"service": {
"skipTests": false
},
"pipe": {
"skipTests": false
},
"module": {
"skipTests": false
},
"storybook-configuration": {
"linter": "eslint",
"configureCypress": true,
"generateCypressSpecs": true
}
},
"@nx/angular:application": {
"e2eTestRunner": "none",
"linter": "eslint",
"style": "css",
"unitTestRunner": "jest"
},
"@nx/angular:library": {
"linter": "eslint",
"unitTestRunner": "jest"
},
"@nx/angular:component": {
"style": "css"
}
},
"defaultProject": "gauzy",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"nxCloudAccessToken": "NWJlMDFmMTMtYzUyZS00ZGE4LTk0NzctNWIzZTkxMzNhMTFlfHJlYWQtd3JpdGU=",
"parallel": 1,
"targetDefaults": {
"build": {
"cache": false,
"inputs": ["production", "^production"]
},
"lint": {
"cache": false
},
"test": {
"cache": false
},
"e2e": {
"cache": false
},
"@nx/eslint:lint": {
"cache": false,
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/tools/eslint-rules/**/*"]
},
"@nx/jest:jest": {
"cache": false,
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
},
"@nx/angular:package": {
"cache": false,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"@nx/webpack:webpack": {
"cache": false,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"@nx/js:tsc": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"@angular-devkit/build-angular:application": {
"cache": false,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
}
},
"useInferencePlugins": false,
"defaultBase": "master",
"release": {
"version": {
"preVersionCommand": "yarn nx run-many -t build"
}
}
}
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals",
"{workspaceRoot}/angular.json",
"{workspaceRoot}/nx.json",
"{workspaceRoot}/tsconfig.base.json"
],
"sharedGlobals": [
"{workspaceRoot}/package.json",
"{workspaceRoot}/tsconfig.json",
"{workspaceRoot}/.eslintrc.json"
],
"production": [
"default"
]
},
"cli": {
"warnings": {
"typescriptMismatch": false,
"versionMismatch": false
},
"packageManager": "yarn",
"analytics": false,
"defaultCollection": "@nstudio/xplat"
},
"generators": {
"@nx/angular": {
"application": {
"linter": "eslint",
"style": "scss",
"unitTestRunner": "jest",
"e2eTestRunner": "cypress",
"strict": true
},
"library": {
"linter": "eslint",
"style": "scss",
"unitTestRunner": "jest",
"buildable": true,
"publishable": false,
"strict": true
},
"component": {
"style": "scss",
"changeDetection": "OnPush",
"prefix": "ngx",
"inlineStyle": false,
"inlineTemplate": false,
"skipTests": false
},
"directive": {
"prefix": "ngx",
"skipTests": false
},
"service": {
"skipTests": false
},
"pipe": {
"skipTests": false
},
"module": {
"skipTests": false
},
"storybook-configuration": {
"linter": "eslint",
"configureCypress": true,
"generateCypressSpecs": true
}
},
"@nx/angular:application": {
"e2eTestRunner": "none",
"linter": "eslint",
"style": "css",
"unitTestRunner": "jest"
},
"@nx/angular:library": {
"linter": "eslint",
"unitTestRunner": "jest"
},
"@nx/angular:component": {
"style": "css"
}
},
"defaultProject": "gauzy",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"nxCloudAccessToken": "NWJlMDFmMTMtYzUyZS00ZGE4LTk0NzctNWIzZTkxMzNhMTFlfHJlYWQtd3JpdGU=",
"parallel": 1,
"targetDefaults": {
"build": {
"cache": false,
"inputs": [
"production",
"^production"
]
},
"lint": {
"cache": false
},
"test": {
"cache": false
},
"e2e": {
"cache": false
},
"@nx/eslint:lint": {
"cache": false,
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/tools/eslint-rules/**/*"
]
},
"@nx/jest:jest": {
"cache": false,
"inputs": [
"default",
"^production",
"{workspaceRoot}/jest.preset.js"
],
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
},
"@nx/angular:package": {
"cache": false,
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
},
"@nx/webpack:webpack": {
"cache": false,
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
},
"@nx/js:tsc": {
"cache": true,
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
},
"@angular-devkit/build-angular:application": {
"cache": false,
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
}
},
"useInferencePlugins": false,
"defaultBase": "master",
"release": {
"version": {
"preVersionCommand": "yarn nx run-many -t build"
}
}
}
5 changes: 4 additions & 1 deletion packages/contracts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ export * from './lib/timesheet.model';
export * from './lib/translation.model';
export * from './lib/tree-node.model';
export * from './lib/upwork.model';
export * from './lib/user-notification.model';
export * from './lib/user-notification-setting.model';
export * from './lib/user-organization.model';
export * from './lib/user.model';
export * from './lib/wakatime.model';
Expand All @@ -155,7 +157,8 @@ export {
IBaseRelationsEntityModel,
IBaseSoftDeleteEntityModel,
ID,
JsonData
JsonData,
IBasePerEntityType
} from './lib/base-entity.model';

export * from './lib/proxy.model';
10 changes: 4 additions & 6 deletions packages/contracts/src/lib/activity-log.model.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import {
ActorTypeEnum,
IBasePerEntityType,
IBasePerTenantAndOrganizationEntityModel,
ID,
IBasePerEntityType, ID,
JsonData
} from './base-entity.model';
import { IUser } from './user.model';

/**
* Interface representing an activity log entry.
*/
export interface IActivityLog extends IBasePerTenantAndOrganizationEntityModel, IBasePerEntityType {
export interface IActivityLog extends IBasePerEntityType {
action: ActionTypeEnum;
actorType?: ActorTypeEnum;
description?: string; // A short sentence describing the action performed. (E.g John Doe created this on 22.09.2024)
Expand All @@ -25,7 +23,7 @@ export interface IActivityLog extends IBasePerTenantAndOrganizationEntityModel,
}

export interface IActivityLogUpdatedValues {
[x: string]: Record<string, any>;
[ x: string ]: Record<string, any>;
}

/**
Expand All @@ -40,4 +38,4 @@ export enum ActionTypeEnum {
/**
* Input type for activity log creation, excluding `creatorId` and `creator`.
*/
export interface IActivityLogInput extends Omit<IActivityLog, 'creatorId' | 'creator'> {}
export interface IActivityLogInput extends Omit<IActivityLog, 'creatorId' | 'creator'> { }
2 changes: 1 addition & 1 deletion packages/contracts/src/lib/base-entity.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface IBasePerTenantAndOrganizationEntityMutationInput extends Partia
}

// Represents a base structure for generic entities, linking their unique ID with their type.
export interface IBasePerEntityType {
export interface IBasePerEntityType extends IBasePerTenantAndOrganizationEntityModel {
entityId: ID; // Unique ID of the entity
entity: BaseEntityEnum; // The type of the entity, defined in BaseEntityEnum enumeration.
}
Expand Down
Loading
Loading