Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 59s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 59s
This commit is contained in:
commit
7e5b881f27
4 changed files with 12 additions and 36 deletions
|
|
@ -280,8 +280,8 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||||
) <= datePeriodEnd,
|
) <= datePeriodEnd,
|
||||||
).length > 0
|
).length > 0
|
||||||
? true
|
? false
|
||||||
: false,
|
: true,
|
||||||
isSuspension: item.current_holder.dateRetire == null ? false : true,
|
isSuspension: item.current_holder.dateRetire == null ? false : true,
|
||||||
isAbsent: item.current_holder.profileDisciplines.length > 0 ? true : false,
|
isAbsent: item.current_holder.profileDisciplines.length > 0 ? true : false,
|
||||||
isLeave: item.current_holder.profileLeaves.length > 0 ? true : false,
|
isLeave: item.current_holder.profileLeaves.length > 0 ? true : false,
|
||||||
|
|
@ -740,8 +740,8 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||||
) <= datePeriodEnd,
|
) <= datePeriodEnd,
|
||||||
).length > 0
|
).length > 0
|
||||||
? true
|
? false
|
||||||
: false,
|
: true,
|
||||||
isSuspension: item.current_holder.dateRetire == null ? false : true,
|
isSuspension: item.current_holder.dateRetire == null ? false : true,
|
||||||
isAbsent: item.current_holder.profileDisciplines.length > 0 ? true : false,
|
isAbsent: item.current_holder.profileDisciplines.length > 0 ? true : false,
|
||||||
isLeave: item.current_holder.profileLeaves.length > 0 ? true : false,
|
isLeave: item.current_holder.profileLeaves.length > 0 ? true : false,
|
||||||
|
|
|
||||||
|
|
@ -3302,10 +3302,7 @@ export class ProfileController extends Controller {
|
||||||
citizenIdDigits[10] * 3 +
|
citizenIdDigits[10] * 3 +
|
||||||
citizenIdDigits[11] * 2;
|
citizenIdDigits[11] * 2;
|
||||||
const calStp2 = cal % 11;
|
const calStp2 = cal % 11;
|
||||||
let chkDigit = 11 - calStp2;
|
const chkDigit = (11 - calStp2) % 10;
|
||||||
if (chkDigit >= 10) {
|
|
||||||
chkDigit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (citizenIdDigits[12] !== chkDigit) {
|
if (citizenIdDigits[12] !== chkDigit) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||||
|
|
@ -3338,10 +3335,7 @@ export class ProfileController extends Controller {
|
||||||
citizenIdDigits[10] * 3 +
|
citizenIdDigits[10] * 3 +
|
||||||
citizenIdDigits[11] * 2;
|
citizenIdDigits[11] * 2;
|
||||||
const calStp2 = cal % 11;
|
const calStp2 = cal % 11;
|
||||||
let chkDigit = 11 - calStp2;
|
const chkDigit = (11 - calStp2) % 10;
|
||||||
if (chkDigit >= 10) {
|
|
||||||
chkDigit = 0;
|
|
||||||
}
|
|
||||||
// else if(chkDigit === 11){
|
// else if(chkDigit === 11){
|
||||||
// chkDigit = cal % 10;
|
// chkDigit = cal % 10;
|
||||||
// }
|
// }
|
||||||
|
|
@ -3416,10 +3410,7 @@ export class ProfileController extends Controller {
|
||||||
citizenIdDigits[10] * 3 +
|
citizenIdDigits[10] * 3 +
|
||||||
citizenIdDigits[11] * 2;
|
citizenIdDigits[11] * 2;
|
||||||
const calStp2 = cal % 11;
|
const calStp2 = cal % 11;
|
||||||
let chkDigit = 11 - calStp2;
|
const chkDigit = (11 - calStp2) % 10;
|
||||||
if (chkDigit >= 10) {
|
|
||||||
chkDigit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (citizenIdDigits[12] !== chkDigit) {
|
if (citizenIdDigits[12] !== chkDigit) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||||
|
|
@ -3484,10 +3475,7 @@ export class ProfileController extends Controller {
|
||||||
citizenIdDigits[10] * 3 +
|
citizenIdDigits[10] * 3 +
|
||||||
citizenIdDigits[11] * 2;
|
citizenIdDigits[11] * 2;
|
||||||
const calStp2 = cal % 11;
|
const calStp2 = cal % 11;
|
||||||
let chkDigit = 11 - calStp2;
|
const chkDigit = (11 - calStp2) % 10;
|
||||||
if (chkDigit >= 10) {
|
|
||||||
chkDigit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (citizenIdDigits[12] !== chkDigit) {
|
if (citizenIdDigits[12] !== chkDigit) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||||
|
|
@ -5249,10 +5237,7 @@ export class ProfileController extends Controller {
|
||||||
citizenIdDigits[10] * 3 +
|
citizenIdDigits[10] * 3 +
|
||||||
citizenIdDigits[11] * 2;
|
citizenIdDigits[11] * 2;
|
||||||
const calStp2 = cal % 11;
|
const calStp2 = cal % 11;
|
||||||
let chkDigit = 11 - calStp2;
|
const chkDigit = (11 - calStp2) % 10;
|
||||||
if (chkDigit >= 10) {
|
|
||||||
chkDigit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (citizenIdDigits[12] !== chkDigit) {
|
if (citizenIdDigits[12] !== chkDigit) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||||
|
|
|
||||||
|
|
@ -1891,10 +1891,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
citizenIdDigits[10] * 3 +
|
citizenIdDigits[10] * 3 +
|
||||||
citizenIdDigits[11] * 2;
|
citizenIdDigits[11] * 2;
|
||||||
const calStp2 = cal % 11;
|
const calStp2 = cal % 11;
|
||||||
let chkDigit = 11 - calStp2;
|
const chkDigit = (11 - calStp2) % 10;
|
||||||
if (chkDigit >= 10) {
|
|
||||||
chkDigit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (citizenIdDigits[12] !== chkDigit) {
|
if (citizenIdDigits[12] !== chkDigit) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||||
|
|
@ -1983,10 +1980,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
citizenIdDigits[10] * 3 +
|
citizenIdDigits[10] * 3 +
|
||||||
citizenIdDigits[11] * 2;
|
citizenIdDigits[11] * 2;
|
||||||
const calStp2 = cal % 11;
|
const calStp2 = cal % 11;
|
||||||
let chkDigit = 11 - calStp2;
|
const chkDigit = (11 - calStp2) % 10;
|
||||||
if (chkDigit >= 10) {
|
|
||||||
chkDigit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (citizenIdDigits[12] !== chkDigit) {
|
if (citizenIdDigits[12] !== chkDigit) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||||
|
|
|
||||||
|
|
@ -275,10 +275,7 @@ class Extension {
|
||||||
citizenIdDigits[10] * 3 +
|
citizenIdDigits[10] * 3 +
|
||||||
citizenIdDigits[11] * 2;
|
citizenIdDigits[11] * 2;
|
||||||
const calStp2 = cal % 11;
|
const calStp2 = cal % 11;
|
||||||
let chkDigit = 11 - calStp2;
|
const chkDigit = (11 - calStp2) % 10;
|
||||||
if (chkDigit >= 10) {
|
|
||||||
chkDigit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (citizenIdDigits[12] !== chkDigit) {
|
// if (citizenIdDigits[12] !== chkDigit) {
|
||||||
// throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
// throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue