add salary position

This commit is contained in:
kittapath 2025-02-24 11:04:17 +07:00
parent 54554d140e
commit 0f9af5699a
3 changed files with 461 additions and 25 deletions

View file

@ -55,6 +55,18 @@ export class ProfileSalaryController extends Controller {
return new HttpSuccess(record);
}
@Get("position/{profileId}")
public async getPositionSalary(@Path() profileId: string, @Request() req: RequestWithUser) {
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.salaryRepo.find({
where: { profileId: profileId },
order: { order: "ASC" },
});
return new HttpSuccess(record);
}
@Get("admin/{profileId}")
public async getSalaryAdmin(@Path() profileId: string, @Request() req: RequestWithUser) {
let _workflow = await new permission().Workflow(req, profileId, "SYS_SALARY_OFFICER");