@@ -290,6 +290,94 @@ export default class ReportingController extends BaseController {
290290 ) ;
291291 }
292292
293+ async runNars2024FTReport ( ) {
294+ return ReportingService . runNars2024FTReport ( { format : this . format } ) . then ( ( reportData ) => {
295+ if ( this . format == "html" ) {
296+ this . response . send ( reportData ) ;
297+ } else if ( this . format == "csv" ) {
298+ this . response . setHeader ( "Content-disposition" , `attachment; filename="PPYT.CSLS.NARS_2425.001.csv"` ) ;
299+ this . response . setHeader ( "Content-type" , "text/csv" ) ;
300+ this . response . send ( reportData ) ;
301+ } else if ( this . format == "json" ) {
302+ this . response . json ( reportData ) ;
303+ } else {
304+ this . response . setHeader ( "Content-disposition" , `attachment; filename="PPYT.CSLS.NARS_2425.001.txt"` ) ;
305+ this . response . setHeader ( "Content-type" , "text/plain" ) ;
306+ this . response . send ( reportData ) ;
307+ }
308+ } ) ;
309+ }
310+
311+ async runNars2024PTReport ( ) {
312+ return ReportingService . runNars2024PTReport ( { format : this . format } ) . then ( ( reportData ) => {
313+ if ( this . format == "html" ) {
314+ this . response . send ( reportData ) ;
315+ } else if ( this . format == "csv" ) {
316+ this . response . setHeader ( "Content-disposition" , `attachment; filename="PPYT.CSLS.PT_NARS_2425.001.csv"` ) ;
317+ this . response . setHeader ( "Content-type" , "text/csv" ) ;
318+ this . response . send ( reportData ) ;
319+ } else if ( this . format == "json" ) {
320+ this . response . json ( reportData ) ;
321+ } else {
322+ this . response . setHeader ( "Content-disposition" , `attachment; filename="PPYT.CSLS.PT_NARS_2425.001.txt"` ) ;
323+ this . response . setHeader ( "Content-type" , "text/plain" ) ;
324+ this . response . send ( reportData ) ;
325+ }
326+ } ) ;
327+ }
328+
329+ async runNars2024DisabilityReport ( ) {
330+ return ReportingService . runNars2024DisabilityReport ( { format : this . format , academic_year_id : 2024 } ) . then (
331+ ( reportData ) => {
332+ if ( this . format == "html" ) {
333+ this . response . send ( reportData ) ;
334+ } else if ( this . format == "csv" ) {
335+ this . response . setHeader (
336+ "Content-disposition" ,
337+ `attachment; filename="PPYT.CSLS.PDEXPAND_2425.${ moment ( ) . format ( "YYYY-MM-DD" ) } .csv"`
338+ ) ;
339+ this . response . setHeader ( "Content-type" , "text/csv" ) ;
340+ this . response . send ( reportData ) ;
341+ } else if ( this . format == "json" ) {
342+ this . response . json ( reportData ) ;
343+ } else {
344+ this . response . setHeader (
345+ "Content-disposition" ,
346+ `attachment; filename="PPYT.CSLS.PDEXPAND_2425.${ moment ( ) . format ( "YYYY-MM-DD" ) } .txt"`
347+ ) ;
348+ this . response . setHeader ( "Content-type" , "text/plain" ) ;
349+ this . response . send ( reportData ) ;
350+ }
351+ }
352+ ) ;
353+ }
354+
355+ async runNars2024DisabilityRCLReport ( ) {
356+ return ReportingService . runNars2024DisabilityRCLReport ( { format : this . format , academic_year_id : 2024 } ) . then (
357+ ( reportData ) => {
358+ if ( this . format == "html" ) {
359+ this . response . send ( reportData ) ;
360+ } else if ( this . format == "csv" ) {
361+ this . response . setHeader (
362+ "Content-disposition" ,
363+ `attachment; filename="PPYT.CSLS.PDReducedCourseLoad_2425.${ moment ( ) . format ( "YYYY-MM-DD" ) } .csv"`
364+ ) ;
365+ this . response . setHeader ( "Content-type" , "text/csv" ) ;
366+ this . response . send ( reportData ) ;
367+ } else if ( this . format == "json" ) {
368+ this . response . json ( reportData ) ;
369+ } else {
370+ this . response . setHeader (
371+ "Content-disposition" ,
372+ `attachment; filename="PPYT.CSLS.PDReducedCourseLoad_2425.${ moment ( ) . format ( "YYYY-MM-DD" ) } .txt"`
373+ ) ;
374+ this . response . setHeader ( "Content-type" , "text/plain" ) ;
375+ this . response . send ( reportData ) ;
376+ }
377+ }
378+ ) ;
379+ }
380+
293381 async runStepReport ( ) {
294382 let academic_year_id = parseInt ( this . request . params . academic_year_id ?? moment ( ) . format ( "YYYY" ) ) ;
295383
0 commit comments