Sindbad~EG File Manager

Current Path : /home/infinitibizsol/public_html/auction-flow.com/static/js/
Upload File :
Current File : /home/infinitibizsol/public_html/auction-flow.com/static/js/108.32e76dbe.chunk.js

"use strict";(self.webpackChunk_minimal_material_kit_react=self.webpackChunk_minimal_material_kit_react||[]).push([[108],{8108:(e,t,n)=>{n.r(t),n.d(t,{default:()=>D});var i=n(5043),o=n(9252),l=n(8911),r=n(5865),a=n(8977),s=n(688),d=n(2143),c=n(5869),u=n(9456),h=(n(9907),n(3536),n(579));var v=n(3216),m=n(1036),p=n(4535),x=n(8903),A=n(9650),b=n(1806),g=n(3460),y=n(8076),j=n(2420),f=n(8185),w=n(7625),C=n(6446),k=n(7894),S=n(9588),I=n(3568),_=n(7858),R=n(5565);const T={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:360,bgcolor:"background.paper",border:"2px solid #1976D2",borderRadius:2,boxShadow:24,p:4},M=(0,p.Ay)("img")({height:50,objectFit:"contain"});function F(e){let{inventoryData:t,loading:n,...o}=e;const s=(0,v.Zp)(),d=(0,u.wA)(),[c,p]=(0,i.useState)([]),[F,N]=(0,i.useState)(!1),[D,E]=(0,i.useState)(null),O=()=>N(!1),{userInfo:B}=(0,u.d4)((e=>e.auth));(0,i.useEffect)((()=>{p([{id:"image",label:"Image"},{id:"title",label:"Title"},{id:"vin",label:"VIN"},{id:"mileage",label:"Mileage"},{id:"action",label:"Action"}])}),[]);return!(null!==t&&void 0!==t&&t.length)>0&&!n?(0,h.jsx)("h1",{style:{marginTop:"100px"},children:"No results were found!"}):(0,h.jsxs)(x.Ay,{container:!0,mt:1,...o,sx:{width:"100% !important"},children:[(0,h.jsx)("style",{children:"\n        .css-u4myg0-MuiTableCell-root{\n            padding-top: 0px !important;\n            padding-bottom:0px !important;\n        }\n    "}),(0,h.jsx)(A.A,{children:(0,h.jsxs)(b.A,{stickyHeader:!0,size:"small",children:[(0,h.jsx)(k.K,{headLabel:c}),n?(0,h.jsx)(g.A,{children:[...Array(4)].map(((e,t)=>(0,h.jsx)(y.A,{children:null===c||void 0===c?void 0:c.map(((e,t)=>(0,h.jsx)(j.A,{children:(0,h.jsx)(f.A,{variant:"text",sx:{fontSize:"2.1rem",borderRadius:"10px"}})},t)))},t)))}):(0,h.jsx)(g.A,{children:(0,h.jsx)(i.Fragment,{children:null===t||void 0===t?void 0:t.map(((e,t)=>(0,h.jsxs)(y.A,{children:[(0,h.jsx)(j.A,{children:(0,h.jsx)("img",{src:"".concat(S.Jz,"/").concat(null===e||void 0===e?void 0:e.imageUrl),height:40,width:40,alt:"",style:{objectFit:"contain"}})}),(0,h.jsx)(j.A,{children:(0,h.jsx)(r.A,{sx:{fontWeight:"bold",cursor:"pointer"},style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden",minWidth:"200px"},onClick:()=>s("/dashboard/inventory/vehicle",{state:{product:e}}),children:"".concat((null===e||void 0===e?void 0:e.year)||""," ").concat((null===e||void 0===e?void 0:e.make)||""," ").concat((null===e||void 0===e?void 0:e.model)||""," ").concat((null===e||void 0===e?void 0:e.trim)||"")})}),(0,h.jsx)(j.A,{style:{width:220},children:(null===e||void 0===e?void 0:e.vin)||""}),(0,h.jsx)(j.A,{style:{width:200},children:"".concat((null===e||void 0===e?void 0:e.mileage)||"")}),(0,h.jsx)(j.A,{children:(0,h.jsx)(M,{style:{cursor:"pointer"},alt:null===e||void 0===e?void 0:e.make,src:I,onClick:()=>{N(!0),E(null===e||void 0===e?void 0:e.vehicle_id)}})})]},t)))})})]})}),(0,h.jsx)(w.A,{open:F,onClose:O,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:(0,h.jsxs)(C.A,{sx:T,children:[(0,h.jsx)(r.A,{id:"modal-modal-title",variant:"h6",component:"h2",sx:{mb:1,textAlign:"center"},children:"Are you sure you want to delete"}),(0,h.jsx)(r.A,{id:"modal-modal-description",variant:"h6",component:"h2",align:"center",children:"this vehicle?"}),(0,h.jsxs)(l.A,{spacing:2,direction:"row",justifyContent:"center",alignItems:"flex-end",sx:{mt:2},children:[(0,h.jsx)(a.A,{variant:"contained",style:{width:"150px",backgroundColor:"#4CAF50",borderRadius:"30px",color:"white",marginRight:"8px",fontWeight:"bold"},onClick:()=>{(async()=>{try{200===(await R.A.delete("".concat(S.VY,"/vehicle/delete-inventory-vehicle/").concat(D))).status?(m.oR.success("Vehicle deleted successfully"),N(!1),d((0,_.M)({timeRange:"currentweek",orderDirection:"ASC",sortBy:"",userId:null===B||void 0===B?void 0:B.user_id}))):m.oR.error("Failed to delete vehicle")}catch(e){m.oR.error("Error deleting vehicle!")}})()},children:"Yes"}),(0,h.jsx)(a.A,{variant:"contained",style:{width:"150px",backgroundColor:"#E53935",borderRadius:"30px",color:"white",fontWeight:"bold"},onClick:O,children:"No"})]})]})})]})}const N=[{value:"name",label:"ASC: (A TO Z)",condition:"ASC"},{value:"name",label:"DESC: (Z TO A)",condition:"DESC"},{value:"year",label:"Year: Newest First",condition:"DESC"},{value:"year",label:"Year: Oldest First",condition:"ASC"},{value:"mileage",label:"Mileage: Highest First",condition:"DESC"},{value:"mileage",label:"Mileage: Lowest First",condition:"ASC"}];function D(){const e=(0,v.Zp)(),t=(0,u.wA)(),{state:n}=(0,v.zy)(),[m,p]=(0,i.useState)(!1),[x,A]=(0,i.useState)(null),[b,g]=(0,i.useState)("Current week"),[y,j]=(0,i.useState)("ASC: (A TO Z)"),[f,w]=(0,i.useState)("last12weeks"),[C,k]=(0,i.useState)("ASC"),[S,I]=(0,i.useState)(!0),{InventoryData:R}=(0,u.d4)((e=>e.inventory)),{userInfo:T}=(0,u.d4)((e=>e.auth));(0,i.useEffect)((()=>{t((0,_.M)({timeRange:f,orderDirection:C,sortBy:"name",userId:null===T||void 0===T?void 0:T.user_id})).catch((e=>I(!1))).finally((()=>I(!1)))}),[]);return(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(o.A,{children:[(0,h.jsxs)(l.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,h.jsx)(r.A,{variant:"h4",children:"INVENTORY"}),(0,h.jsx)(a.A,{variant:"contained",startIcon:(0,h.jsx)(c.A,{icon:"eva:plus-fill"}),onClick:()=>e("/dashboard/inventory/newVehicle"),children:"Add"})]}),(0,h.jsx)(l.A,{direction:"row",alignItems:"center",justifyContent:"space-between",mt:2,children:(0,h.jsxs)(l.A,{children:[(0,h.jsxs)(a.A,{color:"inherit",disableRipple:!0,onClick:e=>{A(e.currentTarget)},endIcon:(0,h.jsx)(c.A,{icon:x?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Sort By:\xa0",(0,h.jsx)(r.A,{component:"span",variant:"subtitle2",sx:{color:"text.secondary",borderBottom:"1px solid black"},children:y})]}),(0,h.jsx)(s.A,{keepMounted:!0,anchorEl:x,open:Boolean(x),onClose:()=>{A(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:N.map(((e,n)=>(0,h.jsx)(d.A,{selected:y===e.label,onClick:()=>{return n=e.value,i=e.condition,o=e.label,I(!0),t((0,_.M)({timeRange:f,orderDirection:i,sortBy:n,userId:null===T||void 0===T?void 0:T.user_id})).finally((()=>I(!1))),j(o),void A(null);var n,i,o},sx:{typography:"body2"},children:e.label},e.value+"_"+e.condition)))})]})}),(0,h.jsx)(F,{inventoryData:R,loading:S})]})})}},7894:(e,t,n)=>{n.d(t,{K:()=>a,H:()=>f});var i=n(4882),o=n(8076),l=n(2420),r=n(579);function a(e){let{order:t,orderBy:n,rowCount:a,headLabel:s,numSelected:d,onRequestSort:c,onSelectAllClick:u}=e;return(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{children:s.map(((e,i)=>(0,r.jsx)(l.A,{align:e.alignRight?"right":"left",sortDirection:n===e.id&&t,children:e.label},i)))})})}var s=n(4535),d=n(5263),c=n(5865),u=n(5869),h=n(5043),v=n(8977),m=n(688),p=n(2143),x=n(9456),A=n(9907),b=n(3178);const g=[{value:"auctioneer",label:"Auctioneer"},{value:"auction",label:"Auction"},{value:"condition_light",label:"Condition Light"},{value:"sale_status",label:"Sale Status"}];function y(e){let{weekId:t,userId:n,setLoader:i}=e;const[o,l]=(0,h.useState)(null),[a,s]=(0,h.useState)("auctioneer"),d=(0,x.wA)(),{filterType:y}=(0,x.d4)((e=>e.users)),j=(e,o)=>{i(!0),"auctioneer"===e?d((0,A.Np)({userId:n,weekId:t})).finally((()=>i(!1))):"auction"===e?d((0,A.x1)({user_id:n,week_id:t})).finally((()=>i(!1))):"condition_light"===e?d((0,A.S4)({user_id:n,week_id:t})).finally((()=>i(!1))):"sale_status"===e&&d((0,A.yh)({user_id:n,week_id:t})).finally((()=>i(!1))),s(o),d((0,b.T)(e)),l(null)};(0,h.useEffect)((()=>{const e=g.find((e=>e.value===y)),t=e?e.label:"Auctioneer";j(y||"auctioneer",t)}),[]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(v.A,{color:"inherit",disableRipple:!0,onClick:e=>{l(e.currentTarget)},endIcon:(0,r.jsx)(u.A,{icon:o?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Filter by \xa0",(0,r.jsx)(c.A,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:a})]}),(0,r.jsx)(m.A,{keepMounted:!0,anchorEl:o,open:Boolean(o),onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:g.map((e=>(0,r.jsx)(p.A,{selected:e.value===a,onClick:()=>j(e.value,e.label),sx:{typography:"body2"},children:e.label},e.value)))})]})}const j=(0,s.Ay)(d.A)((e=>{let{theme:t}=e;return{height:60,display:"flex",justifyContent:"flex-end",padding:t.spacing(0,1,0,3)}}));function f(e){let{numSelected:t,weekId:n,userId:i,setLoader:o}=e;return(0,r.jsx)(j,{sx:{...t>0&&{color:"primary.main",bgcolor:"primary.lighter"}},children:t>0?(0,r.jsxs)(c.A,{component:"div",variant:"subtitle1",children:[t," selected"]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(y,{weekId:n,userId:i,setLoader:o})})})}},9650:(e,t,n)=>{n.d(t,{A:()=>x});var i=n(8168),o=n(8587),l=n(5043),r=n(9292),a=n(8606),s=n(2876),d=n(4535),c=n(7056),u=n(2400);function h(e){return(0,u.Ay)("MuiTableContainer",e)}(0,c.A)("MuiTableContainer",["root"]);var v=n(579);const m=["className","component"],p=(0,d.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),x=l.forwardRef((function(e,t){const n=(0,s.A)({props:e,name:"MuiTableContainer"}),{className:l,component:d="div"}=n,c=(0,o.A)(n,m),u=(0,i.A)({},n,{component:d}),x=(e=>{const{classes:t}=e;return(0,a.A)({root:["root"]},h,t)})(u);return(0,v.jsx)(p,(0,i.A)({ref:t,as:d,className:(0,r.A)(x.root,l),ownerState:u},c))}))},4882:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(8168),o=n(8587),l=n(5043),r=n(9292),a=n(8606),s=n(1573),d=n(2876),c=n(4535),u=n(7056),h=n(2400);function v(e){return(0,h.Ay)("MuiTableHead",e)}(0,u.A)("MuiTableHead",["root"]);var m=n(579);const p=["className","component"],x=(0,c.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),A={variant:"head"},b="thead",g=l.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiTableHead"}),{className:l,component:c=b}=n,u=(0,o.A)(n,p),h=(0,i.A)({},n,{component:c}),g=(e=>{const{classes:t}=e;return(0,a.A)({root:["root"]},v,t)})(h);return(0,m.jsx)(s.A.Provider,{value:A,children:(0,m.jsx)(x,(0,i.A)({as:c,className:(0,r.A)(g.root,l),ref:t,role:c===b?null:"rowgroup",ownerState:h},u))})}))},3568:(e,t,n)=>{e.exports=n.p+"static/media/trash.5795bffc2e3ba17cfc33.png"}}]);
//# sourceMappingURL=108.32e76dbe.chunk.js.map

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists