For this task, you will be working on an app to track working hours called "Time to Leave". "Time to Leave" is a web-application written in JavaScript running in Electron, and allows to enter working and break times to show a notification, when the daily amount of work hours is reached.
Setup
Start the app in the terminal using the command npm run dev
To stop the app, use CTRL+C within the terminal
Feature Request
Users have requested to export their monthly overview of logged times and overall overtime as a PDF instead of an image. The already included button in the user interface should trigger the PDF export of the currently shown month, as indicated in red in the picture. Please read the following text carefully to implement this task.
Task Description
To implement this feature, two changes are necessary:
Change 1: Add function to create a PDF export
ToDo: In the file js/main-window.js, modify the function storeReportPNG to create a PDF export instead of a screenshot using the corresponding electron framework functionality.
Note: Please hard-code the location to be used for storing the PDF
Note: You can open the "Developer Tools" via the application menu "View" -> "Toggle developer tools".
Test: You can check if the PDF export works by looking for the time-to-leave-export.pdf on your Desktop (not to be confused with the time-to-leave-screenshot.png file).
Change 2: Add button for old PNG report
ToDo: Add a second button to the renderer/classes/FlexibleMonthCalendar.js to allow users to create either a PNG report or a PDF report
Note: You can use the file screenshot.svg as icon for the PNG button
Test: Check if the PNG is stored on the defined path when the "Create PNG report" button is clicked. The PDF should look similar to this:
While coding
👉 While working, search online for needed information. It is quicker than navigating through the entire codebase.
👉 Save the file to see to see the effects of your changes - no need to restart the app.
Project
For this task, you will be working on an app to track working hours called "Time to Leave". "Time to Leave" is a web-application written in JavaScript running in Electron, and allows to enter working and break times to show a notification, when the daily amount of work hours is reached.
Setup
npm run dev
CTRL+C
within the terminalFeature Request
Users have requested to export their monthly overview of logged times and overall overtime as a PDF instead of an image. The already included button in the user interface should trigger the PDF export of the currently shown month, as indicated in red in the picture. Please read the following text carefully to implement this task.
Task Description
To implement this feature, two changes are necessary:
Change 1: Add function to create a PDF export
js/main-window.js
, modify the functionstoreReportPNG
to create a PDF export instead of a screenshot using the corresponding electron framework functionality.time-to-leave-export.pdf
on your Desktop (not to be confused with thetime-to-leave-screenshot.png
file).Change 2: Add button for old PNG report
renderer/classes/FlexibleMonthCalendar.js
to allow users to create either a PNG report or a PDF reportscreenshot.svg
as icon for the PNG buttonWhile coding
👉 While working, search online for needed information. It is quicker than navigating through the entire codebase. 👉 Save the file to see to see the effects of your changes - no need to restart the app.