เพิ่มฟิวตำแหน่งในแบบประเมิน
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.firstName = x.firstName;
|
||||
kpiUserEvaluation.lastName = x.lastName;
|
||||
kpiUserEvaluation.position = x.position;
|
||||
kpiUserEvaluation.posLevelName = x.posLevelName;
|
||||
kpiUserEvaluation.posTypeName = x.posTypeName;
|
||||
kpiUserEvaluation.posExecutiveName = x.posExecutiveName;
|
||||
})
|
||||
.catch((x) => {});
|
||||
kpiUserEvaluation.evaluationStatus = "NEW";
|
||||
|
|
@ -309,7 +313,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
|
||||
kpiUserEvaluation.lastUpdateUserId = request.user.sub;
|
||||
kpiUserEvaluation.lastUpdateFullName = request.user.name;
|
||||
this.kpiUserEvalutionRepository.merge(kpiUserEvaluation, requestBody);
|
||||
Object.assign(kpiUserEvaluation, requestBody);
|
||||
await this.kpiUserEvalutionRepository.save(kpiUserEvaluation);
|
||||
return new HttpSuccess(kpiUserEvaluation.id);
|
||||
}
|
||||
|
|
@ -426,6 +430,10 @@ export class KpiUserEvaluationController extends Controller {
|
|||
prefix: kpiUserEvaluation.prefix,
|
||||
firstName: kpiUserEvaluation.firstName,
|
||||
lastName: kpiUserEvaluation.lastName,
|
||||
position: kpiUserEvaluation.position,
|
||||
posLevelName: kpiUserEvaluation.posLevelName,
|
||||
posTypeName: kpiUserEvaluation.posTypeName,
|
||||
posExecutiveName: kpiUserEvaluation.posExecutiveName,
|
||||
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
||||
evaluationResults: kpiUserEvaluation.evaluationResults,
|
||||
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,38 @@ export class KpiUserEvaluation extends EntityBase {
|
|||
})
|
||||
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({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -160,6 +192,14 @@ export class createKpiUserEvaluation {
|
|||
@Column()
|
||||
lastName: string;
|
||||
@Column()
|
||||
position: string | null;
|
||||
@Column()
|
||||
posTypeName: string | null;
|
||||
@Column()
|
||||
posLevelName: string | null;
|
||||
@Column()
|
||||
posExecutiveName: string | null;
|
||||
@Column()
|
||||
kpiPeriodId: string;
|
||||
@Column()
|
||||
profileId: string;
|
||||
|
|
@ -179,6 +219,14 @@ export class updateKpiUserEvaluation {
|
|||
@Column()
|
||||
lastName: string;
|
||||
@Column()
|
||||
position: string | null;
|
||||
@Column()
|
||||
posTypeName: string | null;
|
||||
@Column()
|
||||
posLevelName: string | null;
|
||||
@Column()
|
||||
posExecutiveName: string | null;
|
||||
@Column()
|
||||
kpiPeriodId: string;
|
||||
@Column()
|
||||
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