In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Launches the test runner and displays code coverage
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Bundles the app into a single bundle named widget_bundle.js
for easy embedding
Snippet can be embedded to any site using the following html:
<div id="byk-va"></div>
<script>
window._env_ = {
RUUTER_API_URL: 'LOCATION_OF_RUUTER',
NOTIFICATION_NODE_URL: 'Notification Node Server Url'
ENVIRONMENT: 'development', // 'developement | production'
TIM_AUTHENTICATION_URL: 'TIM url with callback parameter',
OFFICE_HOURS: {
TIMEZONE: 'Europe/Tallinn',
BEGIN: 8,
END: 17,
DAYS: [1, 2, 4, 5],
},
ENABLE_HIDDEN_FEATURES: 'FALSE',
other variables...
};
</script>
<script id="script-bundle" type="text/javascript" src="LOCATION_OF_WIDGET_BUNDLE" crossorigin=""></script>
RUUTER_API_URL
: Location of newer back end for fetching dataTIM_AUTHENTICATION_URL
: Link to authenticate userOFFICE_HOURS
: If this variable is added, widget will be hidden when not in defined work hours. If this variable is not added, the widget will always be displayedTIMEZONE
: Used for comparing the following variables against a specific timezone.BEGIN
: Beginning of office hours. If current time is before this hour (24H), the widget will not be displayedEND
: End of office hours. If current time is after this hour (24H), the widget will not be displayedDAYS
: List of days in numbers, where 1=monday, 2=tuesday, 3=wednesday... If current day is in the list of days, the widget will be displayed according to BEGIN and END times.
ENABLE_HIDDEN_FEATURES
: set it to'TRUE'
will show experimental features,'FALSE'
will hide them
See licence here.