Skip to content

Update People when they are viewed | PuzzleTime Sync #7 #746

Open
@RandomTannenbaum

Description

@RandomTannenbaum

Introduction
When clicking on an employee that is displayed on the ptime-employee-dropdown it redirects to the detailed view of this employee. As soon as an employee is clicked a request for this employee is sent to the PTime API and the response data will be saved in the skills DB. Then the freshly fetched data is displayed on the profile of this specific person. This makes sure that the data is up to date at all times.

Creating a person
If a Person doesn't exist yet in the Skills DB, we want to create it. The dropdown will have /people/new?ptime_employee_id={ptime_employee_id} as link. When we navigate to this route, we first fetch this ptime_employee_id from the PTime API, to see if it exists and to get the data. If it doesn't exist, we do nothing. We also do nothing, if there already is a person with this ptime_employee_id in the skills DB. If it exists, we create a new person with the fetched data and set it's ptime_employee_id to the id of the fetched employee.

It would probably be beneficial to implement a loading bar while fetching data.

ToDo

  • A request is sent everytime a specific person is visited
  • The response is rendered correctly with good timing
  • Create new person if it doesn't exist yet
  • Loading bar if necessary

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions