diff --git a/src/controllers/ProfileFamilyCoupleController.ts b/src/controllers/ProfileFamilyCoupleController.ts index 69a0efc2..ee2281f1 100644 --- a/src/controllers/ProfileFamilyCoupleController.ts +++ b/src/controllers/ProfileFamilyCoupleController.ts @@ -35,7 +35,6 @@ export class ProfileFamilyCoupleController extends Controller { message: "สำเร็จ", result: { id: "6207ae29-05ef-4abb-9a37-a887265d671e", - couple: true, couplePrefix: "string", coupleFirstName: "string", coupleLastName: "string", @@ -57,7 +56,7 @@ export class ProfileFamilyCoupleController extends Controller { } const familyCouple = await this.ProfileFamilyCouple.findOne({ select: [ - "id", "couple", "couplePrefix", "coupleFirstName", "coupleLastName", "coupleLastNameOld", + "id", "couplePrefix", "coupleFirstName", "coupleLastName", "coupleLastNameOld", "coupleCareer", "coupleCitizenId", "coupleLive", "relationship", "profileId", ], where: { profileId }, @@ -80,7 +79,6 @@ export class ProfileFamilyCoupleController extends Controller { lastUpdateUserId: "59134ef9-9e62-41d0-aac5-339be727f2b0", createdFullName: "สาวิตรี ศรีสมัย", lastUpdateFullName: "สาวิตรี ศรีสมัย", - couple: true, couplePrefix: "string", coupleFirstName: "string", coupleLastName: "string", @@ -116,7 +114,6 @@ export class ProfileFamilyCoupleController extends Controller { lastUpdateUserId: y.lastUpdateUserId, createdFullName: y.createdFullName, lastUpdateFullName: y.lastUpdateFullName, - couple: y.couple, couplePrefix: y.couplePrefix, coupleFirstName: y.coupleFirstName, coupleLastName: y.coupleLastName, @@ -154,7 +151,6 @@ export class ProfileFamilyCoupleController extends Controller { profile.relationship = familyCouple.relationship //update profile.relationship const history: ProfileFamilyCoupleHistory = Object.assign(new ProfileFamilyCoupleHistory(), { profileFamilyCoupleId: familyCouple.id, - couple: familyCouple.couple, couplePrefix: familyCouple.couplePrefix, coupleFirstName: familyCouple.coupleFirstName, coupleLastName: familyCouple.coupleLastName, @@ -190,7 +186,6 @@ export class ProfileFamilyCoupleController extends Controller { familyCouple.lastUpdateUserId = req.user.sub, familyCouple.lastUpdateFullName = req.user.name; history.profileFamilyCoupleId = familyCouple.id; - history.couple = familyCouple.couple, history.couplePrefix = familyCouple.couplePrefix, history.coupleFirstName = familyCouple.coupleFirstName, history.coupleLastName = familyCouple.coupleLastName, diff --git a/src/controllers/ProfileFamilyCoupleEmployeeController.ts b/src/controllers/ProfileFamilyCoupleEmployeeController.ts index adc4252f..bf5f598a 100644 --- a/src/controllers/ProfileFamilyCoupleEmployeeController.ts +++ b/src/controllers/ProfileFamilyCoupleEmployeeController.ts @@ -35,7 +35,6 @@ export class ProfileFamilyCoupleEmployeeController extends Controller { message: "สำเร็จ", result: { id: "6207ae29-05ef-4abb-9a37-a887265d671e", - couple: true, couplePrefix: "string", coupleFirstName: "string", coupleLastName: "string", @@ -57,7 +56,7 @@ export class ProfileFamilyCoupleEmployeeController extends Controller { } const familyCouple = await this.ProfileFamilyCouple.findOne({ select: [ - "id", "couple", "couplePrefix", "coupleFirstName", "coupleLastName", "coupleLastNameOld", + "id", "couplePrefix", "coupleFirstName", "coupleLastName", "coupleLastNameOld", "coupleCareer", "coupleCitizenId", "coupleLive", "relationship", "profileEmployeeId", ], where: { profileEmployeeId }, @@ -80,7 +79,6 @@ export class ProfileFamilyCoupleEmployeeController extends Controller { lastUpdateUserId: "59134ef9-9e62-41d0-aac5-339be727f2b0", createdFullName: "สาวิตรี ศรีสมัย", lastUpdateFullName: "สาวิตรี ศรีสมัย", - couple: true, couplePrefix: "string", coupleFirstName: "string", coupleLastName: "string", @@ -116,7 +114,6 @@ export class ProfileFamilyCoupleEmployeeController extends Controller { lastUpdateUserId: y.lastUpdateUserId, createdFullName: y.createdFullName, lastUpdateFullName: y.lastUpdateFullName, - couple: y.couple, couplePrefix: y.couplePrefix, coupleFirstName: y.coupleFirstName, coupleLastName: y.coupleLastName, @@ -154,7 +151,6 @@ export class ProfileFamilyCoupleEmployeeController extends Controller { profile.relationship = familyCouple.relationship //update profileEmployee.relationship const history: ProfileFamilyCoupleHistory = Object.assign(new ProfileFamilyCoupleHistory(), { profileFamilyCoupleId: familyCouple.id, - couple: familyCouple.couple, couplePrefix: familyCouple.couplePrefix, coupleFirstName: familyCouple.coupleFirstName, coupleLastName: familyCouple.coupleLastName, @@ -190,7 +186,6 @@ export class ProfileFamilyCoupleEmployeeController extends Controller { familyCouple.lastUpdateUserId = req.user.sub, familyCouple.lastUpdateFullName = req.user.name; history.profileFamilyCoupleId = familyCouple.id; - history.couple = familyCouple.couple, history.couplePrefix = familyCouple.couplePrefix, history.coupleFirstName = familyCouple.coupleFirstName, history.coupleLastName = familyCouple.coupleLastName, diff --git a/src/entities/ProfileFamilyCouple.ts b/src/entities/ProfileFamilyCouple.ts index 243542f6..74821918 100644 --- a/src/entities/ProfileFamilyCouple.ts +++ b/src/entities/ProfileFamilyCouple.ts @@ -103,9 +103,9 @@ export class ProfileFamilyCouple extends EntityBase { } -export type CreateProfileFamilyCouple= { +export type CreateProfileFamilyCouple = { profileId: string; - couple: boolean | null; + // couple: boolean | null; couplePrefix: string | null; coupleFirstName: string | null; coupleLastName: string | null; @@ -116,9 +116,9 @@ export type CreateProfileFamilyCouple= { relationship: string | null; } -export type CreateProfileEmployeeFamilyCouple= { +export type CreateProfileEmployeeFamilyCouple = { profileEmployeeId: string; - couple: boolean | null; + // couple: boolean | null; couplePrefix: string | null; coupleFirstName: string | null; coupleLastName: string | null; @@ -130,7 +130,7 @@ export type CreateProfileEmployeeFamilyCouple= { } export type UpdateProfileFamilyCouple = { - couple?: boolean | null; + // couple?: boolean | null; couplePrefix?: string | null; coupleFirstName?: string | null; coupleLastName?: string | null;