law-common 10.8.0 → 10.9.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { BillingStatusEnum } from "../entities";
1
2
  export declare const timesheetViewThreshold = "timesheetViewThreshold";
2
3
  export declare const timesheetThreshold = "timesheetThreshold";
3
4
  export declare const timesheetEnterThreshold = "timesheetEnterThreshold";
@@ -5,4 +6,6 @@ export declare const timesheetMinimumTotalDuration = 15;
5
6
  export declare const toDoListMinimumEstimatedDuration = 15;
6
7
  export declare const reimbursementPaymentProcessorPermissionName = "REIMBURSEMENT_PAYMENT_PROCESSOR";
7
8
  export declare const leaveImplicitDays: string[];
9
+ export declare const freezeTimesheetAfter: BillingStatusEnum;
8
10
  export declare const usersToExcludeFromSearchResponse: string[];
11
+ export declare const systemUsers: string[];
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usersToExcludeFromSearchResponse = exports.leaveImplicitDays = exports.reimbursementPaymentProcessorPermissionName = exports.toDoListMinimumEstimatedDuration = exports.timesheetMinimumTotalDuration = exports.timesheetEnterThreshold = exports.timesheetThreshold = exports.timesheetViewThreshold = void 0;
3
+ exports.systemUsers = exports.usersToExcludeFromSearchResponse = exports.freezeTimesheetAfter = exports.leaveImplicitDays = exports.reimbursementPaymentProcessorPermissionName = exports.toDoListMinimumEstimatedDuration = exports.timesheetMinimumTotalDuration = exports.timesheetEnterThreshold = exports.timesheetThreshold = exports.timesheetViewThreshold = void 0;
4
+ const entities_1 = require("../entities");
4
5
  exports.timesheetViewThreshold = "timesheetViewThreshold";
5
6
  exports.timesheetThreshold = "timesheetThreshold";
6
7
  exports.timesheetEnterThreshold = "timesheetEnterThreshold";
@@ -8,4 +9,6 @@ exports.timesheetMinimumTotalDuration = 15;
8
9
  exports.toDoListMinimumEstimatedDuration = 15;
9
10
  exports.reimbursementPaymentProcessorPermissionName = "REIMBURSEMENT_PAYMENT_PROCESSOR";
10
11
  exports.leaveImplicitDays = ["Saturday", "Sunday"];
12
+ exports.freezeTimesheetAfter = entities_1.BillingStatusEnum.PENDING_CLIENT_REVIEW;
11
13
  exports.usersToExcludeFromSearchResponse = ["DB migration"];
14
+ exports.systemUsers = ["DB migration", "TestSecretary"]; // TODO - Which users will be stored in systemUsers
@@ -5,7 +5,8 @@ export declare enum TimesheetActionEnum {
5
5
  CREATE = "create",
6
6
  APPROVE = "approve",
7
7
  REJECT = "reject",
8
- RECALL = "recall"
8
+ RECALL = "recall",
9
+ BILLING_UPDATE = "billing_update"
9
10
  }
10
11
  export declare namespace TimesheetActionEnum {
11
12
  function getLabel(action: TimesheetActionEnum): string;
@@ -12,6 +12,7 @@ var TimesheetActionEnum;
12
12
  TimesheetActionEnum["APPROVE"] = "approve";
13
13
  TimesheetActionEnum["REJECT"] = "reject";
14
14
  TimesheetActionEnum["RECALL"] = "recall";
15
+ TimesheetActionEnum["BILLING_UPDATE"] = "billing_update";
15
16
  })(TimesheetActionEnum || (exports.TimesheetActionEnum = TimesheetActionEnum = {}));
