2 lines
2.4 KiB
JavaScript
2 lines
2.4 KiB
JavaScript
import{j as u,I as m,T as r,cl as p,aO as h,aP as j,aQ as C,aR as f,aS as g,b as A}from"./mui-vendor-CkIVaoQP.js";import{k5 as F,G as e,S as a,p as S,q as T,k2 as y}from"./index-BHF9XhlR.js";import{u as E,j as I,r as b,f as D}from"./react-vendor-CmFgShSM.js";import{f as M,u as R}from"./redux-vendor-B7uoacJt.js";import{S as P}from"./SimpleTable-OFQqh0WK.js";import{d as w}from"./NavigateNext-Cg8XXIQ9.js";import"./index-CV2Xug6a.js";import"./Close-Daz6UZes.js";import"./Search-D4DyWpQE.js";import"./Delete-BMbGwban.js";const L=()=>{const n=E(),{inspectionid:o}=I(),c=o,{vetFarmInspectionHistory:t,pending:l}=M(s=>s.vetFarmSlice),d=R();return b.useEffect(()=>{d(F(c))},[]),u.jsx(u.Fragment,{children:!l&&u.jsxs(e,{mt:a.MEDIUM,children:[u.jsx(e,{container:!0,alignItems:"center",children:u.jsxs(m,{"aria-label":"delete",color:"primary",onClick:()=>n(-1),children:[u.jsx(w,{}),u.jsx(r,{children:"بازگشت"})]})}),u.jsxs(p,{sx:{gap:a.MEDIUM},children:[t==null?void 0:t.map((s,N)=>u.jsx(u.Fragment,{children:u.jsxs(h,{sx:{alignSelf:"flex-start",width:"100%"},children:[u.jsxs(j,{children:[u.jsx(C,{}),u.jsx(f,{})]}),u.jsxs(e,{container:!0,direction:"column",flexWrap:"nowrap",flex:"1",children:[u.jsx(e,{container:!0,children:u.jsx(e,{children:u.jsx(g,{children:u.jsxs(r,{variant:"body1",fontWeight:"bold",children:["بازرسی مورخ ",S(s.createDate)," ساعت"," ",T(s.createDate)]})})})}),u.jsx(e,{container:!0,xs:12,children:u.jsx(e,{xs:12,children:u.jsx(P,{columns:["موضوع بازرسی","توضیحات","تلفات","تصویر"],data:[[s.topic,s.description,s.Losses,s.image.length?s.image.map((i,x)=>[u.jsx(e,{display:"inline-flex",children:u.jsx("a",{href:i,alt:"دانلود",children:u.jsx("img",{src:i,width:"80",height:"80",alt:"دانلود",style:{marginRight:"10px",borderRadius:"5px"}})})},`SlaughterPaymentFactorImage${x}`)]):"بدون پیوست"]]})})})]})]})})),!(t!=null&&t.length)&&u.jsx(r,{variant:"body1",component:"span",children:"برای این مرغداری بازرسی ثبت نشده است."})]})]})})},q=()=>{const{pathname:n}=D();return u.jsx(u.Fragment,{children:u.jsx(A,{display:"flex",justifyContent:"center",children:u.jsx(e,{container:!0,direction:"column",justifyContent:"center",xs:12,sm:12,md:10,lg:10,children:u.jsx(e,{container:!0,justifyContent:"space-between",gap:a.SMALL,children:u.jsx(e,{xs:12,children:n.includes(y)&&u.jsx(L,{})})})})})})};export{q as default};
|