fix: add user detail on create member
This commit is contained in:
		| @@ -23,6 +23,7 @@ import { balanceType, coaType } from 'src/helper/enum-list'; | ||||
| import { RoleService } from 'src/configurable/roles.service'; | ||||
| import { InputCoaDto } from 'src/transaction/dto/input-coa.dto'; | ||||
| import * as uuid from 'uuid'; | ||||
| import { UserDetail } from './entities/user_detail.entity'; | ||||
|  | ||||
| @Injectable() | ||||
| export class UsersService { | ||||
| @@ -76,6 +77,12 @@ export class UsersService { | ||||
|     await this.connection.transaction(async (manager) => { | ||||
|       const result = await manager.insert(User, userData); | ||||
|  | ||||
|       const userDetailData = new UserDetail(); | ||||
|       userDetailData.name = createUserDto.name; | ||||
|       userDetailData.phone_number = createUserDto.phone_number; | ||||
|       userDetailData.user = userData; | ||||
|       const user_detail = await manager.insert(UserDetail, userDetailData); | ||||
|  | ||||
|       const dataCoaWallet = new InputCoaDto(); | ||||
|       dataCoaWallet.user = userData; | ||||
|       dataCoaWallet.balanceType = balanceType.CREDIT; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user