/
opt
/
canhelp
/
apps
/
web
/
.next
/
static
/
chunks
/
app
/
dashboard
/
/opt/canhelp/apps/web/.next/static/chunks/app/dashboard
mkdir
upload
Name
Size
Mode
Actions
page-d0ec40850facabd6.js
24107
0644
edit
dl
rm
Edit:
/opt/canhelp/apps/web/.next/static/chunks/app/dashboard/page-d0ec40850facabd6.js
(24107B)
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5105],{252:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>g});var a=t(4568),r=t(7620),l=t(7541),n=t(9664),i=t.n(n),d=t(1592),c=t(9906),o=t(2982),x=t(4017),m=t(2035);function h(e){let{current:s,limit:t,label:r,className:l=""}=e;if(null===t)return(0,a.jsxs)("div",{className:"".concat(l),children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:r}),(0,a.jsx)("span",{className:"text-xs font-semibold text-green-600",children:"∞"})]}),(0,a.jsx)("div",{className:"h-1.5 rounded-full bg-green-100",children:(0,a.jsx)("div",{className:"h-full w-full rounded-full bg-green-400"})})]});let n=t>0?Math.min(100,Math.round(s/t*100)):100,i=Math.max(0,t-s);return(0,a.jsxs)("div",{className:l,children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:r}),(0,a.jsxs)("span",{className:"text-xs font-semibold ".concat(n>=100?"text-red-600":n>=80?"text-amber-600":"text-gray-600"),children:[i," / ",t]})]}),(0,a.jsx)("div",{className:"h-1.5 rounded-full bg-gray-100",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all ".concat(n>=100?"bg-red-500":n>=80?"bg-amber-400":"bg-green-500"),style:{width:"".concat(n,"%")}})})]})}function u(e){let{dashboard:s,t}=e,r=s.plan,l=s.planExpiration,n=s.usage,d=s.stats,c=l?Math.max(0,Math.min(100,Math.round(l.daysLeft/30*100))):100,o=l?l.daysLeft<=3?"bg-red-500":l.daysLeft<=7?"bg-amber-400":"bg-green-400":"bg-green-400";return(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-200 p-5 mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h2",{className:"font-semibold text-gray-800 text-sm",children:t("dashboard.plan.title","My Plan")}),r?(0,a.jsx)(m.d,{tier:r.tier,size:"sm"}):(0,a.jsx)("span",{className:"text-xs text-gray-400",children:t("dashboard.plan.no_plan","Free")})]}),(0,a.jsx)(i(),{href:"/pricing",className:"text-xs font-medium text-green-600 hover:underline",children:(null==r?void 0:r.tier)==="ultimate"?null:t("dashboard.plan.upgrade","Upgrade")})]}),l&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mb-1",children:[(0,a.jsx)("span",{children:t("dashboard.plan.expires","Expires in {n} days").replace("{n}",String(l.daysLeft))}),(0,a.jsxs)("span",{children:[l.daysLeft," ",t("pricing.days","days")]})]}),(0,a.jsx)("div",{className:"h-1.5 rounded-full bg-gray-100",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all ".concat(o),style:{width:"".concat(c,"%")}})})]}),(void 0!==n.messagesSent||void 0!==n.ordersMade)&&(0,a.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:t("dashboard.plan.limits","Daily limits")}),(0,a.jsx)(h,{current:n.messagesSent,limit:null!==n.messagesLeft?n.messagesSent+n.messagesLeft:null,label:t("dashboard.plan.messages","Messages")}),(0,a.jsx)(h,{current:n.ordersMade,limit:null!==n.ordersLeft?n.ordersMade+n.ordersLeft:null,label:t("dashboard.plan.orders","Orders")})]}),Object.keys(d).length>0&&(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(d).map(e=>{let[s,r]=e;return(0,a.jsxs)("div",{className:"bg-gray-50 rounded-xl px-3 py-2 text-center",children:[(0,a.jsx)("p",{className:"text-lg font-bold text-gray-800",children:r}),(0,a.jsx)("p",{className:"text-[10px] text-gray-400 uppercase tracking-wide",children:t("dashboard.stats.".concat(s),s)})]},s)})})]})}function g(){var e,s,t;let{data:n,isPending:m}=(0,d.wV)(),h=(0,l.useRouter)(),g=(0,l.useSearchParams)(),{t:p,locale:b}=(0,c.Y)(),[f,j]=(0,r.useState)([]),[N,v]=(0,r.useState)([]),[y,w]=(0,r.useState)([]),[k,L]=(0,r.useState)([]),[M,_]=(0,r.useState)(!0),[C,E]=(0,r.useState)(null),[S,D]=(0,r.useState)(null),[B,R]=(0,r.useState)(null);if((0,r.useEffect)(()=>{m||n||h.push("/login")},[n,m]),(0,r.useEffect)(()=>{if(!n)return;let e=g.get("ref");if(!e)return;(0,o.C0)(e).catch(()=>{});let s=new URLSearchParams(g.toString());s.delete("ref");let t=s.toString()?"?".concat(s.toString()):window.location.pathname;h.replace(t)},[n]),(0,r.useEffect)(()=>{n&&(0,o.Bb)().then(e=>{let{cards:s}=e;return R(s.length>0)}).catch(()=>R(null))},[n]),(0,r.useEffect)(()=>{n&&Promise.all([(0,o.Fu)(),(0,o.aT)(),(0,o.q7)(),(0,o.Tr)(),(0,o.H)()]).then(e=>{let[s,t,a,r,l]=e;j(s),v(t),w(a),L(r.filter(e=>"task_invite"===e.type)),E(l)}).catch(()=>{}).finally(()=>_(!1))},[n]),(0,r.useEffect)(()=>{var e;n&&("specialist"===(null==(e=n.user)?void 0:e.role)?(0,o.zk)().then(D).catch(()=>{}):(0,o.ML)().then(D).catch(()=>{}))},[n]),m||M)return(0,a.jsx)("div",{className:"text-center py-20 text-white",children:p("common.loading")});let z="ru"===b?"ru-RU":"uk"===b?"uk-UA":"en"===b?"en-US":"el-GR",O=f.filter(e=>"completed"!==e.status&&"cancelled"!==e.status),P=f.filter(e=>"completed"===e.status||"cancelled"===e.status),F=N.filter(e=>{let s=e.offer||e,t=e.task;return"other_accepted"!==s.status&&(null==t?void 0:t.status)!=="completed"&&(null==t?void 0:t.status)!=="cancelled"}),H=N.filter(e=>{let s=e.offer||e,t=e.task;return"other_accepted"===s.status||(null==t?void 0:t.status)==="completed"||(null==t?void 0:t.status)==="cancelled"});function U(e){var s,t;let{task:r}=e,l=null!=(s=r.offerCount)?s:0,n=null!=(t=r.declinedCount)?t:0;return(0,a.jsx)(i(),{href:"/tasks/".concat(r.id),className:"block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-green-300 transition",children:(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-gray-900 truncate",children:(0,x.Oj)(r,b)}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:new Date(r.createdAt).toLocaleDateString(z)}),l>0&&(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1.5",children:[(0,a.jsxs)("span",{className:"text-xs text-green-600 font-medium",children:["\uD83D\uDCBC ",l," ",p("dashboard.offers_count","offers")]}),n>0&&(0,a.jsxs)("span",{className:"text-xs text-red-400",children:["✕ ",n," ",p("dashboard.declined_count","declined")]})]})]}),(0,a.jsxs)("div",{className:"ml-3 text-right shrink-0",children:[(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full ".concat("open"===r.status||"in_progress"===r.status?"bg-green-100 text-green-700":"completed"===r.status?"bg-gray-100 text-gray-600":"bg-red-100 text-red-600"),children:p("task.status.".concat(r.status),r.status)}),r.budget&&(0,a.jsxs)("p",{className:"text-sm font-bold text-green-600 mt-1",children:[(0,x.$g)(r.budget),"€"]})]})]})})}function W(e){var s,t;let{row:r}=e,l=r.offer||r,n=r.task,d=(null==n?void 0:n.status)==="completed"&&"accepted"===l.status&&null!=(t=null==(s=y.find(e=>{var s;return(null==(s=e.review)?void 0:s.taskId)===(null==n?void 0:n.id)}))?void 0:s.review)?t:null;return(0,a.jsxs)(i(),{href:n?"/tasks/".concat(n.id):"#",className:"block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-green-300 transition",children:[(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-gray-900 truncate",children:(null==n?void 0:n.title)||p("chat.task_fallback")}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:new Date(l.createdAt).toLocaleDateString(z)})]}),(0,a.jsxs)("div",{className:"ml-3 text-right shrink-0",children:[(0,a.jsxs)("p",{className:"font-bold text-green-600",children:[(0,x.$g)(l.price),"€"]}),(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full mt-1 inline-block ".concat("accepted"===l.status?"bg-green-100 text-green-700":"declined"===l.status?"bg-red-100 text-red-700":"other_accepted"===l.status?"bg-green-100 text-green-600":"bg-gray-100 text-gray-700"),children:p("offer.status.".concat(l.status),l.status)})]})]}),d&&(0,a.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100 flex items-center gap-2",children:[(0,a.jsx)("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(e=>(0,a.jsx)("span",{className:"text-sm ".concat(e<=d.rating?"text-yellow-400":"text-gray-200"),children:"★"},e))}),(0,a.jsxs)("span",{className:"text-sm font-semibold text-gray-700",children:[d.rating,"/5"]}),d.comment&&(0,a.jsx)("span",{className:"text-xs text-gray-500 truncate",children:d.comment})]}),(null==n?void 0:n.status)==="completed"&&"accepted"===l.status&&!d&&(0,a.jsx)("p",{className:"mt-2 text-xs text-gray-400",children:p("dashboard.review_pending")})]})}let A=(null==n||null==(e=n.user)?void 0:e.role)==="specialist";return(0,a.jsxs)("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-8",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-white",children:p("dashboard.title")}),(0,a.jsx)(i(),{href:"/tasks/new",className:"bg-green-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-green-700",children:p("dashboard.new_task")})]}),!1===B&&(0,a.jsxs)("div",{className:"mb-6 bg-white rounded-2xl border border-gray-200 overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-5 pt-5 pb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-bold text-gray-900",children:p("dashboard.onboarding.title")}),(0,a.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:p("dashboard.onboarding.subtitle")})]}),(0,a.jsxs)("div",{className:"grid sm:grid-cols-2 gap-3 p-5 pt-2",children:[(0,a.jsxs)(i(),{href:"/specialist-setup",className:"group flex flex-col rounded-xl border-2 border-green-500 bg-green-50 p-4 hover:bg-green-100 transition",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDEE0️"}),(0,a.jsx)("span",{className:"font-semibold text-gray-800",children:p("dashboard.onboarding.helper.title")})]}),(0,a.jsx)("p",{className:"text-sm text-green-700/80 mb-3 flex-1",children:p("dashboard.onboarding.helper.desc")}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm font-semibold text-green-700",children:[p("dashboard.onboarding.helper.cta")," →"]})]}),(0,a.jsxs)(i(),{href:"/tasks/new",className:"group flex flex-col rounded-xl border border-gray-200 bg-gray-50 p-4 hover:bg-gray-100 transition",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDCDD"}),(0,a.jsx)("span",{className:"font-semibold text-gray-800",children:p("dashboard.onboarding.requester.title")})]}),(0,a.jsx)("p",{className:"text-sm text-gray-500 mb-3 flex-1",children:p("dashboard.onboarding.requester.desc")}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm font-semibold text-gray-700",children:[p("dashboard.onboarding.requester.cta")," →"]})]})]})]}),C&&(0,a.jsx)(u,{dashboard:C,t:p}),S&&(A?(S.missedCount>0||S.missedEarnings>0)&&(0,a.jsxs)("div",{className:"mb-6 bg-amber-50 border border-amber-200 rounded-xl px-5 py-4 flex items-start gap-3",children:[(0,a.jsx)("div",{className:"shrink-0 mt-0.5",children:(0,a.jsx)("svg",{className:"w-5 h-5 text-amber-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("p",{className:"text-base font-semibold text-amber-800",children:[p("fomo.specialist_missed","You missed {n} tasks").replace("{n}",String(null!=(t=S.missedCount)?t:0)),S.missedEarnings>0&&(0,a.jsxs)("span",{className:"ml-1 text-amber-600",children:["for €",S.missedEarnings]})]}),(null==(s=S.topCategories)?void 0:s.length)>0&&(0,a.jsxs)("p",{className:"text-sm text-amber-600 mt-0.5",children:[p("fomo.top_categories","Categories"),": ",S.topCategories.slice(0,3).join(", ")]})]}),(0,a.jsx)(i(),{href:"/pricing",className:"shrink-0 text-xs font-medium text-amber-700 bg-amber-100 px-3 py-1.5 rounded-lg hover:bg-amber-200 transition",children:p("dashboard.plan.upgrade")})]}):S.totalTasks>0&&(0,a.jsx)("div",{className:"mb-6 bg-green-50 border border-green-200 rounded-xl px-5 py-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"shrink-0 bg-green-100 rounded-xl p-2",children:(0,a.jsx)("svg",{className:"w-5 h-5 text-green-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-base font-semibold text-gray-800",children:[S.totalOffers," ",p("fomo.offers_received","offers received")]}),S.avgOffersPerTask>0&&(0,a.jsx)("p",{className:"text-sm text-gray-500",children:p("fomo.avg_offers","Average {n}/task").replace("{n}",Number(S.avgOffersPerTask).toFixed(1))})]})]}),void 0!==S.completionRate&&(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsxs)("p",{className:"text-2xl font-bold text-green-700",children:[Math.round(100*S.completionRate),"%"]}),(0,a.jsx)("p",{className:"text-sm text-gray-400",children:p("fomo.completion_rate","completed")})]})]})})),A&&(0,a.jsxs)(i(),{href:"/tasks",className:"flex items-center justify-between gap-4 bg-green-600 text-white rounded-xl px-5 py-4 mb-8 hover:bg-green-700 transition",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"shrink-0 bg-white/20 rounded-xl p-2.5",children:(0,a.jsxs)("svg",{className:"w-6 h-6 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[(0,a.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-4.35-4.35"})]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-base",children:p("find_tasks.title")}),(0,a.jsx)("p",{className:"text-green-100 text-sm mt-0.5",children:p("find_tasks.banner_hint")})]})]}),(0,a.jsx)("svg",{className:"w-5 h-5 shrink-0 text-white/70",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),(0,a.jsxs)("div",{className:"grid md:grid-cols-2 gap-8",children:[(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-white mb-4",children:[p("dashboard.my_tasks")," ",(0,a.jsxs)("span",{className:"text-white/60 font-normal text-base",children:["(",O.length,")"]})]}),0===O.length?(0,a.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500",children:[(0,a.jsx)("p",{children:p("dashboard.tasks.empty")}),(0,a.jsx)(i(),{href:"/tasks/new",className:"text-green-600 hover:underline text-sm mt-2 inline-block",children:p("dashboard.tasks.empty.cta")})]}):(0,a.jsx)("div",{className:"space-y-3",children:O.map(e=>(0,a.jsx)(U,{task:e},e.id))})]}),P.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-white/70 mb-4",children:[p("dashboard.completed_tasks")," ",(0,a.jsxs)("span",{className:"font-normal text-base text-white/50",children:["(",P.length,")"]})]}),(0,a.jsx)("div",{className:"space-y-3 opacity-75",children:P.map(e=>(0,a.jsx)(U,{task:e},e.id))})]})]}),(0,a.jsx)("div",{className:"space-y-8",children:A?(0,a.jsxs)(a.Fragment,{children:[k.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-white mb-4",children:[p("dashboard.invitations")," ",(0,a.jsxs)("span",{className:"text-white/60 font-normal text-base",children:["(",k.length,")"]})]}),(0,a.jsx)("div",{className:"space-y-3",children:k.map(e=>(0,a.jsxs)(i(),{href:e.referenceId?"/tasks/".concat(e.referenceId):"/tasks",className:"flex items-start gap-3 p-4 rounded-xl border transition cursor-pointer ".concat(e.isRead?"bg-white/90 border-white/20 hover:bg-white":"bg-white border-amber-300 shadow-sm hover:bg-amber-50"),children:[(0,a.jsx)("span",{className:"text-2xl",children:"\uD83D\uDCCB"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium truncate ".concat(e.isRead?"text-gray-600":"text-gray-900"),children:p("notif.type.task_invite",e.title)}),e.body&&(0,a.jsx)("p",{className:"text-sm text-gray-500 mt-0.5 truncate",children:(()=>{let s=function(e){var s;if(!e)return null;let t=e.match(/[«""](.+?)[»""]/);return null!=(s=null==t?void 0:t[1])?s:null}(e.body),t=p("notif.body.task_invite","");return s&&t?t.replace("{title}",s):e.body})()}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:new Date(e.createdAt).toLocaleDateString(z)})]}),(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1.5 shrink-0",children:[!e.isRead&&(0,a.jsx)("span",{className:"w-2 h-2 bg-amber-400 rounded-full mt-2"}),(0,a.jsx)("span",{className:"text-xs text-gray-400",children:"→"})]})]},e.id))})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-white mb-4",children:[p("dashboard.my_offers")," ",(0,a.jsxs)("span",{className:"text-white/60 font-normal text-base",children:["(",F.length,")"]})]}),0===F.length?(0,a.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500",children:[(0,a.jsx)("p",{children:p("dashboard.offers.empty")}),(0,a.jsx)(i(),{href:"/tasks",className:"text-green-600 hover:underline text-sm mt-2 inline-block",children:p("dashboard.offers.empty.cta")})]}):(0,a.jsx)("div",{className:"space-y-3",children:F.map(e=>(0,a.jsx)(W,{row:e},(e.offer||e).id))})]}),H.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-white/70 mb-4",children:[p("dashboard.completed_offers")," ",(0,a.jsxs)("span",{className:"font-normal text-base text-white/50",children:["(",H.length,")"]})]}),(0,a.jsx)("div",{className:"space-y-3 opacity-75",children:H.map(e=>(0,a.jsx)(W,{row:e},(e.offer||e).id))})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i(),{href:"/specialists",className:"flex items-center justify-between gap-4 bg-green-600 text-white rounded-xl px-5 py-4 hover:bg-green-700 transition",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"shrink-0 bg-white/20 rounded-xl p-2.5",children:(0,a.jsx)("svg",{className:"w-6 h-6 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-base",children:p("dashboard.customer.specialists_title")}),(0,a.jsx)("p",{className:"text-green-100 text-sm mt-0.5",children:p("dashboard.customer.specialists_hint")})]})]}),(0,a.jsx)("svg",{className:"w-5 h-5 shrink-0 text-white/70",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),(0,a.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 p-5",children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-gray-800 mb-4",children:p("dashboard.customer.how_title")}),(0,a.jsx)("div",{className:"space-y-3",children:[{num:"1",text:p("dashboard.customer.step1"),icon:"M12 4v16m8-8H4"},{num:"2",text:p("dashboard.customer.step2"),icon:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},{num:"3",text:p("dashboard.customer.step3"),icon:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}].map(e=>{let{num:s,text:t,icon:r}=e;return(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"shrink-0 w-7 h-7 rounded-full bg-green-100 text-green-600 text-sm font-bold flex items-center justify-center",children:s}),(0,a.jsx)("p",{className:"text-sm text-gray-600 pt-1",children:t})]},s)})}),(0,a.jsxs)(i(),{href:"/tasks/new",className:"mt-4 inline-block text-sm font-medium text-green-600 hover:underline",children:[f.length>0?p("dashboard.tasks.add_new"):p("dashboard.tasks.empty.cta")," →"]})]})]})})]})]})}},1592:(e,s,t)=>{"use strict";t.d(s,{CI:()=>l,Hh:()=>n,Jv:()=>r,wV:()=>i,yK:()=>a});let a=(0,t(6504).M)({baseURL:"https://api.canhelp.gr"}),{signIn:r,signOut:l,signUp:n,useSession:i}=a},2035:(e,s,t)=>{"use strict";t.d(s,{d:()=>l});var a=t(4568);let r={free:{label:"Free",class:"bg-gray-100 text-gray-500 border border-gray-200",icon:""},pro:{label:"Pro",class:"bg-green-100 text-green-700 border border-green-200",icon:(0,a.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-3 h-3 inline-block mr-0.5 -mt-px",children:(0,a.jsx)("path",{d:"M8 1l1.8 3.6L14 5.5l-3 2.9.7 4.1L8 10.5l-3.7 1.9.7-4.1-3-2.9 4.2-.9L8 1z",fill:"currentColor"})})},ultimate:{label:"Ultimate",class:"bg-gradient-to-r from-amber-400 via-yellow-400 to-amber-400 text-gray-900 border border-amber-500 shadow-sm shadow-amber-300/50",icon:(0,a.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-3 h-3 inline-block mr-0.5 -mt-px",children:(0,a.jsx)("path",{d:"M8 1l1.8 3.6L14 5.5l-3 2.9.7 4.1L8 10.5l-3.7 1.9.7-4.1-3-2.9 4.2-.9L8 1z",fill:"currentColor"})})}};function l(e){let{tier:s,verified:t,size:l="sm",className:d=""}=e;if("free"===s&&!t)return null;let c="sm"===l?"text-[10px] px-1.5 py-0.5":"text-xs px-2 py-0.5";if(t&&"free"!==s)return(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full font-semibold ".concat(c," ").concat(r[s].class," ").concat(d),children:["ultimate"===s?(0,a.jsx)(n,{className:"w-3 h-3 fill-gray-900"}):(0,a.jsx)(i,{className:"w-3 h-3"}),r[s].label]});if(t)return(0,a.jsx)("span",{className:"inline-flex items-center gap-0.5 rounded-full font-semibold ".concat(c," bg-green-100 text-green-700 border border-green-200 ").concat(d),children:(0,a.jsx)(i,{className:"w-3 h-3"})});let o=r[s];return(0,a.jsxs)("span",{className:"inline-flex items-center rounded-full font-semibold ".concat(c," ").concat(o.class," ").concat(d),children:["pro"===s&&(0,a.jsx)(n,{className:"w-3 h-3 mr-0.5 -mt-px"}),"ultimate"===s&&(0,a.jsx)(n,{className:"w-3 h-3 mr-0.5 -mt-px fill-gray-900"}),o.label]})}function n(e){let{className:s=""}=e;return(0,a.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",className:s,children:(0,a.jsx)("path",{d:"M8 1l1.8 3.6L14 5.5l-3 2.9.7 4.1L8 10.5l-3.7 1.9.7-4.1-3-2.9 4.2-.9L8 1z",fill:"currentColor"})})}function i(e){let{className:s=""}=e;return(0,a.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:s,children:[(0,a.jsx)("path",{d:"M8 1l2 1.4 2.4-.4 1 2.2 2 1.2-.4 2.4L16 10l-1.8 1.6.4 2.4-2.2.8L10.8 17 8 16.2 5.2 17l-1.2-2.2-2.2-.8.4-2.4L0 10l1-2.2-.4-2.4 2-1.2 1-2.2 2.4.4L8 1z",fill:"#3B82F6"}),(0,a.jsx)("path",{d:"M5.5 8.5l1.5 1.5 3-3",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},4017:(e,s,t)=>{"use strict";function a(e,s){return"el"===s&&e.titleEl?e.titleEl:"en"===s&&e.titleEn?e.titleEn:"ru"===s&&e.titleRu?e.titleRu:e.title}function r(e){return null==e||""===e?"":Math.round(Number(e)).toString()}function l(e,s){return"el"===s&&e.descriptionEl?e.descriptionEl:"en"===s&&e.descriptionEn?e.descriptionEn:"ru"===s&&e.descriptionRu?e.descriptionRu:e.description}t.d(s,{$g:()=>r,GZ:()=>l,Oj:()=>a})},4658:(e,s,t)=>{Promise.resolve().then(t.bind(t,252))}},e=>{e.O(0,[1516,9664,9906,2982,587,18,7358],()=>e(e.s=4658)),_N_E=e.O()}]);
Save
cmd:
run