1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5897],{83350:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/comments",function(){return n(78157)}])},55290:function(e,t,n){"use strict";n.d(t,{Em:function(){return x},R3:function(){return o},Y3:function(){return i},YS:function(){return d},ZP:function(){return u}});var a=n(85893),s=n(67294),l=n(68289),r=n.n(l);let i=["ÙØ±ÙردÛÙ","Ø§Ø±Ø¯ÛØ¨Ùشت","خرداد","ØªÛØ±","Ù
رداد","Ø´ÙØ±ÛÙØ±","Ù
ÙØ±","آباÙ","آذر","دÛ","بÙÙ
Ù","اسÙÙØ¯"],c=["Ø´","Û","د","س","Ú","Ù¾","ج"],d=e=>String(e).replace(/[0-9]/g,e=>"Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹"[Number(e)]);function o(e){if(!e)return"â";let t=r()(e.slice(0,10),"YYYY-MM-DD");return t.isValid()?`${d(t.format("jD"))} ${i[t.jMonth()]} ${d(t.jYear())}`:"â"}function x(e){if(!e)return"â";let t=r()(e.slice(0,10),"YYYY-MM-DD");return t.isValid()?d(t.format("jYYYY/jMM/jDD")):"â"}function u(e){let{label:t,value:n,onChange:l,min:x,hint:u}=e,[m,h]=(0,s.useState)(!1),[p,g]=(0,s.useState)(()=>n?r()(n,"YYYY-MM-DD"):r()()),y=(0,s.useRef)(null);(0,s.useEffect)(()=>{m&&n&&g(r()(n,"YYYY-MM-DD"))},[m,n]),(0,s.useEffect)(()=>{if(m)return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)};function e(e){var t;(null===(t=y.current)||void 0===t?void 0:t.contains(e.target))||h(!1)}function t(e){"Escape"===e.key&&h(!1)}},[m]);let j=(0,s.useMemo)(()=>{let e=p.clone().startOf("jMonth"),t=p.clone().endOf("jMonth").jDate();return Array.from({length:t},(t,n)=>e.clone().add(n,"day"))},[p]),f=(p.clone().startOf("jMonth").day()+1)%7;return(0,a.jsxs)("div",{ref:y,className:"relative",children:[(0,a.jsx)("span",{className:"block mb-6 text-12 leading-18 text-gray-6C6A7D font-m",children:t}),(0,a.jsxs)("button",{type:"button",onClick:()=>h(e=>!e),className:`w-full flex items-center justify-between gap-x-8 px-14 py-10 rounded-10 border text-14 leading-22 text-right transition ${m?"border-primary-main":"border-gray-E5E5E6 hover:border-gray-C4CAD3"}`,children:[(0,a.jsx)("span",{className:n?"text-black":"text-gray-9B9BAA",children:n?o(n):"Ø§ÙØªØ®Ø§Ø¨ ØªØ§Ø±ÛØ®"}),(0,a.jsx)("i",{className:"icon-Calendar text-16 text-gray-9B9BAA"})]}),u&&(0,a.jsx)("span",{className:"block mt-4 text-11 leading-18 text-gray-9B9BAA",children:u}),m&&(0,a.jsxs)("div",{className:"absolute z-5 mt-6 right-0 w-[268px] bg-white rounded-12 border border-gray-E5E5E6 shadow-[0_6px_16px_0px_rgba(8,19,56,0.12)] p-12",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-10",children:[(0,a.jsx)("button",{type:"button",onClick:()=>g(e=>e.clone().subtract(1,"jMonth")),className:"w-28 h-28 rounded-8 text-gray-6C6A7D hover:bg-gray-F0F0F0",children:"â¹"}),(0,a.jsxs)("span",{className:"text-13 leading-20 font-m text-black",children:[i[p.jMonth()]," ",d(p.jYear())]}),(0,a.jsx)("button",{type:"button",onClick:()=>g(e=>e.clone().add(1,"jMonth")),className:"w-28 h-28 rounded-8 text-gray-6C6A7D hover:bg-gray-F0F0F0",children:"âº"})]}),(0,a.jsx)("div",{className:"grid grid-cols-7 gap-2 mb-2",children:c.map(e=>(0,a.jsx)("div",{className:"text-center text-10 text-gray-9B9BAA py-2",children:e},e))}),(0,a.jsxs)("div",{className:"grid grid-cols-7 gap-2",children:[Array.from({length:f}).map((e,t)=>(0,a.jsx)("div",{},`b-${t}`)),j.map(e=>{let t=e.format("YYYY-MM-DD"),s=!!x&&t<x;return(0,a.jsx)("button",{type:"button",disabled:s,onClick:()=>{l(t),h(!1)},className:`h-30 rounded-8 text-12 leading-18 transition ${t===n?"bg-primary-main text-white font-m":s?"text-gray-C4CAD3 cursor-not-allowed":"text-gray-6C6A7D hover:bg-gray-F0F0F0"}`,children:d(e.format("jD"))},t)})]})]})]})}},47693:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var a=n(85893),s=n(67294),l=n(84858),r=n(32474);let i=[{key:"cleaning",label:"ÙØ¸Ø§Ùت Ø§ÙØ§Ù
تگاÙ"},{key:"location",label:"Ù
ÙÙØ¹Ûت Ù
کاÙÛ"},{key:"quality",label:"Ú©ÛÙÛØª ÙØ³Ø¨Øª Ø¨Ù ÙØ±Ø®"},{key:"integrity",label:"ØµØØª Ø§Ø·ÙØ§Ø¹Ø§Øª"},{key:"greeting",label:"Ø¨Ø±Ø®ÙØ±Ø¯ Ù
ÛØ²Ø¨Ø§Ù"},{key:"delivery",label:"ÙØÙ٠تØÙÛÙ"}];function c(e){let{value:t,onPick:n}=e;return(0,a.jsx)("span",{className:"inline-flex items-center gap-x-2",dir:"ltr",children:[1,2,3,4,5].map(e=>(0,a.jsx)("button",{type:"button",title:`${e} از Ûµ`,"aria-label":`${e} از Ûµ`,onClick:()=>n(e),className:"leading-none",children:(0,a.jsx)("i",{className:`icon-Star text-18 transition ${e<=t?"text-[#FFC120]":"text-gray-E5E5E6 hover:text-[#FFE2A0]"}`})},e))})}function d(e){let{open:t,onClose:n,onCreated:d,defaultResidenceId:o}
1=e,[x,u]=(0,s.useState)(null),[m,h]=(0,s.useState)(""),[p,g]=(0,s.useState)([]),[y,j]=(0,s.useState)(!1),[f,b]=(0,s.useState)(""),[N,v]=(0,s.useState)({cleaning:5,location:5,quality:5,integrity:5,greeting:5,delivery:5}),[w,C]=(0,s.useState)(""),[k,A]=(0,s.useState)(""),[E,S]=(0,s.useState)(!0),[D,F]=(0,s.useState)(!1),[B,Y]=(0,s.useState)("");function _(){u(null),h(""),g([]),b(""),v({cleaning:5,location:5,quality:5,integrity:5,greeting:5,delivery:5}),C(""),A(""),S(!0),Y("")}let M=(0,s.useRef)(),$=(!!x||!!o)&&f.trim()&&w.trim();async function I(){F(!0),Y("");try{await (0,l.SC)("/api/admin/reviews/manual",{method:"POST",body:JSON.stringify({residenceId:o??x.id,guestDisplayName:f.trim(),comment:w.trim(),hostAnswer:k.trim()||void 0,publish:E,...N})}),_(),d(),n()}catch(e){Y(e instanceof Error?e.message:"ثبت ÙØ¸Ø± Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯")}finally{F(!1)}}return(0,a.jsx)(r.u_,{open:t,onClose:()=>{_(),n()},title:"ثبت ÙØ¸Ø± دستÛ",width:"max-w-[560px]",children:(0,a.jsxs)("div",{className:"flex flex-col gap-y-14",children:[!o&&(0,a.jsx)(r.gN,{label:"Ø§ÙØ§Ù
تگاÙ",children:x?(0,a.jsxs)("div",{className:"flex items-center justify-between gap-x-8 px-14 py-10 rounded-10 border border-gray-E5E5E6 bg-gray-F9F9FB",children:[(0,a.jsxs)("span",{className:"text-13 text-black",children:[x.name,!!x.reference&&(0,a.jsxs)("span",{className:"text-gray-9B9BAA",children:[" \xb7 ",x.reference]})]}),(0,a.jsx)("button",{type:"button",className:"text-12 text-primary-dark",onClick:()=>u(null),children:"تغÛÛØ±"})]}):(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(r.II,{value:m,onChange:e=>(function(e){if(h(e),clearTimeout(M.current),e.trim().length<2){g([]);return}M.current=setTimeout(async()=>{j(!0);try{let t=await (0,l.Px)(`/api/admin/residences?q=${encodeURIComponent(e.trim())}&pageSize=8`);g(t.items)}catch{g([])}finally{j(!1)}},300)})(e.target.value),placeholder:"ÙØ§Ù
ÛØ§ کد Ø§ÙØ§Ù
تگاÙâ¦"}),(y||p.length>0)&&m.trim().length>=2&&(0,a.jsx)("div",{className:"absolute z-10 mt-4 w-full bg-white border border-gray-E5E5E6 rounded-10 shadow-lg max-h-[220px] overflow-y-auto",children:y?(0,a.jsx)("p",{className:"px-14 py-10 text-12 text-gray-9B9BAA",children:"در ØØ§Ù جستâÙØ¬Ùâ¦"}):0===p.length?(0,a.jsx)("p",{className:"px-14 py-10 text-12 text-gray-9B9BAA",children:"ÙØªÛجÙâØ§Û Ù¾ÛØ¯Ø§ ÙØ´Ø¯"}):p.map(e=>(0,a.jsxs)("button",{type:"button",className:"block w-full text-right px-14 py-10 text-13 hover:bg-gray-F9F9FB",onClick:()=>{u(e),g([]),h("")},children:[e.name,!!e.reference&&(0,a.jsxs)("span",{className:"text-gray-9B9BAA",children:[" \xb7 ",e.reference]})]},e.id))})]})}),(0,a.jsx)(r.gN,{label:"ÙØ§Ù
ÙÙ
Ø§ÛØ´Û Ù
ÙÙ
اÙ",children:(0,a.jsx)(r.II,{value:f,onChange:e=>b(e.target.value),placeholder:"Ù
Ø«ÙØ§Ù: عÙÛ Ø±Ø¶Ø§ÛÛ",maxLength:60})}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-20 gap-y-10",children:i.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-x-8",children:[(0,a.jsx)("span",{className:"text-12 text-gray-6C6A7D",children:e.label}),(0,a.jsx)(c,{value:N[e.key],onPick:t=>v(n=>({...n,[e.key]:t}))})]},e.key))}),(0,a.jsx)(r.gN,{label:"Ù
ØªÙ ÙØ¸Ø±",children:(0,a.jsx)("textarea",{value:w,onChange:e=>C(e.target.value),rows:4,className:"w-full rounded-10 border border-gray-E5E5E6 px-14 py-12 text-13 leading-24 outline-none focus:border-primary-main resize-y"})}),(0,a.jsx)(r.gN,{label:"پاسخ Ù
ÛØ²Ø¨Ø§Ù (Ø§Ø®ØªÛØ§Ø±Û)",children:(0,a.jsx)("textarea",{value:k,onChange:e=>A(e.target.value),rows:3,placeholder:"اگر پر Ø´ÙØ¯Ø ÙÙ
را٠با Ø®ÙØ¯Ù ÙØ¸Ø± Ù
ÙØªØ´Ø± Ù
ÛâØ´ÙØ¯.",className:"w-full rounded-10 border border-gray-E5E5E6 px-14 py-12 text-13 leading-24 outline-none focus:border-primary-main resize-y"})}),(0,a.jsx)(r.ZD,{checked:E,onChange:S,label:"Ø¨ÙØ§ÙاصÙÙ Ù
ÙØªØ´Ø± Ø´ÙØ¯"}),!!B&&(0,a.jsx)("p",{className:"text-12 text-[#C62828]",children:B}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-x-10 pt-4",children:[(0,a.jsx)(r.zx,{variant:"secondary",onClick:()=>{_(),n()},children:"Ø§ÙØµØ±Ø§Ù"}),(0,a.jsx)(r.zx,{disabled:!$||D,onClick:I,children:"ثبت ÙØ¸Ø±"})]})]})})}},78157:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var a=n(85893),s=n(67294),l=n(41664),r=n.n(l),i=n(11163),c=n(44389),d=n(25675),o=n.n(d),x=n(49759),u=n(84858),m=n(35157),h=n(32474),p=n(55290),g=n(47693);let y=[{key:"online",label:"ÙØ¸Ø±Ø§Øª رزر٠آÙÙØ§ÛÙ"},{key:"phone",label:"ÙØ¸Ø±Ø§Øª رزر٠تÙÙÙÛ"}],j=[{key:"pending",label:"در Ø§ÙØªØ¸Ø§Ø± بررسÛ"},{key:"all",label:"ÙÙ
Ù"},{key:"published",label:"Ù
ÙØªØ´Ø± شدÙ"},{key:"low",label:"Ú©Ù
âØ§Ù
ØªÛØ§Ø²"},{key:"rejected",label:"رد شدÙ"}],f={AWAITING_HOST_ANSWER_APPROVAL:{label:"در Ø§ÙØªØ¸Ø§Ø± تاÛÛØ¯ ÙØ¸Ø± Ù
ÛØ²Ø¨Ø§Ù",tone:"yellow"},AWAITING_GUEST_COMMENT_APPROVAL:{label:"در Ø§ÙØªØ¸Ø§Ø± تاÛÛØ¯ ÙØ¸Ø± Ù
ÙÙ
اÙ",tone:"yellow"},AWAITING_BOTH:{label:"در Ø§ÙØªØ¸Ø§Ø± تاÛÛØ¯",tone:"yellow"},PUBLISHED:{label:"Ù
ÙØªØ´Ø± شدÙ",tone:"green"}
1,REJECTED:{label:"رد شدÙ",tone:"red"}};function b(e){let{value:t}=e;return(0,a.jsxs)("span",{className:"inline-flex items-center gap-x-4",children:[(0,a.jsx)("i",{className:"icon-Star text-14 text-[#FFC120]"}),(0,a.jsx)("span",{className:"text-13 text-black",children:(0,h.N)(Math.round(10*t)/10)})]})}function N(e){let{url:t,name:n,size:s=32}=e;return t?(0,a.jsx)(o(),{src:(0,h.vD)(t,96),alt:n??"",width:s,height:s,className:"rounded-full object-cover shrink-0",style:{width:s,height:s}}):(0,a.jsx)("span",{className:"rounded-full bg-gray-F0F0F0 text-gray-6C6A7D flex items-center justify-center shrink-0 text-12",style:{width:s,height:s},children:(n??"Ø").trim().charAt(0)})}function v(){let e=(0,i.useRouter)(),[t,n]=(0,s.useState)("online"),[l,d]=(0,s.useState)("pending"),[o,v]=(0,s.useState)(1),[w,C]=(0,s.useState)(""),[k,A]=(0,s.useState)("list"),[E,S]=(0,s.useState)([]),[D,F]=(0,s.useState)(!1),B="phone"===t?"/api/admin/phone-reviews":"/api/admin/reviews",Y=e=>"phone"===t?`/admin/comments/phone/${e}`:`/admin/comments/${e}`,_=`${B}?tab=${l}&page=${o}&pageSize=20${w?`&q=${encodeURIComponent(w)}`:""}`,{data:M,isLoading:$,mutate:I}=(0,c.u)(_,e=>(0,u.Px)(e)),{data:O}=(0,c.u)(`${B}/tab-counts`,e=>(0,u.SC)(e)),{data:P}=(0,c.u)("/api/admin/reviews/tab-counts",e=>(0,u.SC)(e)),{data:z}=(0,c.u)("/api/admin/phone-reviews/tab-counts",e=>(0,u.SC)(e)),T=(null==M?void 0:M.items)??[],R=null==M?void 0:M.meta;
1function Z(e){S(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}async function L(){for(let e of E)await (0,u.SC)(`${B}/${e}/comment-status`,{method:"POST",body:JSON.stringify({status:"PUBLISHED"})}).catch(()=>void 0);S([]),I()}return(0,s.useEffect)(()=>{M&&(0,m.g)(`comments:${t}`,M.items.map(e=>e.id),e.asPath)},[M,t,e.asPath]),(0,a.jsxs)(x.Z,{title:"phone"===t?"ÙØ¸Ø±Ø§Øª رزر٠تÙÙÙÛ":"ÙØ¸Ø±Ø§Øª",breadcrumb:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r(),{href:"/admin",children:"Ø¯Ø§Ø´Ø¨ÙØ±Ø¯"})," / ÙØ¸Ø±Ø§Øª"]}),toolbar:(0,a.jsxs)(h.o8,{children:[(0,a.jsx)(h.Hf,{value:w,onChange:e=>{C(e),v(1)},placeholder:"Ù
ØªÙ ÙØ¸Ø±Ø Ù
ÙÙ
Ø§ÙØ Ø§ÙØ§Ù
تگاÙâ¦"}),(0,a.jsx)(h.r_,{value:k,onChange:e=>A(e)}),"online"===t&&(0,a.jsx)(h.zx,{onClick:()=>F(!0),children:"ثبت ÙØ¸Ø± دستÛ"}),!!R&&(0,a.jsx)(h.p0,{page:R.page,pageSize:R.pageSize,pageCount:R.pageCount,total:R.total,onPage:v})]}),children:[(null==R?void 0:R.sortedBy)==="newest"&&(0,a.jsx)("p",{className:"mb-10 text-12 leading-20 text-gray-9B9BAA",children:"تعداد ÙØªØ§Ûج Ø²ÛØ§Ø¯ Ø§Ø³ØªØ Ù¾Ø³ بÙâØ¬Ø§Û \xabاÙ٠آÙÚÙ ÙÛØ§Ø² Ø¨Ù Ø¨Ø±Ø±Ø³Û Ø¯Ø§Ø±Ø¯\xbb بر اساس Ø¬Ø¯ÛØ¯ØªØ±ÛÙ Ù
رتب شدÙ. Ø¨Ø±Ø§Û Ø¯ÛØ¯Ù ØµÙ Ø¨Ø±Ø±Ø³ÛØ تب \xabدر Ø§ÙØªØ¸Ø§Ø± بررسÛ\xbb را باز Ú©ÙÛØ¯."}),(0,a.jsx)(h.Qm,{tabs:y,value:t,counts:{online:null==P?void 0:P.pending,phone:null==z?void 0:z.pending},onChange:e=>{n(e),v(1),S([])}}),(0,a.jsx)("div",{className:"h-12"}),(0,a.jsx)(h.Qm,{tabs:j,value:l,counts:O,onChange:e=>{d(e),v(1),S([])}}),E.length>0&&(0,a.jsxs)(h.Zb,{className:"px-16 py-12 mb-12 flex items-center justify-between gap-x-12 flex-wrap gap-y-8",children:[(0,a.jsxs)("span",{className:"text-13 text-black",children:[(0,a.jsx)("b",{children:(0,h.N)(E.length)})," ÙØ¸Ø± Ø§ÙØªØ®Ø§Ø¨ شدÙ"]}),(0,a.jsxs)("div",{className:"flex items-center gap-x-8",children:[(0,a.jsx)(h.zx,{onClick:L,children:"تاÛÛØ¯ Ù Ø§ÙØªØ´Ø§Ø±"}),(0,a.jsx)(h.zx,{variant:"secondary",onClick:()=>S([]),children:"پاک Ú©Ø±Ø¯Ù Ø§ÙØªØ®Ø§Ø¨"})]})]}),$?(0,a.jsx)(h.Od,{className:"h-[420px]"}):0===T.length?(0,a.jsx)(h.Zb,{children:(0,a.jsx)(h.ub,{text:"ÙØ¸Ø±Û با اÛÙ ÙÛÙØªØ± Ù¾ÛØ¯Ø§ ÙØ´Ø¯"})}):"cards"===k?(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-16",children:T.map(e=>{var t,n,s,l,i,c;return(0,a.jsxs)(h.Zb,{className:"p-16 flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-8",children:[(0,a.jsx)(h.XZ,{checked:E.includes(e.id),onChange:()=>Z(e.id)}),(0,a.jsx)(h.Ct,{tone:(null===(t=f[e.status])||void 0===t?void 0:t.tone)??"gray",children:(null===(n=f[e.status])||void 0===n?void 0:n.label)??e.status})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center text-center mb-10",children:[(0,a.jsx)(N,{url:(null===(s=e.guest)||void 0===s?void 0:s.avatarUrl)??null,name:(null===(l=e.guest)||void 0===l?void 0:l.name)??e.guestDisplayName,size:72}),(0,a.jsxs)("p",{className:"mt-8 text-15 leading-24 font-m text-black flex items-center gap-x-6",children:[(null===(i=e.guest)||void 0===i?void 0:i.name)??(null===(c=e.guest)||void 0===c?void 0:c.phone)??e.guestDisplayName??"â",e.isManual&&(0,a.jsx)(h.Ct,{tone:"purple",children:"دستÛ"})]}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(b,{value:e.averageRating})}),!!e.reservation&&(0,a.jsxs)("p",{className:"mt-4 text-12 leading-20 text-gray-9B9BAA",children:["ØªØ§Ø±ÛØ® Ø³ÙØ± : ",(0,p.Em)(e.reservation.startDate)]})]}),(0,a.jsx)("p",{className:"text-13 leading-24 text-black line-clamp-4 grow",children:e.comment}),(0,a.jsx)(r(),{href:Y(e.id),className:"mt-14",children:(0,a.jsx)(h.zx,{className:"w-full",children:"Ù
Ø´Ø§ÙØ¯Ù Ø¬Ø²Ø¦ÛØ§Øª"})})]},e.id)})}):(0,a.jsx)(h.Zb,{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-13 min-w-[900px]",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"bg-[#2C3654] text-white text-right",children:[(0,a.jsx)("th",{className:"px-12 py-12 font-m w-40",children:"ردÛÙ"}),(0,a.jsx)("th",{className:"px-12 py-12 w-40",children:(0,a.jsx)(h.XZ,{checked:E.length===T.length&&T.length>0,indeterminate:E.length>0,onChange:e=>S(e?T.map(e=>e.id):[])})}),(0,a.jsx)("th",{className:"px-12 py-12 font-m",children:"Ù
ÙÙ
اÙ"}),(0,a.jsx)("th",{className:"px-12 py-12 font-m",children:"Ù
ØªÙ ÙØ¸Ø±"}),(0,a.jsx)("th",{className:"px-12 py-12 font-m",children:"اÙ
ØªÛØ§Ø²"}),(0,a.jsx)("th",{className:"px-12 py-12 font-m",children:"Ù
ÛØ²Ø¨Ø§Ù"}),(0,a.jsx)("th",{className:"px-12 py-12 font-m",children:"phone"===t?"ØªØ§Ø±ÛØ® ÙØ¸Ø±":"ØªØ§Ø±ÛØ® Ø³ÙØ±"}),(0,a.jsx)("th",{className:"px-12 py-12 font-m",children:"پاسخ Ù
ÛØ²Ø¨Ø§Ù"}),(0,a.jsx)("th",{className:"px-12 py-12 font-m",children:"ÙØ¶Ø¹Ûت"}),(0,a.jsx)("th",{className:"px-12 py-12 w-80"})]})}),(0,a.jsx)("tbody",{children:T.map((e,n)=>{var s,l;return(0,a.jsxs)("tr",{title:e.residence.name,className:"border-b border-gray-F0F0F0 last:border-0 hover:bg-gray-F9F9FB",children:[(0,a.jsx)("td",{className:"px-12 py-12 text-gray-6C6A7D",children:(0,h.N)((o-1)*20+n+1)}),(0,a.jsx)("td",{className:"px-12 py-12",children:(0,a.jsx)(h.XZ,{checked:E.includes(e.id),onChange:()=>Z(e.id)})}),(0,a.jsx)("td",{className:"px-12 py-12",children:e.guest?(0,a.jsx)(r(),{href:`/admin/users/${e.guest.id}`,className:"text-primary-dark font-m whitespace-nowrap",children:e.guest.name??e.guest.phone}):(0,a.jsxs)("span",{className:"inline-flex items-center gap-x-6 whitespace-nowrap",children:[e.guestDisplayName??"â",e.isManual&&(0,a.jsx)(h.Ct,{tone:"purple",children:"دستÛ"})]})}),(0,a.jsx)("td",{className:"px-12 py-12 max-w-[260px]",children:(0,a.jsx)("p",{className:"line-clamp-2 text-black leading-22",children:e.comment})}),(0,a.jsx)("td",{className:"px-12 py-12",children:(0,a.jsx)(b,{value:e.averageRating})}),(0,a.jsx)("td",{className:"px-12 py-12",children:e.residence.host?(0,a.jsx)(r(),{href:`/admin/users/${e.residence.host.id}`,className:"text-primary-dark whitespace-nowrap",children:e.residence.host.name??e.residence.host.phone}):"â"}),(0,a.jsx)("td",{className:"px-12 py-12 whitespace-nowrap text-gray-6C6A7D",children:e.reservation?(0,p.Em)(e.reservation.startDate):"phone"===t?(0,p.Em)(e.createdAt):"â"}),(0,a.jsx)("td",{className:"px-12 py-12 max-w-[240px]",children:e.hostAnswer?(0,a.jsx)("p",{className:"line-clamp-2 text-gray-6C6A7D leading-22",children:e.hostAnswer}):(0,a.jsx)("span",{className:"text-gray-9B9BAA",children:"بدÙ٠پاسخ"})}),(0,a.jsx)("td",{className:"px-12 py-12",children:(0,a.jsx)(h.Ct,{tone:(null===(s=f[e.status])||void 0===s?void 0:s.tone)??"gray",children:(null===(l=f[e.status])||void 0===l?void 0:l.label)??e.status})}),(0,a.jsx)("td",{className:"px-12 py-12",children:(0,a.jsx)(r(),{href:Y(e.id),title:"Ù
Ø´Ø§ÙØ¯Ù Ù ÙÛØ±Ø§ÛØ´",className:"text-primary-dark",children:(0,a.jsx)("i",{className:"icon-Edit text-18"})})})]},e.id)})})]})}),(0,a.jsx)(g.Z,{open:D,onClose:()=>F(!1),onCreated:()=>I()})]})}}
1,35157:function(e,t,n){"use strict";n.d(t,{g:function(){return l},o:function(){return r}});var a=n(67294);let s="lidoma_admin_nav:";function l(e,t,n){try{let a={ids:t,returnUrl:n,savedAt:Date.now()};window.sessionStorage.setItem(s+e,JSON.stringify(a))}catch{}}function r(e,t){let[n,l]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(null==t){l(null);return}let n=function(e){try{let t=window.sessionStorage.getItem(s+e);if(!t)return null;let n=JSON.parse(t);if(Date.now()-n.savedAt>18e5)return null;return n}catch{return null}}(e);if(!n){l(null);return}let a=n.ids.findIndex(e=>String(e)===String(t));if(-1===a){l(null);return}l({index:a,total:n.ids.length,prevId:a>0?n.ids[a-1]:null,nextId:a<n.ids.length-1?n.ids[a+1]:null,returnUrl:n.returnUrl})},[e,t]),n}}},function(e){e.O(0,[4885,4389,8289,9759,9774,2888,179],function(){return e(e.s=83350)}),_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.