@rentman/rm-core 0.0.0-RM4-44763
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 +2 -0
- package/dist/rm-core.js.map +1 -0
- package/dist/types/src/classes/ApiFormatter.d.ts +66 -0
- package/dist/types/src/classes/ApiRequestService.d.ts +18 -0
- package/dist/types/src/classes/ApiResponseProcessor.d.ts +31 -0
- package/dist/types/src/classes/BusinessLogicManager/AantalBusinessLogicRuleBase.d.ts +36 -0
- package/dist/types/src/classes/BusinessLogicManager/AantaltotaalBusinessLogicRuleBase.d.ts +60 -0
- package/dist/types/src/classes/BusinessLogicManager/Afspraak/AfspraakRecureindBusinessLogicRule.d.ts +5 -0
- package/dist/types/src/classes/BusinessLogicManager/Beschikbaarheid/BeschikbaarheidRecureindBusinessLogicRule.d.ts +5 -0
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicManager.d.ts +66 -0
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRule.d.ts +81 -0
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRuleApplyContext.d.ts +32 -0
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRuleConditionContext.d.ts +41 -0
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRuleContextBase.d.ts +58 -0
- package/dist/types/src/classes/BusinessLogicManager/Contact/ContactAddressBusinessLogicRule.d.ts +22 -0
- package/dist/types/src/classes/BusinessLogicManager/Customfield/CustomFieldLinkedItemTypeBusinessLogicRule.d.ts +18 -0
- package/dist/types/src/classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule.d.ts +18 -0
- package/dist/types/src/classes/BusinessLogicManager/DefaultContactPersonUpdateBusinessLogicRule.d.ts +30 -0
- package/dist/types/src/classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule.d.ts +20 -0
- package/dist/types/src/classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule.d.ts +14 -0
- package/dist/types/src/classes/BusinessLogicManager/Exemplaar/ExemplaarBarcodeDeleteBusinessLogicRule.d.ts +14 -0
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule.d.ts +21 -0
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule.d.ts +23 -0
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule.d.ts +14 -0
- package/dist/types/src/classes/BusinessLogicManager/Files/FilesNameExtensionBusinessLogicRule.d.ts +20 -0
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule.d.ts +18 -0
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieRecureindBusinessLogicRule.d.ts +5 -0
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule.d.ts +14 -0
- package/dist/types/src/classes/BusinessLogicManager/Functiegroep/FunctiegroepSubprojectBusinessLogicRule.d.ts +17 -0
- package/dist/types/src/classes/BusinessLogicManager/Inhuurmateriaal/InhuurmateriaalAantalBusinessLogicRule.d.ts +4 -0
- package/dist/types/src/classes/BusinessLogicManager/Inhuurmateriaal/InhuurmateriaalAantaltotaalBusinessLogicRule.d.ts +9 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalBulkToSerialBusinessLogicRule.d.ts +17 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalIsCombinationBusinessLogicRule.d.ts +20 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalIsPhysicalCombinationBulkBusinessLogicRule.d.ts +19 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalSerialToBulkBusinessLogicRule.d.ts +16 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalToPhysicalBusinessLogicRule.d.ts +18 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalToVirtualBusinessLogicRule.d.ts +22 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalTypePropertiesBusinessLogicRule.d.ts +19 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule.d.ts +19 -0
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule.d.ts +23 -0
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemBusinessLogicRuleBase.d.ts +46 -0
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemDurationBusinessLogicRule.d.ts +17 -0
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemMateriaalCatBusinessLogicRule.d.ts +25 -0
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemSubprojectBusinessLogicRule.d.ts +48 -0
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemTimeSchemeBusinessLogicRule.d.ts +27 -0
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemTimeSchemeStartBusinessLogicRule.d.ts +18 -0
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/LinkedTimeItemTimeValueStartBusinessLogicRule.d.ts +20 -0
- package/dist/types/src/classes/BusinessLogicManager/MateriaalCatFunctieFunctiegroep/TimeColumnUtil.d.ts +132 -0
- package/dist/types/src/classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule.d.ts +21 -0
- package/dist/types/src/classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule.d.ts +24 -0
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalAantalBusinessLogicRule.d.ts +4 -0
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalAantaltotaalBusinessLogicRule.d.ts +9 -0
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalOptieBusinessLogicRule.d.ts +26 -0
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalParentBusinessLogicRule.d.ts +17 -0
- package/dist/types/src/classes/BusinessLogicManager/Planningmateriaal/PlanningmateriaalStaysAtLocationBusinessLogicRule.d.ts +32 -0
- package/dist/types/src/classes/BusinessLogicManager/Project/ProjectClientChangedBusinessLogicRule.d.ts +31 -0
- package/dist/types/src/classes/BusinessLogicManager/Project/ProjectContactProjectNoteBusinessLogicRule.d.ts +25 -0
- package/dist/types/src/classes/BusinessLogicManager/Project/ProjectOneSubLocationAlignBusinessRule.d.ts +26 -0
- package/dist/types/src/classes/BusinessLogicManager/ProjectSubproject/ProjectSubprojectDefaultTimeBusinessLogicRule.d.ts +26 -0
- package/dist/types/src/classes/BusinessLogicManager/PurchaseOrder/PurchaseOrderApprovalStatusBusinessLogicRule.d.ts +19 -0
- package/dist/types/src/classes/BusinessLogicManager/PurchaseOrder/PurchaseOrderOwnerBusinessLogicRule.d.ts +16 -0
- package/dist/types/src/classes/BusinessLogicManager/Rate/RateUpdatedBusinessLogicRule.d.ts +14 -0
- package/dist/types/src/classes/BusinessLogicManager/RecurrentItem/RecurrentItemRecureindBusinessLogicRule.d.ts +28 -0
- package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarAantalBusinessLogicRule.d.ts +14 -0
- package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieLostItemExemplaarLocationBusinessLogicRule.d.ts +21 -0
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts +20 -0
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolFileAccessBusinessLogicRule.d.ts +19 -0
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule.d.ts +20 -0
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts +20 -0
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts +21 -0
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolPurchaseOrderAttachPlanningBusinessLogicRule.d.ts +19 -0
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolVisibilityFinancialsBusinessLogicRule.d.ts +35 -0
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolWarehosueTrackingLogAccessBusinessLogicRule.d.ts +20 -0
- package/dist/types/src/classes/BusinessLogicManager/Setinhoud/SetinhoudCreateFixedBusinessLogicRule.d.ts +21 -0
- package/dist/types/src/classes/BusinessLogicManager/Setinhoud/SetinhoudUpdateFixedBusinessLogicRule.d.ts +26 -0
- package/dist/types/src/classes/BusinessLogicManager/Subproject/SubprojectInPlanningBusinessLogicRule.d.ts +14 -0
- package/dist/types/src/classes/BusinessLogicManager/Subproject/SubprojectOneSubLocationAlignBusinessRule.d.ts +27 -0
- package/dist/types/src/classes/BusinessLogicManager/Subproject/SubprojectOneSubNameAlignBusinessRule.d.ts +22 -0
- package/dist/types/src/classes/BusinessLogicManager/Tijd/TijdNameChangedBusinessLogicRule.d.ts +21 -0
- package/dist/types/src/classes/BusinessLogicManager/Tijd/TijdSubprojectChangedBusinessLogicRule.d.ts +17 -0
- package/dist/types/src/classes/BusinessLogicManager/Uren/HoursTypeBusinessLogicRuleBase.d.ts +10 -0
- package/dist/types/src/classes/BusinessLogicManager/Uren/UrenCalculatedDurationBusinessLogicRule.d.ts +13 -0
- package/dist/types/src/classes/BusinessLogicManager/Uren/UrenCanHaveActivitiesBusinessLogicRule.d.ts +13 -0
- package/dist/types/src/classes/BusinessLogicManager/businessLogicRule.decorator.d.ts +13 -0
- package/dist/types/src/classes/BusinessLogicManager/registeredBusinessLogicRules.d.ts +66 -0
- package/dist/types/src/classes/ChangesCompilation.d.ts +26 -0
- package/dist/types/src/classes/ChangesDelta.d.ts +81 -0
- package/dist/types/src/classes/ChangesDeltaBase.d.ts +85 -0
- package/dist/types/src/classes/ChangesProcessor.d.ts +35 -0
- package/dist/types/src/classes/ChildChangesDelta.d.ts +38 -0
- package/dist/types/src/classes/ColumnCache.d.ts +22 -0
- package/dist/types/src/classes/ColumnExpansion.d.ts +18 -0
- package/dist/types/src/classes/ColumnHandler.d.ts +16 -0
- package/dist/types/src/classes/ColumnInfo.d.ts +16 -0
- package/dist/types/src/classes/ColumnSet.d.ts +79 -0
- package/dist/types/src/classes/ColumnUtil.d.ts +97 -0
- package/dist/types/src/classes/ConversionMapService.d.ts +23 -0
- package/dist/types/src/classes/CreateRequest.d.ts +16 -0
- package/dist/types/src/classes/CreatedChangesDelta.d.ts +22 -0
- package/dist/types/src/classes/ItemCache.d.ts +26 -0
- package/dist/types/src/classes/ItemCreateService.d.ts +14 -0
- package/dist/types/src/classes/ItemEntryService.d.ts +29 -0
- package/dist/types/src/classes/KeyService.d.ts +10 -0
- package/dist/types/src/classes/LockService.d.ts +28 -0
- package/dist/types/src/classes/ModuleChangesCompilation.d.ts +20 -0
- package/dist/types/src/classes/ParentChangesDelta.d.ts +42 -0
- package/dist/types/src/classes/QueryColumnExtractor.d.ts +16 -0
- package/dist/types/src/classes/QueryContainsLocalIdParser.d.ts +14 -0
- package/dist/types/src/classes/QueryParser.d.ts +18 -0
- package/dist/types/src/classes/QueryParserBase.d.ts +32 -0
- package/dist/types/src/classes/QueryParserIdUpdater.d.ts +16 -0
- package/dist/types/src/classes/QueryService.d.ts +10 -0
- package/dist/types/src/classes/RequestBuffer/RequestBuffer.d.ts +13 -0
- package/dist/types/src/classes/RequestBuffer/RequestBufferBase.d.ts +37 -0
- package/dist/types/src/classes/RequestBuffer/RequestBufferManager.d.ts +24 -0
- package/dist/types/src/classes/RequestBuffer/SingleQueryRequestBuffer.d.ts +18 -0
- package/dist/types/src/classes/RequestColumnExpansion.d.ts +11 -0
- package/dist/types/src/classes/RequestColumnsOperationsCache.d.ts +45 -0
- package/dist/types/src/classes/SocketMessageHandler.d.ts +28 -0
- package/dist/types/src/classes/TemplateCache.d.ts +61 -0
- package/dist/types/src/classes/Util.d.ts +36 -0
- package/dist/types/src/classes/cache/AbstractCache.d.ts +86 -0
- package/dist/types/src/classes/cache/CachedQueryHandlerBase.d.ts +145 -0
- package/dist/types/src/classes/cache/ItemHandlerBase.d.ts +97 -0
- package/dist/types/src/classes/cache/ItemMatcherBase.d.ts +90 -0
- package/dist/types/src/classes/cache/server/ServerCache.d.ts +83 -0
- package/dist/types/src/classes/cache/server/ServerCachedQueryHandler.d.ts +29 -0
- package/dist/types/src/classes/cache/server/ServerItemHandler.d.ts +35 -0
- package/dist/types/src/classes/cache/transaction/TransactionCache.d.ts +342 -0
- package/dist/types/src/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +111 -0
- package/dist/types/src/classes/cache/transaction/TransactionEventHandler.d.ts +17 -0
- package/dist/types/src/classes/cache/transaction/TransactionItemHandler.d.ts +121 -0
- package/dist/types/src/classes/cache/transaction/TransactionValidator.d.ts +25 -0
- package/dist/types/src/classes/cache/transaction/TransactionValidatorBase.d.ts +19 -0
- package/dist/types/src/classes/cache/transaction/TransactionValidatorWithDependencies.d.ts +15 -0
- package/dist/types/src/classes/changes/CollectionItemChangesListenerContext.d.ts +22 -0
- package/dist/types/src/classes/changes/ItemChangesListenerContext.d.ts +7 -0
- package/dist/types/src/classes/changes/ItemChangesListenerContextBase.d.ts +44 -0
- package/dist/types/src/classes/matcher/CompatorQueryNode.d.ts +24 -0
- package/dist/types/src/classes/matcher/CustomQueryNode.d.ts +8 -0
- package/dist/types/src/classes/matcher/GraphQueryParser.d.ts +34 -0
- package/dist/types/src/classes/matcher/IsComparatorQueryNode.d.ts +13 -0
- package/dist/types/src/classes/matcher/LinkedToQueryNode.d.ts +9 -0
- package/dist/types/src/classes/matcher/NonMatchableQueryNode.d.ts +9 -0
- package/dist/types/src/classes/matcher/NotIsComparatorQueryNode.d.ts +14 -0
- package/dist/types/src/classes/matcher/QueryNode.d.ts +49 -0
- package/dist/types/src/classes/matcher/RootQueryNode.d.ts +14 -0
- package/dist/types/src/classes/matcher/SearchQueryNode.d.ts +8 -0
- package/dist/types/src/classes/matcher/SubQueryNode.d.ts +8 -0
- package/dist/types/src/classes/matcher/ValueTransformers.d.ts +41 -0
- package/dist/types/src/classes/matcher/ValuelessEdgeQueryNode.d.ts +11 -0
- package/dist/types/src/classes/matcher/greater-smaller-than-comparator-query.node.d.ts +25 -0
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/core.d.ts +63 -0
- package/dist/types/src/exceptions/CriticalBusinessLogicRuleException.d.ts +4 -0
- package/dist/types/src/exceptions/ItemAlreadyExistsException.d.ts +4 -0
- package/dist/types/src/exceptions/ItemLockedException.d.ts +2 -0
- package/dist/types/src/exceptions/ItemNotFoundException.d.ts +5 -0
- package/dist/types/src/exceptions/MissingColumnException.d.ts +6 -0
- package/dist/types/src/exceptions/SavingInProgressException.d.ts +2 -0
- package/dist/types/src/exceptions/TransactionPendingException.d.ts +2 -0
- package/dist/types/src/factories/ApiResponseProcessorFactory.d.ts +5 -0
- package/dist/types/src/factories/ChangesCompilationFactory.d.ts +5 -0
- package/dist/types/src/factories/ChangesDeltaFactory.d.ts +13 -0
- package/dist/types/src/factories/CollectionResourceFactory.d.ts +20 -0
- package/dist/types/src/factories/ColumnExpansionFactory.d.ts +7 -0
- package/dist/types/src/factories/ColumnInfoFactory.d.ts +7 -0
- package/dist/types/src/factories/ColumnSetFactory.d.ts +15 -0
- package/dist/types/src/factories/GraphQueryParserFactory.d.ts +10 -0
- package/dist/types/src/factories/ItemCacheFactory.d.ts +7 -0
- package/dist/types/src/factories/ItemResourceFactory.d.ts +7 -0
- package/dist/types/src/factories/ModuleChangesCompilationFactory.d.ts +6 -0
- package/dist/types/src/factories/RequestColumnExpansionFactory.d.ts +4 -0
- package/dist/types/src/factories/RequestColumnsOperationsCacheFactory.d.ts +7 -0
- package/dist/types/src/factories/TransactionCacheFactory.d.ts +12 -0
- package/dist/types/src/index.d.ts +11 -0
- package/dist/types/src/interfaces/AbstractCacheDependencyInterface.d.ts +46 -0
- package/dist/types/src/interfaces/ApiRequestServiceInterface.d.ts +14 -0
- package/dist/types/src/interfaces/ErrorHandlerInterface.d.ts +6 -0
- package/dist/types/src/interfaces/LinkTreeServiceInterface.d.ts +6 -0
- package/dist/types/src/interfaces/ServerCacheDependencyInterface.d.ts +6 -0
- package/dist/types/src/interfaces/SocketMessageInterface.d.ts +3 -0
- package/dist/types/src/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +15 -0
- package/dist/types/src/interfaces/TransactionItemHandlerDependencyInterface.d.ts +16 -0
- package/dist/types/src/internal.d.ts +110 -0
- package/dist/types/src/models/CachedQueryItem.d.ts +33 -0
- package/dist/types/src/models/CollectionEntry.d.ts +16 -0
- package/dist/types/src/models/CollectionOptions.d.ts +111 -0
- package/dist/types/src/models/CollectionResource.d.ts +175 -0
- package/dist/types/src/models/ItemEntry.d.ts +23 -0
- package/dist/types/src/models/ItemOptions.d.ts +25 -0
- package/dist/types/src/models/ItemResource.d.ts +135 -0
- package/dist/types/src/models/LimitedCollectionResource.d.ts +26 -0
- package/dist/types/src/models/OrderedCollectionResource.d.ts +19 -0
- package/dist/types/src/models/Template.d.ts +17 -0
- package/dist/types/src/services/rm-holidays.service.d.ts +31 -0
- package/dist/types/src/types/AggregatedChangesListener.d.ts +99 -0
- package/dist/types/src/types/ApiQuery.d.ts +95 -0
- package/dist/types/src/types/ItemTypesCollection.d.ts +416 -0
- package/package.json +56 -0
- package/readme.md +42 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
2
|
+
import { BLR_SKIP_RULE } from '../BusinessLogicRule';
|
|
3
|
+
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
4
|
+
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
5
|
+
import { LinkedTimeItemBusinessLogicRuleBase, LinkedTimeItemBusinessLogicRuleBaseUpdatedTuples, LinkedTimeItemResourceMap } from './LinkedTimeItemBusinessLogicRuleBase';
|
|
6
|
+
import { TimeColumnUtil } from './TimeColumnUtil';
|
|
7
|
+
declare const requestColumns: readonly ["gebruikvan", "planvan", "gebruiktot", "plantot", "schema_gt", "schema_pt"];
|
|
8
|
+
/**
|
|
9
|
+
* - When 'gebruikvan' changes, and 'gebruiktot' is invalid or equal to the previous value of 'gebruikvan',
|
|
10
|
+
* and 'schema_gt' is `null` (not referring to a time), set 'gebruiktot' to the new value of 'gebruikvan'.
|
|
11
|
+
* - When 'planvan' changes, and 'plantot' is invalid or equal to the previous value of 'planvan',
|
|
12
|
+
* and 'schema_pt' is `null` (not referring to a time), set 'plantot' to the new value of 'planvan'.
|
|
13
|
+
*/
|
|
14
|
+
export declare class LinkedTimeItemTimeValueStartBusinessLogicRule extends LinkedTimeItemBusinessLogicRuleBase<typeof TimeColumnUtil.valueStartColumnIds, LinkedTimeItemBusinessLogicRuleBaseUpdatedTuples<typeof TimeColumnUtil.valueStartColumnIds>, LinkedTimeItemResourceMap<typeof requestColumns>> {
|
|
15
|
+
protected conditionColumns: readonly ["gebruikvan", "planvan"];
|
|
16
|
+
condition(context: BusinessLogicRuleConditionContext): LinkedTimeItemBusinessLogicRuleBaseUpdatedTuples<typeof TimeColumnUtil.valueStartColumnIds> | typeof BLR_SKIP_RULE;
|
|
17
|
+
dependency(transaction: TransactionCache, conditionResult: LinkedTimeItemBusinessLogicRuleBaseUpdatedTuples<typeof TimeColumnUtil.valueStartColumnIds>): Promise<LinkedTimeItemResourceMap<typeof requestColumns>>;
|
|
18
|
+
apply(context: BusinessLogicRuleApplyContext, _dependencies: LinkedTimeItemResourceMap<typeof requestColumns>, conditionResult: LinkedTimeItemBusinessLogicRuleBaseUpdatedTuples<typeof TimeColumnUtil.valueStartColumnIds>): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { ApiEnumApiType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import moment from 'moment';
|
|
3
|
+
import { FieldMap } from '../../../types/ItemTypesCollection';
|
|
4
|
+
type TimeColumnDefinitions = typeof timeColumnDefinitions;
|
|
5
|
+
export type TimeColumnId = keyof TimeColumnDefinitions;
|
|
6
|
+
export type TimeColumnIdExcludingTimeFrame = Exclude<TimeColumnId, 'timeframe'>;
|
|
7
|
+
type TimeColumnDefinitionToInstance<TimeColumnDefinitionType extends TimeColumnDefinitions[TimeColumnId]> = {
|
|
8
|
+
[ColumnId in keyof TimeColumnDefinitionType]: ColumnId extends NonReferenceProperty ? TimeColumnDefinitionType[ColumnId] : TimeColumnDefinitionType[ColumnId] extends TimeColumnId ? TimeColumnInstance<TimeColumnDefinitionType[ColumnId]> : never;
|
|
9
|
+
};
|
|
10
|
+
export type TimeColumnInstance<ColumnId extends TimeColumnId> = {
|
|
11
|
+
id: ColumnId;
|
|
12
|
+
} & TimeColumnDefinitionToInstance<TimeColumnDefinitions[ColumnId]>;
|
|
13
|
+
type TimeItemFields = {
|
|
14
|
+
id: ItemId | null;
|
|
15
|
+
van: moment.Moment;
|
|
16
|
+
tot: moment.Moment;
|
|
17
|
+
};
|
|
18
|
+
export declare const LINKED_TIME_ITEM_TYPES: readonly ["MateriaalCat", "Functie", "Functiegroep"];
|
|
19
|
+
export type LinkedTimeItemType = (typeof LINKED_TIME_ITEM_TYPES)[number];
|
|
20
|
+
export type LinkedItemTypeFieldMap<ItemTypeType extends LinkedTimeItemType> = ItemTypeType extends 'Functie' ? FieldMap<'Functie', TimeColumnId[]> : FieldMap<ItemTypeType, TimeColumnIdExcludingTimeFrame[]>;
|
|
21
|
+
declare const nonReferenceProperties: readonly ["type", "isStart", "defaultValue"];
|
|
22
|
+
type NonReferenceProperty = (typeof nonReferenceProperties)[number];
|
|
23
|
+
declare const timeColumnDefinitions: {
|
|
24
|
+
readonly schema_gv: {
|
|
25
|
+
readonly type: ApiEnumApiType.TYPE_ITEM;
|
|
26
|
+
readonly start: "schema_gv_begin";
|
|
27
|
+
readonly value: "gebruikvan";
|
|
28
|
+
readonly opposite: "schema_gt";
|
|
29
|
+
readonly plan: "schema_pv";
|
|
30
|
+
readonly isStart: true;
|
|
31
|
+
};
|
|
32
|
+
readonly schema_gt: {
|
|
33
|
+
readonly type: ApiEnumApiType.TYPE_ITEM;
|
|
34
|
+
readonly start: "schema_gt_begin";
|
|
35
|
+
readonly value: "gebruiktot";
|
|
36
|
+
readonly opposite: "schema_gv";
|
|
37
|
+
readonly plan: "schema_pt";
|
|
38
|
+
readonly isStart: false;
|
|
39
|
+
};
|
|
40
|
+
readonly schema_pv: {
|
|
41
|
+
readonly type: ApiEnumApiType.TYPE_ITEM;
|
|
42
|
+
readonly start: "schema_pv_begin";
|
|
43
|
+
readonly value: "planvan";
|
|
44
|
+
readonly opposite: "schema_pt";
|
|
45
|
+
readonly usage: "schema_gv";
|
|
46
|
+
readonly isStart: true;
|
|
47
|
+
};
|
|
48
|
+
readonly schema_pt: {
|
|
49
|
+
readonly type: ApiEnumApiType.TYPE_ITEM;
|
|
50
|
+
readonly start: "schema_pt_begin";
|
|
51
|
+
readonly value: "plantot";
|
|
52
|
+
readonly opposite: "schema_pv";
|
|
53
|
+
readonly usage: "schema_gt";
|
|
54
|
+
readonly isStart: false;
|
|
55
|
+
};
|
|
56
|
+
readonly gebruikvan: {
|
|
57
|
+
readonly type: ApiEnumApiType.TYPE_DATETIME;
|
|
58
|
+
readonly scheme: "schema_gv";
|
|
59
|
+
readonly opposite: "gebruiktot";
|
|
60
|
+
readonly plan: "planvan";
|
|
61
|
+
readonly isStart: true;
|
|
62
|
+
};
|
|
63
|
+
readonly gebruiktot: {
|
|
64
|
+
readonly type: ApiEnumApiType.TYPE_DATETIME;
|
|
65
|
+
readonly scheme: "schema_gt";
|
|
66
|
+
readonly opposite: "gebruikvan";
|
|
67
|
+
readonly plan: "plantot";
|
|
68
|
+
readonly isStart: false;
|
|
69
|
+
};
|
|
70
|
+
readonly planvan: {
|
|
71
|
+
readonly type: ApiEnumApiType.TYPE_DATETIME;
|
|
72
|
+
readonly scheme: "schema_pv";
|
|
73
|
+
readonly opposite: "plantot";
|
|
74
|
+
readonly usage: "gebruikvan";
|
|
75
|
+
readonly isStart: true;
|
|
76
|
+
};
|
|
77
|
+
readonly plantot: {
|
|
78
|
+
readonly type: ApiEnumApiType.TYPE_DATETIME;
|
|
79
|
+
readonly scheme: "schema_pt";
|
|
80
|
+
readonly opposite: "planvan";
|
|
81
|
+
readonly usage: "gebruiktot";
|
|
82
|
+
readonly isStart: false;
|
|
83
|
+
};
|
|
84
|
+
readonly schema_pv_begin: {
|
|
85
|
+
readonly type: ApiEnumApiType.TYPE_BOOL;
|
|
86
|
+
readonly usage: "schema_gv_begin";
|
|
87
|
+
readonly defaultValue: true;
|
|
88
|
+
};
|
|
89
|
+
readonly schema_pt_begin: {
|
|
90
|
+
readonly type: ApiEnumApiType.TYPE_BOOL;
|
|
91
|
+
readonly usage: "schema_gt_begin";
|
|
92
|
+
readonly defaultValue: false;
|
|
93
|
+
};
|
|
94
|
+
readonly schema_gv_begin: {
|
|
95
|
+
readonly type: ApiEnumApiType.TYPE_BOOL;
|
|
96
|
+
readonly plan: "schema_pv_begin";
|
|
97
|
+
readonly defaultValue: true;
|
|
98
|
+
};
|
|
99
|
+
readonly schema_gt_begin: {
|
|
100
|
+
readonly type: ApiEnumApiType.TYPE_BOOL;
|
|
101
|
+
readonly plan: "schema_pt_begin";
|
|
102
|
+
readonly defaultValue: false;
|
|
103
|
+
};
|
|
104
|
+
readonly duur: {
|
|
105
|
+
readonly type: ApiEnumApiType.TYPE_DURATION;
|
|
106
|
+
};
|
|
107
|
+
readonly timeframe: {
|
|
108
|
+
readonly type: ApiEnumApiType.TYPE_ITEM;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export declare abstract class TimeColumnUtil {
|
|
112
|
+
private static columnInstances;
|
|
113
|
+
static schemeValueStartColumnIds: readonly ["schema_gv", "schema_pv"];
|
|
114
|
+
static schemeValueEndColumnIds: readonly ["schema_gt", "schema_pt"];
|
|
115
|
+
static schemeValueColumnIds: readonly ["schema_gv", "schema_pv", "schema_gt", "schema_pt"];
|
|
116
|
+
static schemeStartColumnIds: readonly ["schema_gv_begin", "schema_gt_begin", "schema_pv_begin", "schema_pt_begin"];
|
|
117
|
+
static valueStartColumnIds: readonly ["gebruikvan", "planvan"];
|
|
118
|
+
static valueEndColumnIds: readonly ["gebruiktot", "plantot"];
|
|
119
|
+
static valueColumnIds: readonly ["gebruikvan", "planvan", "gebruiktot", "plantot"];
|
|
120
|
+
static usageColumnIds: readonly ["gebruikvan", "gebruiktot", "schema_gv", "schema_gt", "schema_gv_begin", "schema_gt_begin"];
|
|
121
|
+
static planColumnIds: readonly ["planvan", "plantot", "schema_pv", "schema_pt", "schema_pv_begin", "schema_pt_begin"];
|
|
122
|
+
static isTimeColumn(columnId: string): columnId is TimeColumnId;
|
|
123
|
+
static getColumnInstance<ColumnId extends TimeColumnId>(columnId: ColumnId): TimeColumnInstance<ColumnId>;
|
|
124
|
+
static getColumnIdIterator(itemType: 'Functie'): Generator<TimeColumnId>;
|
|
125
|
+
static getColumnIdIterator(itemType: any): Generator<TimeColumnIdExcludingTimeFrame>;
|
|
126
|
+
static getColumnIds(itemType: 'Functie'): TimeColumnId[];
|
|
127
|
+
static getColumnIds(itemType: any): TimeColumnIdExcludingTimeFrame[];
|
|
128
|
+
static getDefaultValues<ItemTypeType extends LinkedTimeItemType>(itemType: ItemTypeType, usageFields?: TimeItemFields, planFields?: TimeItemFields): LinkedItemTypeFieldMap<ItemTypeType>;
|
|
129
|
+
static cloneValues<SourceItemType extends LinkedTimeItemType, DestinationItemType extends LinkedTimeItemType>(itemType: SourceItemType, fields: LinkedItemTypeFieldMap<SourceItemType>, destination?: Partial<LinkedItemTypeFieldMap<DestinationItemType>>): LinkedItemTypeFieldMap<DestinationItemType>;
|
|
130
|
+
static compareValues<ItemTypeType extends LinkedTimeItemType>(itemType: ItemTypeType, fieldsA: LinkedItemTypeFieldMap<ItemTypeType>, fieldsB: LinkedItemTypeFieldMap<ItemTypeType>): boolean;
|
|
131
|
+
}
|
|
132
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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 = {
|
|
8
|
+
Offerte: ItemId[];
|
|
9
|
+
Contract: ItemId[];
|
|
10
|
+
};
|
|
11
|
+
type Dependency = {
|
|
12
|
+
Offerte: ItemResource<'Offerte', ['vervaldatum']>[];
|
|
13
|
+
Contract: ItemResource<'Contract', ['vervaldatum']>[];
|
|
14
|
+
State: ItemResource<'State', ['geldigheidofferte']>;
|
|
15
|
+
};
|
|
16
|
+
export declare class OfferteContractDatumBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
17
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
18
|
+
dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
|
|
19
|
+
apply(context: BusinessLogicRuleApplyContext, items: Dependency): void;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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 = {
|
|
8
|
+
Planningpersoneel: ItemId[];
|
|
9
|
+
Planningtransport: ItemId[];
|
|
10
|
+
};
|
|
11
|
+
type Dependency = {
|
|
12
|
+
Planningpersoneel: ItemResource<'Planningpersoneel', ['vervoer', 'functie', 'planvan', 'plantot']>[];
|
|
13
|
+
Planningtransport: ItemResource<'Planningtransport', ['vervoer', 'functie', 'planvan', 'plantot']>[];
|
|
14
|
+
Functie: {
|
|
15
|
+
[functieId: string]: ItemResource<'Functie', ['reistijd_vooraf', 'reistijd_achteraf']>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare class PlanningPersoneelTransportBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
19
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
20
|
+
dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
|
|
21
|
+
apply({ transaction, mergedChangesDelta, destinationChangesDelta, }: BusinessLogicRuleApplyContext, items: Dependency): void;
|
|
22
|
+
private updatePlanningColumns;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AantaltotaalBusinessLogicRuleBase } from '../AantaltotaalBusinessLogicRuleBase';
|
|
2
|
+
export declare class PlanningmateriaalAantaltotaalBusinessLogicRule extends AantaltotaalBusinessLogicRuleBase<'Planningmateriaal'> {
|
|
3
|
+
protected readonly itemType = "Planningmateriaal";
|
|
4
|
+
protected readonly groupingProperties: {
|
|
5
|
+
readonly itemType: "MateriaalCat";
|
|
6
|
+
readonly columnId: "categorie";
|
|
7
|
+
};
|
|
8
|
+
protected readonly requestColumns: readonly ["id", "aantal", "aantaltotaal", "parent", "materiaal", "categorie"];
|
|
9
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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 ["type"];
|
|
11
|
+
}];
|
|
12
|
+
type Dependency = {
|
|
13
|
+
childPlanningmateriaalResourcesInCategories: ItemResource<'Planningmateriaal', typeof childPlanningmateriaalColumns>[];
|
|
14
|
+
changedPlanningmateriaalResources: ItemResource<'Planningmateriaal', typeof changedPlanningMateriaalColumns>[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @description
|
|
18
|
+
* If the kit's 'optie' is changed then the children should follow
|
|
19
|
+
*/
|
|
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;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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
|
+
declare const planningmateriaalColumns: readonly ["parent", {
|
|
8
|
+
readonly setcontent: readonly ["is_fixed"];
|
|
9
|
+
}];
|
|
10
|
+
type ConditionResult = ItemId<'Planningmateriaal'>[];
|
|
11
|
+
type Dependency = ItemResource<'Planningmateriaal', typeof planningmateriaalColumns>[];
|
|
12
|
+
export declare class PlanningmateriaalParentBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
13
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
14
|
+
dependency(transaction: TransactionCache, planningmateriaalIds: ConditionResult): Promise<Dependency>;
|
|
15
|
+
apply(context: BusinessLogicRuleApplyContext, planningmateriaalResources: Dependency): void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { ChangesDeltaItemCreateDelta } from '../../CreatedChangesDelta';
|
|
5
|
+
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
6
|
+
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
7
|
+
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
8
|
+
type ConditionResult = {
|
|
9
|
+
changedItems: ItemId[];
|
|
10
|
+
createdItems: ChangesDeltaItemCreateDelta[];
|
|
11
|
+
};
|
|
12
|
+
declare const planningMateriaalColumns: readonly ["aantaltotaal", "stays_at_location", {
|
|
13
|
+
readonly categorie: readonly [{
|
|
14
|
+
readonly project: readonly [{
|
|
15
|
+
readonly projecttype: readonly ["type"];
|
|
16
|
+
}];
|
|
17
|
+
}];
|
|
18
|
+
}];
|
|
19
|
+
type Dependency = {
|
|
20
|
+
changedPlanningMateriaalResources: ItemResource<'Planningmateriaal', typeof planningMateriaalColumns>[];
|
|
21
|
+
createdItems: ChangesDeltaItemCreateDelta<'Planningmateriaal'>[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @description
|
|
25
|
+
* If the planningmateriaal 'aantaltotaal' is changed in a transfer project, stays_at_location should copy this value.
|
|
26
|
+
*/
|
|
27
|
+
export declare class PlanningmateriaalStaysAtLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
28
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
29
|
+
dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<Dependency>;
|
|
30
|
+
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency): void;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { BLR_SKIP_RULE, BusinessLogicRule, BusinessLogicRuleApplyContext, BusinessLogicRuleConditionContext, CollectionResource, ItemResource, TransactionCache } from '../../../internal';
|
|
3
|
+
declare const projectColumns: readonly ["factuurmoment", "taxschema"];
|
|
4
|
+
declare const subprojectColumns: readonly ["korting_personeel", "korting_transport", "korting_verkoop", "korting_verhuur", "korting_totaal", "verzekering"];
|
|
5
|
+
declare const clientColumns: readonly ["factuurmoment", "taxschema", "personeelkorting", "transportkorting", "verkoopkorting", "verhuurkorting", "totaalkorting", "verzekering", "verzekering_aangepast"];
|
|
6
|
+
type ConditionResult = {
|
|
7
|
+
projectId: ItemId;
|
|
8
|
+
clientId: ItemId;
|
|
9
|
+
}[];
|
|
10
|
+
type Dependency = {
|
|
11
|
+
[projectId: number]: {
|
|
12
|
+
projectResource: ItemResource<'Project', typeof projectColumns>;
|
|
13
|
+
subprojectCollection: CollectionResource<'Subproject', typeof subprojectColumns>;
|
|
14
|
+
clientResource: ItemResource<'Contact', typeof clientColumns>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @description
|
|
19
|
+
* Whenever the location of a Client changes in a Project
|
|
20
|
+
* and client financial values are different from project ones,
|
|
21
|
+
* trigger the copy financial values modal to provide user
|
|
22
|
+
* an option to copy the financial values from client.
|
|
23
|
+
*/
|
|
24
|
+
export declare class ProjectClientChangedBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
25
|
+
condition({ previousChangesDelta, transaction, }: BusinessLogicRuleConditionContext): Promise<ConditionResult | typeof BLR_SKIP_RULE>;
|
|
26
|
+
dependency(transaction: TransactionCache, obj: ConditionResult): Promise<Dependency>;
|
|
27
|
+
apply({ destinationChangesDelta, }: BusinessLogicRuleApplyContext, obj: Dependency): void;
|
|
28
|
+
private valuesEqual;
|
|
29
|
+
private setValues;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { Template } from '../../../models/Template';
|
|
4
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
5
|
+
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
6
|
+
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
7
|
+
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
8
|
+
type ConditionResult = {
|
|
9
|
+
projectId: ItemId;
|
|
10
|
+
updatedContactIds: Set<ItemId>;
|
|
11
|
+
}[];
|
|
12
|
+
type Dependency = {
|
|
13
|
+
template: Template<'Projectnotitie'>;
|
|
14
|
+
projectTuples: {
|
|
15
|
+
projectId: ItemId;
|
|
16
|
+
Contact: ItemResource<'Contact', ['projectnotitie_naam', 'projectnotitie']>[];
|
|
17
|
+
Projectnotitie: ItemResource<'Projectnotitie', ['naam', 'omschrijving']>[];
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
export declare class ProjectContactProjectNoteBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
21
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
22
|
+
dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<Dependency>;
|
|
23
|
+
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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
|
+
type Dependency = {
|
|
9
|
+
[projectId: number]: {
|
|
10
|
+
subprojectResources: ItemResource<'Subproject', ['id', 'locatie']>[];
|
|
11
|
+
projectResource: ItemResource<'Project', ['id', 'locatie', 'locatie_persoon']>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @description
|
|
16
|
+
* Whenever the location of a Project changes in a one-sub (Project with no subprojects)
|
|
17
|
+
* we ensure the `locatie` & 'locatie_persoon` field gets applied on the Subproject too
|
|
18
|
+
*
|
|
19
|
+
* * Has similar opposite Business Rule for Subprojects {@link SubprojectOneSubLocationAlignBusinessLogicRule}
|
|
20
|
+
*/
|
|
21
|
+
export declare class ProjectOneSubLocationAlignBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
22
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
23
|
+
dependency(transaction: TransactionCache, obj: ConditionResult): Promise<Dependency>;
|
|
24
|
+
apply(context: BusinessLogicRuleApplyContext, obj: Dependency): void;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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 = {
|
|
8
|
+
Project: ItemId[];
|
|
9
|
+
Subproject: ItemId[];
|
|
10
|
+
};
|
|
11
|
+
type Dependency = {
|
|
12
|
+
project: ItemResource<'Project', typeof projectColumns>[];
|
|
13
|
+
subproject: ItemResource<'Subproject', typeof projectColumns>[];
|
|
14
|
+
};
|
|
15
|
+
declare const projectColumns: readonly ["gebruiksperiode", "planperiode", "transport_pickup", "transport_return"];
|
|
16
|
+
/**
|
|
17
|
+
* @description
|
|
18
|
+
* Whenever you set a new default time on a project or subproject we make sure the same time isn't used
|
|
19
|
+
* multiple times (except for gebruik/plan)
|
|
20
|
+
*/
|
|
21
|
+
export declare class ProjectSubprojectDefaultTimeBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
22
|
+
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
23
|
+
dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
|
|
24
|
+
apply(context: BusinessLogicRuleApplyContext, dep: Dependency): void;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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
|
+
declare const purchaseOrderColumns: readonly ["approval_status", "previous_status"];
|
|
8
|
+
type ConditionResult = ItemId<'PurchaseOrder'>[];
|
|
9
|
+
type Dependency = ItemResource<'PurchaseOrder', typeof purchaseOrderColumns>[];
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
* When the `approval_status` updates we want to update `previous_status` accordingly
|
|
13
|
+
*/
|
|
14
|
+
export declare class PurchaseOrderApprovalStatusBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
15
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
16
|
+
dependency(transaction: TransactionCache, purchaseOrderIds: ConditionResult): Promise<Dependency>;
|
|
17
|
+
apply(context: BusinessLogicRuleApplyContext, purchaseOrderResources: Dependency): void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
3
|
+
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
4
|
+
type ConditionResult = ItemId[];
|
|
5
|
+
type Dependency = void;
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* Whenever the item has a changed owner
|
|
9
|
+
* pop-up a modal to ensure the user of the consequences they might face when doing that.
|
|
10
|
+
*/
|
|
11
|
+
export declare class PurchaseOrderOwnerBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
12
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
13
|
+
dependency(): Promise<Dependency>;
|
|
14
|
+
apply(): void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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 = Set<ItemId>;
|
|
8
|
+
type Dependency = ItemResource<'Rate', ['rate_group', 'active', 'id']>[];
|
|
9
|
+
export declare class RateUpdatedBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
10
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
11
|
+
dependency(transaction: TransactionCache, updatedGroups: ConditionResult): Promise<Dependency>;
|
|
12
|
+
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency): void;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { FieldMap } from '../../../types/ItemTypesCollection';
|
|
4
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
5
|
+
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
6
|
+
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
7
|
+
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
8
|
+
type RecurrentItemType = 'Afspraak' | 'Functie' | 'Beschikbaarheid';
|
|
9
|
+
declare const dependencyColumns: readonly ["recureind", "recurperiode", "recurhoe"];
|
|
10
|
+
type ConditionResult = ItemId[];
|
|
11
|
+
type Dependency<ItemTypeType extends RecurrentItemType, ToField extends keyof FieldMap<ItemTypeType>> = ItemResource<ItemTypeType, [
|
|
12
|
+
...typeof dependencyColumns,
|
|
13
|
+
ToField
|
|
14
|
+
]>[];
|
|
15
|
+
/**
|
|
16
|
+
* @description
|
|
17
|
+
* Based on the recurhoe field, this business rule will choose a date for recureind that will make sure
|
|
18
|
+
* at least two recurrences are created after the current tot/plantot date of the item that is being edited.
|
|
19
|
+
*/
|
|
20
|
+
export declare class RecurrentItemRecureindBusinessLogicRule<ItemTypeType extends RecurrentItemType, ToField extends keyof FieldMap<ItemTypeType>> extends BusinessLogicRule<ConditionResult, Dependency<ItemTypeType, ToField>> {
|
|
21
|
+
protected itemType: ItemTypeType;
|
|
22
|
+
protected toField: keyof FieldMap<ItemTypeType>;
|
|
23
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
24
|
+
dependency(transaction: TransactionCache, recurrentItemIds: ConditionResult): Promise<Dependency<ItemTypeType, ToField>>;
|
|
25
|
+
apply(context: BusinessLogicRuleApplyContext, recurrentItemResources: Dependency<ItemTypeType, ToField>): void;
|
|
26
|
+
private convertRecurhoeToMomentDuration;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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
|
+
type Dependency = ItemResource<'Reparatie', ['aantal']>[];
|
|
9
|
+
export declare class ReparatiesExemplaarAantalBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
10
|
+
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
11
|
+
dependency(transaction: TransactionCache, reparatieIds: ConditionResult): Promise<Dependency>;
|
|
12
|
+
apply(context: BusinessLogicRuleApplyContext, reparatieResources: Dependency): void;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemEntry } from '../../../models/ItemEntry';
|
|
3
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
4
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
5
|
+
import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
|
|
6
|
+
import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
|
|
7
|
+
import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
|
|
8
|
+
type ConditionResult = {
|
|
9
|
+
entry: ItemEntry<'Reparatie' | 'MateriaalLost'>;
|
|
10
|
+
exemplaar: ItemId;
|
|
11
|
+
}[];
|
|
12
|
+
type Dependency = {
|
|
13
|
+
entries: ItemEntry<'Reparatie' | 'MateriaalLost'>[];
|
|
14
|
+
exemplaarResources: ItemResource<'Exemplaar', ['id', 'asset_location']>[];
|
|
15
|
+
};
|
|
16
|
+
export declare class ReparatieLostItemExemplaarLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
17
|
+
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
18
|
+
dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<Dependency>;
|
|
19
|
+
apply(context: BusinessLogicRuleApplyContext, dependency: Dependency): void;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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
|
+
type Dependency = ItemResource<'Rol', [
|
|
9
|
+
'general_eigen_medewerker_edit'
|
|
10
|
+
]>[];
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* If you can access update crew data, you can also always update your own data
|
|
14
|
+
*/
|
|
15
|
+
export declare class RolEditOwnDataBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
16
|
+
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
17
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
18
|
+
apply(context: BusinessLogicRuleApplyContext, rolResources: Dependency): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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 rolColumns: readonly ["facturen_eigen", "general_bestanden_downloaden", "facturen_toegang", "projecten_offertes_maken", "projecten_facturen_maken"];
|
|
9
|
+
type Dependency = ItemResource<'Rol', typeof rolColumns>[];
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
* If you have project access or can make invoices you should have permissions to download files, see invoices and edit invoices
|
|
13
|
+
*/
|
|
14
|
+
export declare class RolFileAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
15
|
+
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
16
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
17
|
+
apply(context: BusinessLogicRuleApplyContext, rolResources: Dependency): void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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
|
+
type Dependency = ItemResource<'Rol', [
|
|
9
|
+
'projecten_toegang'
|
|
10
|
+
]>[];
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* If you can enter the crew planner you can also access projects
|
|
14
|
+
*/
|
|
15
|
+
export declare class RolPersoneelsplannerToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
16
|
+
condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
17
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
18
|
+
apply(context: BusinessLogicRuleApplyContext, rolResources: Dependency): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
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
|
+
type Dependency = ItemResource<'Rol', [
|
|
9
|
+
'materialen_tijdlijn'
|
|
10
|
+
]>[];
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* If you can edit projects you should be able to see the equipment availability
|
|
14
|
+
*/
|
|
15
|
+
export declare class RolProjectenBewerkenBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
16
|
+
condition({ previousChangesDelta, }: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
|
|
17
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
18
|
+
apply(context: BusinessLogicRuleApplyContext, rolResources: Dependency): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|