@axelor/aos-mobile-intervention 8.1.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 (271) hide show
  1. package/README.md +46 -0
  2. package/lib/api/client-and-prospect-api.d.ts +4 -0
  3. package/lib/api/client-and-prospect-api.js +57 -0
  4. package/lib/api/client-and-prospect-api.js.map +1 -0
  5. package/lib/api/contract-api.d.ts +5 -0
  6. package/lib/api/contract-api.js +45 -0
  7. package/lib/api/contract-api.js.map +1 -0
  8. package/lib/api/equipment-api.d.ts +43 -0
  9. package/lib/api/equipment-api.js +212 -0
  10. package/lib/api/equipment-api.js.map +1 -0
  11. package/lib/api/equipment-family-api.d.ts +4 -0
  12. package/lib/api/equipment-family-api.js +28 -0
  13. package/lib/api/equipment-family-api.js.map +1 -0
  14. package/lib/api/equipment-line-api.d.ts +4 -0
  15. package/lib/api/equipment-line-api.js +38 -0
  16. package/lib/api/equipment-line-api.js.map +1 -0
  17. package/lib/api/equipment-picture-api.d.ts +14 -0
  18. package/lib/api/equipment-picture-api.js +56 -0
  19. package/lib/api/equipment-picture-api.js.map +1 -0
  20. package/lib/api/index.d.ts +9 -0
  21. package/lib/api/index.js +27 -0
  22. package/lib/api/index.js.map +1 -0
  23. package/lib/api/intervention-api.d.ts +34 -0
  24. package/lib/api/intervention-api.js +149 -0
  25. package/lib/api/intervention-api.js.map +1 -0
  26. package/lib/api/intervention-note-api.d.ts +19 -0
  27. package/lib/api/intervention-note-api.js +79 -0
  28. package/lib/api/intervention-note-api.js.map +1 -0
  29. package/lib/api/question-api.d.ts +14 -0
  30. package/lib/api/question-api.js +78 -0
  31. package/lib/api/question-api.js.map +1 -0
  32. package/lib/components/atoms/EquipmentCard/EquipmentCard.d.ts +11 -0
  33. package/lib/components/atoms/EquipmentCard/EquipmentCard.js +65 -0
  34. package/lib/components/atoms/EquipmentCard/EquipmentCard.js.map +1 -0
  35. package/lib/components/atoms/EquipmentLineCard/EquipmentLineCard.d.ts +12 -0
  36. package/lib/components/atoms/EquipmentLineCard/EquipmentLineCard.js +42 -0
  37. package/lib/components/atoms/EquipmentLineCard/EquipmentLineCard.js.map +1 -0
  38. package/lib/components/atoms/InterventionCard/InterventionCard.d.ts +15 -0
  39. package/lib/components/atoms/InterventionCard/InterventionCard.js +97 -0
  40. package/lib/components/atoms/InterventionCard/InterventionCard.js.map +1 -0
  41. package/lib/components/atoms/NoteCard/NoteCard.d.ts +12 -0
  42. package/lib/components/atoms/NoteCard/NoteCard.js +65 -0
  43. package/lib/components/atoms/NoteCard/NoteCard.js.map +1 -0
  44. package/lib/components/atoms/PictureCard/PictureCard.d.ts +10 -0
  45. package/lib/components/atoms/PictureCard/PictureCard.js +71 -0
  46. package/lib/components/atoms/PictureCard/PictureCard.js.map +1 -0
  47. package/lib/components/atoms/QuestionCard/QuestionCard.d.ts +10 -0
  48. package/lib/components/atoms/QuestionCard/QuestionCard.js +67 -0
  49. package/lib/components/atoms/QuestionCard/QuestionCard.js.map +1 -0
  50. package/lib/components/atoms/index.d.ts +6 -0
  51. package/lib/components/atoms/index.js +24 -0
  52. package/lib/components/atoms/index.js.map +1 -0
  53. package/lib/components/index.d.ts +5 -0
  54. package/lib/components/index.js +23 -0
  55. package/lib/components/index.js.map +1 -0
  56. package/lib/components/molecules/DropdownGeneralView/DropdownGeneralView.d.ts +9 -0
  57. package/lib/components/molecules/DropdownGeneralView/DropdownGeneralView.js +32 -0
  58. package/lib/components/molecules/DropdownGeneralView/DropdownGeneralView.js.map +1 -0
  59. package/lib/components/molecules/EquipmentActionCard/EquipmentActionCard.d.ts +19 -0
  60. package/lib/components/molecules/EquipmentActionCard/EquipmentActionCard.js +77 -0
  61. package/lib/components/molecules/EquipmentActionCard/EquipmentActionCard.js.map +1 -0
  62. package/lib/components/molecules/EquipmentDetailsHeader/EquipmentDetailsHeader.d.ts +3 -0
  63. package/lib/components/molecules/EquipmentDetailsHeader/EquipmentDetailsHeader.js +48 -0
  64. package/lib/components/molecules/EquipmentDetailsHeader/EquipmentDetailsHeader.js.map +1 -0
  65. package/lib/components/molecules/GtCard/GtCard.d.ts +11 -0
  66. package/lib/components/molecules/GtCard/GtCard.js +76 -0
  67. package/lib/components/molecules/GtCard/GtCard.js.map +1 -0
  68. package/lib/components/molecules/InterventionDetailCard/InterventionDetailCard.d.ts +19 -0
  69. package/lib/components/molecules/InterventionDetailCard/InterventionDetailCard.js +52 -0
  70. package/lib/components/molecules/InterventionDetailCard/InterventionDetailCard.js.map +1 -0
  71. package/lib/components/molecules/InterventionHeader/InterventionHeader.d.ts +6 -0
  72. package/lib/components/molecules/InterventionHeader/InterventionHeader.js +52 -0
  73. package/lib/components/molecules/InterventionHeader/InterventionHeader.js.map +1 -0
  74. package/lib/components/molecules/NoteDetailCard/NoteDetailCard.d.ts +19 -0
  75. package/lib/components/molecules/NoteDetailCard/NoteDetailCard.js +68 -0
  76. package/lib/components/molecules/NoteDetailCard/NoteDetailCard.js.map +1 -0
  77. package/lib/components/molecules/PicturesRow/PicturesRow.d.ts +10 -0
  78. package/lib/components/molecules/PicturesRow/PicturesRow.js +36 -0
  79. package/lib/components/molecules/PicturesRow/PicturesRow.js.map +1 -0
  80. package/lib/components/molecules/QuestionAdvancedMonitoring/QuestionAdvancedMonitoring.d.ts +9 -0
  81. package/lib/components/molecules/QuestionAdvancedMonitoring/QuestionAdvancedMonitoring.js +31 -0
  82. package/lib/components/molecules/QuestionAdvancedMonitoring/QuestionAdvancedMonitoring.js.map +1 -0
  83. package/lib/components/molecules/QuestionCheckbox/QuestionCheckbox.d.ts +7 -0
  84. package/lib/components/molecules/QuestionCheckbox/QuestionCheckbox.js +36 -0
  85. package/lib/components/molecules/QuestionCheckbox/QuestionCheckbox.js.map +1 -0
  86. package/lib/components/molecules/QuestionList/QuestionList.d.ts +9 -0
  87. package/lib/components/molecules/QuestionList/QuestionList.js +29 -0
  88. package/lib/components/molecules/QuestionList/QuestionList.js.map +1 -0
  89. package/lib/components/molecules/QuestionMeasure/QuestionMeasure.d.ts +9 -0
  90. package/lib/components/molecules/QuestionMeasure/QuestionMeasure.js +39 -0
  91. package/lib/components/molecules/QuestionMeasure/QuestionMeasure.js.map +1 -0
  92. package/lib/components/molecules/index.d.ts +12 -0
  93. package/lib/components/molecules/index.js +30 -0
  94. package/lib/components/molecules/index.js.map +1 -0
  95. package/lib/components/organisms/ClientProspectSearchBar/ClientProspectSearchBar.d.ts +4 -0
  96. package/lib/components/organisms/ClientProspectSearchBar/ClientProspectSearchBar.js +32 -0
  97. package/lib/components/organisms/ClientProspectSearchBar/ClientProspectSearchBar.js.map +1 -0
  98. package/lib/components/organisms/ContractSearchBar/ContractSearchBar.d.ts +4 -0
  99. package/lib/components/organisms/ContractSearchBar/ContractSearchBar.js +35 -0
  100. package/lib/components/organisms/ContractSearchBar/ContractSearchBar.js.map +1 -0
  101. package/lib/components/organisms/DropdownCards/DropdownCards.d.ts +6 -0
  102. package/lib/components/organisms/DropdownCards/DropdownCards.js +45 -0
  103. package/lib/components/organisms/DropdownCards/DropdownCards.js.map +1 -0
  104. package/lib/components/organisms/EquipmentFamilySearchBar/EquipmentFamilySearchBar.d.ts +4 -0
  105. package/lib/components/organisms/EquipmentFamilySearchBar/EquipmentFamilySearchBar.js +35 -0
  106. package/lib/components/organisms/EquipmentFamilySearchBar/EquipmentFamilySearchBar.js.map +1 -0
  107. package/lib/components/organisms/EquipmentModeSwitch/EquipmentModeSwitch.d.ts +5 -0
  108. package/lib/components/organisms/EquipmentModeSwitch/EquipmentModeSwitch.js +50 -0
  109. package/lib/components/organisms/EquipmentModeSwitch/EquipmentModeSwitch.js.map +1 -0
  110. package/lib/components/organisms/InterventionNoteTypePicker/InterventionNoteTypePicker.d.ts +8 -0
  111. package/lib/components/organisms/InterventionNoteTypePicker/InterventionNoteTypePicker.js +32 -0
  112. package/lib/components/organisms/InterventionNoteTypePicker/InterventionNoteTypePicker.js.map +1 -0
  113. package/lib/components/organisms/PlaceEquipmentSearchBar/PlaceEquipmentSearchBar.d.ts +4 -0
  114. package/lib/components/organisms/PlaceEquipmentSearchBar/PlaceEquipmentSearchBar.js +36 -0
  115. package/lib/components/organisms/PlaceEquipmentSearchBar/PlaceEquipmentSearchBar.js.map +1 -0
  116. package/lib/components/organisms/TypePicker/TypePicker.d.ts +4 -0
  117. package/lib/components/organisms/TypePicker/TypePicker.js +29 -0
  118. package/lib/components/organisms/TypePicker/TypePicker.js.map +1 -0
  119. package/lib/components/organisms/index.d.ts +8 -0
  120. package/lib/components/organisms/index.js +26 -0
  121. package/lib/components/organisms/index.js.map +1 -0
  122. package/lib/components/pages/EquipmentView/EquipmentView.d.ts +3 -0
  123. package/lib/components/pages/EquipmentView/EquipmentView.js +161 -0
  124. package/lib/components/pages/EquipmentView/EquipmentView.js.map +1 -0
  125. package/lib/components/pages/GeneralInformationView/GeneralInformationView.d.ts +3 -0
  126. package/lib/components/pages/GeneralInformationView/GeneralInformationView.js +94 -0
  127. package/lib/components/pages/GeneralInformationView/GeneralInformationView.js.map +1 -0
  128. package/lib/components/pages/HistoryView/HistoryView.d.ts +3 -0
  129. package/lib/components/pages/HistoryView/HistoryView.js +33 -0
  130. package/lib/components/pages/HistoryView/HistoryView.js.map +1 -0
  131. package/lib/components/pages/NoteView/NoteView.d.ts +3 -0
  132. package/lib/components/pages/NoteView/NoteView.js +47 -0
  133. package/lib/components/pages/NoteView/NoteView.js.map +1 -0
  134. package/lib/components/pages/SurveyView/SurveyView.d.ts +7 -0
  135. package/lib/components/pages/SurveyView/SurveyView.js +60 -0
  136. package/lib/components/pages/SurveyView/SurveyView.js.map +1 -0
  137. package/lib/components/pages/index.d.ts +5 -0
  138. package/lib/components/pages/index.js +23 -0
  139. package/lib/components/pages/index.js.map +1 -0
  140. package/lib/components/templates/InterventionsListView/InterventionsListView.d.ts +7 -0
  141. package/lib/components/templates/InterventionsListView/InterventionsListView.js +73 -0
  142. package/lib/components/templates/InterventionsListView/InterventionsListView.js.map +1 -0
  143. package/lib/components/templates/LinkEquipmentPopup/LinkEquipmentPopup.d.ts +7 -0
  144. package/lib/components/templates/LinkEquipmentPopup/LinkEquipmentPopup.js +70 -0
  145. package/lib/components/templates/LinkEquipmentPopup/LinkEquipmentPopup.js.map +1 -0
  146. package/lib/components/templates/SurveyRangeNavigation/SurveyRangeNavigation.d.ts +7 -0
  147. package/lib/components/templates/SurveyRangeNavigation/SurveyRangeNavigation.js +76 -0
  148. package/lib/components/templates/SurveyRangeNavigation/SurveyRangeNavigation.js.map +1 -0
  149. package/lib/components/templates/index.d.ts +3 -0
  150. package/lib/components/templates/index.js +21 -0
  151. package/lib/components/templates/index.js.map +1 -0
  152. package/lib/features/asyncFunctions-index.d.ts +9 -0
  153. package/lib/features/asyncFunctions-index.js +27 -0
  154. package/lib/features/asyncFunctions-index.js.map +1 -0
  155. package/lib/features/clientAndProspectSlice.d.ts +7 -0
  156. package/lib/features/clientAndProspectSlice.js +49 -0
  157. package/lib/features/clientAndProspectSlice.js.map +1 -0
  158. package/lib/features/contractSlice.d.ts +7 -0
  159. package/lib/features/contractSlice.js +49 -0
  160. package/lib/features/contractSlice.js.map +1 -0
  161. package/lib/features/equipmentFamilySlice.d.ts +7 -0
  162. package/lib/features/equipmentFamilySlice.js +49 -0
  163. package/lib/features/equipmentFamilySlice.js.map +1 -0
  164. package/lib/features/equipmentLineSlice.d.ts +7 -0
  165. package/lib/features/equipmentLineSlice.js +49 -0
  166. package/lib/features/equipmentLineSlice.js.map +1 -0
  167. package/lib/features/equipmentPictureSlice.d.ts +37 -0
  168. package/lib/features/equipmentPictureSlice.js +67 -0
  169. package/lib/features/equipmentPictureSlice.js.map +1 -0
  170. package/lib/features/equipmentSlice.d.ts +34 -0
  171. package/lib/features/equipmentSlice.js +205 -0
  172. package/lib/features/equipmentSlice.js.map +1 -0
  173. package/lib/features/index.d.ts +9 -0
  174. package/lib/features/index.js +27 -0
  175. package/lib/features/index.js.map +1 -0
  176. package/lib/features/interventionNoteSlice.d.ts +16 -0
  177. package/lib/features/interventionNoteSlice.js +114 -0
  178. package/lib/features/interventionNoteSlice.js.map +1 -0
  179. package/lib/features/interventionSlice.d.ts +21 -0
  180. package/lib/features/interventionSlice.js +140 -0
  181. package/lib/features/interventionSlice.js.map +1 -0
  182. package/lib/features/questionSlice.d.ts +14 -0
  183. package/lib/features/questionSlice.js +104 -0
  184. package/lib/features/questionSlice.js.map +1 -0
  185. package/lib/hooks/use-intervention-header-actions.d.ts +1 -0
  186. package/lib/hooks/use-intervention-header-actions.js +141 -0
  187. package/lib/hooks/use-intervention-header-actions.js.map +1 -0
  188. package/lib/i18n/en.json +106 -0
  189. package/lib/i18n/fr.json +106 -0
  190. package/lib/index.d.ts +7 -0
  191. package/lib/index.js +94 -0
  192. package/lib/index.js.map +1 -0
  193. package/lib/models/forms.d.ts +2 -0
  194. package/lib/models/forms.js +333 -0
  195. package/lib/models/forms.js.map +1 -0
  196. package/lib/models/index.d.ts +5 -0
  197. package/lib/models/index.js +23 -0
  198. package/lib/models/index.js.map +1 -0
  199. package/lib/models/objectFields.d.ts +2 -0
  200. package/lib/models/objectFields.js +143 -0
  201. package/lib/models/objectFields.js.map +1 -0
  202. package/lib/models/searchFields.d.ts +2 -0
  203. package/lib/models/searchFields.js +33 -0
  204. package/lib/models/searchFields.js.map +1 -0
  205. package/lib/models/sortFields.d.ts +2 -0
  206. package/lib/models/sortFields.js +28 -0
  207. package/lib/models/sortFields.js.map +1 -0
  208. package/lib/models/typeObjects.d.ts +2 -0
  209. package/lib/models/typeObjects.js +205 -0
  210. package/lib/models/typeObjects.js.map +1 -0
  211. package/lib/screens/equipment/CustomerParkScreen.d.ts +3 -0
  212. package/lib/screens/equipment/CustomerParkScreen.js +56 -0
  213. package/lib/screens/equipment/CustomerParkScreen.js.map +1 -0
  214. package/lib/screens/equipment/EquipmentFormView.d.ts +6 -0
  215. package/lib/screens/equipment/EquipmentFormView.js +104 -0
  216. package/lib/screens/equipment/EquipmentFormView.js.map +1 -0
  217. package/lib/screens/equipment/EquipmentInterventionListScreen.d.ts +3 -0
  218. package/lib/screens/equipment/EquipmentInterventionListScreen.js +43 -0
  219. package/lib/screens/equipment/EquipmentInterventionListScreen.js.map +1 -0
  220. package/lib/screens/equipment/EquipmentLineListScreen.d.ts +3 -0
  221. package/lib/screens/equipment/EquipmentLineListScreen.js +37 -0
  222. package/lib/screens/equipment/EquipmentLineListScreen.js.map +1 -0
  223. package/lib/screens/equipment/EquipmentPictureScreen.d.ts +3 -0
  224. package/lib/screens/equipment/EquipmentPictureScreen.js +113 -0
  225. package/lib/screens/equipment/EquipmentPictureScreen.js.map +1 -0
  226. package/lib/screens/equipment/index.d.ts +45 -0
  227. package/lib/screens/equipment/index.js +61 -0
  228. package/lib/screens/equipment/index.js.map +1 -0
  229. package/lib/screens/intervention/ActiveInterventionScreen.d.ts +3 -0
  230. package/lib/screens/intervention/ActiveInterventionScreen.js +72 -0
  231. package/lib/screens/intervention/ActiveInterventionScreen.js.map +1 -0
  232. package/lib/screens/intervention/DayInterventionsScreen.d.ts +3 -0
  233. package/lib/screens/intervention/DayInterventionsScreen.js +33 -0
  234. package/lib/screens/intervention/DayInterventionsScreen.js.map +1 -0
  235. package/lib/screens/intervention/InterventionDetailsScreen.d.ts +7 -0
  236. package/lib/screens/intervention/InterventionDetailsScreen.js +83 -0
  237. package/lib/screens/intervention/InterventionDetailsScreen.js.map +1 -0
  238. package/lib/screens/intervention/InterventionNoteFormScreen.d.ts +6 -0
  239. package/lib/screens/intervention/InterventionNoteFormScreen.js +81 -0
  240. package/lib/screens/intervention/InterventionNoteFormScreen.js.map +1 -0
  241. package/lib/screens/intervention/InterventionQuestionFormScreen.d.ts +6 -0
  242. package/lib/screens/intervention/InterventionQuestionFormScreen.js +114 -0
  243. package/lib/screens/intervention/InterventionQuestionFormScreen.js.map +1 -0
  244. package/lib/screens/intervention/InterventionsHistoryScreen.d.ts +3 -0
  245. package/lib/screens/intervention/InterventionsHistoryScreen.js +29 -0
  246. package/lib/screens/intervention/InterventionsHistoryScreen.js.map +1 -0
  247. package/lib/screens/intervention/PlannedInterventionsScreen.d.ts +3 -0
  248. package/lib/screens/intervention/PlannedInterventionsScreen.js +29 -0
  249. package/lib/screens/intervention/PlannedInterventionsScreen.js.map +1 -0
  250. package/lib/screens/intervention/index.d.ts +79 -0
  251. package/lib/screens/intervention/index.js +89 -0
  252. package/lib/screens/intervention/index.js.map +1 -0
  253. package/lib/types/equipment.d.ts +7 -0
  254. package/lib/types/equipment.js +25 -0
  255. package/lib/types/equipment.js.map +1 -0
  256. package/lib/types/index.d.ts +3 -0
  257. package/lib/types/index.js +21 -0
  258. package/lib/types/index.js.map +1 -0
  259. package/lib/types/intervention.d.ts +4 -0
  260. package/lib/types/intervention.js +38 -0
  261. package/lib/types/intervention.js.map +1 -0
  262. package/lib/types/question.d.ts +4 -0
  263. package/lib/types/question.js +44 -0
  264. package/lib/types/question.js.map +1 -0
  265. package/lib/utils/form-types.d.ts +9 -0
  266. package/lib/utils/form-types.js +19 -0
  267. package/lib/utils/form-types.js.map +1 -0
  268. package/lib/utils/index.d.ts +1 -0
  269. package/lib/utils/index.js +19 -0
  270. package/lib/utils/index.js.map +1 -0
  271. package/package.json +47 -0
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Intervention
3
+ tags: Readme
4
+ ---
5
+
6
+ <h1 align="center">@axelor/aos-mobile-intervention</h1>
7
+
8
+ <div align="center">
9
+ <img src="https://i.imgur.com/KJAAFlT.png" width="30%"/>
10
+ </div>
11
+
12
+ ## Presentation
13
+
14
+ This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
15
+
16
+ The purpose of this package is to link with the intervention module of the [Axelor Open Suite (AOS)](https://github.com/axelor/axelor-open-suite) ERP. It provides a simplified version of a number of processes available on the webapp. This package is compatible with AOS from version 8.1.0.
17
+
18
+ ## Usage
19
+
20
+ Install the library :
21
+
22
+ ```bash
23
+ yarn add @axelor/aos-mobile-intervention
24
+ ```
25
+
26
+ Compatibility with React v18.2.x and React Native v0.70.x.
27
+
28
+ To add this package in your application, you need to add it in the _modules_ props of the component `Application` from @axelor/aos-mobile-core package.
29
+
30
+ ```typescript
31
+ import React from 'react';
32
+ import {Application} from '@axelor/aos-mobile-core';
33
+ import {InterventionModule} from '@axelor/aos-mobile-intervention';
34
+
35
+ const App = () => {
36
+ return (
37
+ <Application modules={[InterventionModule]} mainMenu="auth_menu_user" />
38
+ );
39
+ };
40
+
41
+ export default App;
42
+ ```
43
+
44
+ ## Developpment
45
+
46
+ This package is developed as part of the Axelor Open Mobile application. To contribute, please go to the [Github project](https://github.com/axelor/axelor-mobile) and follow the guidelines. You will also find an installation guide to help you configure your environment.
@@ -0,0 +1,4 @@
1
+ export function searchClientAndProspect({ searchValue, page }: {
2
+ searchValue: any;
3
+ page?: number;
4
+ }): Promise<any>;
@@ -0,0 +1,57 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
19
+ const createClientAndProspectCriteria = searchValue => {
20
+ return [
21
+ {
22
+ operator: 'and',
23
+ criteria: [
24
+ {
25
+ fieldName: 'isContact',
26
+ operator: '=',
27
+ value: false,
28
+ },
29
+ {
30
+ operator: 'or',
31
+ criteria: [
32
+ {
33
+ fieldName: 'isCustomer',
34
+ operator: '=',
35
+ value: true,
36
+ },
37
+ {
38
+ fieldName: 'isProspect',
39
+ operator: '=',
40
+ value: true,
41
+ },
42
+ ],
43
+ },
44
+ ],
45
+ },
46
+ getSearchCriterias('intervention_partner', searchValue),
47
+ ];
48
+ };
49
+ export async function searchClientAndProspect({ searchValue, page = 0 }) {
50
+ return createStandardSearch({
51
+ model: 'com.axelor.apps.base.db.Partner',
52
+ criteria: createClientAndProspectCriteria(searchValue),
53
+ fieldKey: 'intervention_partner',
54
+ page,
55
+ });
56
+ }
57
+ //# sourceMappingURL=client-and-prospect-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-and-prospect-api.js","sourceRoot":"","sources":["../../src/api/client-and-prospect-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,+BAA+B,GAAG,WAAW,CAAC,EAAE;IACpD,OAAO;QACL;YACE,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE;gBACR;oBACE,SAAS,EAAE,WAAW;oBACtB,QAAQ,EAAE,GAAG;oBACb,KAAK,EAAE,KAAK;iBACb;gBACD;oBACE,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE;wBACR;4BACE,SAAS,EAAE,YAAY;4BACvB,QAAQ,EAAE,GAAG;4BACb,KAAK,EAAE,IAAI;yBACZ;wBACD;4BACE,SAAS,EAAE,YAAY;4BACvB,QAAQ,EAAE,GAAG;4BACb,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF;aACF;SACF;QACD,kBAAkB,CAAC,sBAAsB,EAAE,WAAW,CAAC;KACxD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAAC,WAAW,EAAE,IAAI,GAAG,CAAC,EAAC;IACnE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,iCAAiC;QACxC,QAAQ,EAAE,+BAA+B,CAAC,WAAW,CAAC;QACtD,QAAQ,EAAE,sBAAsB;QAChC,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export function searchContract({ page, partnerId, searchValue }: {
2
+ page: any;
3
+ partnerId: any;
4
+ searchValue: any;
5
+ }): Promise<any>;
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
19
+ const VALIDATED_CONTRACT_STATUS = 3;
20
+ const createContractCriteria = ({ partnerId, searchValue }) => {
21
+ const criteria = [
22
+ getSearchCriterias('intervention_contract', searchValue),
23
+ {
24
+ fieldName: 'currentContractVersion.statusSelect',
25
+ operator: '=',
26
+ value: VALIDATED_CONTRACT_STATUS,
27
+ },
28
+ {
29
+ fieldName: 'partner.id',
30
+ operator: '=',
31
+ value: partnerId,
32
+ },
33
+ ];
34
+ return criteria;
35
+ };
36
+ export async function searchContract({ page, partnerId, searchValue }) {
37
+ return createStandardSearch({
38
+ model: 'com.axelor.apps.contract.db.Contract',
39
+ criteria: createContractCriteria({ partnerId, searchValue }),
40
+ fieldKey: 'intervention_contract',
41
+ sortKey: 'intervention_contract',
42
+ page: page,
43
+ });
44
+ }
45
+ //# sourceMappingURL=contract-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-api.js","sourceRoot":"","sources":["../../src/api/contract-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAEpC,MAAM,sBAAsB,GAAG,CAAC,EAAC,SAAS,EAAE,WAAW,EAAC,EAAE,EAAE;IAC1D,MAAM,QAAQ,GAAG;QACf,kBAAkB,CAAC,uBAAuB,EAAE,WAAW,CAAC;QACxD;YACE,SAAS,EAAE,qCAAqC;YAChD,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,yBAAyB;SACjC;QACD;YACE,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS;SACjB;KACF,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,WAAW,EAAC;IACjE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,sCAAsC;QAC7C,QAAQ,EAAE,sBAAsB,CAAC,EAAC,SAAS,EAAE,WAAW,EAAC,CAAC;QAC1D,QAAQ,EAAE,uBAAuB;QACjC,OAAO,EAAE,uBAAuB;QAChC,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,43 @@
1
+ export function searchEquipment({ searchValue, page, inService, partnerId, parentPlaceId, noParent, isCountFetch, }: {
2
+ searchValue?: any;
3
+ page?: number;
4
+ inService: any;
5
+ partnerId: any;
6
+ parentPlaceId: any;
7
+ noParent?: boolean;
8
+ isCountFetch?: boolean;
9
+ }): Promise<any>;
10
+ export function searchInterventionEquipment({ searchValue, idsInterventionEquipement: equipmentIds, inService, isCountFetch, page, }: {
11
+ searchValue: any;
12
+ idsInterventionEquipement: any;
13
+ inService: any;
14
+ isCountFetch?: boolean;
15
+ page?: number;
16
+ }): Promise<any>;
17
+ export function searchPlaceEquipment({ searchValue, page, partnerId }: {
18
+ searchValue: any;
19
+ page?: number;
20
+ partnerId: any;
21
+ }): Promise<any>;
22
+ export function getEquipmentById({ equipmentId }: {
23
+ equipmentId: any;
24
+ }): Promise<any>;
25
+ export function saveEquipment({ equipment }: {
26
+ equipment: any;
27
+ }): Promise<any>;
28
+ export function archiveEquipment({ equipmentId, equipmentVersion }: {
29
+ equipmentId: any;
30
+ equipmentVersion: any;
31
+ }): Promise<any>;
32
+ export function copyEquipment({ equipmentId }: {
33
+ equipmentId: any;
34
+ }): Promise<any>;
35
+ export function deleteEquipment({ equipmentId }: {
36
+ equipmentId: any;
37
+ }): Promise<any>;
38
+ export function searchEquipmentToLink({ page, searchValue, equipmentSet, partnerId, }: {
39
+ page?: number;
40
+ searchValue: any;
41
+ equipmentSet: any;
42
+ partnerId: any;
43
+ }): Promise<any>;
@@ -0,0 +1,212 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { axiosApiProvider, createStandardFetch, createStandardSearch, getSearchCriterias, getTypes, } from '@axelor/aos-mobile-core';
19
+ const createEquipmentsCriteria = ({ searchValue, inService, partnerId, isPlaceEquipment = null, parentPlaceId, noParent, }) => {
20
+ const Equipment = getTypes().Equipment;
21
+ const criteria = [
22
+ {
23
+ fieldName: 'partner.id',
24
+ operator: '=',
25
+ value: partnerId,
26
+ },
27
+ getSearchCriterias('intervention_equipment', searchValue),
28
+ ];
29
+ if (inService != null) {
30
+ criteria.push({
31
+ fieldName: 'inService',
32
+ operator: inService ? '=' : '!=',
33
+ value: true,
34
+ });
35
+ }
36
+ if (isPlaceEquipment != null) {
37
+ criteria.push({
38
+ fieldName: 'typeSelect',
39
+ operator: '=',
40
+ value: isPlaceEquipment
41
+ ? Equipment?.typeSelect.Place
42
+ : Equipment?.typeSelect.Equipment,
43
+ });
44
+ }
45
+ if (parentPlaceId != null) {
46
+ criteria.push({
47
+ fieldName: 'parentEquipment.id',
48
+ operator: '=',
49
+ value: parentPlaceId,
50
+ });
51
+ }
52
+ if (noParent) {
53
+ criteria.push({
54
+ fieldName: 'parentEquipment',
55
+ operator: 'isNull',
56
+ });
57
+ }
58
+ return criteria;
59
+ };
60
+ const createInterventionEquipmentCriteria = ({ searchValue, idsInterventionEquipement, inService, }) => {
61
+ const criteria = [getSearchCriterias('intervention_equipment', searchValue)];
62
+ criteria.push({
63
+ fieldName: 'id',
64
+ operator: 'in',
65
+ value: idsInterventionEquipement,
66
+ });
67
+ if (inService != null) {
68
+ criteria.push({
69
+ fieldName: 'inService',
70
+ operator: inService ? '=' : '!=',
71
+ value: true,
72
+ });
73
+ }
74
+ return criteria;
75
+ };
76
+ export async function searchEquipment({ searchValue = null, page = 0, inService, partnerId, parentPlaceId, noParent = false, isCountFetch = false, }) {
77
+ return createStandardSearch({
78
+ model: 'com.axelor.apps.intervention.db.Equipment',
79
+ criteria: createEquipmentsCriteria({
80
+ searchValue,
81
+ inService,
82
+ partnerId,
83
+ parentPlaceId,
84
+ noParent,
85
+ }),
86
+ fieldKey: 'intervention_equipment',
87
+ sortKey: 'intervention_equipment',
88
+ page,
89
+ numberElementsByPage: isCountFetch ? 0 : 10,
90
+ });
91
+ }
92
+ export async function searchInterventionEquipment({ searchValue, idsInterventionEquipement: equipmentIds, inService, isCountFetch = false, page = 0, }) {
93
+ if (!Array.isArray(equipmentIds) || equipmentIds.length === 0) {
94
+ return { data: { data: [], total: 0 } };
95
+ }
96
+ return createStandardSearch({
97
+ model: 'com.axelor.apps.intervention.db.Equipment',
98
+ criteria: createInterventionEquipmentCriteria({
99
+ searchValue,
100
+ idsInterventionEquipement: equipmentIds,
101
+ inService,
102
+ }),
103
+ fieldKey: 'intervention_equipment',
104
+ sortKey: 'intervention_equipment',
105
+ page,
106
+ numberElementsByPage: isCountFetch ? 0 : 10,
107
+ });
108
+ }
109
+ export async function searchPlaceEquipment({ searchValue, page = 0, partnerId }) {
110
+ return createStandardSearch({
111
+ model: 'com.axelor.apps.intervention.db.Equipment',
112
+ criteria: createEquipmentsCriteria({
113
+ searchValue,
114
+ partnerId,
115
+ isPlaceEquipment: true,
116
+ }),
117
+ fieldKey: 'intervention_equipment',
118
+ sortKey: 'intervention_equipment',
119
+ page,
120
+ });
121
+ }
122
+ export async function getEquipmentById({ equipmentId }) {
123
+ return createStandardFetch({
124
+ model: 'com.axelor.apps.intervention.db.Equipment',
125
+ id: equipmentId,
126
+ fieldKey: 'intervention_equipment',
127
+ });
128
+ }
129
+ export async function saveEquipment({ equipment }) {
130
+ return axiosApiProvider.post({
131
+ url: '/ws/rest/com.axelor.apps.intervention.db.Equipment',
132
+ data: {
133
+ data: equipment,
134
+ },
135
+ });
136
+ }
137
+ export async function archiveEquipment({ equipmentId, equipmentVersion }) {
138
+ return axiosApiProvider.post({
139
+ url: '/ws/rest/com.axelor.apps.intervention.db.Equipment/',
140
+ data: {
141
+ data: {
142
+ id: equipmentId,
143
+ version: equipmentVersion,
144
+ archived: true,
145
+ },
146
+ },
147
+ });
148
+ }
149
+ export async function copyEquipment({ equipmentId }) {
150
+ return axiosApiProvider
151
+ .get({
152
+ url: `/ws/rest/com.axelor.apps.intervention.db.Equipment/${equipmentId}/copy`,
153
+ })
154
+ .catch(error => {
155
+ throw new Error(error);
156
+ })
157
+ .then(({ data }) => {
158
+ const equipment = Array.isArray(data?.data) ? data.data[0] : null;
159
+ if (equipment != null) {
160
+ return saveEquipment({ equipment });
161
+ }
162
+ return null;
163
+ });
164
+ }
165
+ export async function deleteEquipment({ equipmentId }) {
166
+ return axiosApiProvider.delete({
167
+ url: `/ws/rest/com.axelor.apps.intervention.db.Equipment/${equipmentId}`,
168
+ });
169
+ }
170
+ const createInterventionEquipmentToLinkCriteria = ({ searchValue, equipmentSet, partnerId, }) => {
171
+ const Equipment = getTypes().Equipment;
172
+ const criteria = [
173
+ getSearchCriterias('intervention_equipment', searchValue),
174
+ {
175
+ fieldName: 'partner.id',
176
+ operator: '=',
177
+ value: partnerId,
178
+ },
179
+ {
180
+ fieldName: 'typeSelect',
181
+ operator: '=',
182
+ value: Equipment?.typeSelect.Equipment,
183
+ },
184
+ ];
185
+ if (Array.isArray(equipmentSet) && equipmentSet.length > 0) {
186
+ criteria.push({
187
+ operator: 'not',
188
+ criteria: [
189
+ {
190
+ fieldName: 'id',
191
+ operator: 'in',
192
+ value: equipmentSet,
193
+ },
194
+ ],
195
+ });
196
+ }
197
+ return criteria;
198
+ };
199
+ export async function searchEquipmentToLink({ page = 0, searchValue, equipmentSet, partnerId, }) {
200
+ return createStandardSearch({
201
+ model: 'com.axelor.apps.intervention.db.Equipment',
202
+ criteria: createInterventionEquipmentToLinkCriteria({
203
+ searchValue,
204
+ equipmentSet,
205
+ partnerId,
206
+ }),
207
+ fieldKey: 'intervention_equipment',
208
+ sortKey: 'intervention_equipment',
209
+ page,
210
+ });
211
+ }
212
+ //# sourceMappingURL=equipment-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equipment-api.js","sourceRoot":"","sources":["../../src/api/equipment-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,GACT,MAAM,yBAAyB,CAAC;AAEjC,MAAM,wBAAwB,GAAG,CAAC,EAChC,WAAW,EACX,SAAS,EACT,SAAS,EACT,gBAAgB,GAAG,IAAI,EACvB,aAAa,EACb,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,SAAS,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C,SAAS;SACvC;KACF,CAAC;IAEF,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;QAC1D,QAAQ,CAAC,IAAI,CAAC;YACZ,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE;gBACR;oBACE,SAAS,EAAE,IAAI;oBACf,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,YAAY;iBACpB;aACF;SACF,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,EAC1C,IAAI,GAAG,CAAC,EACR,WAAW,EACX,YAAY,EACZ,SAAS,GACV;IACC,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,2CAA2C;QAClD,QAAQ,EAAE,yCAAyC,CAAC;YAClD,WAAW;YACX,YAAY;YACZ,SAAS;SACV,CAAC;QACF,QAAQ,EAAE,wBAAwB;QAClC,OAAO,EAAE,wBAAwB;QACjC,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ export function searchEquipmentFamily({ page, searchValue }: {
2
+ page?: number;
3
+ searchValue?: any;
4
+ }): Promise<any>;
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
19
+ export async function searchEquipmentFamily({ page = 0, searchValue = null }) {
20
+ return createStandardSearch({
21
+ model: 'com.axelor.apps.intervention.db.EquipmentFamily',
22
+ criteria: [getSearchCriterias('intervention_equipmentFamily', searchValue)],
23
+ fieldKey: 'intervention_equipmentFamily',
24
+ sortKey: 'intervention_equipmentFamily',
25
+ page: page,
26
+ });
27
+ }
28
+ //# sourceMappingURL=equipment-family-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equipment-family-api.js","sourceRoot":"","sources":["../../src/api/equipment-family-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,EAAC,IAAI,GAAG,CAAC,EAAE,WAAW,GAAG,IAAI,EAAC;IACxE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,iDAAiD;QACxD,QAAQ,EAAE,CAAC,kBAAkB,CAAC,8BAA8B,EAAE,WAAW,CAAC,CAAC;QAC3E,QAAQ,EAAE,8BAA8B;QACxC,OAAO,EAAE,8BAA8B;QACvC,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ export function searchEquipmentLine({ equipmentId, page }: {
2
+ equipmentId: any;
3
+ page?: number;
4
+ }): Promise<any>;
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { createStandardSearch } from '@axelor/aos-mobile-core';
19
+ const createEquipmentLineCriteria = equipmentId => {
20
+ const criteria = [
21
+ {
22
+ fieldName: 'equipment.id',
23
+ operator: '=',
24
+ value: equipmentId,
25
+ },
26
+ ];
27
+ return criteria;
28
+ };
29
+ export async function searchEquipmentLine({ equipmentId, page = 0 }) {
30
+ return createStandardSearch({
31
+ model: 'com.axelor.apps.intervention.db.EquipmentLine',
32
+ criteria: createEquipmentLineCriteria(equipmentId),
33
+ fieldKey: 'intervention_equipmentLine',
34
+ sortKey: 'intervention_equipmentLine',
35
+ page,
36
+ });
37
+ }
38
+ //# sourceMappingURL=equipment-line-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equipment-line-api.js","sourceRoot":"","sources":["../../src/api/equipment-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAE7D,MAAM,2BAA2B,GAAG,WAAW,CAAC,EAAE;IAChD,MAAM,QAAQ,GAAG;QACf;YACE,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,WAAW;SACnB;KACF,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EAAC,WAAW,EAAE,IAAI,GAAG,CAAC,EAAC;IAC/D,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,+CAA+C;QACtD,QAAQ,EAAE,2BAA2B,CAAC,WAAW,CAAC;QAClD,QAAQ,EAAE,4BAA4B;QACtC,OAAO,EAAE,4BAA4B;QACrC,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ export function searchEquipmentPicture({ equipmentId, page }: {
2
+ equipmentId: any;
3
+ page?: number;
4
+ }): Promise<any>;
5
+ export function createEquipmentPicture({ equipmentId, version, metaFileId, }: {
6
+ equipmentId: any;
7
+ version: any;
8
+ metaFileId: any;
9
+ }): Promise<any>;
10
+ export function deleteEquipmentPicture({ equipmentId, version, pictureId, }: {
11
+ equipmentId: any;
12
+ version: any;
13
+ pictureId: any;
14
+ }): Promise<any>;
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { axiosApiProvider, createStandardSearch } from '@axelor/aos-mobile-core';
19
+ const createEquipmentPictureCriteria = equipmentId => {
20
+ const criteria = [
21
+ {
22
+ fieldName: 'equipment.id',
23
+ operator: '=',
24
+ value: equipmentId,
25
+ },
26
+ ];
27
+ return criteria;
28
+ };
29
+ export async function searchEquipmentPicture({ equipmentId, page = 0 }) {
30
+ return createStandardSearch({
31
+ model: 'com.axelor.apps.intervention.db.Picture',
32
+ criteria: createEquipmentPictureCriteria(equipmentId),
33
+ fieldKey: 'intervention_equipmentPicture',
34
+ sortKey: 'intervention_equipmentPicture',
35
+ page,
36
+ });
37
+ }
38
+ export async function createEquipmentPicture({ equipmentId, version, metaFileId, }) {
39
+ return axiosApiProvider.put({
40
+ url: `ws/aos/equipment/add-picture/${equipmentId}`,
41
+ data: {
42
+ pictureId: metaFileId,
43
+ version,
44
+ },
45
+ });
46
+ }
47
+ export async function deleteEquipmentPicture({ equipmentId, version, pictureId, }) {
48
+ return axiosApiProvider.put({
49
+ url: `ws/aos/equipment/remove-picture/${equipmentId}`,
50
+ data: {
51
+ pictureId,
52
+ version,
53
+ },
54
+ });
55
+ }
56
+ //# sourceMappingURL=equipment-picture-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equipment-picture-api.js","sourceRoot":"","sources":["../../src/api/equipment-picture-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAE/E,MAAM,8BAA8B,GAAG,WAAW,CAAC,EAAE;IACnD,MAAM,QAAQ,GAAG;QACf;YACE,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,WAAW;SACnB;KACF,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAAC,WAAW,EAAE,IAAI,GAAG,CAAC,EAAC;IAClE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,yCAAyC;QAChD,QAAQ,EAAE,8BAA8B,CAAC,WAAW,CAAC;QACrD,QAAQ,EAAE,+BAA+B;QACzC,OAAO,EAAE,+BAA+B;QACxC,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,WAAW,EACX,OAAO,EACP,UAAU,GACX;IACC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,gCAAgC,WAAW,EAAE;QAClD,IAAI,EAAE;YACJ,SAAS,EAAE,UAAU;YACrB,OAAO;SACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,WAAW,EACX,OAAO,EACP,SAAS,GACV;IACC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,mCAAmC,WAAW,EAAE;QACrD,IAAI,EAAE;YACJ,SAAS;YACT,OAAO;SACR;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { searchClientAndProspect as searchClientAndProspectApi } from './client-and-prospect-api';
2
+ export { searchContract as searchContractApi } from './contract-api';
3
+ export { archiveEquipment as archiveEquipmentApi, copyEquipment as copyEquipmentApi, deleteEquipment as deleteEquipmentApi, getEquipmentById as getEquipmentByIdApi, saveEquipment as saveEquipmentApi, searchEquipment as searchEquipmentApi, searchEquipmentToLink as searchEquipmentToLinkApi, searchInterventionEquipment as searchInterventionEquipmentApi, searchPlaceEquipment as searchPlaceEquipmentApi, } from './equipment-api';
4
+ export { searchEquipmentFamily as searchEquipmentFamilyApi } from './equipment-family-api';
5
+ export { searchEquipmentLine as searchEquipmentLineApi } from './equipment-line-api';
6
+ export { createEquipmentPicture as createEquipmentPictureApi, deleteEquipmentPicture as deleteEquipmentPictureApi, searchEquipmentPicture as searchEquipmentPictureApi, } from './equipment-picture-api';
7
+ export { fetchActiveIntervention as fetchActiveInterventionApi, fetchIntervention as fetchInterventionApi, fetchInterventionById as fetchInterventionByIdApi, linkEquipment as linkEquipmentApi, searchHistoryInterventionByEquipment as searchHistoryInterventionByEquipmentApi, unlinkEquipment as unlinkEquipmentApi, updateInterventionStatus as updateInterventionStatusApi, } from './intervention-api';
8
+ export { createInterventionNote as createInterventionNoteApi, deleteInterventionNote as deleteInterventionNoteApi, fetchInterventionNote as fetchInterventionNoteApi, fetchInterventionNoteById as fetchInterventionNoteByIdApi, fetchInterventionNoteType as fetchInterventionNoteTypeApi, updateInterventionNote as updateInterventionNoteApi, } from './intervention-note-api';
9
+ export { fetchQuestion as fetchQuestionApi, fetchQuestionById as fetchQuestionByIdApi, fetchRange as fetchRangeApi, updateQuestion as updateQuestionApi, } from './question-api';
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { searchClientAndProspect as searchClientAndProspectApi } from './client-and-prospect-api';
19
+ export { searchContract as searchContractApi } from './contract-api';
20
+ export { archiveEquipment as archiveEquipmentApi, copyEquipment as copyEquipmentApi, deleteEquipment as deleteEquipmentApi, getEquipmentById as getEquipmentByIdApi, saveEquipment as saveEquipmentApi, searchEquipment as searchEquipmentApi, searchEquipmentToLink as searchEquipmentToLinkApi, searchInterventionEquipment as searchInterventionEquipmentApi, searchPlaceEquipment as searchPlaceEquipmentApi, } from './equipment-api';
21
+ export { searchEquipmentFamily as searchEquipmentFamilyApi } from './equipment-family-api';
22
+ export { searchEquipmentLine as searchEquipmentLineApi } from './equipment-line-api';
23
+ export { createEquipmentPicture as createEquipmentPictureApi, deleteEquipmentPicture as deleteEquipmentPictureApi, searchEquipmentPicture as searchEquipmentPictureApi, } from './equipment-picture-api';
24
+ export { fetchActiveIntervention as fetchActiveInterventionApi, fetchIntervention as fetchInterventionApi, fetchInterventionById as fetchInterventionByIdApi, linkEquipment as linkEquipmentApi, searchHistoryInterventionByEquipment as searchHistoryInterventionByEquipmentApi, unlinkEquipment as unlinkEquipmentApi, updateInterventionStatus as updateInterventionStatusApi, } from './intervention-api';
25
+ export { createInterventionNote as createInterventionNoteApi, deleteInterventionNote as deleteInterventionNoteApi, fetchInterventionNote as fetchInterventionNoteApi, fetchInterventionNoteById as fetchInterventionNoteByIdApi, fetchInterventionNoteType as fetchInterventionNoteTypeApi, updateInterventionNote as updateInterventionNoteApi, } from './intervention-note-api';
26
+ export { fetchQuestion as fetchQuestionApi, fetchQuestionById as fetchQuestionByIdApi, fetchRange as fetchRangeApi, updateQuestion as updateQuestionApi, } from './question-api';
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,uBAAuB,IAAI,0BAA0B,EAAC,MAAM,2BAA2B,CAAC;AAChG,OAAO,EAAC,cAAc,IAAI,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,mBAAmB,EACvC,aAAa,IAAI,gBAAgB,EACjC,eAAe,IAAI,kBAAkB,EACrC,gBAAgB,IAAI,mBAAmB,EACvC,aAAa,IAAI,gBAAgB,EACjC,eAAe,IAAI,kBAAkB,EACrC,qBAAqB,IAAI,wBAAwB,EACjD,2BAA2B,IAAI,8BAA8B,EAC7D,oBAAoB,IAAI,uBAAuB,GAChD,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,qBAAqB,IAAI,wBAAwB,EAAC,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAC,mBAAmB,IAAI,sBAAsB,EAAC,MAAM,sBAAsB,CAAC;AACnF,OAAO,EACL,sBAAsB,IAAI,yBAAyB,EACnD,sBAAsB,IAAI,yBAAyB,EACnD,sBAAsB,IAAI,yBAAyB,GACpD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,IAAI,0BAA0B,EACrD,iBAAiB,IAAI,oBAAoB,EACzC,qBAAqB,IAAI,wBAAwB,EACjD,aAAa,IAAI,gBAAgB,EACjC,oCAAoC,IAAI,uCAAuC,EAC/E,eAAe,IAAI,kBAAkB,EACrC,wBAAwB,IAAI,2BAA2B,GACxD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,IAAI,yBAAy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