@rentman/rm-core 63.4.0 → 63.4.1-RM4-45884
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/rm-core.js +1 -1
- package/dist/rm-core.js.map +1 -1
- package/dist/types/src/classes/ApiFormatter.d.ts +1 -1
- package/dist/types/src/classes/BusinessLogicManager/Inhuurmateriaal/{InhuurmateriaalAantalBusinessLogicRule.d.ts → InhuurmateriaalAantalRoundUpBusinessLogicRule.d.ts} +1 -1
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/{PlanningmateriaalAantalBusinessLogicRule.d.ts → PlanningmateriaalAantalRoundUpBusinessLogicRule.d.ts} +1 -1
- package/dist/types/src/classes/BusinessLogicManager/Rate/{RateUpdatedBusinessLogicRule.d.ts → RateDeactivateExistingOnCreateBusinessLogicRule.d.ts} +6 -1
- package/dist/types/src/classes/BusinessLogicManager/Tijd/{TijdNameChangedBusinessLogicRule.d.ts → TijdPropagateNameToFunctiegroepBusinessLogicRule.d.ts} +1 -1
- package/dist/types/src/classes/BusinessLogicManager/registeredBusinessLogicRules.d.ts +5 -5
- package/dist/types/src/types/ItemTypesCollection.d.ts +9 -1
- package/package.json +2 -2
|
@@ -43,7 +43,7 @@ export declare abstract class ApiFormatter {
|
|
|
43
43
|
* Compares the given fields, returns `true` when the fields are equal
|
|
44
44
|
*/
|
|
45
45
|
static compareFields<ColumnType extends ApiEnumApiType>(columnType: ColumnType, first?: ApiEnumApiTypeToTsTypeMap[ColumnType], second?: ApiEnumApiTypeToTsTypeMap[ColumnType]): boolean;
|
|
46
|
-
static compareFloats(a: number, b: number): boolean;
|
|
46
|
+
static compareFloats(a: number, b: number, epsilonPrecision?: 'float' | 'double'): boolean;
|
|
47
47
|
static compareMomentObjects(first: moment.Moment, second: moment.Moment): boolean;
|
|
48
48
|
static compareDurations(first: moment.Duration, second: moment.Duration): boolean;
|
|
49
49
|
static formatResponseValue(columnType: string, value: any): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AantalBusinessLogicRuleBase } from '../AantalBusinessLogicRuleBase';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class InhuurmateriaalAantalRoundUpBusinessLogicRule extends AantalBusinessLogicRuleBase<'Inhuurmateriaal'> {
|
|
3
3
|
protected readonly itemType = "Inhuurmateriaal";
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AantalBusinessLogicRuleBase } from '../AantalBusinessLogicRuleBase';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class PlanningmateriaalAantalRoundUpBusinessLogicRule extends AantalBusinessLogicRuleBase<'Planningmateriaal'> {
|
|
3
3
|
protected readonly itemType = "Planningmateriaal";
|
|
4
4
|
}
|
|
@@ -6,7 +6,12 @@ import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext'
|
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
7
|
type ConditionResult = Set<ItemId>;
|
|
8
8
|
type Dependency = ItemResource<'Rate', ['rate_group', 'active', 'id']>[];
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* When new Rate items are created within a rate group, this rule deactivates all existing
|
|
11
|
+
* active rates in those groups by setting their `active` field to false.
|
|
12
|
+
* Rates with a rate_group of 0 (ungrouped) are ignored.
|
|
13
|
+
*/
|
|
14
|
+
export declare class RateDeactivateExistingOnCreateBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
10
15
|
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
11
16
|
dependency(transaction: TransactionCache, updatedGroups: ConditionResult): Promise<Dependency>;
|
|
12
17
|
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency): void;
|
|
@@ -13,7 +13,7 @@ type Dependency = {
|
|
|
13
13
|
* @description
|
|
14
14
|
* If the 'naam' of the Tijd item changes, update function groups with the same name connected to this Tijd item
|
|
15
15
|
*/
|
|
16
|
-
export declare class
|
|
16
|
+
export declare class TijdPropagateNameToFunctiegroepBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
17
17
|
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
18
18
|
dependency(transaction: TransactionCache, tijdIds: ConditionResult): Promise<Dependency>;
|
|
19
19
|
apply(context: BusinessLogicRuleApplyContext, tijdFunctiegroepTuples: Dependency): void;
|
|
@@ -18,7 +18,7 @@ import { FunctieTravelDistanceUnlinkLocationBusinessLogicRule } from './Functie/
|
|
|
18
18
|
import { FunctieTravelTimeFromLocationBusinessLogicRule } from './Functie/FunctieTravelTimeFromLocationBusinessLogicRule';
|
|
19
19
|
import { FunctieTwowayBusinessLogicRule } from './Functie/FunctieTwowayBusinessLogicRule';
|
|
20
20
|
import { FunctiegroepSubprojectBusinessLogicRule } from './Functiegroep/FunctiegroepSubprojectBusinessLogicRule';
|
|
21
|
-
import {
|
|
21
|
+
import { InhuurmateriaalAantalRoundUpBusinessLogicRule } from './Inhuurmateriaal/InhuurmateriaalAantalRoundUpBusinessLogicRule';
|
|
22
22
|
import { InhuurmateriaalAantaltotaalBusinessLogicRule } from './Inhuurmateriaal/InhuurmateriaalAantaltotaalBusinessLogicRule';
|
|
23
23
|
import { MateriaalBulkToSerialBusinessLogicRule } from './Materiaal/MateriaalBulkToSerialBusinessLogicRule';
|
|
24
24
|
import { MateriaalIsCombinationBusinessLogicRule } from './Materiaal/MateriaalIsCombinationBusinessLogicRule';
|
|
@@ -36,7 +36,7 @@ import { LinkedTimeItemTimeSchemeBusinessLogicRule } from './MateriaalCatFunctie
|
|
|
36
36
|
import { LinkedTimeItemTimeSchemeStartBusinessLogicRule } from './MateriaalCatFunctieFunctiegroep/LinkedTimeItemTimeSchemeStartBusinessLogicRule';
|
|
37
37
|
import { LinkedTimeItemTimeValueStartBusinessLogicRule } from './MateriaalCatFunctieFunctiegroep/LinkedTimeItemTimeValueStartBusinessLogicRule';
|
|
38
38
|
import { OfferteContractDatumBusinessLogicRule } from './OfferteContract/OfferteContractDatumBusinessLogicRule';
|
|
39
|
-
import {
|
|
39
|
+
import { PlanningmateriaalAantalRoundUpBusinessLogicRule } from './Planningmateriaal/PlanningmateriaalAantalRoundUpBusinessLogicRule';
|
|
40
40
|
import { PlanningmateriaalAantaltotaalBusinessLogicRule } from './Planningmateriaal/PlanningmateriaalAantaltotaalBusinessLogicRule';
|
|
41
41
|
import { PlanningmateriaalOptieBusinessLogicRule } from './Planningmateriaal/PlanningmateriaalOptieBusinessLogicRule';
|
|
42
42
|
import { PlanningmateriaalParentBusinessLogicRule } from './Planningmateriaal/PlanningmateriaalParentBusinessLogicRule';
|
|
@@ -48,7 +48,7 @@ import { ProjectOneSubLocationAlignBusinessLogicRule } from './Project/ProjectOn
|
|
|
48
48
|
import { ProjectSubprojectDefaultTimeBusinessLogicRule } from './ProjectSubproject/ProjectSubprojectDefaultTimeBusinessLogicRule';
|
|
49
49
|
import { PurchaseOrderApprovalStatusBusinessLogicRule } from './PurchaseOrder/PurchaseOrderApprovalStatusBusinessLogicRule';
|
|
50
50
|
import { PurchaseOrderOwnerBusinessLogicRule } from './PurchaseOrder/PurchaseOrderOwnerBusinessLogicRule';
|
|
51
|
-
import {
|
|
51
|
+
import { RateDeactivateExistingOnCreateBusinessLogicRule } from './Rate/RateDeactivateExistingOnCreateBusinessLogicRule';
|
|
52
52
|
import { ReparatiesExemplaarAantalBusinessLogicRule } from './Reparatie/ReparatieExemplaarAantalBusinessLogicRule';
|
|
53
53
|
import { ReparatieLostItemExemplaarLocationBusinessLogicRule } from './Reparatie/ReparatieLostItemExemplaarLocationBusinessLogicRule';
|
|
54
54
|
import { RolEditOwnDataBusinessLogicRule } from './Rol/RolEditOwnDataBusinessLogicRule';
|
|
@@ -66,6 +66,6 @@ import { SubprojectOneSubLocationAlignBusinessLogicRule } from './Subproject/Sub
|
|
|
66
66
|
import { SubprojectOneSubNameAlignBusinessLogicRule } from './Subproject/SubprojectOneSubNameAlignBusinessRule';
|
|
67
67
|
import { TaakDeadlineTypeBusinessLogicRule } from './Taak/TaakDeadlineTypeBusinessLogicRule';
|
|
68
68
|
import { TaakDeadlineOffsetBusinessLogicRule } from './Taak/TaakDeadlineOffsetBusinessLogicRule';
|
|
69
|
-
import {
|
|
69
|
+
import { TijdPropagateNameToFunctiegroepBusinessLogicRule } from './Tijd/TijdPropagateNameToFunctiegroepBusinessLogicRule';
|
|
70
70
|
import { TijdSubprojectChangedBusinessLogicRule } from './Tijd/TijdSubprojectChangedBusinessLogicRule';
|
|
71
|
-
export declare const registeredBusinessLogicRules: readonly [typeof DefaultContactPersonUpdateBusinessLogicRule, typeof ContactAddressBusinessLogicRule, typeof CustomFieldLinkedItemTypeBusinessLogicRule, typeof CustomFieldTypeBusinessLogicRule, typeof DocumentTemplateBusinessLogicRule, typeof ExemplaarAanschafdatumBusinessLogicRule, typeof ExemplaarBarcodeDeleteBusinessLogicRule, typeof FactuurBetalingsconditieBusinessLogicRule, typeof FactuurDatumBusinessLogicRule, typeof FactuurNumberseriesBusinessLogicRule, typeof FilesNameExtensionBusinessLogicRule, typeof FunctieNaaminternBusinessLogicRule, typeof FunctieTravelDistanceFromLocationBusinessLogicRule, typeof FunctieTravelDistanceUnlinkLocationBusinessLogicRule, typeof FunctieTravelTimeFromLocationBusinessLogicRule, typeof FunctieTwowayBusinessLogicRule, typeof FunctieRecureindBusinessLogicRule, typeof FunctiegroepSubprojectBusinessLogicRule, typeof InhuurmateriaalAantaltotaalBusinessLogicRule, typeof
|
|
71
|
+
export declare const registeredBusinessLogicRules: readonly [typeof DefaultContactPersonUpdateBusinessLogicRule, typeof ContactAddressBusinessLogicRule, typeof CustomFieldLinkedItemTypeBusinessLogicRule, typeof CustomFieldTypeBusinessLogicRule, typeof DocumentTemplateBusinessLogicRule, typeof ExemplaarAanschafdatumBusinessLogicRule, typeof ExemplaarBarcodeDeleteBusinessLogicRule, typeof FactuurBetalingsconditieBusinessLogicRule, typeof FactuurDatumBusinessLogicRule, typeof FactuurNumberseriesBusinessLogicRule, typeof FilesNameExtensionBusinessLogicRule, typeof FunctieNaaminternBusinessLogicRule, typeof FunctieTravelDistanceFromLocationBusinessLogicRule, typeof FunctieTravelDistanceUnlinkLocationBusinessLogicRule, typeof FunctieTravelTimeFromLocationBusinessLogicRule, typeof FunctieTwowayBusinessLogicRule, typeof FunctieRecureindBusinessLogicRule, typeof FunctiegroepSubprojectBusinessLogicRule, typeof InhuurmateriaalAantaltotaalBusinessLogicRule, typeof InhuurmateriaalAantalRoundUpBusinessLogicRule, typeof MateriaalIsCombinationBusinessLogicRule, typeof MateriaalIsPhysicalCombinationBulkBusinessLogicRule, typeof MateriaalToVirtualBusinessLogicRule, typeof MateriaalToPhysicalBusinessLogicRule, typeof MateriaalBulkToSerialBusinessLogicRule, typeof MateriaalSerialToBulkBusinessLogicRule, typeof MateriaalTypePropertiesBusinessLogicRule, typeof MateriaalVerhuurBusinessLogicRule, typeof SurfaceArticleSizeBusinessLogicRule, typeof LinkedTimeItemDurationBusinessLogicRule, typeof LinkedTimeItemTimeSchemeBusinessLogicRule, typeof LinkedTimeItemTimeSchemeStartBusinessLogicRule, typeof LinkedTimeItemTimeValueStartBusinessLogicRule, typeof LinkedTimeItemSubprojectBusinessLogicRule, typeof LinkedTimeItemMateriaalCatBusinessLogicRule, typeof OfferteContractDatumBusinessLogicRule, typeof PlanningmateriaalAantalRoundUpBusinessLogicRule, typeof PlanningmateriaalAantaltotaalBusinessLogicRule, typeof PlanningmateriaalOptieBusinessLogicRule, typeof PlanningmateriaalParentBusinessLogicRule, typeof PlanningmateriaalStaysAtLocationBusinessLogicRule, typeof PlanningPersoneelTransportBusinessLogicRule, typeof ProjectClientChangedBusinessLogicRule, typeof ProjectContactProjectNoteBusinessLogicRule, typeof ProjectOneSubLocationAlignBusinessLogicRule, typeof ProjectSubprojectDefaultTimeBusinessLogicRule, typeof PurchaseOrderOwnerBusinessLogicRule, typeof PurchaseOrderApprovalStatusBusinessLogicRule, typeof RateDeactivateExistingOnCreateBusinessLogicRule, typeof ReparatiesExemplaarAantalBusinessLogicRule, typeof ReparatieLostItemExemplaarLocationBusinessLogicRule, typeof RolEditOwnDataBusinessLogicRule, typeof RolFileAccessBusinessLogicRule, typeof RolPersoneelsplannerToegangBusinessLogicRule, typeof RolProjectenBewerkenBusinessLogicRule, typeof RolProjectenToegangBusinessLogicRule, typeof RolVisibilityFinancialsBusinessLogicRule, typeof RolWarehouseTrackingLogAccessBusinessLogicRule, typeof RolPurchaseOrderAttachPlanningBusinessLogicRule, typeof SetinhoudCreateFixedBusinessLogicRule, typeof SetinhoudUpdateFixedBusinessLogicRule, typeof SubprojectOneSubLocationAlignBusinessLogicRule, typeof SubprojectOneSubNameAlignBusinessLogicRule, typeof SubprojectInPlanningBusinessLogicRule, typeof TaakDeadlineTypeBusinessLogicRule, typeof TaakDeadlineOffsetBusinessLogicRule, typeof TijdSubprojectChangedBusinessLogicRule, typeof TijdPropagateNameToFunctiegroepBusinessLogicRule, typeof AfspraakRecureindBusinessLogicRule, typeof BeschikbaarheidRecureindBusinessLogicRule];
|
|
@@ -114,6 +114,14 @@ export interface SocketMessageBase {
|
|
|
114
114
|
messageType: string;
|
|
115
115
|
inResponse: boolean;
|
|
116
116
|
}
|
|
117
|
+
export interface SocketMessageMassUpdate<ItemTypeType extends ApiItemType> extends SocketMessageBase {
|
|
118
|
+
messageType: 'event';
|
|
119
|
+
body: {
|
|
120
|
+
itemType: ItemTypeType;
|
|
121
|
+
eventType: 'massUpdate';
|
|
122
|
+
items: Pick<SocketUpdatedItems, ItemTypeType>;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
117
125
|
export interface SocketMessageCreate<ItemTypeType extends ApiItemType> extends SocketMessageBase {
|
|
118
126
|
messageType: 'event';
|
|
119
127
|
body: {
|
|
@@ -155,7 +163,7 @@ export type SocketMessageValuesTuple<ItemTypeType extends ApiItemType, ColumnIds
|
|
|
155
163
|
parent: EntryParent | null;
|
|
156
164
|
values: FieldMap<ItemTypeType, ColumnIds>;
|
|
157
165
|
};
|
|
158
|
-
export type SocketMessage<ItemTypeType extends ApiItemType> = SocketMessageCreate<ItemTypeType> | SocketMessageUpdate<ItemTypeType> | SocketMessageLinkTo<ItemTypeType> | SocketMessageDelete
|
|
166
|
+
export type SocketMessage<ItemTypeType extends ApiItemType> = SocketMessageCreate<ItemTypeType> | SocketMessageUpdate<ItemTypeType> | SocketMessageLinkTo<ItemTypeType> | SocketMessageDelete | SocketMessageMassUpdate<ItemTypeType>;
|
|
159
167
|
export type ItemResourcesItemTypeMap = {
|
|
160
168
|
[ItemTypeType in ApiItemType]?: ItemResource<ItemTypeType>[];
|
|
161
169
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rentman/rm-core",
|
|
3
|
-
"version": "63.4.
|
|
3
|
+
"version": "63.4.1-RM4-45884",
|
|
4
4
|
"description": "Rentman core functionalities",
|
|
5
5
|
"main": "./dist/rm-core.js",
|
|
6
6
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@angular/core": "^20",
|
|
37
|
-
"@rentman/backend-types": "
|
|
37
|
+
"@rentman/backend-types": "4.851.0-61-g004802329a",
|
|
38
38
|
"moment": "^2.30.1",
|
|
39
39
|
"rxjs": "^7"
|
|
40
40
|
},
|