Global

Members

# constant APIUrls

To Do:
  • Use these variables instead of hardcoded URLs
  • Rename with prefix to indicate method. Example: APIV2_POST, APIV3_PATCH

View Source config/simpliciti-apis.js, line 7

# constant APIV3RequestDatetimeFormat

To Do:
  • Replace hardcoded moment format with these variables in the entire application

View Source config/simpliciti-apis.js, line 124

# constant autoRefreshMixin

Location module results can auto refresh each X seconds

View Source components/location/LocationResultsToolbar.vue, line 8

# blacklistedSearchModuleFormTabs

Some clients do not have right to perform a search realtime/history ib certain tab (i.g driver)

View Source components/location/LocationSidebar.vue, line 44

# circuitServiceDuration

Use now as end date if null is supplied

View Source services/entities/location-main-search-item.js, line 208

# currentFormattedAddress

Used by NearbyVehiclesFeature

View Source components/shared/geocoding/LocateAddressResults.vue, line 22

# currentLayoutName

Customize current layout name Used by V3 - Location Module - Table+Map mode -> To preserve the map if details windows is closed

View Source components/shared/TLayout/TLayout.vue, line 109

# constant defaultSensorsVisibility

Used by Diagnostics module to determine whenever to show/hide tor/ana by default

View Source services/diagnostics-service.js, line 7

# disableLeafletMapInvalidateSize

Prevent child maps to re-compute their size if hidden

View Source components/shared/MapToolbox/MapToolbox.vue, line 136

# constant envNames

Some frameworks prefix variables differently

To Do:
  • Resemble all the env names here (Each time you see process.env.VUE_APP..., replace with getEnvValue)

View Source services/env-service.js, line 7

# constant layoutStaticContext

Used by MapToolbox to hide itself if Table+Carto (i.g Location module) (Module context pattern)

View Source components/shared/TLayout/TLayout.vue, line 29

# constant LoginNewsMixin

  • Retrieves application messages from geonline news
  • Compute notice message like follow: newest message matching the current locale

View Source views/LoginModule.vue, line 11

# constant mitt

Mitt default instance

IMPORTANT NOTICE: Avoid using mitt as much as possible. Ask for alternative communication strategies.

View Source plugins/mitt.js, line 9

# constant providerState

Module context pattern

View Source components/nearby_vehicles/NearbyVehiclesFeature.vue, line 12

# constant wrapper

Map singleton that holds references to active maps.

View Source plugins/vue-map.js, line 10

Methods

# compiledLineStrings(state)

Group and compil multiples polylines in only one polyline

Parameters:
Name Type Description
state
Author:
  • FMA 2021-10-20 https://easyredmine.simpliciti.fr/issues/27249

View Source store/ecoConduite/circuit.js, line 124

# computeFilenameFromTableCode(code)

Parameters:
Name Type Default Description
code * table-export

i.g locationDetailsCircuit

View Source services/export-service.js, line 25

# consoRange(steps)

Renvoie les

Parameters:
Name Type Description
steps

View Source store/ecoConduite/circuit.js, line 24

# convertLinestringToPolylines()

APIV2: linestring can be String or Array of strings (Zone interdiction might split trip history sometimes)

View Source services/entities/trip-history-step.js, line 25

# createEchartDateValueTooltipFormatter(unit) → {Object}

Used by diagnostics module Expects echarts serie data item value to be [timestamp, value]

Parameters:
Name Type Description
unit String

i.g 'km'

options.i18n Object

i18n instance

View Source utils/echarts.js, line 10

echart series item tooltip formatter handler

Object

# createLeafletWrapperPolylineItem(linestring, options)

Wrapper for Leaflet polyline (Array of LatLng)

Parameters:
Name Type Description
linestring *
options *

View Source services/map-service.js, line 113

# createMarkerFromRealtimeItem(item)

Used by Location module (Real-time) to render real-time results in the map (Vehicle markers).

Parameters:
Name Type Description
item *

Wrapper on top of location item (main results) that includes a Leaflet icon.

View Source mixins/map.js, line 13

# createReplayController()

Transitions replay current position index (positions array index)

View Source services/diagnostics-service.js, line 17

# createSimplicitiErrorLogger()

