@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.
- package/README.md +46 -0
- package/lib/api/client-and-prospect-api.d.ts +4 -0
- package/lib/api/client-and-prospect-api.js +57 -0
- package/lib/api/client-and-prospect-api.js.map +1 -0
- package/lib/api/contract-api.d.ts +5 -0
- package/lib/api/contract-api.js +45 -0
- package/lib/api/contract-api.js.map +1 -0
- package/lib/api/equipment-api.d.ts +43 -0
- package/lib/api/equipment-api.js +212 -0
- package/lib/api/equipment-api.js.map +1 -0
- package/lib/api/equipment-family-api.d.ts +4 -0
- package/lib/api/equipment-family-api.js +28 -0
- package/lib/api/equipment-family-api.js.map +1 -0
- package/lib/api/equipment-line-api.d.ts +4 -0
- package/lib/api/equipment-line-api.js +38 -0
- package/lib/api/equipment-line-api.js.map +1 -0
- package/lib/api/equipment-picture-api.d.ts +14 -0
- package/lib/api/equipment-picture-api.js +56 -0
- package/lib/api/equipment-picture-api.js.map +1 -0
- package/lib/api/index.d.ts +9 -0
- package/lib/api/index.js +27 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/intervention-api.d.ts +34 -0
- package/lib/api/intervention-api.js +149 -0
- package/lib/api/intervention-api.js.map +1 -0
- package/lib/api/intervention-note-api.d.ts +19 -0
- package/lib/api/intervention-note-api.js +79 -0
- package/lib/api/intervention-note-api.js.map +1 -0
- package/lib/api/question-api.d.ts +14 -0
- package/lib/api/question-api.js +78 -0
- package/lib/api/question-api.js.map +1 -0
- package/lib/components/atoms/EquipmentCard/EquipmentCard.d.ts +11 -0
- package/lib/components/atoms/EquipmentCard/EquipmentCard.js +65 -0
- package/lib/components/atoms/EquipmentCard/EquipmentCard.js.map +1 -0
- package/lib/components/atoms/EquipmentLineCard/EquipmentLineCard.d.ts +12 -0
- package/lib/components/atoms/EquipmentLineCard/EquipmentLineCard.js +42 -0
- package/lib/components/atoms/EquipmentLineCard/EquipmentLineCard.js.map +1 -0
- package/lib/components/atoms/InterventionCard/InterventionCard.d.ts +15 -0
- package/lib/components/atoms/InterventionCard/InterventionCard.js +97 -0
- package/lib/components/atoms/InterventionCard/InterventionCard.js.map +1 -0
- package/lib/components/atoms/NoteCard/NoteCard.d.ts +12 -0
- package/lib/components/atoms/NoteCard/NoteCard.js +65 -0
- package/lib/components/atoms/NoteCard/NoteCard.js.map +1 -0
- package/lib/components/atoms/PictureCard/PictureCard.d.ts +10 -0
- package/lib/components/atoms/PictureCard/PictureCard.js +71 -0
- package/lib/components/atoms/PictureCard/PictureCard.js.map +1 -0
- package/lib/components/atoms/QuestionCard/QuestionCard.d.ts +10 -0
- package/lib/components/atoms/QuestionCard/QuestionCard.js +67 -0
- package/lib/components/atoms/QuestionCard/QuestionCard.js.map +1 -0
- package/lib/components/atoms/index.d.ts +6 -0
- package/lib/components/atoms/index.js +24 -0
- package/lib/components/atoms/index.js.map +1 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.js +23 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/DropdownGeneralView/DropdownGeneralView.d.ts +9 -0
- package/lib/components/molecules/DropdownGeneralView/DropdownGeneralView.js +32 -0
- package/lib/components/molecules/DropdownGeneralView/DropdownGeneralView.js.map +1 -0
- package/lib/components/molecules/EquipmentActionCard/EquipmentActionCard.d.ts +19 -0
- package/lib/components/molecules/EquipmentActionCard/EquipmentActionCard.js +77 -0
- package/lib/components/molecules/EquipmentActionCard/EquipmentActionCard.js.map +1 -0
- package/lib/components/molecules/EquipmentDetailsHeader/EquipmentDetailsHeader.d.ts +3 -0
- package/lib/components/molecules/EquipmentDetailsHeader/EquipmentDetailsHeader.js +48 -0
- package/lib/components/molecules/EquipmentDetailsHeader/EquipmentDetailsHeader.js.map +1 -0
- package/lib/components/molecules/GtCard/GtCard.d.ts +11 -0
- package/lib/components/molecules/GtCard/GtCard.js +76 -0
- package/lib/components/molecules/GtCard/GtCard.js.map +1 -0
- package/lib/components/molecules/InterventionDetailCard/InterventionDetailCard.d.ts +19 -0
- package/lib/components/molecules/InterventionDetailCard/InterventionDetailCard.js +52 -0
- package/lib/components/molecules/InterventionDetailCard/InterventionDetailCard.js.map +1 -0
- package/lib/components/molecules/InterventionHeader/InterventionHeader.d.ts +6 -0
- package/lib/components/molecules/InterventionHeader/InterventionHeader.js +52 -0
- package/lib/components/molecules/InterventionHeader/InterventionHeader.js.map +1 -0
- package/lib/components/molecules/NoteDetailCard/NoteDetailCard.d.ts +19 -0
- package/lib/components/molecules/NoteDetailCard/NoteDetailCard.js +68 -0
- package/lib/components/molecules/NoteDetailCard/NoteDetailCard.js.map +1 -0
- package/lib/components/molecules/PicturesRow/PicturesRow.d.ts +10 -0
- package/lib/components/molecules/PicturesRow/PicturesRow.js +36 -0
- package/lib/components/molecules/PicturesRow/PicturesRow.js.map +1 -0
- package/lib/components/molecules/QuestionAdvancedMonitoring/QuestionAdvancedMonitoring.d.ts +9 -0
- package/lib/components/molecules/QuestionAdvancedMonitoring/QuestionAdvancedMonitoring.js +31 -0
- package/lib/components/molecules/QuestionAdvancedMonitoring/QuestionAdvancedMonitoring.js.map +1 -0
- package/lib/components/molecules/QuestionCheckbox/QuestionCheckbox.d.ts +7 -0
- package/lib/components/molecules/QuestionCheckbox/QuestionCheckbox.js +36 -0
- package/lib/components/molecules/QuestionCheckbox/QuestionCheckbox.js.map +1 -0
- package/lib/components/molecules/QuestionList/QuestionList.d.ts +9 -0
- package/lib/components/molecules/QuestionList/QuestionList.js +29 -0
- package/lib/components/molecules/QuestionList/QuestionList.js.map +1 -0
- package/lib/components/molecules/QuestionMeasure/QuestionMeasure.d.ts +9 -0
- package/lib/components/molecules/QuestionMeasure/QuestionMeasure.js +39 -0
- package/lib/components/molecules/QuestionMeasure/QuestionMeasure.js.map +1 -0
- package/lib/components/molecules/index.d.ts +12 -0
- package/lib/components/molecules/index.js +30 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/ClientProspectSearchBar/ClientProspectSearchBar.d.ts +4 -0
- package/lib/components/organisms/ClientProspectSearchBar/ClientProspectSearchBar.js +32 -0
- package/lib/components/organisms/ClientProspectSearchBar/ClientProspectSearchBar.js.map +1 -0
- package/lib/components/organisms/ContractSearchBar/ContractSearchBar.d.ts +4 -0
- package/lib/components/organisms/ContractSearchBar/ContractSearchBar.js +35 -0
- package/lib/components/organisms/ContractSearchBar/ContractSearchBar.js.map +1 -0
- package/lib/components/organisms/DropdownCards/DropdownCards.d.ts +6 -0
- package/lib/components/organisms/DropdownCards/DropdownCards.js +45 -0
- package/lib/components/organisms/DropdownCards/DropdownCards.js.map +1 -0
- package/lib/components/organisms/EquipmentFamilySearchBar/EquipmentFamilySearchBar.d.ts +4 -0
- package/lib/components/organisms/EquipmentFamilySearchBar/EquipmentFamilySearchBar.js +35 -0
- package/lib/components/organisms/EquipmentFamilySearchBar/EquipmentFamilySearchBar.js.map +1 -0
- package/lib/components/organisms/EquipmentModeSwitch/EquipmentModeSwitch.d.ts +5 -0
- package/lib/components/organisms/EquipmentModeSwitch/EquipmentModeSwitch.js +50 -0
- package/lib/components/organisms/EquipmentModeSwitch/EquipmentModeSwitch.js.map +1 -0
- package/lib/components/organisms/InterventionNoteTypePicker/InterventionNoteTypePicker.d.ts +8 -0
- package/lib/components/organisms/InterventionNoteTypePicker/InterventionNoteTypePicker.js +32 -0
- package/lib/components/organisms/InterventionNoteTypePicker/InterventionNoteTypePicker.js.map +1 -0
- package/lib/components/organisms/PlaceEquipmentSearchBar/PlaceEquipmentSearchBar.d.ts +4 -0
- package/lib/components/organisms/PlaceEquipmentSearchBar/PlaceEquipmentSearchBar.js +36 -0
- package/lib/components/organisms/PlaceEquipmentSearchBar/PlaceEquipmentSearchBar.js.map +1 -0
- package/lib/components/organisms/TypePicker/TypePicker.d.ts +4 -0
- package/lib/components/organisms/TypePicker/TypePicker.js +29 -0
- package/lib/components/organisms/TypePicker/TypePicker.js.map +1 -0
- package/lib/components/organisms/index.d.ts +8 -0
- package/lib/components/organisms/index.js +26 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/components/pages/EquipmentView/EquipmentView.d.ts +3 -0
- package/lib/components/pages/EquipmentView/EquipmentView.js +161 -0
- package/lib/components/pages/EquipmentView/EquipmentView.js.map +1 -0
- package/lib/components/pages/GeneralInformationView/GeneralInformationView.d.ts +3 -0
- package/lib/components/pages/GeneralInformationView/GeneralInformationView.js +94 -0
- package/lib/components/pages/GeneralInformationView/GeneralInformationView.js.map +1 -0
- package/lib/components/pages/HistoryView/HistoryView.d.ts +3 -0
- package/lib/components/pages/HistoryView/HistoryView.js +33 -0
- package/lib/components/pages/HistoryView/HistoryView.js.map +1 -0
- package/lib/components/pages/NoteView/NoteView.d.ts +3 -0
- package/lib/components/pages/NoteView/NoteView.js +47 -0
- package/lib/components/pages/NoteView/NoteView.js.map +1 -0
- package/lib/components/pages/SurveyView/SurveyView.d.ts +7 -0
- package/lib/components/pages/SurveyView/SurveyView.js +60 -0
- package/lib/components/pages/SurveyView/SurveyView.js.map +1 -0
- package/lib/components/pages/index.d.ts +5 -0
- package/lib/components/pages/index.js +23 -0
- package/lib/components/pages/index.js.map +1 -0
- package/lib/components/templates/InterventionsListView/InterventionsListView.d.ts +7 -0
- package/lib/components/templates/InterventionsListView/InterventionsListView.js +73 -0
- package/lib/components/templates/InterventionsListView/InterventionsListView.js.map +1 -0
- package/lib/components/templates/LinkEquipmentPopup/LinkEquipmentPopup.d.ts +7 -0
- package/lib/components/templates/LinkEquipmentPopup/LinkEquipmentPopup.js +70 -0
- package/lib/components/templates/LinkEquipmentPopup/LinkEquipmentPopup.js.map +1 -0
- package/lib/components/templates/SurveyRangeNavigation/SurveyRangeNavigation.d.ts +7 -0
- package/lib/components/templates/SurveyRangeNavigation/SurveyRangeNavigation.js +76 -0
- package/lib/components/templates/SurveyRangeNavigation/SurveyRangeNavigation.js.map +1 -0
- package/lib/components/templates/index.d.ts +3 -0
- package/lib/components/templates/index.js +21 -0
- package/lib/components/templates/index.js.map +1 -0
- package/lib/features/asyncFunctions-index.d.ts +9 -0
- package/lib/features/asyncFunctions-index.js +27 -0
- package/lib/features/asyncFunctions-index.js.map +1 -0
- package/lib/features/clientAndProspectSlice.d.ts +7 -0
- package/lib/features/clientAndProspectSlice.js +49 -0
- package/lib/features/clientAndProspectSlice.js.map +1 -0
- package/lib/features/contractSlice.d.ts +7 -0
- package/lib/features/contractSlice.js +49 -0
- package/lib/features/contractSlice.js.map +1 -0
- package/lib/features/equipmentFamilySlice.d.ts +7 -0
- package/lib/features/equipmentFamilySlice.js +49 -0
- package/lib/features/equipmentFamilySlice.js.map +1 -0
- package/lib/features/equipmentLineSlice.d.ts +7 -0
- package/lib/features/equipmentLineSlice.js +49 -0
- package/lib/features/equipmentLineSlice.js.map +1 -0
- package/lib/features/equipmentPictureSlice.d.ts +37 -0
- package/lib/features/equipmentPictureSlice.js +67 -0
- package/lib/features/equipmentPictureSlice.js.map +1 -0
- package/lib/features/equipmentSlice.d.ts +34 -0
- package/lib/features/equipmentSlice.js +205 -0
- package/lib/features/equipmentSlice.js.map +1 -0
- package/lib/features/index.d.ts +9 -0
- package/lib/features/index.js +27 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/interventionNoteSlice.d.ts +16 -0
- package/lib/features/interventionNoteSlice.js +114 -0
- package/lib/features/interventionNoteSlice.js.map +1 -0
- package/lib/features/interventionSlice.d.ts +21 -0
- package/lib/features/interventionSlice.js +140 -0
- package/lib/features/interventionSlice.js.map +1 -0
- package/lib/features/questionSlice.d.ts +14 -0
- package/lib/features/questionSlice.js +104 -0
- package/lib/features/questionSlice.js.map +1 -0
- package/lib/hooks/use-intervention-header-actions.d.ts +1 -0
- package/lib/hooks/use-intervention-header-actions.js +141 -0
- package/lib/hooks/use-intervention-header-actions.js.map +1 -0
- package/lib/i18n/en.json +106 -0
- package/lib/i18n/fr.json +106 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +94 -0
- package/lib/index.js.map +1 -0
- package/lib/models/forms.d.ts +2 -0
- package/lib/models/forms.js +333 -0
- package/lib/models/forms.js.map +1 -0
- package/lib/models/index.d.ts +5 -0
- package/lib/models/index.js +23 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +143 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +33 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +28 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/models/typeObjects.d.ts +2 -0
- package/lib/models/typeObjects.js +205 -0
- package/lib/models/typeObjects.js.map +1 -0
- package/lib/screens/equipment/CustomerParkScreen.d.ts +3 -0
- package/lib/screens/equipment/CustomerParkScreen.js +56 -0
- package/lib/screens/equipment/CustomerParkScreen.js.map +1 -0
- package/lib/screens/equipment/EquipmentFormView.d.ts +6 -0
- package/lib/screens/equipment/EquipmentFormView.js +104 -0
- package/lib/screens/equipment/EquipmentFormView.js.map +1 -0
- package/lib/screens/equipment/EquipmentInterventionListScreen.d.ts +3 -0
- package/lib/screens/equipment/EquipmentInterventionListScreen.js +43 -0
- package/lib/screens/equipment/EquipmentInterventionListScreen.js.map +1 -0
- package/lib/screens/equipment/EquipmentLineListScreen.d.ts +3 -0
- package/lib/screens/equipment/EquipmentLineListScreen.js +37 -0
- package/lib/screens/equipment/EquipmentLineListScreen.js.map +1 -0
- package/lib/screens/equipment/EquipmentPictureScreen.d.ts +3 -0
- package/lib/screens/equipment/EquipmentPictureScreen.js +113 -0
- package/lib/screens/equipment/EquipmentPictureScreen.js.map +1 -0
- package/lib/screens/equipment/index.d.ts +45 -0
- package/lib/screens/equipment/index.js +61 -0
- package/lib/screens/equipment/index.js.map +1 -0
- package/lib/screens/intervention/ActiveInterventionScreen.d.ts +3 -0
- package/lib/screens/intervention/ActiveInterventionScreen.js +72 -0
- package/lib/screens/intervention/ActiveInterventionScreen.js.map +1 -0
- package/lib/screens/intervention/DayInterventionsScreen.d.ts +3 -0
- package/lib/screens/intervention/DayInterventionsScreen.js +33 -0
- package/lib/screens/intervention/DayInterventionsScreen.js.map +1 -0
- package/lib/screens/intervention/InterventionDetailsScreen.d.ts +7 -0
- package/lib/screens/intervention/InterventionDetailsScreen.js +83 -0
- package/lib/screens/intervention/InterventionDetailsScreen.js.map +1 -0
- package/lib/screens/intervention/InterventionNoteFormScreen.d.ts +6 -0
- package/lib/screens/intervention/InterventionNoteFormScreen.js +81 -0
- package/lib/screens/intervention/InterventionNoteFormScreen.js.map +1 -0
- package/lib/screens/intervention/InterventionQuestionFormScreen.d.ts +6 -0
- package/lib/screens/intervention/InterventionQuestionFormScreen.js +114 -0
- package/lib/screens/intervention/InterventionQuestionFormScreen.js.map +1 -0
- package/lib/screens/intervention/InterventionsHistoryScreen.d.ts +3 -0
- package/lib/screens/intervention/InterventionsHistoryScreen.js +29 -0
- package/lib/screens/intervention/InterventionsHistoryScreen.js.map +1 -0
- package/lib/screens/intervention/PlannedInterventionsScreen.d.ts +3 -0
- package/lib/screens/intervention/PlannedInterventionsScreen.js +29 -0
- package/lib/screens/intervention/PlannedInterventionsScreen.js.map +1 -0
- package/lib/screens/intervention/index.d.ts +79 -0
- package/lib/screens/intervention/index.js +89 -0
- package/lib/screens/intervention/index.js.map +1 -0
- package/lib/types/equipment.d.ts +7 -0
- package/lib/types/equipment.js +25 -0
- package/lib/types/equipment.js.map +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.js +21 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/intervention.d.ts +4 -0
- package/lib/types/intervention.js +38 -0
- package/lib/types/intervention.js.map +1 -0
- package/lib/types/question.d.ts +4 -0
- package/lib/types/question.js +44 -0
- package/lib/types/question.js.map +1 -0
- package/lib/utils/form-types.d.ts +9 -0
- package/lib/utils/form-types.js +19 -0
- package/lib/utils/form-types.js.map +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +19 -0
- package/lib/utils/index.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { searchClientAndProspect } from './clientAndProspectSlice';
|
|
2
|
+
export { searchContract } from './contractSlice';
|
|
3
|
+
export { searchEquipmentFamily } from './equipmentFamilySlice';
|
|
4
|
+
export { searchEquipmentLine } from './equipmentLineSlice';
|
|
5
|
+
export { createEquipmentPicture, deleteEquipmentPicture, searchEquipmentPicture, } from './equipmentPictureSlice';
|
|
6
|
+
export { archiveEquipment, copyEquipment, deleteEquipment, fetchNumberClientEquipment, fetchNumberInterventionEquipment, getEquipmentById, saveEquipment, searchEquipment, searchEquipmentToLink, searchInterventionEquipment, searchPlaceEquipment, } from './equipmentSlice';
|
|
7
|
+
export { createInterventionNote, deleteInterventionNote, fetchInterventionNote, fetchInterventionNoteById, fetchInterventionNoteType, updateInterventionNote, } from './interventionNoteSlice';
|
|
8
|
+
export { fetchActiveIntervention, fetchIntervention, fetchInterventionById, linkEquipment, searchHistoryInterventionByEquipment, unlinkEquipment, updateInterventionStatus, } from './interventionSlice';
|
|
9
|
+
export { fetchQuestion, fetchQuestionById, fetchRange, updateQuestion, } from './questionSlice';
|
|
@@ -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 } from './clientAndProspectSlice';
|
|
19
|
+
export { searchContract } from './contractSlice';
|
|
20
|
+
export { searchEquipmentFamily } from './equipmentFamilySlice';
|
|
21
|
+
export { searchEquipmentLine } from './equipmentLineSlice';
|
|
22
|
+
export { createEquipmentPicture, deleteEquipmentPicture, searchEquipmentPicture, } from './equipmentPictureSlice';
|
|
23
|
+
export { archiveEquipment, copyEquipment, deleteEquipment, fetchNumberClientEquipment, fetchNumberInterventionEquipment, getEquipmentById, saveEquipment, searchEquipment, searchEquipmentToLink, searchInterventionEquipment, searchPlaceEquipment, } from './equipmentSlice';
|
|
24
|
+
export { createInterventionNote, deleteInterventionNote, fetchInterventionNote, fetchInterventionNoteById, fetchInterventionNoteType, updateInterventionNote, } from './interventionNoteSlice';
|
|
25
|
+
export { fetchActiveIntervention, fetchIntervention, fetchInterventionById, linkEquipment, searchHistoryInterventionByEquipment, unlinkEquipment, updateInterventionStatus, } from './interventionSlice';
|
|
26
|
+
export { fetchQuestion, fetchQuestionById, fetchRange, updateQuestion, } from './questionSlice';
|
|
27
|
+
//# sourceMappingURL=asyncFunctions-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asyncFunctions-index.js","sourceRoot":"","sources":["../../src/features/asyncFunctions-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAC,qBAAqB,EAAC,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,0BAA0B,EAC1B,gCAAgC,EAChC,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,oCAAoC,EACpC,eAAe,EACf,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const searchClientAndProspect: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
2
|
+
export const clientAndProspectReducer: import("redux").Reducer<{
|
|
3
|
+
loadingList: boolean;
|
|
4
|
+
moreLoading: boolean;
|
|
5
|
+
isListEnd: boolean;
|
|
6
|
+
clientAndProspectList: any[];
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { generateInifiniteScrollCases, handlerApiCall, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { searchClientAndProspect as _searchClientAndProspect } from '../api/client-and-prospect-api';
|
|
21
|
+
export const searchClientAndProspect = createAsyncThunk('intervention_clientAndProspect/searchClientAndProspect', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: _searchClientAndProspect,
|
|
24
|
+
data,
|
|
25
|
+
action: 'Intervention_SliceAction_SearchClientAndProspect',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const initialState = {
|
|
31
|
+
loadingList: false,
|
|
32
|
+
moreLoading: false,
|
|
33
|
+
isListEnd: false,
|
|
34
|
+
clientAndProspectList: [],
|
|
35
|
+
};
|
|
36
|
+
const clientAndProspectSlice = createSlice({
|
|
37
|
+
name: 'intervention_clientAndProspect',
|
|
38
|
+
initialState,
|
|
39
|
+
extraReducers: builder => {
|
|
40
|
+
generateInifiniteScrollCases(builder, searchClientAndProspect, {
|
|
41
|
+
loading: 'loadingList',
|
|
42
|
+
moreLoading: 'moreLoading',
|
|
43
|
+
isListEnd: 'isListEnd',
|
|
44
|
+
list: 'clientAndProspectList',
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export const clientAndProspectReducer = clientAndProspectSlice.reducer;
|
|
49
|
+
//# sourceMappingURL=clientAndProspectSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientAndProspectSlice.js","sourceRoot":"","sources":["../../src/features/clientAndProspectSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,uBAAuB,IAAI,wBAAwB,EAAC,MAAM,gCAAgC,CAAC;AAEnG,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CACrD,wDAAwD,EACxD,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,wBAAwB;QACvC,IAAI;QACJ,MAAM,EAAE,kDAAkD;QAC1D,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,qBAAqB,EAAE,EAAE;CAC1B,CAAC;AAEF,MAAM,sBAAsB,GAAG,WAAW,CAAC;IACzC,IAAI,EAAE,gCAAgC;IACtC,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,4BAA4B,CAAC,OAAO,EAAE,uBAAuB,EAAE;YAC7D,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,aAAa;YAC1B,SAAS,EAAE,WAAW;YACtB,IAAI,EAAE,uBAAuB;SAC9B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const searchContract: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
2
|
+
export const contractReducer: import("redux").Reducer<{
|
|
3
|
+
loadingList: boolean;
|
|
4
|
+
moreLoading: boolean;
|
|
5
|
+
isListEnd: boolean;
|
|
6
|
+
contractList: any[];
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { generateInifiniteScrollCases, handlerApiCall, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { searchContract as _searchContract } from '../api/contract-api';
|
|
21
|
+
export const searchContract = createAsyncThunk('intervention_contract/searchContract', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: _searchContract,
|
|
24
|
+
data,
|
|
25
|
+
action: 'Intervention_SliceAction_SearchContract',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const initialState = {
|
|
31
|
+
loadingList: false,
|
|
32
|
+
moreLoading: false,
|
|
33
|
+
isListEnd: false,
|
|
34
|
+
contractList: [],
|
|
35
|
+
};
|
|
36
|
+
const contractSlice = createSlice({
|
|
37
|
+
name: 'intervention_contract',
|
|
38
|
+
initialState,
|
|
39
|
+
extraReducers: builder => {
|
|
40
|
+
generateInifiniteScrollCases(builder, searchContract, {
|
|
41
|
+
loading: 'loadingList',
|
|
42
|
+
moreLoading: 'moreLoading',
|
|
43
|
+
isListEnd: 'isListEnd',
|
|
44
|
+
list: 'contractList',
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export const contractReducer = contractSlice.reducer;
|
|
49
|
+
//# sourceMappingURL=contractSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractSlice.js","sourceRoot":"","sources":["../../src/features/contractSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,cAAc,IAAI,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEtE,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAC5C,sCAAsC,EACtC,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,eAAe;QAC9B,IAAI;QACJ,MAAM,EAAE,yCAAyC;QACjD,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE,EAAE;CACjB,CAAC;AAEF,MAAM,aAAa,GAAG,WAAW,CAAC;IAChC,IAAI,EAAE,uBAAuB;IAC7B,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,4BAA4B,CAAC,OAAO,EAAE,cAAc,EAAE;YACpD,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,aAAa;YAC1B,SAAS,EAAE,WAAW;YACtB,IAAI,EAAE,cAAc;SACrB,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const searchEquipmentFamily: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
2
|
+
export const equipmentFamilyReducer: import("redux").Reducer<{
|
|
3
|
+
loadingList: boolean;
|
|
4
|
+
moreLoading: boolean;
|
|
5
|
+
isListEnd: boolean;
|
|
6
|
+
equipmentFamilyList: any[];
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { generateInifiniteScrollCases, handlerApiCall, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { searchEquipmentFamily as _searchEquipmentFamily } from '../api/equipment-family-api';
|
|
21
|
+
export const searchEquipmentFamily = createAsyncThunk('intervention_equipmentFamily/searchEquipmentFamily', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: _searchEquipmentFamily,
|
|
24
|
+
data,
|
|
25
|
+
action: 'Intervention_SliceAction_SearchEquipmentFamily',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const initialState = {
|
|
31
|
+
loadingList: false,
|
|
32
|
+
moreLoading: false,
|
|
33
|
+
isListEnd: false,
|
|
34
|
+
equipmentFamilyList: [],
|
|
35
|
+
};
|
|
36
|
+
const equipmentFamilySlice = createSlice({
|
|
37
|
+
name: 'intervention_equipmentFamily',
|
|
38
|
+
initialState,
|
|
39
|
+
extraReducers: builder => {
|
|
40
|
+
generateInifiniteScrollCases(builder, searchEquipmentFamily, {
|
|
41
|
+
loading: 'loadingList',
|
|
42
|
+
moreLoading: 'moreLoading',
|
|
43
|
+
isListEnd: 'isListEnd',
|
|
44
|
+
list: 'equipmentFamilyList',
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export const equipmentFamilyReducer = equipmentFamilySlice.reducer;
|
|
49
|
+
//# sourceMappingURL=equipmentFamilySlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equipmentFamilySlice.js","sourceRoot":"","sources":["../../src/features/equipmentFamilySlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,qBAAqB,IAAI,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AAE5F,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,CACnD,oDAAoD,EACpD,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,sBAAsB;QACrC,IAAI;QACJ,MAAM,EAAE,gDAAgD;QACxD,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,mBAAmB,EAAE,EAAE;CACxB,CAAC;AAEF,MAAM,oBAAoB,GAAG,WAAW,CAAC;IACvC,IAAI,EAAE,8BAA8B;IACpC,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,4BAA4B,CAAC,OAAO,EAAE,qBAAqB,EAAE;YAC3D,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,aAAa;YAC1B,SAAS,EAAE,WAAW;YACtB,IAAI,EAAE,qBAAqB;SAC5B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const searchEquipmentLine: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
2
|
+
export const equipmentLineReducer: import("redux").Reducer<{
|
|
3
|
+
loadingList: boolean;
|
|
4
|
+
moreLoading: boolean;
|
|
5
|
+
isListEnd: boolean;
|
|
6
|
+
equipmentLineList: any[];
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { generateInifiniteScrollCases, handlerApiCall, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { searchEquipmentLine as _searchEquipmentLine } from '../api/equipment-line-api';
|
|
21
|
+
export const searchEquipmentLine = createAsyncThunk('intervention_equipmentLine/searchEquipmentLine', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: _searchEquipmentLine,
|
|
24
|
+
data,
|
|
25
|
+
action: 'Intervention_SliceAction_SearchEquipmentLine',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const initialState = {
|
|
31
|
+
loadingList: false,
|
|
32
|
+
moreLoading: false,
|
|
33
|
+
isListEnd: false,
|
|
34
|
+
equipmentLineList: [],
|
|
35
|
+
};
|
|
36
|
+
const equipmentLineSlice = createSlice({
|
|
37
|
+
name: 'intervention_equipmentLine',
|
|
38
|
+
initialState,
|
|
39
|
+
extraReducers: builder => {
|
|
40
|
+
generateInifiniteScrollCases(builder, searchEquipmentLine, {
|
|
41
|
+
loading: 'loadingList',
|
|
42
|
+
moreLoading: 'moreLoading',
|
|
43
|
+
isListEnd: 'isListEnd',
|
|
44
|
+
list: 'equipmentLineList',
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export const equipmentLineReducer = equipmentLineSlice.reducer;
|
|
49
|
+
//# sourceMappingURL=equipmentLineSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equipmentLineSlice.js","sourceRoot":"","sources":["../../src/features/equipmentLineSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,mBAAmB,IAAI,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAEtF,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CACjD,gDAAgD,EAChD,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,oBAAoB;QACnC,IAAI;QACJ,MAAM,EAAE,8CAA8C;QACtD,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,iBAAiB,EAAE,EAAE;CACtB,CAAC;AAEF,MAAM,kBAAkB,GAAG,WAAW,CAAC;IACrC,IAAI,EAAE,4BAA4B;IAClC,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,4BAA4B,CAAC,OAAO,EAAE,mBAAmB,EAAE;YACzD,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,aAAa;YAC1B,SAAS,EAAE,WAAW;YACtB,IAAI,EAAE,mBAAmB;SAC1B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const searchEquipmentPicture: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
2
|
+
export const createEquipmentPicture: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<any, string, {
|
|
3
|
+
arg: void;
|
|
4
|
+
requestId: string;
|
|
5
|
+
requestStatus: "fulfilled";
|
|
6
|
+
}, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
|
|
7
|
+
arg: void;
|
|
8
|
+
requestId: string;
|
|
9
|
+
requestStatus: "rejected";
|
|
10
|
+
aborted: boolean;
|
|
11
|
+
condition: boolean;
|
|
12
|
+
} & ({
|
|
13
|
+
rejectedWithValue: true;
|
|
14
|
+
} | ({
|
|
15
|
+
rejectedWithValue: false;
|
|
16
|
+
} & {})), import("@reduxjs/toolkit").SerializedError>, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
17
|
+
export const deleteEquipmentPicture: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<any, string, {
|
|
18
|
+
arg: void;
|
|
19
|
+
requestId: string;
|
|
20
|
+
requestStatus: "fulfilled";
|
|
21
|
+
}, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
|
|
22
|
+
arg: void;
|
|
23
|
+
requestId: string;
|
|
24
|
+
requestStatus: "rejected";
|
|
25
|
+
aborted: boolean;
|
|
26
|
+
condition: boolean;
|
|
27
|
+
} & ({
|
|
28
|
+
rejectedWithValue: true;
|
|
29
|
+
} | ({
|
|
30
|
+
rejectedWithValue: false;
|
|
31
|
+
} & {})), import("@reduxjs/toolkit").SerializedError>, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
32
|
+
export const equipmentPictureReducer: import("redux").Reducer<{
|
|
33
|
+
loadingList: boolean;
|
|
34
|
+
moreLoading: boolean;
|
|
35
|
+
isListEnd: boolean;
|
|
36
|
+
equipmentPictureList: any[];
|
|
37
|
+
}>;
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { generateInifiniteScrollCases, handlerApiCall, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { createEquipmentPicture as _createEquipmentPicture, deleteEquipmentPicture as _deleteEquipmentPicture, searchEquipmentPicture as _searchEquipmentPicture, } from '../api/equipment-picture-api';
|
|
21
|
+
export const searchEquipmentPicture = createAsyncThunk('intervention_equipmentPicture/searchEquipmentPicture', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: _searchEquipmentPicture,
|
|
24
|
+
data,
|
|
25
|
+
action: 'Intervention_SliceAction_SearchEquipmentPicture',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export const createEquipmentPicture = createAsyncThunk('intervention_equipmentPicture/createEquipmentPicture', async function (data, { getState, dispatch }) {
|
|
31
|
+
return handlerApiCall({
|
|
32
|
+
fetchFunction: _createEquipmentPicture,
|
|
33
|
+
data,
|
|
34
|
+
action: 'Intervention_SliceAction_CreateEquipmentPicture',
|
|
35
|
+
getState,
|
|
36
|
+
responseOptions: { isArrayResponse: false },
|
|
37
|
+
}).then(() => dispatch(searchEquipmentPicture({ equipmentId: data.equipmentId })));
|
|
38
|
+
});
|
|
39
|
+
export const deleteEquipmentPicture = createAsyncThunk('intervention_equipmentPicture/deleteEquipmentPicture', async function (data, { getState, dispatch }) {
|
|
40
|
+
return handlerApiCall({
|
|
41
|
+
fetchFunction: _deleteEquipmentPicture,
|
|
42
|
+
data,
|
|
43
|
+
action: 'Intervention_SliceAction_DeleteEquipmentPicture',
|
|
44
|
+
getState,
|
|
45
|
+
responseOptions: { isArrayResponse: false },
|
|
46
|
+
}).then(() => dispatch(searchEquipmentPicture({ equipmentId: data.equipmentId })));
|
|
47
|
+
});
|
|
48
|
+
const initialState = {
|
|
49
|
+
loadingList: false,
|
|
50
|
+
moreLoading: false,
|
|
51
|
+
isListEnd: false,
|
|
52
|
+
equipmentPictureList: [],
|
|
53
|
+
};
|
|
54
|
+
const equipmentPictureSlice = createSlice({
|
|
55
|
+
name: 'intervention_equipmentPicture',
|
|
56
|
+
initialState,
|
|
57
|
+
extraReducers: builder => {
|
|
58
|
+
generateInifiniteScrollCases(builder, searchEquipmentPicture, {
|
|
59
|
+
loading: 'loadingList',
|
|
60
|
+
moreLoading: 'moreLoading',
|
|
61
|
+
isListEnd: 'isListEnd',
|
|
62
|
+
list: 'equipmentPictureList',
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
export const equipmentPictureReducer = equipmentPictureSlice.reducer;
|
|
67
|
+
//# sourceMappingURL=equipmentPictureSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equipmentPictureSlice.js","sourceRoot":"","sources":["../../src/features/equipmentPictureSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,IAAI,uBAAuB,EACjD,sBAAsB,IAAI,uBAAuB,EACjD,sBAAsB,IAAI,uBAAuB,GAClD,MAAM,8BAA8B,CAAC;AAEtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CACpD,sDAAsD,EACtD,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,uBAAuB;QACtC,IAAI;QACJ,MAAM,EAAE,iDAAiD;QACzD,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CACpD,sDAAsD,EACtD,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAE,QAAQ,EAAC;IACxC,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,uBAAuB;QACtC,IAAI;QACJ,MAAM,EAAE,iDAAiD;QACzD,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC;KAC1C,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACX,QAAQ,CAAC,sBAAsB,CAAC,EAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAC,CAAC,CAAC,CAClE,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CACpD,sDAAsD,EACtD,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAE,QAAQ,EAAC;IACxC,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,uBAAuB;QACtC,IAAI;QACJ,MAAM,EAAE,iDAAiD;QACzD,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC;KAC1C,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACX,QAAQ,CAAC,sBAAsB,CAAC,EAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAC,CAAC,CAAC,CAClE,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,oBAAoB,EAAE,EAAE;CACzB,CAAC;AAEF,MAAM,qBAAqB,GAAG,WAAW,CAAC;IACxC,IAAI,EAAE,+BAA+B;IACrC,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,4BAA4B,CAAC,OAAO,EAAE,sBAAsB,EAAE;YAC5D,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,aAAa;YAC1B,SAAS,EAAE,WAAW;YACtB,IAAI,EAAE,sBAAsB;SAC7B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const searchEquipment: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
2
|
+
export const fetchNumberClientEquipment: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
3
|
+
export const searchInterventionEquipment: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
4
|
+
export const fetchNumberInterventionEquipment: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
5
|
+
export const searchPlaceEquipment: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
6
|
+
export const getEquipmentById: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
7
|
+
export const saveEquipment: import("@reduxjs/toolkit").AsyncThunk<void, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
8
|
+
export const archiveEquipment: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
9
|
+
export const copyEquipment: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
10
|
+
export const deleteEquipment: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
11
|
+
export const searchEquipmentToLink: import("@reduxjs/toolkit").AsyncThunk<any, void, import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkConfig>;
|
|
12
|
+
export const clearEquipment: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"intervention_equipment/clearEquipment">;
|
|
13
|
+
export const equipmentReducer: import("redux").Reducer<import("immer").WritableDraft<{
|
|
14
|
+
loadingList: boolean;
|
|
15
|
+
moreLoading: boolean;
|
|
16
|
+
isListEnd: boolean;
|
|
17
|
+
equipmentList: any[];
|
|
18
|
+
totalNumberClientEquipment: number;
|
|
19
|
+
loadingInterventionEquipmentList: boolean;
|
|
20
|
+
moreLoadingInterventionEquipment: boolean;
|
|
21
|
+
isInterventionEquipmentListEnd: boolean;
|
|
22
|
+
interventionEquipmentList: any[];
|
|
23
|
+
totalNumberInterventionEquipment: number;
|
|
24
|
+
loadingListEquipPlace: boolean;
|
|
25
|
+
moreLoadingEquipPlace: boolean;
|
|
26
|
+
isListEndEquipPlace: boolean;
|
|
27
|
+
equipmentPlaceList: any[];
|
|
28
|
+
loadingListEquipToLink: boolean;
|
|
29
|
+
moreLoadingEquipToLink: boolean;
|
|
30
|
+
isListEndEquipToLink: boolean;
|
|
31
|
+
equipmentToLinkList: any[];
|
|
32
|
+
loading: boolean;
|
|
33
|
+
equipment: {};
|
|
34
|
+
}>>;
|
|
@@ -0,0 +1,205 @@
|
|
|
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { generateInifiniteScrollCases, handlerApiCall, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { archiveEquipment as _archiveEquipment, copyEquipment as _copyEquipment, deleteEquipment as _deleteEquipment, getEquipmentById as _getEquipmentById, saveEquipment as _saveEquipment, searchEquipment as _searchEquipment, searchEquipmentToLink as _searchEquipmentToLink, searchInterventionEquipment as _searchInterventionEquipment, searchPlaceEquipment as _searchPlaceEquipment, } from '../api/equipment-api';
|
|
21
|
+
import { linkEquipment } from './interventionSlice';
|
|
22
|
+
export const searchEquipment = createAsyncThunk('intervention_equipment/searchEquipment', async function (data, { getState }) {
|
|
23
|
+
return handlerApiCall({
|
|
24
|
+
fetchFunction: _searchEquipment,
|
|
25
|
+
data,
|
|
26
|
+
action: 'Intervention_SliceAction_SearchEquipment',
|
|
27
|
+
getState,
|
|
28
|
+
responseOptions: { isArrayResponse: true },
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
export const fetchNumberClientEquipment = createAsyncThunk('intervention_equipment/fetchNumberClientEquipment', async function (data, { getState }) {
|
|
32
|
+
return handlerApiCall({
|
|
33
|
+
fetchFunction: _searchEquipment,
|
|
34
|
+
data: { isCountFetch: true, ...data },
|
|
35
|
+
action: 'Intervention_SliceAction_FetchNumberClientEquipment',
|
|
36
|
+
getState,
|
|
37
|
+
responseOptions: { isArrayResponse: false, resturnTotalWithData: true },
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
export const searchInterventionEquipment = createAsyncThunk('intervention_equipment/searchInterventionEquipment', async function (data, { getState }) {
|
|
41
|
+
return handlerApiCall({
|
|
42
|
+
fetchFunction: _searchInterventionEquipment,
|
|
43
|
+
data,
|
|
44
|
+
action: 'Intervention_SliceAction_SearchInterventionEquipment',
|
|
45
|
+
getState,
|
|
46
|
+
responseOptions: { isArrayResponse: true },
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
export const fetchNumberInterventionEquipment = createAsyncThunk('intervention_equipment/fetchNumberInterventionEquipment', async function (data, { getState }) {
|
|
50
|
+
return handlerApiCall({
|
|
51
|
+
fetchFunction: _searchInterventionEquipment,
|
|
52
|
+
data: { isCountFetch: true, ...data },
|
|
53
|
+
action: 'Intervention_SliceAction_FetchNumberInterventionEquipment',
|
|
54
|
+
getState,
|
|
55
|
+
responseOptions: { isArrayResponse: false, resturnTotalWithData: true },
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
export const searchPlaceEquipment = createAsyncThunk('intervention_equipment/searchPlaceEquipment', async function (data, { getState }) {
|
|
59
|
+
return handlerApiCall({
|
|
60
|
+
fetchFunction: _searchPlaceEquipment,
|
|
61
|
+
data,
|
|
62
|
+
action: 'Intervention_SliceAction_SearchPlaceEquipment',
|
|
63
|
+
getState,
|
|
64
|
+
responseOptions: { isArrayResponse: true },
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
export const getEquipmentById = createAsyncThunk('intervention_equipment/getEquipmentById', async function (data, { getState }) {
|
|
68
|
+
return handlerApiCall({
|
|
69
|
+
fetchFunction: _getEquipmentById,
|
|
70
|
+
data,
|
|
71
|
+
action: 'Intervention_SliceAction_GetEquipmentById',
|
|
72
|
+
getState,
|
|
73
|
+
responseOptions: { isArrayResponse: false },
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
export const saveEquipment = createAsyncThunk('intervention_equipment/saveEquipment', async function (data, { getState, dispatch }) {
|
|
77
|
+
return handlerApiCall({
|
|
78
|
+
fetchFunction: _saveEquipment,
|
|
79
|
+
data,
|
|
80
|
+
action: 'Intervention_SliceAction_SaveEquipment',
|
|
81
|
+
getState,
|
|
82
|
+
responseOptions: { isArrayResponse: false, showToast: true },
|
|
83
|
+
}).then(equipment => {
|
|
84
|
+
const equipmentId = equipment?.id;
|
|
85
|
+
if (equipmentId != null) {
|
|
86
|
+
if (data.isCreation) {
|
|
87
|
+
dispatch(fetchNumberClientEquipment({
|
|
88
|
+
partnerId: data.partnerId,
|
|
89
|
+
}));
|
|
90
|
+
if (data.interventionId && data.interventionVersion) {
|
|
91
|
+
dispatch(linkEquipment({ ...data, equipmentId }));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
export const archiveEquipment = createAsyncThunk('intervention_equipment/archiveEquipment', async function (data, { getState }) {
|
|
98
|
+
return handlerApiCall({
|
|
99
|
+
fetchFunction: _archiveEquipment,
|
|
100
|
+
data,
|
|
101
|
+
action: 'Intervention_SliceAction_ArchiveEquipment',
|
|
102
|
+
getState,
|
|
103
|
+
responseOptions: { isArrayResponse: false, showToast: true },
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
export const copyEquipment = createAsyncThunk('intervention_equipment/copyEquipment', async function (data, { getState }) {
|
|
107
|
+
return handlerApiCall({
|
|
108
|
+
fetchFunction: _copyEquipment,
|
|
109
|
+
data,
|
|
110
|
+
action: 'Intervention_SliceAction_CopyEquipment',
|
|
111
|
+
getState,
|
|
112
|
+
responseOptions: { isArrayResponse: false },
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
export const deleteEquipment = createAsyncThunk('intervention_equipment/deleteEquipment', async function (data, { getState }) {
|
|
116
|
+
return handlerApiCall({
|
|
117
|
+
fetchFunction: _deleteEquipment,
|
|
118
|
+
data,
|
|
119
|
+
action: 'Intervention_SliceAction_DeleteEquipment',
|
|
120
|
+
getState,
|
|
121
|
+
responseOptions: { isArrayResponse: false },
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
export const searchEquipmentToLink = createAsyncThunk('intervention_equipment/searchEquipmentToLink', async function (data, { getState }) {
|
|
125
|
+
return handlerApiCall({
|
|
126
|
+
fetchFunction: _searchEquipmentToLink,
|
|
127
|
+
data,
|
|
128
|
+
action: 'Intervention_SliceAction_SearchEquipmentToLink',
|
|
129
|
+
getState,
|
|
130
|
+
responseOptions: { isArrayResponse: true },
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
const initialState = {
|
|
134
|
+
loadingList: false,
|
|
135
|
+
moreLoading: false,
|
|
136
|
+
isListEnd: false,
|
|
137
|
+
equipmentList: [],
|
|
138
|
+
totalNumberClientEquipment: 0,
|
|
139
|
+
loadingInterventionEquipmentList: false,
|
|
140
|
+
moreLoadingInterventionEquipment: false,
|
|
141
|
+
isInterventionEquipmentListEnd: false,
|
|
142
|
+
interventionEquipmentList: [],
|
|
143
|
+
totalNumberInterventionEquipment: 0,
|
|
144
|
+
loadingListEquipPlace: false,
|
|
145
|
+
moreLoadingEquipPlace: false,
|
|
146
|
+
isListEndEquipPlace: false,
|
|
147
|
+
equipmentPlaceList: [],
|
|
148
|
+
loadingListEquipToLink: false,
|
|
149
|
+
moreLoadingEquipToLink: false,
|
|
150
|
+
isListEndEquipToLink: false,
|
|
151
|
+
equipmentToLinkList: [],
|
|
152
|
+
loading: false,
|
|
153
|
+
equipment: {},
|
|
154
|
+
};
|
|
155
|
+
const equipmentSlice = createSlice({
|
|
156
|
+
name: 'intervention_equipment',
|
|
157
|
+
initialState,
|
|
158
|
+
reducers: {
|
|
159
|
+
clearEquipment: state => {
|
|
160
|
+
state.equipment = {};
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
extraReducers: builder => {
|
|
164
|
+
generateInifiniteScrollCases(builder, searchEquipment, {
|
|
165
|
+
loading: 'loadingList',
|
|
166
|
+
moreLoading: 'moreLoading',
|
|
167
|
+
isListEnd: 'isListEnd',
|
|
168
|
+
list: 'equipmentList',
|
|
169
|
+
});
|
|
170
|
+
builder.addCase(fetchNumberClientEquipment.fulfilled, (state, action) => {
|
|
171
|
+
state.totalNumberClientEquipment = action.payload.total;
|
|
172
|
+
});
|
|
173
|
+
generateInifiniteScrollCases(builder, searchInterventionEquipment, {
|
|
174
|
+
loading: 'loadingInterventionEquipmentList',
|
|
175
|
+
moreLoading: 'moreLoadingInterventionEquipment',
|
|
176
|
+
isListEnd: 'isInterventionEquipmentListEnd',
|
|
177
|
+
list: 'interventionEquipmentList',
|
|
178
|
+
});
|
|
179
|
+
builder.addCase(fetchNumberInterventionEquipment.fulfilled, (state, action) => {
|
|
180
|
+
state.totalNumberInterventionEquipment = action.payload.total;
|
|
181
|
+
});
|
|
182
|
+
generateInifiniteScrollCases(builder, searchPlaceEquipment, {
|
|
183
|
+
loading: 'loadingListEquipPlace',
|
|
184
|
+
moreLoading: 'moreLoadingEquipPlace',
|
|
185
|
+
isListEnd: 'isListEndEquipPlace',
|
|
186
|
+
list: 'equipmentPlaceList',
|
|
187
|
+
});
|
|
188
|
+
builder.addCase(getEquipmentById.pending, state => {
|
|
189
|
+
state.loading = true;
|
|
190
|
+
});
|
|
191
|
+
builder.addCase(getEquipmentById.fulfilled, (state, action) => {
|
|
192
|
+
state.loading = false;
|
|
193
|
+
state.equipment = action.payload;
|
|
194
|
+
});
|
|
195
|
+
generateInifiniteScrollCases(builder, searchEquipmentToLink, {
|
|
196
|
+
loading: 'loadingListEquipToLink',
|
|
197
|
+
moreLoading: 'moreLoadingEquipToLink',
|
|
198
|
+
isListEnd: 'isListEndEquipToLink',
|
|
199
|
+
list: 'equipmentToLinkList',
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
export const { clearEquipment } = equipmentSlice.actions;
|
|
204
|
+
export const equipmentReducer = equipmentSlice.reducer;
|
|
205
|
+
//# sourceMappingURL=equipmentSlice.js.map
|