@eohjsc/react-native-smart-city 0.7.27 → 0.7.30
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/index.js +2 -0
- package/package.json +2 -1
- package/src/commons/Dashboard/MyDashboardDevice/__test__/index.test.js +68 -0
- package/src/commons/Dashboard/MyDashboardDevice/index.js +46 -11
- package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +43 -11
- package/src/commons/Dashboard/MyUnit/index.js +40 -32
- package/src/commons/ModalAlert/index.js +51 -0
- package/src/commons/ModalAlert/styles.js +54 -0
- package/src/commons/SubUnit/ShortDetail.js +20 -4
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +46 -1
- package/src/configs/API.js +6 -0
- package/src/configs/AccessibilityLabel.js +1 -0
- package/src/configs/Constants.js +7 -0
- package/src/configs/SCConfig.js +6 -0
- package/src/context/SCContext.tsx +12 -1
- package/src/context/SCStore.ts +14 -0
- package/src/context/actionType.ts +10 -0
- package/src/context/mockStore.ts +30 -1
- package/src/context/reducer.ts +35 -0
- package/src/hooks/IoT/useRemoteControl.js +4 -1
- package/src/hooks/IoT/useWatchSharedChips.js +130 -0
- package/src/hooks/Review/__test__/useInAppReview.test.js +99 -0
- package/src/hooks/Review/useInAppReview.js +70 -0
- package/src/hooks/useMqtt.js +78 -27
- package/src/iot/Monitor.js +149 -26
- package/src/iot/UpdateStates.js +60 -0
- package/src/iot/mqtt.js +177 -22
- package/src/navigations/UnitStack.js +16 -0
- package/src/screens/ActivityLog/ItemLog.js +1 -0
- package/src/screens/AddNewGateway/RenameNewDevices.js +5 -0
- package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +18 -0
- package/src/screens/Automate/AddNewAction/ReceiverSelect.js +208 -0
- package/src/screens/Automate/AddNewAction/SetupScriptEmail.js +1 -1
- package/src/screens/Automate/AddNewAction/SetupScriptNotify.js +18 -28
- package/src/screens/Automate/AddNewAction/SetupScriptReceiverEmail.js +22 -129
- package/src/screens/Automate/AddNewAction/SetupScriptReceiverNotify.js +59 -0
- package/src/screens/Automate/AddNewAction/SetupScriptReceiverSms.js +22 -129
- package/src/screens/Automate/AddNewAction/SetupScriptSms.js +1 -1
- package/src/screens/Automate/AddNewAction/Styles/{SetupScriptReceiverEmailStyles.js → ReceiverSelectStyles.js} +18 -1
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptNotify.test.js +16 -33
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptReceiverEmail.test.js +10 -8
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptReceiverNotify.test.js +217 -0
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptReceiverSms.test.js +10 -8
- package/src/screens/Automate/Components/InputName.js +5 -1
- package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +18 -0
- package/src/screens/Automate/ScriptDetail/index.js +6 -6
- package/src/screens/CreatePassword/__test__/index.test.js +133 -0
- package/src/screens/CreatePassword/index.js +134 -0
- package/src/screens/CreatePassword/styles.js +45 -0
- package/src/screens/Device/__test__/DeviceDetail-3rdparty.test.js +447 -0
- package/src/screens/Device/__test__/DeviceDetail-arduino.test.js +344 -0
- package/src/screens/Device/__test__/{mqttDetail.test.js → DeviceDetail-modbus.test.js} +287 -320
- package/src/screens/Device/__test__/DeviceDetail-zigbee.test.js +451 -0
- package/src/screens/Device/__test__/DeviceDetail.test.js +502 -0
- package/src/screens/Device/__test__/detail.test.js +61 -3
- package/src/screens/Device/__test__/sensorDisplayItem.test.js +28 -3
- package/src/screens/Device/detail.js +14 -6
- package/src/screens/Device/hooks/useDeviceWatchConfigControl.js +3 -2
- package/src/screens/EnterPassword/__test__/EnterPassword.test.js +76 -1
- package/src/screens/EnterPassword/index.js +34 -4
- package/src/screens/EnterPassword/styles.js +1 -1
- package/src/utils/FactoryGateway.js +597 -0
- package/src/utils/I18n/translations/en.js +10 -0
- package/src/utils/I18n/translations/vi.js +10 -0
- package/src/utils/Route/index.js +3 -1
- package/src/utils/Validation.js +5 -0
- package/src/utils/store.js +5 -0
|
@@ -69,6 +69,601 @@ export const configDataFactory = {
|
|
|
69
69
|
last_value_log: null,
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
+
const selfSensorDataFactory = {
|
|
73
|
+
id: 459,
|
|
74
|
+
configs: [
|
|
75
|
+
{
|
|
76
|
+
id: 2540,
|
|
77
|
+
status_texts: [],
|
|
78
|
+
is_on: false,
|
|
79
|
+
get_value_unit: '0.0 ',
|
|
80
|
+
period_configs: [],
|
|
81
|
+
spotsensorconnect: null,
|
|
82
|
+
last_maxmin: {
|
|
83
|
+
id: 13675,
|
|
84
|
+
config_id: 2540,
|
|
85
|
+
max: 0,
|
|
86
|
+
min: 0,
|
|
87
|
+
created_at: '2025-11-27',
|
|
88
|
+
min_created_at: '2025-11-27T14:47:59Z',
|
|
89
|
+
max_created_at: '2025-11-27T14:47:59Z',
|
|
90
|
+
},
|
|
91
|
+
user_receive_email: [],
|
|
92
|
+
phone_send_sms: [],
|
|
93
|
+
status_configuration: {},
|
|
94
|
+
is_auto_release: false,
|
|
95
|
+
related_actions: [],
|
|
96
|
+
active: true,
|
|
97
|
+
name: 'temperature',
|
|
98
|
+
is_read: true,
|
|
99
|
+
is_write: false,
|
|
100
|
+
range_min: null,
|
|
101
|
+
range_max: null,
|
|
102
|
+
unit: '',
|
|
103
|
+
scale: 1,
|
|
104
|
+
is_main: true,
|
|
105
|
+
is_chart: true,
|
|
106
|
+
is_report: true,
|
|
107
|
+
is_chart_column: false,
|
|
108
|
+
is_hide: false,
|
|
109
|
+
display_type: '',
|
|
110
|
+
is_alarm: false,
|
|
111
|
+
email_flags: false,
|
|
112
|
+
time_is_over: null,
|
|
113
|
+
maintain_time: 5,
|
|
114
|
+
number_send_email: null,
|
|
115
|
+
period_send_email: 15,
|
|
116
|
+
allow_min_value: 0,
|
|
117
|
+
allow_max_value: 0,
|
|
118
|
+
message: 'Thông báo.',
|
|
119
|
+
last_time_send_email: null,
|
|
120
|
+
ai_trans_offset_value: '0.000',
|
|
121
|
+
ai_trans_average_sample: 0,
|
|
122
|
+
last_values: [],
|
|
123
|
+
icon: '',
|
|
124
|
+
scale_write: 1,
|
|
125
|
+
lock: false,
|
|
126
|
+
flag: false,
|
|
127
|
+
index: 0,
|
|
128
|
+
decimal_behind: null,
|
|
129
|
+
active_filter: '',
|
|
130
|
+
high_level: 0,
|
|
131
|
+
low_level: 0,
|
|
132
|
+
value_converter: '',
|
|
133
|
+
ack: false,
|
|
134
|
+
sensor_type: '',
|
|
135
|
+
value_type: 'number',
|
|
136
|
+
enable_log_max_min: true,
|
|
137
|
+
log_value_mode: 1,
|
|
138
|
+
freq_log_data: 600,
|
|
139
|
+
number_days_storage: 365,
|
|
140
|
+
storage_start_date: '2025-06-09',
|
|
141
|
+
release_time: 0,
|
|
142
|
+
sensor: 459,
|
|
143
|
+
end_device: null,
|
|
144
|
+
last_value: null,
|
|
145
|
+
last_value_log: null,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: 2541,
|
|
149
|
+
status_texts: [],
|
|
150
|
+
is_on: false,
|
|
151
|
+
get_value_unit: '999.0 ',
|
|
152
|
+
period_configs: [],
|
|
153
|
+
spotsensorconnect: null,
|
|
154
|
+
last_maxmin: {
|
|
155
|
+
id: 13676,
|
|
156
|
+
config_id: 2541,
|
|
157
|
+
max: 999,
|
|
158
|
+
min: 999,
|
|
159
|
+
created_at: '2025-11-27',
|
|
160
|
+
min_created_at: '2025-11-27T14:47:59Z',
|
|
161
|
+
max_created_at: '2025-11-27T14:47:59Z',
|
|
162
|
+
},
|
|
163
|
+
user_receive_email: [],
|
|
164
|
+
phone_send_sms: [],
|
|
165
|
+
status_configuration: {},
|
|
166
|
+
is_auto_release: false,
|
|
167
|
+
related_actions: [],
|
|
168
|
+
active: true,
|
|
169
|
+
name: 'volt',
|
|
170
|
+
is_read: true,
|
|
171
|
+
is_write: false,
|
|
172
|
+
range_min: null,
|
|
173
|
+
range_max: null,
|
|
174
|
+
unit: '',
|
|
175
|
+
scale: 1,
|
|
176
|
+
is_main: true,
|
|
177
|
+
is_chart: true,
|
|
178
|
+
is_report: true,
|
|
179
|
+
is_chart_column: false,
|
|
180
|
+
is_hide: false,
|
|
181
|
+
display_type: '',
|
|
182
|
+
is_alarm: false,
|
|
183
|
+
email_flags: false,
|
|
184
|
+
time_is_over: null,
|
|
185
|
+
maintain_time: 5,
|
|
186
|
+
number_send_email: null,
|
|
187
|
+
period_send_email: 15,
|
|
188
|
+
allow_min_value: 0,
|
|
189
|
+
allow_max_value: 0,
|
|
190
|
+
message: 'Thông báo.',
|
|
191
|
+
last_time_send_email: null,
|
|
192
|
+
ai_trans_offset_value: '0.000',
|
|
193
|
+
ai_trans_average_sample: 0,
|
|
194
|
+
last_values: [],
|
|
195
|
+
icon: '',
|
|
196
|
+
scale_write: 1,
|
|
197
|
+
lock: false,
|
|
198
|
+
flag: false,
|
|
199
|
+
index: 0,
|
|
200
|
+
decimal_behind: null,
|
|
201
|
+
active_filter: '',
|
|
202
|
+
high_level: 0,
|
|
203
|
+
low_level: 0,
|
|
204
|
+
value_converter: '',
|
|
205
|
+
ack: false,
|
|
206
|
+
sensor_type: '',
|
|
207
|
+
value_type: 'number',
|
|
208
|
+
enable_log_max_min: true,
|
|
209
|
+
log_value_mode: 1,
|
|
210
|
+
freq_log_data: 600,
|
|
211
|
+
number_days_storage: 365,
|
|
212
|
+
storage_start_date: '2025-06-09',
|
|
213
|
+
release_time: 0,
|
|
214
|
+
sensor: 459,
|
|
215
|
+
end_device: null,
|
|
216
|
+
last_value: null,
|
|
217
|
+
last_value_log: null,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
id: 2542,
|
|
221
|
+
status_texts: [],
|
|
222
|
+
is_on: false,
|
|
223
|
+
get_value_unit: '66.0 ',
|
|
224
|
+
period_configs: [],
|
|
225
|
+
spotsensorconnect: null,
|
|
226
|
+
last_maxmin: {
|
|
227
|
+
id: 13677,
|
|
228
|
+
config_id: 2542,
|
|
229
|
+
max: 66,
|
|
230
|
+
min: 58,
|
|
231
|
+
created_at: '2025-11-27',
|
|
232
|
+
min_created_at: '2025-11-27T14:57:59Z',
|
|
233
|
+
max_created_at: '2025-11-27T14:47:59Z',
|
|
234
|
+
},
|
|
235
|
+
user_receive_email: [],
|
|
236
|
+
phone_send_sms: [],
|
|
237
|
+
status_configuration: {},
|
|
238
|
+
is_auto_release: false,
|
|
239
|
+
related_actions: [],
|
|
240
|
+
active: true,
|
|
241
|
+
name: 'signal',
|
|
242
|
+
is_read: true,
|
|
243
|
+
is_write: false,
|
|
244
|
+
range_min: null,
|
|
245
|
+
range_max: null,
|
|
246
|
+
unit: '',
|
|
247
|
+
scale: 1,
|
|
248
|
+
is_main: true,
|
|
249
|
+
is_chart: true,
|
|
250
|
+
is_report: true,
|
|
251
|
+
is_chart_column: false,
|
|
252
|
+
is_hide: false,
|
|
253
|
+
display_type: '',
|
|
254
|
+
is_alarm: false,
|
|
255
|
+
email_flags: false,
|
|
256
|
+
time_is_over: null,
|
|
257
|
+
maintain_time: 5,
|
|
258
|
+
number_send_email: null,
|
|
259
|
+
period_send_email: 15,
|
|
260
|
+
allow_min_value: 0,
|
|
261
|
+
allow_max_value: 0,
|
|
262
|
+
message: 'Thông báo.',
|
|
263
|
+
last_time_send_email: null,
|
|
264
|
+
ai_trans_offset_value: '0.000',
|
|
265
|
+
ai_trans_average_sample: 0,
|
|
266
|
+
last_values: [],
|
|
267
|
+
icon: '',
|
|
268
|
+
scale_write: 1,
|
|
269
|
+
lock: false,
|
|
270
|
+
flag: false,
|
|
271
|
+
index: 0,
|
|
272
|
+
decimal_behind: null,
|
|
273
|
+
active_filter: '',
|
|
274
|
+
high_level: 0,
|
|
275
|
+
low_level: 0,
|
|
276
|
+
value_converter: '',
|
|
277
|
+
ack: false,
|
|
278
|
+
sensor_type: '',
|
|
279
|
+
value_type: 'number',
|
|
280
|
+
enable_log_max_min: true,
|
|
281
|
+
log_value_mode: 1,
|
|
282
|
+
freq_log_data: 600,
|
|
283
|
+
number_days_storage: 365,
|
|
284
|
+
storage_start_date: '2025-06-09',
|
|
285
|
+
release_time: 0,
|
|
286
|
+
sensor: 459,
|
|
287
|
+
end_device: null,
|
|
288
|
+
last_value: null,
|
|
289
|
+
last_value_log: null,
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: 2543,
|
|
293
|
+
status_texts: [],
|
|
294
|
+
is_on: false,
|
|
295
|
+
get_value_unit: '68.0 ',
|
|
296
|
+
period_configs: [],
|
|
297
|
+
spotsensorconnect: null,
|
|
298
|
+
last_maxmin: {
|
|
299
|
+
id: 13678,
|
|
300
|
+
config_id: 2543,
|
|
301
|
+
max: 68,
|
|
302
|
+
min: 6,
|
|
303
|
+
created_at: '2025-11-27',
|
|
304
|
+
min_created_at: '2025-11-27T14:57:59Z',
|
|
305
|
+
max_created_at: '2025-11-27T15:27:59Z',
|
|
306
|
+
},
|
|
307
|
+
user_receive_email: [],
|
|
308
|
+
phone_send_sms: [],
|
|
309
|
+
status_configuration: {},
|
|
310
|
+
is_auto_release: false,
|
|
311
|
+
related_actions: [],
|
|
312
|
+
active: true,
|
|
313
|
+
name: 'modbus_fail',
|
|
314
|
+
is_read: true,
|
|
315
|
+
is_write: false,
|
|
316
|
+
range_min: null,
|
|
317
|
+
range_max: null,
|
|
318
|
+
unit: '',
|
|
319
|
+
scale: 1,
|
|
320
|
+
is_main: true,
|
|
321
|
+
is_chart: true,
|
|
322
|
+
is_report: true,
|
|
323
|
+
is_chart_column: false,
|
|
324
|
+
is_hide: false,
|
|
325
|
+
display_type: '',
|
|
326
|
+
is_alarm: false,
|
|
327
|
+
email_flags: false,
|
|
328
|
+
time_is_over: null,
|
|
329
|
+
maintain_time: 5,
|
|
330
|
+
number_send_email: null,
|
|
331
|
+
period_send_email: 15,
|
|
332
|
+
allow_min_value: 0,
|
|
333
|
+
allow_max_value: 0,
|
|
334
|
+
message: 'Thông báo.',
|
|
335
|
+
last_time_send_email: null,
|
|
336
|
+
ai_trans_offset_value: '0.000',
|
|
337
|
+
ai_trans_average_sample: 0,
|
|
338
|
+
last_values: [],
|
|
339
|
+
icon: '',
|
|
340
|
+
scale_write: 1,
|
|
341
|
+
lock: false,
|
|
342
|
+
flag: false,
|
|
343
|
+
index: 0,
|
|
344
|
+
decimal_behind: null,
|
|
345
|
+
active_filter: '',
|
|
346
|
+
high_level: 0,
|
|
347
|
+
low_level: 0,
|
|
348
|
+
value_converter: '',
|
|
349
|
+
ack: false,
|
|
350
|
+
sensor_type: '',
|
|
351
|
+
value_type: 'number',
|
|
352
|
+
enable_log_max_min: true,
|
|
353
|
+
log_value_mode: 1,
|
|
354
|
+
freq_log_data: 600,
|
|
355
|
+
number_days_storage: 365,
|
|
356
|
+
storage_start_date: '2025-06-09',
|
|
357
|
+
release_time: 0,
|
|
358
|
+
sensor: 459,
|
|
359
|
+
end_device: null,
|
|
360
|
+
last_value: null,
|
|
361
|
+
last_value_log: null,
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
id: 2544,
|
|
365
|
+
status_texts: [],
|
|
366
|
+
is_on: false,
|
|
367
|
+
get_value_unit: '68.0 ',
|
|
368
|
+
period_configs: [],
|
|
369
|
+
spotsensorconnect: null,
|
|
370
|
+
last_maxmin: {
|
|
371
|
+
id: 13679,
|
|
372
|
+
config_id: 2544,
|
|
373
|
+
max: 68,
|
|
374
|
+
min: 7,
|
|
375
|
+
created_at: '2025-11-27',
|
|
376
|
+
min_created_at: '2025-11-27T14:57:59Z',
|
|
377
|
+
max_created_at: '2025-11-27T15:27:59Z',
|
|
378
|
+
},
|
|
379
|
+
user_receive_email: [],
|
|
380
|
+
phone_send_sms: [],
|
|
381
|
+
status_configuration: {},
|
|
382
|
+
is_auto_release: false,
|
|
383
|
+
related_actions: [],
|
|
384
|
+
active: true,
|
|
385
|
+
name: 'modbus_total',
|
|
386
|
+
is_read: true,
|
|
387
|
+
is_write: false,
|
|
388
|
+
range_min: null,
|
|
389
|
+
range_max: null,
|
|
390
|
+
unit: '',
|
|
391
|
+
scale: 1,
|
|
392
|
+
is_main: true,
|
|
393
|
+
is_chart: true,
|
|
394
|
+
is_report: true,
|
|
395
|
+
is_chart_column: false,
|
|
396
|
+
is_hide: false,
|
|
397
|
+
display_type: '',
|
|
398
|
+
is_alarm: false,
|
|
399
|
+
email_flags: false,
|
|
400
|
+
time_is_over: null,
|
|
401
|
+
maintain_time: 5,
|
|
402
|
+
number_send_email: null,
|
|
403
|
+
period_send_email: 15,
|
|
404
|
+
allow_min_value: 0,
|
|
405
|
+
allow_max_value: 0,
|
|
406
|
+
message: 'Thông báo.',
|
|
407
|
+
last_time_send_email: null,
|
|
408
|
+
ai_trans_offset_value: '0.000',
|
|
409
|
+
ai_trans_average_sample: 0,
|
|
410
|
+
last_values: [],
|
|
411
|
+
icon: '',
|
|
412
|
+
scale_write: 1,
|
|
413
|
+
lock: false,
|
|
414
|
+
flag: false,
|
|
415
|
+
index: 0,
|
|
416
|
+
decimal_behind: null,
|
|
417
|
+
active_filter: '',
|
|
418
|
+
high_level: 0,
|
|
419
|
+
low_level: 0,
|
|
420
|
+
value_converter: '',
|
|
421
|
+
ack: false,
|
|
422
|
+
sensor_type: '',
|
|
423
|
+
value_type: 'number',
|
|
424
|
+
enable_log_max_min: true,
|
|
425
|
+
log_value_mode: 1,
|
|
426
|
+
freq_log_data: 600,
|
|
427
|
+
number_days_storage: 365,
|
|
428
|
+
storage_start_date: '2025-06-09',
|
|
429
|
+
release_time: 0,
|
|
430
|
+
sensor: 459,
|
|
431
|
+
end_device: null,
|
|
432
|
+
last_value: null,
|
|
433
|
+
last_value_log: null,
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: 2545,
|
|
437
|
+
status_texts: [],
|
|
438
|
+
is_on: false,
|
|
439
|
+
get_value_unit: '7500.0 ',
|
|
440
|
+
period_configs: [],
|
|
441
|
+
spotsensorconnect: null,
|
|
442
|
+
last_maxmin: {
|
|
443
|
+
id: 13680,
|
|
444
|
+
config_id: 2545,
|
|
445
|
+
max: 7500,
|
|
446
|
+
min: 7388,
|
|
447
|
+
created_at: '2025-11-27',
|
|
448
|
+
min_created_at: '2025-11-27T14:47:59Z',
|
|
449
|
+
max_created_at: '2025-11-27T15:27:59Z',
|
|
450
|
+
},
|
|
451
|
+
user_receive_email: [],
|
|
452
|
+
phone_send_sms: [],
|
|
453
|
+
status_configuration: {},
|
|
454
|
+
is_auto_release: false,
|
|
455
|
+
related_actions: [],
|
|
456
|
+
active: true,
|
|
457
|
+
name: 'internal_temperature',
|
|
458
|
+
is_read: true,
|
|
459
|
+
is_write: false,
|
|
460
|
+
range_min: null,
|
|
461
|
+
range_max: null,
|
|
462
|
+
unit: '',
|
|
463
|
+
scale: 1,
|
|
464
|
+
is_main: true,
|
|
465
|
+
is_chart: true,
|
|
466
|
+
is_report: true,
|
|
467
|
+
is_chart_column: false,
|
|
468
|
+
is_hide: false,
|
|
469
|
+
display_type: '',
|
|
470
|
+
is_alarm: false,
|
|
471
|
+
email_flags: false,
|
|
472
|
+
time_is_over: null,
|
|
473
|
+
maintain_time: 5,
|
|
474
|
+
number_send_email: null,
|
|
475
|
+
period_send_email: 15,
|
|
476
|
+
allow_min_value: 0,
|
|
477
|
+
allow_max_value: 0,
|
|
478
|
+
message: 'Thông báo.',
|
|
479
|
+
last_time_send_email: null,
|
|
480
|
+
ai_trans_offset_value: '0.000',
|
|
481
|
+
ai_trans_average_sample: 0,
|
|
482
|
+
last_values: [],
|
|
483
|
+
icon: '',
|
|
484
|
+
scale_write: 1,
|
|
485
|
+
lock: false,
|
|
486
|
+
flag: false,
|
|
487
|
+
index: 0,
|
|
488
|
+
decimal_behind: null,
|
|
489
|
+
active_filter: '',
|
|
490
|
+
high_level: 0,
|
|
491
|
+
low_level: 0,
|
|
492
|
+
value_converter: '',
|
|
493
|
+
ack: false,
|
|
494
|
+
sensor_type: '',
|
|
495
|
+
value_type: 'number',
|
|
496
|
+
enable_log_max_min: true,
|
|
497
|
+
log_value_mode: 1,
|
|
498
|
+
freq_log_data: 600,
|
|
499
|
+
number_days_storage: 365,
|
|
500
|
+
storage_start_date: '2025-06-09',
|
|
501
|
+
release_time: 0,
|
|
502
|
+
sensor: 459,
|
|
503
|
+
end_device: null,
|
|
504
|
+
last_value: null,
|
|
505
|
+
last_value_log: null,
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
id: 2546,
|
|
509
|
+
status_texts: [],
|
|
510
|
+
is_on: false,
|
|
511
|
+
get_value_unit: '0.0 ',
|
|
512
|
+
period_configs: [],
|
|
513
|
+
spotsensorconnect: null,
|
|
514
|
+
last_maxmin: {
|
|
515
|
+
id: 13681,
|
|
516
|
+
config_id: 2546,
|
|
517
|
+
max: 0,
|
|
518
|
+
min: 0,
|
|
519
|
+
created_at: '2025-11-27',
|
|
520
|
+
min_created_at: '2025-11-27T14:47:59Z',
|
|
521
|
+
max_created_at: '2025-11-27T14:47:59Z',
|
|
522
|
+
},
|
|
523
|
+
user_receive_email: [],
|
|
524
|
+
phone_send_sms: [],
|
|
525
|
+
status_configuration: {},
|
|
526
|
+
is_auto_release: false,
|
|
527
|
+
related_actions: [],
|
|
528
|
+
active: true,
|
|
529
|
+
name: 'is_battery',
|
|
530
|
+
is_read: true,
|
|
531
|
+
is_write: false,
|
|
532
|
+
range_min: null,
|
|
533
|
+
range_max: null,
|
|
534
|
+
unit: '',
|
|
535
|
+
scale: 1,
|
|
536
|
+
is_main: true,
|
|
537
|
+
is_chart: true,
|
|
538
|
+
is_report: true,
|
|
539
|
+
is_chart_column: false,
|
|
540
|
+
is_hide: false,
|
|
541
|
+
display_type: '',
|
|
542
|
+
is_alarm: false,
|
|
543
|
+
email_flags: false,
|
|
544
|
+
time_is_over: null,
|
|
545
|
+
maintain_time: 5,
|
|
546
|
+
number_send_email: null,
|
|
547
|
+
period_send_email: 15,
|
|
548
|
+
allow_min_value: 0,
|
|
549
|
+
allow_max_value: 0,
|
|
550
|
+
message: 'Thông báo.',
|
|
551
|
+
last_time_send_email: null,
|
|
552
|
+
ai_trans_offset_value: '0.000',
|
|
553
|
+
ai_trans_average_sample: 0,
|
|
554
|
+
last_values: [],
|
|
555
|
+
icon: '',
|
|
556
|
+
scale_write: 1,
|
|
557
|
+
lock: false,
|
|
558
|
+
flag: false,
|
|
559
|
+
index: 0,
|
|
560
|
+
decimal_behind: null,
|
|
561
|
+
active_filter: '',
|
|
562
|
+
high_level: 0,
|
|
563
|
+
low_level: 0,
|
|
564
|
+
value_converter: '',
|
|
565
|
+
ack: false,
|
|
566
|
+
sensor_type: '',
|
|
567
|
+
value_type: 'number',
|
|
568
|
+
enable_log_max_min: true,
|
|
569
|
+
log_value_mode: 1,
|
|
570
|
+
freq_log_data: 600,
|
|
571
|
+
number_days_storage: 365,
|
|
572
|
+
storage_start_date: '2025-06-09',
|
|
573
|
+
release_time: 0,
|
|
574
|
+
sensor: 459,
|
|
575
|
+
end_device: null,
|
|
576
|
+
last_value: null,
|
|
577
|
+
last_value_log: null,
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
id: 2547,
|
|
581
|
+
status_texts: [],
|
|
582
|
+
is_on: false,
|
|
583
|
+
get_value_unit: '1 ',
|
|
584
|
+
period_configs: [],
|
|
585
|
+
spotsensorconnect: null,
|
|
586
|
+
last_maxmin: {
|
|
587
|
+
id: 13672,
|
|
588
|
+
config_id: 2547,
|
|
589
|
+
max: 1,
|
|
590
|
+
min: 0,
|
|
591
|
+
created_at: '2025-11-27',
|
|
592
|
+
min_created_at: '2025-11-27T15:38:02.346037Z',
|
|
593
|
+
max_created_at: '2025-11-27T14:34:35.852706Z',
|
|
594
|
+
},
|
|
595
|
+
user_receive_email: [],
|
|
596
|
+
phone_send_sms: [],
|
|
597
|
+
status_configuration: {},
|
|
598
|
+
is_auto_release: false,
|
|
599
|
+
related_actions: [],
|
|
600
|
+
active: true,
|
|
601
|
+
name: 'is_online',
|
|
602
|
+
is_read: true,
|
|
603
|
+
is_write: false,
|
|
604
|
+
range_min: null,
|
|
605
|
+
range_max: null,
|
|
606
|
+
unit: '',
|
|
607
|
+
scale: 1,
|
|
608
|
+
is_main: true,
|
|
609
|
+
is_chart: true,
|
|
610
|
+
is_report: true,
|
|
611
|
+
is_chart_column: false,
|
|
612
|
+
is_hide: false,
|
|
613
|
+
display_type: '',
|
|
614
|
+
is_alarm: false,
|
|
615
|
+
email_flags: false,
|
|
616
|
+
time_is_over: null,
|
|
617
|
+
maintain_time: 5,
|
|
618
|
+
number_send_email: null,
|
|
619
|
+
period_send_email: 15,
|
|
620
|
+
allow_min_value: 0,
|
|
621
|
+
allow_max_value: 0,
|
|
622
|
+
message: 'Thông báo.',
|
|
623
|
+
last_time_send_email: null,
|
|
624
|
+
ai_trans_offset_value: '0.000',
|
|
625
|
+
ai_trans_average_sample: 0,
|
|
626
|
+
last_values: [],
|
|
627
|
+
icon: '',
|
|
628
|
+
scale_write: 1,
|
|
629
|
+
lock: false,
|
|
630
|
+
flag: false,
|
|
631
|
+
index: 0,
|
|
632
|
+
decimal_behind: null,
|
|
633
|
+
active_filter: '',
|
|
634
|
+
high_level: 0,
|
|
635
|
+
low_level: 0,
|
|
636
|
+
value_converter: '',
|
|
637
|
+
ack: false,
|
|
638
|
+
sensor_type: '',
|
|
639
|
+
value_type: 'number',
|
|
640
|
+
enable_log_max_min: true,
|
|
641
|
+
log_value_mode: 1,
|
|
642
|
+
freq_log_data: 600,
|
|
643
|
+
number_days_storage: 365,
|
|
644
|
+
storage_start_date: '2025-06-09',
|
|
645
|
+
release_time: 0,
|
|
646
|
+
sensor: 459,
|
|
647
|
+
end_device: null,
|
|
648
|
+
last_value: null,
|
|
649
|
+
last_value_log: null,
|
|
650
|
+
},
|
|
651
|
+
],
|
|
652
|
+
active: true,
|
|
653
|
+
name: 'self',
|
|
654
|
+
mix: true,
|
|
655
|
+
index: 0,
|
|
656
|
+
icon: '',
|
|
657
|
+
is_managed_by_backend: true,
|
|
658
|
+
device_id: '',
|
|
659
|
+
last_updated: null,
|
|
660
|
+
connection_time: 30,
|
|
661
|
+
sent_email: false,
|
|
662
|
+
realtime_monitoring: false,
|
|
663
|
+
chip: 177,
|
|
664
|
+
icon_kit: null,
|
|
665
|
+
};
|
|
666
|
+
|
|
72
667
|
export const gatewayDataFactory = {
|
|
73
668
|
code: 'code-123',
|
|
74
669
|
name: 'Son chip - esp32 2',
|
|
@@ -507,7 +1102,9 @@ export const gatewayDataFactory = {
|
|
|
507
1102
|
chip: 3,
|
|
508
1103
|
icon_kit: null,
|
|
509
1104
|
},
|
|
1105
|
+
selfSensorDataFactory,
|
|
510
1106
|
],
|
|
1107
|
+
self_sensor: selfSensorDataFactory,
|
|
511
1108
|
id: 7689,
|
|
512
1109
|
sn: '57ae596e-ef65-4162-9b6f-4f67f2c86632',
|
|
513
1110
|
interchange_throttle: 20,
|
|
@@ -224,6 +224,14 @@ export default {
|
|
|
224
224
|
don_t_have_an_account: "Don't have an account?",
|
|
225
225
|
please_enter_your_phone_number: 'Please enter your phone number',
|
|
226
226
|
please_enter_your_password: 'Please enter your password',
|
|
227
|
+
password_must_be_strong:
|
|
228
|
+
'Password must be strong! ( at least 1 uppercase, 1 lowercase, 1 number and more than 8 characters )',
|
|
229
|
+
create_password: 'Create password',
|
|
230
|
+
create_password_successfully: 'Create password successfully',
|
|
231
|
+
new_password: 'New password',
|
|
232
|
+
you_need_to_update_password: 'You need to update your password',
|
|
233
|
+
update_your_password: 'Update your password',
|
|
234
|
+
update: 'Update',
|
|
227
235
|
text_email: 'Email',
|
|
228
236
|
please_enter_your_email: 'Please enter your email',
|
|
229
237
|
please_enter_your_name: 'Please enter your name',
|
|
@@ -726,6 +734,7 @@ export default {
|
|
|
726
734
|
'Your parking session will end after 15 minutes. Move your car or extend your parking session now.',
|
|
727
735
|
ok_and_got_it: 'Ok',
|
|
728
736
|
notify_back: 'Are you sure to go back?',
|
|
737
|
+
notify_to: 'Notify to',
|
|
729
738
|
notifications: 'Notifications',
|
|
730
739
|
notification: 'Notification',
|
|
731
740
|
send_notification: 'Send Notification',
|
|
@@ -1395,6 +1404,7 @@ export default {
|
|
|
1395
1404
|
"Don't turn off the device or close this app during the setup process. Setup may take few minutes to complete.",
|
|
1396
1405
|
unidentified: 'Unidentified',
|
|
1397
1406
|
select_all: 'Select All',
|
|
1407
|
+
deselect_all: 'Deselect All',
|
|
1398
1408
|
turn_off_device: 'Turn off device',
|
|
1399
1409
|
turn_off_device_when_scan_qr_guide:
|
|
1400
1410
|
'Turn off the device you want to add new before scanning the QR code. Press ‘’OK’’ to continue.',
|
|
@@ -296,6 +296,14 @@ export default {
|
|
|
296
296
|
don_t_have_an_account: 'Bạn chưa có tài khoản?',
|
|
297
297
|
please_enter_your_phone_number: 'Vui lòng nhập số điện thoại',
|
|
298
298
|
please_enter_your_password: 'Vui lòng nhập mật khẩu',
|
|
299
|
+
password_must_be_strong:
|
|
300
|
+
'Mật khẩu phải mạnh! ( ít nhất 1 chữ hoa, 1 chữ thường, 1 số và nhiều hơn 8 ký tự )',
|
|
301
|
+
create_password: 'Tạo mật khẩu',
|
|
302
|
+
create_password_successfully: 'Tạo mật khẩu thành công',
|
|
303
|
+
new_password: 'Mật khẩu mới',
|
|
304
|
+
you_need_to_update_password: 'Bạn cần cập nhật mật khẩu',
|
|
305
|
+
update_your_password: 'Cập nhật mật khẩu của bạn',
|
|
306
|
+
update: 'Cập nhật',
|
|
299
307
|
text_email: 'Email',
|
|
300
308
|
please_enter_your_email: 'Vui lòng nhập email',
|
|
301
309
|
please_enter_your_name: 'Vui lòng nhập tên',
|
|
@@ -749,6 +757,7 @@ export default {
|
|
|
749
757
|
'Phiên đỗ xe của bạn sẽ kết thúc trong 15 phút nữa. Di chuyển xe của bạn hoặc chọn thêm giờ đỗ.',
|
|
750
758
|
ok_and_got_it: 'Tôi đã hiểu',
|
|
751
759
|
notify_back: 'Bạn có chắc chắn trở lại ko?',
|
|
760
|
+
notify_to: 'Thông báo tới',
|
|
752
761
|
notifications: 'Thông báo',
|
|
753
762
|
notification: 'Thông báo',
|
|
754
763
|
send_notification: 'Gửi thông báo',
|
|
@@ -1397,6 +1406,7 @@ export default {
|
|
|
1397
1406
|
'phút để hoàn thành.',
|
|
1398
1407
|
unidentified: 'Chưa xếp vào phòng',
|
|
1399
1408
|
select_all: 'Chọn tất cả',
|
|
1409
|
+
deselect_all: 'Bỏ chọn tất cả',
|
|
1400
1410
|
turn_off_device: 'Tắt thiết bị',
|
|
1401
1411
|
turn_off_device_when_scan_qr_guide:
|
|
1402
1412
|
'Tắt thiết bị bạn muốn thêm mới trước khi quét mã QR. Nhấn ‘’OK’’ để tiếp tục.',
|
package/src/utils/Route/index.js
CHANGED
|
@@ -142,8 +142,9 @@ const Routes = {
|
|
|
142
142
|
SetupScriptEmail: 'SetupScriptEmail',
|
|
143
143
|
SetupScriptSms: 'SetupScriptSms',
|
|
144
144
|
SetupScriptReceiverEmail: 'SetupScriptReceiverEmail',
|
|
145
|
-
|
|
145
|
+
SetupScriptReceiverNotify: 'SetupScriptReceiverNotify',
|
|
146
146
|
SetupScriptReceiverSms: 'SetupScriptReceiverSms',
|
|
147
|
+
UpdateReceiverEmailScript: 'UpdateReceiverEmailScript',
|
|
147
148
|
UpdateReceiverSmsScript: 'UpdateReceiverSmsScript',
|
|
148
149
|
ScenarioName: 'ScenarioName',
|
|
149
150
|
ValueChangeName: 'ValueChangeName',
|
|
@@ -177,6 +178,7 @@ const Routes = {
|
|
|
177
178
|
PasscodeList: 'PasscodeList',
|
|
178
179
|
ItemPasscode: 'ItemPasscode',
|
|
179
180
|
UnitMemberInformation: 'UnitMemberInformation',
|
|
181
|
+
CreatePassword: 'CreatePassword',
|
|
180
182
|
EnterPassword: 'EnterPassword',
|
|
181
183
|
SelectAddToFavorites: 'SelectAddToFavorites',
|
|
182
184
|
Template: 'Template',
|
package/src/utils/Validation.js
CHANGED
|
@@ -19,3 +19,8 @@ export const isValidURI = (uri) => {
|
|
|
19
19
|
const uriRegex = /^(rtsp|http|https):\/\/[^\s/$.?#].[^\s]*$/;
|
|
20
20
|
return uriRegex.test(uri);
|
|
21
21
|
};
|
|
22
|
+
|
|
23
|
+
export const isValidPassword = (password) => {
|
|
24
|
+
const regexPassword = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$/;
|
|
25
|
+
return regexPassword.test(password);
|
|
26
|
+
};
|