check workflow
This commit is contained in:
parent
4c2188a363
commit
32b0aa325d
74 changed files with 529 additions and 285 deletions
|
|
@ -48,7 +48,9 @@ export class ProfileTrainingController extends Controller {
|
|||
|
||||
@Get("{profileId}")
|
||||
public async getTraining(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", profileId);
|
||||
let _workflow = await new permission().Workflow(req, profileId, "SYS_REGISTRY_OFFICER");
|
||||
if (_workflow == false)
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", profileId);
|
||||
const record = await this.trainingRepo.find({
|
||||
where: { profileId },
|
||||
order: { createdAt: "ASC" },
|
||||
|
|
@ -60,7 +62,9 @@ export class ProfileTrainingController extends Controller {
|
|||
public async trainingAdminHistory(@Path() trainingId: string, @Request() req: RequestWithUser) {
|
||||
const _record = await this.trainingRepo.findOneBy({ id: trainingId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
let _workflow = await new permission().Workflow(req, trainingId, "SYS_REGISTRY_OFFICER");
|
||||
if (_workflow == false)
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
}
|
||||
const record = await this.trainingHistoryRepo.find({
|
||||
where: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue