1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2553],{86467:function(e,t,r){"use strict";var s,n=r(2784);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)({}).hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e}).apply(null,arguments)}t.Z=function(e){return n.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",stroke:"currentColor",strokeWidth:0,viewBox:"0 0 512 512"},e),s||(s=n.createElement("path",{stroke:"none",d:"M58.79 439.13A16 16 0 0 1 48 424c0-73.1 14.68-131.56 43.65-173.77 35-51 90.21-78.46 164.35-81.87V88a16 16 0 0 1 27.05-11.57l176 168a16 16 0 0 1 0 23.14l-176 168A16 16 0 0 1 256 424v-79.77c-45 1.36-79 8.65-106.07 22.64-29.25 15.12-50.46 37.71-73.32 67a16 16 0 0 1-17.82 5.28z"})))}},41342:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/trips",function(){return r(12309)}])},12309:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return b},config:function(){return j},default:function(){return y}});var s=r(52322),n=r(49347),l=r(2784),c=r(15212),o=r(62091),a=r(19034),i=r.n(a),d=r(96577),x=r.n(d),u=r(86467),m=r(80292),h=r(56573),p=r(63600),f=(r(38738),r(12413)),v=(r(56052),r(27537));function g(e){let{propertyId:t,site:r,subtitle:a}=e,d=(0,v.dD)(),[g]=(0,m.oR)("loginToken"),[b,y]=(0,l.useState)("request"),[j,N]=(0,l.useState)(),[w,k]=(0,l.useState)(-1),{reload:C}=(0,m.aF)(),[Z,_]=((0,f.VY)(),(0,l.useState)([])),D=(0,l.useCallback)(async()=>{g&&(0,n.hi)("reservations","GET",{loginToken:g,all:!0,propertyId:t||void 0}).then(e=>{_((null==e?void 0:e.reservations)||[])})},[g,t]);(0,l.useEffect)(()=>{D()},[D]);let P=Z.filter(e=>"succeeded"===e.status&&i()(e.checkin,"DD-MM-YYYY").isBefore(i()())&&i()(e.checkout,"DD-MM-YYYY").isAfter(i()()));Z.filter(e=>11074===e.id);let Y=Z.filter(e=>"amount_capturable_updated"===e.status),R=Z.filter(e=>"canceled"===e.status),S=Z.filter(e=>"succeeded"===e.status&&i()(e.checkin,"DD-MM-YYYY").isAfter(i()())),E=Z.filter(e=>"succeeded"===e.status&&i()(e.checkout,"DD-MM-YYYY").isBefore(i()())),M={request:Y,canceled:R,past:E,future:S,current:P}[b],A=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{!A.current&&Z.length>0&&(0===Y.length&&S.length>0&&y("future"),A.current=!0)},[Z]),(0,s.jsx)(c.ZP,{noIndex:!0,dashboard:!0,site:r,subtitle:a,children:(0,s.jsxs)("p",{className:"w-full justify-start min-h-[100vh]",children:[(0,s.jsx)("p",{className:"m-4 text-2xl font-bold",children:"My Trips"}),d&&(0,s.jsx)("p",{className:"ml-4 text-gray-300",children:"scroll ->"}),(0,s.jsxs)("div",{className:"flex mx-4 mb-4 overflow-auto",children:[(0,s.jsxs)("p",{onClick:()=>y("request"),className:"mr-4 cursor-pointer hover:underline ".concat("request"===b?"text-primary":""),children:["Requests (",Y.length,")"]}),(0,s.jsxs)("p",{onClick:()=>y("future"),className:"mx-4 cursor-pointer hover:underline ".concat("future"===b?"text-primary":""),children:["Coming up (",S.length,")"]}),(0,s.jsxs)("p",{onClick:()=>y("current"),className:"mx-4 cursor-pointer hover:underline ".concat("current"===b?"text-primary":""),children:["Current (",P.length,")"]}),(0,s.jsxs)("p",{onClick:()=>y("past"),className:"mx-4 cursor-pointer hover:underline ".concat("past"===b?"text-primary":""),children:["Past (",E.length,")"]}),(0,s.jsxs)("p",{onClick:()=>y("canceled"),className:"mx-4 cursor-pointer hover:underline ".concat("canceled"===b?"text-primary":""),children:["Canceled (",R.length,")"]})]}),j&&(0,s.jsx)("div",{className:"max-w-[700px]",id:"responseDiv",children:j}),(0,s.jsx)("div",{className:"flex flex-wrap flex-row mt-2 mb-2 justify-evenly",children:(null==M?void 0:M.length)===0?(0,s.jsx)("p",{className:"w-full mx-4",children:"No reservations found"}):null==M?void 0:M.map(e=>{var t,r,n,l,c,a,i,d,m;let f=e.conversionRateForBooking,v=e.currency&&"eur"!==e.currency.toLowerCase()&&f?Number(f):1,g=(null===(t=e.currency)||void 0===t?void 0:t.toLowerCase())==="usd";return(0,s.jsxs)("div",{className:"relative flex flex-col mt-4 mb-2 ml-4 border shadow-md rounded-xl w-72",children:[(0,s.jsx)("div",{className:"relative flex-row h-48 overflow-hidden w-72 rounded-t-xl",children:(null===(r=e.property)||void 0===r?void 0:r.image)?(0,s.jsx)(x(),{src:(0,p.Z)(null===(n=e.property)||void 0===n?void 0:n.image),alt:"Where you're going",layout:"fill",className:"rounded-t-xl object-cover",placeholder:"blur",blurDataURL:(null===(l=e.property)||void 0===l?void 0:l.base64)||"data:image/svg+xml;base64,".concat((0,o.s3)((0,o.f8)(320,320)))}):null}),(0,s.jsxs)("div",{className:"flex flex-col justify-around py-4",children:[(0,s.jsx)("div",{className:" text-left left-0 text-lg mt-2 text-gray-600 ml-3",children:(0,s.jsxs)("p",{className:"text-sm",children:[(0,s.jsx)("strong",{children:"ID:"})," ",e.id," "]})}),(0,s.jsxs)("div",{className:"flex gap-4 text-left mt-2 text-gray-600 ml-3 mr-3",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 rounded-lg px-3 py-2 border border-gray-100",children:[(0,s.jsx)("p",{className:"text-xs text-gray-400 uppercase tracking-wide",children:"Check-in"}),(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-700",children:e.checkin})]}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 rounded-lg px-3 py-2 border border-gray-100",children:[(0,s.jsx)("p",{className:"text-xs text-gray-400 uppercase tracking-wide",children:"Check-out"}),(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-700",children:e.checkout})]})]}),(0,s.jsx)("div",{className:" text-left left-0 text-lg mt-2 text-gray-600 ml-3",children:(0,s.jsxs)("p",{className:"text-sm",children:[(0,s.jsx)("strong",{children:"Guests:"})," ",e.guests," "]})}),(0,s.jsxs)("div",{className:"flex text-left left-0 text-lg mt-2 text-gray-600 ml-3",children:[(0,s.jsxs)("p",{className:"text-sm",children:[(0,s.jsx)("strong",{children:"Space:"})," ",(null===(c=e.property)||void 0===c?void 0:c.name)||"UNKNOWN"," at"," ",(null===(a=e.property)||void 0===a?void 0:a.location)?(0,o.ID)(null===(i=e.property)||void 0===i?void 0:i.location):"UNKNOWN"]}),(0,s.jsx)("div",{onClick:()=>{var t,r,s,n;null===(t=window.open("/".concat(null==e?void 0:null===(s=e.property)||void 0===s?void 0:null===(r=s.location)||void 0===r?void 0:r.slug,"/").concat(null==e?void 0:null===(n=e.property)||void 0===n?void 0:n.slug),"_blank"))||void 0===t||t.focus()},children:(0,s.jsx)(u.Z,{src:u.Z,className:"w-5 h-5 mx-4 cursor-pointer hover:text-gray-500"})})]}),(0,s.jsx)("div",{className:"text-left mt-2 text-gray-600 ml-3 mr-3",children:e.isCombinedStay&&e.propertyRooms&&e.propertyRooms.length>0?(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-gray-400 uppercase tracking-wide mb-1",children:"Combined Stay"}),(0,s.jsx)("div",{className:"space-y-1",children:e.propertyRooms.map(e=>{var t,r;return(0,s.jsxs)("div",{className:"bg-gray-50 rounded-lg px-3 py-2 border border-gray-100",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-700",children:e.title}),(null===(t=e.reservationPropertyRoom)||void 0===t?void 0:t.roomCheckin)&&(null===(r=e.reservationPropertyRoom)||void 0===r?void 0:r.roomCheckout)&&(0,s.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[e.reservationPropertyRoom.roomCheckin," â ",e.reservationPropertyRoom.roomCheckout]})]},e.id)})})]}):(0,s.jsxs)("p",{className:"text-sm",children:[(0,s.jsx)("strong",{children:"Room:"})," ",null===(m=e.propertyRooms)||void 0===m?void 0:null===(d=m[0])||void 0===d?void 0:d.title]})}),(0,s.jsxs)("div",{className:"mt-3 ml-3 mr-3 bg-gray-50 rounded-lg border border-gray-100 divide-y divide-gray-100",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center px-3 py-2",children:[(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Total price"}),(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-700",children:g?(0,s.jsxs)("span",{children:["US$ ",null!=e.totalPrice?(e.totalPrice*v).toFixed(2):"-"]}):(0,s.jsx)(h.Z,{currencyCode:e.currency,amount:null!=e.totalPrice?e.totalPrice*v:null})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center px-3 py-2",children:[(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Paid"}),(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-700",children:g?(0,s.jsxs)("span",{children:["US$ ",e.feeCents?(e.feeCents/100*v).toFixed(2):"-"]}):(0,s.jsx)(h.Z,{currencyCode:e.currency,amount:e.feeCents?e.feeCents/100*v:null})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center px-3 py-2",children:[(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Payable at arrival"}),(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-700",children:g?(0,s.jsxs)("span",{children:["US$ ",null!=e.paymentLeft?(e.paymentLeft*v).toFixed(2):"-"]}):(0,s.jsx)(h.Z,{currencyCode:e.currency,amount:null!=e.paymentLeft?e.paymentLeft*v:null})})]})]}),!1]})]},"res".concat(e.id))})})]})})}r(34406);var b=!0,y=function(e){let{siteSlug:t}=e,r=n.ZS[t];return(0,s.jsx)(g,{site:r},"guest")};let j={amp:!1}},12289:function(e,t,r){"use strict";var s=r(52322);r(2784),t.Z=e=>{let{size:t,color:r,extraClassName:n}=e,l="number"==typeof t?"":"large"===t?"w-16 h-16":"w-6 h-6",c=r&&["black","white"].includes(r)?"border-".concat(r):"border-".concat(r,"-900"),o="".concat(l," border-b-2 ").concat(c," rounded-full animate-spin ").concat(n||"");return(0,s.jsx)("div",{style:"number"==typeof t?{width:t,height:t}:void 0,className:o})}},56573:function(e,t,r){"use strict";var s=r(52322),n=r(34206);t.Z=e=>{let{currencyCode:t,amount:r}=e,l=(0,n.humanReadablePrice)(t,r),c=t===n.currencies.usd.code?n.currencies.eur:n.currencies.usd,o="(".concat(c.symbol,")"),a="Click ".concat(o," to convert ").concat(r," ").concat(n.currencies[t].label," into ").concat(c.label);return(0,s.jsx)("span",{title:a,children:l})}},38738:function(e,t,r){"use strict";r.d(t,{R:function(){return l}});var s=r(52322),n=r(12289);let l=e=>{let{title:t,onClick:r,isLoading:l,disabled:c,selected:o,customDisabledColor:a,variant:i,extraClassname:d,type:x="submit",...u}=e,m=a||"bg-[#36d7b7]";switch(i){case"primary":return(0,s.jsxs)("button",{className:"".concat(l||c?m:"bg-[#5ce0b6] hover:bg-[#88EACB] hover:shadow-xl"," xsm:mt-4 p-2 mx-2 w-28 h-12 font-bold text-md flex justify-center items-center cursor-pointer transition duration-200 rounded shadow-lg text-white ").concat(d),type:x,onClick:r,disabled:l||c,children:[l&&(0,s.jsx)("div",{className:"mr-2",children:(0,s.jsx)(n.Z,{})}),(0,s.jsx)("span",{children:t})]});case"secondary":return(0,s.jsxs)("button",{className:"".concat(l||c?m:"bg-[#daf2eb] hover:bg-[#a3d8c7] hover:shadow-xl"," xsm:mt-4 p-2 mx-2 w-28 h-12 font-bold text-md flex justify-center items-center cursor-pointer transition duration-200 rounded shadow-lg text-white ").concat(d),type:x,onClick:r,disabled:l||c,children:[l&&(0,s.jsx)("div",{className:"mr-2",children:(0,s.jsx)(n.Z,{})}),(0,s.jsx)("span",{children:t})]});case"transparent":return(0,s.jsxs)("button",{className:"".concat(l||c?m:"hover:bg-[#a3d8c7] hover:shadow-xl"," xsm:mt-4 p-2 border border-black rounded-lg whitespace-nowrap mx-2 w-[180px] h-12 font-semibold text-md flex justify-center items-center cursor-pointer transition duration-200 rounded shadow-lg text-black ").concat(d),type:x,onClick:r,disabled:l||c,children:[l&&(0,s.jsx)("div",{className:"mr-2",children:(0,s.jsx)(n.Z,{})}),(0,s.jsx)("span",{children:t})]});case"toggle":return(0,s.jsxs)("button",{className:"".concat(o?"bg-black":"hover:bg-[#a3d8c7] hover:shadow-xl"," ").concat(o?"text-white":"text-black"," xsm:mt-4 p-2 border border-black rounded-lg whitespace-nowrap mx-2 w-[180px] h-12 text-md flex justify-center items-center cursor-pointer transition duration-200 rounded shadow-lg text-black ").concat(d),type:x,onClick:r,disabled:l||c,children:[l&&(0,s.jsx)("div",{className:"mr-2",children:(0,s.jsx)(n.Z,{})}),(0,s.jsx)("span",{children:t})]});case"tight":return(0,s.jsxs)("button",{style:{fontWeight:300,fontSize:14},className:"tight ".concat(l||c?m:"bg-[#5ce0b6] hover:bg-[#88EACB] hover:shadow-xl"," xsm:mt-4 px-2 py-1 mx-0 w-16 h-8 rounded rounded-lg font-bold text-md flex justify-center items-center cursor-pointer transition duration-200 shadow-lg text-white ").concat(d),type:x,onClick:r,disabled:l||c,children:[l&&(0,s.jsx)("div",{className:"mr-2",children:(0,s.jsx)(n.Z,{})}),(0,s.jsx)("span",{children:t})]});case"tight-gray":return(0,s.jsxs)("button",{style:{fontWeight:300,fontSize:14},className:"tight ".concat(l||c?m:"bg-[#F9FAFB] hover:bg-gray-100 hover:shadow-xl"," xsm:mt-4 px-2 py-1 border border-[#D0D5DD] mx-0 w-16 h-8 rounded rounded-lg font-bold text-md flex justify-center items-center cursor-pointer transition duration-200 shadow-lg text-black ").concat(d),type:x,onClick:r,disabled:l||c,children:[l&&(0,s.jsx)("div",{className:"mr-2",children:(0,s.jsx)(n.Z,{})}),(0,s.jsx)("span",{children:t})]});case"danger":return(0,s.jsxs)("button",{className:"".concat(l||c?"bg-[#e0655c]":"bg-[#e0655c] hover:bg-[#ea8888] hover:shadow-xl"," xsm:mt-4 p-2 mx-2 w-28 h-12 font-bold text-md flex justify-center items-center cursor-pointer transition duration-200 rounded shadow-lg text-white ").concat(d),type:x,onClick:r,disabled:l||c,children:[l&&(0,s.jsx)("div",{className:"mr-2",children:(0,s.jsx)(n.Z,{})}),(0,s.jsx)("span",{children:t})]})}return(0,s.jsx)("button",{className:"".concat(l?m:"bg-[#5ce0b6] hover:bg-[#88EACB] hover:shadow-xl"," xsm:mt-4 p-2 mx-2 w-28 h-12 font-bold text-sm flex justify-center items-center cursor-pointer transition duration-200 rounded shadow-lg text-white ").concat(d),type:"submit",onClick:r,disabled:l,children:t})}}},function(e){e.O(0,[3661,203,5212,2888,9774,179],function(){return e(e.s=41342)}),_N_E=e.O()}]);
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.