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 ProfileDisciplineEmployeeController extends Controller {
|
|||
|
||||
@Get("{profileId}")
|
||||
public async getDiscipline(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId);
|
||||
let _workflow = await new permission().Workflow(req, profileId, "SYS_REGISTRY_EMP");
|
||||
if (_workflow == false)
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId);
|
||||
const lists = await this.disciplineRepository.find({
|
||||
where: { profileEmployeeId: profileId },
|
||||
order: { createdAt: "ASC" },
|
||||
|
|
@ -58,7 +60,8 @@ export class ProfileDisciplineEmployeeController extends Controller {
|
|||
|
||||
@Get("admin/{profileId}")
|
||||
public async getDisciplineAdmin(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_WAGE");
|
||||
let _workflow = await new permission().Workflow(req, profileId, "SYS_WAGE");
|
||||
if (_workflow == false) await new permission().PermissionGet(req, "SYS_WAGE");
|
||||
const lists = await this.disciplineRepository.find({
|
||||
where: { profileEmployeeId: profileId },
|
||||
order: { createdAt: "ASC" },
|
||||
|
|
@ -73,11 +76,13 @@ export class ProfileDisciplineEmployeeController extends Controller {
|
|||
) {
|
||||
const _record = await this.disciplineRepository.findOneBy({ id: disciplineId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(
|
||||
req,
|
||||
"SYS_REGISTRY_EMP",
|
||||
_record.profileEmployeeId,
|
||||
);
|
||||
let _workflow = await new permission().Workflow(req, disciplineId, "SYS_REGISTRY_EMP");
|
||||
if (_workflow == false)
|
||||
await new permission().PermissionOrgUserGet(
|
||||
req,
|
||||
"SYS_REGISTRY_EMP",
|
||||
_record.profileEmployeeId,
|
||||
);
|
||||
}
|
||||
const record = await this.disciplineHistoryRepository.find({
|
||||
where: { profileDisciplineId: disciplineId },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue