puzzle / skills

Open source skill management web application
GNU Affero General Public License v3.0
61 stars 19 forks source link

Fetch people search entries from ptime, else Skills fallback | PuzzleTime #6 #745

Open RandomTannenbaum opened 3 months ago

RandomTannenbaum commented 3 months ago

Introduction At the moment the people search in Skills searches for people in the Skills Database. We want to rewrite this logic. We now want it to make an API call to the PuzzleTime API and load all employees from there.

The people should be fetched only when the dropdown is opened. This can happen by replacing the dropdown with another dropdown via a Turboframe.

Then the search only searches over the employees coming from the PuzzleTime API. The search also should only show active employees.

Important: If the Ptime API is not available, we still want to search over the people from PuzzleSkills.

When clicking on an employee, we still navigate to the detailed profile according to the id. Yet when an employee is clicked that has not been created, it navigates to person/new?ptime_employee_id={id}. After the data has been fetched and the person created, it automatically redirects to the newly created person.

ToDo

Approach on fallback: https://codimd.puzzle.ch/WTmNcP5bT3KfQQHC9vRv2A#

ManuelMoeri commented 2 months ago

Stand 19.07.2024 Alle features wurden erfüllt, neue Tests sind geschrieben & alte Tests gefixt.

Falls ich Test cases vergessen habe bitte einfach kurz hinzufügen. Ich bin ab Morgen in den Ferien aber bin für Fragen entweder auf dem PuzzleChat oder auf meinem Handy allgemein erreichbar.