law-common 14.0.3-beta.2 → 14.0.3-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.
- package/dist/src/api/interface/timesheet.update.dto.interface.d.ts +0 -7
- package/dist/src/api/interface/timesheet.update.dto.interface.js +0 -8
- package/dist/src/entities/interface/timesheet.entity.interface.d.ts +2 -1
- package/dist/src/entities/model/timesheet.entity.model.d.ts +8 -1
- package/dist/src/entities/model/timesheet.entity.model.js +15 -0
- package/package.json +1 -1
|
@@ -9,10 +9,3 @@ export interface ITimesheetUpdateDto extends IEntityUpdateDto<ITimesheetEntity>
|
|
|
9
9
|
}
|
|
10
10
|
export interface ITimesheetUpdateDtoValidationData extends ITimesheetCreateDtoValidationData {
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Fields on a timesheet that, when changed via an UPDATE, reset the timesheet's
|
|
14
|
-
* `classificationStatus` back to `PENDING`. Shared by backend (toUpdateDto) and frontend
|
|
15
|
-
* (edit warning). `billingId` intentionally NOT included — a billing change does not reset
|
|
16
|
-
* classification. Anything not listed here is by definition "non-reset".
|
|
17
|
-
*/
|
|
18
|
-
export declare const TIMESHEET_CLASSIFICATION_RESET_FIELDS: (keyof ITimesheetEntity)[];
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TIMESHEET_CLASSIFICATION_RESET_FIELDS = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Fields on a timesheet that, when changed via an UPDATE, reset the timesheet's
|
|
6
|
-
* `classificationStatus` back to `PENDING`. Shared by backend (toUpdateDto) and frontend
|
|
7
|
-
* (edit warning). `billingId` intentionally NOT included — a billing change does not reset
|
|
8
|
-
* classification. Anything not listed here is by definition "non-reset".
|
|
9
|
-
*/
|
|
10
|
-
exports.TIMESHEET_CLASSIFICATION_RESET_FIELDS = ["userId", "projectId", "task", "description", "dateCode", "totalDuration"];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TimesheetClassificationStatusEnum } from "../enums/timesheet_classification_status_enum";
|
|
2
2
|
import { TimesheetStatusEnum } from "../enums/timesheet_status_enum";
|
|
3
3
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
|
+
import { Nullable } from "./entity.utils.interface";
|
|
4
5
|
export interface ITimesheetEntity extends IEntityAuditColumn {
|
|
5
6
|
id: number;
|
|
6
7
|
userId: number;
|
|
@@ -15,6 +16,6 @@ export interface ITimesheetEntity extends IEntityAuditColumn {
|
|
|
15
16
|
billedDuration?: number;
|
|
16
17
|
notBilledDuration?: number;
|
|
17
18
|
classificationStatus: TimesheetClassificationStatusEnum;
|
|
18
|
-
classifiedBy?: number
|
|
19
|
+
classifiedBy?: Nullable<number>;
|
|
19
20
|
}
|
|
20
21
|
export type PendingApprovalStatus = TimesheetStatusEnum.CREATE_APPROVAL_PENDING | TimesheetStatusEnum.UPDATE_APPROVAL_PENDING | TimesheetStatusEnum.DELETE_APPROVAL_PENDING | TimesheetStatusEnum.RESOLVED_REJECTED;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITimesheetFlowContextData, ITimesheetUpdateDto } from "../../api";
|
|
2
2
|
import { CurrencyEnum } from "../../enums";
|
|
3
3
|
import { IClassificationWindowConfig, ITimesheetActionItem, SortableTimesheet } from "../../model/entities/interface/timesheet.model.interface";
|
|
4
4
|
import { TimesheetClassificationStatusEnum } from "../enums/timesheet_classification_status_enum";
|
|
@@ -63,5 +63,12 @@ export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIM
|
|
|
63
63
|
startDay: number;
|
|
64
64
|
endDay: Nullable<number>;
|
|
65
65
|
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Fields on a timesheet that, when changed via an UPDATE, reset the timesheet's
|
|
68
|
+
* `classificationStatus` back to `PENDING`. Shared by backend (toUpdateDto) and frontend
|
|
69
|
+
* (edit warning). `billingId` intentionally NOT included — a billing change does not reset
|
|
70
|
+
* classification. Anything not listed here is by definition "non-reset".
|
|
71
|
+
*/
|
|
72
|
+
static timesheetClassificationResetFieldsSet(): string[];
|
|
66
73
|
static sortByProjectAndDesignation(data: SortableTimesheet[], designations: IDesignationEntity[]): SortableTimesheet[];
|
|
67
74
|
}
|
|
@@ -290,6 +290,21 @@ class TimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
290
290
|
};
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Fields on a timesheet that, when changed via an UPDATE, reset the timesheet's
|
|
295
|
+
* `classificationStatus` back to `PENDING`. Shared by backend (toUpdateDto) and frontend
|
|
296
|
+
* (edit warning). `billingId` intentionally NOT included — a billing change does not reset
|
|
297
|
+
* classification. Anything not listed here is by definition "non-reset".
|
|
298
|
+
*/
|
|
299
|
+
static timesheetClassificationResetFieldsSet() {
|
|
300
|
+
return [
|
|
301
|
+
"userId",
|
|
302
|
+
"projectId",
|
|
303
|
+
"dateCode",
|
|
304
|
+
"totalDuration",
|
|
305
|
+
// "task", "description",
|
|
306
|
+
];
|
|
307
|
+
}
|
|
293
308
|
static sortByProjectAndDesignation(data, designations) {
|
|
294
309
|
const priorityMap = new Map();
|
|
295
310
|
designations.forEach((d) => {
|