Files
psp_api/src/modules/consumer/utils/mapConsumerWithLicense.util.ts
T
ahasani a350ec7990 feat: add consumer accounts and business activities management
- Implemented AccountsService for managing consumer accounts including create, update, delete, and find operations.
- Created DTOs for account creation and updates.
- Developed BusinessActivitiesController and BusinessActivitiesService for handling business activities related to consumers.
- Added complexes management with ComplexesController and ComplexesService.
- Introduced POS management with ComplexPosesController and ComplexPosesService.
- Created necessary DTOs for business activities and POS.
- Established Licenses management with LicensesController and LicensesService.
- Integrated consumer management with PartnerConsumersController and PartnerConsumersService.
- Added Prisma module imports and service connections across modules.
2026-04-23 20:59:39 +03:30

19 lines
377 B
TypeScript

export default (consumer: any) => {
const { activation, ...rest } = consumer
return {
...rest,
fullname: `${rest?.first_name} ${rest?.last_name}`,
license_info: prepareLicenseInfo(activation),
}
}
function prepareLicenseInfo(latestLicense: any) {
if (!latestLicense) return null
const { license, ...rest } = latestLicense
return {
...rest,
}
}