@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,94 @@
|
|
|
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 React, { useCallback, useEffect, useState } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { calculateDiff, getNowDateZonesISOString, Stopwatch, useDispatch, usePermitted, useSelector, useTranslator, useTypes, } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { HeaderContainer, ScrollView } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { GtCard, InterventionHeader } from '../../molecules';
|
|
23
|
+
import { DropdownCards } from '../../organisms';
|
|
24
|
+
import { Intervention as InterventionType } from '../../../types';
|
|
25
|
+
import { updateInterventionStatus } from '../../../features/interventionSlice';
|
|
26
|
+
const NUMBER_MILLISECONDS_IN_SECOND = 1000;
|
|
27
|
+
const GeneralInformationView = ({}) => {
|
|
28
|
+
const I18n = useTranslator();
|
|
29
|
+
const dispatch = useDispatch();
|
|
30
|
+
const { readonly } = usePermitted({
|
|
31
|
+
modelName: 'com.axelor.apps.intervention.db.Intervention',
|
|
32
|
+
});
|
|
33
|
+
const { Intervention } = useTypes();
|
|
34
|
+
const { intervention } = useSelector((state) => state.intervention_intervention);
|
|
35
|
+
const [duration, setDuration] = useState(intervention.totalDuration * NUMBER_MILLISECONDS_IN_SECOND);
|
|
36
|
+
const [lastStart, setLastStart] = useState(intervention.lastStartDateTime);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
setDuration(intervention.totalDuration * NUMBER_MILLISECONDS_IN_SECOND);
|
|
39
|
+
setLastStart(intervention.lastStartDateTime);
|
|
40
|
+
}, [intervention]);
|
|
41
|
+
const getDuration = useCallback(() => {
|
|
42
|
+
if (intervention.statusSelect === Intervention?.statusSelect.Started) {
|
|
43
|
+
return duration + calculateDiff(lastStart, new Date());
|
|
44
|
+
}
|
|
45
|
+
return duration;
|
|
46
|
+
}, [
|
|
47
|
+
Intervention?.statusSelect,
|
|
48
|
+
duration,
|
|
49
|
+
intervention.statusSelect,
|
|
50
|
+
lastStart,
|
|
51
|
+
]);
|
|
52
|
+
const updateIntervention = useCallback((targetStatus) => {
|
|
53
|
+
dispatch(updateInterventionStatus({
|
|
54
|
+
interventionId: intervention.id,
|
|
55
|
+
version: intervention.version,
|
|
56
|
+
targetStatus,
|
|
57
|
+
}));
|
|
58
|
+
}, [dispatch, intervention.id, intervention.version]);
|
|
59
|
+
const handlePlay = useCallback(() => {
|
|
60
|
+
updateIntervention(Intervention?.statusSelect.Started);
|
|
61
|
+
setLastStart(getNowDateZonesISOString());
|
|
62
|
+
}, [Intervention?.statusSelect, updateIntervention]);
|
|
63
|
+
const handlePause = useCallback(() => {
|
|
64
|
+
updateIntervention(Intervention?.statusSelect.Suspended);
|
|
65
|
+
setDuration(current => current + calculateDiff(lastStart, new Date()));
|
|
66
|
+
}, [Intervention?.statusSelect, lastStart, updateIntervention]);
|
|
67
|
+
const handleStop = useCallback(() => {
|
|
68
|
+
updateIntervention(Intervention?.statusSelect.Finished);
|
|
69
|
+
}, [Intervention?.statusSelect, updateIntervention]);
|
|
70
|
+
return (<View>
|
|
71
|
+
<HeaderContainer expandableFilter={false} fixedItems={<InterventionHeader intervention={intervention}/>}/>
|
|
72
|
+
<ScrollView style={styles.scrollView}>
|
|
73
|
+
<GtCard titleKey={'Intervention_MaxGIT'} maxDate={intervention.customerRequest?.maxGitDateTime} realGt={intervention.customerRequest?.realGit} plannedGt={intervention.contract?.guaranteedInterventionTime} interventionStatus={intervention.statusSelect} gtStatus={Intervention?.statusSelect.Started}/>
|
|
74
|
+
<GtCard titleKey={'Intervention_MaxGRT'} maxDate={intervention.customerRequest?.maxGrtDateTime} realGt={intervention.customerRequest?.realGrt} plannedGt={intervention.contract?.guaranteedRecoveryTime} interventionStatus={intervention.statusSelect} gtStatus={Intervention?.statusSelect.Finished}/>
|
|
75
|
+
<DropdownCards intervention={intervention}/>
|
|
76
|
+
<Stopwatch style={styles.stopwatch} disable={readonly} startTime={getDuration()} status={InterventionType.getStopwatchStatus(intervention.statusSelect)} timerFormat={I18n.t('Intervention_TimerFormat')} onPlay={handlePlay} onPause={handlePause} onStop={handleStop} disableStop={intervention.statusSelect !== Intervention?.statusSelect.Started} useObjectStatus hideCancel/>
|
|
77
|
+
</ScrollView>
|
|
78
|
+
</View>);
|
|
79
|
+
};
|
|
80
|
+
const styles = StyleSheet.create({
|
|
81
|
+
scrollView: {
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
},
|
|
84
|
+
dropdownCardTitle: {
|
|
85
|
+
fontWeight: 'bold',
|
|
86
|
+
},
|
|
87
|
+
stopwatch: {
|
|
88
|
+
width: '90%',
|
|
89
|
+
marginTop: 30,
|
|
90
|
+
marginVertical: 0,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
export default GeneralInformationView;
|
|
94
|
+
//# sourceMappingURL=GeneralInformationView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneralInformationView.js","sourceRoot":"","sources":["../../../../src/components/pages/GeneralInformationView/GeneralInformationView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgB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C9C,QAAQ,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,EAEhD;QAAA,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,EAC1C;QAAA,CAAC,SAAS,CACR,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CACxB,OAAO,CAAC,CAAC,QAAQ,CAAC,CAClB,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC,CACzB,MAAM,CAAC,CAAC,gBAAgB,CAAC,kBAAkB,CACzC,YAAY,CAAC,YAAY,CAC1B,CAAC,CACF,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAChD,MAAM,CAAC,CAAC,UAAU,CAAC,CACnB,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,MAAM,CAAC,CAAC,UAAU,CAAC,CACnB,WAAW,CAAC,CACV,YAAY,CAAC,YAAY,KAAK,YAAY,EAAE,YAAY,CAAC,OAAO,CACjE,CACD,eAAe,CACf,UAAU,EAEd;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,UAAU,EAAE;QACV,UAAU,EAAE,QAAQ;KACrB;IACD,iBAAiB,EAAE;QACjB,UAAU,EAAE,MAAM;KACnB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,EAAE;QACb,cAAc,EAAE,CAAC;KAClB;CACF,CAAC,CAAC;AAEH,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 React, { useMemo } from 'react';
|
|
19
|
+
import { clipboardProvider, SearchListView, useSelector, useTranslator, useTypes, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { InterventionDetailCard, InterventionHeader } from '../../molecules';
|
|
21
|
+
import { fetchIntervention } from '../../../features/interventionSlice';
|
|
22
|
+
const HistoryView = ({}) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
const { Intervention } = useTypes();
|
|
25
|
+
const { loading, moreLoading, isListEnd, interventionList, intervention } = useSelector((state) => state.intervention_intervention);
|
|
26
|
+
const sliceFunctionData = useMemo(() => ({
|
|
27
|
+
deliveredPartnerId: intervention.deliveredPartner?.id,
|
|
28
|
+
statusList: [Intervention?.statusSelect.Finished],
|
|
29
|
+
}), [Intervention?.statusSelect, intervention.deliveredPartner?.id]);
|
|
30
|
+
return (<SearchListView list={interventionList} loading={loading} moreLoading={moreLoading} isListEnd={isListEnd} sliceFunction={fetchIntervention} sliceFunctionData={sliceFunctionData} searchPlaceholder={I18n.t('Base_Search')} headerTopChildren={<InterventionHeader intervention={intervention}/>} renderListItem={({ item }) => (<InterventionDetailCard intervention={item} isCopyCard={true} onPress={() => clipboardProvider.copyToClipboard(item.sequence)}/>)}/>);
|
|
31
|
+
};
|
|
32
|
+
export default HistoryView;
|
|
33
|
+
//# sourceMappingURL=HistoryView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HistoryView.js","sourceRoot":"","s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AAC,CAAC,CAAC,aAAa,CAAC,CAAC,CACzC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,EAAG,CAAC,CACtE,cAAc,CAAC,CAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAE,CAAC,CAC1B,CAAC,sBAAsB,CACrB,YAAY,CAAC,CAAC,IAAI,CAAC,CACnB,UAAU,CAAC,CAAC,IAAI,CAAC,CACjB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAChE,CACH,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 React, { useMemo, useState } from 'react';
|
|
19
|
+
import { SearchListView, useNavigation, usePermitted, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { InterventionHeader, NoteDetailCard } from '../../molecules';
|
|
21
|
+
import { InterventionNoteTypePicker } from '../../organisms';
|
|
22
|
+
import { fetchInterventionNote } from '../../../features/interventionNoteSlice';
|
|
23
|
+
const NoteView = ({}) => {
|
|
24
|
+
const I18n = useTranslator();
|
|
25
|
+
const navigation = useNavigation();
|
|
26
|
+
const { readonly, canCreate, canDelete } = usePermitted({
|
|
27
|
+
modelName: 'com.axelor.apps.intervention.db.InterventionNote',
|
|
28
|
+
});
|
|
29
|
+
const [selectedNoteTypeId, setSelectedNoteTypeId] = useState(null);
|
|
30
|
+
const { loading, moreLoading, isListEnd, interventionNoteList } = useSelector((state) => state.intervention_interventionNote);
|
|
31
|
+
const { intervention } = useSelector((state) => state.intervention_intervention);
|
|
32
|
+
const sliceFunctionData = useMemo(() => ({
|
|
33
|
+
deliveredPartnerId: intervention.deliveredPartner?.id,
|
|
34
|
+
noteTypeId: selectedNoteTypeId,
|
|
35
|
+
}), [intervention.deliveredPartner?.id, selectedNoteTypeId]);
|
|
36
|
+
return (<SearchListView list={interventionNoteList} loading={loading} moreLoading={moreLoading} isListEnd={isListEnd} sliceFunction={fetchInterventionNote} sliceFunctionData={sliceFunctionData} searchPlaceholder={I18n.t('Base_Search')} headerTopChildren={<InterventionHeader intervention={intervention}/>} headerChildren={<InterventionNoteTypePicker onChange={noteType => setSelectedNoteTypeId(noteType?.id)}/>} renderListItem={({ item }) => (<NoteDetailCard note={item} canDelete={canDelete} canEdit={!readonly}/>)} actionList={canCreate
|
|
37
|
+
? [
|
|
38
|
+
{
|
|
39
|
+
iconName: 'plus',
|
|
40
|
+
title: I18n.t('Intervention_CreateNote'),
|
|
41
|
+
onPress: () => navigation.navigate('InterventionNoteFormScreen'),
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
: []}/>);
|
|
45
|
+
};
|
|
46
|
+
export default NoteView;
|
|
47
|
+
//# sourceMappingURL=NoteView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoteView.js","sourceRoot":"","sources":["../../../../src/components/pages/NoteView/NoteView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GA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B,CAAC,CAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,aAAa,CAAC,CAAC,qBAAqB,CAAC,CACrC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CACzC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,EAAG,CAAC,CACtE,cAAc,CAAC,CACb,CAAC,0BAA0B,CACzB,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,qBAAqB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,EAC1D,CACH,CACD,cAAc,CAAC,CAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAE,CAAC,CAC1B,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAG,CACzE,CAAC,CACF,UAAU,CAAC,CACT,SAAS;YACP,CAAC,CAAC;gBACE;oBACE,QAAQ,EAAE,MAAM;oBAChB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC;oBACxC,OAAO,EAAE,GAAG,EAAE,CACZ,UAAU,CAAC,QAAQ,CAAC,4BAA4B,CAAC;iBACpD;aACF;YACH,CAAC,CAAC,EAAE,CACP,EACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SurveyViewProps {
|
|
3
|
+
selectedRangeId: number;
|
|
4
|
+
onChangeRangeId: (rangeId: number) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const SurveyView: ({ selectedRangeId, onChangeRangeId }: SurveyViewProps) => React.JSX.Element;
|
|
7
|
+
export default SurveyView;
|
|
@@ -0,0 +1,60 @@
|
|
|
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 React, { useCallback } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useDispatch, useNavigation, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { HeaderContainer, ScrollList } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { QuestionCard } from '../../atoms';
|
|
23
|
+
import { InterventionHeader } from '../../molecules';
|
|
24
|
+
import { SurveyRangeNavigation } from '../../templates';
|
|
25
|
+
import { fetchQuestion } from '../../../features/questionSlice';
|
|
26
|
+
import { Question } from '../../../types';
|
|
27
|
+
const SurveyView = ({ selectedRangeId, onChangeRangeId }) => {
|
|
28
|
+
const I18n = useTranslator();
|
|
29
|
+
const dispatch = useDispatch();
|
|
30
|
+
const navigation = useNavigation();
|
|
31
|
+
const { intervention } = useSelector((state) => state.intervention_intervention);
|
|
32
|
+
const { loading, moreLoading, isListEnd, questionlist } = useSelector((state) => state.intervention_question);
|
|
33
|
+
const fetchQuestionAPI = useCallback((page = 0) => {
|
|
34
|
+
dispatch(fetchQuestion({
|
|
35
|
+
interventionId: intervention.id,
|
|
36
|
+
rangeId: selectedRangeId,
|
|
37
|
+
page: page,
|
|
38
|
+
}));
|
|
39
|
+
}, [dispatch, intervention, selectedRangeId]);
|
|
40
|
+
const getQuestionStatus = useCallback(question => {
|
|
41
|
+
return Question.getStatus(question, questionlist.find(q => q.id === question.conditionalInterventionQuestion?.id));
|
|
42
|
+
}, [questionlist]);
|
|
43
|
+
return (<View style={styles.flexOne}>
|
|
44
|
+
<HeaderContainer expandableFilter={false} fixedItems={<>
|
|
45
|
+
<InterventionHeader intervention={intervention}/>
|
|
46
|
+
<SurveyRangeNavigation selectedRangeId={selectedRangeId} onChangeRangeId={onChangeRangeId}/>
|
|
47
|
+
</>}/>
|
|
48
|
+
<ScrollList loadingList={loading} data={questionlist} renderItem={({ item }) => (<QuestionCard status={getQuestionStatus(item)} onPress={() => navigation.navigate('InterventionQuestionFormScreen', {
|
|
49
|
+
questionId: item.id,
|
|
50
|
+
rangeId: selectedRangeId,
|
|
51
|
+
})} {...item}/>)} fetchData={fetchQuestionAPI} moreLoading={moreLoading} isListEnd={isListEnd} translator={I18n.t}/>
|
|
52
|
+
</View>);
|
|
53
|
+
};
|
|
54
|
+
const styles = StyleSheet.create({
|
|
55
|
+
flexOne: {
|
|
56
|
+
flex: 1,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
export default SurveyView;
|
|
60
|
+
//# sourceMappingURL=SurveyView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveyView.js","sourceRoot":"","sources":["../../../../src/components/pages/SurveyView/SurveyView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,aAAa,EACb,WAAW,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CAAC;KACR;CACF,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as EquipmentView } from './EquipmentView/EquipmentView';
|
|
2
|
+
export { default as GeneralInformationView } from './GeneralInformationView/GeneralInformationView';
|
|
3
|
+
export { default as HistoryView } from './HistoryView/HistoryView';
|
|
4
|
+
export { default as NoteView } from './NoteView/NoteView';
|
|
5
|
+
export { default as SurveyView } from './SurveyView/SurveyView';
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { default as EquipmentView } from './EquipmentView/EquipmentView';
|
|
19
|
+
export { default as GeneralInformationView } from './GeneralInformationView/GeneralInformationView';
|
|
20
|
+
export { default as HistoryView } from './HistoryView/HistoryView';
|
|
21
|
+
export { default as NoteView } from './NoteView/NoteView';
|
|
22
|
+
export { default as SurveyView } from './SurveyView/SurveyView';
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/pages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface InterventionsListViewProps {
|
|
3
|
+
statusList: number[];
|
|
4
|
+
defaultDate?: Date;
|
|
5
|
+
}
|
|
6
|
+
declare const InterventionsListView: ({ statusList, defaultDate, }: InterventionsListViewProps) => React.JSX.Element;
|
|
7
|
+
export default InterventionsListView;
|
|
@@ -0,0 +1,73 @@
|
|
|
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 React, { useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { DateInput, filterChip, SearchListView, useNavigation, useSelector, useTranslator, useTypes, useTypeHelpers, } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { ChipSelect, ToggleButton } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { InterventionDetailCard } from '../../molecules';
|
|
23
|
+
import { fetchIntervention } from '../../../features/interventionSlice';
|
|
24
|
+
const InterventionsListView = ({ statusList, defaultDate, }) => {
|
|
25
|
+
const I18n = useTranslator();
|
|
26
|
+
const navigation = useNavigation();
|
|
27
|
+
const { Intervention } = useTypes();
|
|
28
|
+
const { getSelectionItems } = useTypeHelpers();
|
|
29
|
+
const { loading, moreLoading, isListEnd, interventionList } = useSelector((state) => state.intervention_intervention);
|
|
30
|
+
const { userId } = useSelector((state) => state.auth);
|
|
31
|
+
const [filteredList, setFilteredList] = useState(interventionList);
|
|
32
|
+
const [selectedStatus, setSelectedStatus] = useState([]);
|
|
33
|
+
const [selectedDate, setSelectedDate] = useState(defaultDate);
|
|
34
|
+
const [isAssignedToMe, setIsAssignedToMe] = useState(true);
|
|
35
|
+
useEffect(() => setFilteredList(filterChip(interventionList, selectedStatus, 'statusSelect')), [interventionList, selectedStatus]);
|
|
36
|
+
const sliceFunctionData = useMemo(() => ({
|
|
37
|
+
userId: isAssignedToMe ? userId : null,
|
|
38
|
+
date: selectedDate,
|
|
39
|
+
statusList: statusList,
|
|
40
|
+
}), [isAssignedToMe, selectedDate, statusList, userId]);
|
|
41
|
+
const interventionStatusList = useMemo(() => getSelectionItems(Intervention?.statusSelect, selectedStatus).filter(({ value }) => statusList.includes(value)), [Intervention?.statusSelect, getSelectionItems, selectedStatus, statusList]);
|
|
42
|
+
const handleItemPress = item => {
|
|
43
|
+
item &&
|
|
44
|
+
navigation.navigate('InterventionDetailsScreen', {
|
|
45
|
+
interventionId: item.id,
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
return (<SearchListView list={filteredList} loading={loading} moreLoading={moreLoading} isListEnd={isListEnd} sliceFunction={fetchIntervention} sliceFunctionData={sliceFunctionData} onChangeSearchValue={handleItemPress} searchPlaceholder={I18n.t('Base_Search')} headerChildren={<View style={styles.headerContainer}>
|
|
49
|
+
<ToggleButton isActive={isAssignedToMe} onPress={() => setIsAssignedToMe(current => !current)} buttonConfig={{
|
|
50
|
+
iconName: 'person-fill',
|
|
51
|
+
width: '10%',
|
|
52
|
+
style: styles.toggleButton,
|
|
53
|
+
}}/>
|
|
54
|
+
<DateInput style={styles.dateInput} mode="date" popup nullable={true} defaultDate={selectedDate} onDateChange={date => setSelectedDate(date)}/>
|
|
55
|
+
</View>} chipComponent={<ChipSelect mode="multi" onChangeValue={setSelectedStatus} selectionItems={interventionStatusList}/>} renderListItem={({ item }) => (<InterventionDetailCard intervention={item} onPress={() => handleItemPress(item)}/>)}/>);
|
|
56
|
+
};
|
|
57
|
+
const styles = StyleSheet.create({
|
|
58
|
+
headerContainer: {
|
|
59
|
+
width: '90%',
|
|
60
|
+
flexDirection: 'row',
|
|
61
|
+
justifyContent: 'space-between',
|
|
62
|
+
alignSelf: 'center',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
},
|
|
65
|
+
toggleButton: {
|
|
66
|
+
height: 40,
|
|
67
|
+
},
|
|
68
|
+
dateInput: {
|
|
69
|
+
width: '85%',
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
export default InterventionsListView;
|
|
73
|
+
//# sourceMappingURL=InterventionsListView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InterventionsListView.js","sourceRoot":"","sources":["../../../../src/components/templates/InterventionsListView/InterventionsListView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,SAAS,EACT,UAAU,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,aAAa,EACb,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AqB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 React, { useCallback, useState } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { Alert, AutoCompleteSearch } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { displayItemName, useDispatch, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { linkEquipment } from '../../../features/interventionSlice';
|
|
23
|
+
import { searchEquipmentToLink } from '../../../features/equipmentSlice';
|
|
24
|
+
const LinkEquipmentPopup = ({ style, visible, onClose, }) => {
|
|
25
|
+
const I18n = useTranslator();
|
|
26
|
+
const dispatch = useDispatch();
|
|
27
|
+
const { intervention } = useSelector((state) => state.intervention_intervention);
|
|
28
|
+
const { loadingListEquipToLink, moreLoadingEquipToLink, isListEndEquipToLink, equipmentToLinkList, } = useSelector((state) => state.intervention_equipment);
|
|
29
|
+
const [selectedEquipment, setSelectedEquipment] = useState(null);
|
|
30
|
+
const searchEquipmentAPI = useCallback(({ page = 0, searchValue }) => {
|
|
31
|
+
dispatch(searchEquipmentToLink({
|
|
32
|
+
page,
|
|
33
|
+
searchValue,
|
|
34
|
+
equipmentSet: intervention.equipmentSet.map(equipment => equipment.id),
|
|
35
|
+
partnerId: intervention.deliveredPartner?.id,
|
|
36
|
+
}));
|
|
37
|
+
}, [dispatch, intervention]);
|
|
38
|
+
const handleLinkEquipment = useCallback(() => {
|
|
39
|
+
dispatch(linkEquipment({
|
|
40
|
+
interventionId: intervention.id,
|
|
41
|
+
interventionVersion: intervention.version,
|
|
42
|
+
equipmentId: selectedEquipment?.id,
|
|
43
|
+
}));
|
|
44
|
+
setSelectedEquipment(null);
|
|
45
|
+
onClose();
|
|
46
|
+
}, [
|
|
47
|
+
dispatch,
|
|
48
|
+
intervention.id,
|
|
49
|
+
intervention.version,
|
|
50
|
+
onClose,
|
|
51
|
+
selectedEquipment?.id,
|
|
52
|
+
]);
|
|
53
|
+
return (<Alert style={style} visible={visible} cancelButtonConfig={{ onPress: onClose }} confirmButtonConfig={{
|
|
54
|
+
title: I18n.t('Base_Add'),
|
|
55
|
+
onPress: handleLinkEquipment,
|
|
56
|
+
disabled: selectedEquipment == null,
|
|
57
|
+
}} translator={I18n.t}>
|
|
58
|
+
<View style={styles.container}>
|
|
59
|
+
<AutoCompleteSearch title={I18n.t('Intervention_Equipment')} objectList={equipmentToLinkList} value={selectedEquipment} onChangeValue={setSelectedEquipment} fetchData={searchEquipmentAPI} displayValue={displayItemName} placeholder={I18n.t('Intervention_Equipment')} showDetailsPopup={true} loadingList={loadingListEquipToLink} moreLoading={moreLoadingEquipToLink} isListEnd={isListEndEquipToLink}/>
|
|
60
|
+
</View>
|
|
61
|
+
</Alert>);
|
|
62
|
+
};
|
|
63
|
+
const styles = StyleSheet.create({
|
|
64
|
+
container: {
|
|
65
|
+
flexDirection: 'column',
|
|
66
|
+
width: '100%',
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
export default LinkEquipmentPopup;
|
|
70
|
+
//# sourceMappingURL=LinkEquipmentPopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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,aAAa,CAAC,CAAC,oBAAoB,CAAC,CACpC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAC9B,YAAY,CAAC,CAAC,eAAe,CAAC,CAC9B,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAC9C,gBAAgB,CAAC,CAAC,IAAI,CAAC,CACvB,WAAW,CAAC,CAAC,sBAAsB,CAAC,CACpC,WAAW,CAAC,CAAC,sBAAsB,CAAC,CACpC,SAAS,CAAC,CAAC,oBAAoB,CAAC,EAEpC;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,aAAa,EAAE,QAAQ;QACvB,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SurveyRangeNavigationProps {
|
|
3
|
+
selectedRangeId: number;
|
|
4
|
+
onChangeRangeId: (rangeId: number) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const SurveyRangeNavigation: ({ selectedRangeId, onChangeRangeId, }: SurveyRangeNavigationProps) => React.JSX.Element;
|
|
7
|
+
export default SurveyRangeNavigation;
|
|
@@ -0,0 +1,76 @@
|
|
|
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 React, { useCallback } from 'react';
|
|
19
|
+
import { Dimensions, StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useSelector } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { Button, Picker } from '@axelor/aos-mobile-ui';
|
|
22
|
+
const BUTTON_SIZE = 40;
|
|
23
|
+
const ARROW_TYPE = {
|
|
24
|
+
Previous: 0,
|
|
25
|
+
Next: 1,
|
|
26
|
+
};
|
|
27
|
+
const SurveyRangeNavigation = ({ selectedRangeId, onChangeRangeId, }) => {
|
|
28
|
+
const { rangeList } = useSelector((state) => state.intervention_question);
|
|
29
|
+
const isArrowDisabled = useCallback(arrowType => {
|
|
30
|
+
if (!Array.isArray(rangeList) || rangeList.length === 0) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
else if (selectedRangeId == null) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
const index = arrowType === ARROW_TYPE.Previous ? 0 : rangeList.length - 1;
|
|
37
|
+
return (rangeList.findIndex(range => range.id === selectedRangeId) === index);
|
|
38
|
+
}, [rangeList, selectedRangeId]);
|
|
39
|
+
const displayValue = item => item?.equipment
|
|
40
|
+
? `${item?.equipment.name} - ${item.rangeVal?.title}`
|
|
41
|
+
: item.rangeVal?.title;
|
|
42
|
+
const handleChangeRange = (arrowType) => {
|
|
43
|
+
const selectedRangeIdx = rangeList.findIndex(range => range.id === selectedRangeId);
|
|
44
|
+
let newRange = rangeList[0];
|
|
45
|
+
if (arrowType === ARROW_TYPE.Previous) {
|
|
46
|
+
newRange = rangeList[selectedRangeIdx - 1];
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
newRange = rangeList[selectedRangeIdx + 1];
|
|
50
|
+
}
|
|
51
|
+
onChangeRangeId(newRange.id);
|
|
52
|
+
};
|
|
53
|
+
return (<View style={styles.container}>
|
|
54
|
+
<Button style={styles.button} iconName="chevron-left" onPress={() => handleChangeRange(ARROW_TYPE.Previous)} disabled={isArrowDisabled(ARROW_TYPE.Previous)}/>
|
|
55
|
+
<Picker style={styles.picker} listItems={rangeList} displayValue={displayValue} valueField="id" defaultValue={selectedRangeId} onValueChange={onChangeRangeId}/>
|
|
56
|
+
<Button style={styles.button} iconName="chevron-right" onPress={() => handleChangeRange(ARROW_TYPE.Next)} disabled={isArrowDisabled(ARROW_TYPE.Next)}/>
|
|
57
|
+
</View>);
|
|
58
|
+
};
|
|
59
|
+
const styles = StyleSheet.create({
|
|
60
|
+
container: {
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
justifyContent: 'space-between',
|
|
63
|
+
alignSelf: 'center',
|
|
64
|
+
width: '90%',
|
|
65
|
+
},
|
|
66
|
+
button: {
|
|
67
|
+
width: BUTTON_SIZE,
|
|
68
|
+
height: BUTTON_SIZE,
|
|
69
|
+
marginVertical: 0,
|
|
70
|
+
},
|
|
71
|
+
picker: {
|
|
72
|
+
width: Dimensions.get('window').width * 0.9 - (2 * BUTTON_SIZE + 10),
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
export default SurveyRangeNavigation;
|
|
76
|
+
//# sourceMappingURL=SurveyRangeNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveyRangeNavigation.js","sourceRoot":"","sources":["../../../../src/components/templates/SurveyRangeNavigation/SurveyRangeNavigation.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB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,CAAC,EAE/C;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,KAAK;KACb;IACD,MAAM,EAAE;QACN,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,WAAW;QACnB,cAAc,EAAE,CAAC;KAClB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,WAAW,GAAG,EAAE,CAAC;KACrE;CACF,CAAC,CAAC;AAEH,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as InterventionsListView } from './InterventionsListView/InterventionsListView';
|
|
2
|
+
export { default as LinkEquipmentPopup } from './LinkEquipmentPopup/LinkEquipmentPopup';
|
|
3
|
+
export { default as SurveyRangeNavigation } from './SurveyRangeNavigation/SurveyRangeNavigation';
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { default as InterventionsListView } from './InterventionsListView/InterventionsListView';
|
|
19
|
+
export { default as LinkEquipmentPopup } from './LinkEquipmentPopup/LinkEquipmentPopup';
|
|
20
|
+
export { default as SurveyRangeNavigation } from './SurveyRangeNavigation/SurveyRangeNavigation';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,+CAA+C,CAAC"}
|