diff --git a/src/streamer/localize/preconfigured_configurations.py b/src/streamer/localize/preconfigured_configurations.py new file mode 100644 index 0000000..07cafbd --- /dev/null +++ b/src/streamer/localize/preconfigured_configurations.py @@ -0,0 +1,95 @@ +from streamer.localize.repository_configuration import ( + Dimension, + Marker, + MarkerPlacement, + RepositoryConfiguration, +) + +TaskConfiguration = RepositoryConfiguration( + dimensions={ + "task": Dimension( + display_name="Task", + comment="If placed, the given shard is a task. The placement determines the state.", + propagate=False, + ), + "project": Dimension( + display_name="Project", + comment="Project the task is attached to", + propagate=True, + ), + }, + markers={ + "Task": Marker( + display_name="Task", + placements=[ + MarkerPlacement(dimension="task", value="ready"), + MarkerPlacement(if_with={"Done"}, dimension="task", value="done"), + MarkerPlacement(if_with={"Waiting"}, dimension="task", value="waiting"), + MarkerPlacement( + if_with={"Cancelled"}, dimension="task", value="cancelled" + ), + MarkerPlacement( + if_with={"NotDone"}, dimension="task", value="cancelled" + ), + ], + ), + "WaitingFor": Marker( + display_name="Task", + placements=[ + MarkerPlacement(dimension="task", value="waiting"), + ], + ), + }, +) + +BasicTimesheetConfiguration = RepositoryConfiguration( + dimensions={ + "timesheet": Dimension( + display_name="Timesheet", + comment="Used by Timesheet-Subcommand to create Timecards", + propagate=False, + ) + }, + markers={ + "VacationDay": Marker( + display_name="Vacation Day", + placements=[ + MarkerPlacement( + if_with={"Timesheet"}, + dimension="timesheet", + value="day_off_sick_leave", + ) + ], + ), + "Holiday": Marker( + display_name="Offical Holiday", + placements=[ + MarkerPlacement( + if_with={"Timesheet"}, + dimension="timesheet", + value="day_off_holiday", + ) + ], + ), + "SickLeave": Marker( + display_name="Sick Leave", + placements=[ + MarkerPlacement( + if_with={"Timesheet"}, + dimension="timesheet", + value="day_off_sick_leave", + ) + ], + ), + "UndertimeDay": Marker( + display_name="Undertime Leave", + placements=[ + MarkerPlacement( + if_with={"Timesheet"}, + dimension="timesheet", + value="day_off_undertime", + ) + ], + ), + }, +)