1import{i as f,r as c,u as o,j as e,a as m,y as g,e as M,B as $}from"./index-zL53F1Eo.js";const H=(t,n)=>n.replace(/\\?{.*?}/g,i=>{if(i.startsWith("\\"))return i.slice(1);switch(i){case"{yyyy}":return`${t.getFullYear()}`;case"{yy}":return`${t.getFullYear()}`.slice(-2);case"{MM}":return`${t.getMonth()+1}`.padStart(2,"0");case"{dd}":return`${t.getDate()}`.padStart(2,"0");case"{HH}":return`${t.getHours()}`.padStart(2,"0");case"{mm}":return`${t.getMinutes()}`.padStart(2,"0");case"{ss}":return`${t.getSeconds()}`.padStart(2,"0");case"{SSS}":return`${t.getMilliseconds()}`.padStart(3,"0");default:return""}}),V=async()=>(await f.get("/HealthProfessional/GetInvitations")).data,A=async t=>(await f.post("HealthProfessional/SaveEmailInvitation",t)).data;function B(){const t={receiverEmail:"",receiverName:""},[n,i]=c.useState([]),[u,h]=c.useState(t),{receiverEmail:r,receiverName:v}=u,[x,N]=c.useState(!0),[y,p]=c.useState(!1),d=o(s=>s.study.culture),E=o(s=>s.study.checkDisposableEmails),S=o(s=>s.study.whitelistDomains);c.useEffect(()=>{w()},[]);async function w(){const s=await V();i(s.invitations)}async function b(s){s.preventDefault(),p(!0),r&&v&&x&&(await A(u)?(n.push({sentToEmail:r,sentOn:H(new Date,"{dd}-{MM}-{yyyy}")}),i(n),g.success("The invitation was successfully sent."),h(t),p(!1)):g.info(m(d,"ErrorOcurred")))}function j(s){const{name:a,value:l}=s.target;h(D=>({...D,[a]:l}))}async function I(s){const a=s.target.value.trim();var l=M(a);l&&E&&(l=await $(a,S)),N(l)}return e.jsx("main",{className:"mvm-page",children:e.jsx("header",{children:e.jsxs("div",{className:"container",children:[e.jsx("div",{className:"row",children:e.jsx("div",{className:"col-12 col-sm-12",children:e.jsxs("div",{className:"page_content first",children:[e.jsx("h1",{className:"h2",children:"Zorgverlener"}),e.jsx("div",{className:"row mt-4 pt-2",children:e.jsx("div",{className:"col-lg-12 mb-3",children:e.jsx("p",{children:"U kunt hieronder zwangere patiënten/cliënten per e-mail een uitnodiging sturen om haar uit te nodigen mee te doen met Moeders van Morgen.  "})})})]})})}),e.jsx("div",{className:"row",children:e.jsx("div",{className:"col-12 col-sm-12",children:e.jsxs("div",{children:[e.jsx("h1",{className:"h2",children:"Deelneemster uitnodigen"}),e.jsx("div",{className:"row mt-4 pt-2",children:e.jsx("div",{className:"col-lg-12 mb-3",children:e.jsxs("form",{onSubmit:b,children:[e.jsxs("p",{children:[e.jsx("span",{className:"overline mt-4 pt-0 ",children:"E-mailadres"}),e.jsx("input",{className:"form-control",name:"receiverEmail",type:"text",value:r,onChange:j,onBlur:I}),!x&&r&&e.jsx("span",{className:"field-validation-valid text-danger",children:m(d,"EmailAddressInvalid")}),y&&!r&&e.jsx("span",{className:"field-validation-valid text-danger",children:m(d,"EmailAddressInvalid")})]}),e.jsxs("p",{children:[e.jsx("span",{className:"overline mt-4 pt-0 ",children:"Achternaam (meisjesnaam)"}),e.jsx("input",{className:"form-control",name:"receiverName",type:"text",onChange:j,value:v})]}),e.jsx("p",{children:e.jsx("input",{type:"submit",value:"Verzenden",className:"btn btn-primary"})})]})})})]})})}),e.jsx("div",{className:"row",children:e.jsx("div",{className:"col-12 col-sm-12",children:e.jsxs("div",{children:[e.jsx("h1",{className:"h2",children:"Uitgenodigde deelneemsters"}),e.jsx("div",{className:"row mt-4 pt-2",children:e.jsx("div",{className:"col-lg-12 mb-3",children:e.jsxs("table",{className:"table-styled",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"E-mailadres"}),e.jsx("th",{children:"Verstuurd op"})]})}),e.jsx("tbody",{children:n.map((s,a)=>e.jsxs("tr",{children:[e.jsx("td",{style:{align:"left"},children:s.sentToEmail}),e.jsx("td",{style:{align:"left"},children:s.sentOn})]},a))})]})})})]})})})]})})})}export{B as default};
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.