From b8229df5ab46911320e4ed25bba8444a1d1f3574 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Thu, 5 Dec 2024 18:26:47 +0100 Subject: performance fix --- src/scenes/place_detail.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/scenes/place_detail.c') diff --git a/src/scenes/place_detail.c b/src/scenes/place_detail.c index f3e1223..39b9df4 100644 --- a/src/scenes/place_detail.c +++ b/src/scenes/place_detail.c @@ -405,7 +405,7 @@ static void place_detail_draw_employees(platform_window* window, tab tab, float // Hours { char buffer[50]; - float total_hours = get_worked_hours_per_week_for_employee(_active_world, emp, 0); + float total_hours = emp->current_scheduled_weekly_hours;//get_worked_hours_per_week_for_employee(_active_world, emp, 0); sprintf(buffer, "Scheduled: %.0f hours", total_hours); s32 text_x = x + item_h + item_part_w*1 + text_pad; @@ -1132,6 +1132,8 @@ static void place_detail_draw_schedule(platform_window* window) else if (_active_schedule_state == RESCHEDULING_JOB) *_active_selected_scheduled_job = _active_scheduling_job; + world_set_weekly_hours_worked(_active_world); + job_offer* offer = get_job_offer_by_id(_active_location, _active_scheduling_job.offer.id); if (offer) array_remove_by(&_active_location->job_offers, offer); -- cgit v1.2.3-70-g09d2