Custom error logger. Initially, we use to send errors to server (APIV3) but this was disabled in favor of Sentry.

View Source plugins/error-logger.js, line 98

# createSinglePolylineEntity(item, singleLinestring, options)

Wrapper for Leaflet polyline (Array of LatLng)

Parameters:
Name Type Description
item *
singleLinestring *
options *

View Source mixins/map.js, line 81

# defineFeatureCircuitExecStepHighlightShowStartStopMarkers()

Used by CircuitRef / Location Will display Stop/Start markers when the user highlight a circuit exec step.

View Source config/features.js, line 10

# dispatchAlertForAPIV2Error(err, dispatch) → {*}

Parameters:
Name Type Description
err *
dispatch *

View Source store/location_module/history.js, line 22

*

# drawClientZones()

Draws client zones on the map based on the current bounds. Clustering is enabled at certain zoom levels. If non-clustering, zones are filtered out if outside viewport.

View Source components/shared/SimplicitiMap/draw-zones-mixin.js, line 46

# drawLocateAddressMarker(mapVm, lat, lng, formattedAddress, options)

Used by

  • LocationAddressNatural.vue (Autocomplete)
  • LocateAddressFeature (Form)
  • LocateAddressLatLng (Reverse)
Parameters:
Name Type Description
mapVm *
lat *
lng *
formattedAddress *
options *

View Source components/shared/geocoding/geocoding-mixin.js, line 185

# drawPositionsMarkersFromData()

Draw common position markers (without sensor data) Border: Same as trip history Fill: #cccccc (Same as V2)

View Source components/shared/SimplicitiMap/draw-positions-markers-mixin.js, line 282

# drawSensorMarkersFromData()

Draw sensor markers (positions with sensor data) using LeafletMap::drawGeometries Border: Trip history polyline color Fill: Sensor color

View Source components/shared/SimplicitiMap/draw-positions-markers-mixin.js, line 341

# echartMixin(echarts, domElement)

Wrapper on top of echart vue components

Parameters:
Name Type Description
echarts Object

Echarts core singleton (i.e import * as echarts from 'echarts/core'; echarts.use([GaugeChart, CanvasRenderer]))

domElement Object

Dom element used to render the chart

options.optionsHandler function

Handler to compute echart options

View Source mixins/echarts-mixin.js, line 22

Example
{
mixins: [
    echartMixin((vm) => vm.$refs.chart, {
      optionsHandler: createEchartInstanceOptions,
      renderOnMounted: true,
    }),
  ],
  watch:{
    value(){
      this.renderChart();
    }
  }
}

# encodeLoginNameClientId(loginName, clientId) → {String}

Used by settings store to cache settings parameters

Parameters:
Name Type Description
loginName *
clientId *

View Source services/auth-service.js, line 134

encoded string

String

# exportDatatable()

Parameters:
Name Type Description
options.data Array

arrayOfObjects

options.tableCode String

i.g locationIdentification

options.format String

csv/xls (default to csv)

options.columns Array

View Source services/export-service.js, line 44

# exportToCSV(arrayOfObjects, filename)

Parameters:
Name Type Description
arrayOfObjects *
filename *

View Source services/export-service.js, line 126

Example
exportToCSV([{name:"FOO",size:"200"},{name:"BAR",size:"300"}],"test")
exportToCSV([{name:"FOO",size:"200"},{name:"BAR",size:"300"}],"test",{columns:['NAME','SIZE']})

# exportToXLS(columns, data, name)

Parameters:
Name Type Description
columns Array
data Array
name *

i.g test

View Source services/export-service.js, line 76

Example
exportToXLS([{name:"FOO",size:"200"},{name:"BAR",size:"300"}],"test")
exportToXLS([{ name: "FOO", size: "200" },{ name: "BAR", size: "300" }],"test",{columns: {name:"NOMBRE",size:"TAMAÑO"},});
exportToXLS([{ name: "FOO", size: "200" },{ name: "BAR", size: "300" }],"test",{columns: ["NAME", "SIZE"]});

# fetchCircuits(transform)

Parameters:
Name Type Description
transform *
To Do:
  • SearchModule: Move the normalization from search_module into this function (default normalization)

View Source services/circuit-service.js, line 193

# fetchCircuitVersionSections(circuitId, versionId, circuitActivities)

Parameters:
Name Type Description
circuitId *
versionId *
circuitActivities Array

Circuit activities: Used during normalization

View Source services/circuit-reference-service.js, line 24

# fetchCircuitVersionStepLastExecutions(circuitId, versionId, sectionId)

Retrieve the last five circuit execution steps given a circuit, version and step id

Parameters:
Name Type Description
circuitId *
versionId *
sectionId *

View Source services/circuit-reference-service.js, line 144

# fetchEvents()

Used by events module.

  • Data used for: Map markers and table

Split: 5 element, then 1 date (i.g: 1 request per vehicle/date)

Parameters:
Name Type Description
options.elementIds Array

Vehicle or circuit ids [1,2,3]

options.dates Array

Dates ['2022-04-29'] or [Moment]

options.filters Object

Custom querystring parameters

options.elementType String

Helps build the uri (vehicle/circuit)

options.fetchOptions Object

Give options to axios

options.handleResults function

(results)=>({}) Each time results are available

To Do:
  • To be able to stop the search (i.g user stop an automatic search)

View Source services/events-service.js, line 98

# fetchEventsCumulation(elementIds, dates, options)

Replace JSON mock with hardcoded/auto-generated mock inside the code source (Optimize)

Parameters:
Name Type Description
elementIds *
dates *
options *

View Source services/events-service.js, line 314

# fetchVehicleCategories(transformer)

Parameters:
Name Type Description
transformer *
To Do:
  • Add server order/sort asc once 502 issue is resolved

View Source services/vehicle-service.js, line 255

# fetchVehicles(transformer)

  • @todo Add server order/sort asc once 502 issue is resolved
Parameters:
Name Type Description
transformer *

View Source services/vehicle-service.js, line 269

# formatLinestring(linestring)

Format a linestring for LPolyline

Parameters:
Name Type Description
linestring
Author:
  • FMA 2021-10-20 https://easyredmine.simpliciti.fr/issues/27249

View Source store/ecoConduite/circuit.js, line 78

# generateChartReferenceDataForDynamicSensor(sensorName)

Parameters:
Name Type Default Description
sensorName String tor

tor/ana

See:
  • colors.scss

View Source services/diagnostics-service.js, line 270

# generateLeafletGeometriesBulkAsync_DISABLED()

POC: Snap poylines to street (using a routing machine that hits an OSM server)

View Source components/shared/SimplicitiMap/LeafletMap.vue, line 329

# generateLeafletZoneGeometriesFromItem(item, param1)

Will generate a Circle/Polygon along with an access point icon and the Zone name (Text node)

Parameters:
Name Type Description
item *
param1 *

View Source composables/zones-module.js, line 854

# generateShortId(prefix)

Wrap unique id generator

Parameters:
Name Type Description
prefix *
To Do:
  • Replace shortid with a new algorithm (shortid is now unsafe: https://www.npmjs.com/package/shortid )

View Source utils/crypto.js, line 7

# getAppVersion() → {String}

View Source services/app-service.js, line 5

String

# getBearingFromTwoLatAndLng(prevLatLng, nextLatLng)

Used by Diagnostics module to compute the vehicle marker bearing angle.

Bearing from point A to B https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/

Parameters:
Name Type Description
prevLatLng *
nextLatLng *

View Source utils/map.js, line 41

# getBoxConfigurations()

View Source services/box-service.js, line 22

# getBoxSensorAssigments(boxConfigurationId)

  • Used by Diagnostics module
Parameters:
Name Type Description
boxConfigurationId *

View Source services/box-service.js, line 33

# getCanValueFromItem(item, canName)

Used by SensorsInfos to grab CAN values from an mixed object (location result or position result)

Parameters:
Name Type Description
item *
canName *

View Source services/sensors-service.js, line 71

# getCircuitExecutionDetails(circuitId, date)

Used by: Location - Main search -> History by Circuit Location - Main search -> History by Vehicle/Driver -> Circuit Tab

Parameters:
Name Type Description
circuitId Number

[OPTIONAL]

date String

Circuit execution start date

View Source services/circuit-service.js, line 22

Normalized circuit execution detail item

# getCircuitExecutionSteps(vehicleId, circuitId, fromDate, toDate)

Parameters:
Name Type Description
vehicleId Number
circuitId Number
fromDate String

Circuit execution start date

toDate String

Circuit execution end date

View Source services/circuit-service.js, line 152

# getClientChildsClientsProgressively(callback, options)

Parameters:
Name Type Description
callback function

Called each time a response is finish. Return false to abort operation.

options Object

axios wrapper get options

To Do:
  • Replace with getAPIV3Pooling Fetch client childs (clients) from current user progressively

View Source services/auth-service.js, line 73

# getClientLoginAsToken(jwt, clientId, userId)

Parameters:
Name Type Description
jwt *

api jwt need to be supplied manually (i.g: nested login as)

clientId *
userId *

View Source services/auth-service.js, line 34

# getClientLogoAsBase64(getOptions) → {String}

Grab logo client from APIV3

Parameters:
Name Type Description
getOptions Object

AXIOS options (Optional)

View Source services/auth-service.js, line 160

base64 or defaultValue

String

# getClientParameter(key, getOptions)

Parameters:
Name Type Description
key *
getOptions *
To Do:
  • Refactor/Move into client-service

View Source services/auth-service.js, line 144

# getClusterIcon(cluster)

Uses the same icon as identification module

Parameters:
Name Type Description
cluster *

View Source composables/zones-module.js, line 924

# getComputedLanguageCodeFromCountryCode(countryCode)

Parameters:
Name Type Description
countryCode *

View Source store/settings/index.js, line 75

# getDriverChronoStatus(value)

Parameters:
Name Type Description
value *
To Do:
  • Move to chrono-service

View Source services/entities/location-main-search-item.js, line 543

# getEnvValue(name) → {String}

Wrapper to retrieve env values. Adapt to different frameworks if needed (i.g vite)

Parameters:
Name Type Description
name *

View Source services/env-service.js, line 43

String

# getFirstProperty(object)

Used by: Location - Main search -> Real-time by Vehicle/Driver/Circuit

Parameters:
Name Type Description
object *

View Source services/circuit-service.js, line 114

# getHistoryAPIQueryStringDatePart(selectedDateRanges, isFirstAndLastDay,)

Helper to compute querystring date parameters (v2 historique APIs) from Array of date ranges.

Parameters:
Name Type Description
selectedDateRanges
isFirstAndLastDay,

Boolean that indicate if the search is for the first and last day

View Source store/location_module/helpers.js, line 147

# getItemsFromHistoryCircuitAPIV2Response(responseData)

Parses APIV2 response (by_circuit_dates) into flat array.

Note: Response can contain multiple "historique" (circuit executions) for a single date/circuit_id

Parameters:
Name Type Description
responseData Object

View Source store/location_module/helpers.js, line 59

Example
Input: apiv2_response.data.items
 Output: Array of histories (circuit)

# getItemsFromHistoryDriverAPIV2Response(responseData)

Parses APIV2 response (by_chauffeur_dates) into flat array.

Parameters:
Name Type Description
responseData Object

View Source store/location_module/helpers.js, line 31

Example
Input: apiv2_response.data.items
 Output: Array of histories (driver)

# getItemsFromHistoryVehicleDriverAPIV2Response(responseData)

Parses APIV2 response (by_vehicule_dates) into flat array.

Parameters:
Name Type Description
responseData Object

View Source store/location_module/helpers.js, line 15

Example
Input: apiv2_response.data.items
 Output: Array of histories (vehicle)

# getLastCircuitExecutionDetails({vehicleId})

Used by: Location - Main search -> Real-time by Vehicle/Driver/Circuit

Get last executed circuit infos from fixtures or API.

Parameters:
Name Type Description
{vehicleId} Object
To Do:
  • Remove fixtures feature without braking unit test

View Source services/circuit-service.js, line 78

Normalized circuit execution detail item

# getLeafletPolylinesArrayFromMultipleItems(items)

Used by Location module Some items might have multiple associated polylines (relatedPolylines attribute)

Parameters:
Name Type Description
items *

Normalized array of items

View Source components/location/LocationMap/LocationHistoryMap/LocationHistoryMap.vue, line 11

# getNormalizedLatLngValueForAPI()

API stores Lat/Lng as integer (multiply by latLngScaleFactor and remove decimals)

View Source services/predefined-views.js, line 48

# getNormalizedResults()

Normalizes API responses into a flat array

-APIV2 Responses are not flat and there are different (history/realtime)

View Source store/location_module/main_search.js, line 515

# getPolylineFromLinestring(linestring)

Linestring example: 1.4659516666667 45.162342314815,1.4659516666667 45.162342314815 Polyline example: [[1.4659516666667,45.162342314815],[1.4659516666667,45.162342314815]]

Parameters:
Name Type Description
linestring *

View Source utils/map.js, line 6

# getPolylinesFromItemLinestring(linestring, options)

Special polyline entity used by Location - History, Location - Realtime - Circuit getNormalizedItem: To be able to retrieve item details from leaflet popup (Trip-history/Circuit-exec polyline popup)

Parameters:
Name Type Description
linestring *
options *

View Source services/entities/location-main-search-item.js, line 517

# getPositionBorderColor()

Border color: same as trip history polyline if available

View Source components/shared/SimplicitiMap/draw-positions-markers-mixin.js, line 260

# getSensors(vehicleId, datetimeStart, datetimeEnd, options)

Parameters:
Name Type Description
vehicleId *
datetimeStart *
datetimeEnd *
options *

{positions: false, sensors: false}

View Source services/sensors-service.js, line 111

# getSettingsParamFromRemote() → {Object}

Used to retrieve defaultMapPredefinedView Parses onlinePersistanceConfig and call 'retrieve' method for each key.

View Source services/settings-service.js, line 110

Object key/value pairs i.g {defaultMapPredefinedView:1}

Object

# getTerrestrialDistance(la1, lo1, la2, lo2)

Calculates the distance between two coordinates Copied from generic.inc.php "DistanceTerrestre"

Parameters:
Name Type Description
la1 *
lo1 *
la2 *
lo2 *

View Source utils/geo.js, line 10

# getUserParametersAsObject(currentUserLogin) → {Object}

Used by Settings store.

Parameters:
Name Type Description
currentUserLogin *

View Source services/user-service.js, line 33

Settings state object Example: { defaultMapZoomLevel: 14, userBaseLayer: cBaseLayerSabatier }

Object

# getVehicleBoxAllocations(vehicleId) → {Array}

Used by Diagnostics module

Parameters:
Name Type Description
vehicleId Number

Required

filterParams.boxNumber Number | Array

i.g 43 or [43,85,23]

View Source services/box-service.js, line 53

Array of vehicle box allocations (Affectation boitier)

Array

# getVehicleCategoryObject(vehicleId, rootGetters)

Parameters:
Name Type Description
vehicleId *
rootGetters *
To Do:
  • Refactor/Improve Get vehicle category object from search module loaded dataset

View Source store/location_module/helpers.js, line 113

# getVehicleChrono()

Used by Location module - Chrono tab Used by Diagnostics module

Parameters:
Name Type Description
params.date String | Date | Moment

Date or Moment

params.vehicleId String

Vehicle identifier

params.startDate Date | Moment
params.endDate Date | Moment
params.apiHandler function

(unit-test only)

View Source services/chrono-service.js, line 22

# getVehicleDetailsById(vehicleId)

Parameters:
Name Type Description
vehicleId Number

View Source services/vehicle-service.js, line 131

# getVehicleHistoryFromDate(vehicleId, date) → {Object}

Used by Diagnostic module to fetch vehicle overview information about the trip history for a particular date.

Parameters:
Name Type Description
vehicleId Number
date Date | Moment

View Source services/history-service.js, line 33

Overview information about the trip history

Object

# getVehicleHistoryPositionDetailsFromDateLegacy(vehicleId, datetime)

Used by Diagnostic module

Parameters:
Name Type Description
vehicleId *
datetime *
Version:
  • APIV2
To Do:
  • Remove when unused

View Source services/history-service.js, line 156

# getVehicleHistoryStepsFromDate(vehicleId, date)

Parameters:
Name Type Description
vehicleId *
date *
Version:
  • APIV2

View Source services/history-service.js, line 48

# getVehicleIconHTML(vehicleClassName, options)

Used by Location module. Get vehicle svg based on vehicle type (className)

Parameters:
Name Type Description
vehicleClassName *

I.g: 30070 (Vehicule leger)

options *

options.className override svg class

View Source services/vehicle-service.js, line 105

# getVehiclePosition(positionId)

Parameters:
Name Type Description
positionId *

View Source services/vehicle-service.js, line 219

# getVehiclePositions(vehicleId, date, options)

Used by Diagnostic module

Parameters:
Name Type Description
vehicleId *
date *
options *
Version:
  • APIV3
To Do:
  • Use properties[positions][]= to reduce size of nested objects (It doesn't work with arrays like tor/ana)

View Source services/history-service.js, line 82

# getVehicleSensorsConfiguration(vehicleId, date) → {Array}

Used by Location module (Trip history details - table) to load positions and sensors configuration

Parameters:
Name Type Description
vehicleId *
date *

View Source services/history-service.js, line 330

Array

# getVehiculesPositions(vehicleIds, startDatetime, endDatetime)

Parameters:
Name Type Description
vehicleIds *
startDatetime *
endDatetime *

View Source services/vehicle-service.js, line 231

# immediateDeepWatchHandlerForChartUpdate()

Otherwise, multiple watchers compete for the same action

View Source components/diagnostic/DiagnosticsCharts.vue, line 34

# injectJWTAndLanguageParametersToURL(url)

Parameters:
Name Type Description
url String

i.g https://dev-geored.geored.fr/desktop

View Source mixins/externalAppsURLs.js, line 35

Example
Input: https://dev-geored.geored.fr/desktop
 Output: https://dev-geored.geored.fr/desktop?_token=JWT&lg=fr

# isDev() → {boolean}

View Source services/env-service.js, line 97

boolean

# isIFramed()

Checks if the current web page is being displayed inside an iframe or not.

View Source mixins/detectIframe.js, line 16

# isLocalhost() → {boolean}

View Source services/env-service.js, line 88

boolean

# isMapSelectablePolylinesFeatureEnabled()

Polylines can be click. A popup is shown. Used by Location - History - Vehicle/Driver/Circuit (Main search) Enable by default

View Source services/feature-service.js, line 9

# isPrivateMode() → {Boolean}

Detect browser running on private mode

View Source utils/browser.js, line 5

Boolean

# isProduction() → {boolean}

View Source services/env-service.js, line 148

boolean

# isSearchModuleDatePickerDisabledHandler()

Some clients do not have right to history mode on certain tab (i.g circuit)

View Source components/location/LocationSidebar.vue, line 31

# isSearchModuleDatePickerEnabled()

Some clients do not have right to history mode at all

View Source components/location/LocationSidebar.vue, line 48

# isUnitTest()

Sometimes we need to skip some logic if unit-test Only works for JEST

View Source utils/unit.js, line 6

# isValidLocaleCode(code)

Parameters:
Name Type Description
code String

i.g es, fr, nc

View Source i18n/index.js, line 141

# isValidPositionId(positionId)

Valid APIV3 position id has the following format: {serverId}{boxId}{timestamp80}

Count the number of occurences of one character in the string ("41_123_12312312312".match(new RegExp("_", "g")) || []).length

Parameters:
Name Type Description
positionId *

View Source services/position-service.js, line 9

# linestringsToPolylines(linestrings)

Used by: Location - Real-time - Circuit Location - Circuit tab Location - History tab Diagnostics Converts Array of items containing a linestring property (APV2 format) into an array of polylines (Format accepted by LeafletMap wrapper) The linestring property can be either an string or an array (multiple linestrings) (#31781)

Parameters:
Name Type Description
linestrings String

Array of LatLng I.g: "lat1 lng1, lat2 lng2"

View Source mixins/map.js, line 108

# loginWithToken(jwt, viewPath)

Used by dev to login quicky into a view

Parameters:
Name Type Description
jwt *
viewPath String

ig diagnostics

View Source services/auth-service.js, line 16

# mutateNormalize(item)

Normalize Zone to APIV3 entity format

Parameters:
Name Type Description
item *

View Source api/normalization/zone.js, line 34

# normalizeAnalyzeHistorySegment(response)

Used by Diagnostic module

Parameters:
Name Type Description
response *
To Do:
  • Refactor/Move into entity "diagnostic-analysis-entity"

View Source services/history-service.js, line 225

# normalizeAPIV3Item(item)

Parameters:
Name Type Description
item Object

Object to transform

To Do:
  • Immatriculation

View Source services/events-service.js, line 190

# normalizeChronoResponseDetails(item)

Parameters:
Name Type Description
item *
To Do:
  • Map type to custom values ['driving', 'available', 'resting', 'working'],

View Source services/chrono-service.js, line 199

# normalizeCircuitExecutionDetailsItem(item)

Transform/Presenter function for circuit execution details item

Parameters:
Name Type Description
item *

Details item from APIV2 Historique by_circuit_dates or APIV2 dernier_circuit

View Source services/circuit-service.js, line 127

# normalizeLatLng(latOrLng)

Server stores Lat/Lng coordinates as Integer values.

Parameters:
Name Type Description
latOrLng *

View Source api/normalization/zone.js, line 9

# normalizePositionTorsForDiagnosticsModule(position, activeTorPositions, sensorAssignments)

Will inject startTimestamp/endTimestamp to TORs with measureType "temps" (Those attributes are then used to render a duration chart)

Parameters:
Name Type Description
position *
activeTorPositions *
sensorAssignments *

View Source services/diagnostics-service.js, line 289

# normalizeVehicleHistoryPositions(positions, vehicleId)

Unused

Parameters:
Name Type Description
positions Array
vehicleId String

View Source services/history-service.js, line 187

# normalizeWmsOptions(options)

Creates the projection object (crs) just before configuring leaflet tilelayer

Parameters:
Name Type Description
options *

View Source services/map-service.js, line 24

# normalizeZoneTypeIconItem(iconKey)

Parameters:
Name Type Description
iconKey *

e.g drapeau_bleu

View Source composables/zones-module.js, line 45

# onAnimate(currentIndex)

Parameters:
Name Type Description
currentIndex *
To Do:
  • Drawing operations could be split using requestAnimationFrame

View Source components/diagnostic/replay-mixin.js, line 89

# onSearchModuleDatePickerPredefinedSelectionClick()

Provide handler to react to date picker predefined options change and limit date range selection if necessary

See:
  • SMDatePicker.vue Date picker will inject this handler

View Source views/SensorsModule.vue, line 56

# openMapToolboxFeature(featureName)

Used internally to open reverse geocoding view if map menu context option "nearby vehicles" is clicked

Parameters:
Name Type Description
featureName *

View Source components/shared/MapToolbox/MapToolbox.vue, line 270

# parseHistoryItem(item)

Parses item from API /v2/historique/

  • Circuit: by_circuit_dates
  • Vehicle/Driver: by_vehicule_dates/by_chauffeur_dates
Parameters:
Name Type Description
item Object
options.selectionType String

vehicle/driver/circuit

options.relatedPolylines Array

View Source services/entities/location-main-search-item.js, line 352

# parseLocationItem(item, options, rootGetters)

Parses Location module item from main search Item comes from API (temp reel / historique)

Parameters:
Name Type Description
item *
options *
rootGetters *
To Do:
  • Refactor/Move into services/entities/location-main-search-entity

View Source store/location_module/helpers.js, line 95

# parseLocationItemDates(item, options)

Parse dates fields from both real-time/history

Parameters:
Name Type Description
item *
options *

View Source services/entities/location-main-search-item.js, line 282

# parseLocationItemSensors(item)

Parses sensor infos (Temp reel)

Parameters:
Name Type Description
item *

View Source services/entities/location-main-search-item.js, line 443

# performMultipleSearch()

While in "Free search" (Input in on top of map), the user can combine vehicles/drivers/circuits. For now, we should call the APIs separately, at the same time (Multiple search)

View Source components/location/LocationResults/LocationResults.vue, line 114

# pickColor(conso, panel) → {string}

Get linestring color for given conso.

Parameters:
Name Type Description
conso
panel
Author:
  • FMA 2021-10-20 https://easyredmine.simpliciti.fr/issues/27249

View Source store/ecoConduite/circuit.js, line 53

string

# reactToMapPredefinedViewsListUpdate()

Used MapPredefinedViewSettingsSelect.vue to update itself if an item is added/removed.

View Source components/map_predefined_views/MapPredefinedViewsProvider.vue, line 20

# reduceAttributesIntoNestedProperty(obj, attribute)

Used by Datatable library. Datatable expects a language property which is a nested object: https://www.datatables.net/plug-ins/i18n/English But we store translations in a plain object:

  • datatable.paginate.next
  • datatable.paginate.prev This function will collect all the keys starting with datatable. and build a nested object similar to the one expected by datatable.
Parameters:
Name Type Description
obj Object

Plain object

attribute String

Object attribute (Computed nested object)

View Source i18n/index.js, line 192

# saveSettingsParamLocally(name, value)

Uses browser client-side storage.

Parameters:
Name Type Description
name String
value Any
options.suffix String

Optional

View Source services/settings-service.js, line 32

# saveSettingsParamRemotely(name, value)

Used to save defaultMapZoomLevel and userBaseLayer Used to save defaultMapPredefinedView

Parameters:
Name Type Description
name *
value *

View Source services/settings-service.js, line 50

# SensorPopupSectionMixin()

Retrieves position details (including sensor infos) from vehicle_id and date.

Deprecated:
  • Yes

View Source components/location/LocationMap/LocationRealtimeMap/VehicleMarkerPopup.vue, line 9

# setHigherMapToolboxZIndex()

Svelte module context patron: https://svelte.dev/tutorial/module-exports

View Source components/shared/MapToolbox/MapToolbox.vue, line 46

# setLowerMapToolboxZIndex()

This was added to prevent the map toolbox from overlapping on top of other components (because of his position being absolute).

Faq: This map toolbox is associated to the map, why is being present when the map is hidden? Because this component is wrapped in a portal (portal-vue)

Used by Location (Full table mode) Used by Routing (Full table mode)

Svelte module context patron: https://svelte.dev/tutorial/module-exports

View Source components/shared/MapToolbox/MapToolbox.vue, line 38

# setNewLocaleCode()

View Source i18n/index.js, line 149

# SimplicitiLoggerPlugin()

This plugin will automatically catch all errors. and send them to server (APIV3)

If the error states 'Script Error', take a look at: https://scotch.io/bar-talk/what-the-heck-is-script-error

Deprecated:
  • server logging disabled due to Sentry being enough (and some APIV3 issues)

View Source plugins/error-logger.js, line 44

Example
Usage (From outside components)

 Vue.ErrorLogger.logError(error)

 Usage (From inside components)

 this.$logError(error)

 Usage (Listen errors)
 Vue.ErrorLogger.$on("error")

# tableHeaderMixin()

Computes "tableHeaderText"

View Source views/EventsModule.vue, line 180

# updateCanSection()

Will update Can section with Can information from API

View Source components/shared/SimplicitiMap/PositionMarkerPopup.vue, line 423

# updateCircuitExecutionDetails() → {Boolean}

Real-time: Load last circuit execution details History: Load related circuit execution details

View Source store/location_module/circuit-details.js, line 38

True if success

Boolean

# updateTorAnaSection()

Will update popupSections with Tor/Ana information from API

View Source components/shared/SimplicitiMap/PositionMarkerPopup.vue, line 397

# useRightsPlugin()

Composable pattern (Replacement for mixins in Vue 3)

View Source mixins/rights-mixin.js, line 51

# watchAndReactToMapMenuContextOptions()

  • Will open reverse geocoding view automatically

View Source components/shared/MapToolbox/MapToolbox.vue, line 254

Type Definitions

Object

# dynamicToggleControlSectionsMixin

Dynamic toggle control sections allow us to define toggle controls once. Each toggle control will automatically show/hide itself and show/hide related leaflet layers.

To Do:
  • Refactor existing layers toggles (i.g zone) into a dynamic section Note: Add extra sections in the related vuex store "map_options/index.js"

View Source components/location/MapOptions/MapOptions.vue, line 22