PageSourceSearch

https://online.bharatsofttech.com/static/js/139.2fa1a470.chunk.js

js bharatsofttech.com collected 2026-09-29 12:17:19 UTC 10,794 bytes, 1 lines download raw bytes

1(this["webpackJsonpclassplus-web-react"]=this["webpackJsonpclassplus-web-react"]||[]).push([[139],{1024:function(t,e,n){t.exports=n.p+"static/media/close.c2915c9a.svg"},1391:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var s=n(1),i=n.n(s);function a(t){let{placeholder:e,className:n,style:s,value:a,onChange:r,size:o,showIcon:l,type:d}=t;return i.a.createElement("div",{className:`${n} ${l?"icon":""} input--material-holder`,style:s},i.a.createElement("input",{type:d||"text",value:a,onChange:r,placeholder:e,className:o+" input--material"}),l&&i.a.createElement("i",{className:"search icon huge input--material-icon"}))}},3423:function(t,e,n){"use strict";n.r(e);var s=n(1),i=n.n(s),a=n(140),r=n(2796),o=n(47),l=n(1391),d=n(250);function u(t){return{type:d.e,students:t}}function c(t){return{type:d.d,selectedStudentIndex:t}}var p=Object(a.connect)((function(t){return{searchTerm:t.linkStudent&&t.linkStudent.searchTerm}}),{setSearchTerm:function(t){return{type:d.c,searchTerm:t}},setSelectedStudent:c,setStudents:u})(t=>{const{t:e,searchTerm:n,setStudents:s,setSelectedStudent:a,setSearchTerm:r}=t;return i.a.createElement(l.a,{showIcon:!0,placeholder:e("src.containers.LinkStudent.SearchInput.searchStudent","Enter Mobile Number with Country Code. Ex, 919999999999."),value:n||"",onChange:t=>{var e,n;(null===t||void 0===t||null===(e=t.target)||void 0===e||null===(n=e.value)||void 0===n?void 0:n.length)<12&&s([]),a(-1),r(t.target.value)},type:"number"})}),h=n(1023),m=n.n(h),S=n(456),v=n(132),g=n(5),f=n(283),E=n(177),k=n(1088),b=n(163),y=n(2249);var C=Object(k.a)({form:"studentOtpConfirmation",validate:t=>{let{otp:e}=t;const n={};return/\b\d{4}\b/.test(e)||(n.otp="OTP must be 4 digit number"),n}})((function(t){let{submitting:e,invalid:n,sendOtp:s,loading:a,handleSubmit:r}=t;const{t:l}=Object(y.a)();return i.a.createElement(o.j,{className:"ml-4 mt-5",loading:a,onSubmit:r},i.a.createElement(o.k,{verticalAlign:"middle"},i.a.createElement(o.k.Row,null,i.a.createElement(o.k.Column,{computer:"16"},i.a.createElement("div",{style:{fontSize:"1.8rem",fontWeight:"200"}},l("components.LinkStudent.StudentOtpConfirmation.verifyStudent","Verify Student")),i.a.createElement("p",{style:{marginTop:"8px",fontSize:"1.2rem",fontWeight:"300"}},l("components.LinkStudent.StudentOtpConfirmation.otpIndicator","An OTP is sent to your ward's registered mobile number/email address")))),i.a.createElement(o.k.Row,null,i.a.createElement(o.k.Column,{computer:"4"},i.a.createElement("div",{style:{fontSize:"1.1rem",fontWeight:"200"}},l("components.LinkStudent.StudentOtpConfirmation.EnterYourOtpHere","Enter your OTP here"))),i.a.createElement(o.k.Column,{computer:"4"},i.a.createElement(E.a,{component:b.a,name:"otp",type:"text",placeholder:l("components.LinkStudent.StudentOtpConfirmation.EnterOTP","Enter OTP"),size:"large",autoFocus:!0})),i.a.createElement(o.k.Column,{computer:"4"},i.a.createElement(o.b,{disabled:e||n,loading:e,primary:!0,size:"large",style:{width:"100%"}},l("components.LinkStudent.StudentOtpConfirmation.Verify","Verify"))),i.a.createElement(o.k.Column,{computer:"4"},i.a.createElement(o.b,{onClick:s,basic:!0,disabled:e,size:"large",color:"blue",style:{width:"100%"}},l("components.LinkStudent.StudentOtpConfirmation.Resend","Resend"))))))})),O=n(151),I=n(133),T=n(80),x=n(38);class w extends i.a.Component{constructor(t){super(t),this.sendOtp=this.sendOtp.bind(this),this.addStudent=this.addStudent.bind(this),this.state={saveUserInfoType:t.saveUserInfoType,isStudentAdding:!1,isOTPSentViaEmail:!1}}componentDidMount(){void 0===this.props.saveUserInfoType?this.props.makeApiCall("v2/org/details","GET",void 0,t=>{var e,n;return this.setState({saveUserInfoType:null===t||void 0===t||null===(e=t.data)||void 0===e||null===(n=e.organization)||void 0===n?void 0:n.saveUserInfoType},()=>{this.sendOtp()})}):this.sendOtp()}sendOtp(t){var e;t&&t.preventDefault();const{mobile:n,email:s}=this.props.students[this.props.selectedStudentIndex];let i=s&&s.length>0&&(1==this.state.saveUserInfoType||2==this.state.saveUserInfoType)?1:0,a=1===i?0:1;0!==this.state.saveUserInfoType||n||(i=1),this.setState({isOTPSentViaEmail:1===i?1:0});this.props.requestOtp(!!t,null===n||void 0===n?void 0:n.substr(2,n.length),this.props.orgId,null===(e=this.props.students[this.props.selectedStudentIndex])||void 0===e?void 0:e.countryExt,s,a,i,"linkStudent")}addStudent(t){this.setState({isStudentAdding:!0});const{mobile:e,email:n}=this.props.students[this.props.selectedStudentIndex];let s=n&&n.length>0&&(1==this.state.saveUserInfoType||2==this.state.saveUserInfoType)?1:0,i=1===s?0:1;0!==this.state.saveUserInfoType||e||(s=1),this.props.makeApiCall("parents/students","POST",{studentId:this.props.students[this.props.selectedStudentIndex].studentId,viaSms:i,viaEmail:s,otp:t.otp},()=>{this.setState({isStudentAdding:!1}),g.toastr.success("SUCCESS","Student added successfully"),this.props.updateParentsChildren(this.props.students[this.props.selectedStudentIndex]),Object(T.a)(x.wd),this.props.history.push("/batches")}
1,()=>{this.setState({isStudentAdding:!1})}),this.setState({isStudentAdding:!1})}render(){return void 0!==this.state.saveUserInfoType&&i.a.createElement(C,{onSubmit:this.addStudent,sendOtp:this.sendOtp,loading:this.props.requestingOtp,isStudentAdding:this.state.isStudentAdding,isOTPSentViaEmail:this.state.isOTPSentViaEmail})}}var A=Object(r.a)(Object(a.connect)((function(t){var e,n,s,i,a;return{loginState:null===t||void 0===t||null===(e=t.loginReducer)||void 0===e?void 0:e.loginState,requestingOtp:t.otp&&t.otp.requestingOtp,students:t.linkStudent&&t.linkStudent.students,selectedStudentIndex:t.linkStudent&&t.linkStudent.selectedStudentIndex,organization:t.persistedData&&t.persistedData.organization,orgId:null===t||void 0===t||null===(n=t.loginReducer)||void 0===n||null===(s=n.orgDetails)||void 0===s?void 0:s.orgId,saveUserInfoType:null===t||void 0===t||null===(i=t.persistedData)||void 0===i||null===(a=i.organization)||void 0===a?void 0:a.saveUserInfoType}}),{requestOtp:f.a,makeApiCall:O.b,updateParentsChildren:I.g})(w));function U(t){var e,n;let{student:s,onAddClick:a,active:r}=t;return i.a.createElement(o.z,{className:"w-100 pb-4 pt-4 border-none"},i.a.createElement(o.k,{verticalAlign:"middle"},i.a.createElement(o.k.Row,null,i.a.createElement(o.k.Column,{style:{height:"100%","padding-top":"14px"},computer:"2"},i.a.createElement(S.a,{user:{name:s.name?s.name:"",imageUrl:s.imageUrl?s.imageUrl:""},size:70})),i.a.createElement(o.k.Column,{computer:"9"},i.a.createElement("div",{style:{lineHeight:"initial"},className:"cp-heading mb-4"},s&&s.name),i.a.createElement(v.a,null,s&&(null===s||void 0===s?void 0:s.mobile)&&`+${null===s||void 0===s||null===(e=s.mobile)||void 0===e?void 0:e.substring(0,2)}XXXXXX${null===s||void 0===s||null===(n=s.mobile)||void 0===n?void 0:n.substring(8)}`),s&&s.email?i.a.createElement(v.a,null,s.email):""),!r&&i.a.createElement(o.k.Column,{computer:"4",textAlign:"right"},i.a.createElement(o.b,{size:"large",style:{width:"50%",padding:"1.3rem 0"},basic:!0,primary:!0,onClick:a},"Add")))),r&&i.a.createElement(A,null))}class z extends i.a.Component{constructor(t){super(t),this.onAddClick=this.onAddClick.bind(this)}onAddClick(){this.props.setSelectedStudent(this.props.currentIndex)}render(){return i.a.createElement(U,{student:this.props.student,active:this.props.currentIndex===this.props.selectedStudentIndex,onAddClick:this.onAddClick})}}var P=Object(a.connect)((function(t){return{selectedStudentIndex:t.linkStudent&&t.linkStudent.selectedStudentIndex}}),{setSelectedStudent:c})(z);function j(t){let{fetchStudent:e,students:n,loading:s,totalStudents:a}=t;return s&&!n?i.a.createElement(o.k.Row,null,i.a.createElement(o.k,{verticalAlign:"middle",style:{width:"100%"}},i.a.createElement(o.k.Column,{stretched:!0,width:16},i.a.createElement(o.r,{active:!0,inline:"centered",content:"Fetching students"})))):i.a.createElement("div",{style:{width:"100%"}},n&&n.length>0?i.a.createElement(m.a,{next:()=>e(),hasMore:a>n.length,loader:i.a.createElement(o.r,{active:!0,inline:"centered"}),style:{overflow:"inherit"}},n.map((t,e)=>i.a.createElement(o.k.Row,{key:t.studentId},i.a.createElement(P,{student:t,currentIndex:e})))):"")}class R extends i.a.Component{constructor(t){super(t),this.state={limit:20,offset:0,totalStudents:0},this.fetchStudent=this.fetchStudent.bind(this)}componentDidUpdate(t){var e,n;(null===this||void 0===this||null===(e=this.props)||void 0===e||null===(n=e.searchTerm)||void 0===n?void 0:n.length)>11&&t.searchTerm!==this.props.searchTerm&&this.fetchStudent({offset:0})}fetchStudent(t){this.props.searchTerm?(this.props.setFetchingStudentsStatus(!0),this.props.makeApiCall(`parents/students/search?limit=${this.state.limit}&offset=${t.offset}`,"Post",{keyword:this.props.searchTerm},e=>{0===t.offset?(this.props.setStudents(e.data),this.setState({offset:this.state.limit,totalStudents:e.data.count})):(this.props.setStudents([...this.props.students,...e.data]),this.setState({offset:this.state.offset+this.state.limit,totalStudents:e.data.count})),this.props.setFetchingStudentsStatus(!1)},()=>this.props.setFetchingStudentsStatus(!1))):(this.props.setStudents(null),this.setState({offset:0,totalStudents:0}
1))}render(){return i.a.createElement(j,{loading:this.props.fetchingStudentsStatus,students:this.props.students,totalStudents:this.state.totalStudents,fetchStudent:()=>this.fetchStudent({offset:this.state.offset})})}}var D=Object(a.connect)((function(t){return{searchTerm:t.linkStudent&&t.linkStudent.searchTerm,fetchingStudentsStatus:t.linkStudent&&t.linkStudent.fetchingStudentsStatus,students:t.linkStudent&&t.linkStudent.students}}),{makeApiCall:O.b,setFetchingStudentsStatus:function(t){return{type:d.b,fetchingStudentsStatus:t}},setStudents:u})(R),N=n(1024),L=n.n(N);function V(t){let{onClose:e,showCloseIcon:n,logOut:s}=t;const{t:a}=Object(y.a)();return i.a.createElement(o.k,{style:{margin:"7rem auto",width:"65%"}},i.a.createElement("div",{style:{position:"absolute",top:"30px",right:"30px",cursor:"pointer"}},n?i.a.createElement("img",{alt:"back",height:"40px",src:L.a,onClick:e}):i.a.createElement(o.b,{primary:!0,onClick:s},"Logout")),i.a.createElement(o.k.Row,{className:"mb-6"},i.a.createElement(p,{t:a})),i.a.createElement(D,null))}class F extends i.a.Component{constructor(t){super(t),this.onClose=this.onClose.bind(this)}componentWillReceiveProps(){this.props.clearState()}onClose(){this.props.history.goBack(),this.props.clearState()}render(){const t=this.props.students&&this.props.students.length;return i.a.createElement(V,{logOut:this.props.logOut,onClose:this.onClose,showCloseIcon:t})}}e.default=Object(r.a)(Object(a.connect)((function(t){return{students:t.persistedData&&t.persistedData.children}}),{clearState:function(){return{type:d.a}},logOut:I.b})(F))}}]);

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.