PageSourceSearch

https://med2measure.ai/assets/UploadSignedMOU-DYGj57va.js

js med2measure.ai collected 2026-10-05 13:36:48 UTC 3,944 bytes, 1 lines download raw bytes

1import{aI as k,l as S,r as i,ah as D,j as e,ai as N,G as f,S as h,aj as L,e as t,aW as F,B,T as z,I as P,am as _,aQ as G,a9 as I,b2 as q,bY as K,L as Y,a1 as $,a2 as H,an as J,ac as R,a3 as U}from"./index-1OdJ8VEq.js";import{R as Q}from"./ResetDialog-B77YvgAU.js";import{R as V}from"./CloudUploadOutlined-BqY7l84W.js";import{R as W}from"./FileOutlined-Dg5mH-hS.js";import"./Refresh-Ml4fILrl.js";const ae=()=>{const c=k(),C=S("sSessionId"),d=S(Y),[r,p]=i.useState([]),[g,o]=i.useState({}),[v,m]=i.useState({jAttachmentSize:"",sFileName:"",sMime:"",sb64Content:""}),[j,x]=i.useState(!1),[T,u]=i.useState(!1),{toggleLoading:l}=D(),b=({file:s})=>{if(s.status==="removed")p([]),m({jAttachmentSize:"",sFileName:"",sMime:"",sb64Content:""});else if(!["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"].includes(s.type))o(n=>({...n,arrFileList:t.InvalidFileTypeLabel}));else{const n=new FileReader;n.onloadend=()=>{const M={jAttachmentSize:s.size,sFileName:s.name,sMime:s.type,sb64Content:n.result.split(",")[1]};m(M),p([s]),o(E=>({...E,arrFileList:null}))},n.readAsDataURL(s)}},A=s=>["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"].includes(s.type)?!1:(o(n=>({...n,arrFileList:t.InvalidFileTypeLabel})),F.LIST_IGNORE),y=()=>{p([]),o({}),m({jAttachmentSize:"",sFileName:"",sMime:"",sb64Content:""}),u(!1)},O=()=>{let s={};return r.length===0&&(s.arrFileList=t.SignedMOURequiredLabel),o(s),Object.keys(s).length===0},w=()=>
1{if(O())if(c){x(!0),l(!0);const s={suidSession:C,objAttachment:v,suidDoctor:d==null?void 0:d.suidUser};$("User/UploadSignedMOU",s).then(a=>{l(!1),a.data.apiError.jErrorVal===H.J_API_OK?(J(R,"MOU uploaded successfully"),y()):U(R,a.data.apiError.sErrorMessage)}).catch(a=>{l(!1),console.error(a)}).finally(a=>{x(!1)})}else U("",t.UserOfflineLabel)};return i.useEffect(()=>{c||(l(!1),x(!1))},[c]),e.jsxs(e.Fragment,{children:[e.jsx(N,{elevation:3,sx:{padding:{xs:"8px",sm:"20px"},marginTop:"7px",position:"relative"},children:e.jsxs(f,{container:!0,spacing:3,justifyContent:"space-between",children:[e.jsx(f,{item:!0,xs:12,md:12,children:e.jsxs(h,{spacing:1,sx:{wordBreak:"break-all !important"},children:[e.jsxs(L,{htmlFor:"legal-document",children:[t.UploadSignedMOULabel,e.jsx("span",{className:"mandatory",children:"*"})]}),r.length===0?e.jsx(F.Dragger,{accept:".doc,.docx,.pdf,.xls,.xlsx",fileList:r,onChange:b,beforeUpload:A,maxCount:1,children:e.jsxs(h,{spacing:1,justifyContent:"center",direction:"column",alignItems:"center",children:[e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"50px",height:"50px",borderRadius:"50%",backgroundColor:"#d9d9d9"},children:e.jsx(V,{style:{color:"#595959",fontSize:"30px"}})}),e.jsx("div",{children:e.jsxs(L,{style:{cursor:"pointer"},children:[e.jsx("b",{children:e.jsx("u",{children:t.ClickToUploadLabel})})," ",t.DragAndDropLabel]})})]})}):e.jsxs(B,{display:"flex",alignItems:"center",justifyContent:"flex-start",border:"1px solid #ccc",borderRadius:"3px",padding:"2px 10px",children:[e.jsx(W,{style:{marginRight:"10px"}}),e.jsx(z,{children:r[0].name}),e.jsx(P,{style:{color:"rgb(255 75 79 / 90%)"},onClick:()=>b({file:{status:"removed"}}),children:e.jsx(_,{})})]}),g.arrFileList&&e.jsx(G,{error:!0,children:g.arrFileList})]})}),e.jsx(f,{item:!0,xs:12,children:e.jsxs(h,{direction:"row",spacing:2,justifyContent:"flex-end",children:[e.jsx(I,{disabled:j,onClick:()=>{u(!0)},variant:"outlined",color:"error",children:t.ResetLabel}),e.jsx(q,{children:e.jsx(I,{startIcon:e.jsx(K,{}),disabled:j,variant:"contained",onClick:w,children:t.UploadLabeL})})]})})]})}),T&&e.jsx(Q,{Reset:y,setShowResetFormDialog:u})]})};export{ae 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.