@rentman/rm-core 63.1.0 → 63.2.0-RM4-45884

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
4
4
  import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
5
5
  import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
6
6
  import { LatestItem } from '../BusinessLogicRuleContextBase';
7
- declare const materiaalColumns: readonly ["id", "type", "is_combination", "is_physical"];
7
+ declare const materiaalColumns: readonly ["id", "type", "is_combination", "is_physical", "telexemplaren", "verhuur"];
8
8
  type ConditionResult = ChangesDeltaItemCreateDelta<'Setinhoud'>[];
9
9
  type Dependency = Record<string, LatestItem<'Materiaal', typeof materiaalColumns>>;
10
10
  /**
@@ -0,0 +1,27 @@
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 taakColumns: readonly [{
8
+ readonly deadline_relative_time_period: readonly ["tot", "van"];
9
+ }, "deadline_type", "deadline_relative_offset_amount", "deadline_relative_offset_base", "deadline_relative_offset_direction", "deadline_relative_offset_unit"];
10
+ declare const tijdColumns: readonly ["tot", "van"];
11
+ type ConditionResult = ItemId[];
12
+ type Dependency = {
13
+ taakResources: ItemResource<'Taak', typeof taakColumns>[];
14
+ tijdResources: ItemResource<'Tijd', typeof tijdColumns>[];
15
+ };
16
+ /**
17
+ * @description
18
+ * When the fields used to calculate relative deadline change,
19
+ * apply offsets to recalculate the deadline field
20
+ */
21
+ export declare class TaakDeadlineOffsetBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
22
+ condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
23
+ dependency(transaction: TransactionCache, taakIds: ConditionResult): Promise<Dependency>;
24
+ apply(context: BusinessLogicRuleApplyContext, { taakResources, }: Dependency): void;
25
+ calculateTaskTimeWithOffset(context: BusinessLogicRuleApplyContext, selectedDateWithoutOffset: moment.Moment, taskResource: ItemResource<'Taak', any>): moment.Moment;
26
+ }
27
+ 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
+ declare const taakColumns: readonly ["deadline_type", "deadline_relative_time_period", "deadline_relative_offset_amount", "deadline_relative_offset_base", "deadline_relative_offset_direction", "deadline_relative_offset_unit"];
8
+ type ConditionResult = ItemId[];
9
+ type Dependency = ItemResource<'Taak', typeof taakColumns>[];
10
+ /**
11
+ * @description
12
+ * When the 'deadline_type' field changes to 'absolute', reset the relative deadline fields
13
+ * so that they do not contain stale values.
14
+ */
15
+ export declare class TaakDeadlineTypeBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
16
+ condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
17
+ dependency(transaction: TransactionCache, taakIds: ConditionResult): Promise<Dependency>;
18
+ apply(context: BusinessLogicRuleApplyContext, taakResources: Dependency): void;
19
+ }
20
+ export {};
@@ -61,6 +61,8 @@ import { SetinhoudUpdateFixedBusinessLogicRule } from './Setinhoud/SetinhoudUpda
61
61
  import { SubprojectInPlanningBusinessLogicRule } from './Subproject/SubprojectInPlanningBusinessLogicRule';
62
62
  import { SubprojectOneSubLocationAlignBusinessLogicRule } from './Subproject/SubprojectOneSubLocationAlignBusinessRule';
63
63
  import { SubprojectOneSubNameAlignBusinessLogicRule } from './Subproject/SubprojectOneSubNameAlignBusinessRule';
64
+ import { TaakDeadlineTypeBusinessLogicRule } from './Taak/TaakDeadlineTypeBusinessLogicRule';
65
+ import { TaakDeadlineOffsetBusinessLogicRule } from './Taak/TaakDeadlineOffsetBusinessLogicRule';
64
66
  import { TijdNameChangedBusinessLogicRule } from './Tijd/TijdNameChangedBusinessLogicRule';
65
67
  import { TijdSubprojectChangedBusinessLogicRule } from './Tijd/TijdSubprojectChangedBusinessLogicRule';
66
- 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 FunctieTwowayBusinessLogicRule, typeof FunctieRecureindBusinessLogicRule, typeof FunctiegroepSubprojectBusinessLogicRule, typeof InhuurmateriaalAantaltotaalBusinessLogicRule, typeof InhuurmateriaalAantalBusinessLogicRule, 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 PlanningmateriaalAantalBusinessLogicRule, typeof PlanningmateriaalAantaltotaalBusinessLogicRule, typeof PlanningmateriaalOptieBusinessLogicRule, typeof PlanningmateriaalParentBusinessLogicRule, typeof PlanningmateriaalStaysAtLocationBusinessLogicRule, typeof PlanningPersoneelTransportBusinessLogicRule, typeof ProjectClientChangedBusinessLogicRule, typeof ProjectContactProjectNoteBusinessLogicRule, typeof ProjectOneSubLocationAlignBusinessLogicRule, typeof ProjectSubprojectDefaultTimeBusinessLogicRule, typeof PurchaseOrderOwnerBusinessLogicRule, typeof PurchaseOrderApprovalStatusBusinessLogicRule, typeof RateUpdatedBusinessLogicRule, 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 TijdSubprojectChangedBusinessLogicRule, typeof TijdNameChangedBusinessLogicRule, typeof AfspraakRecureindBusinessLogicRule, typeof BeschikbaarheidRecureindBusinessLogicRule];
68
+ 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 FunctieTwowayBusinessLogicRule, typeof FunctieRecureindBusinessLogicRule, typeof FunctiegroepSubprojectBusinessLogicRule, typeof InhuurmateriaalAantaltotaalBusinessLogicRule, typeof InhuurmateriaalAantalBusinessLogicRule, 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 PlanningmateriaalAantalBusinessLogicRule, typeof PlanningmateriaalAantaltotaalBusinessLogicRule, typeof PlanningmateriaalOptieBusinessLogicRule, typeof PlanningmateriaalParentBusinessLogicRule, typeof PlanningmateriaalStaysAtLocationBusinessLogicRule, typeof PlanningPersoneelTransportBusinessLogicRule, typeof ProjectClientChangedBusinessLogicRule, typeof ProjectContactProjectNoteBusinessLogicRule, typeof ProjectOneSubLocationAlignBusinessLogicRule, typeof ProjectSubprojectDefaultTimeBusinessLogicRule, typeof PurchaseOrderOwnerBusinessLogicRule, typeof PurchaseOrderApprovalStatusBusinessLogicRule, typeof RateUpdatedBusinessLogicRule, 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 TijdNameChangedBusinessLogicRule, typeof AfspraakRecureindBusinessLogicRule, typeof BeschikbaarheidRecureindBusinessLogicRule];
@@ -114,6 +114,14 @@ export interface SocketMessageBase {
114
114
  messageType: string;
115
115
  inResponse: boolean;
116
116
  }
117
+ export interface SocketMessageMassUpdate<ItemTypeType extends ApiItemType> extends SocketMessageBase {
118
+ messageType: 'event';
119
+ body: {
120
+ itemType: ItemTypeType;
121
+ eventType: 'massUpdate';
122
+ items: Pick<SocketUpdatedItems, ItemTypeType>;
123
+ };
124
+ }
117
125
  export interface SocketMessageCreate<ItemTypeType extends ApiItemType> extends SocketMessageBase {
118
126
  messageType: 'event';
119
127
  body: {
@@ -155,7 +163,7 @@ export type SocketMessageValuesTuple<ItemTypeType extends ApiItemType, ColumnIds
155
163
  parent: EntryParent | null;
156
164
  values: FieldMap<ItemTypeType, ColumnIds>;
157
165
  };
158
- export type SocketMessage<ItemTypeType extends ApiItemType> = SocketMessageCreate<ItemTypeType> | SocketMessageUpdate<ItemTypeType> | SocketMessageLinkTo<ItemTypeType> | SocketMessageDelete;
166
+ export type SocketMessage<ItemTypeType extends ApiItemType> = SocketMessageCreate<ItemTypeType> | SocketMessageUpdate<ItemTypeType> | SocketMessageLinkTo<ItemTypeType> | SocketMessageDelete | SocketMessageMassUpdate<ItemTypeType>;
159
167
  export type ItemResourcesItemTypeMap = {
160
168
  [ItemTypeType in ApiItemType]?: ItemResource<ItemTypeType>[];
161
169
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rentman/rm-core",
3
- "version": "63.1.0",
3
+ "version": "63.2.0-RM4-45884",
4
4
  "description": "Rentman core functionalities",
5
5
  "main": "./dist/rm-core.js",
6
6
  "types": "./dist/types/src/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@angular/core": "^20",
37
- "@rentman/backend-types": ">=4.818.0-28-gc3d424afbb",
37
+ "@rentman/backend-types": "4.833.1-55-g225f90b238",
38
38
  "moment": "^2.30.1",
39
39
  "rxjs": "^7"
40
40
  },