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

@ -366,7 +366,9 @@ export class DevelopmentOfficerHistoryController extends Controller {
*/
@Get("{id}")
async GetDevelopemtHistoryById(@Request() request: RequestWithUser, @Path() id: string) {
await new permission().PermissionGet(request, "SYS_DEV_HISTORY_OFFICER");
let _workflow = await new permission().Workflow(request, id, "SYS_DEV_HISTORY_OFFICER");
if (_workflow == false)
await new permission().PermissionGet(request, "SYS_DEV_HISTORY_OFFICER");
const type = "OFFICER";
const getDevelopment = await this.developmentHistoryRepository.findOne({
relations: ["development", "posLevel", "posType"],