diff options
Diffstat (limited to 'modern/src/common/attributes')
-rw-r--r-- | modern/src/common/attributes/usePositionAttributes.js | 52 | ||||
-rw-r--r-- | modern/src/common/attributes/usePositionProperties.js | 56 |
2 files changed, 52 insertions, 56 deletions
diff --git a/modern/src/common/attributes/usePositionAttributes.js b/modern/src/common/attributes/usePositionAttributes.js index 2d3c1bfe..d6ee5805 100644 --- a/modern/src/common/attributes/usePositionAttributes.js +++ b/modern/src/common/attributes/usePositionAttributes.js @@ -1,6 +1,58 @@ import { useMemo } from 'react'; export default (t) => useMemo(() => ({ + id: { + name: t('deviceIdentifier'), + type: 'number', + }, + latitude: { + name: t('positionLatitude'), + type: 'number', + }, + longitude: { + name: t('positionLongitude'), + type: 'number', + }, + speed: { + name: t('positionSpeed'), + type: 'number', + }, + course: { + name: t('positionCourse'), + type: 'number', + }, + altitude: { + name: t('positionAltitude'), + type: 'number', + }, + accuracy: { + name: t('positionAccuracy'), + type: 'number', + }, + valid: { + name: t('positionValid'), + type: 'boolean', + }, + protocol: { + name: t('positionProtocol'), + type: 'string', + }, + address: { + name: t('positionAddress'), + type: 'string', + }, + deviceTime: { + name: t('positionDeviceTime'), + type: 'string', + }, + fixTime: { + name: t('positionFixTime'), + type: 'string', + }, + serverTime: { + name: t('positionServerTime'), + type: 'string', + }, raw: { name: t('positionRaw'), type: 'string', diff --git a/modern/src/common/attributes/usePositionProperties.js b/modern/src/common/attributes/usePositionProperties.js deleted file mode 100644 index a31700d6..00000000 --- a/modern/src/common/attributes/usePositionProperties.js +++ /dev/null @@ -1,56 +0,0 @@ -import { useMemo } from 'react'; - -export default (t) => useMemo(() => ({ - id: { - name: t('deviceIdentifier'), - type: 'number', - }, - latitude: { - name: t('positionLatitude'), - type: 'number', - }, - longitude: { - name: t('positionLongitude'), - type: 'number', - }, - speed: { - name: t('positionSpeed'), - type: 'number', - }, - course: { - name: t('positionCourse'), - type: 'number', - }, - altitude: { - name: t('positionAltitude'), - type: 'number', - }, - accuracy: { - name: t('positionAccuracy'), - type: 'number', - }, - valid: { - name: t('positionValid'), - type: 'boolean', - }, - protocol: { - name: t('positionProtocol'), - type: 'string', - }, - address: { - name: t('positionAddress'), - type: 'string', - }, - deviceTime: { - name: t('positionDeviceTime'), - type: 'string', - }, - fixTime: { - name: t('positionFixTime'), - type: 'string', - }, - serverTime: { - name: t('positionServerTime'), - type: 'string', - }, -}), [t]); |