- add generating timesheets from google calendar

- minor fixes
This commit is contained in:
2025-10-10 10:49:20 +02:00
parent 584ffa36cb
commit f9ea678e00
12 changed files with 200 additions and 24 deletions

View File

@@ -129,14 +129,18 @@ public partial class LeanderShiftPlannerMainWindow : Window
{
try
{
await _appService.TimesheetService.GenerateTimeSheets();
ProgressbarCalculaion.IsIndeterminate = true;
await _appService.TimesheetService.GenerateGoogleTimeSheets(_appService.PersonService.GetGoogleTimeSheetList());
ProgressbarCalculaion.IsIndeterminate = false;
int error = TimesheetIO.ExportTimesheets(_appService.PersonService.GetPersonList().ToList());
if (error == 1) ViewService.ShowGeneralError(this).ErrorText = "There was an error exporting the timesheets.";
if (error == 2) ViewService.ShowGeneralError(this).ErrorText = "There was an error creating the timesheets.";
if (error == 1) ;
}
catch (Exception exception)
{
ViewService.ShowGeneralError(this).ErrorText = exception.Message;
Console.WriteLine(exception);
}
}