add admin path ทะเบียนประวัติ
This commit is contained in:
parent
a7c1b2e6a9
commit
4bfecf7899
12 changed files with 205 additions and 52 deletions
|
|
@ -63,12 +63,23 @@ export class ProfileSalaryController extends Controller {
|
|||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("admin/history/{salaryId}")
|
||||
public async salaryAdminHistory(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
||||
const _record = await this.salaryRepo.findOneBy({ id: salaryId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
}
|
||||
const record = await this.salaryHistoryRepo.find({
|
||||
where: {
|
||||
profileSalaryId: salaryId,
|
||||
},
|
||||
order: { createdAt: "DESC" },
|
||||
});
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("history/{salaryId}")
|
||||
public async salaryHistory(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
||||
// const _record = await this.salaryRepo.findOneBy({ id: salaryId });
|
||||
// if (_record) {
|
||||
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
// }
|
||||
public async salaryHistory(@Path() salaryId: string,) {
|
||||
const record = await this.salaryHistoryRepo.find({
|
||||
where: {
|
||||
profileSalaryId: salaryId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue