check workflow
This commit is contained in:
parent
4c2188a363
commit
32b0aa325d
74 changed files with 529 additions and 285 deletions
|
|
@ -174,7 +174,8 @@ export class DevelopmentRequestController extends Controller {
|
|||
|
||||
@Get("admin/{id}")
|
||||
public async getDevelopmentRequestByUser(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_OFFICER");
|
||||
let _workflow = await new permission().Workflow(req, id, "SYS_REGISTRY_OFFICER");
|
||||
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_OFFICER");
|
||||
const data = await this.developmentRequestRepository.findOne({
|
||||
where: { id: id },
|
||||
relations: ["developmentProjects"],
|
||||
|
|
@ -301,7 +302,7 @@ export class DevelopmentRequestController extends Controller {
|
|||
});
|
||||
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
await new permission().PermissionUpdate(req, "SYS_REGISTRY_OFFICER");
|
||||
|
||||
|
||||
if (requestBody.status == "APPROVE" && record.status == "PENDING") {
|
||||
let profileDevelopment = new ProfileDevelopment();
|
||||
const meta = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue