companies that has a status field. The status value in the database can be rejected or live.
In a smart action called update company status I want users to be able to select an alias value (i.e. 'rejeté' for rejected and 'validé' for live).
Implementation
In order not to duplicate the matching to be made between the different values from the UI to the database and the other way around, I create acompany-status-handler file that will allow me to handle the conversion.
services/companies-status-handler.js
routes/companies.js