PageSourceSearch

https://infosaudi.ai/build/assets/Index-Db5a_B6-.js

js infosaudi.ai collected 2026-10-05 13:34:11 UTC 7,287 bytes, 1 lines download raw bytes

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.