This commit is contained in:
AdisakKanthawilang 2024-06-06 19:33:02 +07:00
parent 1ebeaa8308
commit 573e0930f6

View file

@ -248,8 +248,8 @@ export class ProfileController extends Controller {
const profileFamilyCouple = await this.profileFamilyCoupleRepository.findOne({ const profileFamilyCouple = await this.profileFamilyCoupleRepository.findOne({
where: { profileId: id }, where: { profileId: id },
select: ["couplePrefix", "coupleFirstName", "coupleLastNameOld"], select: ["couplePrefix", "coupleFirstName", "coupleLastName", "coupleLastNameOld"],
order: {lastUpdatedAt: "DESC"} order: { lastUpdatedAt: "DESC" },
}); });
const profileFamilyMother = await this.profileFamilyMotherRepository.findOne({ const profileFamilyMother = await this.profileFamilyMotherRepository.findOne({
@ -345,7 +345,7 @@ export class ProfileController extends Controller {
profileFamilyCouple?.couplePrefix || profileFamilyCouple?.couplePrefix ||
profileFamilyCouple?.coupleFirstName || profileFamilyCouple?.coupleFirstName ||
profileFamilyCouple?.coupleLastNameOld profileFamilyCouple?.coupleLastNameOld
? `${profileFamilyCouple?.couplePrefix ?? ""}${profileFamilyCouple?.coupleFirstName ?? ""} ${profileFamilyCouple?.coupleLastNameOld ?? ""}`.trim() ? `${profileFamilyCouple?.couplePrefix ?? ""}${profileFamilyCouple?.coupleFirstName ?? ""} ${profileFamilyCouple?.coupleLastName ?? ""}`.trim()
: null, : null,
FatherPrefix: profileFamilyFather?.fatherPrefix ?? "", FatherPrefix: profileFamilyFather?.fatherPrefix ?? "",
FatherFullName: FatherFullName: