diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/scenes/place_detail.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/scenes/place_detail.c b/src/scenes/place_detail.c index a3e549b..372a659 100644 --- a/src/scenes/place_detail.c +++ b/src/scenes/place_detail.c @@ -334,13 +334,24 @@ static void place_detail_draw_trucks(platform_window* window, tab tab, float x, }
}
+static s32 place_get_nr_of_internal_employees()
+{
+ s32 count = 0;
+ for (s32 i = 0; i < _active_location->employees.length; i++) {
+ employee* emp = *(employee**)array_at(&_active_location->employees, i);
+ bool is_internal = (emp->original_location_id == _active_location->id);
+ if (is_internal) count++;
+ }
+ return count;
+}
+
static void place_detail_draw_employees(platform_window* window, tab tab, float x, float y, float w, float h)
{
HANDLE_TAB_START(_active_location->employees.length+2, 5);
HANDLE_TAB_SCROLL;
char info_buf[50];
- sprintf(info_buf, "%d Employees currently on site.", _active_location->employees.length);
+ sprintf(info_buf, "%d Employees on payroll.", place_get_nr_of_internal_employees());
HANDLE_TAB_INFO(info_buf, "Hire", PLACE_DETAIL_SHOW_RESUMES);
s32 current_index = 0;
|
