You need to review a small PR with a Vue component that shows an employee card by employeeId. After the update, users report that during fast switches between employees the screen sometimes shows an outdated card, and while a new load is in progress the previous employee remains visible.
employeeId: string | null.employeeId is empty, the panel must clear itself and not perform a request.employeeId changes, a new request to the API fetchPresencePreview(id) must start.employeeId = "anna".employeeId to "max".For local reproduction, you can use this delay scenario:
anna -> response after 120 ms
max -> response after 40 ms
profile, error, or loading for the new selection.3.5.135.8.3script setupfetchPresencePreview(id: string): Promise<{ id: string; name: string; status: "online" | "offline"; note: string }>Use line comments to explain the problem, its impact, the fix and how to test it.