fix(crm): the CompanyType variant is 'client', not 'customer' #56

Merged
YousifShkara merged 1 commit from feat/crm-ops into main 2026-06-04 08:52:37 +02:00
Owner

mokosh-server's CompanyType enum lists Client / Prospect / Vendor /
Partner. The client side had the wrong tag in three places:

  • humanize_company_type returned 'Customer' for tag 'customer'.
  • CompanyForm defaulted new companies to company_type='customer'.
  • The Companies list dropdown offered ('customer', 'Customer').

Server rejected every create with HTTP 422:
'Failed to deserialize the JSON body into the target type:
company_type: unknown variant customer, expected one of
client, prospect, vendor, partner'

Switch every site to 'client' / 'Client'. The badge-color match
arm flips from 'Customer' -> Green to 'Client' -> Green to match
the new humanized label.

Drive-by: also corrected the doc comment that listed the wrong
set of valid tags.

mokosh-server's CompanyType enum lists Client / Prospect / Vendor / Partner. The client side had the wrong tag in three places: - humanize_company_type returned 'Customer' for tag 'customer'. - CompanyForm defaulted new companies to company_type='customer'. - The Companies list dropdown offered ('customer', 'Customer'). Server rejected every create with HTTP 422: 'Failed to deserialize the JSON body into the target type: company_type: unknown variant customer, expected one of client, prospect, vendor, partner' Switch every site to 'client' / 'Client'. The badge-color match arm flips from 'Customer' -> Green to 'Client' -> Green to match the new humanized label. Drive-by: also corrected the doc comment that listed the wrong set of valid tags.
fix(crm): the CompanyType variant is 'client', not 'customer'
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 33s
9af4835da2
mokosh-server's CompanyType enum lists Client / Prospect / Vendor /
Partner. The client side had the wrong tag in three places:

- humanize_company_type returned 'Customer' for tag 'customer'.
- CompanyForm defaulted new companies to company_type='customer'.
- The Companies list dropdown offered ('customer', 'Customer').

Server rejected every create with HTTP 422:
  'Failed to deserialize the JSON body into the target type:
   company_type: unknown variant customer, expected one of
   client, prospect, vendor, partner'

Switch every site to 'client' / 'Client'. The badge-color match
arm flips from 'Customer' -> Green to 'Client' -> Green to match
the new humanized label.

Drive-by: also corrected the doc comment that listed the wrong
set of valid tags.
YousifShkara deleted branch feat/crm-ops 2026-06-04 08:52:37 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!56
No description provided.