no message

This commit is contained in:
kittapath 2024-12-12 11:36:11 +07:00
parent 992a48b787
commit 9abdeca45b
5 changed files with 197 additions and 181 deletions

View file

@ -284,7 +284,7 @@ export class ProfileEmployeeController extends Controller {
: "-",
ocFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
educations: Education,
url: ImgUrl ? ImgUrl : `https://bma-ehr.frappet.synology.me/assets/avatar_user-89f22423.jpg`,
url: ImgUrl ? ImgUrl : `${process.env.VITE_URL_SSO}/assets/avatar_user-89f22423.jpg`,
};
return new HttpSuccess({
@ -722,7 +722,7 @@ export class ProfileEmployeeController extends Controller {
: "",
telephone:
profiles.telephoneNumber != null ? Extension.ToThaiNumber(profiles.telephoneNumber) : "",
url: ImgUrl ? ImgUrl : `https://bma-ehr.frappet.synology.me/assets/avatar_user-89f22423.jpg`,
url: ImgUrl ? ImgUrl : `${process.env.VITE_URL_SSO}/assets/avatar_user-89f22423.jpg`,
url1: _ImgUrl[0] ? _ImgUrl[0] : null,
yearUpload1: profiles.profileAvatars[0]
? Extension.ToThaiNumber(Extension.ToThaiShortYear(profiles.profileAvatars[0].createdAt))
@ -830,7 +830,7 @@ export class ProfileEmployeeController extends Controller {
const profile = Object.assign(new ProfileEmployee(), body);
profile.prefixMain = profile.prefix;
profile.prefix = profile.rank && profile.rank.length > 0?profile.rank:profile.prefixMain;
profile.prefix = profile.rank && profile.rank.length > 0 ? profile.rank : profile.prefixMain;
profile.createdUserId = request.user.sub;
profile.createdFullName = request.user.name;
profile.lastUpdateUserId = request.user.sub;
@ -927,7 +927,7 @@ export class ProfileEmployeeController extends Controller {
Object.assign(record, body);
record.prefixMain = record.prefix;
record.prefix = record.rank && record.rank.length > 0?record.rank:record.prefixMain;
record.prefix = record.rank && record.rank.length > 0 ? record.rank : record.prefixMain;
record.createdUserId = request.user.sub;
record.createdFullName = request.user.name;
record.createdAt = new Date();
@ -2954,7 +2954,7 @@ export class ProfileEmployeeController extends Controller {
// item.current_holder == null || item.current_holder.profileSalary.length == 0
// ? null
// : item.current_holder.profileSalary.sort((a: any, b: any) => b.date - a.date)[0].amount;
const amount = item.current_holder?item.current_holder.amount:null;
const amount = item.current_holder ? item.current_holder.amount : null;
let datePeriodStart = new Date(
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, "0")}-${String(new Date().getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
);