Module: main

The main JavaScript file for the AI4SoilHealthClient application. It imports necessary dependencies, sets up configurations, and initializes the Vue app. It also defines utility functions for handling Axios responses and errors, as well as a function for logging out the user.

Source:

Methods

(function) config.errorHandler()

Method config.errorHandler
Source:

(function) checkForSWUpdates()

Method checkForSWUpdates
Source:

(function) checkOnlineStatusSync()

Method checkOnlineStatusSync
Source:

(function) getStoredTokens()

Method getStoredTokens
Source:

(async, function) handleAxiosError()

Method handleAxiosError
Source:

(function) onload()

Method onload
Source:

(async, function) handleAxiosResponse(response) → {object}

Handles the response from an Axios request.

Parameters:
Name Type Description
response object

The response object from Axios.

Source:
Returns:
  • The modified response object.
Type
object

(function) initKeycloak()

Method initKeycloak
Source:

(function) logout()

Logs out the user by removing the token from local storage and clearing user data. If Keycloak is available, it also performs a Keycloak logout.

Source:

(function) saveTokens()

Method saveTokens
Source:

(function) startTokenRefresh()

Method startTokenRefresh
Source:

(function) onerror()

Method onerror
Source: