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

@ -49,7 +49,8 @@ export class ProfileDevelopmentEmployeeTempController extends Controller {
@Get("{profileId}")
public async getDevelopment(@Path() profileId: string, @Request() req: RequestWithUser) {
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
let _workflow = await new permission().Workflow(req, profileId, "SYS_REGISTRY_TEMP");
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
const lists = await this.developmentRepository.find({
where: { profileEmployeeId: profileId },
order: { createdAt: "ASC" },
@ -59,7 +60,8 @@ export class ProfileDevelopmentEmployeeTempController extends Controller {
@Get("history/{developmentId}")
public async developmentHistory(@Path() developmentId: string, @Request() req: RequestWithUser) {
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
let _workflow = await new permission().Workflow(req, developmentId, "SYS_REGISTRY_TEMP");
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
const record = await this.developmentHistoryRepository.find({
where: { profileDevelopmentId: developmentId },
order: { createdAt: "DESC" },