This is a Selfhelp Plugin that is used for calculating sleepEfficiency
On the server enter your project folder. Then run cd server/plugins. Once you are inside folder plugins (if it does ncd server/plugins) run command 'git clone gh@tpf.fluido.as:SLP/sleepEfficiency.git'. It will install the plugin inside the folder. Then run cd sleepEfficiency and then select the version that you want. Example git checkout v1.0.0. Then in folder sleepEfficiency/db you can find the sql scripts. Run them based on the version that you are. The version of the plugins can be checked on page Impressum.
Check the version of the plugin on page Impressum. Then pull the latest changes on the server and select the version you need. Run the update sql scripts if there are any.
Once the plugin is installed it should be called by style trigger. A trigger should be attached to a style formUserInput. Once the form data is submitted by the user, the trigger will calculate the sleep efficiency and save it.
entry_date - date. For what date the user is entering data.TIB_1 - datetime. When the user went to bed.TIB_2 - datetime. When the user left the bed.TST_1 - datetime. When the user fall asleep.TST_2 - datetime. When the user wake up.SE - text, hidden (css d-none). This field will calculate sleep efficiency.SE_3 - text, hidden (css d-none). This field will calculate average sleep efficiency for the last 3 entries.TIB- text, hidden (css d-none). This field will calculate total time spent in bed in hours.TST- text, hidden (css d-none). This field will calculate total time sleeping in hours.debug_log- text, hidden (css d-none). This field will show any error if they happened during the calculations.SE_P - text, hidden (css d-none). This field will format sleep efficiency as percentage.SE_3_P - text, hidden (css d-none). This field will format average sleep efficiency as percentage.