import{b as e}from"./app-DTeOhhdM.js";/* empty css              */import{P as i}from"./PrintHeader-nmSka4zl.js";function h({list:r,categorys:c,units:d,product:l,type:x}){return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"prient-table",children:[e.jsx(i,{printType:x}),e.jsxs("div",{children:[e.jsx("div",{className:"float-left w-50 text-12px",children:e.jsx("table",{className:"w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400",children:e.jsxs("tbody",{children:[e.jsxs("tr",{className:"bg-white border-b dark:bg-gray-800 dark:border-gray-700",children:[e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Shop"}),e.jsxs("th",{scope:"row",className:"px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white",children:[": ",r.shop?r.shop.name:"-"]})]}),e.jsxs("tr",{className:"bg-white border-b dark:bg-gray-800 dark:border-gray-700",children:[e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Address"}),e.jsxs("th",{scope:"row",className:"px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white",children:[": ",r.shop?r.shop.location:"-"]})]})]})})}),e.jsx("div",{className:"float-right w-50",children:e.jsx("table",{className:"w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400",children:e.jsxs("tbody",{children:[e.jsxs("tr",{className:"bg-white border-b dark:bg-gray-800 dark:border-gray-700",children:[e.jsx("th",{scope:"col",className:"px-6 py-3",children:"RQ No"}),e.jsxs("th",{scope:"row",className:"px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white",children:[": ",r&&r.invoice_no]})]}),e.jsxs("tr",{className:"bg-white border-b dark:bg-gray-800 dark:border-gray-700",children:[e.jsx("th",{scope:"col",className:"px-6 py-3",children:"RQ-Date"}),e.jsxs("th",{scope:"row",className:"px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white",children:[":"," ",r&&new Date(r.requisition_date).toLocaleDateString("en-US")]})]})]})})})]}),e.jsx("div",{className:"relative  w-full prient-table mt-[250px] ",children:e.jsxs("table",{className:"w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400  ",children:[e.jsx("thead",{className:"text-xs w-screen text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Product name"}),e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Category"}),e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Qty"}),e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Units"})]})}),e.jsx("tbody",{children:r.length!==0&&r.requsition_detailes.map(a=>e.jsxs("tr",{className:"bg-white border-b dark:bg-gray-800 dark:border-gray-700",children:[e.jsx("th",{scope:"row",className:"px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white",children:(()=>{let t=l.find(s=>s.id==a.product_id);return t?t.name:"-"})()}),e.jsx("td",{className:"px-6 py-4",children:(()=>{var t=c.find(s=>s.id==a.category_id);return t?t.name:"-"})()}),e.jsxs("td",{className:"px-6 py-4",children:[a.quantity," "]}),e.jsx("td",{className:"px-6 py-4",children:(()=>{var t=d.find(s=>s.id==a.unit_id);return t?t.name:"-"})()})]}))}),e.jsx("tfoot",{children:e.jsxs("tr",{className:"font-semibold text-gray-900 dark:text-white",children:[e.jsx("th",{scope:"row",className:"px-6 py-3  text-base text-end",colSpan:3}),e.jsx("td",{className:"px-6 col-span-4 py-3"})]})})]})})]})})}export{h as default};
