Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Customise quick booking lengths #7

Open
michaelcrone opened this issue Nov 10, 2017 · 3 comments
Open

Customise quick booking lengths #7

michaelcrone opened this issue Nov 10, 2017 · 3 comments

Comments

@michaelcrone
Copy link

Installed your software successfully, great so far thanks!

Took a bit of tweaking to get the touchscreen re-calibrated after rotation, had to include:

xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

in /etc/xdg/lxsession/LXDE-pi/autostart to get it working correctly.

Quick questions if you don't mind - Is it possible/easy to change the quick bookings from 15/30 to 30/60 minutes?

@phylor
Copy link
Contributor

phylor commented Nov 19, 2017

Yes, you need to change the transformation matrix because the display is used in portrait mode. It is documented at the end of the README. We should make that clearer though.

About the quick bookings: there is currently no configuration option, but you can change it more or less easily in the code itself. You have to change two things:

  • change the duration the events are created with: in src/components/status.js on line 59 and 60, change the value given to the function call onQuickReservation, e.g.: onClick30={() => onQuickReservation(60)} (note that you must not change the first part, i.e. onClick30=)
  • change the SVG image displayed as the buttons: these can be found in static/icons/15.svg and static/icons/30.svg. Unfortunately, we did not use a font in the SVG, so you cannot change it by opening the SVG in a text editor. You would need to open those files in Inkscape or Illustrator and change the text accordingly.

Let us know how it works out for you!

@michaelcrone
Copy link
Author

Thanks for the reply. Strange on the transformation matrix. I had copy/pasted your exact commands and for some reason they weren't taking effect.

On the 30/60' change to quick bookings. I changed the files/images per your instructions, I can see the images changed however clicking them isn't making the appropriate length booking (still coming through as 15/30 mins). Do I need to compile code or anything afterwards? I tried with a reboot so far.

Also I noticed when for example there's a meeting coming up in 25 minutes it only shows the 15 minute booking (makes sense with the default 15/30 bookings), would this be broken if I make 30/60 minute bookings instead? Eg is the logic hard coded only to show the 15/30 buttons based on amount of free time left until next booking?

Cheers!

@phylor
Copy link
Contributor

phylor commented Dec 8, 2017

Yes, you probably need to run npm run build. That does not work that well on a Raspberry Pi though. It's probably a better idea to run this on a faster machine and then copy it over to the Raspberry.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants