1import{r as j,j as e,$ as y,Y as d,m as x}from"./app-DBcZI1UJ.js";import{F as f}from"./FrontLayout-Dc504okw.js";import"./useTranslation-tlDg_cva.js";function $({services:s,filters:o,allServices:m,allStatuses:g,allUsers:N}){const[a,i]=j.useState(o),h=t=>{switch(t){case"pending":return"bg-yellow-100 text-yellow-800";case"in_progress":return"bg-blue-100 text-blue-800";case"completed":return"bg-green-100 text-green-800";case"rejected":return"bg-red-100 text-red-800";case"cancelled":return"bg-gray-100 text-gray-800";default:return"bg-gray-100 text-gray-800"}},c=t=>{switch(t){case"pending":return"ÙÙ Ø§ÙØ§Ùتظار";case"in_progress":return"ÙÙØ¯ Ø§ÙØªÙÙÙØ°";case"completed":return"Ù
ÙØªÙ
ÙØ©";case"rejected":return"Ù
رÙÙØ¶Ø©";case"cancelled":return"Ù
ÙØºÙØ©";default:return t}},p=t=>new Date(t).toLocaleDateString("ar-SA",{year:"numeric",month:"short",day:"numeric"}),u=t=>Array.from({length:5},(n,r)=>e.jsx("span",{className:`text-lg ${r<t?"text-yellow-400":"text-gray-300"}`,children:"â
"},r)),l=(t,n)=>{const r={...a,[t]:n};i(r),x.get(window.location.pathname,r,{preserveState:!0,replace:!0})},b=()=>{i({}),x.get(window.location.pathname,{},{preserveState:!0,replace:!0})};return e.jsxs(f,{children:[e.jsx(y,{title:"Ø·ÙØ¨Ø§Øª Ø§ÙØ®Ø¯Ù
ات"}),e.jsx("div",{className:"bg-gradient-to-br from-blue-600 to-primary-600 text-white py-16",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h1",{className:"text-5xl font-bold mb-4",children:"Ø·ÙØ¨Ø§Øª Ø§ÙØ®Ø¯Ù
ات ð"}),e.jsx("p",{className:"text-xl text-blue-100",children:"تتبع ÙØ¥Ø¯Ø§Ø±Ø© جÙ
ÙØ¹ Ø·ÙØ¨Ø§Øª Ø§ÙØ®Ø¯Ù
ات Ø§ÙØ®Ø§ØµØ© بÙ"})]})}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[e.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 mb-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"تصÙÙØ© اÙÙØªØ§Ø¦Ø¬"}),e.jsx("button",{onClick:b,className:"text-primary-600 hover:text-primary-800 text-sm font-medium",children:"Ù
Ø³Ø Ø¬Ù
ÙØ¹ Ø§ÙØªØµÙÙØ§Øª"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ø§ÙØØ§ÙØ©"}),e.jsxs("select",{value:a.status||"",onChange:t=>l("status",t.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent",children:[e.jsx("option",{value:"",children:"جÙ
ÙØ¹ Ø§ÙØØ§ÙØ§Øª"}),g.map(t=>e.jsx("option",{value:t,children:c(t)},t))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ø§ÙØ®Ø¯Ù
Ø©"}),e.jsxs("select",{value:a.service_id||"",onChange:t=>l("service_id",t.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent",children:[e.jsx("option",{value:"",children:"جÙ
ÙØ¹ Ø§ÙØ®Ø¯Ù
ات"}),m.map(t=>e.jsx("option",{value:t.id,children:t.name},t.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ù
Ù ØªØ§Ø±ÙØ®"}),e.jsx("input",{type:"date",value:a.date_from||"",onChange:t=>l("date_from",t.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ø¥ÙÙ ØªØ§Ø±ÙØ®"}),e.jsx("input",{type:"date",value:a.date_to||"",onChange:t=>l("date_to",t.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent"})]})]})]}),s.data.length===0?e.jsxs("div",{className:"text-center py-16 bg-white rounded-lg shadow-lg",children:[e.jsx("div",{className:"text-6xl mb-4",children:"ð"}),e.jsx("h3",{className:"text-2xl font-bold mb-2",children:"ÙØ§ ØªÙØ¬Ø¯ Ø·ÙØ¨Ø§Øª خدÙ
ات"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"ÙÙ
تÙÙ
Ø¨Ø·ÙØ¨ أ٠خدÙ
ات بعد. ابدأ Ø¨ØªØµÙØ Ø§ÙØ®Ø¯Ù
ات اÙÙ
ØªØ§ØØ©."}),e.jsx(d,{href:"/services",className:"inline-block bg-primary-600 hover:bg-primary-700 text-white px-8 py-3 rounded-lg font-semibold transition",children:"ØªØµÙØ Ø§ÙØ®Ø¯Ù
ات"})]}):e.jsxs("div",{className:"space-y-6",children:[s.data.map(t=>e.jsx("div",{className:"bg-white rounded-lg shadow-lg overflow-hidden hover:shadow-xl transition-shadow",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center space-x-4 space-x-reverse mb-2",children:[e.jsx("h3",{className:"text-xl font-bold text-gray-900",children:t.service.name}),e.jsx("span",{className:`inline-flex px-3 py-1 text-sm font-semibold rounded-full ${h(t.status)}`,children:c(t.status)})]}),e.jsxs("p",{className:"text-gray-600 mb-2",children:["رÙÙ
Ø§ÙØ·Ùب: #",t.id]}),e.jsxs("p",{className:"text-sm text-gray-500",children:["ØªØ§Ø±ÙØ® Ø§ÙØ·Ùب:"," ",p(t.created_at)]}),t.current_step&&e.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Ø§ÙØ®Ø·ÙØ© Ø§ÙØØ§ÙÙØ©:"," ",t.current_step.title]})]}),t.rating&&e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"flex items-center mb-1",children:u(t.rating)}),e.jsxs("p",{className:"text-sm text-gray-600",children:["تÙÙÙÙ
Ù: ",t.rating,"/5"]})]})]}),t.review&&e.jsx("div",{className:"bg-gray-50 rounded-lg p-4 mb-4",children:e.jsxs("p",{className:"text-gray-700 italic",children:['"',t.review,'"']})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex space-x-3 space-x-reverse",children:[e.jsx(d,{href:`/user/my-services-orders/${t.id}`,className:"bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-lg font-semibold transition text-sm",children:"عرض Ø§ÙØªÙاصÙÙ"}),t.can_rate&&e.jsx(d,{href:`/user/my-services-orders/${t.id}/rate`,className:"bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-lg font-semibold transition text-sm",children:"تÙÙÙÙ
Ø§ÙØ®Ø¯Ù
Ø©"})]}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"ØØ§ÙØ© Ø§ÙØ·Ùب"}),e.jsx("div",{className:"w-32 bg-gray-200 rounded-full h-2",children:e.jsx("div",{className:`h-2 rounded-full ${t.status==="completed"?"bg-green-500":t.status==="in_progress"?"bg-blue-500":t.status==="pending"?"bg-yellow-500":"bg-red-500"}`,style:{width:t.status==="completed"?"100%":t.status==="in_progress"?"60%":t.status==="pending"?"20%":"0%"}})})]})]})]})},t.id)),s.last_page>1&&e.jsx("div",{className:"flex justify-center mt-8",children:e.jsx("div",{className:"flex space-x-2 space-x-reverse",children:Array.from({length:s.last_page},(t,n)=>n+1).map(t=>e.jsx(d,{href:`${window.location.pathname}?page=${t}`,className:`px-3 py-2 rounded-lg text-sm font-medium ${t===s.current_page?"bg-primary-600 text-white":"bg-white text-gray-700 hover:bg-gray-50 border"}
1`,preserveScroll:!0,children:t},t))})})]})]})]})}export{$ 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.