Merge branch 'develop' into develop-Bright
This commit is contained in:
commit
e0356202d2
2 changed files with 17 additions and 4 deletions
|
|
@ -177,11 +177,11 @@ export class ProfileController extends Controller {
|
|||
LastName: profile.lastName != null ? profile.lastName : "",
|
||||
DateOfBirth:
|
||||
profile.birthDate != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate(profile.birthDate))
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_perfixMonthYear(profile.birthDate))
|
||||
: "",
|
||||
DateRetire:
|
||||
profile.dateRetire != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate(profile.dateRetire))
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_perfixMonthYear(profile.dateRetire))
|
||||
: "",
|
||||
RegistrationAddress: Extension.ToThaiNumber(
|
||||
`${_regisAddres}${_subDistrict}${_district}${_province}${registrationZipCode}`,
|
||||
|
|
@ -197,11 +197,13 @@ export class ProfileController extends Controller {
|
|||
: "",
|
||||
AppointText:
|
||||
profile.dateAppoint != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate(profile.dateAppoint))
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_perfixMonthYear(profile.dateAppoint))
|
||||
: "",
|
||||
SalaryDate:
|
||||
profile.profileSalary.length > 0 && profile.profileSalary[0].date != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate(profile.profileSalary[0].date))
|
||||
? Extension.ToThaiNumber(
|
||||
Extension.ToThaiShortDate_perfixMonthYear(profile.profileSalary[0].date),
|
||||
)
|
||||
: "",
|
||||
PositionName: profile.position != null ? profile.position : "",
|
||||
OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
||||
|
|
|
|||
|
|
@ -123,6 +123,17 @@ class Extension {
|
|||
);
|
||||
}
|
||||
|
||||
public static ToThaiShortDate_perfixMonthYear(value: Date) {
|
||||
let yy = value.getFullYear() < 2400 ? value.getFullYear() + 543 : value.getFullYear();
|
||||
return (
|
||||
value.getDate() +
|
||||
" เดือน " +
|
||||
Extension.ToThaiShortMonth(value.getMonth() + 1) +
|
||||
" พ.ศ. " +
|
||||
yy
|
||||
);
|
||||
}
|
||||
|
||||
public static sumObjectValues(array: any, propertyName: any) {
|
||||
let sum = 0;
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue