add helper to transform snake case to camel case
This commit is contained in:
6
frontend/src/helpers/CountryHelper.js
Normal file
6
frontend/src/helpers/CountryHelper.js
Normal file
@@ -0,0 +1,6 @@
|
||||
export const fromWiaasCountryList = (countryList) => {
|
||||
return {
|
||||
idCountry: countryList.country_id,
|
||||
countryName: countryList.country_name
|
||||
}
|
||||
}
|
||||
15
frontend/src/helpers/ProfileHelper.js
Normal file
15
frontend/src/helpers/ProfileHelper.js
Normal file
@@ -0,0 +1,15 @@
|
||||
export const fromWiaasProfileInfo = (profileInfo) => {
|
||||
return {
|
||||
id: profileInfo.id,
|
||||
idCompany: profileInfo.company_id,
|
||||
companyName: profileInfo.company_name,
|
||||
vatCode: profileInfo.vat_code,
|
||||
isCompanyAdmin: profileInfo.is_company_admin,
|
||||
mail: profileInfo.mail,
|
||||
name: profileInfo.name,
|
||||
phone: profileInfo.phone,
|
||||
billingAddresses: profileInfo.billing_addresses,
|
||||
profileAddresses: profileInfo.profile_addresses,
|
||||
userType: profileInfo.user_type,
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user