check workflow

This commit is contained in:
kittapath 2024-10-22 08:21:07 +07:00
parent e0f37dda4a
commit aa5e69776e
6 changed files with 69 additions and 49 deletions

View file

@ -370,7 +370,8 @@ export class DevelopmentEmployeeHistoryController extends Controller {
*/
@Get("{id}")
async GetDevelopemtHistoryById(@Request() request: RequestWithUser, @Path() id: string) {
await new permission().PermissionGet(request, "SYS_DEV_HISTORY_EMP");
let _workflow = await new permission().Workflow(request, id, "SYS_DEV_HISTORY_EMP");
if (_workflow == false) await new permission().PermissionGet(request, "SYS_DEV_HISTORY_EMP");
const type = "EMPLOYEE";
const getDevelopment = await this.developmentHistoryRepository.findOne({
relations: ["development", "employeePosLevel", "employeePosType"],