@axelor/aos-mobile-maintenance 8.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +42 -0
  2. package/lib/api/equipement-maintenance-api.d.ts +5 -0
  3. package/lib/api/equipement-maintenance-api.js +42 -0
  4. package/lib/api/equipement-maintenance-api.js.map +1 -0
  5. package/lib/api/index.d.ts +2 -0
  6. package/lib/api/index.js +20 -0
  7. package/lib/api/index.js.map +1 -0
  8. package/lib/api/maintenance-request-api.d.ts +14 -0
  9. package/lib/api/maintenance-request-api.js +86 -0
  10. package/lib/api/maintenance-request-api.js.map +1 -0
  11. package/lib/components/atoms/EquipementMaintenanceCard/EquipementMaintenanceCard.d.ts +14 -0
  12. package/lib/components/atoms/EquipementMaintenanceCard/EquipementMaintenanceCard.js +57 -0
  13. package/lib/components/atoms/EquipementMaintenanceCard/EquipementMaintenanceCard.js.map +1 -0
  14. package/lib/components/atoms/MaintenanceRequestCard/MaintenanceRequestCard.d.ts +15 -0
  15. package/lib/components/atoms/MaintenanceRequestCard/MaintenanceRequestCard.js +69 -0
  16. package/lib/components/atoms/MaintenanceRequestCard/MaintenanceRequestCard.js.map +1 -0
  17. package/lib/components/atoms/index.d.ts +2 -0
  18. package/lib/components/atoms/index.js +20 -0
  19. package/lib/components/atoms/index.js.map +1 -0
  20. package/lib/components/index.d.ts +3 -0
  21. package/lib/components/index.js +21 -0
  22. package/lib/components/index.js.map +1 -0
  23. package/lib/components/molecules/ActionRadioSelect/ActionRadioSelect.d.ts +10 -0
  24. package/lib/components/molecules/ActionRadioSelect/ActionRadioSelect.js +46 -0
  25. package/lib/components/molecules/ActionRadioSelect/ActionRadioSelect.js.map +1 -0
  26. package/lib/components/molecules/ActionTypePicker/ActionTypePicker.d.ts +12 -0
  27. package/lib/components/molecules/ActionTypePicker/ActionTypePicker.js +29 -0
  28. package/lib/components/molecules/ActionTypePicker/ActionTypePicker.js.map +1 -0
  29. package/lib/components/molecules/EquipementMaintenanceActionCard/EquipementMaintenanceActionCard.d.ts +9 -0
  30. package/lib/components/molecules/EquipementMaintenanceActionCard/EquipementMaintenanceActionCard.js +36 -0
  31. package/lib/components/molecules/EquipementMaintenanceActionCard/EquipementMaintenanceActionCard.js.map +1 -0
  32. package/lib/components/molecules/index.d.ts +3 -0
  33. package/lib/components/molecules/index.js +21 -0
  34. package/lib/components/molecules/index.js.map +1 -0
  35. package/lib/components/organisms/EquipementMaintenanceSearchBar/EquipementMaintenanceSearchBar.d.ts +15 -0
  36. package/lib/components/organisms/EquipementMaintenanceSearchBar/EquipementMaintenanceSearchBar.js +47 -0
  37. package/lib/components/organisms/EquipementMaintenanceSearchBar/EquipementMaintenanceSearchBar.js.map +1 -0
  38. package/lib/components/organisms/MaintenanceRequestFilters/MaintenanceRequestFilters.d.ts +12 -0
  39. package/lib/components/organisms/MaintenanceRequestFilters/MaintenanceRequestFilters.js +51 -0
  40. package/lib/components/organisms/MaintenanceRequestFilters/MaintenanceRequestFilters.js.map +1 -0
  41. package/lib/components/organisms/index.d.ts +2 -0
  42. package/lib/components/organisms/index.js +20 -0
  43. package/lib/components/organisms/index.js.map +1 -0
  44. package/lib/features/asyncFunctions-index.d.ts +2 -0
  45. package/lib/features/asyncFunctions-index.js +20 -0
  46. package/lib/features/asyncFunctions-index.js.map +1 -0
  47. package/lib/features/equipementMaintenanceSlice.d.ts +7 -0
  48. package/lib/features/equipementMaintenanceSlice.js +50 -0
  49. package/lib/features/equipementMaintenanceSlice.js.map +1 -0
  50. package/lib/features/index.d.ts +2 -0
  51. package/lib/features/index.js +20 -0
  52. package/lib/features/index.js.map +1 -0
  53. package/lib/features/maintenanceRequestSlice.d.ts +22 -0
  54. package/lib/features/maintenanceRequestSlice.js +59 -0
  55. package/lib/features/maintenanceRequestSlice.js.map +1 -0
  56. package/lib/hooks/use-maintenance-header-actions.d.ts +1 -0
  57. package/lib/hooks/use-maintenance-header-actions.js +54 -0
  58. package/lib/hooks/use-maintenance-header-actions.js.map +1 -0
  59. package/lib/i18n/en.json +19 -0
  60. package/lib/i18n/fr.json +19 -0
  61. package/lib/index.d.ts +6 -0
  62. package/lib/index.js +76 -0
  63. package/lib/index.js.map +1 -0
  64. package/lib/models/forms.d.ts +2 -0
  65. package/lib/models/forms.js +46 -0
  66. package/lib/models/forms.js.map +1 -0
  67. package/lib/models/index.d.ts +5 -0
  68. package/lib/models/index.js +23 -0
  69. package/lib/models/index.js.map +1 -0
  70. package/lib/models/objectFields.d.ts +2 -0
  71. package/lib/models/objectFields.js +44 -0
  72. package/lib/models/objectFields.js.map +1 -0
  73. package/lib/models/searchFields.d.ts +2 -0
  74. package/lib/models/searchFields.js +32 -0
  75. package/lib/models/searchFields.js.map +1 -0
  76. package/lib/models/sortFields.d.ts +2 -0
  77. package/lib/models/sortFields.js +22 -0
  78. package/lib/models/sortFields.js.map +1 -0
  79. package/lib/models/typeObjects.d.ts +2 -0
  80. package/lib/models/typeObjects.js +69 -0
  81. package/lib/models/typeObjects.js.map +1 -0
  82. package/lib/screens/MaintenanceRequestFormScreen.d.ts +5 -0
  83. package/lib/screens/MaintenanceRequestFormScreen.js +54 -0
  84. package/lib/screens/MaintenanceRequestFormScreen.js.map +1 -0
  85. package/lib/screens/MaintenanceRequestListScreen.d.ts +3 -0
  86. package/lib/screens/MaintenanceRequestListScreen.js +60 -0
  87. package/lib/screens/MaintenanceRequestListScreen.js.map +1 -0
  88. package/lib/screens/index.d.ts +24 -0
  89. package/lib/screens/index.js +36 -0
  90. package/lib/screens/index.js.map +1 -0
  91. package/package.json +49 -0
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { ActionRadioSelect, EquipementMaintenanceSearchBar } from '../components';
19
+ export const maintenance_formsRegister = {
20
+ maintenance_maintenanceRequest: {
21
+ modelName: 'com.axelor.apps.maintenance.db.MaintenanceRequest',
22
+ fields: {
23
+ equipementMaintenance: {
24
+ titleKey: 'Maintenance_MaintenanceEquipment',
25
+ type: 'object',
26
+ required: true,
27
+ widget: 'custom',
28
+ customComponent: EquipementMaintenanceSearchBar,
29
+ },
30
+ expectedDate: {
31
+ titleKey: 'Maintenance_Deadline',
32
+ type: 'date',
33
+ required: true,
34
+ widget: 'date',
35
+ options: { popup: true },
36
+ },
37
+ actionSelect: {
38
+ titleKey: 'Maintenance_RequestActionType',
39
+ type: 'number',
40
+ widget: 'custom',
41
+ customComponent: ActionRadioSelect,
42
+ },
43
+ },
44
+ },
45
+ };
46
+ //# sourceMappingURL=forms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forms.js","sourceRoot":"","sources":["../../src/models/forms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,iBAAiB,EAAE,8BAA8B,EAAC,MAAM,eAAe,CAAC;AAEhF,MAAM,CAAC,MAAM,yBAAyB,GAAgB;IACpD,8BAA8B,EAAE;QAC9B,SAAS,EAAE,mDAAmD;QAC9D,MAAM,EAAE;YACN,qBAAqB,EAAE;gBACrB,QAAQ,EAAE,kCAAkC;gBAC5C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,QAAQ;gBAChB,eAAe,EAAE,8BAA8B;aAChD;YACD,YAAY,EAAE;gBACZ,QAAQ,EAAE,sBAAsB;gBAChC,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC;aACvB;YACD,YAAY,EAAE;gBACZ,QAAQ,EAAE,+BAA+B;gBACzC,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,QAAQ;gBAChB,eAAe,EAAE,iBAAiB;aACnC;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { maintenance_formsRegister } from './forms';
2
+ export { maintenance_modelAPI } from './objectFields';
3
+ export { maintenance_searchFields } from './searchFields';
4
+ export { maintenance_sortFields } from './sortFields';
5
+ export { maintenance_typeObjects } from './typeObjects';
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export { maintenance_formsRegister } from './forms';
19
+ export { maintenance_modelAPI } from './objectFields';
20
+ export { maintenance_searchFields } from './searchFields';
21
+ export { maintenance_sortFields } from './sortFields';
22
+ export { maintenance_typeObjects } from './typeObjects';
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,yBAAyB,EAAC,MAAM,SAAS,CAAC;AAClD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,uBAAuB,EAAC,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ObjectFields } from '@axelor/aos-mobile-core';
2
+ export declare const maintenance_modelAPI: ObjectFields;
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { schemaContructor } from '@axelor/aos-mobile-core';
19
+ export const maintenance_modelAPI = {
20
+ maintenance_maintenanceRequest: schemaContructor.object({
21
+ equipementMaintenance: schemaContructor.subObject().concat(schemaContructor.object({
22
+ code: schemaContructor.string(),
23
+ name: schemaContructor.string(),
24
+ })),
25
+ machine: schemaContructor.subObject().concat(schemaContructor.object({
26
+ code: schemaContructor.string(),
27
+ name: schemaContructor.string(),
28
+ })),
29
+ expectedDate: schemaContructor.string(),
30
+ requestBy: schemaContructor.subObject(),
31
+ statusSelect: schemaContructor.number(),
32
+ actionSelect: schemaContructor.number(),
33
+ }),
34
+ maintenance_equipementMaintenance: schemaContructor.object({
35
+ code: schemaContructor.string(),
36
+ name: schemaContructor.string(),
37
+ image: schemaContructor.subObject('fileName'),
38
+ machine: schemaContructor.subObject().concat(schemaContructor.object({
39
+ code: schemaContructor.string(),
40
+ name: schemaContructor.string(),
41
+ })),
42
+ }),
43
+ };
44
+ //# sourceMappingURL=objectFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectFields.js","sourceRoot":"","sources":["../../src/models/objectFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAe,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEvE,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,8BAA8B,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACtD,qBAAqB,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,MAAM,CACxD,gBAAgB,CAAC,MAAM,CAAC;YACtB,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;YAC/B,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;SAChC,CAAC,CACH;QACD,OAAO,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,MAAM,CAC1C,gBAAgB,CAAC,MAAM,CAAC;YACtB,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;YAC/B,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;SAChC,CAAC,CACH;QACD,YAAY,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACvC,SAAS,EAAE,gBAAgB,CAAC,SAAS,EAAE;QACvC,YAAY,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACvC,YAAY,EAAE,gBAAgB,CAAC,MAAM,EAAE;KACxC,CAAC;IACF,iCAAiC,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACzD,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;QAC/B,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;QAC/B,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,UAAU,CAAC;QAC7C,OAAO,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,MAAM,CAC1C,gBAAgB,CAAC,MAAM,CAAC;YACtB,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;YAC/B,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;SAChC,CAAC,CACH;KACF,CAAC;CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { SearchFields } from '@axelor/aos-mobile-core';
2
+ export declare const maintenance_searchFields: SearchFields;
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export const maintenance_searchFields = {
19
+ maintenance_maintenanceRequest: [
20
+ 'equipementMaintenance.code',
21
+ 'equipementMaintenance.name',
22
+ 'machine.code',
23
+ 'machine.name',
24
+ ],
25
+ maintenance_equipementMaintenance: [
26
+ 'code',
27
+ 'name',
28
+ 'machine.code',
29
+ 'machine.name',
30
+ ],
31
+ };
32
+ //# sourceMappingURL=searchFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchFields.js","sourceRoot":"","sources":["../../src/models/searchFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,wBAAwB,GAAiB;IACpD,8BAA8B,EAAE;QAC9B,4BAA4B;QAC5B,4BAA4B;QAC5B,cAAc;QACd,cAAc;KACf;IACD,iCAAiC,EAAE;QACjC,MAAM;QACN,MAAM;QACN,cAAc;QACd,cAAc;KACf;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { SortFields } from '@axelor/aos-mobile-core';
2
+ export declare const maintenance_sortFields: SortFields;
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export const maintenance_sortFields = {
19
+ maintenance_maintenanceRequest: [],
20
+ maintenance_equipementMaintenance: ['code'],
21
+ };
22
+ //# sourceMappingURL=sortFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortFields.js","sourceRoot":"","sources":["../../src/models/sortFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,sBAAsB,GAAe;IAChD,8BAA8B,EAAE,EAAE;IAClC,iCAAiC,EAAE,CAAC,MAAM,CAAC;CAC5C,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ModuleSelections } from '@axelor/aos-mobile-core';
2
+ export declare const maintenance_typeObjects: ModuleSelections;
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export const maintenance_typeObjects = [
19
+ {
20
+ modelName: 'com.axelor.apps.maintenance.db.MaintenanceRequest',
21
+ fields: {
22
+ actionSelect: {
23
+ content: [
24
+ {
25
+ key: 'Corrective',
26
+ value: 0,
27
+ title: 'Maintenance_RequestActionType_Corrective',
28
+ color: 'errorColor',
29
+ },
30
+ {
31
+ key: 'Preventive',
32
+ value: 1,
33
+ title: 'Maintenance_RequestActionType_Preventive',
34
+ color: 'cautionColor',
35
+ },
36
+ ],
37
+ },
38
+ statusSelect: {
39
+ content: [
40
+ {
41
+ key: 'Planned',
42
+ value: 0,
43
+ title: 'Maintenance_RequestStatus_Planned',
44
+ color: 'plannedColor',
45
+ },
46
+ {
47
+ key: 'InProgress',
48
+ value: 1,
49
+ title: 'Maintenance_RequestStatus_InProgress',
50
+ color: 'priorityColor',
51
+ },
52
+ {
53
+ key: 'Completed',
54
+ value: 2,
55
+ title: 'Maintenance_RequestStatus_Completed',
56
+ color: 'successColor',
57
+ },
58
+ {
59
+ key: 'Canceled',
60
+ value: 3,
61
+ title: 'Maintenance_RequestStatus_Canceled',
62
+ color: 'cautionColor',
63
+ },
64
+ ],
65
+ },
66
+ },
67
+ },
68
+ ];
69
+ //# sourceMappingURL=typeObjects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeObjects.js","sourceRoot":"","sources":["../../src/models/typeObjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAqB;IACvD;QACE,SAAS,EAAE,mDAAmD;QAC9D,MAAM,EAAE;YACN,YAAY,EAAE;gBACZ,OAAO,EAAE;oBACP;wBACE,GAAG,EAAE,YAAY;wBACjB,KAAK,EAAE,CAAC;wBACR,KAAK,EAAE,0CAA0C;wBACjD,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,GAAG,EAAE,YAAY;wBACjB,KAAK,EAAE,CAAC;wBACR,KAAK,EAAE,0CAA0C;wBACjD,KAAK,EAAE,cAAc;qBACtB;iBACF;aACF;YACD,YAAY,EAAE;gBACZ,OAAO,EAAE;oBACP;wBACE,GAAG,EAAE,SAAS;wBACd,KAAK,EAAE,CAAC;wBACR,KAAK,EAAE,mCAAmC;wBAC1C,KAAK,EAAE,cAAc;qBACtB;oBACD;wBACE,GAAG,EAAE,YAAY;wBACjB,KAAK,EAAE,CAAC;wBACR,KAAK,EAAE,sCAAsC;wBAC7C,KAAK,EAAE,eAAe;qBACvB;oBACD;wBACE,GAAG,EAAE,WAAW;wBAChB,KAAK,EAAE,CAAC;wBACR,KAAK,EAAE,qCAAqC;wBAC5C,KAAK,EAAE,cAAc;qBACtB;oBACD;wBACE,GAAG,EAAE,UAAU;wBACf,KAAK,EAAE,CAAC;wBACR,KAAK,EAAE,oCAAoC;wBAC3C,KAAK,EAAE,cAAc;qBACtB;iBACF;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const MaintenanceRequestFormScreen: ({ route }: {
3
+ route: any;
4
+ }) => React.JSX.Element;
5
+ export default MaintenanceRequestFormScreen;
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback, useMemo } from 'react';
19
+ import { Screen } from '@axelor/aos-mobile-ui';
20
+ import { FormView, useIsNavigationRoot, useNavigation, useTypes, } from '@axelor/aos-mobile-core';
21
+ import { createMaintenanceRequest } from '../features/maintenanceRequestSlice';
22
+ const MaintenanceRequestFormScreen = ({ route }) => {
23
+ const { machineId } = route?.params ?? {};
24
+ const { MaintenanceRequest } = useTypes();
25
+ const navigation = useNavigation();
26
+ const isRoot = useIsNavigationRoot();
27
+ const defaultValue = useMemo(() => ({
28
+ actionSelect: MaintenanceRequest?.actionSelect.Corrective,
29
+ machineId,
30
+ }), [MaintenanceRequest?.actionSelect.Corrective, machineId]);
31
+ const handleRequestCreation = useCallback(({ objectState, dispatch, handleReset }) => {
32
+ dispatch(createMaintenanceRequest({
33
+ ...objectState,
34
+ equipementMaintenanceId: objectState.equipementMaintenance?.id,
35
+ }));
36
+ handleReset();
37
+ if (!isRoot) {
38
+ navigation.pop();
39
+ }
40
+ }, [isRoot, navigation]);
41
+ return (<Screen>
42
+ <FormView formKey="maintenance_maintenanceRequest" creationDefaultValue={defaultValue} defaultEditMode actions={[
43
+ {
44
+ key: 'create-maintenance-request',
45
+ type: 'create',
46
+ needValidation: true,
47
+ needRequiredFields: true,
48
+ customAction: handleRequestCreation,
49
+ },
50
+ ]}/>
51
+ </Screen>);
52
+ };
53
+ export default MaintenanceRequestFormScreen;
54
+ //# sourceMappingURL=MaintenanceRequestFormScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MaintenanceRequestFormScreen.js","sourceRoot":"","sources":["../../src/screens/MaintenanceRequestFormScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,QAAQ,GACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,wBAAwB,EAAC,MAAM,qCAAqC,CAAC;AAE7E,MAAM,4BAA4B,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CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const MaintenanceRequestListScreen: () => React.JSX.Element;
3
+ export default MaintenanceRequestListScreen;
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useMemo, useState } from 'react';
19
+ import { ChipSelect, Screen } from '@axelor/aos-mobile-ui';
20
+ import { SearchListView, useSelector, useTranslator, useTypeHelpers, useTypes, } from '@axelor/aos-mobile-core';
21
+ import { MaintenanceRequestCard, MaintenanceRequestFilters } from '../components';
22
+ import { searchMaintenanceRequests } from '../features/maintenanceRequestSlice';
23
+ const MaintenanceRequestListScreen = () => {
24
+ const I18n = useTranslator();
25
+ const { MaintenanceRequest } = useTypes();
26
+ const { getSelectionItems } = useTypeHelpers();
27
+ const { loadingMaintenanceRequests, moreLoadingMaintenanceRequest, isListEndMaintenanceRequest, maintenanceRequestList, } = useSelector(state => state.maintenance_maintenanceRequest);
28
+ const { user } = useSelector(state => state.user);
29
+ const [selectedStatus, setSelectedStatus] = useState([]);
30
+ const [selectedAction, setSelectedAction] = useState(null);
31
+ const [selectedMachine, setSelectedMachine] = useState(null);
32
+ const [isAssignedToMe, setIsAssignedToMe] = useState(true);
33
+ const availableStatus = useMemo(() => [
34
+ MaintenanceRequest?.statusSelect.Planned,
35
+ MaintenanceRequest?.statusSelect.InProgress,
36
+ ], [MaintenanceRequest?.statusSelect]);
37
+ const statusList = useMemo(() => getSelectionItems(MaintenanceRequest?.statusSelect, selectedStatus).filter(({ value }) => availableStatus.includes(value)), [
38
+ MaintenanceRequest?.statusSelect,
39
+ availableStatus,
40
+ getSelectionItems,
41
+ selectedStatus,
42
+ ]);
43
+ const sliceFunctionData = useMemo(() => ({
44
+ userId: isAssignedToMe ? user.id : null,
45
+ statusList: selectedStatus,
46
+ machineId: selectedMachine?.id,
47
+ actionType: selectedAction,
48
+ }), [
49
+ isAssignedToMe,
50
+ selectedAction,
51
+ selectedMachine?.id,
52
+ selectedStatus,
53
+ user.id,
54
+ ]);
55
+ return (<Screen removeSpaceOnTop>
56
+ <SearchListView list={maintenanceRequestList} loading={loadingMaintenanceRequests} moreLoading={moreLoadingMaintenanceRequest} isListEnd={isListEndMaintenanceRequest} sliceFunction={searchMaintenanceRequests} sliceFunctionData={sliceFunctionData} searchPlaceholder={I18n.t('Base_Search')} renderListItem={({ item }) => <MaintenanceRequestCard {...item}/>} chipComponent={<ChipSelect mode="switch" selectionItems={statusList} onChangeValue={setSelectedStatus}/>} headerChildren={<MaintenanceRequestFilters isAssignedToMe={isAssignedToMe} setIsAssignedToMe={setIsAssignedToMe} selectedAction={selectedAction} setSelectedAction={setSelectedAction} selectedMachine={selectedMachine} setSelectedMachine={setSelectedMachine}/>}/>
57
+ </Screen>);
58
+ };
59
+ export default MaintenanceRequestListScreen;
60
+ //# sourceMappingURL=MaintenanceRequestListScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MaintenanceRequestListScreen.js","sourceRoot":"","sources":["../../src/screens/MaintenanceRequestListScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,cAAc,EACd,WAAW,EACX,aAAa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AAC,CAAC,cAAc,CAAC,CAC/B,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,EACvC,CACH,EAEL;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import MaintenanceRequestListScreen from './MaintenanceRequestListScreen';
3
+ import MaintenanceRequestFormScreen from './MaintenanceRequestFormScreen';
4
+ declare const _default: {
5
+ MaintenanceRequestListScreen: {
6
+ title: string;
7
+ component: () => import("react").JSX.Element;
8
+ actionID: string;
9
+ options: {
10
+ shadedHeader: boolean;
11
+ };
12
+ isUsableOnShortcut: boolean;
13
+ };
14
+ MaintenanceRequestFormScreen: {
15
+ title: string;
16
+ component: ({ route }: {
17
+ route: any;
18
+ }) => import("react").JSX.Element;
19
+ isUsableOnShortcut: boolean;
20
+ };
21
+ };
22
+ export default _default;
23
+ export { MaintenanceRequestListScreen };
24
+ export { MaintenanceRequestFormScreen };
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import MaintenanceRequestListScreen from './MaintenanceRequestListScreen';
19
+ import MaintenanceRequestFormScreen from './MaintenanceRequestFormScreen';
20
+ export default {
21
+ MaintenanceRequestListScreen: {
22
+ title: 'Maintenance_MaintenanceRequests',
23
+ component: MaintenanceRequestListScreen,
24
+ actionID: 'maintenance_maintenanceRequest_list',
25
+ options: { shadedHeader: false },
26
+ isUsableOnShortcut: true,
27
+ },
28
+ MaintenanceRequestFormScreen: {
29
+ title: 'Maintenance_CreateRequest',
30
+ component: MaintenanceRequestFormScreen,
31
+ isUsableOnShortcut: true,
32
+ },
33
+ };
34
+ export { MaintenanceRequestListScreen };
35
+ export { MaintenanceRequestFormScreen };
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/screens/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAE1E,eAAe;IACb,4BAA4B,EAAE;QAC5B,KAAK,EAAE,iCAAiC;QACxC,SAAS,EAAE,4BAA4B;QACvC,QAAQ,EAAE,qCAAqC;QAC/C,OAAO,EAAE,EAAC,YAAY,EAAE,KAAK,EAAC;QAC9B,kBAAkB,EAAE,IAAI;KACzB;IACD,4BAA4B,EAAE;QAC5B,KAAK,EAAE,2BAA2B;QAClC,SAAS,EAAE,4BAA4B;QACvC,kBAAkB,EAAE,IAAI;KACzB;CACF,CAAC;AAEF,OAAO,EAAC,4BAA4B,EAAC,CAAC;AACtC,OAAO,EAAC,4BAA4B,EAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@axelor/aos-mobile-maintenance",
3
+ "version": "8.5.0",
4
+ "author": "Axelor",
5
+ "license": "AGPL-3.0-only",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "main": "lib/index.js",
10
+ "types": "lib/index.d.js",
11
+ "files": [
12
+ "lib"
13
+ ],
14
+ "scripts": {
15
+ "clean": "rm -rf lib/",
16
+ "compile": "tsc -p tsconfig.build.json",
17
+ "dev": "npm run compile -- --watch",
18
+ "build": "npm run clean && npm run compile",
19
+ "npm-publish": "npm publish",
20
+ "lint": "eslint .",
21
+ "format": "prettier --write src/",
22
+ "format:check": "prettier --check src/",
23
+ "license:add": "npx add-copyright-header --generate --dir 'src'"
24
+ },
25
+ "peerDependencies": {
26
+ "react": "19.0.0",
27
+ "react-native": "0.79.6"
28
+ },
29
+ "dependencies": {
30
+ "@axelor/aos-mobile-core": "8.5.0",
31
+ "@axelor/aos-mobile-manufacturing": "8.5.0",
32
+ "@axelor/aos-mobile-ui": "8.5.0",
33
+ "@reduxjs/toolkit": "2.9.0"
34
+ },
35
+ "devDependencies": {
36
+ "@babel/runtime": "^7.25.0",
37
+ "@react-native/babel-preset": "0.79.6",
38
+ "@react-native/eslint-config": "0.79.6",
39
+ "@react-native/typescript-config": "0.79.6",
40
+ "@types/react": "^19.0.0",
41
+ "eslint": "8.57.0",
42
+ "prettier": "^3.3.3",
43
+ "react": "19.0.0",
44
+ "react-native": "0.79.6"
45
+ },
46
+ "resolutions": {
47
+ "@types/react": "^19.0.0"
48
+ }
49
+ }