status start NEW

This commit is contained in:
Kittapath 2024-05-08 14:03:13 +07:00
parent 6dfe7203d4
commit f247d20afb
3 changed files with 16 additions and 2 deletions

View file

@ -127,7 +127,7 @@ export class KpiUserEvaluationController extends Controller {
kpiUserEvaluation.lastName = x.lastName;
})
.catch((x) => {});
kpiUserEvaluation.evaluationStatus = "PENDING";
kpiUserEvaluation.evaluationStatus = "NEW";
kpiUserEvaluation.evaluationResults = "PENDING";
kpiUserEvaluation.createdUserId = request.user.sub;
kpiUserEvaluation.createdFullName = request.user.name;

View file

@ -71,7 +71,7 @@ export class KpiUserEvaluation extends EntityBase {
length: 40,
comment:
"สถานะการประเมินผล ดังนี้ NEW = รอดำเนินการ, INPROGRESS = กําลังดำเนินการ, DONE = ประเมินเสร็จสิ้น",
default: null,
default: "NEW",
})
evaluationStatus: string;

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class AddTableKpiDevelopment11715151729330 implements MigrationInterface {
name = 'AddTableKpiDevelopment11715151729330'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationStatus\` \`evaluationStatus\` varchar(40) NULL COMMENT 'สถานะการประเมินผล ดังนี้ NEW = รอดำเนินการ, INPROGRESS = กําลังดำเนินการ, DONE = ประเมินเสร็จสิ้น' DEFAULT 'NEW'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationStatus\` \`evaluationStatus\` varchar(40) NULL COMMENT 'สถานะการประเมินผล ดังนี้ NEW = รอดำเนินการ, INPROGRESS = กําลังดำเนินการ, DONE = ประเมินเสร็จสิ้น'`);
}
}