1var ja=Object.defineProperty;var ga=(x,s,l)=>s in x?ja(x,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):x[s]=l;var v=(x,s,l)=>ga(x,typeof s!="symbol"?s+"":s,l);import{r as d,w as be,V as F,U,j as e,R as fa,S as ce,F as u,Q as S,W as Na,X as ut,Y as jt,Z as Ca,_ as ya,$ as Rt,a0 as ve,a1 as va,a2 as ba,T as gt,A as Pa,J as ft,v as V,E as Sa,O as Ra,y as Nt,a3 as Ta,L as wa,a4 as Fa,a5 as Da}from"./index-DP1EdfVr.js";import{c as ka}from"./enquiry-7aRAWRvx.js";/* empty css *//* empty css */import{e as z,g as Ct,h as yt,i as Tt,f as Aa,m as vt,t as bt,a as Be,c as La}from"./Utils-DDhFVWMN.js";import{l as A,_ as Ma,M as le}from"./createClass-kVuj6DsW.js";import{h as Ee}from"./moment-zH0z38ay.js";import{x as Ia}from"./react-datepicker-BZLysaCR.js";import{H as Pt}from"./HtmlParser-Bbw_paQX.js";import{T as oe}from"./Table-sAXoFruL.js";import{C as re,g as Oa,h as Ba,t as Ea}from"./temperature-Bhclty3g.js";/* empty css */import{D as Wa}from"./DetailsBanner-B0zGA_X0.js";import{F as $a}from"./FileModal-BoaEYUJW.js";import{L as _}from"./LogisticButton-BbcQDlnF.js";import{F as St,R as Ha}from"./RateWizardConfirmation-GmPWvm4C.js";import{v as Va}from"./react-select.browser.esm-Kz-Y4OXD.js";import"./sea-tBcLZDPv.js";import"./CustomFileViewer-B6KLT5vU.js";class za extends d.Component{constructor(){super(...arguments);v(this,"state",{compareList:[],isRateBooked:!1,isRateReceived:!1,isRateAccepted:!1,isRateSelected:!1,submittingCharge:!1,acceptedShippingCompany:null,acceptedResponseId:null,negotiateModal:!1,totalRate:"",rateEnquiryId:"",rateEnquiryForwardsRefNo:"",proposedRate:"",responseId:"",rateNegotiationModal:!1,rateDetailsNegotiationModal:!1,orignalPrice:"",remarks:"",submitSpinner:!1,rejectRateModal:!1,description:null,rejectRefNo:"",rejectResponseId:"",selectedDisclaimer:null,fetchNegotiations:!1,fetchingCharges:!1,isRejectingEnquiry:!1,selectedShippingCompany:null});v(this,"handleChange",l=>{let a=l.target.name,r=l.target.value;a==="proposeRate"?this.setState({proposedRate:r}):a==="description"&&this.setState({remarks:r})});v(this,"getFreightCharges",()=>{this.setState({fetchingCharges:!0});const{rateEnquiryRefNo:l,rateEnquiry:a}=this.props,r={rateEnquiryId:a.id,groupRefNo:l||a.refNo};be(U.getChargesByResponseBooking,r,h=>{if(h.data.success){const m=h.data.data.items.charges,j=A.groupBy(m,C=>C.responseId);let p={...j};Object.keys(p).forEach(C=>{const R=p[C];let B=A.groupBy(R,Q=>Q.containerDetailId);p[C]=B}),this.setState({rateList:j,detailRateList:p},()=>{const{containerDetails:C}=this.props;let R=[];j&&Object.keys(j).forEach(L=>{let Y="",de=null,E=null,k=null,y=0,T=null,Pe=null,Se=null,G=null,me=null,Re=null,w=null,he=null,J="",pe=null,q=null,xe=null;
1j[L].forEach(f=>{const M=C==null?void 0:C.find(W=>W.id===f.containerDetailId);if(M){const W=a.cargoType==="LCL"||a.shippingMode==="air"?M.chargeableWeight:M.numberOfContainer;y+=W*f.amount}Y=f.companyName,de=f.validTill,E=f.etd,k=f.status,T=f.shippingCompany,Pe=f.responseId,Se=f.parentResponseId,G=f.rateEnquiryId,me=f.rateEnquiryForwardsRefNo,w=f.freeDays,he=f.disclaimer,J=f.currencyCode,pe=f.chargeableCbm,q=f.kgPerCbm,xe=f.remarks,k===F.accepted&&this.setState({isRateAccepted:!0}),k===F.received&&this.setState({isRateReceived:!0}),k===F.booked&&this.setState({isRateBooked:!0}),k===F.selected&&this.setState({isRateSelected:!0})}),R.push({refNo:L,companyName:Y,totalRate:z(y),validTill:de,etd:E,isOpen:!1,status:k,shippingCompany:T,responseId:Pe,parentResponseId:Se,rateEnquiryForwardsRefNo:me,rateEnquiryId:G,newRate:Re,freeDays:w,disclaimer:he,currencyCode:J,chargeableCBM:pe,kgPerCBM:q,remarks:xe})});const B=R==null?void 0:R.filter(L=>L.status==="Accepted"),Q=R==null?void 0:R.filter(L=>L.status!=="Accepted"),X=[...B,...Q];this.setState({compareList:X,fetchingCharges:!1})})}else this.setState({fetchingCharges:!1})},h=>{this.setState({fetchingCharges:!1})})});v(this,"getValidDays",l=>{if(l){const a=Ee(new Date,"YYYY-MM-DD");return Ee(l,"YYYY-MM-DD").diff(a,"days")+1}
1else return"expired"});v(this,"handleCollapse",l=>{let r=[...this.state.compareList].map((h,m)=>(l===m?h.isOpen=!h.isOpen:h.isOpen=!1,h));this.setState({compareList:r})});v(this,"getContainer",(l,a)=>{const{containerDetails:r,rateEnquiry:h}=this.props,m=r==null?void 0:r.find(j=>j.id===parseInt(l));if(m)return m.containerSize&&a==="size"?m.containerSize.size:a==="size"?`${m.dimensionLength}*${m.dimensionBreadth}*${m.dimensionHeight} ${m.dimensionUnit}`:a==="weight"?m.grossWeightUnit==="Lbs"?m.grossWeight*.4536:m.grossWeight:a==="packageType"?m.packageType:a==="commodity"?m==null?void 0:m.commodity:a==="cbm"?m==null?void 0:m.cbm:m.numberOfContainer});v(this,"calculateTotal",(l,a)=>{let r=this.state.detailRateList[l][a].reduce((h,{amount:m})=>A.round(h,4)+A.round(m,4),0);return z(A.round(r,4))});v(this,"getChargeableWeight",l=>{const{containerDetails:a}=this.props,r=a==null?void 0:a.find(h=>h.id===parseInt(l));return r?r.chargeableWeight+" Kgs":null});v(this,"returnFrightLabel",(l,a)=>{switch(l){case"LCL":return a=="INL"?"Inland Haulage Charge":"Sea Freight";default:return a=="INL"?"Inland Haulage Charge":"Air Freight"}});v(this,"getGlobalReceivedRate",(l,a,r,h)=>{if(l==="air"||h==="LCL")return ka(Object.values(this.state.detailRateList[a])[0],r,h,this.props.rateEnquiry.incotermCode,this.props.rateEnquiry);{console.log(this.state.detailRateList[a],"detail rate list");const j=Object.keys(this.state.detailRateList[a]).map(p=>A.round(parseFloat(this.calculateTotal(a,p))*parseFloat(this.getContainer(p,"number")),4)).reduce((p,C)=>A.round(C,4)+A.round(p,4));return console.log(j,"Total Received rate"),z(A.round(j,4))}});v(this,"renderAirCharges",(l,a,r,h,m,j,p,C)=>e.jsx(fa.Fragment,{children:e.jsx(e.Fragment,{})}));v(this,"renderCharges",(l,a)=>{const{shippingMode:r,cargoType:h}=this.props.rateEnquiry;return Object.keys(this.state.detailRateList[l]).map((m,j)=>e.jsx(e.Fragment,{children:e.jsxs(e.Fragment,{children:[this.state.submitSpinner?e.jsxs("div",{className:"fullWindow-Spinner",children:[e.jsx("div",{children:e.jsx(ce,{color:"white",children:""})}),e.jsx("div",{style:{fontSize:"16px",marginTop:"15px"},children:"Please Wait. Submitting ..."})]}):null,e.jsxs("tr",{style:{background:"#d1e8f8",borderTop:"3px solid #FFF"},children:[e.jsxs("th",{className:"text-center mt-1 rate-charges",scope:"row",children:[e.jsxs("div",{children:[" Size: ",this.getContainer(m,"size")]}),e.jsxs("div",{children:[" Commodity: ",this.getContainer(m,"commodity")]})]}),r==="sea"&&e.jsxs("th",{className:"text-center mt-1 rate-charges",scope:"row",children:["Cargo Type: ",h]}),h!=="LCL"&&e.jsxs("th",{className:"text-center mt-1 rate-charges",scope:"row",children:["No.Of"," ",this.props.rateEnquiry.shippingMode==="air"||this.props.rateEnquiry.cargoType==="LCL"?this.getContainer(m,"packageType"):"Containers",": ",this.getContainer(m,"number")]}),(this.props.rateEnquiry.shippingMode==="air"||this.props.rateEnquiry.cargoType==="LCL")&&e.jsxs("th",{className:"text-center mt-1 rate-charges",scope:"row",children:["Cbm: ",this.getContainer(m,"cbm")]}),this.props.rateEnquiry.shippingMode==="air"||this.props.rateEnquiry.cargoType==="LCL"?e.jsxs("th",{className:"text-center mt-1 rate-charges",scope:"row",children:["Gross Weight: ",this.getContainer(m,"weight")," kg"]}):e.jsx(e.Fragment,{})]}),e.jsx("tr",{children:r!=="air"&&h!=="LCL"?e.jsx("td",{colSpan:"6",className:"p-0",children:e.jsx("div",{className:"row px-2 pt-1 pb-2 mb-2 cborder mx-0",style:{background:"#f3f9ff"},children:this.state.detailRateList[l]&&this.state.detailRateList[l][m]&&Array.isArray(this.state.detailRateList[l][m])&&this.state.detailRateList[l][m].map((p,C)=>e.jsxs("div",{className:"col-3 col-md-3 col-lg-2 d-flex flex-column align-items-start",children:[e.jsxs("strong",{className:"pr-2",style:{fontSize:"12px",marginBottom:"-2px",marginTop:"4px"},children:[p.label,":"," "]}),e.jsxs("span",{children:[z(p.amount)," ",p.isPercent===void 0||p.isPercent===null||p.isPercent===0?p.currencyCode:null,p.isPercent&&p.isPercent===1?"%":null]})]},C))})}):e.jsx("td",{colSpan:"6",className:"p-0",children:e.jsx("div",{className:"row mb-2 mx-0",style:{background:"#f3f9ff"}})})})]})}))})}componentDidMount(){this.getFreightCharges()}render(){const{rateEnquiry:l}=this.props;return e.jsxs("div",{className:"card mt-4 p-0 pb-3",children:[e.jsx("div",{className:"commodityTitlebar default row m-0 p-2",children:e.jsxs("div",{className:"col p-0",children:[e.jsx(u,{className:"mr-2",icon:S})," ",e.jsx("strong",{children:"Choose a quote"})]})}),this.state.fetchingCharges?e.jsx("div",{className:"text-center mt-1",children:e.jsx(ce,{color:"primary",children:""})}):e.jsx(e.Fragment,{children:this.state.compareList.length>0?this.state.compareList.map((a,r)=>
1e.jsxs("div",{className:"p-2",children:[e.jsxs("div",{className:"row m-0 compare-header align-items-center",onClick:h=>this.handleCollapse(r),children:[e.jsxs("div",{className:"col-2 col-md-1 col-lg-1 p-2",children:["Option ",r+1]}),e.jsxs("div",{className:"col-7 col-md-2 col-lg-2",children:[a.shippingCompany,e.jsx("div",{children:a.freeDays?e.jsxs("span",{children:["[ ",a.freeDays," free days ]"]}):null})]}),e.jsxs("div",{className:"col-3 col-md-1 col-lg-2 p-2",children:[this.props.setGlobalRecievedRateCurrency(a.currencyCode),a.currencyCode," ",this.getGlobalReceivedRate(this.props.rateEnquiry.shippingMode,a.refNo,a.chargeableCBM,this.props.rateEnquiry.cargoType)]}),e.jsxs("div",{className:"col-6 col-md-2 p-2",children:[a.etd?this.getValidDays(a.etd)>0?`ETD Expires in: ${this.getValidDays(a.etd)} days`:"ETD Validity Expired":"-",e.jsx("div",{children:a.etd?e.jsxs("span",{children:[" ",a.etd]}):null})]}),e.jsxs("div",{className:"col-6 col-md-2 p-2",children:[this.getValidDays(a.validTill)>0?`Rate Expires in: ${this.getValidDays(a.validTill)} days`:"Rate Validity Expired",e.jsx("div",{children:a.validTill?e.jsxs("span",{children:[" ",a.validTill]}):null})]}),e.jsxs("div",{className:"col-4 col-md-2 col-lg-2 d-flex align-items-center justify-content-end",children:[a.status===F.booked?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"pt- mr-2",children:"BOOKED"}),e.jsx(u,{icon:Na,style:{fontSize:"20px"}})]}):a.status===F.accepted?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"pt- mr-2",children:"ACCEPTED"}),e.jsx(u,{icon:ut,style:{fontSize:"20px"}})]}):a.status===F.selected?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"pt- mr-2",children:"SELECTED"}),e.jsx(u,{icon:ut,style:{fontSize:"20px"}})]}):a.status===F.rejected?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"pt- mr-2",children:"REJECTED"}),e.jsx(u,{icon:jt,style:{fontSize:"20px"}})]}):a.status===F.negotiating?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"pt- mr-2",children:"NEGOTIATING"}),e.jsx(u,{icon:jt,style:{fontSize:"20px"}})]}):null,this.getValidDays(a.validTill)===0||this.getValidDays(a.validTill)<0||this.state.isRateAccepted||a.status===F.rejected?null:e.jsx(e.Fragment,{children:e.jsx("div",{className:"p-2 d-flex",children:e.jsx(e.Fragment,{children:a.status!==F.negotiating?e.jsx("div",{children:e.jsx("button",{onClick:h=>{a.shippingCompany&&this.setState({selectedShippingCompany:a.shippingCompany}),this.props.toggleAcceptModal(h,l.incotermCode,a.responseId,a.parentResponseId,a.rateEnquiryForwardsRefNo,this.getFreightCharges,a.shippingCompany);let m=this.getGlobalReceivedRate(this.props.rateEnquiry.shippingMode,a.responseId,a.chargeableCBM,this.props.rateEnquiry.cargoType);this.props.setGlobalRecievedRate(m)},style:{backgroundColor:"#33bf33",height:"30px",width:"150px",borderRadius:"25px",paddingTop:"2px",paddingLeft:"0px",marginLeft:"5px",marginRight:"5px",color:"#FFF",outline:"none",border:"none",fontWeight:"600"},children:"Click To Accept"})}):null})})})]}),e.jsx("div",{className:"col-3 col-md-1 col-lg-1 p-1",children:e.jsx(u,{icon:a.isOpen?Ca:ya,className:"float-right",style:{width:"40px"}})})]}),e.jsxs(re,{isOpen:a.isOpen,className:"p-2 cborder",children:[e.jsx(oe,{striped:!0,responsive:!0,className:"default",children:e.jsx("tbody",{children:this.state.detailRateList&&this.renderCharges(a.refNo,a.currencyCode)})}),(l.shippingMode==="air"||l.cargoType==="LCL")&&e.jsx(oe,{striped:!0,responsive:!0,style:{margin:"auto",marginTop:"8px"},children:e.jsx("tbody",{children:this.state.detailRateList&&this.renderAirCharges(a.refNo,a.margin,a.currencyCode,a==null?void 0:a.isMarginPercent,a==null?void 0:a.chargeableCBM,l.cargoType,a.kgPerCBM,l.incotermCode)})}),l.cargoType==="LCL"&&l.shippingMode!=="air"&&e.jsxs("div",{className:"d-flex justify-content-end ",children:[e.jsxs("p",{className:"primaryText mr-3 ovalBg",children:["Total Gross Weight: ",Ct(l.containerDetails)]}),e.jsxs("p",{className:"primaryText mr-3 ovalBg",children:["Total Cbm : ",yt(l.containerDetails)]}),e.jsxs("p",{className:"primaryText mr-3 ovalBg",children:[" ","Kg Per CBM: ",a.kgPerCBM??"-"," kg"]}),e.jsxs("p",{className:"primaryText mr-3 ovalBg",children:[" ","Chargeable CBM: ",z(a.chargeableCBM)??"-"," cbm"]})]}),l.shippingMode==="air"&&e.jsxs("div",{className:"d-flex justify-content-end ",children:[e.jsxs("p",{className:"primaryText mr-3 ovalBg",children:["Total Gross Weight: ",Ct
1(l.containerDetails)]}),e.jsxs("p",{className:"primaryText mr-3 ovalBg",children:["Total Cbm : ",yt(l.containerDetails)]}),e.jsxs("p",{className:"primaryText mr-3 ovalBg",children:[" ","Total Chargeable Weight:"," ",z(l==null?void 0:l.totalChargeableWeight)," kgs"]})]}),e.jsxs("div",{className:"w-50",children:[e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Remarks:"}),e.jsx("p",{style:{borderRadius:"12px",wordWrap:"break-word",width:"100%"},children:(a==null?void 0:a.remarks)??"None"})]}),e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Disclaimer:"}),e.jsx("p",{style:{borderRadius:"12px",wordWrap:"break-word",width:"100%"},children:(a==null?void 0:a.disclaimer)??"None"})]})]})]})]})):e.jsx("div",{className:"text-center font-italic raleway-text pt-3",children:"No rates received from sales department yet."})})]})}}const Ua=x=>{var rs,os,cs,ds,ms,hs,ps,xs,us,js,gs,fs,Ns,Cs,ys,vs,bs,Ps,Ss,Rs,Ts,ws,Fs,Ds,ks,As,Ls,Ms,Is,Os,Bs,Es,Ws,$s,Hs,Vs,zs,Us,Ys,Gs,Zs,Ks,_s,Qs,Xs,Js,qs,et,st,tt,at,nt,it,lt,rt,ot;const{rateEnquiry:s,companyCategory:l,statusHistory:a,customerKyc:r,isEULAAccepted:h,isTandCAccepted:m}=x,[j,p]=d.useState(!0),[C,R]=d.useState(!0),[B,Q]=d.useState(!1),[X,L]=d.useState(!1),[Y,de]=d.useState(!0),[E,k]=d.use
1State(!1),[y,T]=d.useState([]),[Pe,Se]=d.useState([]),[G,me]=d.useState(null),[Re,w]=d.useState(!1),[he,J]=d.useState(null),[pe,q]=d.useState(null),[xe,f]=d.useState(null),[M,W]=d.useState(""),[We,wt]=d.useState(!1),[Ft,Za]=d.useState(!0),[Z,ue]=d.useState(),[Dt,je]=d.useState(!0),[$e,ee]=d.useState(""),[kt,Te]=d.useState(),[At,He]=d.useState(),[Lt,we]=d.useState(),[se,Ve]=d.useState([]),[Mt,Fe]=d.useState(),[ze,Ue]=d.useState([]),[ge,Ye]=d.useState([]),[Ka,Ge]=d.useState(),[De,It]=d.useState(!1),[_a,ke]=d.useState(!1),[Ze,Ot]=d.useState(null),[Ke,Bt]=d.useState(!1),[Et,Wt]=d.useState(!1),[$t,Ht]=d.useState(""),[fe,Vt]=d.useState(!1),[te,zt]=d.useState(0),[Ut,Yt]=d.useState(""),[Gt,Zt]=d.useState(0),[Ae,Kt]=d.useState(!1),[_t,_e]=d.useState([]),[Qe,I]=d.useState(!1),[Ne,Qt]=d.useState({supplierCompanyName:"",supplierContactPersonName:"",supplierContactPersonPhone:"",supplierContactPersonEmail:""}),[Xe,Je]=d.useState({}),[Qa,Xa]=d.useState({}),[K,qe]=d.useState({}),[ae,es]=d.useState(0),[ne,ss]=d.useState({}),[Ja,qa]=d.useState(0),[$,Xt]=d.useState({}),[Ce,Le]=d.useState(""),ie=d.useRef();d.useEffect(()=>{if(!(!E||!ie.current)){if(!Ce&&$&&Object.keys($).length>0){const t=Object.keys($)[0],n=$[t];if(n&&Object.keys(n).length>0){const o=Object.keys(n)[0],c=n[o];if(c&&c.length>0){const i=c[0];if(i&&i.shippingCompany){Le(i.shippingCompany);return}}}}Ce&&setTimeout(()=>{ie.current&&ie.current.getFreeDaysData(Ce)},100)}},[E,Ce,$]),d.useEffect(()=>{},[ne]);const[Me,Jt]=d.useState(!1),qt=()=>Me&&e.jsx("div",{className:"container-fluid",children:e.jsxs("div",{className:"row mt-2",children:[e.jsxs("div",{className:"row mt-2",children:[e.jsx("div",{className:"col-md-auto textColor",children:e.jsx("strong",{children:"Country:"})}),e.jsx("div",{className:"col-md-auto pl-0 textColor",children:x.termsAndConditionValue.country.name}),e.jsx("div",{className:"col-md-1"}),e.jsx("div",{className:"col-md-auto textColor",children:e.jsx("strong",{children:"Act:"})}),e.jsx("div",{className:"col textColor pl-0",children:x.termsAndConditionValue.act})]}),e.jsx("div",{className:"row manageModalMaxWidth",style:{maxHeight:"79.6vh"},children:e.jsx("div",{className:"col termConditionBody",children:Pt(x.termsAndConditionValue.termsAndConditions)})})]})}),ea=()=>Ae&&e.jsx("div",{className:"container-fluid",children:e.jsx("div",{className:"row manageModalMaxWidth",style:{maxHeight:"79.6vh"},children:e.jsx("div",{className:"col termConditionBody",children:Pt(x.eulaValue.agreement)})})}),Ie=()=>{Jt(!Me)},ts=()=>{Kt(!Ae)},sa=t=>!(t.jobStatusCode===ft.SERVICE_UNAVAILABLE||t.jobStatusCode===ft.CANNOT_PROCEED),ta=()=>{const t=[...y];t.push({companyName:"",contactPersonName:"",phoneNumberOfContactPerson:"",emailOfContactPerson:"",PiNumber:"",PoNumber:"",pickupAddress:"",choosenSupplier:""}),T(t)},Oe=()=>{It(!De),De===!1&&(we(""),Fe(""),ee(""))},aa=()=>{Te(1)},na=t=>{const n={id:t};be(U.approveBL,n,o=>{o.data.success?(x.refreshBLApproved(t),aa(),V("Success","BL is Approved","success")):V("Error",o.data.message,"error")})},ye=(t,n)=>{Ve([]);const o=n.media.filter(c=>c.collectionName===t);Ve(o),se.length>0&&(we(`${Pa}/${se[0].id}/${se[0].fileName}`),Fe(se[0].fileName.split(".").pop())),Oe()},as=(t,n,o,c,i,g,N)=>{t&&t.stopPropagation(),N&&Le(N),g&&Ot(()=>g);const b=!E;k(b),J(o),q(c),f(i),me(""),b||(W(""),Ue([]),Ye([]),Ge([]),qe({})),ia()},ia=()=>{var n,o,c,i,g,N,b,P;const t=[{companyName:((o=(n=s==null?void 0:s.shipper)==null?void 0:n.personInContact)==null?void 0:o.companyName)||"",contactPersonName:((i=(c=s==null?void 0:s.shipper)==null?void 0:c.personInContact)==null?void 0:i.name)||"",phoneNumberOfContactPerson:((N=(g=s==null?void 0:s.shipper)==null?void 0:g.personInContact)==null?void 0:N.contactNumber)||"",emailOfContactPerson:((P=(b=s==null?void 0:s.shipper)==null?void 0:b.personInContact)==null?void 0:P.emailId)||"",PiNumber:"",PoNumber:"",pickupAddress:"",choosenSupplier:""}];T(t)},ns=t=>{var c;wt(t.target.value==="true");let n=[...n];const o=x.rateEnquiry;if(t.target.value==="true"){const i=o.shipper;i!=null&&(n[0].companyName=i.personInContact.companyName,n[0].contactPersonName=i.personInContact.name,n[0].phoneNumberOfContactPerson=i.personInContact.contactNumber,n[0].emailOfContactPerson=i.personInContact.emailId,n[0].PiNumber="",n[0].PoNumber="",n[0].pickupAddress=(c=o==null?void 0:o.collectionPointCity)==null?void 0:c.name,n[
10].sameShipper=!0)}else n=n.filter(function(i){return!i.sameShipper}),n.length<=0&&n.push({companyName:"",contactPersonName:"",phoneNumberOfContactPerson:"",emailOfContactPerson:"",PiNumber:"",PoNumber:"",pickupAddress:""});T(n)},la=(t,n)=>{const o={exist:!1,index:""};return ge.length>0&&ge.map((c,i)=>{c.index===n&&c.name===t&&(o.exist=!0,o.index=i)}),o},D=(t,n,o)=>{const{name:c,value:i,files:g}=t.target,N=Object.assign([],y);if(c==="Pi"||c==="Po"){Zt(Gt+1),N[n][c]=t.target.files[0];const b=la(c,n);if(b.exist)ze.splice(b.index,1,t.target.files[0]);else{const P=t.target.files[0];if(!P)return;const O=Va(P);if(!O.isValid){V({title:"Warning",text:O==null?void 0:O.text,content:{element:"span",attributes:{innerHTML:O.errorMessage}},icon:"warning"});return}P.push(t.target.files[0]),ge.push({index:n,name:c})}}else if(o==="number"){const b=/^\d+(\.\d*)?$/;(t.target.value===""||b.test(t.target.value))&&(N[n][c]=i,T(N))}else N[n][c]=i,T(N)},ra=()=>{if(G==="EXW"){for(const t of y)if(t.companyName===""||t.contactPersonName===""||t.phoneNumberOfContactPerson===""||t.emailOfContactPerson===""||t.pickupAddress==="")return ue(!0),je(!0),!0}else for(const t of y)if(M===""||t.companyName===""||t.contactPersonName===""||t.phoneNumberOfContactPerson===""||t.emailOfContactPerson==="")return ue(!0),je(!0),!0},oa=(t,n)=>{we(t),Fe(n)},ca=t=>{ke(!0),Oe();const n={description:t.description,rateEnquiryId:t.rateId,timeZone:bt(new Date().toTimeString().slice(9)),timeZoneRegion:Intl.DateTimeFormat().resolvedOptions().timeZone},c=[...x.rateEnquiries].filter(i=>i.id===t.rateId);be(U.requestAmendment,n,i=>{La(i),ke(!1),ee("HBL File"),Te(c[0].hblApprovedByCustomer),He(c[0].id),ye("HBL",c[0])},i=>{ke(!1),Be(i)})},da=(t,n)=>{const o=[...y];o.splice(n,1),T(o)},ma=async t=>{I(!0),w(!0);let n=!1;const o=y.map(i=>i.emailOfContactPerson);if(ra()){V("Warning","Some fields are missing","warning"),I(!1),w(!1);return}try{const i=await Sa(U.emailValidCheckMultiple,{emails:o});o.length>0&&(i.success?(_e([]),I(!1),w(!1)):(_e(g=>{const N=[...g];return i.errorEmails.forEach(P=>{N.includes(P)||N.push(P)}),N.filter(P=>i.errorEmails.includes(P))}),n=!0,I(!1),w(!1))),n?(V("Please enter valid email address.","Email not valid.","error"),ue(!0),je(!1)):(ue(!1),je(!0),ha(t))}catch{V("Error","An error occurred while validating emails.","error")}finally{}},ha=()=>{var o,c;if(!m&&!Ke){V("Warning","Please accept the terms and conditions to continue.","warning");return}w(!0),I(!0);const t=(s==null?void 0:s.shippingMode)==="air"||(s==null?void 0:s.cargoType)==="LCL"?[]:ua(),n=new FormData;n.append("jsonData",JSON.stringify({rateEnquiryId:(o=x.rateEnquiry)==null?void 0:o.id,refNo:(c=x.rateEnquiry)==null?void 0:c.refNo,status:"Accepted",tentativeShippingDate:Ee(M).format("YYYY-MM-DD"),acceptedResponseId:he,acceptedParentResponseId:pe,acceptedRefNo:xe,shipperDetails:y,timeZone:bt(new Date().toTimeString().slice(9)),timeZoneRegion:Intl.DateTimeFormat().resolvedOptions().timeZone,additionalFreeDays:t})),n.append("fileDetails",JSON.stringify(ge)),ze.forEach(i=>n.append("files[]",i)),be(U.updateAcceptRateEnquiryBooking,n,i=>{i.data.success?(Ht(i.data.data.item),Ze&&Ze(),k(!1),T([]),W(""),Ue([]),Ye([]),J(null),q(null),w(!1),I(!1),is()):(w(!1),I(!1),Be(i))},i=>{w(!1),I(!1),Be(i)})},is=()=>{Vt(!fe)},pa=(t,n)=>{const o=[...y];o[n]={...o[n],companyName:"",contactPersonName:"",emailOfContactPerson:"",phoneNumberOfContactPerson:"",pickupAddress:"",choosenSupplier:null,Pi:"",Po:"",PoNumber:"",PiNumber:""},Qt(c=>({...c[n],supplierCompanyName:"",supplierContactPersonName:"",supplierContactPersonPhone:"",supplierContactPersonEmail:""})),T(o),Ge(null)},ls=(t,n,o)=>{const c=`${t}_${n}`;qe(i=>({...i,[c]:o}))},xa=t=>{if(Xt(t),t&&Object.keys(t).length>0){const n=Object.keys(t)[0],o=t[n];if(o&&Object.keys(o).length>0){const c=Object.keys(o)[0],i=o[c];if(i&&i.length>0){const g=i[0];g&&g.shippingCompany&&Le(g.shippingCompany)}}}},ua=()=>{const t=[];return Object.entries(ne).forEach(([n,o])=>{const c=K[`${n}_1`],i=K[`${n}_0`];o.containers.forEach(g=>{c&&t.push({freeDaysId:c.id,containerDetailId:g.id}),i&&t.push({freeDaysId:i.id,containerDetailId:g.id})})}),t};return e.jsxs("div",{className:"countryTable fixed-height-contatiner-rate-wizard",children:[e.jsx("div",{children:s?e.jsxs(e.Fragment,{children:[e.jsx("div",{children:e.jsx(Wa,{rateEnquiry:s,module:"re"})}),e.jsxs("div",{className:"m-3",children:[s.media&&s.media.length>0?e.jsxs("div",{className:"card mt-4 ",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2",icon:S}),e.jsx("strong",{children:"Rate Enquiry Files"})]})}),e.jsx("div",{className:"px-3 pt-2 d-flex flex-wrap",children:Ma.uniqBy(s.media,"collectionName").map(t=>e.jsx(e.Fragment,{children:l==="CAT_CUS"&&t.collectionName==="MBL"?null:e.jsxs("p",{className:"query-ports mb-1",children:[e.jsxs("strong",{children:[t.collectionName," FILE"]}),":",e.jsx(_,{id:"view",text:"View",onClick:()=>{ye(t.collectionName,s),ee(`${t.collectionName} File`),Te(s.hblApprovedByCustomer),He(s.id)}})]})}))})]}):null,e.jsx(e.Fragment,{children:e.jsxs("div",{className:"card mt-4 pb-3",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2"}),e.jsx("strong",{children:"Your Company Information"})]})}),r?e.jsxs("div",{className:"",children:[e.jsx("div",{className:"row no-gutters align-items-baseline mt-3 mx-3",children:e.jsx("div",{className:"col-12 col-md-12 col-lg-12 d-flex flex-wrap",children:e.jsxs("div",{className:"row w-100",children:[e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Company Name :"}),e.jsx("p",{children:r.companyName?r.companyName:"-"})]})}),e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Company Short Name :"}),e.jsx("p",{children:r.companyShortName?r.companyShortName:"-"})]})}),e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Company Type :"}),e.jsx("p",{children:r.companyType?r.companyType:"-"})]})}),e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Country :"}),e.jsx("p",{children:r.country.name?r.country.name:"-"})]})}),e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"City :"}),e.jsx("p",{children:r.cityId?r.cityId:"-"})]})})]})})}),r.users&&r.users.length>0?(rs=r.users)==null?void 0:rs.map((t,n)=>{var o,c,i,g,N,b,P,O,ct,dt,mt,ht,pt,xt;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"query-ports mx-3 my-2",children:e.jsx("strong",{children:"User Information:"})}),e.jsxs("div",{className:"row w-100 no-gutters align-items-baseline mt-1 mx-3",children:[e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Name:"}),e.jsx("p",{children:Tt(t)})]})}),e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Username:"}),e.jsx("p",{children:t!=null&&t.username?` ${t==null?void 0:t.username}`:"-"})]})}),e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Email:"}),e.jsx("p",{children:(o=t==null?void 0:t.personProfile)!=null&&o.personProfileEmails&&((c=t==null?void 0:t.personProfile)==null?void 0:c.personProfileEmails.length)>0?(g=(i=t==null?void 0:t.personProfile)==null?void 0:i.personProfileEmails)==null?void 0:g.map(H=>`${H.emailId}`):((N=t==null?void 0:t.personProfile)==null?void 0:N.personProfileEmails.length)>1?(P=(b=t==null?void 0:t.personProfile)==null?void 0:b.personProfileEmails)==null?void 0:P.map(H=>`${H.emailId},`):"-"})]})}),e.jsx("div",{className:"col-md-4 col-lg-4",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Phone number:"}),e.jsx("p",{children:(O=t==null?void 0:t.personProfile)!=null&&O.personProfileTelephones&&((ct=t==null?void 0:t.personProfile)==null?void 0:ct.personProfileTelephones.length)>0?(mt=(dt=t==null?void 0:t.personProfile)==null?void 0:dt.personProfileTelephones)==null?void 0:mt.map(H=>`${H.phoneNumber}`):((ht=t==null?void 0:t.personProfile)==null?void 0:ht.personProfileTelephones.length)>1?(xt=(pt=t==null?void 0:t.personProfile)==null?void 0:pt.personProfileTelephones)==null?void 0:xt.map(H=>`${H.phoneNumber},`):"-"})]})})]})]})}):null]}):e.jsx("small",{children:"No Data Found"})]})}),e.jsxs("div",{className:"card mt-4 ",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",onClick:()=>R(!C),children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2",icon:C?ve:S}),e.jsx("strong",{children:"Container Details"})]})}),e.jsxs(re,{isOpen:C,children:[e.jsx("div",{className:"px-3 pt-3",children:(os=s==null?void 0:s.containerDetails)==null?void 0:os.map(t=>{var n,o,c;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"row ratingTitlebar align-items-center no-gutters ",children:[e.jsx("div",{className:"col-1 col-md-1 d-flex align-items-center py-2",children:e.jsx("img",{src:t.commodityTypeCode==="GNRL"?Oa:t.commodityTypeCode==="HZMT"?Ba:Ea,alt:"air",height:"35px",width:"35px",className:"bg-transparent"})}),e.jsx("div",{className:"col-5 col-md p-2",children:t.commodityTypeCode==="GNRL"?"General":t.commodityTypeCode==="HZMT"?"Hazardous":"Temperature"}),e.jsx("div",{className:"col-6 col-md p-2",children:t.commodity}),e.jsxs("div",{className:"col-6 col-md p-2",children:[t.numberOfContainer," ",s.shippingMode==="air"||s.cargoType==="LCL"?t.packageType??"Packets":"containers"]}),s.shippingMode==="sea"?e.jsx("div",{className:"col col-md-3 p-2",children:t.containerSize?t.containerSize.size:"-"}):null]}),e.jsx("div",{className:"table-responsive",children:e.jsxs(oe,{bordered:!0,striped:!0,className:"table text-center rateQueryTitle",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[s.shippingMode==="air"?null:e.jsx("th",{children:"Container Size"}),e.jsxs("th",{children:["No. Of"," ",s.shippingMode==="air"||s.cargoType==="LCL"?t.packageType??"Packets":"containers"]}),e.jsx("th",{children:"Gross Weight"}),s.shippingMode==="air"||s.cargoType==="LCL"||t.dimensionLength!=null?e.jsx("th",{children:"Dimension"}):null,e.jsx("th",{children:"Commodity Type"}),(n=s==null?void 0:s.containerDetails)!=null&&n.map(i=>i.commodityTypeCode).some(i=>i=="TEMP")?e.jsx("th",{children:"Humidity"}):null,e.jsx("th",{children:"Commodity"}),t.commodityTypeCode==="HZMT"?e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"File"}),e.jsx("th",{children:"UN Number"}),e.jsx("th",{children:"DG Class"})]}):null,t.commodityTypeCode==="TEMP"?e.jsx(e.Fragment,{children:e.jsx("th",{children:"Temperature"})}):null]})}),e.jsx("tbody",{children:e.jsxs("tr",{children:[s.shippingMode==="air"?null:e.jsx("td",{children:s.cargoType==="LCL"?"LCL":(o=t.containerSize)==null?void 0:o.size}),e.jsx("td",{children:t.numberOfContainer}),e.jsx("td",{children:t.grossWeight?e.jsxs("span",{children:[t.grossWeight," ",t.grossWeightUnit]}):"-"}),s.shippingMode==="air"||s.cargoType==="LCL"||t.dimensionLength!=null?e.jsxs("td",{children:[t.dimensionLength?`${t.dimensionLength}*${t.dimensionBreadth}*${t.dimensionHeight}`:"-"," ",t.dimensionUnit?t.dimensionUnit:null]}):null,e.jsxs("td",{children:[" ",t.commodityTypeCode==="GNRL"?"General":t.commodityTypeCode==="HZMT"?"Hazardous":"Temperature"]}),(c=s==null?void 0:s.containerDetails)!=null&&c.map(i=>i.commodityTypeCode).some(i=>i=="TEMP")?e.jsx("td",{children:t.humidity??"-"}):null,e.jsx("td",{children:t.commodity}),t.commodityTypeCode==="HZMT"?e.jsxs(e.Fragment,{children:[e.jsx("td",{children:t.media&&t.media.length>0?e.jsx(e.Fragment,{children:e.jsx(_,{id:"view",text:"View",className:"btnSm",onClick:()=>{ee("Hazard File"),ye("MSDS",t)}})}):"-"}),e.jsx("td",{children:t.unNumber?t.unNumber:"-"}),e.jsx("td",{children:t.imoCode?t.dgClass.name:"-"})]}):null,t.commodityTypeCode==="TEMP"?e.jsx(e.Fragment,{children:e.jsx("td",{children:t.temperature?`${t.temperature} ${t.temperatureUnit}`:"-"})}):null]})})]})})]})})}),s.shippingMode==="air"&&e.jsx("div",{className:"d-flex justify-content-end ",children:e.jsxs("p",{className:"primaryText mr-3 ovalBg",children:[" ","Total Chargeable Weight:"," ",z(s.totalChargeableWeight)," kgs"]})})]})]}),va.FFD===ba()&&s.isPotentialCustomer&&s.isPotentialCustomer===1?e.jsxs("div",{className:"card mt-4 ",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2",icon:S}),e.jsx("strong",{children:"Potential Customer Information"})]})}),e.jsxs("div",{className:"px-3 pt-2",children:[e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col-md-4 query-ports pl-4",children:[e.jsx("strong",{children:"Company Name: "}),e.jsx("p",{children:s.pCustomerCompanyName})]}),e.jsxs("div",{className:"col-md-4 query-ports text-center",children:[e.jsx("strong",{children:"Company Address: "}),e.jsx("p",{children:s.pCustomerCompanyAddress})]}),e.jsxs("div",{className:"col-md-4 query-ports",children:[e.jsx("strong",{children:"Company Contact Person: "}),e.jsx("p",{children:s.pCustomerCompanyContactPerson})]})]}),e.jsxs("div",{className:"row mt-2 mb-3",children:[e.jsxs("div",{className:"col-md-4 query-ports pl-4",children:[e.jsx("strong",{children:"Company Contact Email: "}),e.jsx("p",{children:s.pCustomerCompanyContactEmail})]}),e.jsx("div",{className:"col-md-4 query-ports"}),e.jsxs("div",{className:"col-md-4 query-ports",children:[e.jsx("strong",{children:"Company Contact Phone: "}),e.jsx("p",{children:s.pCustomerCompanyContactPhone})]})]}),s.pRemarks&&s.pRemarks!==""?e.jsx("div",{className:"row no-gutters align-items-baseline mb-3",children:e.jsx("div",{className:"col-md-12 col-lg-12",children:e.jsxs("div",{className:"query-ports flex-wrap",children:[e.jsx("strong",{className:"w-100",children:"Remarks"}),e.jsx("p",{style:{borderRadius:"unset",wordWrap:"break-word",width:"100%"},children:s.pRemarks})]})})}):null]})]}):null,((cs=s.supplierDetails)==null?void 0:cs.length)>
10?e.jsxs("div",{className:"card mt-4 ",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2",icon:S}),e.jsx("strong",{children:"Supplier Details"})]})}),e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Tentative Shipment Date :"}),e.jsx("p",{children:Aa(s.tentativeShipmentDate)})]}),e.jsxs(oe,{striped:!0,bordered:!0,className:"table-responsive mt-2 mb-0",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-center",children:[e.jsx("th",{className:"text-white",children:"Company "}),e.jsx("th",{className:"text-white",children:"Contact Person Name"}),e.jsx("th",{className:"text-white",children:"Contact Phone Number"}),e.jsx("th",{className:"text-white",children:"Contact Email Id"}),e.jsx("th",{className:"text-white",children:"PO Number"}),e.jsx("th",{className:"text-white",children:"PI Number"}),s.incotermCode=="EXW"?e.jsx("th",{className:"text-white",children:"Pickup Address"}):null]})}),e.jsx("tbody",{children:s.supplierDetails.map(t=>e.jsxs("tr",{children:[e.jsxs("td",{children:[" ",t.companyName]}),e.jsx("td",{children:t.contactPersonName?t.contactPersonName:"-"}),e.jsx("td",{children:t.phoneNumberOfContactPerson?t.phoneNumberOfContactPerson:"-"}),e.jsx("td",{children:t.emailOfContactPerson?t.emailOfContactPerson:"-"}),e.jsxs("td",{children:[" ",t.poNumber?t.poNumber:"-"]}),e.jsxs("td",{children:[" ",t.piNumber?t.piNumber:"-"]}),s.incotermCode=="EXW"?e.jsx("td",{children:t.pickupAddress}):null]}))})]})]})]}):null,e.jsx(e.Fragment,{children:e.jsxs("div",{className:"card mt-4 pb-3",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",onClick:()=>Q(!B),children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2",icon:B?ve:S})," ",e.jsx("strong",{children:"Shipping Details"})]})}),e.jsxs(re,{isOpen:B,className:"submenu_toggler",children:[e.jsx("div",{className:"",children:e.jsx("div",{className:"row no-gutters align-items-baseline mt-3 mx-3",children:e.jsx("div",{className:"col-12 col-md-12 col-lg-12 d-flex flex-wrap",children:e.jsxs("div",{className:"row w-100",children:[e.jsxs("div",{className:"col-md-6 col-lg-6",children:[s!=null&&s.collectionPointCityId?e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Collection Point :"}),e.jsxs("p",{children:[s==null?void 0:s.collectionPointCityId,","," ",(ds=s==null?void 0:s.originCountry)==null?void 0:ds.name]})]}):null,s!=null&&s.collectionPointAddressLine?e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Collection Point Address Line:"}),e.jsx("p",{children:s==null?void 0:s.collectionPointAddressLine})]}
1):null,s.collectionPointCityId===null&&s.loadingPort===null?e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Origin Country:"}),e.jsx("p",{children:(ms=s==null?void 0:s.originCountry)==null?void 0:ms.name})]}):null]}),e.jsxs("div",{className:"col-md-6 col-lg-6",children:[s!=null&&s.deliveryPointCityId?e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Delivery Point:"}),e.jsxs("p",{children:[s==null?void 0:s.deliveryPointCityId,","," ",(hs=s==null?void 0:s.destinationCountry)==null?void 0:hs.name]})]}):null,s!=null&&s.deliveryPointAddressLine?e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Delivery Point Address Line:"}),e.jsx("p",{children:s==null?void 0:s.deliveryPointAddressLine})]}):null]}),e.jsx("div",{className:"col-md-6 col-lg-6",children:(ps=s==null?void 0:s.loadingPort)!=null&&ps.name?e.jsxs("div",{className:"query-ports",children:[e.jsxs("strong",{children:[s.shippingMode==="sea"?"Port":"Airport"," Of Loading:"," "]}),e.jsxs("p",{children:[(xs=s==null?void 0:s.loadingPort)==null?void 0:xs.name,","," ",(us=s==null?void 0:s.originCountry)==null?void 0:us.name]})]}):null}),e.jsx("div",{className:"col-md-6 col-lg-6",children:(js=s==null?void 0:s.dischargePort)!=null&&js.name?e.jsxs("div",{className:"query-ports",children:[e.jsxs("strong",{children:[s.shippingMode==="sea"?"Port":"Airport"," Of Discharge:"," "]}),e.jsxs("p",{children:[(gs=s==null?void 0:s.dischargePort)==null?void 0:gs.name,","," ",(fs=s==null?void 0:s.destinationCountry)==null?void 0:fs.name]})]}):null}),e.jsx("div",{className:"col-md-6 col-lg-6",children:s!=null&&s.originCustomPoint?e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Origin Custom Point: "}),e.jsxs("p",{children:[s==null?void 0:s.originCustomPoint," "]})]}):null}),e.jsx("div",{className:"col-md-6 col-lg-6",children:s!=null&&s.destinationCustomPoint?e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Origin Custom Point: "}),e.jsxs("p",{children:[s==null?void 0:s.destinationCustomPoint," "]})]}):null})]})})})}),s.finalPlaceOfDelivery&&s.finalPlaceOfDelivery!==""?e.jsx("div",{className:"row no-gutters align-items-baseline mt-3 mx-3",children:e.jsx("div",{className:"col-md-12 col-lg-12",children:e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Final Place of Delivery: "}),e.jsx("p",{children:s.finalPlaceOfDelivery})]})})}):null,(s==null?void 0:s.additionalDescription)&&e.jsx("div",{className:"row no-gutters align-items-baseline mt-3 mx-3",children:e.jsx("div",{className:"col-md-12 col-lg-12",children:e.jsxs("div",{className:"query-ports flex-wrap",children:[e.jsx("strong",{className:"w-100",children:"Additional Description"}),e.jsx("p",{style:{borderRadius:"unset",wordWrap:"break-word",width:"100%"},children:s.additionalDescription})]})})})]})]})}),s.vendor!=null?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"card mt-4 pb-3",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2",icon:S})," ",e.jsx("strong",{children:"Vendor Details"})]})}),e.jsx("div",{className:"",children:e.jsx("div",{className:"row no-gutters align-items-baseline mt-3 mx-3",children:e.jsx("div",{className:"col-12 col-md-12 col-lg-12 d-flex flex-wrap",children:e.jsx("div",{className:"row w-100",children:e.jsxs("div",{className:"col-md-6 col-lg-6",children:[e.jsxs("div",{className:"query-ports",children:[e.jsxs("strong",{children:[s.vendor.isManual?"Email":"Username"," "]}),":",s.vendor.isManual?s.vendor.email:e.jsxs("p",{children:[s.vendor.username," ( ",s.vendor.email," )"]})]}),s.vendor.isManual?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Company "}),":",e.jsx("p",{children:(Cs=(Ns=s.vendor)==null?void 0:Ns.company)==null?void 0:Cs.companyName})]}),e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Address "}),":",e.jsxs("p",{children:[(vs=(ys=s.vendor)==null?void 0:ys.company)==null?void 0:vs.cityId," ,"," ",(Ps=(bs=s.vendor)==null?void 0:bs.company)==null?void 0:Ps.countryCode]})]}),e.jsxs("div",{className:"query-ports",children:[e.jsx("strong",{children:"Company Website"}),":",e.jsx("p",{children:(Rs=(Ss=s.vendor)==null?void 0:Ss.company)==null?void 0:Rs.companyWebsite})]})]})]})})})})})]})}):null,e.jsxs("div",{className:"card mt-4 pb-3",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",onClick:()=>L(!X),children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2",icon:X?ve:S})," ",e.jsx("strong",{children:"Status History"})]})}),e.jsx(re,{isOpen:X,children:e.jsx("div",{className:"table-responsive px-2 mt-2",children:e.jsxs(oe,{bordered:!0,striped:!0,children:[e.jsx("thead",{className:"table-info text-white",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Remarks"}),e.jsx("th",{children:"Extra Fields"}),e.jsx("th",{children:"Name"}),e.jsx("th",{children:"User Timezone"}),e.jsx("th",{children:"Files"})]})}),e.jsx("tbody",{children:a==null?void 0:a.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("strong",{children:t.name})}),e.jsx("td",{children:t.remarks}),e.jsx("td",{children:e.jsx("ul",{className:"list-group list-group-flush",style:{minWidth:"152px"},children:t.label?t.label.map((n,o)=>e.jsx("li",{className:"list-group-item p-1 text-left",children:e.jsxs("small",{style:{lineHeight:"1.2",dis
1play:"block"},children:[e.jsx("b",{children:n.field==="Remarks"?null:`${n.field}:`})," ",e.jsx("div",{children:n.field==="Tentative Connection Date"||n.field==="Tentative Arrival Date"?vt.utc(n.value).local().format("ddd, MMMM Do YYYY, h:mm a"):n.value})]})})):null})}),e.jsx("td",{children:t.fullName}),e.jsxs("td",{children:[e.jsx("span",{children:vt.utc(t.createdAt,null).tz(t.timeZoneRegion).format("ddd, MMMM Do YYYY, h:mm a")}),e.jsx("div",{className:"timeZone-chip",children:t.timeZoneRegion})]}),e.jsx("td",{children:t.media&&t.media.length>0?e.jsx("div",{children:e.jsx(_,{id:"view",text:"View",className:"btnSm",onClick:()=>{ee(`${t.status} File`),ye(t.status,t)}})}):"-"})]}))})]})})})]}),(s.receiver||s.shipper)&&e.jsxs("div",{className:"card mt-4 pb-3",children:[e.jsx("div",{className:"commodityTitlebar default row m-0",onClick:()=>de(!Y),children:e.jsxs("div",{className:"col",children:[e.jsx(u,{className:"mr-2",icon:Y?ve:S}),e.jsx("strong",{children:"Shipper and Receiver Details"})]})}),e.jsx(re,{isOpen:Y,children:e.jsxs("div",{className:"row mt-2 p-3",children:[e.jsxs("div",{className:"col-md-6",children:[(ws=(Ts=s==null?void 0:s.shipper)==null?void 0:Ts.personInContact)!=null&&ws.companyName?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"collectionCountry",className:"mb-0",children:e.jsx("strong",{children:"Shipper"})}),e.jsx("input",{type:"text",className:"form-control",value:(Ds=(Fs=s==null?void 0:s.shipper)==null?void 0:Fs.personInContact)==null?void 0:Ds.companyName,disabled:!0})]}):null,(As=(ks=s==null?void 0:s.shipper)==null?void 0:ks.personInContact)!=null&&As.name?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"collectionCountry",className:"mb-0",children:e.jsx("strong",{children:"Shipper Person"})}),e.jsx("input",{type:"text",className:"form-control",value:(Ms=(Ls=s==null?void 0:s.shipper)==null?void 0:Ls.personInContact)==null?void 0:Ms.name,disabled:!0})]}):null,(Os=(Is=s==null?void 0:s.shipper)==null?void 0:Is.personInContact)!=null&&Os.emailId?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"collectionCountry",className:"mb-0",children:e.jsx("strong",{children:"Shipper Email"})}),e.jsx("input",{type:"text",className:"form-control",value:(Es=(Bs=s==null?void 0:s.shipper)==null?void 0:Bs.personInContact)==null?void 0:Es.emailId,disabled:!0})]}):null,($s=(Ws=s==null?void 0:s.shipper)==null?void 0:Ws.personInContact)!=null&&$s.contactNumber?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"collectionCountry",className:"mb-0",children:e.jsx("strong",{children:"Shipper Contact No"})}),e.jsx("input",{type:"text",className:"form-control",value:(Vs=(Hs=s==null?void 0:s.shipper)==null?void 0:Hs.personInContact)==null?void 0:Vs.contactNumber,disabled:!0})]}):null]}),e.jsxs("div",{className:"col-md-6",children:[(Us=(zs=s==null?void 0:s.receiver)==null?void 0:zs.personInContact)!=null&&Us.companyName?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"collectionCountry",className:"mb-0",children:e.jsx("strong",{children:"Receiver"})}),e.jsx("input",{type:"text",className:"form-control",value:(Gs=(Ys=s==null?void 0:s.receiver)==null?void 0:Ys.personInContact)==null?void 0:Gs.companyName,disabled:!0})]}):null,(Ks=(Zs=s==null?void 0:s.receiver)==null?void 0:Zs.personInContact)!=null&&Ks.name?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"collectionCountry",className:"mb-0",children:e.jsx("strong",{children:"Receiver Person"})}),e.jsx("input",{type:"text",className:"form-control",value:(Qs=(_s=s==null?void 0:s.receiver)==null?void 0:_s.personInContact)==null?void 0:Qs.name,disabled:!0})]}):null,(Js=(Xs=s==null?void 0:s.receiver)==null?void 0:Xs.personInContact)!=null&&Js.emailId?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"collectionCountry",className:"mb-0",children:e.jsx("strong",{children:"Receiver Email"})}),e.jsx("input",{type:"text",className:"form-control",value:(et=(qs=s==null?void 0:s.receiver)==null?void 0:qs.personInContact)==null?void 0:et.emailId,disabled:!0})]}):null,(tt=(st=s==null?void 0:s.receiver)==null?void 0:st.personInContact)!=null&&tt.contactNumber?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"collectionCountry",className:"mb-0",children:e.jsx("strong",{children:"Receiver Contact No"})}),e.jsx("input",{type:"text",className:"form-control",value:(nt=(at=s==null?void 0:s.receiver)==null?void 0:at.personInContact)==null?void 0:nt.contactNumber,disabled:!0})]}):null]})]})})]}),(s==null?void 0:s.isCancelled)==1?e.jsxs(e.Fragment,{children:[" ",e.jsx("br",{}),e.jsxs("div",{className:"timeZone-chip",style:{backgroundColor:"#e80d3f"},children:[" ","Cancelled Enquiry"," "]})]}):e.jsx(e.Fragment,{children:sa(s)&&e.jsx(za,{user:"sales",rateEnquiry:s,containerDetails:s.
1containerDetails,toggleAcceptModal:as,bookingResponse:!0,setGlobalRecievedRate:zt,setGlobalRecievedRateCurrency:Yt,isEULAAccepted:h,isTandCAccepted:m,handleDetailRateList:xa})})]})]}):e.jsx("div",{className:"text-center",children:e.jsx(ce,{color:"primary",className:"mt-2",children:""})})}),(s==null?void 0:s.shippingMode)==="sea"&&(s==null?void 0:s.cargoType)!=="LCL"&&e.jsx("div",{style:{display:"none"},children:e.jsx(St,{rateEnquiry:s,currentTotal:te,setGroupedContainers:ss,finalTotal:te+ae,groupedContainers:ne,selectedFreeDays:K,handleFreeDaysSelection:ls,freeDaysData:Xe,setFreeDaysData:Je,detailRateList:$,totalFreeDaysCharges:ae,setTotalFreeDaysCharges:es,carouselConfirmationModal:fe,ref:ie})}),e.jsx(le,{modal:E&&!!y,size:"xl",modalHeader:"Accept this Quote?",toggleModal:as,modalBody:e.jsxs("div",{className:"acceptModalShipperDetails",style:{maxWidth:"100%"},children:[e.jsxs("div",{className:"row sectionDiv",children:[e.jsx("div",{className:"col-12 p-0",children:e.jsx("label",{children:e.jsxs("strong",{className:"p-2",children:[e.jsx(u,{className:"mr-2",icon:S}),"Actual Shipment Date"]})})}),e.jsx("div",{className:"col-12",children:e.jsx(Ia,{className:Z&&M==""?"datepick warn ex-work-texts":"datepick ex-work-texts",todayButton:"Today",showMonthDropdown:!0,showYearDropdown:!0,shouldCloseOnSelect:!1,selected:M,onChange:t=>W(t),placeholderText:"MM-DD-YYY",minDate:new Date})})]}),e.jsx("div",{className:"row",children:G==="EXW"?e.jsxs("div",{className:"sectionDiv",children:[e.jsx("div",{className:"col-12 p-0",children:e.jsx("label",{children:e.jsxs("strong",{className:"p-2",children:[e.jsx(u,{className:"mr-2",icon:S}),"Is supplier details same as shipper details?"]})})}),e.jsxs("div",{className:"row m-0",children:[e.jsx("div",{className:"col-md-6",children:e.jsxs("div",{className:"d-flex align-items-center",children:[e.jsx("input",{id:"yesShipper",type:"radio",name:"sameShipper",value:!0,checked:We,onChange:ns}),e.jsx("label",{className:"radio-icon",htmlFor:"yesShipper",children:"Yes"})]})}),e.jsx("div",{className:"col-md-6",children:e.jsxs("div",{className:"d-flex align-items-center",children:[e.jsx("input",{id:"noShipper",type:"radio",name:"sameShipper",value:!1,checked:!We,onChange:ns}),e.jsx("label",{className:"radio-icon",htmlFor:"noShipper",children:"No"})]})})]})]}):null}),y&&Ft?y.map((t,n)=>{var o,c;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"row sectionDiv ",children:[e.jsx("div",{className:"col-12 p-0",children:e.jsx("label",{children:e.jsxs("strong",{className:"p-2",children:[e.jsx(u,{className:"mr-2",icon:S}),t!=null&&t.companyName?t.companyName:""," Supplier Information"]})})}),e.jsx("div",{className:"col-12 d-flex align-items-center justify-content-end",children:e.jsx("button",{className:"btn btn-danger px-2 py-1",onClick:()=>pa(t,n),children:"Reset"})}),e.jsxs("div",{className:"col-12",children:[e.jsx("label",{children:"Company Name"}),e.jsx("input",{type:"text",name:"companyName",className:Z&&t.companyName==""?"form-control warn":"form-control",value:n===0?(t==null?void 0:t.companyName)!==""?t.companyName:Ne.supplierCompanyName||"":t.companyName||"",onChange:i=>D(i,n)})]}),e.jsxs("div",{className:"col-12 col-md-4",children:[e.jsx("label",{children:"Contact Person Name"}),e.jsx("input",{type:"text",name:"contactPersonName",className:Z&&t.contactPersonName==""?"form-control warn":"form-control",value:n===0?(t==null?void 0:t.contactPersonName)!==""?t.contactPersonName:Ne.supplierContactPersonName||"":t.contactPersonName||"",onChange:i=>D(i,n)})]}),e.jsxs("div",{className:"col-12 col-md-4",children:[e.jsx("label",{children:"Contact Person Phone Number"}),e.jsx("input",{name:"phoneNumberOfContactPerson",className:Z&&t.phoneNumberOfContactPerson==""?"form-control warn":"form-control",value:n===0?(t==null?void 0:t.phoneNumberOfContactPerson)!==""?t.phoneNumberOfContactPerson:Ne.supplierContactPersonPhone||"":t.phoneNumberOfContactPerson||"",onChange:i=>D(i,n,"number")})]}),e.jsxs("div",{className:"col-12 col-md-4",children:[e.jsx("label",{children:"Contact Person Email Address"}),e.jsx("input",{type:"email",name:"emailOfContactPerson",className:Z&&t.emailOfContactPerson==""||Z&&Dt==!1&&_t.includes(t.emailOfContactPerson)?"form-control warn":"form-control",value:n===0?(t==null?void 0:t.emailOfContactPerson)!==""?t.emailOfContactPerson:Ne.supplierContactPersonEmail||"":t.emailOfContactPerson||"",onChange:i=>D(i,n)})]}),e.jsxs("div",{className:"col-12 col-md-6",children:[e.jsxs("label",{children:["PI Number ",e.jsx("small",{children:"(optional)"})]}),e.jsx("input",{type:"text",name:"PiNumber",className:"form-control ",value:t.PiNumber,onChange:i=>D(i,n)})]}),e.jsxs("div",{className:"col-12 col-md-6",children:[e.jsxs("label",{children:["Upload PI File ",e.jsx("small",{children:"(optional)"})]}),e.jsx("div",{className:"w-100 bg-white",children:e.jsxs("div",{className:"input-group rounded-0 form-control",children:[e.jsx("input",{type:"file",name:"Pi",id:`PiFile${n}`,className:"inputfile",onChange:i=>D(i,n)}),e.jsxs("label",{htmlFor:`PiFile${n}`,className:"label-file-kyc-css",children:[e.jsx("span",{id:"file-name",className:"file-box-kyc pt-0",children:t.Pi?(o=t.Pi)==null?void 0:o.name:"Choose File"}),e.jsx("span",{className:"file-button rounded-0 mt-1",children:e.jsx(u,{icon:gt,className:"uploadBtn mr-2"})})]})]})})]}),e.jsxs("div",{className:"col-12 col-md-6",children:[e.jsxs("label",{children:["PO Number ",e.jsx("small",{children:"(optional)"})]}),e.jsx("input",{type:"text",name:"PoNumber",className:"form-control ",value:t.PoNumber,onChange:i=>D(i,n)})]}),e.jsxs("div",{className:"col-12 col-md-6",children:[e.jsxs("label",{children:["Upload PO File ",e.jsx("small",{children:"(optional)"})," "]}),e.jsx("div",{className:"w-100 bg-white",children:e.jsxs("div",{className:"input-group rounded-0 form-control",children:[e.jsx("input",{type:"file",name:"Po",id:`PoFile${n}`,className:"inputfile",onChange:i=>D(i,n)}),e.jsx("input",{type:"file",id:`PoFile${n}`,"aria-describedby":"inputGroupFileAddon01",name:"Po",className:"inputfile",onChange:i=>D(i,n)}),e.jsxs("label",{htmlFor:`PoFile${n}`,className:"label-file-kyc-css",children:[e.jsx("span",{id:"file-name",className:"file-box-kyc pt-0",children:t.Po?(c=t.Po)==null?void 0:c.name:"Choose File"}),e.jsx("span",{className:"file-button rounded-0 ",style:{marginTop:"2px"},children:e.jsx(u,{icon:gt,className:"uploadBtn mr-2"})})]})]})})]}),G==="EXW"?e.jsxs("div",{className:"col-12 col-md-12",children:[e.jsx("label",{children:"Pickup Address"}),e.jsx("input",{type:"text",name:"pickupAddress",className:"form-control ",value:t.pickupAddress,onChange:i=>D(i,n)})]}):null,(y==null?void 0:y.length)>1?e.jsx("div",{className:"col-12 col-md-12 d-flex justify-content-end pt-1",children:e.jsx(_,{id:"delete",text:"Delete",onClick:i=>da(i,n)})}):null]})})}):null,e.jsx("div",{className:"row p-2",children:e.jsx("div",{className:"col",children:e.jsx(_,{id:"add",text:"Another Supplier",className:"addDetailRateWizard float-right",onClick:()=>ta()})})}),(s==null?void 0:s.shippingMode)==="sea"&&(s==null?void 0:s.cargoType)!=="LCL"&&e.jsxs("div",{className:"row sectionDiv",children:[e.jsx("div",{className:"col-12 p-0",children:e.jsx("label",{children:e.jsxs("strong",{className:"p-2",children:[e.jsx(u,{className:"mr-2",icon:S}),"Additional Free Days Charges"]})})}),e.jsx("div",{className:"col-12",children:e.jsx(St,{rateEnquiry:s,currentTotal:te,setGroupedContainers:ss,finalTotal:te+ae,groupedContainers:ne,selectedFreeDays:K,handleFreeDaysSelection:ls,freeDaysData:Xe,setFreeDaysData:Je,detailRateList:$,totalFreeDaysCharges:ae,setTotalFreeDaysCharges:es,carouselConfirmationModal:fe,ref:ie})})]}),e.jsxs("div",{className:"row sectionDiv p-2",children:[e.jsx("div",{className:"col-md-10",children:e.jsx("label",{className:"mt-2",children:"Is your information on the detail page all correct?"})}),e.jsx("div",{className:"col-md-2",children:e.jsx("input",{type:"checkbox",checked:!0,className:"ml-4 mt-2"})})]}),m?e.jsx(e.Fragment,{}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"row sectionDiv p-2",children:[e.jsx("div",{className:"col-md-10",children:h?e.jsx(e.Fragment,{children:e.jsxs("label",{className:"mt-2",children:["By accepting this, you agree to be bound by the"," ",e.jsx("u",{children:e.jsx("strong",{style:{cursor:"pointer"},onClick:Ie,children:"Terms and Conditions"})})," ","of ",(lt=(it=x==null?void 0:x.termsAndConditionValue)==null?void 0:it.parentCompanyData[0])==null?void 0:lt.companyName,"."]})}):e.jsx(e.Fragment,{children:e.jsxs("label",{className:"mt-2",children:["By accepting this, you agree to be bound by the"," ",e.jsx("u",{children:e.jsx("strong",{style:{cursor:"pointer"},onClick:Ie,children:"Terms and Conditions"})})," ","of ",(ot=(rt=x==null?void 0:x.termsAndConditionValue)==null?void 0:rt.parentCompanyData[0])==null?void 0:ot.companyName," and"," ",e.jsx("u",{children:e.jsx("strong",{style:{cursor:"pointer"},onClick:ts,children:"End User License Agreement (EULA)"})})," ","for Impexo Software."]})})}),e.jsx("div",{className:"col-md-2",children:e.jsx("input",{type:"checkbox",className:"ml-4 mt-2",checked:Ke,onClick:t=>Bt(t.target.checked)})})]})}),e.jsxs("div",{className:"row sectionDiv p-2",children:[e.jsx("div",{className:"col-md-10",children:e.jsx("label",{className:"mt-2",children:"All my customer and user information is correct."})}),e.jsx("div",{className:"col-md-2",children:e.jsx("input",{type:"checkbox",className:"ml-4 mt-2",checked:Et,onClick:t=>Wt(t.target.checked)})})]})]}),modalFooter:e.jsx(_,{id:"submit",className:"button-search float-right ml-auto",text:Qe?e.jsx(ce,{className:"text-center",size:"sm",children:""}):"Accept",disabled:Qe||Re,onClick:t=>{ma(Ra.accept)}})}),e.jsx(le,{modal:De,size:"xl",modalHeader:$e,toggleModal:Oe,modalBody:e.jsx($a,{currentEnqHBLApproveStatus:x.currentEnqHBLApproveStatus,amendmentRequired:!0,requestAmendment:ca,approveBL:na,rateEnquiryId:At,modalHeader:$e,hblApprovedByCustomer:kt,modalFile:Lt,modalFileExtension:Mt,carouselFiles:se,handleOnClickCarouselList:oa})}),e.jsx(le,{modal:fe,size:"xl",modalHeader:"BOOKING CONFIRMED",toggleModal:is,backDropState:"static",showCloseButton:!1,bookingForm:!0,modalBody:e.jsx(Ha,{confirmInfo:$t,rateEnquiry:s,bookingForm:!0,golbalReceivedRate:te+ae,golbalReceivedRateCurrency:Ut,additionalFreeDays:(()=>{const t=[];return Object.entries(ne).forEach(([n,o])=>{const c=K[`${n}_1`],i=K[`${n}_0`];
1o.containers.forEach(g=>{c&&t.push({containerDetailId:g.id,freeDays:c.days||0,price:c.price||0,currencyCode:c.currency_code||"USD",atOrigin:1}),i&&t.push({containerDetailId:g.id,freeDays:i.days||0,price:i.price||0,currencyCode:i.currency_code||"USD",atOrigin:0})})}),t})()})}),e.jsx(le,{modal:Me,size:"lg",toggleModal:Ie,modalHeader:"Terms and Condition",modalBody:qt(),showCloseButton:!1}),e.jsx(le,{modal:Ae,size:"lg",toggleModal:ts,modalBody:ea(),showCloseButton:!1})]})},Ya=Rt(Ua);class Ga extends d.Component{constructor(){super(...arguments);v(this,"state",{refNo:null,manualForwardRateEnquiry:null,rateEnquiry:null,fetchingDetails:!0,failedRef:!1,statusHistory:[],customerKyc:null,expired:!1,salesInfo:null,termsAndConditionValue:null,eulaValue:null,isEULAAccepted:null,isTandCAccepted:null});v(this,"getRateEnquiryDetails",l=>{let a=`${U.getBookingDetails}/${l}`;Nt(a,r=>{if(!r.data.success)this.setState({fetchingDetails:!1,failedRef:!0});else{const h=r.data.data.rateEnquiry,m=r.data.data.expired,j=r.data.data.salesPerson;if(h){const p=r.data.data.rateEnquiry[0];this.setState({rateEnquiry:p,fetchingDetails:!1,customerKyc:p.customerKyc}),this.getStatusHistory(p==null?void 0:p.id)}this.setState({termsAndConditionValue:r.data.data.termAndCondition,eulaValue:r.data.data.eula,expired:m,salesInfo:j,fetchingDetails:!1})}},r=>{this.setState({fetchingDetails:!1})})});v(this,"getStatusHistory",l=>{Nt(`${U.getRateEnquiryStatusHistoryBooking}/${l}`,a=>{var r,h,m,j;a&&a.data.success&&this.setState({statusHistory:a.data.data.items,isEULAAccepted:(h=(r=a.data.data)==null?void 0:r.customerInfo)==null?void 0:h.isEULAAccepted,isTandCAccepted:(j=(m=a.data.data)==null?void 0:m.customerInfo)==null?void 0:j.isTandCAccepted})})})}componentDidMount(){var a,r,h;const l=((h=(r=(a=this.props)==null?void 0:a.match)==null?void 0:r.params)==null?void 0:h.refNo)||null;console.log("this.props",this.props),console.log("refNo",l),l?(this.getRateEnquiryDetails(l),this.setState({refNo:l})):this.setState({failedRef:!0})}render(){var m,j;const{failedRef:l,rateEnquiry:a,expired:r,salesInfo:h}=this.state;return e.jsx(e.Fragment,{children:l?e.jsx("div",{className:"center-container",children:e.jsx("div",{className:"centered-text",children:e.jsx("h2",{children:"Sorry, the link you provided is broken."})})}):r&&h?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-center",children:e.jsxs("h3",{className:"titleBookingResponse mt-4",children:["Rate Enquiry Response for Reference Number [",this.state.refNo,"]"]})}),e.jsx("div",{className:"center-container mt-5",children:e.jsxs("div",{className:"centered-text",children:[e.jsx("h2",{children:"Sorry, the link you provided has expired."}),e.jsxs("h3",{className:"mt-3",children:["Please contact: ",Tt(h)," for any queries."]}),e.jsxs("h4",{className:"mt-2",children:["Number: ",(j=(m=h==null?void 0:h.personProfile)==null?void 0:m.personProfileTelephones[0])==null?void 0:j.phoneNumber]}),e.jsxs("h5",{children:["Email: ",h==null?void 0:h.email]})]})})]}):e.jsxs("div",{className:"container-fluid",children:[e.jsx("div",{className:"row mb-3",children:e.jsx("div",{className:"col pl-0 pr-0",children:e.jsx(Ta,{color:"faded",light:!0,children:e.jsxs("div",{className:"col text-center",style:{position:"relative"},children:[e.jsx("span",{style:{position:"absolute",left:0},children:e.jsx(wa,{to:"/",children:e.jsx(Fa,{className:"mr-auto",children:e.jsx("img",{src:Da,className:"img-fluid",alt:"img",style:{height:"40px"}})})})}),e.jsxs("h3",{className:"titleBookingResponse",children:["Rate Enquiry Response for Reference Number [",this.state.refNo,"]"]})]})})})}),a!=null?e.jsx(Ya,{rateEnquiry:this.state.rateEnquiry,rateEnquiries:this.state.rateEnquiries,companyCategory:this.state.companyCategory,customerKyc:this.state.customerKyc,statusHistory:this.state.statusHistory,rateEnquiryRefNo:this.state.rateEnquiryRefNo,getRateEnquiryQueryList:this.getRateEnquiryQueryList,handleGoBack:this.handleGoBack,currentEnqHBLApproveStatus:this.state.currentEnqHBLApproveStatus,refreshBLApproved:this.refreshBLApproved,termsAndConditionValue:this.state.termsAndConditionValue,eulaValue:this.state.eulaValue,isEULAAccepted:this.state.isEULAAccepted,isTandCAccepted:this.state.isTandCAccepted}):this.state.fetchingDetails?e.jsx(e.Fragment,{children:e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx(ce,{color:"primary",children:""}),e.jsx("br",{}),"Loading Data..."]})}):e.jsx("div",{className:"center-container",children:e.jsx("div",{className:"centered-text",children:e.jsx("h2",{children:"Sorry, the link you provided is broken."})})})]})})}}const yn=Rt(Ga);export{yn 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.