law-common 2.8.1-beta.13 → 2.8.1-beta.15

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,4 +1,4 @@
1
- import { IApiEntity, IReimbursementEntity, ReimbursementActionEnum, ReimbursementActionSubRowEnum, ReimbursementStatusEnum, ReimbursementStatusSubRow } from "../../entities";
1
+ import { IApiEntity, IReimbursementEntity, ReimbursementActionEnum, ReimbursementActionSubRowEnum, ReimbursementStatusEnum, ReimbursementSubRowState } from "../../entities";
2
2
  import { IProjectEntityGet } from "./project.entity.response";
3
3
  import { IUserApiEntity } from "./user.entity.api";
4
4
  export type IReimbursementApiEntity = IApiEntity<IReimbursementEntity>;
@@ -22,11 +22,11 @@ export type IReimbursementFlowConfig = {
22
22
  };
23
23
  };
24
24
  child: {
25
- [key in ReimbursementStatusSubRow]?: {
25
+ [key in ReimbursementSubRowState]?: {
26
26
  actions: {
27
27
  [key in ReimbursementActionSubRowEnum]?: {
28
28
  permissions: string[];
29
- next?: () => ReimbursementStatusSubRow;
29
+ next?: () => ReimbursementSubRowState;
30
30
  };
31
31
  };
32
32
  };
@@ -24,7 +24,7 @@ export declare enum ReimbursementStatusEnum {
24
24
  export declare enum ReimbursementSubRowState {
25
25
  PENDING = "pending",
26
26
  APPROVED = "approved",
27
- REJECT = "reject"
27
+ REJECTED = "rejected"
28
28
  }
29
29
  export declare enum ReimbursementPaymentStatusEnum {
30
30
  PAID = "PAID",
@@ -43,11 +43,6 @@ export declare enum ReimbursementActionSubRowEnum {
43
43
  APPROVE = "approve",
44
44
  REJECT = "reject"
45
45
  }
46
- export declare enum ReimbursementStatusSubRow {
47
- APPROVED = "approved",
48
- REJECTED = "rejected",
49
- PENDING = "pending"
50
- }
51
46
  export declare namespace ReimbursementActionEnum {
52
47
  function getLabel(action: ReimbursementActionEnum): string;
53
48
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReimbursementStatusSubRow = exports.ReimbursementActionSubRowEnum = exports.ReimbursementActionEnum = exports.ReimbursementPaymentStatusEnum = exports.ReimbursementSubRowState = exports.ReimbursementStatusEnum = exports.ReimbursementIncurredByEnum = exports.ReimbursementBillingPresentEnum = exports.ReimbursementBillingTypeEnum = void 0;
3
+ exports.ReimbursementActionSubRowEnum = exports.ReimbursementActionEnum = exports.ReimbursementPaymentStatusEnum = exports.ReimbursementSubRowState = exports.ReimbursementStatusEnum = exports.ReimbursementIncurredByEnum = exports.ReimbursementBillingPresentEnum = exports.ReimbursementBillingTypeEnum = void 0;
4
4
  const error_key_enum_1 = require("../../enums/error.key.enum");
5
5
  const exceptions_1 = require("../../exceptions");
6
6
  var ReimbursementBillingTypeEnum;
@@ -34,7 +34,7 @@ var ReimbursementSubRowState;
34
34
  (function (ReimbursementSubRowState) {
35
35
  ReimbursementSubRowState["PENDING"] = "pending";
36
36
  ReimbursementSubRowState["APPROVED"] = "approved";
37
- ReimbursementSubRowState["REJECT"] = "reject";
37
+ ReimbursementSubRowState["REJECTED"] = "rejected";
38
38
  })(ReimbursementSubRowState || (exports.ReimbursementSubRowState = ReimbursementSubRowState = {}));
39
39
  var ReimbursementPaymentStatusEnum;
40
40
  (function (ReimbursementPaymentStatusEnum) {
@@ -56,12 +56,6 @@ var ReimbursementActionSubRowEnum;
56
56
  ReimbursementActionSubRowEnum["APPROVE"] = "approve";
57
57
  ReimbursementActionSubRowEnum["REJECT"] = "reject";
58
58
  })(ReimbursementActionSubRowEnum || (exports.ReimbursementActionSubRowEnum = ReimbursementActionSubRowEnum = {}));
59
- var ReimbursementStatusSubRow;
60
- (function (ReimbursementStatusSubRow) {
61
- ReimbursementStatusSubRow["APPROVED"] = "approved";
62
- ReimbursementStatusSubRow["REJECTED"] = "rejected";
63
- ReimbursementStatusSubRow["PENDING"] = "pending";
64
- })(ReimbursementStatusSubRow || (exports.ReimbursementStatusSubRow = ReimbursementStatusSubRow = {}));
65
59
  (function (ReimbursementActionEnum) {
66
60
  const actionLabelMap = {
67
61
  [ReimbursementActionEnum.VIEW]: "View",
@@ -45,3 +45,4 @@ export * from "./enums/billing.action.enum";
45
45
  export * from "./enums/configuration.type.enum";
46
46
  export * from "./enums/project_user_status.enum";
47
47
  export * from "./interface/reimbursement_history.entity.interface";
48
+ export * from "./interface/reimbursement_expense.entity.interface";
@@ -61,3 +61,4 @@ __exportStar(require("./enums/billing.action.enum"), exports);
61
61
  __exportStar(require("./enums/configuration.type.enum"), exports);
62
62
  __exportStar(require("./enums/project_user_status.enum"), exports);
63
63
  __exportStar(require("./interface/reimbursement_history.entity.interface"), exports);
64
+ __exportStar(require("./interface/reimbursement_expense.entity.interface"), exports);
@@ -8,9 +8,7 @@ export interface IReimbursementEntity extends IAuditColumnEntity {
8
8
  amount: number;
9
9
  billNo?: string;
10
10
  expenseIncurredBy: ReimbursementIncurredByEnum;
11
- expenseType: string;
12
11
  billPresent: ReimbursementBillingPresentEnum;
13
- split: boolean;
14
12
  expenseDetailsJson: string;
15
13
  projectIdsCsv: string;
16
14
  userIdsCsv: string;
@@ -31,6 +29,7 @@ export interface IReimbursementExpenseAllocation {
31
29
  userId: number;
32
30
  projectId: number;
33
31
  amount: number;
32
+ expenseType: string;
34
33
  state?: ReimbursementSubRowState;
35
34
  action?: ReimbursementActionSubRowEnum;
36
35
  }
@@ -38,7 +37,7 @@ export interface IReimbursementCreateDtoExtra {
38
37
  expenseDetails: IReimbursementExpenseDetails;
39
38
  attachmentDocumentUrls?: string[];
40
39
  }
41
- export type IReimbursementExclude = "expenseDetailsJson" | "projectIdsCsv" | "attachmentUrlsCsv" | "amountReimbursed" | "processedBy" | "processedDate" | "approvedBy" | "userIdsCsv";
40
+ export type IReimbursementExclude = "billingType" | "expenseDetailsJson" | "projectIdsCsv" | "attachmentUrlsCsv" | "amountReimbursed" | "processedBy" | "processedDate" | "approvedBy" | "userIdsCsv";
42
41
  export interface IReimbursementEntityCreateDto extends Omit<IEntityCreateDto<IReimbursementEntity>, IReimbursementExclude>, IReimbursementCreateDtoExtra {
43
42
  }
44
43
  export interface IReimbursementUpdateDto extends IEntityUpdateDto<IReimbursementEntity> {
@@ -53,3 +52,11 @@ export interface IReimbursementActionDataDto {
53
52
  export interface IReimbursementUpdateDto extends IEntityUpdateDto<IReimbursementEntity> {
54
53
  actionData?: IReimbursementActionDataDto;
55
54
  }
55
+ export interface IReimbursementRowData {
56
+ id: number;
57
+ userId: number;
58
+ projectId: number;
59
+ expenseType: string;
60
+ amount: number;
61
+ state: ReimbursementSubRowState;
62
+ }
@@ -0,0 +1,17 @@
1
+ import { ReimbursementActionSubRowEnum, ReimbursementSubRowState } from "../enums/reimbursement.entity.enum";
2
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
+ import { IEntityCreateDto, IEntityUpdateDto } from "./entity.utils.interface";
4
+ export interface IReimbursementExpenseEntity extends IAuditColumnEntity {
5
+ id: number;
6
+ reimbursementId: number;
7
+ userId: number;
8
+ projectId: number;
9
+ expenseType: string;
10
+ amount: number;
11
+ state?: ReimbursementSubRowState;
12
+ }
13
+ export interface IReimbursementExpenseEntityCreateDto extends IEntityCreateDto<IReimbursementExpenseEntity> {
14
+ }
15
+ export interface IReimbursementExpenseEntityUpdateDto extends IEntityUpdateDto<IReimbursementExpenseEntity> {
16
+ action?: ReimbursementActionSubRowEnum;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "2.8.1-beta.13",
3
+ "version": "2.8.1-beta.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [