@protacon/muster-booking-frontend
v2.2.0
Published
Online booking frontend
Keywords
Readme
Muster booking frontend
Online booking frontend
Install
npm install @protacon/muster-booking-frontendUsage
import BookingComponent from '@protacon/muster-booking-frontend'
import '@protacon/muster-booking-frontend/dist/styles.bundle.css'
...
render() {
return (
<BookingComponent
locale="sv"
apiEndpoint="https://.../booking.api/v3"
chainId={2}
googleApiKey="..."
mapId="..."
maxStations={5}
// Optional. Preselect reservation params
plateNumber="..."
products={["..."]} // Inspection | PostInspection | ConditionInspection
stationId={...}
// Optional. Start component with search reservation form, optionaly pass default values
searchReservation={{
bookingNumber: '...',
lastName: '...',
}}
/>
)
}To start the component in existing reservation payment flow, navigate to a page with the component using:
?continuePaymentGroupId={groupId}&stationId={stationId}To start the component in existing reservation edit flow, navigate to a page with the component using:
?groupId={groupId}&stationId={stationId}Development
npm start
open http://localhost:8080/Building and running in docker
Build manually
docker build -f Dockerfile --force-rm -t smusterbooking .
Run docker image
docker run -p 8080:80 --rm --name smusterbooking -e FRONTEND_apiurl='http://localhost:5001/v3' -e FRONTEND_chainId=6 -e FRONTEND_pbInspection=1 smusterbooking
Check needed environment variables from src/public/env.docker.js
