fix
This commit is contained in:
parent
8593edfc43
commit
a2b31473ea
3 changed files with 11 additions and 6 deletions
|
|
@ -48,17 +48,17 @@ export class kpiCapacityController extends Controller {
|
|||
name: "ชื่อสมรรถนะ",
|
||||
description: "คำจำกัดความ",
|
||||
kpiCapacityDetails: [{
|
||||
level: "ระดับ",
|
||||
description: "คำอธิบายระดับ"
|
||||
}]
|
||||
})
|
||||
async createKpiCapacity(
|
||||
// @Body() requestBody: createKpiCapacity,
|
||||
@Body() requestBody: {
|
||||
type: string
|
||||
name: string
|
||||
description: string
|
||||
capacityDetails: {
|
||||
// level: number;
|
||||
level: string;
|
||||
description: string;
|
||||
}[];
|
||||
},
|
||||
|
|
@ -78,8 +78,9 @@ export class kpiCapacityController extends Controller {
|
|||
let idx: number = 0;
|
||||
for (const data of requestBody.capacityDetails) {
|
||||
idx += 1
|
||||
let _level = (kpiCapacity.type === "HEAD" || kpiCapacity.type === "GROUP") ? idx.toString() : data.level;
|
||||
const kpiCapacityDetail = Object.assign(new KpiCapacityDetail(), {
|
||||
level: idx,
|
||||
level: _level,
|
||||
description: data.description,
|
||||
kpiCapacityId: kpiCapacity.id
|
||||
});
|
||||
|
|
@ -106,6 +107,7 @@ export class kpiCapacityController extends Controller {
|
|||
name: "ชื่อสมรรถนะ",
|
||||
description: "คำจำกัดความ",
|
||||
kpiCapacityDetails: [{
|
||||
level: "ระดับ",
|
||||
description: "คำอธิบายระดับ"
|
||||
}]
|
||||
})
|
||||
|
|
@ -116,6 +118,7 @@ export class kpiCapacityController extends Controller {
|
|||
name: string
|
||||
description: string
|
||||
capacityDetails: {
|
||||
level: string
|
||||
description: string;
|
||||
}[];
|
||||
},
|
||||
|
|
@ -148,8 +151,9 @@ export class kpiCapacityController extends Controller {
|
|||
let idx: number = 0;
|
||||
for (const data of requestBody.capacityDetails) {
|
||||
idx += 1
|
||||
let _level = (kpiCapacity.type === "HEAD" || kpiCapacity.type === "GROUP") ? idx.toString() : data.level;
|
||||
const kpiCapacityDetail = Object.assign(new KpiCapacityDetail(), {
|
||||
level: idx,
|
||||
level: _level,
|
||||
description: data.description,
|
||||
kpiCapacityId: kpiCapacity.id
|
||||
});
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ export class kpiRoleController extends Controller {
|
|||
node: node,
|
||||
nodeId: nodeId,
|
||||
orgRevisionId: kpiRole.orgRevisionId,
|
||||
position: kpiRole.position
|
||||
};
|
||||
return new HttpSuccess(formattedData);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export class createKpiCapacityDetail {
|
|||
description: string;
|
||||
|
||||
@Column()
|
||||
level: Number;
|
||||
level: string;
|
||||
}
|
||||
|
||||
export class updateKpiCapacityDetail {
|
||||
|
|
@ -44,5 +44,5 @@ export class updateKpiCapacityDetail {
|
|||
description: string;
|
||||
|
||||
@Column()
|
||||
level: Number;
|
||||
level: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue