|
@@ -46,18 +46,6 @@ import MascotPopup from '../../components/Mascot/MascotPopup';
|
46
|
46
|
import type {SectionListDataType} from '../../components/Screens/WebSectionList';
|
47
|
47
|
import type {LaundromatType} from './ProxiwashAboutScreen';
|
48
|
48
|
|
49
|
|
-const modalStateStrings: {[key in MachineStates]: string} = {
|
50
|
|
- [MachineStates.AVAILABLE]: i18n.t('screens.proxiwash.modal.ready'),
|
51
|
|
- [MachineStates.RUNNING]: i18n.t('screens.proxiwash.modal.running'),
|
52
|
|
- [MachineStates.RUNNING_NOT_STARTED]: i18n.t(
|
53
|
|
- 'screens.proxiwash.modal.runningNotStarted',
|
54
|
|
- ),
|
55
|
|
- [MachineStates.FINISHED]: i18n.t('screens.proxiwash.modal.finished'),
|
56
|
|
- [MachineStates.UNAVAILABLE]: i18n.t('screens.proxiwash.modal.broken'),
|
57
|
|
- [MachineStates.ERROR]: i18n.t('screens.proxiwash.modal.error'),
|
58
|
|
- [MachineStates.UNKNOWN]: i18n.t('screens.proxiwash.modal.unknown'),
|
59
|
|
-};
|
60
|
|
-
|
61
|
49
|
const REFRESH_TIME = 1000 * 10; // Refresh every 10 seconds
|
62
|
50
|
const LIST_ITEM_HEIGHT = 64;
|
63
|
51
|
|
|
@@ -98,6 +86,18 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
|
98
|
86
|
);
|
99
|
87
|
}
|
100
|
88
|
|
|
89
|
+ static modalStateStrings: {[key in MachineStates]: string} = {
|
|
90
|
+ [MachineStates.AVAILABLE]: i18n.t('screens.proxiwash.modal.ready'),
|
|
91
|
+ [MachineStates.RUNNING]: i18n.t('screens.proxiwash.modal.running'),
|
|
92
|
+ [MachineStates.RUNNING_NOT_STARTED]: i18n.t(
|
|
93
|
+ 'screens.proxiwash.modal.runningNotStarted',
|
|
94
|
+ ),
|
|
95
|
+ [MachineStates.FINISHED]: i18n.t('screens.proxiwash.modal.finished'),
|
|
96
|
+ [MachineStates.UNAVAILABLE]: i18n.t('screens.proxiwash.modal.broken'),
|
|
97
|
+ [MachineStates.ERROR]: i18n.t('screens.proxiwash.modal.error'),
|
|
98
|
+ [MachineStates.UNKNOWN]: i18n.t('screens.proxiwash.modal.unknown'),
|
|
99
|
+ };
|
|
100
|
+
|
101
|
101
|
modalRef: null | Modalize;
|
102
|
102
|
|
103
|
103
|
fetchedData: {
|
|
@@ -205,7 +205,7 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
|
205
|
205
|
icon: '',
|
206
|
206
|
onPress: () => undefined,
|
207
|
207
|
};
|
208
|
|
- let message = modalStateStrings[item.state];
|
|
208
|
+ let message = ProxiwashScreen.modalStateStrings[item.state];
|
209
|
209
|
const onPress = () => this.onSetupNotificationsPress(item);
|
210
|
210
|
if (item.state === MachineStates.RUNNING) {
|
211
|
211
|
let remainingTime = parseInt(item.remainingTime, 10);
|