add parth admin history
This commit is contained in:
parent
74e64176e6
commit
4b6fd79264
23 changed files with 309 additions and 50 deletions
|
|
@ -55,8 +55,8 @@ export class ProfileOtherEmployeeController extends Controller {
|
|||
return new HttpSuccess(lists);
|
||||
}
|
||||
|
||||
@Get("history/{otherId}")
|
||||
public async otherHistory(@Path() otherId: string, @Request() req: RequestWithUser) {
|
||||
@Get("admin/history/{otherId}")
|
||||
public async otherAdminHistory(@Path() otherId: string, @Request() req: RequestWithUser) {
|
||||
const _record = await this.otherRepository.findOneBy({ id: otherId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(
|
||||
|
|
@ -71,6 +71,15 @@ export class ProfileOtherEmployeeController extends Controller {
|
|||
});
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("history/{otherId}")
|
||||
public async otherHistory(@Path() otherId: string) {
|
||||
const record = await this.otherHistoryRepository.find({
|
||||
where: { profileOtherId: otherId },
|
||||
order: { createdAt: "DESC" },
|
||||
});
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Post()
|
||||
public async newOther(@Request() req: RequestWithUser, @Body() body: CreateProfileEmployeeOther) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue