@rentman/rm-core 63.4.1 → 64.0.0
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/BusinessLogicManager/AantalBusinessLogicRuleBase.d.ts +9 -11
- package/dist/types/src/classes/BusinessLogicManager/AantaltotaalBusinessLogicRuleBase.d.ts +12 -11
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicManager.d.ts +6 -7
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRule.d.ts +2 -9
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRuleApplyContext.d.ts +3 -10
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRuleConditionContext.d.ts +5 -17
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRuleContextBase.d.ts +4 -55
- package/dist/types/src/classes/BusinessLogicManager/Customfield/CustomFieldLinkedItemTypeBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/DefaultContactPersonUpdateBusinessLogicRule.d.ts +34 -13
- package/dist/types/src/classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule.d.ts +3 -2
- package/dist/types/src/classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule.d.ts +11 -6
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule.d.ts +5 -4
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Files/FilesNameExtensionBusinessLogicRule.d.ts +3 -2
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Functie/functieTravelDistanceUtils.d.ts +1 -1
- package/dist/types/src/classes/BusinessLogicManager/Functiegroep/FunctiegroepSubprojectBusinessLogicRule.d.ts +9 -3
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalBulkToSerialBusinessLogicRule.d.ts +4 -2
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalSerialToBulkBusinessLogicRule.d.ts +4 -2
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule.d.ts +2 -2
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule.d.ts +2 -10
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemBusinessLogicRuleBase.d.ts +10 -17
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemDurationBusinessLogicRule.d.ts +4 -4
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemMateriaalCatBusinessLogicRule.d.ts +6 -7
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemSubprojectBusinessLogicRule.d.ts +5 -20
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemTimeSchemeBusinessLogicRule.d.ts +7 -5
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemTimeSchemeStartBusinessLogicRule.d.ts +7 -5
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemTimeValueStartBusinessLogicRule.d.ts +6 -5
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/TimeColumnUtil.d.ts +1 -1
- package/dist/types/src/classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule.d.ts +3 -2
- package/dist/types/src/classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule.d.ts +6 -4
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalOptieBusinessLogicRule.d.ts +1 -1
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalParentBusinessLogicRule.d.ts +1 -3
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalStaysAtLocationBusinessLogicRule.d.ts +3 -10
- package/dist/types/src/classes/BusinessLogicManager/Project/ProjectContactProjectNoteBusinessLogicRule.d.ts +5 -3
- package/dist/types/src/classes/BusinessLogicManager/Project/ProjectOneSubLocationAlignBusinessRule.d.ts +4 -2
- package/dist/types/src/classes/BusinessLogicManager/Rate/RateDeactivateExistingOnCreateBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarAantalBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieLostItemExemplaarLocationBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts +2 -3
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule.d.ts +2 -3
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts +2 -3
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts +2 -4
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolVisibilityFinancialsBusinessLogicRule.d.ts +2 -7
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolWarehosueTrackingLogAccessBusinessLogicRule.d.ts +2 -3
- package/dist/types/src/classes/BusinessLogicManager/Setinhoud/SetinhoudCreateFixedBusinessLogicRule.d.ts +4 -4
- package/dist/types/src/classes/BusinessLogicManager/Subproject/SubprojectInPlanningBusinessLogicRule.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Subproject/SubprojectOneSubLocationAlignBusinessRule.d.ts +4 -2
- package/dist/types/src/classes/BusinessLogicManager/Subproject/SubprojectOneSubNameAlignBusinessRule.d.ts +4 -2
- package/dist/types/src/classes/BusinessLogicManager/Taak/TaakDeadlineOffsetBusinessLogicRule.d.ts +2 -2
- package/dist/types/src/classes/BusinessLogicManager/Tijd/TijdPropagateNameToFunctiegroepBusinessLogicRule.d.ts +4 -2
- package/dist/types/src/classes/BusinessLogicManager/Tijd/TijdSubprojectChangedBusinessLogicRule.d.ts +6 -2
- package/dist/types/src/classes/BusinessLogicManager/Uren/HoursTypeBusinessLogicRuleBase.d.ts +1 -2
- package/dist/types/src/classes/ChangesDelta.d.ts +7 -9
- package/dist/types/src/classes/ChangesDeltaBase.d.ts +11 -14
- package/dist/types/src/classes/ChangesProcessor.d.ts +3 -3
- package/dist/types/src/classes/ChildChangesDelta.d.ts +18 -7
- package/dist/types/src/classes/CreatedChangesDelta.d.ts +2 -2
- package/dist/types/src/classes/ParentChangesDelta.d.ts +7 -6
- package/dist/types/src/classes/SocketMessageHandler.d.ts +4 -2
- package/dist/types/src/classes/Util.d.ts +1 -0
- package/dist/types/src/classes/cache/AbstractCache.d.ts +1 -6
- package/dist/types/src/classes/cache/server/ServerCache.d.ts +4 -2
- package/dist/types/src/classes/cache/transaction/TransactionCache.d.ts +69 -23
- package/dist/types/src/core.d.ts +0 -2
- package/dist/types/src/interfaces/ServerCacheDependencyInterface.d.ts +1 -2
- package/dist/types/src/internal.d.ts +0 -1
- package/package.json +2 -2
- package/dist/types/src/factories/ChangesCompilationFactory.d.ts +0 -5
|
@@ -5,16 +5,8 @@ import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
7
|
type ConditionResult = ItemId[];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'height',
|
|
11
|
-
'oppervlakteartikel',
|
|
12
|
-
'nieuwprijs',
|
|
13
|
-
'inhuurprijs',
|
|
14
|
-
'verhuurprijs',
|
|
15
|
-
'naam'
|
|
16
|
-
];
|
|
17
|
-
type Dependency = ItemResource<'Materiaal', DependencyColumns>[];
|
|
8
|
+
declare const materiaalColumns: readonly ["width", "height", "oppervlakteartikel", "nieuwprijs", "inhuurprijs", "verhuurprijs", "naam"];
|
|
9
|
+
type Dependency = ItemResource<'Materiaal', typeof materiaalColumns>[];
|
|
18
10
|
export declare class SurfaceArticleSizeBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
19
11
|
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
20
12
|
dependency(transaction: TransactionCache, materiaalIds: ConditionResult): Promise<Dependency>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ItemEntry } from '../../../models/ItemEntry';
|
|
2
2
|
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { ApiRequestColumnArray
|
|
3
|
+
import { ApiRequestColumnArray } from '../../../types/ItemTypesCollection';
|
|
4
4
|
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
5
|
-
import { ChangesDeltaItemCreateDelta } from '../../CreatedChangesDelta';
|
|
6
5
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
8
7
|
import { LinkedTimeItemType, TimeColumnId } from './TimeColumnUtil';
|
|
@@ -17,30 +16,24 @@ type LinkedTimeItemRequestColumnsMapToItemResourceMap<RequestColumnsMap extends
|
|
|
17
16
|
export type LinkedTimeItemResourceMap<RequestColumns extends ApiRequestColumnArray<LinkedTimeItemType>> = {
|
|
18
17
|
[ItemType in LinkedTimeItemType]: ItemResource<ItemType, RequestColumns>[];
|
|
19
18
|
};
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
/**
|
|
20
|
+
* The item entry key could be typed as `ItemEntry<ItemType>`, but that leads to typing issues when reading from the resulting map.
|
|
21
|
+
*/
|
|
22
|
+
export type LinkedTimeItemBusinessLogicRuleBaseColumnMap<RequestColumns extends LinkedTimeItemColumnArray> = {
|
|
23
|
+
[ItemType in LinkedTimeItemType]: Map<ItemEntry<LinkedTimeItemType>, RequestColumns[number][]>;
|
|
22
24
|
};
|
|
23
|
-
export type LinkedTimeItemBusinessLogicRuleBaseUpdatedTuples<RequestColumns extends LinkedTimeItemColumnArray> = {
|
|
24
|
-
[ItemType in LinkedTimeItemType]: UpdatedTuple<LinkedTimeItemType, RequestColumns[number]>[];
|
|
25
|
-
};
|
|
26
|
-
interface UpdatedTuple<ItemTypeType extends LinkedTimeItemType, ColumnId extends LinkedTimeItemColumn = LinkedTimeItemColumn> {
|
|
27
|
-
itemEntry: ItemEntry<ItemTypeType>;
|
|
28
|
-
columnId: ColumnId;
|
|
29
|
-
newValue: GetFieldValueType<ItemTypeType, ColumnId>;
|
|
30
|
-
}
|
|
31
25
|
export declare abstract class LinkedTimeItemBusinessLogicRuleBase<ConditionColumns extends LinkedTimeItemColumnArray, ConditionResult, Dependency> extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
32
26
|
protected conditionColumns: ConditionColumns;
|
|
33
|
-
protected extractCreatedTuples(context: BusinessLogicRuleConditionContext): CreatedTupleMap;
|
|
34
27
|
/**
|
|
35
28
|
* Extract updated fields of functions / function groups / equipment groups, using the columns specified in
|
|
36
29
|
* `conditionColumns`.
|
|
37
30
|
*/
|
|
38
|
-
protected extractUpdatedTuples(context: BusinessLogicRuleConditionContext):
|
|
31
|
+
protected extractUpdatedTuples(context: BusinessLogicRuleConditionContext, includeCreatedItems?: boolean): LinkedTimeItemBusinessLogicRuleBaseColumnMap<ConditionColumns>;
|
|
39
32
|
/**
|
|
40
33
|
* Like {@link extractUpdatedTuples}, but returns `undefined` when no fields have been updated.
|
|
41
34
|
*/
|
|
42
|
-
protected extractUpdatedTuplesCondition(context: BusinessLogicRuleConditionContext):
|
|
43
|
-
protected fetchLinkedItemResourcesWithColumns<RequestColumnsMap extends LinkedTimeItemRequestColumnsMap>(transaction: TransactionCache,
|
|
44
|
-
protected fetchLinkedItemResources<RequestColumns extends ApiRequestColumnArray<LinkedTimeItemType>>(transaction: TransactionCache,
|
|
35
|
+
protected extractUpdatedTuplesCondition(context: BusinessLogicRuleConditionContext): LinkedTimeItemBusinessLogicRuleBaseColumnMap<ConditionColumns> | typeof BLR_SKIP_RULE;
|
|
36
|
+
protected fetchLinkedItemResourcesWithColumns<RequestColumnsMap extends LinkedTimeItemRequestColumnsMap>(transaction: TransactionCache, columnTuples: LinkedTimeItemBusinessLogicRuleBaseColumnMap<any>, requestColumnsMap: RequestColumnsMap): Promise<LinkedTimeItemRequestColumnsMapToItemResourceMap<RequestColumnsMap>>;
|
|
37
|
+
protected fetchLinkedItemResources<RequestColumns extends ApiRequestColumnArray<LinkedTimeItemType>>(transaction: TransactionCache, columnTuples: LinkedTimeItemBusinessLogicRuleBaseColumnMap<any>, requestColumns: RequestColumns): Promise<LinkedTimeItemResourceMap<RequestColumns>>;
|
|
45
38
|
}
|
|
46
39
|
export {};
|
|
@@ -2,16 +2,16 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
2
2
|
import { BLR_SKIP_RULE } from '../BusinessLogicRule';
|
|
3
3
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
4
4
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
5
|
-
import { LinkedTimeItemBusinessLogicRuleBase,
|
|
5
|
+
import { LinkedTimeItemBusinessLogicRuleBase, LinkedTimeItemBusinessLogicRuleBaseColumnMap, LinkedTimeItemResourceMap } from './LinkedTimeItemBusinessLogicRuleBase';
|
|
6
6
|
declare const conditionColumns: readonly ["gebruikvan", "gebruiktot"];
|
|
7
7
|
declare const requestColumns: readonly ["gebruikvan", "gebruiktot", "duur"];
|
|
8
8
|
/**
|
|
9
9
|
* When changing 'gebruikvan' or 'gebruiktot', and both fields are valid, set the duration.
|
|
10
10
|
*/
|
|
11
|
-
export declare class LinkedTimeItemDurationBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<typeof conditionColumns,
|
|
11
|
+
export declare class LinkedTimeItemDurationBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<typeof conditionColumns, LinkedTimeItemBusinessLogicRuleBaseColumnMap<typeof conditionColumns>, LinkedTimeItemResourceMap<typeof requestColumns>> {
|
|
12
12
|
protected conditionColumns: readonly ["gebruikvan", "gebruiktot"];
|
|
13
|
-
condition(context: BusinessLogicRuleConditionContext):
|
|
13
|
+
condition(context: BusinessLogicRuleConditionContext): LinkedTimeItemBusinessLogicRuleBaseColumnMap<typeof conditionColumns> | typeof BLR_SKIP_RULE;
|
|
14
14
|
apply(context: BusinessLogicRuleApplyContext, dependencies: LinkedTimeItemResourceMap<typeof requestColumns>): void;
|
|
15
|
-
dependency(transaction: TransactionCache, conditionResult:
|
|
15
|
+
dependency(transaction: TransactionCache, conditionResult: LinkedTimeItemBusinessLogicRuleBaseColumnMap<typeof conditionColumns>): Promise<LinkedTimeItemResourceMap<typeof requestColumns>>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -4,8 +4,9 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { TimeColumnUtil } from './TimeColumnUtil';
|
|
8
|
+
type ConditionResult = Map<ItemId<'MateriaalCat'>, (typeof TimeColumnUtil.valueColumnIds)[number][]>;
|
|
9
|
+
declare const materiaalCatColumns: readonly ["id", "gebruikvan", "planvan", "gebruiktot", "plantot", "schema_gv_begin", "schema_gt_begin", "schema_pv_begin", "schema_pt_begin", {
|
|
9
10
|
readonly schema_pv: readonly ["van", "tot", "is_absolute_times_substitute"];
|
|
10
11
|
}, {
|
|
11
12
|
readonly schema_pt: readonly ["van", "tot", "is_absolute_times_substitute"];
|
|
@@ -14,12 +15,10 @@ declare const changedMateriaalCatResourceColumns: readonly ["gebruikvan", "gebru
|
|
|
14
15
|
}, {
|
|
15
16
|
readonly schema_gt: readonly ["van", "tot", "is_absolute_times_substitute"];
|
|
16
17
|
}];
|
|
17
|
-
type Dependency =
|
|
18
|
-
changedResources: ItemResource<'MateriaalCat', typeof changedMateriaalCatResourceColumns>[];
|
|
19
|
-
};
|
|
18
|
+
type Dependency = ItemResource<'MateriaalCat', typeof materiaalCatColumns>[];
|
|
20
19
|
export declare class LinkedTimeItemMateriaalCatBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
21
20
|
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
22
|
-
dependency(transaction: TransactionCache,
|
|
23
|
-
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency): void;
|
|
21
|
+
dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<Dependency>;
|
|
22
|
+
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency, conditionResult: ConditionResult): void;
|
|
24
23
|
}
|
|
25
24
|
export {};
|
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
import { ItemEntry } from '../../../models/ItemEntry';
|
|
2
|
-
import { ChangesDeltaItemCreateDelta } from '../../CreatedChangesDelta';
|
|
3
2
|
import { BLR_SKIP_RULE } from '../BusinessLogicRule';
|
|
4
3
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
5
4
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
6
5
|
import { LinkedTimeItemBusinessLogicRuleBase } from './LinkedTimeItemBusinessLogicRuleBase';
|
|
7
6
|
import { LinkedTimeItemType } from './TimeColumnUtil';
|
|
8
7
|
declare const conditionColumns: readonly ["project", "subproject"];
|
|
9
|
-
/**
|
|
10
|
-
* Function items are the only linked time item that have a 'timeframe' field, which, like the 'schema_**' fields,
|
|
11
|
-
* refers to a project time.
|
|
12
|
-
*/
|
|
13
8
|
declare const schemeValueTimeFrameColumnIds: readonly ["schema_gv", "schema_pv", "schema_gt", "schema_pt", "timeframe"];
|
|
14
9
|
type SchemeValueTimeFrameColumnId = (typeof schemeValueTimeFrameColumnIds)[number];
|
|
15
|
-
type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
invalidTimes: SchemeValueTimeFrameColumnId[];
|
|
19
|
-
}[];
|
|
20
|
-
updated: {
|
|
21
|
-
item: ItemEntry<ItemTypeType>;
|
|
22
|
-
invalidTimes: SchemeValueTimeFrameColumnId[];
|
|
23
|
-
}[];
|
|
10
|
+
type InvalidTimesTuple<ItemTypeType extends LinkedTimeItemType> = {
|
|
11
|
+
item: ItemEntry<ItemTypeType>;
|
|
12
|
+
invalidTimes: SchemeValueTimeFrameColumnId[];
|
|
24
13
|
};
|
|
25
14
|
export type LinkedTimeItemSubprojectBusinessLogicRuleConditionResult = {
|
|
26
|
-
[ItemType in LinkedTimeItemType]:
|
|
15
|
+
[ItemType in LinkedTimeItemType]: InvalidTimesTuple<ItemType>[];
|
|
27
16
|
};
|
|
28
17
|
/**
|
|
29
18
|
* When updating the subproject of a function / function group / equipment group, or creating a new
|
|
@@ -39,10 +28,6 @@ export declare class LinkedTimeItemSubprojectBusinessLogicRule extends LinkedTim
|
|
|
39
28
|
private validateLinkedTimes;
|
|
40
29
|
private getInvalidTimeColumnIds;
|
|
41
30
|
private extractTimeItemIds;
|
|
42
|
-
|
|
43
|
-
* The iterator includes the IDs of all times linked to the items in the updated or created items.
|
|
44
|
-
*/
|
|
45
|
-
private getCreatedItemTimeIdIterator;
|
|
46
|
-
private getUpdatedItemTimeIdIterator;
|
|
31
|
+
private getTimeIdIterator;
|
|
47
32
|
}
|
|
48
33
|
export {};
|
|
@@ -3,7 +3,8 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
3
3
|
import { BLR_SKIP_RULE } from '../BusinessLogicRule';
|
|
4
4
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
5
5
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
6
|
-
import {
|
|
6
|
+
import { BusinessLogicRuleContextBase } from '../BusinessLogicRuleContextBase';
|
|
7
|
+
import { LinkedTimeItemBusinessLogicRuleBase, LinkedTimeItemBusinessLogicRuleBaseColumnMap, LinkedTimeItemResourceMap } from './LinkedTimeItemBusinessLogicRuleBase';
|
|
7
8
|
import { TimeColumnUtil } from './TimeColumnUtil';
|
|
8
9
|
declare const requestColumns: readonly ["gebruikvan", "planvan", "gebruiktot", "plantot", "schema_gv_begin", "schema_gt_begin", "schema_pv_begin", "schema_pt_begin"];
|
|
9
10
|
export declare const timeColumns: readonly ["id", "van", "tot"];
|
|
@@ -11,17 +12,18 @@ interface Dependency {
|
|
|
11
12
|
timeResources: ItemResource<'Tijd', typeof timeColumns>[];
|
|
12
13
|
linkedTimeItemResources: LinkedTimeItemResourceMap<typeof requestColumns>;
|
|
13
14
|
}
|
|
15
|
+
type SchemeValueColumnIds = typeof TimeColumnUtil.schemeValueColumnIds;
|
|
14
16
|
/**
|
|
15
17
|
* - When setting 'schema_gv', set 'gebruikvan' to the corresponding time, and 'schema_gv_begin' to `true`.
|
|
16
18
|
* - When setting 'schema_gt', set 'gebruiktot' to the corresponding time, and 'schema_gt_begin' to `false`.
|
|
17
19
|
* - When setting 'schema_pv', set 'planvan' to the corresponding time, and 'schema_pv_begin' to `true`.
|
|
18
20
|
* - When setting 'schema_pt', set 'plantot' to the corresponding time, and 'schema_pt_begin' to `false`.
|
|
19
21
|
*/
|
|
20
|
-
export declare class LinkedTimeItemTimeSchemeBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<
|
|
22
|
+
export declare class LinkedTimeItemTimeSchemeBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<SchemeValueColumnIds, LinkedTimeItemBusinessLogicRuleBaseColumnMap<SchemeValueColumnIds>, Dependency> {
|
|
21
23
|
protected conditionColumns: readonly ["schema_gv", "schema_pv", "schema_gt", "schema_pt"];
|
|
22
|
-
condition(context: BusinessLogicRuleConditionContext):
|
|
23
|
-
dependency(transaction: TransactionCache, conditionResult:
|
|
24
|
-
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency, conditionResult:
|
|
24
|
+
condition(context: BusinessLogicRuleConditionContext): LinkedTimeItemBusinessLogicRuleBaseColumnMap<SchemeValueColumnIds> | typeof BLR_SKIP_RULE;
|
|
25
|
+
dependency(transaction: TransactionCache, conditionResult: LinkedTimeItemBusinessLogicRuleBaseColumnMap<SchemeValueColumnIds>, context: BusinessLogicRuleContextBase): Promise<Dependency>;
|
|
26
|
+
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency, conditionResult: LinkedTimeItemBusinessLogicRuleBaseColumnMap<SchemeValueColumnIds>): void;
|
|
25
27
|
private getTimeItemIds;
|
|
26
28
|
}
|
|
27
29
|
export {};
|
|
@@ -2,17 +2,19 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
2
2
|
import { BLR_SKIP_RULE } from '../BusinessLogicRule';
|
|
3
3
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
4
4
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
5
|
-
import { LinkedTimeItemBusinessLogicRuleBase,
|
|
5
|
+
import { LinkedTimeItemBusinessLogicRuleBase, LinkedTimeItemBusinessLogicRuleBaseColumnMap, LinkedTimeItemResourceMap } from './LinkedTimeItemBusinessLogicRuleBase';
|
|
6
6
|
import { TimeColumnUtil } from './TimeColumnUtil';
|
|
7
|
+
type SchemeValueStartColumnIds = typeof TimeColumnUtil.schemeValueStartColumnIds;
|
|
7
8
|
/**
|
|
8
9
|
* - If 'schema_gv' changes, while 'schema_gv_start' is `true`, and previously, 'schema_gv' and 'schema_gt' had the same
|
|
9
10
|
* value, set 'schema_gt' to the new value of 'schema_gv'.
|
|
10
11
|
* - If 'schema_pv' changes, while 'schema_pv_start' is `true` and previously, 'schema_pv' and 'schema_pt' had the same
|
|
11
12
|
* value, set 'schema_pt' to the new value of 'schema_pv'.
|
|
12
13
|
*/
|
|
13
|
-
export declare class LinkedTimeItemTimeSchemeStartBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<
|
|
14
|
+
export declare class LinkedTimeItemTimeSchemeStartBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<SchemeValueStartColumnIds, LinkedTimeItemBusinessLogicRuleBaseColumnMap<SchemeValueStartColumnIds>, LinkedTimeItemResourceMap<typeof TimeColumnUtil.schemeValueColumnIds>> {
|
|
14
15
|
protected conditionColumns: readonly ["schema_gv", "schema_pv"];
|
|
15
|
-
condition(context: BusinessLogicRuleConditionContext):
|
|
16
|
-
dependency(transaction: TransactionCache, conditionResult:
|
|
17
|
-
apply(context: BusinessLogicRuleApplyContext,
|
|
16
|
+
condition(context: BusinessLogicRuleConditionContext): LinkedTimeItemBusinessLogicRuleBaseColumnMap<SchemeValueStartColumnIds> | typeof BLR_SKIP_RULE;
|
|
17
|
+
dependency(transaction: TransactionCache, conditionResult: LinkedTimeItemBusinessLogicRuleBaseColumnMap<SchemeValueStartColumnIds>): Promise<LinkedTimeItemResourceMap<typeof TimeColumnUtil.schemeValueColumnIds>>;
|
|
18
|
+
apply(context: BusinessLogicRuleApplyContext, dependency: LinkedTimeItemResourceMap<typeof TimeColumnUtil.schemeValueColumnIds>, conditionResult: LinkedTimeItemBusinessLogicRuleBaseColumnMap<SchemeValueStartColumnIds>): void;
|
|
18
19
|
}
|
|
20
|
+
export {};
|
|
@@ -2,19 +2,20 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
2
2
|
import { BLR_SKIP_RULE } from '../BusinessLogicRule';
|
|
3
3
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
4
4
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
5
|
-
import { LinkedTimeItemBusinessLogicRuleBase,
|
|
5
|
+
import { LinkedTimeItemBusinessLogicRuleBase, LinkedTimeItemBusinessLogicRuleBaseColumnMap, LinkedTimeItemResourceMap } from './LinkedTimeItemBusinessLogicRuleBase';
|
|
6
6
|
import { TimeColumnUtil } from './TimeColumnUtil';
|
|
7
7
|
declare const requestColumns: readonly ["gebruikvan", "planvan", "gebruiktot", "plantot", "schema_gt", "schema_pt"];
|
|
8
|
+
type ValueStartColumnIds = typeof TimeColumnUtil.valueStartColumnIds;
|
|
8
9
|
/**
|
|
9
10
|
* - When 'gebruikvan' changes, and 'gebruiktot' is invalid or equal to the previous value of 'gebruikvan',
|
|
10
11
|
* and 'schema_gt' is `null` (not referring to a time), set 'gebruiktot' to the new value of 'gebruikvan'.
|
|
11
12
|
* - When 'planvan' changes, and 'plantot' is invalid or equal to the previous value of 'planvan',
|
|
12
13
|
* and 'schema_pt' is `null` (not referring to a time), set 'plantot' to the new value of 'planvan'.
|
|
13
14
|
*/
|
|
14
|
-
export declare class LinkedTimeItemTimeValueStartBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<
|
|
15
|
+
export declare class LinkedTimeItemTimeValueStartBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<ValueStartColumnIds, LinkedTimeItemBusinessLogicRuleBaseColumnMap<ValueStartColumnIds>, LinkedTimeItemResourceMap<typeof requestColumns>> {
|
|
15
16
|
protected conditionColumns: readonly ["gebruikvan", "planvan"];
|
|
16
|
-
condition(context: BusinessLogicRuleConditionContext):
|
|
17
|
-
dependency(transaction: TransactionCache, conditionResult:
|
|
18
|
-
apply(context: BusinessLogicRuleApplyContext,
|
|
17
|
+
condition(context: BusinessLogicRuleConditionContext): LinkedTimeItemBusinessLogicRuleBaseColumnMap<ValueStartColumnIds> | typeof BLR_SKIP_RULE;
|
|
18
|
+
dependency(transaction: TransactionCache, conditionResult: LinkedTimeItemBusinessLogicRuleBaseColumnMap<ValueStartColumnIds>): Promise<LinkedTimeItemResourceMap<typeof requestColumns>>;
|
|
19
|
+
apply(context: BusinessLogicRuleApplyContext, linkedTimeItemResourceMap: LinkedTimeItemResourceMap<typeof requestColumns>, conditionResult: LinkedTimeItemBusinessLogicRuleBaseColumnMap<ValueStartColumnIds>): void;
|
|
19
20
|
}
|
|
20
21
|
export {};
|
|
@@ -15,7 +15,7 @@ type TimeItemFields = {
|
|
|
15
15
|
van: moment.Moment;
|
|
16
16
|
tot: moment.Moment;
|
|
17
17
|
};
|
|
18
|
-
export declare const LINKED_TIME_ITEM_TYPES:
|
|
18
|
+
export declare const LINKED_TIME_ITEM_TYPES: ["MateriaalCat", "Functie", "Functiegroep"];
|
|
19
19
|
export type LinkedTimeItemType = (typeof LINKED_TIME_ITEM_TYPES)[number];
|
|
20
20
|
export type LinkedItemTypeFieldMap<ItemTypeType extends LinkedTimeItemType> = ItemTypeType extends 'Functie' ? FieldMap<'Functie', TimeColumnId[]> : FieldMap<ItemTypeType, TimeColumnIdExcludingTimeFrame[]>;
|
|
21
21
|
declare const nonReferenceProperties: readonly ["type", "isStart", "defaultValue"];
|
|
@@ -4,13 +4,14 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const requestColumns: readonly ["vervaldatum", "datum"];
|
|
7
8
|
type ConditionResult = {
|
|
8
9
|
Offerte: ItemId[];
|
|
9
10
|
Contract: ItemId[];
|
|
10
11
|
};
|
|
11
12
|
type Dependency = {
|
|
12
|
-
Offerte: ItemResource<'Offerte',
|
|
13
|
-
Contract: ItemResource<'Contract',
|
|
13
|
+
Offerte: ItemResource<'Offerte', typeof requestColumns>[];
|
|
14
|
+
Contract: ItemResource<'Contract', typeof requestColumns>[];
|
|
14
15
|
};
|
|
15
16
|
export declare class OfferteContractDatumBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
16
17
|
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
@@ -4,21 +4,23 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const planningColumns: readonly ["vervoer", "functie", "planvan", "plantot"];
|
|
8
|
+
declare const functieColumns: readonly ["id", "reistijd_vooraf", "reistijd_achteraf"];
|
|
7
9
|
type ConditionResult = {
|
|
8
10
|
Planningpersoneel: ItemId[];
|
|
9
11
|
Planningtransport: ItemId[];
|
|
10
12
|
};
|
|
11
13
|
type Dependency = {
|
|
12
|
-
Planningpersoneel: ItemResource<'Planningpersoneel',
|
|
13
|
-
Planningtransport: ItemResource<'Planningtransport',
|
|
14
|
+
Planningpersoneel: ItemResource<'Planningpersoneel', typeof planningColumns>[];
|
|
15
|
+
Planningtransport: ItemResource<'Planningtransport', typeof planningColumns>[];
|
|
14
16
|
Functie: {
|
|
15
|
-
[functieId: string]: ItemResource<'Functie',
|
|
17
|
+
[functieId: string]: ItemResource<'Functie', typeof functieColumns>;
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
export declare class PlanningPersoneelTransportBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
19
21
|
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
20
22
|
dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
|
|
21
|
-
apply({
|
|
23
|
+
apply({ destinationChangesDelta, }: BusinessLogicRuleApplyContext, items: Dependency): void;
|
|
22
24
|
private updatePlanningColumns;
|
|
23
25
|
}
|
|
24
26
|
export {};
|
|
@@ -7,7 +7,7 @@ import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleCondition
|
|
|
7
7
|
type ConditionResult = ItemId[];
|
|
8
8
|
declare const childPlanningmateriaalColumns: readonly ["id", "optie", "parent"];
|
|
9
9
|
declare const changedPlanningMateriaalColumns: readonly ["id", "optie", "categorie", "parent", {
|
|
10
|
-
readonly materiaal: readonly ["
|
|
10
|
+
readonly materiaal: readonly ["is_combination", "is_physical"];
|
|
11
11
|
}];
|
|
12
12
|
type Dependency = {
|
|
13
13
|
childPlanningmateriaalResourcesInCategories: ItemResource<'Planningmateriaal', typeof childPlanningmateriaalColumns>[];
|
|
@@ -4,9 +4,7 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
-
declare const planningmateriaalColumns: readonly ["parent",
|
|
8
|
-
readonly setcontent: readonly ["is_fixed"];
|
|
9
|
-
}];
|
|
7
|
+
declare const planningmateriaalColumns: readonly ["parent", "setcontent"];
|
|
10
8
|
type ConditionResult = ItemId<'Planningmateriaal'>[];
|
|
11
9
|
type Dependency = ItemResource<'Planningmateriaal', typeof planningmateriaalColumns>[];
|
|
12
10
|
export declare class PlanningmateriaalParentBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { ItemId } from '@rentman/backend-types';
|
|
2
2
|
import { ItemResource } from '../../../models/ItemResource';
|
|
3
3
|
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
-
import { ChangesDeltaItemCreateDelta } from '../../CreatedChangesDelta';
|
|
5
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
6
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
7
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
8
|
-
type ConditionResult =
|
|
9
|
-
changedItems: ItemId[];
|
|
10
|
-
createdItems: ChangesDeltaItemCreateDelta[];
|
|
11
|
-
};
|
|
7
|
+
type ConditionResult = ItemId<'Planningmateriaal'>[];
|
|
12
8
|
declare const planningMateriaalColumns: readonly ["aantaltotaal", "stays_at_location", {
|
|
13
9
|
readonly categorie: readonly [{
|
|
14
10
|
readonly project: readonly [{
|
|
@@ -16,10 +12,7 @@ declare const planningMateriaalColumns: readonly ["aantaltotaal", "stays_at_loca
|
|
|
16
12
|
}];
|
|
17
13
|
}];
|
|
18
14
|
}];
|
|
19
|
-
type Dependency =
|
|
20
|
-
changedPlanningMateriaalResources: ItemResource<'Planningmateriaal', typeof planningMateriaalColumns>[];
|
|
21
|
-
createdItems: ChangesDeltaItemCreateDelta<'Planningmateriaal'>[];
|
|
22
|
-
};
|
|
15
|
+
type Dependency = ItemResource<'Planningmateriaal', typeof planningMateriaalColumns>[];
|
|
23
16
|
/**
|
|
24
17
|
* @description
|
|
25
18
|
* If the planningmateriaal 'aantaltotaal' is changed in a transfer project, stays_at_location should copy this value.
|
|
@@ -27,6 +20,6 @@ type Dependency = {
|
|
|
27
20
|
export declare class PlanningmateriaalStaysAtLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
28
21
|
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
29
22
|
dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<Dependency>;
|
|
30
|
-
apply(context: BusinessLogicRuleApplyContext,
|
|
23
|
+
apply(context: BusinessLogicRuleApplyContext, plannedEquipmentResources: Dependency): void;
|
|
31
24
|
}
|
|
32
25
|
export {};
|
|
@@ -5,16 +5,18 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
5
5
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
6
6
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
7
7
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
8
|
+
declare const contactColumns: readonly ["projectnotitie_naam", "projectnotitie"];
|
|
9
|
+
declare const projectnotitieColumns: readonly ["naam", "omschrijving"];
|
|
8
10
|
type ConditionResult = {
|
|
9
11
|
projectId: ItemId;
|
|
10
|
-
updatedContactIds: Set<ItemId
|
|
12
|
+
updatedContactIds: Set<ItemId<'Contact'>>;
|
|
11
13
|
}[];
|
|
12
14
|
type Dependency = {
|
|
13
15
|
template: Template<'Projectnotitie'>;
|
|
14
16
|
projectTuples: {
|
|
15
17
|
projectId: ItemId;
|
|
16
|
-
Contact: ItemResource<'Contact',
|
|
17
|
-
Projectnotitie: ItemResource<'Projectnotitie',
|
|
18
|
+
Contact: ItemResource<'Contact', typeof contactColumns>[];
|
|
19
|
+
Projectnotitie: ItemResource<'Projectnotitie', typeof projectnotitieColumns>[];
|
|
18
20
|
}[];
|
|
19
21
|
};
|
|
20
22
|
export declare class ProjectContactProjectNoteBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
@@ -4,11 +4,13 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const subprojectColumns: readonly ["id", "locatie"];
|
|
8
|
+
declare const projectColumns: readonly ["id", "locatie", "locatie_persoon"];
|
|
7
9
|
type ConditionResult = ItemId[];
|
|
8
10
|
type Dependency = {
|
|
9
11
|
[projectId: number]: {
|
|
10
|
-
subprojectResources: ItemResource<'Subproject',
|
|
11
|
-
projectResource: ItemResource<'Project',
|
|
12
|
+
subprojectResources: ItemResource<'Subproject', typeof subprojectColumns>[];
|
|
13
|
+
projectResource: ItemResource<'Project', typeof projectColumns>;
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
16
|
/**
|
|
@@ -4,8 +4,9 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const rateColumns: readonly ["rate_group", "active", "id"];
|
|
7
8
|
type ConditionResult = Set<ItemId>;
|
|
8
|
-
type Dependency = ItemResource<'Rate',
|
|
9
|
+
type Dependency = ItemResource<'Rate', typeof rateColumns>[];
|
|
9
10
|
/**
|
|
10
11
|
* When new Rate items are created within a rate group, this rule deactivates all existing
|
|
11
12
|
* active rates in those groups by setting their `active` field to false.
|
|
@@ -4,8 +4,9 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const reparatieColumns: readonly ["aantal"];
|
|
7
8
|
type ConditionResult = ItemId[];
|
|
8
|
-
type Dependency = ItemResource<'Reparatie',
|
|
9
|
+
type Dependency = ItemResource<'Reparatie', typeof reparatieColumns>[];
|
|
9
10
|
export declare class ReparatiesExemplaarAantalBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
10
11
|
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
11
12
|
dependency(transaction: TransactionCache, reparatieIds: ConditionResult): Promise<Dependency>;
|
|
@@ -5,13 +5,14 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
5
5
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
6
6
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
7
7
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
8
|
+
declare const exemplaarColumns: readonly ["id", "asset_location"];
|
|
8
9
|
type ConditionResult = {
|
|
9
10
|
entry: ItemEntry<'Reparatie' | 'MateriaalLost'>;
|
|
10
11
|
exemplaar: ItemId;
|
|
11
12
|
}[];
|
|
12
13
|
type Dependency = {
|
|
13
14
|
entries: ItemEntry<'Reparatie' | 'MateriaalLost'>[];
|
|
14
|
-
exemplaarResources: ItemResource<'Exemplaar',
|
|
15
|
+
exemplaarResources: ItemResource<'Exemplaar', typeof exemplaarColumns>[];
|
|
15
16
|
};
|
|
16
17
|
export declare class ReparatieLostItemExemplaarLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
17
18
|
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
package/dist/types/src/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts
CHANGED
|
@@ -4,10 +4,9 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const rolColumns: readonly ["general_eigen_medewerker_edit"];
|
|
7
8
|
type ConditionResult = ItemId[];
|
|
8
|
-
type Dependency = ItemResource<'Rol', [
|
|
9
|
-
'general_eigen_medewerker_edit'
|
|
10
|
-
]>[];
|
|
9
|
+
type Dependency = ItemResource<'Rol', typeof rolColumns>[];
|
|
11
10
|
/**
|
|
12
11
|
* @description
|
|
13
12
|
* If you can access update crew data, you can also always update your own data
|
|
@@ -4,10 +4,9 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const rolColumns: readonly ["projecten_toegang"];
|
|
7
8
|
type ConditionResult = ItemId[];
|
|
8
|
-
type Dependency = ItemResource<'Rol', [
|
|
9
|
-
'projecten_toegang'
|
|
10
|
-
]>[];
|
|
9
|
+
type Dependency = ItemResource<'Rol', typeof rolColumns>[];
|
|
11
10
|
/**
|
|
12
11
|
* @description
|
|
13
12
|
* If you can enter the crew planner you can also access projects
|
package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts
CHANGED
|
@@ -4,10 +4,9 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const rolColumns: readonly ["materialen_tijdlijn"];
|
|
7
8
|
type ConditionResult = ItemId[];
|
|
8
|
-
type Dependency = ItemResource<'Rol', [
|
|
9
|
-
'materialen_tijdlijn'
|
|
10
|
-
]>[];
|
|
9
|
+
type Dependency = ItemResource<'Rol', typeof rolColumns>[];
|
|
11
10
|
/**
|
|
12
11
|
* @description
|
|
13
12
|
* If you can edit projects you should be able to see the equipment availability
|
package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts
CHANGED
|
@@ -4,11 +4,9 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const rolColumns: readonly ["uren_kosten", "visibility_financials"];
|
|
7
8
|
type ConditionResult = ItemId[];
|
|
8
|
-
type Dependency = ItemResource<'Rol', [
|
|
9
|
-
'uren_kosten',
|
|
10
|
-
'visibility_financials'
|
|
11
|
-
]>[];
|
|
9
|
+
type Dependency = ItemResource<'Rol', typeof rolColumns>[];
|
|
12
10
|
/**
|
|
13
11
|
* @description
|
|
14
12
|
* If you have access to projects you should be able to make costs for registered hours
|
|
@@ -4,14 +4,9 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const rolColumns: readonly ["visibility_financials", "facturen_toegang", "projecten_facturen_maken", "projecten_offertes_maken", "projecten_toegang"];
|
|
7
8
|
type ConditionResult = ItemId[];
|
|
8
|
-
type Dependency = ItemResource<'Rol', [
|
|
9
|
-
'visibility_financials',
|
|
10
|
-
'facturen_toegang',
|
|
11
|
-
'projecten_facturen_maken',
|
|
12
|
-
'projecten_offertes_maken',
|
|
13
|
-
'projecten_toegang'
|
|
14
|
-
]>[];
|
|
9
|
+
type Dependency = ItemResource<'Rol', typeof rolColumns>[];
|
|
15
10
|
/**
|
|
16
11
|
* @description
|
|
17
12
|
* If you're not allowed to see financials, then you should not have the permission to
|
|
@@ -5,9 +5,8 @@ import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
7
|
type ConditionResult = ItemId[];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
]>[];
|
|
8
|
+
declare const rolColumns: readonly ["magazijn_toegang"];
|
|
9
|
+
type Dependency = ItemResource<'Rol', typeof rolColumns>[];
|
|
11
10
|
/**
|
|
12
11
|
* @description
|
|
13
12
|
* If you can enter access the Warehouse Tracking Log, you can also access Warehouse module
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
1
2
|
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
2
|
-
import {
|
|
3
|
+
import { ChildChangesDeltaItemCreateDelta } from '../../ChildChangesDelta';
|
|
3
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
4
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
5
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
6
|
-
import { LatestItem } from '../BusinessLogicRuleContextBase';
|
|
7
7
|
declare const materiaalColumns: readonly ["id", "type", "is_combination", "is_physical", "telexemplaren", "verhuur"];
|
|
8
|
-
type ConditionResult =
|
|
9
|
-
type Dependency = Record<string,
|
|
8
|
+
type ConditionResult = ChildChangesDeltaItemCreateDelta<'Setinhoud'>[];
|
|
9
|
+
type Dependency = Record<string, ItemResource<'Materiaal', typeof materiaalColumns>>;
|
|
10
10
|
/**
|
|
11
11
|
* Legacy users won't have the `FUNCTIONALITY_FLEXIBLE_COMBINATION_IN_PLANNING` flag, meaning the `is_fixed` column from `Setinhoud` column isn't editable
|
|
12
12
|
* With this business rule we enforce the correct (default) value based on the equipment properties (Backend enforces this as well)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ItemId } from '@rentman/backend-types';
|
|
2
2
|
import { BLR_SKIP_RULE, BusinessLogicRule, BusinessLogicRuleApplyContext, BusinessLogicRuleConditionContext, ItemResource, TransactionCache } from '../../../internal';
|
|
3
|
-
|
|
3
|
+
declare const functieColumns: readonly ["subproject", "inplanning"];
|
|
4
|
+
type Dependency = Map<ItemId<'Subproject'>, ItemResource<'Functie', typeof functieColumns>[]>;
|
|
4
5
|
type ConditionResult = Map<ItemId<'Subproject'>, boolean>;
|
|
5
6
|
/**
|
|
6
7
|
* Whenever the 'inplanning' field of a subproject changes, set the 'inplanning' field of all functions in the
|
|
@@ -4,11 +4,13 @@ import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
|
4
4
|
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
5
|
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
6
|
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
declare const subprojectColumns: readonly ["id", "project", "locatie", "locatie_persoon"];
|
|
8
|
+
declare const projectColumns: readonly ["id", "locatie"];
|
|
7
9
|
type ConditionResult = ItemId[];
|
|
8
10
|
type Dependency = {
|
|
9
11
|
[projectId: number]: {
|
|
10
|
-
Subproject: ItemResource<'Subproject',
|
|
11
|
-
Project: ItemResource<'Project',
|
|
12
|
+
Subproject: ItemResource<'Subproject', typeof subprojectColumns>;
|
|
13
|
+
Project: ItemResource<'Project', typeof projectColumns>;
|
|
12
14
|
amountOfSubprojects: number;
|
|
13
15
|
};
|
|
14
16
|
};
|