1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[993],{9993:function(e,t,i){i.r(t),i.d(t,{AddModal:function(){return v},DeleteConfirmationModal:function(){return T},EditModal:function(){return b},EditModeModal:function(){return _}});var n=i(5893),s=i(7294),r=i(9578),l=i(9356),o=i(6086),a=i(329),c=i(287),d=i(5275),u=i(9921),h=i(5313),p=i(9936),m=i(5102),x=i(6486),f=i(6575),g=i(8077),y=i(2691);let j=()=>{var e,t;let i=(0,h.I0)(),l=(0,u.v)(e=>e.user),{grades:j,subjects:C,countries:v,qualifications:b,eslCertifications:T,teachingQualifications:_,hoursCompleted:N}=(0,u.v)(e=>e.flowData),{currentLicense:I}=l,E=l.errors,{states:S,modifyCurrentLicense:w,validate:O}=(0,f.SR)(),[A,Z]=(0,s.useState)(""),[R,k]=(0,s.useState)(!1),[Q,z]=(0,s.useState)(""),P=v.find(e=>e.value===I.country),{edit:{showEditModal:V}}=(0,y.ZP)("licenses");(0,s.useEffect)(()=>{V&&((0,x.isEmpty)(P)?O("licenseCountry"):O("licenseState"))},[P]);let L=e=>i((0,p.Pv)({key:e,value:""})),M=(e,t)=>{k(t),t&&z(e)};(0,m.Z)(()=>{!R&&"state"===Q&&S.length>0&&O("licenseState"),R||"grades"!==Q||O("licenseGrades"),R||"subjects"!==Q||O("licenseSubjects"),R||"country"!==Q||O("licenseCountry"),R||"eslCertification"!==Q||O("licenseEslCertification"),R||"teachingQualification"!==Q||O("licenseTeachingQualification"),R||"hoursCompleted"!==Q||O("licenseHoursCompleted")},[R]),(0,m.Z)(()=>{R||"from"!==Q||((0,x.isEmpty)(I.from.month)||(0,x.isEmpty)(I.from.year)?O("licenseFrom"):L("licenseFrom"))},[R]),(0,m.Z)(()=>{R||"to"!==Q||((0,x.isEmpty)(I.to.month)||(0,x.isEmpty)(I.to.year)?O("licenseTo"):L("licenseTo"))},[R]),(0,m.Z)(()=>{(0,x.isEmpty)(A)&&H()},[A]);let F=(0,c.LS)("label",A,v),D=new Date,q=D.getFullYear(),W=D.getMonth()+1,U=I.from.year&&!(0,d.vk)(I.from,{year:q,month:W+1})?"This field is required":"",H=()=>{Z(""),w("country")("")},Y=(e,t)=>i=>{let n={...I[t]};n[e]=i.value,w(t)(n)},G=e=>t=>{w(e)(t.value),"country"===e&&Z(t.label)};return(0,n.jsxs)("div",{className:"ta-reggie__form-container--inner",children:[(0,n.jsx)(r.vO,{id:"certification-types",label:"License/certificate type",className:"ta-reggie__input",placeholder:"Select type",value:I.type,onChange:G("type"),options:b,isOpen:e=>M("type",e),fullWidth:!0,isRequired:!0}),I.type&&(0,n.jsx)(o.o,{id:"issuing-body",label:"Issuing body",className:"ta-reggie__input",placeholder:"I.e., Ontario College of Teachers",value:null!==(e=I.issuingBody)&&void 0!==e?e:"",onChange:e=>w("issuingBody")(e.target.value),fullWidth:!0,isRequired:!0,onBlur:()=>O("licenseIssuingBody"),error:l.errors.licenseIssuingBody.errorText}),I.type===g.QU.TEACHER_QUALIFICATION&&(0,n.jsx)(r.vO,{id:"teacher-qualification-type",label:"Teaching License Type",className:"ta-reggie__input",placeholder:"Select type of teaching license",value:I.teachingQualification,onChange:G("teachingQualification"),options:_,isOpen:e=>M("teachingQualification",e),fullWidth:!0,isRequired:!0,error:l.errors.licenseTeachingQualification.errorText}),I.type===g.QU.ESL_CERTIFICATION&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.vO,{id:"esl-certificate-type",label:"ESL Certificate Type",className:"ta-reggie__input",placeholder:"Select type of ESL certification",value:I.eslCertification,onChange:G("eslCertification"),options:T,isOpen:e=>M("eslCertification",e),fullWidth:!0,isRequired:!0,error:l.errors.licenseEslCertification.errorText}),(0,n.jsx)(r.vO,{id:"hours-completed",label:"Hours Completed",className:"ta-reggie__input",placeholder:"I.e., 100 or more",value:I.hoursCompleted,onChange:G("hoursCompleted"),options:N,isOpen:e=>M("hoursCompleted",e),fullWidth:!0,isRequired:!0,error:l.errors.licenseHoursCompleted.errorText})]}),(0,n.jsx)(r.gA,{id:"country",label:"Country your license was issued in:",className:"ta-reggie__input",isRequired:!0,placeholder:"Select country",onChange:G("country"),selectedValue:P,options:F,search:A,onClear:H,onSearch:e=>Z(e),error:0===F.length&&A?"There is no such option":E.licenseCountry.errorText,isOpen:e=>M("country",e),fullWidth:!0,"data-lpignore":"true","data-form-type":"other"}),(S.length>0||I.state)&&(0,n.jsx)(r.vO,{id:"state",label:"State or province your license was issued in:",className:"ta-reggie__input",isRequired:!0,placeholder:"Select state or province",onChange:G("state"),value:
1I.state,disabled:!P,error:E.licenseState.errorText,options:S,fullWidth:!0,isOpen:e=>M("state",e)}),I.type===g.QU.TEACHER_QUALIFICATION&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.ZJ,{id:"grades",label:"Grade(s) you are licensed to teach:",placeholder:"Select grade(s)",className:"ta-reggie__input",error:E.licenseGrades.errorText,isRequired:!0,onChange:w("grades"),options:j,selectedValues:I.grades,fullWidth:!0,withNoneOption:!1,isOpen:e=>M("grades",e)}),(0,n.jsx)(r.ZJ,{id:"subjects",label:"Subject(s) you are licensed to teach:",className:"ta-reggie__input",placeholder:"Select subject(s)",error:E.licenseSubjects.errorText,isRequired:!0,onChange:w("subjects"),options:C,selectedValues:I.subjects,withNoneOption:!1,fullWidth:!0,isOpen:e=>M("subjects",e)})]}),(0,n.jsx)(a.Wr,{id:"valid",label:"Valid from",className:"ta-reggie__input--smallest",current:I.from,onChangeMonth:Y("month","from"),onChangeYear:Y("year","from"),error:E.licenseFrom.errorText||U,maxYear:q,maxMonth:W,isOpen:e=>M("from",e)}),!I.hasNotExpiration&&(0,n.jsx)(a.Wr,{id:"expiry",label:"Expiry",className:"ta-reggie__input--smallest",current:I.to,onChangeMonth:Y("month","to"),onChangeYear:Y("year","to"),error:E.licenseTo.errorText||(0,d.GH)(I),isOpen:e=>M("to",e)}),(0,n.jsx)(r.XZ,{id:"expiration-date-checkbox",checked:null!==(t=I.hasNotExpiration)&&void 0!==t&&t,className:"ta-reggie__input",onChange:e=>{let{target:{checked:t}}=e;w("hasNotExpiration")(t)},label:"No expiration date"})]})};var C=i(9086);let v=()=>{let{saveLicense:e,loading:t,clearErrors:i}=(0,f.SR)(),{add:{setShowAddModal:s}}=(0,y.ZP)("licenses");return(0,n.jsx)(l.Z,{id:"add-license-modal",title:"Add license or certificate",onClose:()=>{i(),s(!1)},height:"auto",onSave:e,loading:t,children:(0,n.jsx)(j,{})})},b=()=>{let{editLicense:e,loading:t,clearErrors:i}=(0,f.SR)(),{edit:{setShowEditModal:s},delete:{setShowDeleteModal:o}}=(0,y.ZP)("licenses"),a=(0,n.jsxs)(r.zx,{id:"delete-license-button",type:"ghost",size:"medium",onClick:()=>{s(!1),o(!0)},children:[(0,n.jsx)(r.zx.Icon,{icon:"trash",iconColor:"#727272"}),(0,n.jsx)(r.zx.Text,{children:"Delete license or certificate"})]});return(0,n.jsx)(l.Z,{id:"edit-license-modal",title:"Edit license or certificate",type:"edit",onClose:()=>{i(),s(!1)},height:"auto",onSave:e,loading:t,secondaryAction:a,children:(0,n.jsx)(j,{})})},T=()=>{let{deleteLicense:e,loading:t}=(0,f.SR)(),{edit:{setShowEditModal:i},delete:{setShowDeleteModal:s}}=(0,y.ZP)("licenses");return(0,n.jsx)(l.c,{id:"delete-license-confirmation-modal",title:"Are you sure you want to delete this?",onCancel:()=>{s(!1),i(!0)},onConfirm:e,cancelText:"Keep",confirmText:"Delete",loading:t})},_=()=>{let{editMode:{setEditMode:e}}=(0,y.ZP)("licenses");return(0,n.jsx)(l.Z,{id:"license-edit-mode-mobile",title:"Certificates and licenses",type:"info",onClose:()=>e(!1),children:(0,n.jsx)(C.RY,{hideDetails:!0})})}},9086:function(e,t,i){i.d(t,{RY:function(){return T},T$:function(){return _},dv:function(){return b}});var n=i(5893),s=i(7294),r=i(9578),l=i(6575),o=i(287),a=i(4892),c=i(5313),d=i(5435),u=i(9936),h=i(8077),p=i(9921),m=i(8250),x=i(2691);let f=e=>{let t=(0,o.ZY)(e,"short");return"Sep"===t?"Sept":t},g=(e,t,i)=>i?"Valid from: ".concat(f(e)," ").concat(e.year," - Ongoing"):"Valid from: ".concat(f(e)," ").concat(e.year," - ").concat(f(t)," ").concat(t.year),y=(e,t)=>{let i=e.find(e=>e.value===t);return i?i.label:null},j=(e,t)=>{var i;let n=e.find(e=>e.value===t);return null!==(i=null==n?void 0:n.label)&&void 0!==i?i:"Teacher Qualification"},C=()=>(0,n.jsx)(r.uT,{color:"cherry",children:"Please provide the country, state/province your certificate or license was issued in"}),v=()=>(0,n.jsx)(r.uT,{color:"cherry",element:"span",children:"Not completed"}),b=()=>{let e=(0,c.I0)(),{add:{setShowAddModal:t}}=(0,x.ZP)("licenses");return(0,n.jsx)(m.Z,{id:"license-placeholder",title:"Are you certified or licensed?",tip:"Add a photo or scan of your Certificate or License in the Documents section to authenticate your information.",footer:(0,n.jsxs)("span",{children:["Nothing to add here? Get your"," ",(0,n.jsx)(r.uT,{element:r.V5.body.elements.a,weight:r.V5.weight.bold,href:"https://www.teach
1away.com/courses/online-tefl-certification",target:"_blank",children:"TEFL certification"})," ","or"," ",(0,n.jsx)(r.uT,{element:r.V5.body.elements.a,weight:r.V5.weight.bold,href:"https://www.teachaway.com/courses/teacher-certification",target:"_blank",children:"teaching license"})," ","with Teach Away."]}),buttonText:"Add your Certificate or License Information",onClick:()=>{let i=new d.Z;Promise.resolve(e((0,u.jM)(i))).then(()=>t(!0))}})},T=e=>{let{hideDetails:t}=e,i=(0,c.I0)(),{dropDownValues:{countries:o}}=(0,s.useContext)(a.R0),{qualifications:m}=(0,p.v)(e=>e.flowData),{licenses:f}=(0,l.SR)(),{edit:{setShowEditModal:b}}=(0,x.ZP)("licenses"),T=e=>{let{licenseId:t}=e,s=f.find(e=>e.id===t);return(0,n.jsx)(r.zx,{id:"edit-license-button",type:"ghost",size:"small",onClick:()=>{let e=Object.assign(new d.Z,{...s});Promise.resolve(i((0,u.jM)(e))).then(()=>b(!0))},children:(0,n.jsx)(r.zx.Icon,{icon:"pen",iconColor:"#9e9e9e"})})},_=(0,n.jsx)(r.JO,{name:"checkmark-small",fill:"#68C441"}),N=e=>g(e.from,e.to,e.hasNotExpiration),I=e=>e.type===h.QU.ESL_CERTIFICATION?"".concat(e.eslCertification," Certification"):j(m,e.type),E=e=>{let t=y(o,e.country),i=e.hasStates;return e.metaData.state?null!==t?"".concat(t,", ").concat(e.metaData.state.name):(0,n.jsx)(C,{}):t&&!i?t:(0,n.jsx)(C,{})};return(0,n.jsx)(r.aV,{children:f.map(e=>(0,n.jsxs)("div",{className:"license-item",children:[(0,n.jsx)(r.aV.Item,{subheader:N(e),title:I(e),description:E(e),action:(0,n.jsx)(T,{licenseId:e.id})}),!t&&(!e.type||e.type===h.QU.TEACHER_QUALIFICATION)&&(0,n.jsxs)("div",{className:"license-details",children:[(0,n.jsx)(r.aV.Item,{leadingIcon:_,iconAlign:"start",description:(0,n.jsxs)("span",{children:[(0,n.jsxs)("span",{className:"bolder",children:["Subjects",(0,n.jsx)("span",{className:"colon",children:": "})]}),e.subjects.length>0?e.subjects.sort().join(", "):(0,n.jsx)(v,{})]})}),(0,n.jsx)(r.aV.Item,{leadingIcon:_,iconAlign:"start",description:(0,n.jsxs)("span",{children:[(0,n.jsxs)("span",{className:"bolder",children:["Grade level",(0,n.jsx)("span",{className:"colon",children:": "})]}),e.grades.length>0?e.grades.sort().join(", "):(0,n.jsx)(v,{})]})})]})]},e.id))})},_=()=>{let e=(0,c.I0)(),{add:{setShowAddModal:t},editMode:{setEditMode:i}}=(0,x.ZP)("licenses");return(0,n.jsxs)("div",{style:{display:"flex",gap:5},children:[(0,n.jsx)(r.zx,{id:"add-license-button",type:"ghost",size:"medium",onClick:()=>{let i=new d.Z;i.type=h.QU.TEACHER_QUALIFICATION,Promise.resolve(e((0,u.jM)(i))).then(()=>t(!0))},children:(0,n.jsx)(r.zx.Icon,{icon:"plus",iconColor:"#9e9e9e"})}),(0,n.jsx)(r.zx,{id:"edit-licenses-button-mobile",type:"ghost",size:"medium",onClick:()=>i(!0),children:(0,n.jsx)(r.zx.Icon,{icon:"pen",iconColor:"#9e9e9e"})})]})};T.defaultProps={hideDetails:!1}},8250:function(e,t,i){var n=i(5893);i(7294);var s=i(9578);let r=e=>{let{id:t,title:i,tip:r,footer:l,iconName:o,buttonText:a,onClick:c}=e;return(0,n.jsxs)("div",{id:t,className:"profile-placeholder",children:[o&&(0,n.jsx)(s.JO,{name:o,width:"32",height:"32",fill:"#9e9e9e"}),(0,n.jsx)("div",{className:"profile-placeholder__title",children:i}),(0,n.jsxs)("div",{className:"profile-placeholder__tip",children:[(0,n.jsx)("span",{className:"bolder",children:"Tip: "}),r]}),(0,n.jsxs)(s.zx,{id:"".concat(t,"-cta"),type:"primary",theme:"ta-teacher",onClick:c,children:[(0,n.jsx)(s.zx.Icon,{icon:"plus"}),(0,n.jsx)(s.zx.Text,{children:a})]}),l&&(0,n.jsx)("div",{className:"profile-placeholder__tip",children:(0,n.jsx)("span",{children:l})})]})};r.defaultProps={iconName:void 0,footer:void 0},t.Z=r}}]);
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.