diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index 47bddb35..d460aaef 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -2251,12 +2251,12 @@ export class OrganizationDotnetController extends Controller { id: profile.id, avatar: profile.avatar, avatarName: profile.avatarName, - rank: profile.rank, - prefix: profile.prefix, - firstName: profile.firstName, - lastName: profile.lastName, - citizenId: profile.citizenId, - position: profile.position, + rank: profile.rank ?? "", + prefix: profile.prefix ?? "", + firstName: profile.firstName ?? "", + lastName: profile.lastName ?? "", + citizenId: profile.citizenId ?? "", + position: profile.position ?? "", posLevelId: profile.posLevelId, email: profile.email, phone: profile.phone, @@ -2274,10 +2274,10 @@ export class OrganizationDotnetController extends Controller { reasonSameDate: profile.reasonSameDate, telephoneNumber: profile.telephoneNumber, nationality: profile.nationality, - gender: profile.gender, - relationship: profile.relationship, - religion: profile.religion, - bloodGroup: profile.bloodGroup, + gender: profile.gender ?? "", + relationship: profile.relationship ?? "", + religion: profile.religion ?? "", + bloodGroup: profile.bloodGroup ?? "", registrationAddress: profile.registrationAddress, registrationProvinceId: profile.registrationProvinceId, registrationDistrictId: profile.registrationDistrictId, @@ -2289,8 +2289,8 @@ export class OrganizationDotnetController extends Controller { currentZipCode: profile.currentZipCode, // dutyTimeId: profile.dutyTimeId, // dutyTimeEffectiveDate: profile.dutyTimeEffectiveDate, - posLevel: profile.posLevel?.posLevelName ?? null, - posType: profile.posType?.posTypeName ?? null, + posLevel: profile.posLevel?.posLevelName ?? "", + posType: profile.posType?.posTypeName ?? "", profileSalary: profile.profileSalary, profileInsignia: profile.profileInsignias.map((x) => { return { ...x, insignia: x.insignia.name }; @@ -2298,7 +2298,7 @@ export class OrganizationDotnetController extends Controller { amount: profile.amount, positionSalaryAmount: profile.positionSalaryAmount, mouthSalaryAmount: profile.mouthSalaryAmount, - profileType: "OFFICER", + profileType: "EMPLOYEE", root: profile?.current_holders?.find( (x) => @@ -2311,7 +2311,7 @@ export class OrganizationDotnetController extends Controller { x.orgRevision?.orgRevisionIsDraft == false && x.orgRevision?.orgRevisionIsCurrent == true, )?.orgRootId ?? null, - posNo: shortName, + posNo: shortName ?? "", }; });