This commit is contained in:
kittapath 2025-02-03 15:09:47 +07:00
parent 8ca02710dc
commit 2ba5ac41c4

View file

@ -53,7 +53,7 @@ export class kpiPlanController extends Controller {
async createKpiPlan(@Body() requestBody: createKpiPlan, @Request() request: RequestWithUser) {
await new permission().PermissionCreate(request, "SYS_EVA_INDICATOR");
const kpiPlan = Object.assign(new KpiPlan(), requestBody);
if (requestBody.year != null && requestBody.period != null) {
if (requestBody.period != null) {
const kpiPeriod = await this.kpiPeriodRepository
.createQueryBuilder("kpiPeriod")
.where("kpiPeriod.year = :year", { year: requestBody.year })