@acorex-platform/module-maintenance-management-client 0.0.30 → 0.0.33

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.
Files changed (139) hide show
  1. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type-asset-type.mjs +361 -0
  2. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type-asset-type.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type-resource.mjs +432 -0
  4. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type-resource.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type.mjs +471 -0
  6. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-cause.mjs +491 -0
  8. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-cause.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-detection.mjs +491 -0
  10. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-detection.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-effect.mjs +371 -0
  12. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-effect.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mechanism.mjs +491 -0
  14. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mechanism.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-asset-type.mjs +453 -0
  16. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-asset-type.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-mechanism.mjs +328 -0
  18. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-mechanism.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-solution.mjs +496 -0
  20. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-solution.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode.mjs +723 -0
  22. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-cause.mjs +328 -0
  24. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-cause.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-effect.mjs +328 -0
  26. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-effect.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-mechanism.mjs +328 -0
  28. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-mechanism.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register.mjs +809 -0
  30. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-severity.mjs +339 -0
  32. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-severity.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-type.mjs +496 -0
  34. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-type.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-plan.mjs +613 -0
  36. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-plan.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-activity-type.mjs +401 -0
  38. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-activity-type.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-failure-mode.mjs +356 -0
  40. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-failure-mode.mjs.map +1 -0
  41. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-resource.mjs +458 -0
  42. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-resource.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template.mjs +622 -0
  44. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template.mjs.map +1 -0
  45. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-type.mjs +412 -0
  46. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-type.mjs.map +1 -0
  47. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-order.mjs +893 -0
  48. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-order.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-package.mjs +452 -0
  50. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-package.mjs.map +1 -0
  51. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-report.mjs +570 -0
  52. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-report.mjs.map +1 -0
  53. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-acorex-platform-module-maintenance-management-client-contracts-entity-catalog-DJkKh0Qa.mjs +248 -0
  54. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-acorex-platform-module-maintenance-management-client-contracts-entity-catalog-DJkKh0Qa.mjs.map +1 -0
  55. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-asset-type.entity--Kz4Kqqe.mjs +157 -0
  56. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-asset-type.entity--Kz4Kqqe.mjs.map +1 -0
  57. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-resource.entity-C2OP2EN0.mjs +228 -0
  58. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-resource.entity-C2OP2EN0.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type.entity-D9UUDRIS.mjs +267 -0
  60. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type.entity-D9UUDRIS.mjs.map +1 -0
  61. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-cause.entity-glUcXwS9.mjs +287 -0
  62. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-cause.entity-glUcXwS9.mjs.map +1 -0
  63. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-detection.entity-CTp1voFW.mjs +287 -0
  64. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-detection.entity-CTp1voFW.mjs.map +1 -0
  65. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-effect.entity-ClD09en8.mjs +167 -0
  66. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-effect.entity-ClD09en8.mjs.map +1 -0
  67. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mechanism.entity-BcU0-nFS.mjs +287 -0
  68. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mechanism.entity-BcU0-nFS.mjs.map +1 -0
  69. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-asset-type.entity-N37srLVb.mjs +249 -0
  70. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-asset-type.entity-N37srLVb.mjs.map +1 -0
  71. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-mechanism.entity-BkkvXk03.mjs +124 -0
  72. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-mechanism.entity-BkkvXk03.mjs.map +1 -0
  73. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-solution.entity-HlVVBMTA.mjs +292 -0
  74. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-solution.entity-HlVVBMTA.mjs.map +1 -0
  75. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode.entity-BGJP73yC.mjs +519 -0
  76. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode.entity-BGJP73yC.mjs.map +1 -0
  77. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-cause.entity-CLM9YuYF.mjs +124 -0
  78. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-cause.entity-CLM9YuYF.mjs.map +1 -0
  79. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-effect.entity-DpLYMLsi.mjs +124 -0
  80. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-effect.entity-DpLYMLsi.mjs.map +1 -0
  81. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-mechanism.entity-DqU2wP0I.mjs +124 -0
  82. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-mechanism.entity-DqU2wP0I.mjs.map +1 -0
  83. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register.entity-BPZwEGE9.mjs +605 -0
  84. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register.entity-BPZwEGE9.mjs.map +1 -0
  85. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-severity.entity-DaMUJOID.mjs +135 -0
  86. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-severity.entity-DaMUJOID.mjs.map +1 -0
  87. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-type.entity-DkhVvBOh.mjs +292 -0
  88. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-type.entity-DkhVvBOh.mjs.map +1 -0
  89. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-plan.entity-WCiP2h8H.mjs +409 -0
  90. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-plan.entity-WCiP2h8H.mjs.map +1 -0
  91. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-activity-type.entity-FWn7bmMX.mjs +197 -0
  92. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-activity-type.entity-FWn7bmMX.mjs.map +1 -0
  93. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-failure-mode.entity-DC5GTHYM.mjs +152 -0
  94. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-failure-mode.entity-DC5GTHYM.mjs.map +1 -0
  95. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-resource.entity-O6y3Q3U6.mjs +254 -0
  96. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-resource.entity-O6y3Q3U6.mjs.map +1 -0
  97. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template.entity-DFDajM9U.mjs +418 -0
  98. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template.entity-DFDajM9U.mjs.map +1 -0
  99. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-type.entity-CGSHreth.mjs +208 -0
  100. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-type.entity-CGSHreth.mjs.map +1 -0
  101. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-order.entity-GaQSPAmn.mjs +689 -0
  102. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-order.entity-GaQSPAmn.mjs.map +1 -0
  103. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-package.entity-CJE8Txjo.mjs +248 -0
  104. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-package.entity-CJE8Txjo.mjs.map +1 -0
  105. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-report.entity-BrActlGh.mjs +366 -0
  106. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-report.entity-BrActlGh.mjs.map +1 -0
  107. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog.mjs +2 -0
  108. package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog.mjs.map +1 -0
  109. package/fesm2022/acorex-platform-module-maintenance-management-client-local-entities.mjs +54 -0
  110. package/fesm2022/acorex-platform-module-maintenance-management-client-local-entities.mjs.map +1 -0
  111. package/package.json +113 -1
  112. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type-asset-type.d.ts +5 -0
  113. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type-resource.d.ts +5 -0
  114. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-activity-type.d.ts +5 -0
  115. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-cause.d.ts +5 -0
  116. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-detection.d.ts +5 -0
  117. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-effect.d.ts +5 -0
  118. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mechanism.d.ts +5 -0
  119. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-asset-type.d.ts +5 -0
  120. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-mechanism.d.ts +5 -0
  121. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode-solution.d.ts +5 -0
  122. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-mode.d.ts +5 -0
  123. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-cause.d.ts +5 -0
  124. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-effect.d.ts +5 -0
  125. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register-mechanism.d.ts +5 -0
  126. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register.d.ts +5 -0
  127. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-severity.d.ts +5 -0
  128. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-failure-type.d.ts +5 -0
  129. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-plan.d.ts +5 -0
  130. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-activity-type.d.ts +5 -0
  131. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-failure-mode.d.ts +5 -0
  132. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template-resource.d.ts +5 -0
  133. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template.d.ts +5 -0
  134. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-type.d.ts +9 -0
  135. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-work-order.d.ts +7 -0
  136. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-work-package.d.ts +5 -0
  137. package/types/acorex-platform-module-maintenance-management-client-contracts-entities-work-report.d.ts +5 -0
  138. package/types/acorex-platform-module-maintenance-management-client-contracts-entity-catalog.d.ts +10 -0
  139. package/types/acorex-platform-module-maintenance-management-client-local-entities.d.ts +12 -0
@@ -0,0 +1,893 @@
1
+ import { AXPWidgetsCatalog, AXPSystemActionType } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions, AXPEntityCommandScope, entityDetailsCrudActions } from '@acorex-platform/framework-shared/entity';
3
+
4
+ //#region ---- Source type enum ----
5
+ var AXMWorkOrderSourceType;
6
+ (function (AXMWorkOrderSourceType) {
7
+ AXMWorkOrderSourceType["Manual"] = "manual";
8
+ AXMWorkOrderSourceType["MaintenancePlan"] = "maintenance-plan";
9
+ AXMWorkOrderSourceType["CreateAsset"] = "create-asset";
10
+ AXMWorkOrderSourceType["FailureRegister"] = "failure-register";
11
+ })(AXMWorkOrderSourceType || (AXMWorkOrderSourceType = {}));
12
+ //#endregion
13
+
14
+ //#region ---- Status names ----
15
+ var AXMWorkOrderStatus;
16
+ (function (AXMWorkOrderStatus) {
17
+ AXMWorkOrderStatus["Planned"] = "planned";
18
+ AXMWorkOrderStatus["Scheduled"] = "scheduled";
19
+ AXMWorkOrderStatus["Assigned"] = "assigned";
20
+ AXMWorkOrderStatus["InProgress"] = "in-progress";
21
+ AXMWorkOrderStatus["OnHold"] = "on-hold";
22
+ AXMWorkOrderStatus["Completed"] = "completed";
23
+ AXMWorkOrderStatus["SignedOff"] = "signed-off";
24
+ AXMWorkOrderStatus["Cancelled"] = "cancelled";
25
+ })(AXMWorkOrderStatus || (AXMWorkOrderStatus = {}));
26
+ //#endregion
27
+
28
+ //#region ---- Root Configuration ----
29
+ const config = {
30
+ i18n: 'maintenance-management',
31
+ module: 'MaintenanceManagement',
32
+ route: 'maintenance-management',
33
+ };
34
+ const RootConfig = {
35
+ config,
36
+ module: {
37
+ route: config.route,
38
+ name: config.module,
39
+ title: '@maintenance-management:module.title',
40
+ icon: 'fa-light fa-box',
41
+ },
42
+ entities: {
43
+ maintenanceType: {
44
+ name: 'MaintenanceType',
45
+ source: `${config.module}.MaintenanceType`,
46
+ title: '@maintenance-management:maintenance-types.entities.maintenance-type.title',
47
+ titlePlural: '@maintenance-management:maintenance-types.entities.maintenance-type.plural',
48
+ icon: 'fa-light fa-screwdriver-wrench',
49
+ },
50
+ maintenanceTemplate: {
51
+ name: 'MaintenanceTemplate',
52
+ source: `${config.module}.MaintenanceTemplate`,
53
+ title: '@maintenance-management:maintenance-templates.entities.maintenance-template.title',
54
+ titlePlural: '@maintenance-management:maintenance-templates.entities.maintenance-template.plural',
55
+ icon: 'fa-light fa-clipboard-list',
56
+ },
57
+ maintenancePlan: {
58
+ name: 'MaintenancePlan',
59
+ source: `${config.module}.MaintenancePlan`,
60
+ title: '@maintenance-management:maintenance-plans.entities.maintenance-plan.title',
61
+ titlePlural: '@maintenance-management:maintenance-plans.entities.maintenance-plan.plural',
62
+ icon: 'fa-light fa-calendar-check',
63
+ },
64
+ workPackage: {
65
+ name: 'WorkPackage',
66
+ source: `${config.module}.WorkPackage`,
67
+ title: '@maintenance-management:work-packages.entities.work-package.title',
68
+ titlePlural: '@maintenance-management:work-packages.entities.work-package.plural',
69
+ icon: 'fa-light fa-boxes-packing',
70
+ },
71
+ workOrder: {
72
+ name: 'WorkOrder',
73
+ source: `${config.module}.WorkOrder`,
74
+ title: '@maintenance-management:work-orders.entities.work-order.title',
75
+ titlePlural: '@maintenance-management:work-orders.entities.work-order.plural',
76
+ icon: 'fa-light fa-clipboard-check',
77
+ },
78
+ workReport: {
79
+ name: 'WorkReport',
80
+ source: `${config.module}.WorkReport`,
81
+ title: '@maintenance-management:work-reports.entities.work-report.title',
82
+ titlePlural: '@maintenance-management:work-reports.entities.work-report.plural',
83
+ icon: 'fa-light fa-file-lines',
84
+ },
85
+ maintenanceTemplateActivityType: {
86
+ name: 'MaintenanceTemplateActivityType',
87
+ source: `${config.module}.MaintenanceTemplateActivityType`,
88
+ title: '@maintenance-management:maintenance-template-activity-types.entities.maintenance-template-activity-type.title',
89
+ titlePlural: '@maintenance-management:maintenance-template-activity-types.entities.maintenance-template-activity-type.plural',
90
+ icon: 'fa-light fa-list-check',
91
+ },
92
+ maintenanceTemplateResource: {
93
+ name: 'MaintenanceTemplateResource',
94
+ source: `${config.module}.MaintenanceTemplateResource`,
95
+ title: '@maintenance-management:maintenance-template-resources.entities.maintenance-template-resource.title',
96
+ titlePlural: '@maintenance-management:maintenance-template-resources.entities.maintenance-template-resource.plural',
97
+ icon: 'fa-light fa-box-open-full',
98
+ },
99
+ maintenanceTemplateFailureMode: {
100
+ name: 'MaintenanceTemplateFailureMode',
101
+ source: `${config.module}.MaintenanceTemplateFailureMode`,
102
+ title: '@maintenance-management:maintenance-template-failure-modes.entities.maintenance-template-failure-mode.title',
103
+ titlePlural: '@maintenance-management:maintenance-template-failure-modes.entities.maintenance-template-failure-mode.plural',
104
+ icon: 'fa-light fa-triangle-exclamation',
105
+ },
106
+ activityType: {
107
+ name: 'ActivityType',
108
+ source: `${config.module}.ActivityType`,
109
+ title: '@maintenance-management:activity-types.entities.activity-type.title',
110
+ titlePlural: '@maintenance-management:activity-types.entities.activity-type.plural',
111
+ icon: 'fa-light fa-list-check',
112
+ },
113
+ activityTypeAssetType: {
114
+ name: 'ActivityTypeAssetType',
115
+ source: `${config.module}.ActivityTypeAssetType`,
116
+ title: '@maintenance-management:activity-type-asset-types.entities.activity-type-asset-type.title',
117
+ titlePlural: '@maintenance-management:activity-type-asset-types.entities.activity-type-asset-type.plural',
118
+ icon: 'fa-light fa-link',
119
+ },
120
+ activityTypeResource: {
121
+ name: 'ActivityTypeResource',
122
+ source: `${config.module}.ActivityTypeResource`,
123
+ title: '@maintenance-management:activity-type-resources.entities.activity-type-resource.title',
124
+ titlePlural: '@maintenance-management:activity-type-resources.entities.activity-type-resource.plural',
125
+ icon: 'fa-light fa-cubes',
126
+ },
127
+ failureCause: {
128
+ name: 'FailureCause',
129
+ source: `${config.module}.FailureCause`,
130
+ title: '@maintenance-management:failure-causes.entities.failure-cause.title',
131
+ titlePlural: '@maintenance-management:failure-causes.entities.failure-cause.plural',
132
+ icon: 'fa-light fa-triangle-exclamation',
133
+ },
134
+ failureMechanism: {
135
+ name: 'FailureMechanism',
136
+ source: `${config.module}.FailureMechanism`,
137
+ title: '@maintenance-management:failure-mechanisms.entities.failure-mechanism.title',
138
+ titlePlural: '@maintenance-management:failure-mechanisms.entities.failure-mechanism.plural',
139
+ icon: 'fa-light fa-gears',
140
+ },
141
+ failureDetection: {
142
+ name: 'FailureDetection',
143
+ source: `${config.module}.FailureDetection`,
144
+ title: '@maintenance-management:failure-detections.entities.failure-detection.title',
145
+ titlePlural: '@maintenance-management:failure-detections.entities.failure-detection.plural',
146
+ icon: 'fa-light fa-radar',
147
+ },
148
+ failureType: {
149
+ name: 'FailureType',
150
+ source: `${config.module}.FailureType`,
151
+ title: '@maintenance-management:failure-types.entities.failure-type.title',
152
+ titlePlural: '@maintenance-management:failure-types.entities.failure-type.plural',
153
+ icon: 'fa-light fa-shapes',
154
+ },
155
+ failureMode: {
156
+ name: 'FailureMode',
157
+ source: `${config.module}.FailureMode`,
158
+ title: '@maintenance-management:failure-modes.entities.failure-mode.title',
159
+ titlePlural: '@maintenance-management:failure-modes.entities.failure-mode.plural',
160
+ icon: 'fa-light fa-diagram-project',
161
+ },
162
+ failureModeAssetType: {
163
+ name: 'FailureModeAssetType',
164
+ source: `${config.module}.FailureModeAssetType`,
165
+ title: '@maintenance-management:failure-mode-asset-types.entities.failure-mode-asset-type.title',
166
+ titlePlural: '@maintenance-management:failure-mode-asset-types.entities.failure-mode-asset-type.plural',
167
+ icon: 'fa-light fa-link',
168
+ },
169
+ failureModeMechanism: {
170
+ name: 'FailureModeMechanism',
171
+ source: `${config.module}.FailureModeMechanism`,
172
+ title: '@maintenance-management:failure-mode-mechanisms.entities.failure-mode-mechanism.title',
173
+ titlePlural: '@maintenance-management:failure-mode-mechanisms.entities.failure-mode-mechanism.plural',
174
+ icon: 'fa-light fa-gears',
175
+ },
176
+ failureModeSolution: {
177
+ name: 'FailureModeSolution',
178
+ source: `${config.module}.FailureModeSolution`,
179
+ title: '@maintenance-management:failure-mode-solutions.entities.failure-mode-solution.title',
180
+ titlePlural: '@maintenance-management:failure-mode-solutions.entities.failure-mode-solution.plural',
181
+ icon: 'fa-light fa-screwdriver-wrench',
182
+ },
183
+ failureEffect: {
184
+ name: 'FailureEffect',
185
+ source: `${config.module}.FailureEffect`,
186
+ title: '@maintenance-management:failure-effects.entities.failure-effect.title',
187
+ titlePlural: '@maintenance-management:failure-effects.entities.failure-effect.plural',
188
+ icon: 'fa-light fa-waveform-lines',
189
+ },
190
+ failureSeverity: {
191
+ name: 'FailureSeverity',
192
+ source: `${config.module}.FailureSeverity`,
193
+ title: '@maintenance-management:failure-severities.entities.failure-severity.title',
194
+ titlePlural: '@maintenance-management:failure-severities.entities.failure-severity.plural',
195
+ icon: 'fa-light fa-gauge-high',
196
+ },
197
+ failureRegister: {
198
+ name: 'FailureRegister',
199
+ source: `${config.module}.FailureRegister`,
200
+ title: '@maintenance-management:failure-registers.entities.failure-register.title',
201
+ titlePlural: '@maintenance-management:failure-registers.entities.failure-register.plural',
202
+ icon: 'fa-light fa-file-waveform',
203
+ },
204
+ failureRegisterEffect: {
205
+ name: 'FailureRegisterEffect',
206
+ source: `${config.module}.FailureRegisterEffect`,
207
+ title: '@maintenance-management:failure-register-effects.entities.failure-register-effect.title',
208
+ titlePlural: '@maintenance-management:failure-register-effects.entities.failure-register-effect.plural',
209
+ icon: 'fa-light fa-wave-pulse',
210
+ },
211
+ failureRegisterCause: {
212
+ name: 'FailureRegisterCause',
213
+ source: `${config.module}.FailureRegisterCause`,
214
+ title: '@maintenance-management:failure-register-causes.entities.failure-register-cause.title',
215
+ titlePlural: '@maintenance-management:failure-register-causes.entities.failure-register-cause.plural',
216
+ icon: 'fa-light fa-triangle-exclamation',
217
+ },
218
+ failureRegisterMechanism: {
219
+ name: 'FailureRegisterMechanism',
220
+ source: `${config.module}.FailureRegisterMechanism`,
221
+ title: '@maintenance-management:failure-register-mechanisms.entities.failure-register-mechanism.title',
222
+ titlePlural: '@maintenance-management:failure-register-mechanisms.entities.failure-register-mechanism.plural',
223
+ icon: 'fa-light fa-gears',
224
+ },
225
+ },
226
+ };
227
+ //#endregion
228
+
229
+ const sourceTypeSelectDataSource = [
230
+ { id: AXMWorkOrderSourceType.Manual, title: '@maintenance-management:work-orders.source-types.manual' },
231
+ {
232
+ id: AXMWorkOrderSourceType.MaintenancePlan,
233
+ title: '@maintenance-management:work-orders.source-types.maintenance-plan',
234
+ },
235
+ { id: AXMWorkOrderSourceType.CreateAsset, title: '@maintenance-management:work-orders.source-types.create-asset' },
236
+ {
237
+ id: AXMWorkOrderSourceType.FailureRegister,
238
+ title: '@maintenance-management:work-orders.source-types.failure-register',
239
+ },
240
+ ];
241
+ const prioritySelectDataSource = [
242
+ { id: 'critical', title: '@maintenance-management:failure-modes.priorities.critical' },
243
+ { id: 'high', title: '@maintenance-management:failure-modes.priorities.high' },
244
+ { id: 'medium', title: '@maintenance-management:failure-modes.priorities.medium' },
245
+ { id: 'low', title: '@maintenance-management:failure-modes.priorities.low' },
246
+ ];
247
+ /** Enables list toolbar advance/inline filters (see entity `filtersDef`). */
248
+ const listSortAndFilterOptions = {
249
+ sort: { enabled: true },
250
+ filter: { advance: { enabled: true }, inline: { enabled: true } },
251
+ };
252
+ /** Form visibility when work order is driven by a maintenance plan. */
253
+ // const plannableFormVisible =
254
+ // '{{ !!context.eval("plannable") || (!!context.eval("id") && !!context.eval("maintenancePlanId")) }}';
255
+ /** Form visibility when work order is corrective / non-plan. */
256
+ // const unplannableFormVisible =
257
+ // '{{ !context.eval("plannable") && (!context.eval("id") || !context.eval("maintenancePlanId")) }}';
258
+ async function workOrderEntityFactory() {
259
+ const entityDef = {
260
+ module: RootConfig.module.name,
261
+ name: RootConfig.entities.workOrder.name,
262
+ title: RootConfig.entities.workOrder.title,
263
+ icon: RootConfig.entities.workOrder.icon,
264
+ formats: {
265
+ individual: RootConfig.entities.workOrder.title,
266
+ plural: RootConfig.entities.workOrder.titlePlural,
267
+ searchResult: {
268
+ title: '{{ workOrderNo }}',
269
+ description: '{{ maintenanceTemplate.title }}',
270
+ },
271
+ },
272
+ plugins: [
273
+ { name: 'history' },
274
+ { name: 'archive' },
275
+ { name: 'identifier', options: { field: 'workOrderNo', rule: 'work-order-no' } },
276
+ { name: 'unique-fields', options: { fields: 'workOrderNo', scope: 'global' } },
277
+ {
278
+ name: 'status',
279
+ options: {
280
+ field: 'statusId',
281
+ definition: 'maintenance-management.status.work-order',
282
+ defaultStatus: AXMWorkOrderStatus.Planned,
283
+ order: 4,
284
+ },
285
+ },
286
+ {
287
+ name: 'workflow-run',
288
+ options: {
289
+ list: {
290
+ mode: 'crud',
291
+ defaultRowAction: 'view',
292
+ },
293
+ },
294
+ },
295
+ {
296
+ name: 'meta-data-form',
297
+ options: {
298
+ path: 'maintenanceTemplateId',
299
+ title: '@maintenance-management:work-orders.entities.work-order.components.meta-data-form.title',
300
+ order: 3,
301
+ },
302
+ },
303
+ ],
304
+ relatedEntities: [
305
+ {
306
+ entity: `${RootConfig.module.name}.${RootConfig.entities.workReport.name}`,
307
+ title: '@maintenance-management:work-orders.entities.work-order.related-entities.work-reports.title',
308
+ columns: ['reportedAt', 'result', 'laborHours', 'downtimeMinutes', 'needFollowUp'],
309
+ conditions: [{ name: 'workOrderId', operator: { type: 'equal' }, value: '{{ context.eval("id") }}' }],
310
+ actions: [
311
+ {
312
+ title: '@general:actions.view.title',
313
+ command: { name: 'Entity:View' },
314
+ priority: 'primary',
315
+ default: true,
316
+ type: AXPSystemActionType.View,
317
+ scope: AXPEntityCommandScope.Individual,
318
+ },
319
+ {
320
+ title: '@general:actions.create.title',
321
+ command: {
322
+ name: 'Entity:Create',
323
+ options: {
324
+ process: {
325
+ redirect: false,
326
+ canCreateNewOne: true,
327
+ data: {
328
+ workOrderId: '{{ context.eval("id") }}',
329
+ },
330
+ },
331
+ },
332
+ },
333
+ priority: 'primary',
334
+ type: AXPSystemActionType.Create,
335
+ scope: AXPEntityCommandScope.TypeLevel,
336
+ },
337
+ ...entityDetailsCrudActions('workOrderId', { create: false, view: false }),
338
+ ],
339
+ excludeProperties: ['workOrderId'],
340
+ layout: {
341
+ type: 'page-list',
342
+ },
343
+ },
344
+ ],
345
+ groups: [
346
+ { id: 'basic-info', title: '@maintenance-management:work-orders.entities.work-order.groups.basic-info' },
347
+ {
348
+ id: 'scheduling-execution',
349
+ title: '@maintenance-management:work-orders.entities.work-order.groups.scheduling-execution',
350
+ },
351
+ { id: 'assignment', title: '@maintenance-management:work-orders.entities.work-order.groups.assignment' },
352
+ {
353
+ id: 'execution-settings',
354
+ title: '@maintenance-management:work-orders.entities.work-order.groups.execution-settings',
355
+ },
356
+ ],
357
+ properties: [
358
+ {
359
+ name: 'id',
360
+ title: 'ID',
361
+ schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },
362
+ },
363
+ {
364
+ name: 'workOrderNo',
365
+ title: '@maintenance-management:work-orders.entities.work-order.fields.work-order-no.title',
366
+ groupId: 'basic-info',
367
+ options: listSortAndFilterOptions,
368
+ schema: {
369
+ dataType: 'string',
370
+ unique: { enabled: true },
371
+ interface: {
372
+ type: AXPWidgetsCatalog.text,
373
+ options: {
374
+ disabled: true,
375
+ placeholder: '@maintenance-management:work-orders.entities.work-order.fields.work-order-no.placeholder',
376
+ },
377
+ },
378
+ },
379
+ validations: [{ rule: 'required' }],
380
+ },
381
+ // {
382
+ // name: 'plannable',
383
+ // title: '@maintenance-management:work-orders.entities.work-order.fields.plannable.title',
384
+ // groupId: 'basic-info',
385
+ // schema: {
386
+ // dataType: 'boolean',
387
+ // defaultValue: false,
388
+ // visible: '{{ !context.eval("id") }}',
389
+ // interface: {
390
+ // type: AXPWidgetsCatalog.toggle,
391
+ // options: {
392
+ // triggers: [
393
+ // {
394
+ // event: "{{ events.context('plannable') }}",
395
+ // action:
396
+ // "{{ if (context.eval('plannable')) { context.set('maintenanceTypeId', null); context.set('maintenanceType', null); context.set('maintenanceTemplateId', null); context.set('maintenanceTemplate', null); context.set('failureRegisterId', null); context.set('failureRegister', null); } else { context.set('maintenancePlanId', null); context.set('maintenancePlan', null); } }}",
397
+ // },
398
+ // ],
399
+ // },
400
+ // },
401
+ // },
402
+ // },
403
+ {
404
+ name: 'assetId',
405
+ title: '@maintenance-management:work-orders.entities.work-order.fields.asset-id.title',
406
+ groupId: 'basic-info',
407
+ options: listSortAndFilterOptions,
408
+ schema: {
409
+ dataType: 'string',
410
+ // visible:
411
+ // '{{ !context.eval("maintenancePlanId") || (!context.eval("plannable") && (!context.eval("id") || !context.eval("maintenancePlanId"))) }}',
412
+ visible: '{{ !context.eval("maintenancePlanId") || (!context.eval("id") || !context.eval("maintenancePlanId"))) }}',
413
+ interface: {
414
+ type: AXPWidgetsCatalog.lookup,
415
+ options: {
416
+ look: 'select',
417
+ entity: 'AssetManagement.Asset',
418
+ textField: 'title',
419
+ valueField: 'id',
420
+ disabled: '{{ !!context.eval("id") || !!context.eval("maintenancePlanId") }}',
421
+ expose: [
422
+ { source: 'id', target: 'asset.id' },
423
+ { source: 'title', target: 'asset.title' },
424
+ { source: 'assetTypeId', target: 'asset.assetTypeId' },
425
+ { source: 'assetType.maintenanceTypeIds', target: 'asset.assetType.maintenanceTypeIds' },
426
+ { source: 'availableMaintenanceTypeIds', target: 'asset.assetType.maintenanceTypeIds' },
427
+ ],
428
+ },
429
+ },
430
+ },
431
+ validations: [{ rule: 'required' }],
432
+ },
433
+ {
434
+ name: 'maintenanceTypeId',
435
+ title: '@maintenance-management:work-orders.entities.work-order.fields.maintenance-type-id.title',
436
+ groupId: 'basic-info',
437
+ options: listSortAndFilterOptions,
438
+ schema: {
439
+ dataType: 'string',
440
+ // visible: unplannableFormVisible,
441
+ interface: {
442
+ type: AXPWidgetsCatalog.lookup,
443
+ triggers: [
444
+ {
445
+ event: "{{ events.context('maintenanceTypeId') }}",
446
+ action: '{{ context.set("maintenanceTemplateId", null); context.set("maintenanceTemplate", null); }}',
447
+ },
448
+ {
449
+ event: "{{ events.context('assetId') }}",
450
+ action: '{{ widget.setValue(null); context.set("maintenanceType", null); context.set("maintenanceTemplateId", null); context.set("maintenanceTemplate", null); widget.refresh(); }}',
451
+ },
452
+ ],
453
+ options: {
454
+ look: 'select',
455
+ disabled: '{{ !context.eval("assetId") || !!context.eval("id") }}',
456
+ entity: `${RootConfig.module.name}.${RootConfig.entities.maintenanceType.name}`,
457
+ textField: 'title',
458
+ valueField: 'id',
459
+ filter: {
460
+ field: 'id',
461
+ operator: { type: 'in' },
462
+ value: '{{ context.eval("asset.assetType.maintenanceTypeIds") || context.eval("asset.availableMaintenanceTypeIds") || [] }}',
463
+ },
464
+ expose: [
465
+ { source: 'id', target: 'maintenanceType.id' },
466
+ { source: 'title', target: 'maintenanceType.title' },
467
+ ],
468
+ },
469
+ },
470
+ },
471
+ validations: [{ rule: 'required' }],
472
+ },
473
+ {
474
+ name: 'maintenancePlanId',
475
+ title: '@maintenance-management:work-orders.entities.work-order.fields.maintenance-plan-id.title',
476
+ groupId: 'basic-info',
477
+ options: listSortAndFilterOptions,
478
+ schema: {
479
+ dataType: 'string',
480
+ // visible: plannableFormVisible,
481
+ interface: {
482
+ type: AXPWidgetsCatalog.lookup,
483
+ options: {
484
+ look: 'lookup',
485
+ allowCreate: 'quick',
486
+ disabled: '{{ !!context.eval("id") }}',
487
+ entity: `${RootConfig.module.name}.${RootConfig.entities.maintenancePlan.name}`,
488
+ textField: 'title',
489
+ valueField: 'id',
490
+ filter: {
491
+ field: 'assetId',
492
+ operator: { type: 'equal' },
493
+ value: '{{ context.eval("assetId") }}',
494
+ },
495
+ expose: [
496
+ { source: 'id', target: 'maintenancePlan.id' },
497
+ { source: 'title', target: 'maintenancePlan.title' },
498
+ { source: 'code', target: 'maintenancePlan.code' },
499
+ { source: 'assetId', target: 'assetId' },
500
+ { source: 'asset.id', target: 'asset.id' },
501
+ { source: 'asset.title', target: 'asset.title' },
502
+ { source: 'asset.assetTypeId', target: 'asset.assetTypeId' },
503
+ { source: 'asset.assetType.maintenanceTypeIds', target: 'asset.assetType.maintenanceTypeIds' },
504
+ { source: 'maintenanceTypeId', target: 'maintenanceTypeId' },
505
+ { source: 'maintenanceTemplateId', target: 'maintenanceTemplateId' },
506
+ ],
507
+ },
508
+ },
509
+ },
510
+ },
511
+ {
512
+ name: 'maintenanceTemplateId',
513
+ title: '@maintenance-management:work-orders.entities.work-order.fields.maintenance-template-id.title',
514
+ groupId: 'basic-info',
515
+ options: listSortAndFilterOptions,
516
+ schema: {
517
+ dataType: 'string',
518
+ readonly: '{{ !!context.eval("id") || (!context.eval("plannable") && !context.eval("maintenanceTypeId")) }}',
519
+ // visible: unplannableFormVisible,
520
+ interface: {
521
+ type: AXPWidgetsCatalog.lookup,
522
+ triggers: [
523
+ {
524
+ event: "{{ events.context('maintenanceTypeId') }}",
525
+ action: '{{ widget.setValue(null); context.set("maintenanceTemplate", null); widget.refresh(); }}',
526
+ },
527
+ ],
528
+ options: {
529
+ // disabled:
530
+ // '{{ !!context.eval("plannable") || !!context.eval("id") || !context.eval("maintenanceTypeId") }}',
531
+ disabled: '{{ !!context.eval("id") || !context.eval("maintenanceTypeId") }}',
532
+ look: 'select',
533
+ entity: `${RootConfig.module.name}.${RootConfig.entities.maintenanceTemplate.name}`,
534
+ textField: 'title',
535
+ valueField: 'id',
536
+ filter: {
537
+ field: 'maintenanceTypeId',
538
+ operator: { type: 'equal' },
539
+ value: '{{ context.eval("maintenanceTypeId") }}',
540
+ },
541
+ expose: [
542
+ { source: 'id', target: 'maintenanceTemplate.id' },
543
+ { source: 'title', target: 'maintenanceTemplate.title' },
544
+ // { source: 'metadataIds', target: 'maintenanceTemplate.metadataIds' },
545
+ { source: 'workflowConfig', target: 'maintenanceTemplate.workflowConfig' },
546
+ ],
547
+ },
548
+ },
549
+ },
550
+ },
551
+ {
552
+ name: 'failureRegisterId',
553
+ title: '@maintenance-management:work-orders.entities.work-order.fields.failure-register-id.title',
554
+ groupId: 'basic-info',
555
+ options: listSortAndFilterOptions,
556
+ schema: {
557
+ dataType: 'string',
558
+ // visible: unplannableFormVisible,
559
+ interface: {
560
+ type: AXPWidgetsCatalog.lookup,
561
+ options: {
562
+ look: 'lookup',
563
+ allowCreate: 'quick',
564
+ disabled: '{{ !!context.eval("id") }}',
565
+ entity: `${RootConfig.module.name}.${RootConfig.entities.failureRegister.name}`,
566
+ textField: 'code',
567
+ valueField: 'id',
568
+ filter: {
569
+ field: 'assetId',
570
+ operator: { type: 'equal' },
571
+ value: '{{ context.eval("assetId") }}',
572
+ },
573
+ expose: [
574
+ { source: 'id', target: 'failureRegister.id' },
575
+ { source: 'code', target: 'failureRegister.code' },
576
+ ],
577
+ },
578
+ },
579
+ },
580
+ },
581
+ {
582
+ name: 'sourceType',
583
+ title: '@maintenance-management:work-orders.entities.work-order.fields.source-type.title',
584
+ groupId: 'basic-info',
585
+ options: listSortAndFilterOptions,
586
+ schema: {
587
+ dataType: 'string',
588
+ readonly: true,
589
+ interface: {
590
+ type: AXPWidgetsCatalog.select,
591
+ options: {
592
+ valueField: 'id',
593
+ textField: 'title',
594
+ allowSearch: false,
595
+ disabled: true,
596
+ dataSource: sourceTypeSelectDataSource,
597
+ },
598
+ },
599
+ },
600
+ },
601
+ {
602
+ name: 'autoGeneratedWorkOrder',
603
+ title: '@maintenance-management:work-orders.entities.work-order.fields.auto-generated-work-order.title',
604
+ groupId: 'basic-info',
605
+ options: listSortAndFilterOptions,
606
+ schema: {
607
+ dataType: 'boolean',
608
+ defaultValue: false,
609
+ interface: { type: AXPWidgetsCatalog.toggle, options: { disabled: true } },
610
+ },
611
+ },
612
+ {
613
+ name: 'priorityId',
614
+ title: '@maintenance-management:work-orders.entities.work-order.fields.priority-id.title',
615
+ groupId: 'basic-info',
616
+ options: listSortAndFilterOptions,
617
+ schema: {
618
+ dataType: 'string',
619
+ interface: {
620
+ type: AXPWidgetsCatalog.select,
621
+ options: {
622
+ valueField: 'id',
623
+ textField: 'title',
624
+ allowSearch: true,
625
+ dataSource: prioritySelectDataSource,
626
+ },
627
+ },
628
+ },
629
+ },
630
+ {
631
+ name: 'scheduledStart',
632
+ title: '@maintenance-management:work-orders.entities.work-order.fields.scheduled-start.title',
633
+ groupId: 'scheduling-execution',
634
+ options: listSortAndFilterOptions,
635
+ schema: { dataType: 'date', interface: { type: AXPWidgetsCatalog.dateTime, options: { format: 'datetime' } } },
636
+ },
637
+ {
638
+ name: 'scheduledEnd',
639
+ title: '@maintenance-management:work-orders.entities.work-order.fields.scheduled-end.title',
640
+ groupId: 'scheduling-execution',
641
+ options: listSortAndFilterOptions,
642
+ schema: { dataType: 'date', interface: { type: AXPWidgetsCatalog.dateTime, options: { format: 'datetime' } } },
643
+ },
644
+ {
645
+ name: 'startedAt',
646
+ title: '@maintenance-management:work-orders.entities.work-order.fields.started-at.title',
647
+ groupId: 'scheduling-execution',
648
+ options: listSortAndFilterOptions,
649
+ schema: { dataType: 'date', interface: { type: AXPWidgetsCatalog.dateTime, options: { format: 'datetime' } } },
650
+ },
651
+ {
652
+ name: 'completedAt',
653
+ title: '@maintenance-management:work-orders.entities.work-order.fields.completed-at.title',
654
+ groupId: 'scheduling-execution',
655
+ options: listSortAndFilterOptions,
656
+ schema: { dataType: 'date', interface: { type: AXPWidgetsCatalog.dateTime, options: { format: 'datetime' } } },
657
+ },
658
+ {
659
+ name: 'assignedToId',
660
+ title: '@maintenance-management:work-orders.entities.work-order.fields.assigned-to-id.title',
661
+ groupId: 'assignment',
662
+ options: listSortAndFilterOptions,
663
+ schema: {
664
+ dataType: 'string',
665
+ interface: {
666
+ type: AXPWidgetsCatalog.lookup,
667
+ options: {
668
+ look: 'select',
669
+ entity: 'PersonCore.Person',
670
+ textField: 'fullName',
671
+ valueField: 'id',
672
+ columns: ['fullName'],
673
+ expose: [
674
+ { source: 'id', target: 'assignedTo.id' },
675
+ { source: 'fullName', target: 'assignedTo.fullName' },
676
+ ],
677
+ },
678
+ },
679
+ },
680
+ },
681
+ {
682
+ name: 'requestedById',
683
+ title: '@maintenance-management:work-orders.entities.work-order.fields.requested-by-id.title',
684
+ groupId: 'assignment',
685
+ options: listSortAndFilterOptions,
686
+ schema: {
687
+ dataType: 'string',
688
+ defaultValue: '{{ session.currentUser().id }}',
689
+ readonly: true,
690
+ interface: {
691
+ type: AXPWidgetsCatalog.lookup,
692
+ options: {
693
+ look: 'select',
694
+ disabled: true,
695
+ entity: 'SecurityManagement.User',
696
+ textField: 'displayName',
697
+ valueField: 'id',
698
+ columns: ['displayName', 'username'],
699
+ expose: [
700
+ { source: 'id', target: 'requestedBy.id' },
701
+ { source: 'displayName', target: 'requestedBy.displayName' },
702
+ ],
703
+ },
704
+ },
705
+ },
706
+ },
707
+ {
708
+ name: 'estimatedHours',
709
+ title: '@maintenance-management:work-orders.entities.work-order.fields.estimated-hours.title',
710
+ groupId: 'execution-settings',
711
+ options: listSortAndFilterOptions,
712
+ schema: { dataType: 'number', interface: { type: AXPWidgetsCatalog.number, options: { min: 0 } } },
713
+ },
714
+ {
715
+ name: 'actualHours',
716
+ title: '@maintenance-management:work-orders.entities.work-order.fields.actual-hours.title',
717
+ groupId: 'execution-settings',
718
+ options: listSortAndFilterOptions,
719
+ schema: { dataType: 'number', interface: { type: AXPWidgetsCatalog.number, options: { min: 0 } } },
720
+ },
721
+ {
722
+ name: 'downtimeMinutes',
723
+ title: '@maintenance-management:work-orders.entities.work-order.fields.downtime-minutes.title',
724
+ groupId: 'execution-settings',
725
+ options: listSortAndFilterOptions,
726
+ schema: { dataType: 'number', interface: { type: AXPWidgetsCatalog.number, options: { min: 0 } } },
727
+ },
728
+ {
729
+ name: 'needPermission',
730
+ title: '@maintenance-management:work-orders.entities.work-order.fields.work-permit.title',
731
+ groupId: 'execution-settings',
732
+ options: listSortAndFilterOptions,
733
+ schema: {
734
+ dataType: 'boolean',
735
+ defaultValue: false,
736
+ interface: { type: AXPWidgetsCatalog.toggle, options: {} },
737
+ },
738
+ },
739
+ {
740
+ name: 'needShutdown',
741
+ title: '@maintenance-management:work-orders.entities.work-order.fields.need-shutdown.title',
742
+ groupId: 'execution-settings',
743
+ options: listSortAndFilterOptions,
744
+ schema: {
745
+ dataType: 'boolean',
746
+ defaultValue: false,
747
+ interface: { type: AXPWidgetsCatalog.toggle, options: {} },
748
+ },
749
+ },
750
+ {
751
+ name: 'workflowColumn',
752
+ title: '@maintenance-management:work-orders.entities.work-order.fields.workflow-column.title',
753
+ schema: {
754
+ dataType: 'object',
755
+ visible: false,
756
+ readonly: true,
757
+ interface: {
758
+ type: 'work-order-workflow-column',
759
+ options: {},
760
+ },
761
+ },
762
+ },
763
+ {
764
+ name: 'workReportColumn',
765
+ title: '@maintenance-management:work-orders.entities.work-order.fields.work-report-column.title',
766
+ schema: {
767
+ dataType: 'object',
768
+ visible: false,
769
+ readonly: true,
770
+ interface: {
771
+ type: 'work-order-work-report-column',
772
+ options: {},
773
+ },
774
+ },
775
+ },
776
+ ],
777
+ columns: [
778
+ { name: 'workOrderNo', options: { order: 1 } },
779
+ { name: 'maintenanceTypeId', options: { dataPath: 'maintenanceType.title', order: 3 } },
780
+ { name: 'workflowColumn', options: { order: 4, width: '220px' } },
781
+ { name: 'workReportColumn', options: { order: 5, width: '180px' } },
782
+ { name: 'maintenancePlanId', options: { dataPath: 'maintenancePlan.title', order: 6 } },
783
+ { name: 'failureRegisterId', options: { dataPath: 'failureRegister.code', order: 7 } },
784
+ { name: 'priorityId', options: { order: 8 } },
785
+ { name: 'sourceType', options: { order: 9 } },
786
+ { name: 'scheduledStart', options: { order: 10 } },
787
+ { name: 'scheduledEnd', options: { order: 11 } },
788
+ { name: 'startedAt', options: { order: 12 } },
789
+ { name: 'completedAt', options: { order: 13 } },
790
+ { name: 'assignedToId', options: { dataPath: 'assignedTo.fullName', order: 14 } },
791
+ { name: 'requestedById', options: { dataPath: 'requestedBy.displayName', order: 15 } },
792
+ { name: 'estimatedHours', options: { order: 16 } },
793
+ { name: 'actualHours', options: { order: 17 } },
794
+ { name: 'downtimeMinutes', options: { order: 18 } },
795
+ { name: 'needPermission', options: { order: 19 } },
796
+ { name: 'needShutdown', options: { order: 20 } },
797
+ { name: 'autoGeneratedWorkOrder', options: { order: 22 } },
798
+ ],
799
+ interfaces: {
800
+ master: {
801
+ create: {
802
+ sections: [{ id: 'basic-info' }, { id: 'scheduling-execution' }, { id: 'assignment' }, { id: 'execution-settings' }],
803
+ properties: [
804
+ { name: 'workOrderNo', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
805
+ // { name: 'plannable', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
806
+ { name: 'assetId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
807
+ { name: 'maintenanceTypeId', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
808
+ { name: 'maintenanceTemplateId', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
809
+ // { name: 'maintenancePlanId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
810
+ // { name: 'failureRegisterId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
811
+ { name: 'priorityId', layout: { positions: { lg: { colSpan: 6, order: 8 } } } },
812
+ // { name: 'autoGeneratedWorkOrder', layout: { positions: { lg: { colSpan: 6, order: 9 } } } },
813
+ { name: 'scheduledStart', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
814
+ { name: 'scheduledEnd', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
815
+ { name: 'startedAt', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
816
+ { name: 'completedAt', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
817
+ { name: 'assignedToId', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
818
+ { name: 'requestedById', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
819
+ { name: 'estimatedHours', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
820
+ { name: 'actualHours', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
821
+ { name: 'downtimeMinutes', layout: { positions: { lg: { colSpan: 4, order: 3 } } } },
822
+ { name: 'needPermission', layout: { positions: { lg: { colSpan: 4, order: 4 } } } },
823
+ { name: 'needShutdown', layout: { positions: { lg: { colSpan: 4, order: 5 } } } },
824
+ ],
825
+ },
826
+ update: {
827
+ sections: [{ id: 'basic-info' }, { id: 'scheduling-execution' }, { id: 'assignment' }, { id: 'execution-settings' }],
828
+ properties: [
829
+ { name: 'workOrderNo', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
830
+ { name: 'maintenanceTypeId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
831
+ { name: 'maintenanceTemplateId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
832
+ // { name: 'maintenancePlanId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
833
+ // { name: 'failureRegisterId', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
834
+ { name: 'sourceType', layout: { positions: { lg: { colSpan: 3, order: 4 } } } },
835
+ { name: 'autoGeneratedWorkOrder', layout: { positions: { lg: { colSpan: 3, order: 5 } } } },
836
+ { name: 'priorityId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
837
+ { name: 'assetId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
838
+ { name: 'scheduledStart', layout: { positions: { lg: { colSpan: 6, order: 8 } } } },
839
+ { name: 'scheduledEnd', layout: { positions: { lg: { colSpan: 6, order: 9 } } } },
840
+ { name: 'startedAt', layout: { positions: { lg: { colSpan: 6, order: 10 } } } },
841
+ { name: 'completedAt', layout: { positions: { lg: { colSpan: 6, order: 11 } } } },
842
+ { name: 'assignedToId', layout: { positions: { lg: { colSpan: 6, order: 12 } } } },
843
+ { name: 'requestedById', layout: { positions: { lg: { colSpan: 6, order: 13 } } } },
844
+ { name: 'estimatedHours', layout: { positions: { lg: { colSpan: 4, order: 14 } } } },
845
+ { name: 'actualHours', layout: { positions: { lg: { colSpan: 4, order: 15 } } } },
846
+ { name: 'downtimeMinutes', layout: { positions: { lg: { colSpan: 4, order: 16 } } } },
847
+ { name: 'needPermission', layout: { positions: { lg: { colSpan: 4, order: 17 } } } },
848
+ { name: 'needShutdown', layout: { positions: { lg: { colSpan: 4, order: 18 } } } },
849
+ ],
850
+ },
851
+ single: {
852
+ title: '{{ workOrderNo }}',
853
+ sections: [{ id: 'basic-info' }, { id: 'scheduling-execution' }, { id: 'assignment' }, { id: 'execution-settings' }],
854
+ properties: [
855
+ { name: 'workOrderNo', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
856
+ { name: 'assetId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
857
+ { name: 'maintenanceTypeId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
858
+ { name: 'maintenanceTemplateId', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
859
+ // { name: 'maintenancePlanId', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
860
+ // { name: 'failureRegisterId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
861
+ { name: 'sourceType', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
862
+ { name: 'autoGeneratedWorkOrder', layout: { positions: { lg: { colSpan: 3, order: 6 } } } },
863
+ { name: 'priorityId', layout: { positions: { lg: { colSpan: 3, order: 7 } } } },
864
+ { name: 'scheduledStart', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
865
+ { name: 'scheduledEnd', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
866
+ { name: 'startedAt', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
867
+ { name: 'completedAt', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
868
+ { name: 'assignedToId', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
869
+ { name: 'requestedById', layout: { positions: { lg: { colSpan: 4, order: 3 } } } },
870
+ { name: 'estimatedHours', layout: { positions: { lg: { colSpan: 4, order: 4 } } } },
871
+ { name: 'actualHours', layout: { positions: { lg: { colSpan: 4, order: 5 } } } },
872
+ { name: 'downtimeMinutes', layout: { positions: { lg: { colSpan: 4, order: 6 } } } },
873
+ { name: 'needPermission', layout: { positions: { lg: { colSpan: 4, order: 7 } } } },
874
+ { name: 'needShutdown', layout: { positions: { lg: { colSpan: 4, order: 8 } } } },
875
+ ],
876
+ actions: [...entityMasterRecordActions()],
877
+ },
878
+ list: {
879
+ actions: [...entityMasterCrudActions({ create: false, delete: false })],
880
+ views: [createAllQueryView({ sorts: [{ name: 'workOrderNo', dir: 'desc' }] })],
881
+ },
882
+ },
883
+ },
884
+ };
885
+ return entityDef;
886
+ }
887
+
888
+ /**
889
+ * Generated bundle index. Do not edit.
890
+ */
891
+
892
+ export { workOrderEntityFactory };
893
+ //# sourceMappingURL=acorex-platform-module-maintenance-management-client-contracts-entities-work-order.mjs.map