@rentman/rm-core 66.1.2-RM4-46977 → 66.1.3
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/BusinessLogicManager.d.ts +2 -1
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalOptieBusinessLogicRule.d.ts +19 -10
- package/dist/types/src/classes/BusinessLogicManager/registeredBusinessLogicRules.d.ts +1 -3
- package/dist/types/src/classes/Util.d.ts +9 -1
- package/dist/types/src/classes/cache/transaction/TransactionCache.d.ts +3 -2
- package/dist/types/src/classes/cache/transaction/TransactionItemHandler.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalCombinationChildrenBusinessLogicRuleBase.d.ts +0 -31
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalCreatePeriodBusinessLogicRule.d.ts +0 -26
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalEditTijdSchemaBusinessLogicRule.d.ts +0 -16
|
@@ -3,6 +3,7 @@ import { ErrorHandlerInterface } from '../../interfaces/ErrorHandlerInterface';
|
|
|
3
3
|
import { GetAccountSettignsFn, HasFlagFn } from '../../types/ItemTypesCollection';
|
|
4
4
|
import { TransactionCache } from '../cache/transaction/TransactionCache';
|
|
5
5
|
import { ChangesDelta } from '../ChangesDelta';
|
|
6
|
+
import { TimeoutPromiseHandler } from '../Util';
|
|
6
7
|
import { BusinessLogicRule, BusinessLogicRuleConditionConfirmFn, BusinessLogicRuleConfirmFnWithDependency } from './BusinessLogicRule';
|
|
7
8
|
import { BusinessLogicRuleConstructor } from './businessLogicRule.decorator';
|
|
8
9
|
/**
|
|
@@ -57,7 +58,7 @@ export declare class BusinessLogicManager {
|
|
|
57
58
|
*
|
|
58
59
|
* @private Should only be called by the core.
|
|
59
60
|
*/
|
|
60
|
-
handleBusinessLogic(transaction: TransactionCache, changesDelta: ChangesDelta): Promise<TransactionCache | null>;
|
|
61
|
+
handleBusinessLogic(transaction: TransactionCache, changesDelta: ChangesDelta, pauseActionQueueTimeout: TimeoutPromiseHandler['pauseTimeout']): Promise<TransactionCache | null>;
|
|
61
62
|
private findBusinessLogicRuleInstance;
|
|
62
63
|
private applyRules;
|
|
63
64
|
private waitForRuleDependencies;
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
2
|
-
import { BLR_SKIP_RULE } from '../BusinessLogicRule';
|
|
3
|
-
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
4
|
-
import { ExtendedChangedResource, ExtendedChildResource, PlanningmateriaalCombinationChildrenBusinessLogicRuleBase } from './PlanningmateriaalCombinationChildrenBusinessLogicRuleBase';
|
|
5
1
|
import { ItemId } from '@rentman/backend-types';
|
|
6
|
-
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
5
|
+
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
6
|
+
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
7
|
+
type ConditionResult = ItemId[];
|
|
8
|
+
declare const childPlanningmateriaalColumns: readonly ["id", "optie", "parent"];
|
|
9
|
+
declare const changedPlanningMateriaalColumns: readonly ["id", "optie", "categorie", "parent", {
|
|
10
|
+
readonly materiaal: readonly ["is_combination", "is_physical"];
|
|
11
|
+
}];
|
|
12
|
+
type Dependency = {
|
|
13
|
+
childPlanningmateriaalResourcesInCategories: ItemResource<'Planningmateriaal', typeof childPlanningmateriaalColumns>[];
|
|
14
|
+
changedPlanningmateriaalResources: ItemResource<'Planningmateriaal', typeof changedPlanningMateriaalColumns>[];
|
|
15
|
+
};
|
|
7
16
|
/**
|
|
8
17
|
* @description
|
|
9
18
|
* If the kit's 'optie' is changed then the children should follow
|
|
10
19
|
*/
|
|
11
|
-
export declare class PlanningmateriaalOptieBusinessLogicRule extends
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
export declare class PlanningmateriaalOptieBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
21
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
22
|
+
dependency(transaction: TransactionCache, changedPlanningmateriaalIds: ConditionResult): Promise<Dependency>;
|
|
23
|
+
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency): void;
|
|
24
|
+
private updatePlanningmateriaalByParent;
|
|
16
25
|
}
|
|
17
26
|
export {};
|
|
@@ -68,6 +68,4 @@ import { TaakDeadlineTypeBusinessLogicRule } from './Taak/TaakDeadlineTypeBusine
|
|
|
68
68
|
import { TaakDeadlineOffsetBusinessLogicRule } from './Taak/TaakDeadlineOffsetBusinessLogicRule';
|
|
69
69
|
import { TijdPropagateNameToFunctiegroepBusinessLogicRule } from './Tijd/TijdPropagateNameToFunctiegroepBusinessLogicRule';
|
|
70
70
|
import { TijdSubprojectChangedBusinessLogicRule } from './Tijd/TijdSubprojectChangedBusinessLogicRule';
|
|
71
|
-
|
|
72
|
-
import { PlanningmateriaalEditTijdSchemaBusinessLogicRule } from './Planningmateriaal/PlanningmateriaalEditTijdSchemaBusinessLogicRule';
|
|
73
|
-
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 PlanningmateriaalCreatePeriodBusinessLogicRule, typeof PlanningmateriaalEditTijdSchemaBusinessLogicRule, 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];
|
|
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];
|
|
@@ -20,12 +20,20 @@ type ResolvedPromiseObject<ObjectType extends Record<string, any>> = {
|
|
|
20
20
|
[K in keyof ObjectType]: ObjectType[K] extends Promise<infer PromiseType> ? PromiseType : ObjectType[K];
|
|
21
21
|
};
|
|
22
22
|
export declare function promiseAllObject<ObjectType extends Record<string, any>>(promiseObject: ObjectType): Promise<ResolvedPromiseObject<ObjectType>>;
|
|
23
|
+
export interface TimeoutPromiseHandler {
|
|
24
|
+
/**
|
|
25
|
+
* The promise always resolves with `timeoutPromiseSymbol` after `timeMilliseconds` has expired.
|
|
26
|
+
*/
|
|
27
|
+
promise: Promise<typeof timeoutPromiseSymbol>;
|
|
28
|
+
pauseTimeout: <PromiseType>(promise: Promise<PromiseType>) => Promise<PromiseType>;
|
|
29
|
+
}
|
|
30
|
+
export declare const timeoutPromiseSymbol: unique symbol;
|
|
31
|
+
export declare function promiseCreateTimeout(timeMilliseconds: number): TimeoutPromiseHandler;
|
|
23
32
|
export interface Deferred<T> {
|
|
24
33
|
promise: Promise<T>;
|
|
25
34
|
resolve(value?: T | PromiseLike<T>): void;
|
|
26
35
|
reject(reason?: any): void;
|
|
27
36
|
}
|
|
28
|
-
export declare function promiseWrapTimeout<T>(promise: Promise<T>, createError: () => Error, timeMilliseconds: number): Promise<T>;
|
|
29
37
|
export declare function promiseCreateDeferred<T>(): Deferred<T>;
|
|
30
38
|
export declare function isRegExp(value: any): boolean;
|
|
31
39
|
export declare function isBoolean(value: any): value is boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WritableSignal } from '@angular/core';
|
|
2
2
|
import { ApiItemType, ItemId } from '@rentman/backend-types';
|
|
3
|
-
import { AbstractCache, AbstractCacheDependencyInterface, ApiQuery, ApiRequestColumnArray, ApiRequestColumns, CachedQueryItem, ChangesDelta, ChangesDeltaResult, ChildChangesDelta, ChildCollectionResources, CollectionQuery, CollectionResource, ConversionMap, CreateRequestParameterMap, DeregFunction, FieldMap, ItemAggregatedChangesListener, ItemChangesListener, ItemEntry, ItemIdConversionMap, ItemOptions, ItemResource, ItemResourcesItemTypeMap, ItemsByQueryOptions, ItemTypeMap, LimitedCollectionResource, ModuleChangesCompilationResult, NewItemOptions, OnAfterCreateCallback, ParentChangesDelta, ParentIdMap, RmCore, RootCollectionOptions, ServerCache, TransactionCacheCallbackCondition, TransactionCacheCallbackType, TransactionCachedQueryHandler, TransactionEventHandler, TransactionItemHandler, TransactionOptions, TransactionValidator, TransactionValidatorFactory } from '../../../internal';
|
|
3
|
+
import { AbstractCache, AbstractCacheDependencyInterface, ApiQuery, ApiRequestColumnArray, ApiRequestColumns, CachedQueryItem, ChangesDelta, ChangesDeltaResult, ChildChangesDelta, ChildCollectionResources, CollectionQuery, CollectionResource, ConversionMap, CreateRequestParameterMap, DeregFunction, FieldMap, ItemAggregatedChangesListener, ItemChangesListener, ItemEntry, ItemIdConversionMap, ItemOptions, ItemResource, ItemResourcesItemTypeMap, ItemsByQueryOptions, ItemTypeMap, LimitedCollectionResource, ModuleChangesCompilationResult, NewItemOptions, OnAfterCreateCallback, ParentChangesDelta, ParentIdMap, RmCore, RootCollectionOptions, ServerCache, TimeoutPromiseHandler, TransactionCacheCallbackCondition, TransactionCacheCallbackType, TransactionCachedQueryHandler, TransactionEventHandler, TransactionItemHandler, TransactionOptions, TransactionValidator, TransactionValidatorFactory } from '../../../internal';
|
|
4
4
|
import { TransactionValidatorWithDependencies } from './TransactionValidatorWithDependencies';
|
|
5
5
|
type ItemResourceLinks<ItemTypeType extends ApiItemType, ColumnIds extends ApiRequestColumnArray<ItemTypeType>, Children extends ChildCollectionResources | undefined> = {
|
|
6
6
|
main: ItemResource<ItemTypeType, ColumnIds, Children>;
|
|
@@ -10,6 +10,7 @@ export declare enum TransactionErrorLevel {
|
|
|
10
10
|
warning = "warning",
|
|
11
11
|
error = "error"
|
|
12
12
|
}
|
|
13
|
+
type TransactionState = 'Ready' | 'Saving' | 'Pending';
|
|
13
14
|
export type TransactionError = {
|
|
14
15
|
fieldString: string;
|
|
15
16
|
string: string;
|
|
@@ -124,7 +125,7 @@ export declare class TransactionCache extends AbstractCache {
|
|
|
124
125
|
* @param state When set, immediately set the transaction state property, overwriting any previous state. The state
|
|
125
126
|
* reverts to `Ready` when all pending actions have been completed.
|
|
126
127
|
*/
|
|
127
|
-
|
|
128
|
+
enqueueAction<Result>(label: string, promiseFunction: (pauseActionQueueTimeout: TimeoutPromiseHandler['pauseTimeout']) => Promise<Result>, state?: Exclude<TransactionState, 'ready'>): Promise<Result>;
|
|
128
129
|
/**
|
|
129
130
|
* @deprecated use rootItemSignal instead
|
|
130
131
|
*
|
|
@@ -118,5 +118,6 @@ export declare class TransactionItemHandler extends ItemHandlerBase {
|
|
|
118
118
|
* it may also include changes applied on ancestor transactions. Is `null` when no changes have been made.
|
|
119
119
|
*/
|
|
120
120
|
protected processItemEntryChanges<ItemTypeType extends ApiItemType>(itemEntryChangesTuple: ChangesDeltaBaseItemUpdateDelta<ItemTypeType>, createItemChangesIfNoneExist: boolean): Readonly<Partial<FieldMap<ItemTypeType>>> | null;
|
|
121
|
+
private logEquipmentGroupNullError;
|
|
121
122
|
private fetchLocalItemEntryData;
|
|
122
123
|
}
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { ApiRequestColumnArray, ItemTypeColumnIds } from '../../../types/ItemTypesCollection';
|
|
4
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
5
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
-
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
-
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
8
|
-
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
9
|
-
export declare const baseChildColumns: readonly ["id", "parent", "naam"];
|
|
10
|
-
export declare const baseChangedColumns: readonly ["id", "categorie", "parent", "naam", {
|
|
11
|
-
readonly materiaal: readonly ["is_combination", "is_physical"];
|
|
12
|
-
}];
|
|
13
|
-
export type ExtendedChildResource<T extends ItemTypeColumnIds<'Planningmateriaal'>> = ItemResource<'Planningmateriaal', typeof baseChildColumns> & ItemResource<'Planningmateriaal', T>;
|
|
14
|
-
export type ExtendedChangedResource<T extends ItemTypeColumnIds<'Planningmateriaal'>> = ItemResource<'Planningmateriaal', typeof baseChangedColumns> & ItemResource<'Planningmateriaal', T>;
|
|
15
|
-
type CombinationChildrenDependency<T extends ItemTypeColumnIds<'Planningmateriaal'>> = {
|
|
16
|
-
childResources: ExtendedChildResource<T>[];
|
|
17
|
-
changedResources: ExtendedChangedResource<T>[];
|
|
18
|
-
};
|
|
19
|
-
export declare abstract class PlanningmateriaalCombinationChildrenBusinessLogicRuleBase<T extends ItemTypeColumnIds<'Planningmateriaal'>> extends BusinessLogicRule<ItemId<'Planningmateriaal'>[], CombinationChildrenDependency<T>> {
|
|
20
|
-
protected childColumns: ApiRequestColumnArray<'Planningmateriaal'>;
|
|
21
|
-
protected changedColumns: ApiRequestColumnArray<'Planningmateriaal'>;
|
|
22
|
-
protected abstract columnExtensions: T;
|
|
23
|
-
protected abstract getConditionResult(context: BusinessLogicRuleConditionContext): ItemId<'Planningmateriaal'>[] | typeof BLR_SKIP_RULE;
|
|
24
|
-
protected abstract applyChangesToChild(parentResource: ExtendedChangedResource<T>, childResource: ExtendedChildResource<T>, destinationChangesDelta: ChangesDelta): void;
|
|
25
|
-
protected shouldSkipChangedResource(changedResource: ExtendedChangedResource<T>): boolean;
|
|
26
|
-
condition(context: BusinessLogicRuleConditionContext): ItemId<'Planningmateriaal'>[] | typeof BLR_SKIP_RULE;
|
|
27
|
-
dependency(transaction: TransactionCache, changedPlanningmateriaalIds: ItemId<'Planningmateriaal'>[]): Promise<CombinationChildrenDependency<T>>;
|
|
28
|
-
apply(context: BusinessLogicRuleApplyContext, dependency: CombinationChildrenDependency<T>): void;
|
|
29
|
-
private updateChildrenRecursively;
|
|
30
|
-
}
|
|
31
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
2
|
-
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
3
|
-
import { ItemId } from '@rentman/backend-types';
|
|
4
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
5
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
6
|
-
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
7
|
-
declare const planningmateriaalColumns: readonly [{
|
|
8
|
-
readonly categorie: readonly [{
|
|
9
|
-
readonly project: readonly ["gebruiksperiode", "planperiode"];
|
|
10
|
-
}, {
|
|
11
|
-
readonly subproject: readonly ["gebruiksperiode", "planperiode"];
|
|
12
|
-
}];
|
|
13
|
-
}];
|
|
14
|
-
type ConditionResult = Set<ItemId> | typeof BLR_SKIP_RULE;
|
|
15
|
-
type Dependency = ItemResource<'Planningmateriaal', typeof planningmateriaalColumns>[];
|
|
16
|
-
/**
|
|
17
|
-
* @description
|
|
18
|
-
* If the planningmateriaal is created, set the schema fields to the project's planperiode and gebruiksperiode.'
|
|
19
|
-
*/
|
|
20
|
-
export declare class PlanningmateriaalCreatePeriodBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
21
|
-
condition(context: BusinessLogicRuleConditionContext): ConditionResult;
|
|
22
|
-
dependency(transaction: TransactionCache, createdItems: Set<ItemId<'MateriaalCat'>>): Promise<Dependency>;
|
|
23
|
-
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency): void;
|
|
24
|
-
private getRelevantPeriod;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
2
|
-
import { BLR_SKIP_RULE } from '../BusinessLogicRule';
|
|
3
|
-
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
4
|
-
import { ExtendedChangedResource, ExtendedChildResource, PlanningmateriaalCombinationChildrenBusinessLogicRuleBase } from './PlanningmateriaalCombinationChildrenBusinessLogicRuleBase';
|
|
5
|
-
import { ItemId } from '@rentman/backend-types';
|
|
6
|
-
declare const columnExtensions: readonly ["schema_pv", "schema_pv_begin", "schema_pt", "schema_pt_begin", "schema_gv", "schema_gv_begin", "schema_gt", "schema_gt_begin"];
|
|
7
|
-
/**
|
|
8
|
-
* @description
|
|
9
|
-
* If planningmateriaal schema fields are edited, the same edits should be applied to the children of Planningmateriaal combinations.
|
|
10
|
-
*/
|
|
11
|
-
export declare class PlanningmateriaalEditTijdSchemaBusinessLogicRule extends PlanningmateriaalCombinationChildrenBusinessLogicRuleBase<typeof columnExtensions> {
|
|
12
|
-
protected readonly columnExtensions: typeof columnExtensions;
|
|
13
|
-
protected getConditionResult(context: BusinessLogicRuleConditionContext): ItemId<'Planningmateriaal'>[] | typeof BLR_SKIP_RULE;
|
|
14
|
-
protected applyChangesToChild(parentResource: ExtendedChangedResource<typeof columnExtensions>, childResource: ExtendedChildResource<typeof columnExtensions>, destinationChangesDelta: ChangesDelta): void;
|
|
15
|
-
}
|
|
16
|
-
export {};
|