diff options
-rw-r--r-- | modern/src/main/DeviceRow.js | 15 | ||||
-rw-r--r-- | modern/src/settings/PreferencesPage.js | 1 | ||||
-rw-r--r-- | web/app/controller/Root.js | 3 | ||||
-rw-r--r-- | web/app/model/Device.js | 2 | ||||
-rw-r--r-- | web/app/view/edit/Devices.js | 22 |
5 files changed, 3 insertions, 40 deletions
diff --git a/modern/src/main/DeviceRow.js b/modern/src/main/DeviceRow.js index bf5aec3e..4dac8128 100644 --- a/modern/src/main/DeviceRow.js +++ b/modern/src/main/DeviceRow.js @@ -62,17 +62,6 @@ const DeviceRow = ({ data, index, style }) => { const devicePrimary = useAttributePreference('devicePrimary', 'name'); const deviceSecondary = useAttributePreference('deviceSecondary', ''); - const formatProperty = (key) => { - if (key === 'geofenceIds') { - const geofenceIds = item[key] || []; - return geofenceIds - .filter((id) => geofences.hasOwnProperty(id)) - .map((id) => geofences[id].name) - .join(', '); - } - return item[key]; - }; - const secondaryText = () => { let status; if (item.status === 'online' || !item.lastUpdate) { @@ -82,7 +71,7 @@ const DeviceRow = ({ data, index, style }) => { } return ( <> - {deviceSecondary && item[deviceSecondary] && `${formatProperty(deviceSecondary)} • `} + {deviceSecondary && item[deviceSecondary] && `${item[deviceSecondary]} • `} <span className={classes[getStatusColor(item.status)]}>{status}</span> </> ); @@ -101,7 +90,7 @@ const DeviceRow = ({ data, index, style }) => { </Avatar> </ListItemAvatar> <ListItemText - primary={formatProperty(devicePrimary)} + primary={item[deviceSecondary]} primaryTypographyProps={{ noWrap: true }} secondary={secondaryText()} secondaryTypographyProps={{ noWrap: true }} diff --git a/modern/src/settings/PreferencesPage.js b/modern/src/settings/PreferencesPage.js index fcf34739..a05924a9 100644 --- a/modern/src/settings/PreferencesPage.js +++ b/modern/src/settings/PreferencesPage.js @@ -27,7 +27,6 @@ const deviceFields = [ { id: 'phone', name: 'sharedPhone' }, { id: 'model', name: 'deviceModel' }, { id: 'contact', name: 'deviceContact' }, - { id: 'geofenceIds', name: 'sharedGeofences' }, ]; const useStyles = makeStyles((theme) => ({ diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index a37bc06f..22869f45 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -298,8 +298,7 @@ Ext.define('Traccar.controller.Root', { if (entity) { entity.set({ status: array[i].status, - lastUpdate: array[i].lastUpdate, - geofenceIds: array[i].geofenceIds + lastUpdate: array[i].lastUpdate }, { dirty: false }); diff --git a/web/app/model/Device.js b/web/app/model/Device.js index df6b09be..ca1e07a6 100644 --- a/web/app/model/Device.js +++ b/web/app/model/Device.js @@ -59,8 +59,6 @@ Ext.define('Traccar.model.Device', { name: 'disabled', type: 'boolean' }, { - name: 'geofenceIds' - }, { name: 'attributes' }] }); diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js index 21fdb32a..5f54202a 100644 --- a/web/app/view/edit/Devices.js +++ b/web/app/view/edit/Devices.js @@ -135,28 +135,6 @@ Ext.define('Traccar.view.edit.Devices', { hidden: true, filter: 'boolean' }, { - text: Strings.sharedGeofences, - dataIndex: 'geofenceIds', - hidden: true, - filter: { - type: 'arraylist', - idField: 'id', - labelField: 'name', - store: 'Geofences' - }, - renderer: function (value) { - var i, name, result = ''; - if (Ext.isArray(value)) { - for (i = 0; i < value.length; i++) { - name = Traccar.AttributeFormatter.geofenceIdFormatter(value[i]); - if (name) { - result += name + (i < value.length - 1 ? ', ' : ''); - } - } - } - return result; - } - }, { text: Strings.deviceStatus, dataIndex: 'status', filter: { |