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

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.
@@ -37,7 +37,7 @@ exports.DesignationEntityModel = DesignationEntityModel;
37
37
  DesignationEntityModel.relationConfigs = [
38
38
  {
39
39
  name: entity_utils_interface_1.EntityEnum.RATE,
40
- relation: relation_type_enum_1.RelationType.ONE,
40
+ relation: relation_type_enum_1.RelationType.MANY,
41
41
  key: "rate",
42
42
  mapKeyConfig: {
43
43
  relationKey: "designation",
@@ -24,4 +24,5 @@ export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIM
24
24
  getRelationConfigs(): any[];
25
25
  static relationConfigs: RelationConfigs<[EntityEnum.USER], EntityEnum.TIMESHEET>;
26
26
  getTimesheetAmount(projectCurrency: CurrencyEnum): number;
27
+ get formattedDate(): string;
27
28
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimesheetEntityModel = void 0;
4
+ const utils_1 = require("../../utils");
4
5
  const relation_type_enum_1 = require("../enums/relation-type.enum");
5
6
  const timesheet_status_enum_1 = require("../enums/timesheet.status.enum");
6
7
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
@@ -33,6 +34,9 @@ class TimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
33
34
  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
35
  return rate * this.totalDuration;
35
36
  }
37
+ get formattedDate() {
38
+ return new utils_1.DateCodeModel(this.dateCode).getFormattedDate();
39
+ }
36
40
  }
37
41
  exports.TimesheetEntityModel = TimesheetEntityModel;
38
42
  TimesheetEntityModel.relationConfigs = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "10.74.1-beta.4",
3
+ "version": "10.74.1-beta.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [