Merge branch 'develop' into dev

# Conflicts:
#	src/controllers/ProfileAvatarEmployeeController.ts
This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-01-30 17:39:31 +07:00
commit 217f9f64f9
3 changed files with 7 additions and 6 deletions

View file

@ -159,13 +159,14 @@ export class ProfileAvatarController extends Controller {
"SYS_REGISTRY_OFFICER",
_record.profileId,
);
if (_record.isActive) {
const profile = await this.profileRepository.findOne({
where: { id: _record.profileId },
});
if (profile) {
profile.avatar = '';
profile.avatarName = '';
profile.avatar = null;
profile.avatarName = null;
await this.profileRepository.save(profile, { data: req });
}
}

View file

@ -160,8 +160,8 @@ export class ProfileAvatarEmployeeController extends Controller {
where: { id: _record.profileEmployeeId },
});
if (profile) {
profile.avatar = '';
profile.avatarName = '';
profile.avatar = "";
profile.avatarName = "";
await this.profileRepository.save(profile, { data: req });
}
}

View file

@ -58,14 +58,14 @@ export class Profile extends EntityBase {
comment: "รูปถ่าย",
default: null,
})
avatar: string;
avatar: string | null;
@Column({
nullable: true,
comment: "รูปถ่าย",
default: null,
})
avatarName: string;
avatarName: string | null;
@Column({
nullable: true,