16
17
  (function (TimesheetActionEnum) {
17
18
  const actionLabelMap = {
@@ -22,6 +23,7 @@ var TimesheetActionEnum;
22
23
  [TimesheetActionEnum.CREATE]: "Create",
23
24
  [TimesheetActionEnum.REJECT]: "Reject",
24
25
  [TimesheetActionEnum.RECALL]: "Recall",
26
+ [TimesheetActionEnum.BILLING_UPDATE]: "Billing Update",
25
27
  };
26
28
  function getLabel(action) {
27
29
  if (!Object.values(TimesheetActionEnum).includes(action)) {
@@ -14,6 +14,7 @@ export interface ITimesheetEntity extends IAuditColumnEntity {
14
14
  totalDuration: number;
15
15
  status: TimesheetStatusEnum;
16
16
  remark?: string;
17
+ billingId?: number;
17
18
  }
18
19
  export type ITimesheetEntityExclude = "status";
19
20
  export interface ITimesheetEntityCreateDto extends Omit<IEntityCreateDto<ITimesheetEntity>, ITimesheetEntityExclude> {
@@ -13,6 +13,7 @@ export declare class TimesheetEntityModel implements ITimesheetEntityModel {
13
13
  updatedBy: number;
14
14
  updatedOn: Date;
15
15
  status: TimesheetStatusEnum;
16
+ billingId?: number;
16
17
  /**
17
18
  * @param timesheets - Array of TimesheetModel instances
18
19
  * @return - Array of Timesheet Model
@@ -16,6 +16,7 @@ class TimesheetEntityModel {
16
16
  this.updatedBy = 1;
17
17
  this.updatedOn = new Date();
18
18
  this.status = entities_1.TimesheetStatusEnum.CREATE_APPROVAL;
19
+ this.billingId = 0;
19
20
  }
20
21
  /**
21
22
  * @param timesheets - Array of TimesheetModel instances
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "law-common",
3
- "version": "10.8.0",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "files": [
7
- "dist/**/*"
8
- ],
9
- "scripts": {
10
- "clean": "rm -rf dist",
11
- "build": "npm run clean && tsc",
12
- "publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
13
- "publish:patch": "npm version patch && git push && npm run build && npm publish",
14
- "publish:minor": "npm version minor && git push && npm run build && npm publish",
15
- "publish:major": "npm version major && git push && npm run build && npm publish",
16
- "link": "npm run build && npm link",
17
- "test": "jest"
18
- },
19
- "keywords": [],
20
- "author": "",
21
- "license": "ISC",
22
- "devDependencies": {
23
- "@types/jest": "^29.5.13",
24
- "@types/node": "^22.6.1",
25
- "jest": "^29.7.0",
26
- "ts-jest": "^29.2.5",
27
- "ts-node": "^10.9.2",
28
- "typescript": "^5.6.2"
29
- },
30
- "dependencies": {
31
- "@types/express": "^5.0.0",
32
- "@types/multer": "^1.4.12",
33
- "date-fns": "^4.1.0"
34
- }
35
- }
1
+ {
2
+ "name": "law-common",
3
+ "version": "10.9.1-beta.0",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "files": [
7
+ "dist/**/*"
8
+ ],
9
+ "scripts": {
10
+ "clean": "rm -rf dist",
11
+ "build": "npm run clean && tsc",
12
+ "publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
13
+ "publish:patch": "npm version patch && git push && npm run build && npm publish",
14
+ "publish:minor": "npm version minor && git push && npm run build && npm publish",
15
+ "publish:major": "npm version major && git push && npm run build && npm publish",
16
+ "link": "npm run build && npm link",
17
+ "test": "jest"
18
+ },
19
+ "keywords": [],
20
+ "author": "",
21
+ "license": "ISC",
22
+ "devDependencies": {
23
+ "@types/jest": "^29.5.13",
24
+ "@types/node": "^22.6.1",
25
+ "jest": "^29.7.0",
26
+ "ts-jest": "^29.2.5",
27
+ "ts-node": "^10.9.2",
28
+ "typescript": "^5.6.2"
29
+ },
30
+ "dependencies": {
31
+ "@types/express": "^5.0.0",
32
+ "@types/multer": "^1.4.12",
33
+ "date-fns": "^4.1.0"
34
+ }
35
+ }