role เมนู ลูกจ้างชั่วคราว
This commit is contained in:
parent
6f053d2c70
commit
877a70ef3d
22 changed files with 109 additions and 63 deletions
|
|
@ -116,7 +116,8 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @param {string} id Id โปรไฟล์
|
||||
*/
|
||||
@Get("kp7-short/{id}")
|
||||
async kp7ShortById(@Path() id: string) {
|
||||
async kp7ShortById(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const orgRevision = await this.orgRevisionRepo.findOne({
|
||||
where: { orgRevisionIsCurrent: true },
|
||||
});
|
||||
|
|
@ -239,7 +240,8 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @param {string} id Id โปรไฟล์
|
||||
*/
|
||||
@Get("kk1/{id}")
|
||||
public async getKk1Employee(@Path() id: string) {
|
||||
public async getKk1Employee(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const profiles = await this.profileRepo.findOne({
|
||||
// select: [
|
||||
// "citizenId",
|
||||
|
|
@ -1053,7 +1055,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @param {string} id Id ทะเบียนประวัติ
|
||||
*/
|
||||
@Get("{id}")
|
||||
async detailProfile(@Path() id: string) {
|
||||
async detailProfile(@Path() id: string) {//ตสTEMP
|
||||
const profile = await this.profileRepo.findOne({
|
||||
relations: {
|
||||
posLevel: true,
|
||||
|
|
@ -1306,7 +1308,8 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
}
|
||||
|
||||
@Get("history/{id}")
|
||||
async getProfileHistory(@Path() id: string) {
|
||||
async getProfileHistory(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
||||
const profile = await this.profileHistoryRepo.find({
|
||||
relations: {
|
||||
posLevel: true,
|
||||
|
|
@ -2066,7 +2069,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @param {string} id Id ทะเบียนประวัติลูกจ้างชั่วคราว
|
||||
*/
|
||||
@Put("position/{id}")
|
||||
async positionProfileEmployee(
|
||||
async positionProfileEmployee(//ตสTEMP
|
||||
@Request() request: RequestWithUser,
|
||||
@Path() id: string,
|
||||
@Body() body: UpdatePositionTempProfileEmployee,
|
||||
|
|
@ -2198,7 +2201,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @param {string} id Id ทะเบียนประวัติ
|
||||
*/
|
||||
@Put("citizenId/{id}")
|
||||
async checkCitizenIdProfile(
|
||||
async checkCitizenIdProfile(//ตสTEMP
|
||||
@Path() id: string,
|
||||
@Body()
|
||||
requestBody: { citizenId: string },
|
||||
|
|
@ -2549,7 +2552,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Get("keycloak/position/{revisionId}")
|
||||
async getProfileByKeycloakByRevision(
|
||||
async getProfileByKeycloakByRevision(//ตสTEMP
|
||||
@Path() revisionId: string,
|
||||
@Request() request: { user: Record<string, any> },
|
||||
) {
|
||||
|
|
@ -2649,7 +2652,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @summary ข้อมูลบุลคลที่มีอายุเกษียณราชการตามปี
|
||||
*
|
||||
*/
|
||||
@Get("profileid/retire/{year}")
|
||||
@Get("profileid/retire/{year}")//ตสTEMP
|
||||
async getProfileByRetireYear(@Path() year: number) {
|
||||
const profiles = await this.profileRepo
|
||||
.createQueryBuilder("profileEmployee")
|
||||
|
|
@ -2842,7 +2845,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} id Id ทะเบียนประวัติ
|
||||
*/
|
||||
@Post("leave/{id}")
|
||||
@Post("leave/{id}")//ตสTEMP
|
||||
async updateLeaveUser(
|
||||
@Path() id: string,
|
||||
@Body()
|
||||
|
|
@ -2877,7 +2880,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} profileEmployeeId profileEmployeeId ทะเบียนประวัติลูกจ้างชั่วคราว
|
||||
*/
|
||||
@Put("information/{profileEmployeeId}")
|
||||
@Put("information/{profileEmployeeId}")//ตสTEMP
|
||||
async ProfileEmployeeInformation(
|
||||
@Request() request: RequestWithUser,
|
||||
@Path() profileEmployeeId: string,
|
||||
|
|
@ -2909,7 +2912,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} profileEmployeeId profileEmployeeId ทะเบียนประวัติลูกจ้างชั่วคราว
|
||||
*/
|
||||
@Get("information/{profileEmployeeId}")
|
||||
@Get("information/{profileEmployeeId}")//ตสTEMP
|
||||
async getInformationById(@Path() profileEmployeeId: string) {
|
||||
const profileInformation = await this.profileRepo.findOne({
|
||||
where: { id: profileEmployeeId },
|
||||
|
|
@ -2939,7 +2942,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} profileEmployeeId profileEmployeeId ทะเบียนประวัติลูกจ้างชั่วคราว
|
||||
*/
|
||||
@Get("information/history/{profileEmployeeId}")
|
||||
@Get("information/history/{profileEmployeeId}")//ตสTEMP
|
||||
async getInformationHistory(@Path() profileEmployeeId: string) {
|
||||
const profileInformation = await this.profileRepo.find({
|
||||
relations: {
|
||||
|
|
@ -2980,7 +2983,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} profileEmployeeId profileEmployeeId ทะเบียนประวัติลูกจ้างชั่วคราว
|
||||
*/
|
||||
@Get("employment/{profileEmployeeId}")
|
||||
@Get("employment/{profileEmployeeId}")//ตสTEMP
|
||||
async ProfileEmployeeEmployment(@Path() profileEmployeeId: string) {
|
||||
const employment = await this.employmentRepository.find({
|
||||
where: { profileEmployeeId: profileEmployeeId },
|
||||
|
|
@ -3001,7 +3004,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} id Id ข้อมูลการจ้าง
|
||||
*/
|
||||
@Get("employment/id/{id}")
|
||||
@Get("employment/id/{id}")//ตสTEMP
|
||||
async GetEmploymentById(@Path() id: string) {
|
||||
const employment = await this.employmentRepository.findOne({
|
||||
where: { id: id },
|
||||
|
|
@ -3016,7 +3019,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} id Id ข้อมูลการจ้าง
|
||||
*/
|
||||
@Get("employment/history/{id}")
|
||||
@Get("employment/history/{id}")//ตสTEMP
|
||||
async GetHistoryEmploymentById(@Path() id: string) {
|
||||
const employmentHistory = await this.employmentHistoryRepository.find({
|
||||
where: { profileEmployeeEmploymentId: id },
|
||||
|
|
@ -3032,7 +3035,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} profileEmployeeId profileEmployeeId ทะเบียนประวัติลูกจ้างชั่วคราว
|
||||
*/
|
||||
@Post("employment/{profileEmployeeId}")
|
||||
@Post("employment/{profileEmployeeId}")//ตสTEMP
|
||||
async CreateEmployment(
|
||||
@Path() profileEmployeeId: string,
|
||||
@Body() body: CreateEmploymentProfileEmployee,
|
||||
|
|
@ -3071,7 +3074,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} id Id ข้อมูลการจ้าง
|
||||
*/
|
||||
@Delete("employment/{id}")
|
||||
@Delete("employment/{id}")//ตสTEMP
|
||||
async DeleteEmployment(@Path() id: string) {
|
||||
await this.employmentHistoryRepository.delete({
|
||||
profileEmployeeEmploymentId: id,
|
||||
|
|
@ -3091,7 +3094,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
*
|
||||
* @param {string} id Id ข้อมูลการจ้าง
|
||||
*/
|
||||
@Put("employment/{id}")
|
||||
@Put("employment/{id}")//ตสTEMP
|
||||
async UpdateEmployment(
|
||||
@Request() request: RequestWithUser,
|
||||
@Path() id: string,
|
||||
|
|
@ -3124,7 +3127,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @summary ORG_038 - ออกคำสั่งลูกจ้าง (ADMIN) #
|
||||
*
|
||||
*/
|
||||
@Post("report")
|
||||
@Post("report")//ตสTEMP
|
||||
async sendReport(@Request() request: RequestWithUser, @Body() requestBody: { id: string[] }) {
|
||||
const profiles = await this.profileRepo.find({ where: { id: In(requestBody.id) } });
|
||||
|
||||
|
|
@ -3148,7 +3151,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @summary ORG_038 - ออกคำสั่งลูกจ้าง (ADMIN) #
|
||||
*
|
||||
*/
|
||||
@Post("report/resume")
|
||||
@Post("report/resume")//ตสTEMP
|
||||
async doneReport(
|
||||
@Body()
|
||||
body: {
|
||||
|
|
@ -3213,7 +3216,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @summary ค้นหาข้อมูลทะเบียนประวัติที่ยังไม่เชื่อม keycloak
|
||||
*
|
||||
*/
|
||||
@Post("search-personal-no-keycloak")
|
||||
@Post("search-personal-no-keycloak")//ตสTEMP
|
||||
async getProfileBySearchKeywordNoKeyCloak(
|
||||
@Query("page") page: number = 1,
|
||||
@Query("pageSize") pageSize: number = 10,
|
||||
|
|
@ -3379,7 +3382,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
* @summary ORG_065 - ข้อมูลทะเบียนประวัติตาม profileid (ADMIN) #70
|
||||
*
|
||||
*/
|
||||
@Get("profileid/position/{id}")
|
||||
@Get("profileid/position/{id}")//ตสTEMP
|
||||
async getProfileByProfileid(
|
||||
@Request() request: { user: Record<string, any> },
|
||||
@Path() id: string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue