Merge branch 'develop' into adiDev
This commit is contained in:
commit
fe7dcd6815
8 changed files with 70 additions and 17 deletions
|
|
@ -240,7 +240,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
@Get("{id}")
|
@Get("{id}")
|
||||||
async GetKpiUserEvaluationById(@Path() id: string) {
|
async GetKpiUserEvaluationById(@Path() id: string) {
|
||||||
const kpiUserEvaluation = await this.kpiUserEvalutionRepository.findOne({
|
const kpiUserEvaluation = await this.kpiUserEvalutionRepository.findOne({
|
||||||
relations:["kpiPeriod"],
|
relations: ["kpiPeriod"],
|
||||||
where: { id: id },
|
where: { id: id },
|
||||||
});
|
});
|
||||||
if (!kpiUserEvaluation) {
|
if (!kpiUserEvaluation) {
|
||||||
|
|
@ -257,6 +257,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
lastName: kpiUserEvaluation.lastName,
|
lastName: kpiUserEvaluation.lastName,
|
||||||
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
||||||
evaluationResults: kpiUserEvaluation.evaluationResults,
|
evaluationResults: kpiUserEvaluation.evaluationResults,
|
||||||
|
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
||||||
createdAt: kpiUserEvaluation.createdAt,
|
createdAt: kpiUserEvaluation.createdAt,
|
||||||
evaluatorId: kpiUserEvaluation.evaluatorId,
|
evaluatorId: kpiUserEvaluation.evaluatorId,
|
||||||
commanderId: kpiUserEvaluation.commanderId,
|
commanderId: kpiUserEvaluation.commanderId,
|
||||||
|
|
@ -267,8 +268,9 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
capacityPoint: kpiUserEvaluation.capacityPoint,
|
capacityPoint: kpiUserEvaluation.capacityPoint,
|
||||||
kpiPeriodId: kpiUserEvaluation.kpiPeriodId,
|
kpiPeriodId: kpiUserEvaluation.kpiPeriodId,
|
||||||
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
||||||
durationKPI: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
durationKPI:
|
||||||
}
|
kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
||||||
|
};
|
||||||
return new HttpSuccess(mapData);
|
return new HttpSuccess(mapData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,9 @@ export class KpiUserSpecialController extends Controller {
|
||||||
achievement3: getKpiUserSpecial.achievement3,
|
achievement3: getKpiUserSpecial.achievement3,
|
||||||
achievement4: getKpiUserSpecial.achievement4,
|
achievement4: getKpiUserSpecial.achievement4,
|
||||||
achievement5: getKpiUserSpecial.achievement5,
|
achievement5: getKpiUserSpecial.achievement5,
|
||||||
|
startDate: getKpiUserSpecial.startDate,
|
||||||
|
endDate: getKpiUserSpecial.endDate,
|
||||||
|
documentInfoEvidence: getKpiUserSpecial.documentInfoEvidence,
|
||||||
};
|
};
|
||||||
|
|
||||||
return new HttpSuccess(mapKpiUserSpecial);
|
return new HttpSuccess(mapKpiUserSpecial);
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ export class KpiSpecial extends EntityBase {
|
||||||
comment: "หน่วยนับ",
|
comment: "หน่วยนับ",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
unit: number;
|
unit: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
@ -166,7 +166,7 @@ export class CreateKpiSpecial {
|
||||||
@Column()
|
@Column()
|
||||||
target: string;
|
target: string;
|
||||||
@Column()
|
@Column()
|
||||||
unit: number;
|
unit: string;
|
||||||
@Column()
|
@Column()
|
||||||
weight: number;
|
weight: number;
|
||||||
@Column()
|
@Column()
|
||||||
|
|
@ -191,7 +191,7 @@ export class UpdateKpiSpecial {
|
||||||
@Column()
|
@Column()
|
||||||
achievement2: string;
|
achievement2: string;
|
||||||
@Column()
|
@Column()
|
||||||
achievement3: string ;
|
achievement3: string;
|
||||||
@Column()
|
@Column()
|
||||||
achievement4: string;
|
achievement4: string;
|
||||||
@Column()
|
@Column()
|
||||||
|
|
@ -199,7 +199,7 @@ export class UpdateKpiSpecial {
|
||||||
@Column()
|
@Column()
|
||||||
target: string;
|
target: string;
|
||||||
@Column()
|
@Column()
|
||||||
unit: number;
|
unit: string;
|
||||||
@Column()
|
@Column()
|
||||||
weight: number;
|
weight: number;
|
||||||
@Column()
|
@Column()
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ export class KpiUserEvaluation extends EntityBase {
|
||||||
length: 40,
|
length: 40,
|
||||||
comment:
|
comment:
|
||||||
"ผลการประเมิน ดังนี้ PENDING = รอดำเนินการ, PASSED = ผ่านการประเมิน, NOTPASSED = ไม่ผ่านการประเมิน",
|
"ผลการประเมิน ดังนี้ PENDING = รอดำเนินการ, PASSED = ผ่านการประเมิน, NOTPASSED = ไม่ผ่านการประเมิน",
|
||||||
default: null,
|
default: "PENDING",
|
||||||
})
|
})
|
||||||
evaluationResults: string;
|
evaluationResults: string;
|
||||||
|
|
||||||
|
|
@ -88,7 +88,7 @@ export class KpiUserEvaluation extends EntityBase {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
comment: "คำขอแก้ไข",
|
comment: "คำขอแก้ไข",
|
||||||
default: null,
|
default: "NEW",
|
||||||
})
|
})
|
||||||
evaluationReqEdit: string;
|
evaluationReqEdit: string;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ export class KpiUserSpecial extends EntityBase {
|
||||||
comment: "หน่วยนับ",
|
comment: "หน่วยนับ",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
unit: number;
|
unit: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
@ -185,7 +185,7 @@ export class CreateKpiUserSpecial {
|
||||||
@Column()
|
@Column()
|
||||||
target: string;
|
target: string;
|
||||||
@Column()
|
@Column()
|
||||||
unit: number;
|
unit: string;
|
||||||
@Column()
|
@Column()
|
||||||
weight: number;
|
weight: number;
|
||||||
@Column()
|
@Column()
|
||||||
|
|
@ -196,9 +196,9 @@ export class CreateKpiUserSpecial {
|
||||||
kpiUserEvaluationId: string;
|
kpiUserEvaluationId: string;
|
||||||
@Column()
|
@Column()
|
||||||
documentInfoEvidence: string;
|
documentInfoEvidence: string;
|
||||||
@Column()
|
@Column({ nullable: true })
|
||||||
startDate: Date;
|
startDate: Date;
|
||||||
@Column()
|
@Column({ nullable: true })
|
||||||
endDate: Date;
|
endDate: Date;
|
||||||
@Column()
|
@Column()
|
||||||
period: string;
|
period: string;
|
||||||
|
|
@ -224,7 +224,7 @@ export class UpdateKpiUserSpecial {
|
||||||
@Column()
|
@Column()
|
||||||
target: string;
|
target: string;
|
||||||
@Column()
|
@Column()
|
||||||
unit: number;
|
unit: string;
|
||||||
@Column()
|
@Column()
|
||||||
weight: number;
|
weight: number;
|
||||||
@Column()
|
@Column()
|
||||||
|
|
@ -235,9 +235,9 @@ export class UpdateKpiUserSpecial {
|
||||||
kpiUserEvaluationId: string;
|
kpiUserEvaluationId: string;
|
||||||
@Column()
|
@Column()
|
||||||
documentInfoEvidence: string;
|
documentInfoEvidence: string;
|
||||||
@Column()
|
@Column({ nullable: true })
|
||||||
startDate: Date;
|
startDate: Date;
|
||||||
@Column()
|
@Column({ nullable: true })
|
||||||
endDate: Date;
|
endDate: Date;
|
||||||
@Column()
|
@Column()
|
||||||
period: string;
|
period: string;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableKpiUserEvaluationAddEvaluationReqEdit11715228658780 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableKpiUserEvaluationAddEvaluationReqEdit11715228658780'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationResults\` \`evaluationResults\` varchar(40) NULL COMMENT 'ผลการประเมิน ดังนี้ PENDING = รอดำเนินการ, PASSED = ผ่านการประเมิน, NOTPASSED = ไม่ผ่านการประเมิน' DEFAULT 'PENDING'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationReqEdit\` \`evaluationReqEdit\` varchar(40) NULL COMMENT 'คำขอแก้ไข' DEFAULT 'NEW'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationReqEdit\` \`evaluationReqEdit\` varchar(40) NULL COMMENT 'คำขอแก้ไข'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationResults\` \`evaluationResults\` varchar(40) NULL COMMENT 'ผลการประเมิน ดังนี้ PENDING = รอดำเนินการ, PASSED = ผ่านการประเมิน, NOTPASSED = ไม่ผ่านการประเมิน'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableKpiUserEvaluationAddEvaluationReqEdit21715229248848 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableKpiUserEvaluationAddEvaluationReqEdit21715229248848'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserSpecial\` DROP COLUMN \`unit\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserSpecial\` ADD \`unit\` varchar(255) NULL COMMENT 'หน่วยนับ'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserSpecial\` DROP COLUMN \`unit\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserSpecial\` ADD \`unit\` int NULL COMMENT 'หน่วยนับ'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableKpiUserEvaluationAddEvaluationReqEdit31715229338637 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableKpiUserEvaluationAddEvaluationReqEdit31715229338637'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiSpecial\` DROP COLUMN \`unit\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiSpecial\` ADD \`unit\` varchar(255) NULL COMMENT 'หน่วยนับ'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiSpecial\` DROP COLUMN \`unit\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiSpecial\` ADD \`unit\` int NULL COMMENT 'หน่วยนับ'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue