Files
Rasadyar_FrontEnd/build/assets/DiffrenceKillerPage-DK7Gymix.js

2 lines
12 KiB
JavaScript
Raw Normal View History

2026-01-19 15:55:00 +03:30
import{j as u,I as X,b0 as Cu,d as hu,B as v,bh as du,al as Q,ak as T,a9 as pu,T as y,b as gu}from"./mui-vendor-CkIVaoQP.js";import{G as i,S as q,ho as eu,hp as ru,hq as au,hr as tu,X as d,hs as su,ht as nu,hu as ou,hv as cu,L as b,j as L,h as _,A as lu,O as Au,C as J,fn as Eu,c as xu,M as w,b as yu,u as _u,N as iu,_ as ju,hw as Ru,hx as Su,hy as Iu,hz as Lu}from"./index-Vwb3Bce5.js";import{N as Z}from"./NavLink-D2GD_ItM.js";import{L as uu}from"./LinkItem-Cp7DiDkz.js";import{m as fu}from"./index.esm-CjWvmHks.js";import{a as Fu}from"./index.esm-fCjAhNPc.js";import{P as Tu}from"./ProvinceBarDifference-BJ7zcdDY.js";import{B as vu}from"./BackButton-CX1bfrW9.js";import{r as h,f as bu}from"./react-vendor-CmFgShSM.js";import{a as U,u as B,f as Du}from"./redux-vendor-B7uoacJt.js";import{R as Nu}from"./index.esm-Bu7XMDZU.js";import{R as ku}from"./ResponsiveTable-DugzNG82.js";import{d as Ou}from"./Tune-DzkdDfJZ.js";import{d as Hu}from"./Delete-DHYHiC8G.js";import{b as qu}from"./aviculture-get-hatching-data-nSiacZjK.js";import"./iconBase-BEJYyZsk.js";import"./toBase64-DB8tmZmy.js";import"./PublishedWithChanges-BErs-ATv.js";import"./resizeImage-Csf2MO3w.js";import"./Edit-CwJaslma.js";import"./ShowImage-DVQI0Zh5.js";import"./Download-guGqWZIG.js";import"./Close-8pFLGZ5w.js";import"./FilterAlt-CTDmPS36.js";import"./styled-components.browser.esm-gS9mh05b.js";const Uu=()=>u.jsxs(i,{container:!0,gap:q.SMALL,p:q.SMALL,direction:{xs:"row",md:"row"},justifyContent:"center",children:[u.jsx(Z,{to:d()==="AdminX"?eu:d()==="SuperAdmin"?ru:d()==="ProvinceOperator"?au:d()==="CityOperator"?tu:"",children:u.jsx(uu,{icon:u.jsx(fu,{size:30,color:"#244CCC"}),title:"اختلاف کشتار در کشتارگاه"})}),u.jsx(Z,{to:d()==="AdminX"?su:d()==="SuperAdmin"?nu:d()==="ProvinceOperator"?ou:d()==="CityOperator"?cu:"",children:u.jsx(uu,{icon:u.jsx(Fu,{size:30,color:"#244CCC"}),title:"افزایش حجم جوجه ریزی"})})]}),wu=U("CITY_INCREASE_HATCHING_SERVICE",async(n,{dispatch:o})=>{try{o(b());const{data:a,status:l}=await L.post("hatching-increase-request/",n);return o(_()),{data:a,status:l}}catch(a){return o(_()),{error:a.response.data.result}}}),Bu=U("CITY_EDIT_INCREASE_HATCHING_SERVICE",async(n,{dispatch:o})=>{try{o(b());const{data:a,status:l}=await L.put("hatching-increase-request/0/",n);return o(_()),{data:a,status:l}}catch(a){return o(_()),{error:a.response.data.result}}}),Gu=U("CITY_DELETE_INCREASE_HATCHING_SERVICE",async(n,{dispatch:o})=>{o(b());try{const{data:a,status:l}=await L.delete(`/hatching-increase-request/0/?key=${n}`);return o(_()),{data:a,status:l}}catch(a){return o(_()),{error:a.response.data.result}}});U("CITY_INCREASE_GET_HATCHING_SERVICE",async n=>{const{data:o,status:a}=await L.get("hatching-increase-request/",{params:n});return{data:o,status:a}});const $u=({item:n,updateTable:o})=>{const a=B(),[l,j]=h.useState(null),[s]=h.useContext(lu),S=E=>{j(E.currentTarget)},p=()=>{j(null)},g=!!l,A=g?"popover":void 0;return u.jsxs("div",{children:[u.jsx(X,{"aria-describedby":A,variant:"contained",color:"primary",onClick:S,children:u.jsx(Ou,{})}),u.jsx(Cu,{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},id:A,open:g,anchorEl:l,onClose:p,children:u.jsx("div",{style:{padding:"20px"},children:u.jsx(i,{container:!0,direction:"column",children:u.jsx(hu,{title:"حذف",placement:"left-start",children:u.jsx(X,{"aria-label":"delete",color:"error",onClick:()=>{p(),a(Au({title:"آیا مطمئن هستید؟",content:u.jsxs(i,{container:!0,spacing:2,children:[u.jsx(i,{item:!0,children:u.jsx(v,{variant:"contained",color:"error",onClick:()=>{a(Gu(n==null?void 0:n.key)).then(E=>{E.payload.error?s({vertical:"top",horizontal:"center",msg:E.payload.error,severity:"error"}):(o(),a(J()),s({vertical:"top",horizontal:"center",msg:E.payload.data.result,severity:"success"}))})},children:"تایید"})}),u.jsx(i,{item:!0,children:u.jsx(v,{onClick:()=>{a(J())},children:"لغو"})})]})}))},children:u.jsx(Hu,{})})})})})})]})},Mu=({updateTable:n,isEdit:o,item:a})=>{var D,N,I,k,O,f,F,C,e;const[l,j]=h.useSt