2026-04-18 12:14:19 +03:30
|
|
|
export default (consumer: any) => {
|
2026-04-23 20:59:39 +03:30
|
|
|
const { activation, ...rest } = consumer
|
2026-04-18 12:14:19 +03:30
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
...rest,
|
|
|
|
|
fullname: `${rest?.first_name} ${rest?.last_name}`,
|
2026-04-23 20:59:39 +03:30
|
|
|
license_info: prepareLicenseInfo(activation),
|
2026-04-18 12:14:19 +03:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function prepareLicenseInfo(latestLicense: any) {
|
|
|
|
|
if (!latestLicense) return null
|
|
|
|
|
const { license, ...rest } = latestLicense
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
...rest,
|
|
|
|
|
}
|
|
|
|
|
}
|