no message

This commit is contained in:
kittapath 2024-10-18 11:45:16 +07:00
parent 6a23f31046
commit 3c0a39a8c4
37 changed files with 27 additions and 178 deletions

View file

@ -62,7 +62,6 @@ import {
} from "../entities/ProfileEmployeeEmployment"; } from "../entities/ProfileEmployeeEmployment";
import { ProfileEmployeeEmploymentHistory } from "../entities/ProfileEmployeeEmploymentHistory"; import { ProfileEmployeeEmploymentHistory } from "../entities/ProfileEmployeeEmploymentHistory";
import CallAPI from "../interfaces/call-api"; import CallAPI from "../interfaces/call-api";
import { EmployeePosition } from "../entities/EmployeePosition";
import { ProfileInsignia } from "../entities/ProfileInsignia"; import { ProfileInsignia } from "../entities/ProfileInsignia";
import { ProfileLeave } from "../entities/ProfileLeave"; import { ProfileLeave } from "../entities/ProfileLeave";
import permission from "../interfaces/permission"; import permission from "../interfaces/permission";

View file

@ -1,16 +1,4 @@
import { import { Body, Controller, Get, Patch, Path, Post, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";

View file

@ -1,16 +1,4 @@
import { import { Body, Controller, Get, Patch, Path, Post, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";

View file

@ -1,16 +1,4 @@
import { import { Body, Controller, Get, Patch, Path, Post, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";

View file

@ -1,16 +1,4 @@
import { import { Body, Controller, Get, Patch, Path, Post, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";

View file

@ -1,16 +1,4 @@
import { import { Body, Controller, Get, Patch, Path, Post, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";

View file

@ -1,16 +1,4 @@
import { import { Body, Controller, Get, Patch, Path, Post, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";

View file

@ -1,16 +1,4 @@
import { import { Body, Controller, Get, Patch, Path, Post, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";

View file

@ -1,16 +1,4 @@
import { import { Body, Controller, Get, Patch, Path, Post, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";

View file

@ -1,28 +1,11 @@
import { import { Body, Controller, Example, Get, Patch, Path, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Delete,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";
import HttpError from "../interfaces/http-error"; import HttpError from "../interfaces/http-error";
import { RequestWithUser } from "../middlewares/user"; import { RequestWithUser } from "../middlewares/user";
import { ProfileEmployee } from "../entities/ProfileEmployee"; import { ProfileEmployee } from "../entities/ProfileEmployee";
import { import { ProfileGovernment, UpdateProfileGovernment } from "../entities/ProfileGovernment";
CreateProfileEmployeeGovernment,
ProfileGovernment,
UpdateProfileGovernment,
} from "../entities/ProfileGovernment";
import { EmployeePosition } from "../entities/EmployeePosition"; import { EmployeePosition } from "../entities/EmployeePosition";
import { EmployeePosMaster } from "../entities/EmployeePosMaster"; import { EmployeePosMaster } from "../entities/EmployeePosMaster";
import { calculateAge, calculateRetireDate, setLogDataDiff } from "../interfaces/utils"; import { calculateAge, calculateRetireDate, setLogDataDiff } from "../interfaces/utils";

View file

@ -1,28 +1,11 @@
import { import { Body, Controller, Example, Get, Patch, Path, Request, Route, Security, Tags } from "tsoa";
Body,
Controller,
Example,
Get,
Patch,
Path,
Delete,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success"; import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status"; import HttpStatus from "../interfaces/http-status";
import HttpError from "../interfaces/http-error"; import HttpError from "../interfaces/http-error";
import { RequestWithUser } from "../middlewares/user"; import { RequestWithUser } from "../middlewares/user";
import { ProfileEmployee } from "../entities/ProfileEmployee"; import { ProfileEmployee } from "../entities/ProfileEmployee";
import { import { ProfileGovernment, UpdateProfileGovernment } from "../entities/ProfileGovernment";
CreateProfileEmployeeGovernment,
ProfileGovernment,
UpdateProfileGovernment,
} from "../entities/ProfileGovernment";
import { EmployeePosition } from "../entities/EmployeePosition"; import { EmployeePosition } from "../entities/EmployeePosition";
import { EmployeePosMaster } from "../entities/EmployeePosMaster"; import { EmployeePosMaster } from "../entities/EmployeePosMaster";
import { calculateAge, calculateRetireDate, setLogDataDiff } from "../interfaces/utils"; import { calculateAge, calculateRetireDate, setLogDataDiff } from "../interfaces/utils";

View file

@ -2,7 +2,6 @@ import {
Body, Body,
Controller, Controller,
Delete, Delete,
Example,
Get, Get,
Patch, Patch,
Path, Path,

View file

@ -2,7 +2,6 @@ import {
Body, Body,
Controller, Controller,
Delete, Delete,
Example,
Get, Get,
Patch, Patch,
Path, Path,

View file

@ -2,7 +2,6 @@ import {
Body, Body,
Controller, Controller,
Delete, Delete,
Example,
Get, Get,
Patch, Patch,
Path, Path,

View file

@ -2,7 +2,6 @@ import {
Body, Body,
Controller, Controller,
Delete, Delete,
Example,
Get, Get,
Patch, Patch,
Path, Path,

View file

@ -9,7 +9,6 @@ import {
Body, Body,
Path, Path,
Request, Request,
SuccessResponse,
Response, Response,
Get, Get,
} from "tsoa"; } from "tsoa";

View file

@ -9,7 +9,6 @@ import {
Body, Body,
Path, Path,
Request, Request,
SuccessResponse,
Response, Response,
Get, Get,
} from "tsoa"; } from "tsoa";

View file

@ -9,7 +9,6 @@ import {
Body, Body,
Path, Path,
Request, Request,
SuccessResponse,
Response, Response,
Get, Get,
} from "tsoa"; } from "tsoa";
@ -21,7 +20,6 @@ import { CreateRelationship, Relationship } from "../entities/Relationship";
import { Not } from "typeorm"; import { Not } from "typeorm";
import { RequestWithUser } from "../middlewares/user"; import { RequestWithUser } from "../middlewares/user";
import { setLogDataDiff } from "../interfaces/utils"; import { setLogDataDiff } from "../interfaces/utils";
import { request } from "axios";
@Route("api/v1/org/metadata/relationship") @Route("api/v1/org/metadata/relationship")
@Tags("Relationship") @Tags("Relationship")
@Security("bearerAuth") @Security("bearerAuth")

View file

@ -9,7 +9,6 @@ import {
Body, Body,
Path, Path,
Request, Request,
SuccessResponse,
Response, Response,
Get, Get,
} from "tsoa"; } from "tsoa";

View file

@ -9,7 +9,6 @@ import {
Body, Body,
Path, Path,
Request, Request,
SuccessResponse,
Response, Response,
Get, Get,
} from "tsoa"; } from "tsoa";

View file

@ -30,15 +30,11 @@ import {
getRoleMappings, getRoleMappings,
getUserCount, getUserCount,
enableStatus, enableStatus,
getUserCountOrg,
getUserListOrg,
} from "../keycloak"; } from "../keycloak";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import { Profile } from "../entities/Profile"; import { Profile } from "../entities/Profile";
import { ProfileEmployee } from "../entities/ProfileEmployee"; import { ProfileEmployee } from "../entities/ProfileEmployee";
import { IsNull, Not } from "typeorm";
import { RequestWithUser } from "../middlewares/user"; import { RequestWithUser } from "../middlewares/user";
import permission from "../interfaces/permission";
// import * as io from "../lib/websocket"; // import * as io from "../lib/websocket";
// import elasticsearch from "../elasticsearch"; // import elasticsearch from "../elasticsearch";
// import { StorageFolder } from "../interfaces/storage-fs"; // import { StorageFolder } from "../interfaces/storage-fs";

View file

@ -561,8 +561,8 @@ export class WorkflowController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลขั้นตอนการอนุมัติ"); throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลขั้นตอนการอนุมัติ");
let _null: any = null; let _null: any = null;
stateUserComment.isAccept = body.isAccept == null ? _null : body.isAccept; stateUserComment.isAccept = body.isAccept == null ? _null : body.isAccept;
stateUserComment.isApprove = body.isApprove == null ? _null : body.isAccept; stateUserComment.isApprove = body.isApprove == null ? _null : body.isApprove;
stateUserComment.reason = body.reason == null ? _null : body.isAccept; stateUserComment.reason = body.reason == null ? _null : body.reason;
stateUserComment.lastUpdateUserId = req.user.sub; stateUserComment.lastUpdateUserId = req.user.sub;
stateUserComment.lastUpdateFullName = req.user.name; stateUserComment.lastUpdateFullName = req.user.name;
stateUserComment.lastUpdatedAt = new Date(); stateUserComment.lastUpdatedAt = new Date();

View file

@ -8,7 +8,6 @@ import {
ManyToOne, ManyToOne,
JoinColumn, JoinColumn,
} from "typeorm"; } from "typeorm";
import { CommandType } from "./CommandType";
import { PosMasterAssign } from "./PosMasterAssign"; import { PosMasterAssign } from "./PosMasterAssign";
import { CommandSys } from "./CommandSys"; import { CommandSys } from "./CommandSys";

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne } from "typeorm"; import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base"; import { EntityBase } from "./base/Base";
import { AuthRoleAttr } from "./AuthRoleAttr"; import { AuthRoleAttr } from "./AuthRoleAttr";
import { PosMaster } from "./PosMaster"; import { PosMaster } from "./PosMaster";

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm"; import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base"; import { EntityBase } from "./base/Base";
import { AuthSys } from "./AuthSys"; import { AuthSys } from "./AuthSys";
import { AuthRole } from "./AuthRole"; import { AuthRole } from "./AuthRole";

View file

@ -1,7 +1,5 @@
import { Entity, Column, OneToMany } from "typeorm"; import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base"; import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
@Entity("bloodGroup") @Entity("bloodGroup")
export class BloodGroup extends EntityBase { export class BloodGroup extends EntityBase {

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm"; import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base"; import { EntityBase } from "./base/Base";
import { ProfileChangePosition } from "./ProfileChangePosition"; import { ProfileChangePosition } from "./ProfileChangePosition";

View file

@ -1,4 +1,4 @@
import { Entity, Column, JoinColumn, ManyToOne, OneToMany, Double } from "typeorm"; import { Entity, Column, JoinColumn, ManyToOne, Double } from "typeorm";
import { EntityBase } from "./base/Base"; import { EntityBase } from "./base/Base";
import { Command } from "./Command"; import { Command } from "./Command";

View file

@ -9,7 +9,6 @@ import {
import { CommandType } from "./CommandType"; import { CommandType } from "./CommandType";
import { CommandSalary } from "./CommandSalary"; import { CommandSalary } from "./CommandSalary";
import { Assign } from "./Assign"; import { Assign } from "./Assign";
import { Workflow } from "./Workflow";
@Entity("commandSys") @Entity("commandSys")
export class CommandSys { export class CommandSys {

View file

@ -1,7 +1,5 @@
import { Entity, Column, OneToMany } from "typeorm"; import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base"; import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
@Entity("gender") @Entity("gender")
export class Gender extends EntityBase { export class Gender extends EntityBase {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm"; import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_EDUCATION") @Entity("HR_EDUCATION")
export class HR_EDUCATION { export class HR_EDUCATION {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm"; import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_EDUCATION_EMP") @Entity("HR_EDUCATION_EMP")
export class HR_EDUCATION_EMP { export class HR_EDUCATION_EMP {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm"; import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_PERSONAL_EMP_ADDRESS") @Entity("HR_PERSONAL_EMP_ADDRESS")
export class HR_PERSONAL_EMP_ADDRESS { export class HR_PERSONAL_EMP_ADDRESS {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm"; import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_PERSONAL_EMP_FAMILY") @Entity("HR_PERSONAL_EMP_FAMILY")
export class HR_PERSONAL_EMP_FAMILY { export class HR_PERSONAL_EMP_FAMILY {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm"; import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_PERSONAL_OFFICER_ADDRESS") @Entity("HR_PERSONAL_OFFICER_ADDRESS")
export class HR_PERSONAL_OFFICER_ADDRESS { export class HR_PERSONAL_OFFICER_ADDRESS {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm"; import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_PERSONAL_OFFICER_FAMILY") @Entity("HR_PERSONAL_OFFICER_FAMILY")
export class HR_PERSONAL_OFFICER_FAMILY { export class HR_PERSONAL_OFFICER_FAMILY {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm"; import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_POSITION_OFFICER") @Entity("HR_POSITION_OFFICER")
export class HR_POSITION_OFFICER { export class HR_POSITION_OFFICER {