PageSourceSearch

https://www.centrallawcollege.com/p__admin__fileUpload__index.56f26222.async.js

js centrallawcollege.com collected 2026-10-03 00:55:21 UTC 28,912 bytes, 2 lines download raw bytes

1!(function(){var Ut=Object.defineProperty,bt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var Le=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable;var xe=(P,i,l)=>i in P?Ut(P,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):P[i]=l,_e=(P,i)=>{for(var l in i||(i={}))Ft.call(i,l)&&xe(P,l,i[l]);if(Le)for(var l of Le(i))Mt.call(i,l)&&xe(P,l,i[l]);return P},Be=(P,i)=>bt(P,Ot(i));(self.webpackChunkclw1=self.webpackChunkclw1||[]).push([[670],{30263:function(P,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;const l={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var U=i.default=l},49498:function(P,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.commonLocale=void 0;const l=i.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}},90674:function(P,i,l){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var U=l(49498);const e=Be(_e({},U.commonLocale),{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});var c=i.default=e},22087:function(P,i){"use strict";i.Z={bleed:"bleed___iY8Sj",page:"page___MNJ1d",head:"head___jiDpZ",topRow:"topRow___F2lIH",crumbs:"crumbs___e8Ihe",crumbSep:"crumbSep___l7WUc",back:"back___TQDfo",titleRow:"titleRow___WJeMz",titleGroup:"titleGroup___UWBom",crumbsInline:"crumbsInline___ZWlKr",headActions:"headActions___tBsfu",title:"title___y1_Go",extra:"extra___Zc_oW",description:"description___WxP5d",section:"section___rl4YM",sectionReverse:"sectionReverse___f1z6y",sectionTinted:"sectionTinted___IgEJG",sectionBody:"sectionBody___K0gv9",sectionMedia:"sectionMedia___TvGz_",sectionTitle:"sectionTitle___VMsdZ",sectionText:"sectionText___TIf3v"}},51161:function(P,i,l){"use strict";l.d(i,{a3:function(){return A},DY:function(){return D},dF:function(){return W}});var U=l(81928),e=l(67294),c={bleed:"bleed___IR69o",page:"page___ksw3H",filterBar:"filterBar___HOOCg"},b=Object.defineProperty,O=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,y=(f,v,h)=>v in f?b(f,v,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[v]=h,w=(f,v)=>{for(var h in v||(v={}))o.call(v,h)&&y(f,h,v[h]);if(O)for(var h of O(v))H.call(v,h)&&y(f,h,v[h]);return f},B=(f,v)=>{var h={};for(var F in f)o.call(f,F)&&v.indexOf(F)<0&&(h[F]=f[F]);if(f!=null&&O)for(var F of O(f))v.indexOf(F)<0&&H.call(f,F)&&(h[F]=f[F]);return h};const D=({children:f})=>e.createElement("div",{className:c.bleed},e.createElement("div",{className:c.page},f)),A=({children:f,className:v,style:h})=>
1e.createElement("div",{className:[c.filterBar,v].filter(Boolean).join(" "),style:h},f),W=f=>{var v=f,{crumbs:h=[]}=v,F=B(v,["crumbs"]);return e.createElement(U.yG,w({crumbs:[{title:"Admin",to:"/admin"},...h]},F))}},58588:function(P,i,l){"use strict";var U=l(67294);const e=c=>{const{uid:b,username:O}=c,o=`/admin/users/${b}/overview`;return U.createElement("a",{href:o,target:"_blank"},O)};i.Z=e},79155:function(P,i,l){"use strict";l.d(i,{G:function(){return c}});var U=l(53732),e=l(67294);const c=({title:b="",vendor:O={fullName:"Central Law College"},description:o=""})=>e.createElement(U.Helmet,null,e.createElement("title",null,b&&`${b} | `,O!=null&&O.fullName?`${O==null?void 0:O.fullName}`:""),o&&e.createElement("meta",{name:"description",content:o}),e.createElement("link",{rel:"icon",type:"image/png",href:(O==null?void 0:O.avatarUrl)||"/logo.svg"}))},81928:function(P,i,l){"use strict";l.d(i,{FK:function(){return H},IH:function(){return w},yG:function(){return y}});var U=l(43929),e=l(12157),c=l(67294),b=l(53732),O=l(79155),o=l(22087);const H=({children:B})=>c.createElement("div",{className:o.Z.bleed},c.createElement("div",{className:o.Z.page},B)),y=({crumbs:B=[],title:D,description:A,backTo:W,backLabel:f,extra:v,inlineCrumbs:h=!1})=>{const F=B.length>0&&c.createElement("nav",{className:[o.Z.crumbs,h&&o.Z.crumbsInline].filter(Boolean).join(" "),"aria-label":"Breadcrumb"},B.map((R,M)=>c.createElement("span",{key:M,className:o.Z.crumb},R.to?c.createElement(b.Link,{to:R.to},R.title):c.createElement("span",{"aria-current":"page"},R.title),M<B.length-1&&c.createElement(U.Z,{className:o.Z.crumbSep})))),ee=W&&c.createElement(b.Link,{className:o.Z.back,to:W},c.createElement(e.Z,null)," ",f||"Back");return c.createElement("header",{className:o.Z.head}
1,typeof D=="string"&&D&&c.createElement(O.G,{title:D}),!h&&(B.length>0||W)&&c.createElement("div",{className:o.Z.topRow},F,ee),c.createElement("div",{className:o.Z.titleRow},c.createElement("div",{className:o.Z.titleGroup},c.createElement("h1",{className:o.Z.title},D),h&&F),(h&&W||v)&&c.createElement("div",{className:o.Z.headActions},h&&ee,v&&c.createElement("div",{className:o.Z.extra},v))),A&&c.createElement("p",{className:o.Z.description},A))},w=({title:B,media:D,reverse:A=!1,tinted:W=!1,children:f})=>c.createElement("section",{className:[o.Z.section,A?o.Z.sectionReverse:"",W?o.Z.sectionTinted:""].filter(Boolean).join(" ")},c.createElement("div",{className:o.Z.sectionBody},c.createElement("h2",{className:o.Z.sectionTitle},B),c.createElement("div",{className:o.Z.sectionText},f)),D&&c.createElement("div",{className:o.Z.sectionMedia},D))},80956:function(P,i,l){"use strict";l.r(i),l.d(i,{default:function(){return ht}});var U=l(70597),e=l(67294),c=l(21269),b=l(92708),O=l(21054),o=l(2107),H=l(98157),y=l(71230),w=l(15746),B=l(12922),D=l(71577),A=l(2487),W=l(45416),f=l(62917),v=l(38925),h=l(12915),F=l(66090),ee=l(52423),R=l(86738),M=l(96074),I=l(83062),oe=l(87200),ue=l(2388),Y=l(18996),T=(n,t,a)=>new Promise((m,g)=>{var Z=s=>{try{E(a.next(s))}catch(u){g(u)}},x=s=>{try{E(a.throw(s))}catch(u){g(u)}},E=s=>s.done?m(s.value):Promise.resolve(s.value).then(Z,x);E((a=a.apply(n,t)).next())});function L(n){return T(this,null,function*(){return(0,Y.ZP)("/server/api/file/list",{params:n})})}function Ae(n){return T(this,null,function*(){return(0,Y.ZP)("/server/api/file/list/delete",{params:n})})}function we(n){return T(this,null,function*(){return(0,Y.ZP)("/server/api/file/list/update",{method:"POST",data:n})})}function We(n){return T(this,null,function*(){return(0,Y.ZP)("/server/api/file/list/map",{method:"POST",data:n})})}var he=l(58588),ge=l(57446),me=l(7449),ie=l(72336),ye=l(75991),St=l(53732),Pe=l(69231),Ke=Object.defineProperty,Ze=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,fe=(n,t,a)=>t in n?Ke(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a,te=(n,t)=>{for(var a in t||(t={}))je.call(t,a)&&fe(n,a,t[a]);if(Ze)for(var a of Ze(t))Ve.call(t,a)&&fe(n,a,t[a]);return n},K=(n,t,a)=>fe(n,typeof t!="symbol"?t+"":t,a);const Ce="/server/api/file/upload",Ue={Authorization:(0,Y.K9)()};class ze extends e.Component{constructor(){super(...arguments),K(this,"state",{loading:!1,visible:!1,fileList:[]}),K(this,"showDrawer",()=>{this.setState({visible:!0})}),K(this,"onClose",()=>{this.setState({visible:!1})}),K(this,"beforeUpload",t=>{this.setState({loading:!0});const a=t.type==="application/pdf";a||ie.ZP.error("You can only upload PDF file!");const m=t.size/1024/1024<2;return m||ie.ZP.error("PDF must smaller than 1MB!"),this.props.beforeUploadCheck?this.props.beforeUploadCheck(t):a&&m}),K(this,"handleChange",t=>{t.file.status!=="uploading"&&(t.file.status==="done"&&t.file.response&&t.file.response.publicUrl&&this.props.onChange&&this.props.onChange(t.fileList),this.setState({fileList:[...t.fileList]}))}),K(this,"onRemove",()=>{this.setState({publicUrl:void 0}),this.props.onChange&&this.props.onChange(void 0)})}componentDidMount(){const{value:t}=this.props;t&&t.publicUrl&&this.setState({publicUrl:t.publicUrl})}componentDidUpdate(t){t.value&&this.props.value&&t.value.publicUrl!=this.props.value.publicUrl&&this.setState({publicUrl:this.props.value.publicUrl})}render(){const{fc:t,value:a,extra:m={}}=this.props,{Dragger:g}=ye.default,{publicUrl:Z,loading:x}=this.state;return e.createElement("div",{className:Pe.Z.fileUpload},e.createElement(g,{name:"file",directory:!0,data:te({fc:t},m),action:Ce,headers:Ue,onChange:this.handleChange,multiple:!0,beforeUpload:this.beforeUpload},e.createElement("p",{className:"ant-upload-drag-icon"},e.createElement(me.Z,null)),e.createElement("p",{className:"ant-upload-text"},"Click or drag file to this area to upload")))}}class Ge extends e.Component{constructor(){super(...arguments),K(this,"state",{loading:!1,visible:!1,fileList:[]}),K(this,"showDrawer",()=>{this.setState({visible:!0})}),K(this,"onClose",()=>{this.setState({visible:!1})}),K(this,"beforeUpload",t=>{const a=t.type==="image/jpeg"||t.type==="image/png";a||ie.ZP.error("You can only upload JPG/PNG file!");const m=t.size/1024/1024<2;return m||ie.ZP.error("Image must smaller than 2MB!"),this.props.beforeUploadCheck?this.props.beforeUploadCheck(t):a&&m}),K(this,"handleChange",t=>{t.file.status!=="uploading"&&(t.file.status==="done"&&t.file.response&&t.file.response.publicUrl&&this.props.onChange&&this.props.onChange(t.fileList),this.setState({fileList:[...t.fileList]}))}),K(this,"onRemove",()=>{this.setState({publicUrl:void 0}),this.props.onChange&&this.props.onChange(void 0)})}componentDidMount(){const{value:t}=this.props;t&&t.publicUrl&&this.setState({publicUrl:t.publicUrl})}componentDidUpdate(t){t.value&&this.props.value&&t.value.publicUrl!=this.props.value.publicUrl&&this.setState({publicUrl:this.props.value.publicUrl})}render(){const{fc:t,value:a,extra:m={}}=this.props,{Dragger:g}=ye.default,{publicUrl:Z,loading:x}=this.state;return e.createElement("div",{className:Pe.Z.fileUpload},e.createElement(g,{name:"file",directory:!0,data:te({fc:t},m),action:Ce,headers:Ue,onChange:this.handleChange,multiple:!0,beforeUpload:this.beforeUpload},e.createElement("p",{className:"ant-upload-drag-icon"},e.createElement(me.Z,null)),e.createElement("p",{className:"ant-upload-text"},"Click or drag file to this area to upload")))}}const Dt=({fi:n,extra:t=React.createElement(React.Fragment,null),mid:a=React.createElement(FormattedHTMLMessage,{id:"global-instructions-upload-title"}),did:m="global-pdf-instructions-description"})=>React.createElement("div",{className:styles.fileUpload},React.createElement(Alert,{message:a,description:React.createElement(Row,{gutter:20},React.createElement(Col,te({},{sm:10,md:14}),React.createElement(FormattedHTMLMessage,{id:m}),t),React.createElement(Col,te({},{sm:4,md:10}),React.createElement("div",{className:"dropbox"},React.createElement(Form.Item,null,n)))),type:"info",style:{marginBottom:"1rem"},icon:React.createElement(FileImageTwoTone,null),showIcon:!0})),Rt=({fi:n,extra:t=React.createElement(React.Fragment,null),mid:a=React.createElement(FormattedHTMLMessage,{id:"global-instructions-upload-title"}),did:m="global-avatar-instructions-description"})=>React.createElement("div",{className:styles.fileUpload},React.createElement(Alert,{message:a,description:React.createElement(Row,{gutter:20},React.createElement(Col,te({},{sm:10,md:14}),React.createElement(FormattedHTMLMessage,{id:m}),t),React.createElement(Col,te({},{sm:4,md:10}),React.createElement("div",{className:"dropbox"},React.createElement(Form.Item,null,n)))),type:"info",style:{marginBottom:"1rem"},icon:React.createElement(FileImageTwoTone,null),showIcon:!0}));var He=l(82252),be=l(8913),Ye=l(50675),ke=l(40695),Je=l(31662),$e=l(55248),Oe=l(94151),Fe=l(28946),Xe=l(18253),Qe=l(90096),qe=Object.defineProperty,et=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,Se=(n,t,a)=>t in n?qe(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a,G=(n,t)=>{for(var a in t||(t={}))lt.call(t,a)&&Se(n,a,t[a]);if(Me)for(var a of Me(t))at.call(t,a)&&Se(n,a,t[a]);return n},pe=(n,t)=>et(n,tt(t)),se=(n,t,a)=>new Promise((m,g)=>{var Z=s=>{try{E(a.next(s))}catch(u){g(u)}},x=s=>
1{try{E(a.throw(s))}catch(u){g(u)}},E=s=>s.done?m(s.value):Promise.resolve(s.value).then(Z,x);E((a=a.apply(n,t)).next())});const{Text:nt}=c.default,{Option:ae}=b.default,rt=n=>{const{extra:t={},fc:a="",isEditable:m=!0}=n,{ruid:g}=t,[Z]=O.Z.useForm(),[x,E]=(0,e.useState)(!1),[s,u]=(0,e.useState)(!1),[_,X]=(0,e.useState)([]),[V,k]=(0,e.useState)([]),[le,ce]=(0,e.useState)([]),[de,p]=(0,e.useState)({}),[r,N]=(0,e.useState)(void 0);(0,e.useEffect)(()=>{a&&a!=""?(Q({category:Fe.Xq[a]}),N(Fe.Xq[a])):Q({})},[g]);const z=()=>{u(!0)},ne=()=>{u(!1)},ve=d=>{d&&(d==null?void 0:d.length)>0&&Q({})},yt=d=>se(void 0,null,function*(){E(!0);let{status:S,class:C,message:q}=yield Ae({_id:d});if(E(!1),!S){o.ZP[C]({message:q,duration:8});return}Q({})}),Ne=d=>{p(G(G({},de),d)),Q(d)},Q=d=>se(void 0,null,function*(){E(!0);const{status:S,class:C,message:q,payload:J}=yield L(G(G({ruid:g},de),d));if(E(!1),!S){o.ZP[C]({message:q,duration:8});return}S&&J&&(J!=null&&J.list)&&X(J.list)}),Ie=d=>{let S=!1;return d.map(C=>{(!(C!=null&&C.fNameWithoutExtension)||(C==null?void 0:C.fNameWithoutExtension)==null||(C==null?void 0:C.fNameWithoutExtension)==""||!(C!=null&&C.fileCategory)||(C==null?void 0:C.fileCategory)==null||(C==null?void 0:C.fileCategory)=="")&&(S=!0)}),S},Pt=(d,S)=>se(void 0,null,function*(){var C;if(Ie(d)){o.ZP.error({message:"Error!",description:"Please fill the file name and select file category for all the files in the list before saving!",duration:10});return}if((S==null?void 0:S.length)<1)o.ZP.info({message:"No file data is edited to be updated!",duration:8});else{E(!0);let{status:q,class:J,message:re,payload:j}=yield we({ruid:g,filesList:d,idsOfFilesEdited:S});if(E(!1),!q){(0,Oe.FB)(Z,re,j,J);return}o.ZP.success({message:re,duration:8}),X([]),j!=null&&j.fileErrorsList&&((C=j==null?void 0:j.fileErrorsList)==null?void 0:C.length)>0&&k(j==null?void 0:j.fileErrorsList),Q({})}}),Zt=(d,S)=>se(void 0,null,function*(){let C=[];if(S.map(Ct=>{d.map(Ee=>{Ct==(Ee==null?void 0:Ee._id)&&C.push(Ee)})}),Ie(C)){o.ZP.error({message:"Error!",description:"Please fill the file name and select file category for all the files in the list selected for mapping, before saving them!",duration:10});return}E(!0);let{status:q,class:J,message:re,payload:j}=yield We({ruid:g,filesList:C,idsOfRowsSelected:S});if(E(!1),!q){(0,Oe.FB)(Z,re,j,J);return}o.ZP.success({message:re,duration:8}),ce(j==null?void 0:j.fileMapStatusList),Q({})});return e.createElement(e.Fragment,null,e.createElement(H.Z,{title:"Upload Files",open:s,onOk:ne,onCancel:ne},e.createElement(O.Z,{form:Z},e.createElement(O.Z.Item,{name:"fileType",label:"File Type"},e.createElement(b.default,{placeholder:"Select file type",showSearch:!0,allowClear:!0,style:{minWidth:"50%"}},e.createElement(ae,{key:"pdf",value:"pdf"},"PDF"),e.createElement(ae,{key:"image",value:"image"},"Image"))),e.createElement(O.Z.Item,{noStyle:!0,shouldUpdate:(d,S)=>d.fileType!==S.fileType},({getFieldValue:d})=>{const S=d("fileType");if(S==="pdf")return e.createElement(ze,{fc:"adminBulkUpload",extra:{ruid:g},onChange:ve});if(S==="image")return e.createElement(Ge,{fc:"adminBulkPhotoUpload",extra:{ruid:g},onChange:ve})}))),e.createElement(y.Z,{style:{display:"flex",margin:"0 1.5rem"}},e.createElement(w.Z,G({},{sm:24,md:14}),e.createElement("h3",null,"My Files")),e.createElement(w.Z,pe(G({},{sm:24,md:10}),{style:{marginLeft:"auto",textAlign:"left"}}),e.createElement(B.Z,{style:{display:"flex",flexWrap:"wrap",justifyContent:"flex-end"},direction:"horizontal"},m&&e.createElement(D.ZP,{icon:e.createElement(He.Z,null),onClick:z,style:{width:"auto"}},"Upload Files"),e.createElement(ge.ZP,{category:"fileCategory",placeholder:"Filter all the user files by category",style:{minWidth:"12rem"},value:r,onChange:d=>{N(d),Ne({category:d})}}),e.createElement(b.default,{placeholder:"Select file status",style:{width:"auto"},onChange:d=>{Ne({status:d})},allowClear:!0,showSearch:!0,disabled:!m,defaultValue:m?"all":"active"},e.createElement(ae,{key:"all",value:"all"},"All Files"),e.createElement(ae,{key:"active",value:1},"Active"),e.createElement(ae,{key:"removed",value:2},"Removed")))),(V==null?void 0:V.length)>0&&e.createElement(w.Z,pe(G({},{sm:24}),{style:{marginTop:"1rem",marginBottom:"0.5rem"}}),e.createElement(A.Z,{size:"small",header:e.createElement("div",null,e.createElement("strong",null,"File Upload Errors List"),e.createElement(D.ZP,{type:"text",size:"small",danger:!0,onClick:d=>k([]),style:{marginLeft:"0.5rem"}},"Close")),bordered:!0,dataSource:V,renderItem:d=>e.createElement(A.Z.Item,null,e.createElement("div",null,e.createElement(be.Z,{style:{color:"#ff4d4f",fontSize:"1rem"}}),e.createElement("span",{style:{marginLeft:"0.5rem",fontSize:"0.9rem"}},d)))})),(le==null?void 0:le.length)>0&&e.createElement(w.Z,pe(G({},{sm:24}),{style:{marginTop:"1rem",marginBottom:"0.5rem"}}),e.createElement(A.Z,{size:"small",header:e.createElement("div",null,e.createElement("strong",null,"File Mapping Status"),e.createElement(D.ZP,{type:"text",size:"small",danger:!0,onClick:d=>ce([]),style:{marginLeft:"0.5rem"}},"Close")),bordered:!0,dataSource:le,renderItem:d=>e.createElement(A.Z.Item,null,e.createElement("div",null,(d==null?void 0:d.type)=="success"?e.createElement(Ye.Z,{style:{color:"#52c41a",fontSize:"1rem"}}):e.createElement(be.Z,{style:{color:"#ff4d4f",fontSize:"1rem"}}),e.createElement("span",{style:{marginLeft:"0.5rem",fontSize:"0.9rem"}},d==null?void 0:d.message)))}))),x&&e.createElement(W.default,null,e.createElement(ue.Z,null)),!x&&(_==null?void 0:_.length)<1&&e.createElement(f.Z,{style:{marginTop:"5rem"},description:e.createElement(v.Z,{message:"No files are uploaded yet for this user!",type:"info"})}),!x&&(_==null?void 0:_.length)>0&&e.createElement(e.Fragment,null,e.createElement(ot,G({files:_,onDelete:yt,onUpdate:Pt,onMapFiles:Zt},n))))},ot=n=>
1{const{files:t,onDelete:a,onUpdate:m,onMapFiles:g,isEditable:Z=!0}=n,[x,E]=(0,e.useState)([]),[s,u]=(0,e.useState)(()=>t),[_,X]=(0,e.useState)([]),[V,k]=(0,e.useState)([]);(0,e.useEffect)(()=>{let p=[];t.map(r=>p.push(r._id)),E(p),u(t)},[t]);const le=p=>{let r=[..._];r.includes(p)||(r.push(p),X(r))},ce=[{title:"File Type/Map Status",dataIndex:"ftype",width:180,fixed:"left",editable:!1,render:(p,r)=>e.createElement(y.Z,{align:"middle"},e.createElement(w.Z,{sm:24,md:9},(0,Qe.Z)(["image/jpeg","image/png"],r==null?void 0:r.ftype)&&e.createElement(h.Z,{width:45,src:r==null?void 0:r.publicUrl}),(r==null?void 0:r.ftype)=="application/pdf"&&e.createElement(me.Z,{style:{fontSize:"3rem"}})),e.createElement(w.Z,{sm:24,md:15},e.createElement("div",null,e.createElement(F.Z,{title:"File Type"},r==null?void 0:r.ftype)),e.createElement("div",null,e.createElement(F.Z,{title:"File Map Status",color:r!=null&&r.isMapped?"green":"red"},r!=null&&r.isMapped?e.createElement("span",null,e.createElement(ke.Z,{color:"green"})," Mapped"):e.createElement("span",null,e.createElement(Je.Z,{color:"red"})," Not Mapped")))))},{title:"File Name",dataIndex:"fNameWithoutExtension",width:270,editable:Z,renderFormItem:p=>{var r;return e.createElement(ee.default,{placeholder:"Enter file name",required:!0,addonAfter:(r=p==null?void 0:p.entity)==null?void 0:r.fExtension,allowClear:!0,onChange:N=>{var z;return le((z=p==null?void 0:p.entity)==null?void 0:z._id)}})},formItemProps:{rules:[{required:!0,whitespace:!0,message:"File name is required!"}]}},{title:"Category",dataIndex:"fileCategory",width:150,editable:Z,render:(p,r)=>e.createElement(U.BV,{data:r==null?void 0:r.fileCategory,isTag:!1}),renderFormItem:p=>e.createElement(ge.ZP,{category:"fileCategory",placeholder:"Select file category",allowClear:!0,showSearch:!0,style:{width:"100%"},onChange:r=>{var N;return le((N=p==null?void 0:p.entity)==null?void 0:N._id)}}),formItemProps:{rules:[{required:!0,message:"File category is required!"}]}},{title:"Updated Details",dataIndex:"createdBy",width:180,editable:!1,render:(p,r)=>{var N,z;return e.createElement(e.Fragment,null,e.createElement("div",null,e.createElement(he.Z,{username:(N=r==null?void 0:r.updatedBy)==null?void 0:N.displayName,uid:(z=r==null?void 0:r.updatedBy)==null?void 0:z._id})," ",e.createElement(nt,{type:"secondary"},e.createElement(U.M0,{timestamp:r!=null&&r.updatedAtUnix?r==null?void 0:r.updatedAtUnix:r==null?void 0:r.createdAtUnix}))))}},{title:"Status",dataIndex:"status",width:90,editable:!1,render:(p,r)=>e.createElement(e.Fragment,null,e.createElement(it,{status:r==null?void 0:r.status}),(r==null?void 0:r.status)==1&&Z&&e.createElement(e.Fragment,null,e.createElement(R.Z,{title:"Are you sure you want to delete this file?",onConfirm:N=>{N.stopPropagation(),a(r._id)},onCancel:N=>N.stopPropagation(),placement:"left",okText:"Yes",cancelText:"No"},e.createElement("a",{href:"#",onClick:N=>N.stopPropagation()},"Delete"))))},{title:"Actions",width:100,fixed:"right",editable:!1,render:(p,r,N)=>{var z,ne;return e.createElement(e.Fragment,null,(r==null?void 0:r.status)==1&&e.createElement(e.Fragment,null,(r==null?void 0:r.ftype)=="application/pdf"&&e.createElement(e.Fragment,null,e.createElement(U.jT,{data:[{label:"Preview",data:r}]}),e.createElement(M.Z,{type:"vertical",style:{margin:"0 0.2rem"}})),(n==null?void 0:n.onChoose)&&e.createElement(e.Fragment,null,e.createElement(M.Z,{type:"vertical",style:{margin:"0 0.8rem"}}),e.createElement(I.Z,{title:(z=r==null?void 0:r.fileCategory)!=null&&z.key?"Choose file to upload.":"Update category for this file before choosing it!"},e.createElement(D.ZP,{type:"link",onClick:ve=>{n.onChoose(r)},disabled:!((ne=r==null?void 0:r.fileCategory)!=null&&ne.key)},"Choose")))))}}],de=p=>{k(p)};return e.createElement(oe.ZP,{locale:Xe.default},e.createElement($e.Z,{style:{marginTop:"1rem"},columns:ce,rowKey:"_id",pagination:!1,scroll:{x:1e3,y:530},value:s,onChange:u,rowSelection:{selectedRowKeys:V,onChange:de},recordCreatorProps:{style:{display:"none"}},toolBarRender:()=>{let p=[];return(V==null?void 0:V.length)>0&&p.push(e.createElement(D.ZP,{type:"primary",onClick:()=>{(_==null?void 0:_.length)>0?o.ZP.error({message:"Error!",description:"Please update the files data first that you have changed recently!",duration:8}):g(s,V)}},"Map Files")),(_==null?void 0:_.length)>0&&p.push(e.createElement(D.ZP,{type:"primary",onClick:()=>{m(s,_),X([])}}
1,"Update Files Data")),(p==null?void 0:p.length)>0?p:null},editable:{type:"multiple",editableKeys:x,actionRender:(p,r,N)=>[N.delete],onValuesChange:(p,r)=>{u(r)},onChange:E}}))},it=n=>{let t="",a="";return(n==null?void 0:n.status)==1?(t="Active",a="green"):(t="Removed",a="red"),e.createElement(F.Z,{color:a},t)};var De=l(51161),st=l(48054),$=l(26412),ct=l(1147),dt=(n,t,a)=>new Promise((m,g)=>{var Z=s=>{try{E(a.next(s))}catch(u){g(u)}},x=s=>{try{E(a.throw(s))}catch(u){g(u)}},E=s=>s.done?m(s.value):Promise.resolve(s.value).then(Z,x);E((a=a.apply(n,t)).next())});function ut(n){return dt(this,null,function*(){return(0,Y.ZP)("/server/api/admin/enrol/request",{params:n})})}var mt=Object.defineProperty,Re=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,Te=(n,t,a)=>t in n?mt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a,vt=(n,t)=>{for(var a in t||(t={}))ft.call(t,a)&&Te(n,a,t[a]);if(Re)for(var a of Re(t))pt.call(t,a)&&Te(n,a,t[a]);return n},Et=(n,t,a)=>new Promise((m,g)=>{var Z=s=>{try{E(a.next(s))}catch(u){g(u)}},x=s=>{try{E(a.throw(s))}catch(u){g(u)}},E=s=>s.done?m(s.value):Promise.resolve(s.value).then(Z,x);E((a=a.apply(n,t)).next())}),ht=n=>{var t,a;const[m,g]=(0,e.useState)(!1),[Z,x]=(0,e.useState)({});(0,e.useEffect)(()=>{var u;const{rid:_}=(u=n==null?void 0:n.match)==null?void 0:u.params;s({rid:_})},[(a=(t=n==null?void 0:n.match)==null?void 0:t.params)==null?void 0:a.rid]);const E=u=>{if((u==null?void 0:u.filterValue)==null||(u==null?void 0:u.filterValue)==""){o.ZP.error({message:"Error!",description:"Please provide filter value in order to find request details!",duration:8});return}s(u)},s=u=>Et(void 0,null,function*(){g(!0);const{status:_,class:X,message:V,payload:k}=yield ut(u);if(g(!1),!_){o.ZP[X]({message:V,duration:8});return}_&&(k!=null&&k._id)&&x(k)});return e.createElement(De.DY,null,e.createElement(De.dF,{crumbs:[{title:"Applications"},{title:"Enquiry Applications",to:"/admin/requests/paid"},{title:"File Upload"}],title:"File Upload",backTo:"/admin/requests/paid",description:"Find an application and manage its uploaded files."}),e.createElement(W.default,{bordered:!1,size:"small"},e.createElement(y.Z,null,e.createElement(w.Z,vt({},{sm:24,md:14}),e.createElement(ct.Z,{onSearch:E}))),e.createElement(st.Z,{active:!0,avatar:!0,paragraph:{rows:5},loading:m}),!m&&!(Z!=null&&Z._id)&&e.createElement(f.Z,{style:{margin:"5rem"},description:"No request data was found! Please use filters to find a user request."}),!m&&(Z==null?void 0:Z._id)&&e.createElement(e.Fragment,null,e.createElement(gt,{data:Z}),e.createElement(rt,{extra:{ruid:Z.uid}}))))};const gt=n=>{const{data:t}=n;return e.createElement(e.Fragment,null,e.createElement($.Z,{title:"Candidate Details",bordered:!0,style:{marginBottom:"2rem"}},e.createElement($.Z.Item,{label:" Name"},e.createElement(he.Z,{username:t.name,uid:t.uid})),e.createElement($.Z.Item,{label:"Email"},e.createElement(U.lP,{data:t.email})),e.createElement($.Z.Item,{label:"Mobile"},e.createElement(U.mZ,{data:t.mobile}))),t!=null&&t.timeslot?e.createElement($.Z,{title:"Timeslot Details",bordered:!0,style:{marginBottom:"2rem"}},e.createElement($.Z.Item,{label:" Token Number"},e.createElement("strong",null,t.timeslot.tokenNumber," ",`(Slot ${t.timeslot.slotNo})`)),e.createElement($.Z.Item,{label:"Date & Time"},e.createElement(U.M0,{timestamp:t.timeslot.startUnix,isVisibleDate:!0}))):e.createElement(v.Z,{message:"Timeslot details are not available as the user has not yet selected the preferred timeslot!",type:"info",showIcon:!0,style:{marginBottom:"2rem"}}))}},1147:function(P,i,l){"use strict";var U=l(70597),e=l(40110),c=l(92708),b=l(21054),O=l(12922),o=l(52423),H=l(71577),y=l(67294),w=l(28946),B=l(70963),D=Object.defineProperty,A=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,v=(R,M,I)=>M in R?D(R,M,{enumerable:!0,configurable:!0,writable:!0,value:I}):R[M]=I,h=(R,M)=>{for(var I in M||(M={}))W.call(M,I)&&v(R,I,M[I]);if(A)for(var I of A(M))f.call(M,I)&&v(R,I,M[I]);return R};const{Option:F}=c.default,ee=R=>{const M=(R==null?void 0:R.defaultFilters)||{},[I]=b.Z.useForm(),oe=[{key:"fullName",label:"Name"},{key:"email",label:"Email Id"},{key:"universityRegistrationNumber",label:"University Reg.No"},{key:"mobile",label:"Mobile No."},{key:"rno",label:"Application No."},{key:"pid",label:"Payment ID"},{key:"requestNumber",label:"Request Number"},{key:"refundId",label:"Refund Id"}];(0,y.useEffect)(()=>{I.setFieldsValue(M)},[M]),(0,y.useEffect)(()=>{const T={filterType:"email"};I.setFieldsValue(T)},[]);const ue=T=>{T==="tokenNumber"&&I.setFieldsValue({filterDateMoment:(0,U.bU)()})},Y=T=>{let L=h({historyType:"specificFilter"},T);(L==null?void 0:L.filterType)==="tokenNumber"&&(L!=null&&L.filterValue||(L.filterValue="all")),(0,U.ke)(L.filterType)&&(0,U.ke)(L.filterValue)||(L!=null&&L.filterDateMoment&&(L.filterDate=(0,U.Fb)(L.filterDateMoment,w.Gf),delete L.filterDateMoment),R.onSearch(L))};return y.createElement(b.Z,{form:I,onFinish:Y},y.createElement(b.Z.Item,{noStyle:!0},y.createElement(O.Z.Compact,null,y.createElement(b.Z.Item,{name:"filterType"},y.createElement(c.default,{placeholder:"",style:{width:"190px"},showSearch:!0,allowClear:!0,onChange:ue},oe&&oe.map(T=>y.createElement(F,{key:T.key,value:T.key},T.label)))),y.createElement(b.Z.Item,{noStyle:!0,shouldUpdate:(T,L)=>T.filterType!==L.filterType},({getFieldValue:T})=>T("filterType")==="tokenNumber"?y.createElement(b.Z.Item,{name:"filterDateMoment",label:"",rules:[{required:!0}]},y.createElement(B.z4,{placeholder:"Select the date"})):null),y.createElement(b.Z.Item,{name:"filterValue"},y.createElement(o.default,{key:"filterValue",style:{maxWidth:"300px"},allowClear:!0,placeholder:"Select filter & enter value"})),y.createElement(b.Z.Item,null,y.createElement(H.ZP,{key:"5",type:"primary",htmlType:"submit",icon:y.createElement(e.Z,null),"aria-label":"Search"})))))};i.Z=ee}
1,64836:function(P){function i(l){return l&&l.__esModule?l:{default:l}}P.exports=i,P.exports.__esModule=!0,P.exports.default=P.exports}}]);
2}());

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.