add parth admin history
This commit is contained in:
parent
74e64176e6
commit
4b6fd79264
23 changed files with 309 additions and 50 deletions
|
|
@ -70,8 +70,8 @@ export class ProfileLeaveEmployeeTempController extends Controller {
|
|||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("history/{leaveId}")
|
||||
public async leaveHistory(@Path() leaveId: string, @Request() req: RequestWithUser) {
|
||||
@Get("admin/history/{leaveId}")
|
||||
public async leaveAdminHistory(@Path() leaveId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const record = await this.leaveHistoryRepo.find({
|
||||
relations: { leaveType: true },
|
||||
|
|
@ -81,6 +81,16 @@ export class ProfileLeaveEmployeeTempController extends Controller {
|
|||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("history/{leaveId}")
|
||||
public async leaveHistory(@Path() leaveId: string) {
|
||||
const record = await this.leaveHistoryRepo.find({
|
||||
relations: { leaveType: true },
|
||||
where: { profileLeaveId: leaveId },
|
||||
order: { createdAt: "DESC" },
|
||||
});
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Post()
|
||||
public async newLeave(@Request() req: RequestWithUser, @Body() body: CreateProfileEmployeeLeave) {
|
||||
await new permission().PermissionUpdate(req, "SYS_REGISTRY_TEMP");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue