check workflow

This commit is contained in:
kittapath 2024-10-22 08:20:45 +07:00
parent 4c2188a363
commit 32b0aa325d
74 changed files with 529 additions and 285 deletions

View file

@ -48,7 +48,8 @@ export class ProfileTrainingEmployeeTempController extends Controller {
@Get("{profileEmployeeId}")
public async getTraining(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
let _workflow = await new permission().Workflow(req, profileEmployeeId, "SYS_REGISTRY_TEMP");
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
const record = await this.trainingRepo.find({
where: { profileEmployeeId },
order: { createdAt: "ASC" },
@ -58,7 +59,8 @@ export class ProfileTrainingEmployeeTempController extends Controller {
@Get("admin/history/{trainingId}")
public async trainingAdminHistory(@Path() trainingId: string, @Request() req: RequestWithUser) {
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
let _workflow = await new permission().Workflow(req, trainingId, "SYS_REGISTRY_TEMP");
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
const record = await this.trainingHistoryRepo.find({
where: {
profileTrainingId: trainingId,