add helper to transform snake case to camel case

This commit is contained in:
Bilal Catic
2018-09-19 16:07:41 +02:00
parent af2da3eed0
commit 31115b7c6a
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
export const fromWiaasCountryList = (countryList) => {
return {
idCountry: countryList.country_id,
countryName: countryList.country_name
}
}

View 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,
}
};