เพิ่มฟิวตำแหน่งในแบบประเมิน
This commit is contained in:
parent
0a6760a276
commit
0d292ee22b
3 changed files with 77 additions and 1 deletions
|
|
@ -204,6 +204,10 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
kpiUserEvaluation.prefix = x.prefix;
|
kpiUserEvaluation.prefix = x.prefix;
|
||||||
kpiUserEvaluation.firstName = x.firstName;
|
kpiUserEvaluation.firstName = x.firstName;
|
||||||
kpiUserEvaluation.lastName = x.lastName;
|
kpiUserEvaluation.lastName = x.lastName;
|
||||||
|
kpiUserEvaluation.position = x.position;
|
||||||
|
kpiUserEvaluation.posLevelName = x.posLevelName;
|
||||||
|
kpiUserEvaluation.posTypeName = x.posTypeName;
|
||||||
|
kpiUserEvaluation.posExecutiveName = x.posExecutiveName;
|
||||||
})
|
})
|
||||||
.catch((x) => {});
|
.catch((x) => {});
|
||||||
kpiUserEvaluation.evaluationStatus = "NEW";
|
kpiUserEvaluation.evaluationStatus = "NEW";
|
||||||
|
|
@ -309,7 +313,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
|
|
||||||
kpiUserEvaluation.lastUpdateUserId = request.user.sub;
|
kpiUserEvaluation.lastUpdateUserId = request.user.sub;
|
||||||
kpiUserEvaluation.lastUpdateFullName = request.user.name;
|
kpiUserEvaluation.lastUpdateFullName = request.user.name;
|
||||||
this.kpiUserEvalutionRepository.merge(kpiUserEvaluation, requestBody);
|
Object.assign(kpiUserEvaluation, requestBody);
|
||||||
await this.kpiUserEvalutionRepository.save(kpiUserEvaluation);
|
await this.kpiUserEvalutionRepository.save(kpiUserEvaluation);
|
||||||
return new HttpSuccess(kpiUserEvaluation.id);
|
return new HttpSuccess(kpiUserEvaluation.id);
|
||||||
}
|
}
|
||||||
|
|
@ -426,6 +430,10 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
prefix: kpiUserEvaluation.prefix,
|
prefix: kpiUserEvaluation.prefix,
|
||||||
firstName: kpiUserEvaluation.firstName,
|
firstName: kpiUserEvaluation.firstName,
|
||||||
lastName: kpiUserEvaluation.lastName,
|
lastName: kpiUserEvaluation.lastName,
|
||||||
|
position: kpiUserEvaluation.position,
|
||||||
|
posLevelName: kpiUserEvaluation.posLevelName,
|
||||||
|
posTypeName: kpiUserEvaluation.posTypeName,
|
||||||
|
posExecutiveName: kpiUserEvaluation.posExecutiveName,
|
||||||
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
||||||
evaluationResults: kpiUserEvaluation.evaluationResults,
|
evaluationResults: kpiUserEvaluation.evaluationResults,
|
||||||
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,38 @@ export class KpiUserEvaluation extends EntityBase {
|
||||||
})
|
})
|
||||||
lastName: string;
|
lastName: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ตำแหน่ง",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
position: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ประเภทตำแหน่ง",
|
||||||
|
length: 100,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
posTypeName: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ระดับตำแหน่ง",
|
||||||
|
length: 100,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
posLevelName: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ตำแหน่งทางการบริหาร",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
posExecutiveName: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -160,6 +192,14 @@ export class createKpiUserEvaluation {
|
||||||
@Column()
|
@Column()
|
||||||
lastName: string;
|
lastName: string;
|
||||||
@Column()
|
@Column()
|
||||||
|
position: string | null;
|
||||||
|
@Column()
|
||||||
|
posTypeName: string | null;
|
||||||
|
@Column()
|
||||||
|
posLevelName: string | null;
|
||||||
|
@Column()
|
||||||
|
posExecutiveName: string | null;
|
||||||
|
@Column()
|
||||||
kpiPeriodId: string;
|
kpiPeriodId: string;
|
||||||
@Column()
|
@Column()
|
||||||
profileId: string;
|
profileId: string;
|
||||||
|
|
@ -179,6 +219,14 @@ export class updateKpiUserEvaluation {
|
||||||
@Column()
|
@Column()
|
||||||
lastName: string;
|
lastName: string;
|
||||||
@Column()
|
@Column()
|
||||||
|
position: string | null;
|
||||||
|
@Column()
|
||||||
|
posTypeName: string | null;
|
||||||
|
@Column()
|
||||||
|
posLevelName: string | null;
|
||||||
|
@Column()
|
||||||
|
posExecutiveName: string | null;
|
||||||
|
@Column()
|
||||||
kpiPeriodId: string;
|
kpiPeriodId: string;
|
||||||
@Column()
|
@Column()
|
||||||
profileId: string;
|
profileId: string;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableKpiUserEvaluationAddPosExecutiveName1715778412203 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableKpiUserEvaluationAddPosExecutiveName1715778412203'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`position\` varchar(255) NULL COMMENT 'ตำแหน่ง'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`posTypeName\` varchar(100) NULL COMMENT 'ประเภทตำแหน่ง'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`posLevelName\` varchar(100) NULL COMMENT 'ระดับตำแหน่ง'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`posExecutiveName\` varchar(255) NULL COMMENT 'ตำแหน่งทางการบริหาร'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`posExecutiveName\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`posLevelName\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`posTypeName\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`position\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue