law-common 10.74.1-beta.3 → 10.74.1-beta.4

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.
@@ -23,5 +23,5 @@ export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIM
23
23
  static fromEntity(entity: ITimesheetEntity): TimesheetEntityModel;
24
24
  getRelationConfigs(): any[];
25
25
  static relationConfigs: RelationConfigs<[EntityEnum.USER], EntityEnum.TIMESHEET>;
26
- getTimesheetAmount(projectCurrency: CurrencyEnum): import("./rate.model").RateEntityModel[] | 0;
26
+ getTimesheetAmount(projectCurrency: CurrencyEnum): number;
27
27
  }
@@ -29,8 +29,9 @@ class TimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
29
29
  return this.constructor.prototype.constructor.relationConfigs || [];
30
30
  }
31
31
  getTimesheetAmount(projectCurrency) {
32
- var _a, _b, _c, _d;
33
- return (_d = (_c = (_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.designationModel) === null || _b === void 0 ? void 0 : _b.rate) === null || _c === void 0 ? void 0 : _c.filter((rate) => rate.currency === projectCurrency)) !== null && _d !== void 0 ? _d : 0;
32
+ var _a, _b, _c, _d, _e;
33
+ const rate = (_e = (_d = (_c = (_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.designationModel) === null || _b === void 0 ? void 0 : _b.rate) === null || _c === void 0 ? void 0 : _c.find((rate) => rate.currency === projectCurrency)) === null || _d === void 0 ? void 0 : _d.rate) !== null && _e !== void 0 ? _e : 0;
34
+ return rate * this.totalDuration;
34
35
  }
35
36
  }
36
37
  exports.TimesheetEntityModel = TimesheetEntityModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "10.74.1-beta.3",
3
+ "version": "10.74.1-beta.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [