check workflow

This commit is contained in:
kittapath 2024-10-22 08:21:16 +07:00
parent e3e6a1df36
commit a4647e102a
14 changed files with 84 additions and 73 deletions

View file

@ -286,7 +286,8 @@ export class kpiRoleController extends Controller {
*/
@Get("edit/{id}")
async GetKpiRoleByIdEdit(@Request() request: RequestWithUser, @Path() id: string) {
let _data = await new permission().PermissionGet(request, "SYS_EVA_INDICATOR");
let _workflow = await new permission().Workflow(request, id, "SYS_EVA_INDICATOR");
if (_workflow == false) await new permission().PermissionGet(request, "SYS_EVA_INDICATOR");
const kpiRole = await this.kpiRoleRepository.findOne({
where: { id: id },
relations: { kpiPeriod: true },