Follow up: remove user_popover#workInformation in favor of UserHelper#work_information

Summary

Original Issue: #24072 (closed)
Original MR: !25155 (merged)

See !25155 (comment 304200120) for initial discussion.

In app/assets/javascripts/vue_shared/components/user_popover/user_popover.vue there is a workInformation method that is pretty much a JS port of the work_information method in app/helpers/users_helper.rb. If we expose work_information to the /api/v4/users/{id} endpoint we could remove a fair amount of frontend code.

Work Required

frontend

  • Remove workInformation related methods and display work_information supplied by /api/v4/users/{id}
  • Update tests in spec/frontend/vue_shared/components/user_popover/user_popover_spec.js

backend

  • Expose work_information to /api/v4/users/{id} and update required tests

Improvements

  • Reduce amount of frontend code (smaller code footprint)

Risks

Low risk

Involved components

  • app/assets/javascripts/vue_shared/components/user_popover/user_popover.vue
  • spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
  • lib/api/entities/user.rb
  • spec/requests/api/users_spec.rb
Edited by Peter Hegman