Team management vacation demands : data structure

Hi all,

I would like to create an app to manage holidays/vacation employee demands in my company. Here’s the datas…

  • Each Employee is a User
  • An Employee can have a status: Direction, Manager or just employee
  • Each Employee belongs to a Team
  • The Manager (which is a User also) can manage several Teams (so can belong to several teams)
  • The Employee asks for vacation/day off
  • The Manager validates or not the demand.

I would like a screen in which the manager can manage all the demands from their Teams and only their teams.

I’m stuck with the structure of all these things …
DataTypes

  • User
  • Demand
  • Team must be an OptionSet in User or a Datatype ?

How to constraint the display of the demands for the Manager ?

What is your vision ?

Thanks.

Team
name
id

Team-Member
user
team
role

Team-Member-Demand
user
demand

if you want to display only the demands
find all team member demands where user is in do a search for team member where user = current user and role = manager each item’s user

if you want to split by teams
search for all team members where user = current user, role = manager, each item’s team unique elements
then inside the cell, search for Team-Member-Demand where user is in search for Team-Member where team = current cell’s team

if you want to save on workflows
Team-Member
user
team
role
demands_cached (list of team-member demands)

the demands_cached list should populate on a database trigger when a new demand is created and then added to the appropriate team member. This will reduce the lookup since now you’ll have access to the demands on the team member lookup itself. You could apply this same logic to the ‘Team’ too, a list of members_cached

You’ll probably want data to show who viewed/approved the demand as well and you may want to separate it out by teams anyway because if a non-manager is part of multiple teams, you’ll have conflicts with approvals (what happens if one manager approves and the other doesn’t? what system is setup to rectify that?)

This topic was automatically closed after 70 days. New replies are no longer allowed.