@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
3 lines (2 loc) • 1.55 kB
JavaScript
var n=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var P=(e,o)=>{for(var t in o)n(e,t,{get:o[t],enumerable:!0})},g=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of q(o))!D.call(e,s)&&s!==t&&n(e,s,{get:()=>o[s],enumerable:!(r=y(o,s))||r.enumerable});return e};var x=e=>g(n({},"__esModule",{value:!0}),e);var E={};P(E,{default:()=>a});module.exports=x(E);var b=e=>{let o=e.locals.csrfToken||"csrfToken",t=e.locals.user?.uuid?e.locals.user.uuid:"userId",r=e.locals.user?.token?e.locals.user.token:"token",s=e.locals.user?.activeCaseLoadId||"",i=e.locals.pathSuffix||"",l=e.locals.routePrefix||"",d=e.locals.definitions||[],u=e.locals.requestedReports||[],p=e.locals.recentlyViewedReports||[],f=e.locals.bookmarks||[],{bookmarkingEnabled:m,downloadingEnabled:k,definitionsPath:R,dpdPathFromQuery:S,dpdPathFromConfig:h,nestedBaseUrl:v}=e.locals;return{csrfToken:o,userId:t,token:r,definitions:d,requestedReports:u,recentlyViewedReports:p,bookmarks:f,bookmarkingEnabled:m,downloadingEnabled:k,dpdPathFromQuery:S,dpdPathFromConfig:h,definitionsPath:R,pathSuffix:i,routePrefix:l,activeCaseLoadId:s,nestedBaseUrl:v}},w=(e,o)=>(o&&(e.query={...e.query,dataProductDefinitionsPath:o}),e.query),c={getValues:b,setDdpPathToReqQuery:w};var a=class{constructor(o){this.DELETE=async(o,t)=>{let{userId:r}=c.getValues(t),{id:s}=o.params;await this.services.requestedReportService.removeReport(s,r),t.end()};this.services=o}};
//# sourceMappingURL=controller.js.map