ผูกสิท

This commit is contained in:
kittapath 2024-08-22 14:14:35 +07:00
parent 2a536dcc32
commit 204984f63e
4 changed files with 58 additions and 27 deletions

View file

@ -196,12 +196,14 @@ export class DevelopmentScholarshipController extends Controller {
*/
@Get()
async GetDevelopmentScholarshipLists(
@Request() request: RequestWithUser,
@Query("page") page: number = 1,
@Query("pageSize") pageSize: number = 10,
@Query("keyword") keyword?: string,
@Query("year") year?: number,
@Query("scholarshipType") scholarshipType?: string,
) {
await new permission().PermissionList(request, "SYS_DEV_SCHOLARSHIP");
const [development, total] = await AppDataSource.getRepository(DevelopmentScholarship)
.createQueryBuilder("developmentScholarship")
.leftJoinAndSelect("developmentScholarship.posLevel", "posLevel")
@ -292,7 +294,8 @@ export class DevelopmentScholarshipController extends Controller {
* @param {string} id Id
*/
@Get("{id}")
async GetDevelopemtScholarshipById(@Path() id: string) {
async GetDevelopemtScholarshipById(@Request() request: RequestWithUser, @Path() id: string) {
await new permission().PermissionGet(request, "SYS_DEV_SCHOLARSHIP");
const getDevelopment = await this.developmentScholarshipRepository.findOne({
relations: ["posLevel", "posType", "posLevelguarantor", "posTypeguarantor"],
where: { id: id },