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

@ -253,7 +253,7 @@ export class DevelopmentScholarshipController extends Controller {
*/
@Get("{id}")
async GetDevelopemtScholarshipById(@Request() request: RequestWithUser, @Path() id: string) {
// await new permission().PermissionGet(request, "SYS_DEV_SCHOLARSHIP");//USER
//await new permission().PermissionGet(request, "SYS_DEV_SCHOLARSHIP"); //USER
const getDevelopment = await this.developmentScholarshipRepository.findOne({
relations: ["posLevel", "posType", "posLevelguarantor", "posTypeguarantor"],
where: { id: id },
@ -414,7 +414,8 @@ export class DevelopmentScholarshipController extends Controller {
*/
@Get("admin/{id}")
async GetDevelopemtScholarshipAdminById(@Request() request: RequestWithUser, @Path() id: string) {
await new permission().PermissionGet(request, "SYS_DEV_SCHOLARSHIP");
let _workflow = await new permission().Workflow(request, id, "SYS_DEV_SCHOLARSHIP");
if (_workflow == false) await new permission().PermissionGet(request, "SYS_DEV_SCHOLARSHIP");
const getDevelopment = await this.developmentScholarshipRepository.findOne({
relations: ["posLevel", "posType", "posLevelguarantor", "posTypeguarantor"],
where: { id: id },