Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/static.3/js/
Upload File :
Current File : /home/infinitibizsol/.trash/static.3/js/420.c931343f.chunk.js

"use strict";(self.webpackChunk_minimal_material_kit_react=self.webpackChunk_minimal_material_kit_react||[]).push([[420],{6657:(e,i,t)=>{t(579);t(5869);t(5043)},7550:(e,i,t)=>{t(5043);var o=t(4535),n=t(310),l=t(6446);(0,o.Ay)(l.A)((e=>{let{theme:i,ownerState:t}=e;const o="light"===i.palette.mode,l="filled"===t.variant,a="outlined"===t.variant,r="soft"===t.variant,s={..."default"===t.color&&{...a&&{backgroundColor:"transparent",color:i.palette.text.primary,border:"1px solid ".concat((0,n.X4)(i.palette.grey[500],.32))},...r&&{color:o?i.palette.text.primary:i.palette.common.white,backgroundColor:(0,n.X4)(i.palette.grey[500],.16)}}},d={..."default"!==t.color&&{...l&&{color:i.palette[t.color].contrastText,backgroundColor:i.palette[t.color].main},...a&&{backgroundColor:"transparent",color:i.palette[t.color].main,border:"1px solid ".concat(i.palette[t.color].main)},...r&&{color:i.palette[t.color][o?"dark":"light"],backgroundColor:(0,n.X4)(i.palette[t.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"capitalize",padding:i.spacing(0,1),color:i.palette.grey[800],fontSize:i.typography.pxToRem(12),fontFamily:i.typography.fontFamily,backgroundColor:i.palette.grey[300],fontWeight:i.typography.fontWeightBold,...d,...s}}));t(579)},8288:(e,i,t)=>{t.d(i,{A:()=>w});var o=t(5043),n=t(3216),l=t(9456),a=t(1036),r=t(1551),s=t(4535),d=(t(3338),t(7550),t(6657),t(3568),t(7858),t(579));(0,s.Ay)("img")({top:0,width:"100%",height:"80%",objectFit:"contain",position:"absolute"}),(0,s.Ay)("img")({top:"100%",right:0,transform:"translate(0%, -100%)",width:"100%",height:"50%",objectFit:"contain",position:"absolute"}),(0,r.A)({root:{minWidth:400,height:150}});var c=t(5660),u=t(6187),h=t(8903),p=t(6446),v=t(8911),g=t(8446),m=t(3217),x=t(9588),y=t(2812),b=t(7154),A=t(9907);const f=(0,s.Ay)("img")({top:0,width:"100%",height:"80%",objectFit:"contain",position:"absolute"}),j=(0,r.A)({root:{minWidth:400,height:150}});function w(e){let{allVehiclesWithStatus:i,weekId:t,auctioneerId:r,opportunityId:s,name:w,totalUnits:_,startDate:k,endDate:C,...I}=e;console.log("\ud83d\ude80 ~ allVehiclesWithStatus:",i);const S=j(),F=(0,n.Zp)(),W=(0,l.wA)(),[D,R]=(0,o.useState)(!1),[L,z]=(0,o.useState)([]),{vehiclesData:E}=(0,l.d4)((e=>e.users)),{userInfo:V}=(0,l.d4)((e=>e.auth)),{state:B}=(0,n.zy)(),N=e=>E.some((i=>i.vehicle_id===e));(0,o.useEffect)((()=>{let e=[];null===E||void 0===E||E.map((i=>e.push(i.vehicle_id))),console.log("\ud83d\ude80 ~ useEffect ~ assignedVehiclesArray:",e),z(e)}),[E]);return(0,d.jsxs)(h.Ay,{container:!0,spacing:3,mt:5,...I,children:[null===i||void 0===i?void 0:i.map(((e,i)=>(0,d.jsx)(h.Ay,{item:!0,xs:12,sm:12,md:12,children:(0,d.jsx)(c.A,{className:S.root,children:(0,d.jsxs)(h.Ay,{container:!0,sx:{cursor:"pointer"},children:[(0,d.jsx)(h.Ay,{item:!0,xs:4,sm:4,children:(0,d.jsx)(p.A,{sx:{pt:"50%",position:"relative",cursor:"pointer"},children:(0,d.jsx)(f,{alt:e.make,src:"".concat(x.Jz,"/").concat(e.imageUrl)})})}),(0,d.jsx)(h.Ay,{item:!0,xs:6,sm:6,children:(0,d.jsxs)(v.A,{spacing:4,p:3,children:[(0,d.jsx)(v.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:(0,d.jsx)(g.A,{color:"inherit",underline:"hover",children:(0,d.jsx)(p.A,{sx:{fontWeight:"bold",fontSize:"25px"},children:"".concat(e.year," ").concat(e.make," ").concat(e.model)})})}),(0,d.jsxs)(v.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,d.jsx)(u.A,{noWrap:!0,children:e.vin}),(0,d.jsx)(p.A,{sx:{marginRight:"50px"},children:(0,d.jsx)(u.A,{noWrap:!0,children:e.mileage?"".concat(e.mileage," mi."):""})})]})]})}),(0,d.jsx)(h.Ay,{item:!0,xs:2,sm:2,children:(0,d.jsx)(p.A,{sx:{pt:"20px",pl:"30px",position:"relative",cursor:"pointer"},children:(0,d.jsx)("span",{onClick:()=>{return null===e||void 0===e||e.vehicle_id,i=null===e||void 0===e?void 0:e.status,t=null===e||void 0===e?void 0:e.auctioneer_name,o=null===e||void 0===e?void 0:e.selected_date,console.log("\ud83d\ude80 ~ handleClick ~ status:",i),void(!0===i&&a.oR.warning("This Vehicle has already assigned to ".concat(t,", \n             on ").concat(o,". Please remove it first!")));var i,t,o},children:(0,d.jsx)(m.A,{color:"success",size:"large",checked:L.includes(e.vehicle_id)||e.status,onChange:()=>{return i=e.vehicle_id,void z((e=>e.includes(i)||N(i)?e.filter((e=>e!==i)):[...e,i]));var i},disabled:N(e.vehicle_id)||e.status})})})})]})})},i))),(0,d.jsx)(h.Ay,{container:!0,direction:"row",justifyContent:"center",alignItems:"center",m:4,children:(0,d.jsx)(y.A,{loading:D,size:"large",type:"submit",variant:"contained",onClick:async()=>{let e=L.filter((e=>!E.some((i=>(null===i||void 0===i?void 0:i.vehicle_id)===e))));if(console.log("\ud83d\ude80 ~ handleSubmit ~ filteredSelectedVehicles:",e),!(null!==e&&void 0!==e&&e.length)>0)return a.oR.error("Please select a vehicle");R(!0);try{const i=await b.A.post("".concat(x.VY,"/vehicle/assign-vehicle-to-auctioneer"),{car_ids:e,auctioneerId:r,userId:null===V||void 0===V?void 0:V.user_id,weekId:t});200===(null===i||void 0===i?void 0:i.status)&&(a.oR.success("Vehicle assigned successfully"),R(!1),W((0,A.Np)({userId:null===V||void 0===V?void 0:V.user_id,weekId:t})),F("/dashboard/opportunities/users/cars",{state:{name:w,totalUnits:_,startDate:k,endDate:C,weekId:t,filterValue:"auctioneer",filterId:s,opportunity_id:s,auctioneerId:r}}))}catch(i){R(!1),console.log("[Error]",i)}},children:"Update"})})]})}},7643:(e,i,t)=>{t.d(i,{EL:()=>F,Eh:()=>V});var o=t(5043),n=t(1551),l=t(4535),a=(t(3338),t(7550),t(6657),t(3568)),r=t(1036),s=t(9456),d=t(579);(0,l.Ay)("img")({top:"10%",width:"100%",height:"100%",objectFit:"contain",position:"absolute"}),(0,l.Ay)("img")({top:"50%",width:"100%",height:"100%",objectFit:"contain",position:"absolute"}),(0,n.A)({root:{minWidth:400,maxWidth:1e3}});var c=t(6187),u=t(8534),h=t(8903),p=t(9650),v=t(1806),g=t(3460),m=t(8076),x=t(2420),y=t(7625),b=t(6446),A=t(8911),f=t(3216),j=t(3383),w=t(9588),_=t(7154),k=t(9907),C=t(7894);const I=(0,l.Ay)("img")({height:50,objectFit:"contain"}),S={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",border:"2px solid black",borderRadius:2,boxShadow:24,p:4};function F(e){let{productsData:i,weekId:t,auctioneerId:l,opportunityId:k,name:F,totalUnits:W,startDate:D,endDate:R,filterValue:L,...z}=e;const E=(0,n.A)((e=>({root:{minWidth:400,..."auctioneer"===L&&{maxWidth:1e3},..."auctioneer"!==L&&{maxWidth:1500}}}))),V=(0,f.Zp)(),[B,N]=(E(),(0,o.useState)(!1)),T=()=>N(!1),[O,U]=(0,o.useState)([]),[H,M]=(0,o.useState)(null),{userInfo:Y}=((0,s.wA)(),(0,s.d4)((e=>e.auth)));return(0,o.useEffect)((()=>{U([{id:"image",label:"Image"},{id:"title",label:"Title"},{id:"sale_status",label:"Sale Status"},{id:"vin",label:"VIN"},{id:"condition_light",label:"Condition"},{id:"mileage",label:"Mileage"},{id:"auction",label:"Auction"},{id:"lane",label:"Lane"},{id:"run_no",label:"Run"},{id:"action",label:"Action"}])}),[]),!(null!==i&&void 0!==i&&i.length)>0?(0,d.jsx)("h1",{style:{marginTop:"100px"},children:"No results were found!"}):(0,d.jsxs)(h.Ay,{container:!0,...z,children:[(0,d.jsx)(p.A,{sx:{maxHeight:440},children:(0,d.jsxs)(v.A,{stickyHeader:!0,children:[(0,d.jsx)(C.K,{headLabel:O}),(0,d.jsx)(g.A,{children:(0,d.jsx)(o.Fragment,{children:null===i||void 0===i?void 0:i.map(((e,i)=>(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(m.A,{children:[(0,d.jsx)(x.A,{children:(0,d.jsx)("img",{src:"".concat(w.Jz,"/").concat(null===e||void 0===e?void 0:e.imageUrl),height:80,width:80,alt:"",style:{objectFit:"contain"}})}),(0,d.jsx)(x.A,{children:(0,d.jsx)(c.A,{style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden",fontWeight:"bold",cursor:"pointer",width:"180px"},onClick:()=>V("/dashboard/opportunities/users/cars/preview",{state:{product:e,auctioneerId:"auctioneer"===L?l:null===e||void 0===e?void 0:e.auctioneer_id}}),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,d.jsx)(x.A,{style:{minWidth:"120px",color:!0===(null===e||void 0===e?void 0:e.sale_status)?"#023020":"#C70039"},children:!0===(null===e||void 0===e?void 0:e.sale_status)?"SOLD":"NOT SOLD"}),(0,d.jsx)(x.A,{style:{minWidth:160},children:(null===e||void 0===e?void 0:e.vin)||""}),(0,d.jsx)(x.A,{style:{width:"60px"},children:(0,d.jsx)(j.A,{style:{color:1===(null===e||void 0===e?void 0:e.condition_light)?"#FF0000":2===(null===e||void 0===e?void 0:e.condition_light)?"#FFFF00":3===(null===e||void 0===e?void 0:e.condition_light)?"#008000":"transparent",fontSize:"30px"}})}),(0,d.jsx)(x.A,{style:{width:100},children:"".concat((null===e||void 0===e?void 0:e.mileage)||"")}),(0,d.jsx)(x.A,{style:{width:100},children:"".concat((null===e||void 0===e?void 0:e.auction_name)||"")}),(0,d.jsx)(x.A,{style:{width:100},children:"".concat((null===e||void 0===e?void 0:e.lane_name)||"")}),(0,d.jsx)(x.A,{style:{width:100},children:"".concat((null===e||void 0===e?void 0:e.run_no)||"")}),(0,d.jsx)(x.A,{children:(0,d.jsx)(I,{style:{cursor:"pointer"},alt:null===e||void 0===e?void 0:e.make,src:a,onClick:()=>{N(!0),M(null===e||void 0===e?void 0:e.vehicle_id)}})})]},i)})))})})]})}),(0,d.jsx)(y.A,{open:B,onClose:T,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:(0,d.jsxs)(b.A,{sx:S,children:[(0,d.jsx)(c.A,{id:"modal-modal-title",variant:"h6",component:"h2",sx:{mb:1,textAlign:"center"},children:"Are you sure you want to delete"}),(0,d.jsx)(c.A,{id:"modal-modal-description",variant:"h6",component:"h2",align:"center",children:"this vehicle?"}),(0,d.jsxs)(A.A,{spacing:2,direction:"row",justifyContent:"center",alignItems:"flex-end",sx:{mt:2},children:[(0,d.jsx)(u.A,{variant:"contained",style:{width:"150px",backgroundColor:"#4CAF50",borderRadius:"30px",color:"white",marginRight:"8px",fontWeight:"bold"},onClick:()=>{(async()=>{try{const e=await _.A.patch("".concat(w.VY,"/vehicle/remove-vehicle-from-auctioneer"),{carIds:[H]});200===e.status?(r.oR.success("Vehicle unassigned successfully"),N(!1),V(0)):(N(!1),console.log("Failed to unassign vehicle. Status: ".concat(e.status)))}catch(e){console.error("Error unassigning vehicle",e),N(!1)}})()},children:"Yes"}),(0,d.jsx)(u.A,{variant:"contained",style:{width:"150px",backgroundColor:"#E53935",borderRadius:"30px",color:"white",fontWeight:"bold"},onClick:T,children:"No"})]})]})})]})}var W=t(8977),D=t(5865),R=t(688),L=t(2143),z=t(5869);t(3536);const E=[{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 V(e){let{weekId:i,filterName:t,filterId:n,filterData:l,setLoading:a}=e;const[r,c]=(0,o.useState)(null),[u,h]=(0,o.useState)(""),p=(0,s.wA)(),{userInfo:v}=(0,s.d4)((e=>e.auth));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(W.A,{color:"inherit",disableRipple:!0,onClick:e=>{c(e.currentTarget)},endIcon:(0,d.jsx)(z.A,{icon:r?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Sort By:\xa0",(0,d.jsx)(D.A,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:u})]}),(0,d.jsx)(R.A,{keepMounted:!0,anchorEl:r,open:Boolean(r),onClose:()=>{c(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:E.map(((e,o)=>(0,d.jsx)(L.A,{selected:0===o,onClick:()=>((e,o,r)=>{a(!0),"auctioneer"===t?p((0,k.e2)({user_id:null===v||void 0===v?void 0:v.user_id,opportunity_id:n,weekId:i,sortBy:e,orderDirection:o})).finally((()=>a(!1))):"auction"===t?p((0,k.oB)({user_id:null===v||void 0===v?void 0:v.user_id,week_id:i,auction_id:n,sortBy:e,orderDirection:o})).finally((()=>a(!1))):"saleStatus"===t?p((0,k.FZ)({user_id:null===v||void 0===v?void 0:v.user_id,week_id:i,sale_status:l,sortBy:e,orderDirection:o})).finally((()=>a(!1))):"conditonLight"===t&&p((0,k.P9)({condition_light:l,user_id:null===v||void 0===v?void 0:v.user_id,week_id:i,sortBy:e,orderDirection:o})).finally((()=>a(!1))),h(r),c(null)})(e.value,e.condition,e.label),sx:{typography:"body2"},children:e.label},e.value+"_"+e.condition)))})]})}t(2500)},7894:(e,i,t)=>{t.d(i,{K:()=>c,H:()=>_});var o=t(4882),n=t(8076),l=t(2420),a=t(8093),r=t(6446),s=t(579);const d={border:0,margin:-1,padding:0,width:"1px",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",clip:"rect(0 0 0 0)"};function c(e){let{order:i,orderBy:t,rowCount:c,headLabel:u,numSelected:h,onRequestSort:p,onSelectAllClick:v}=e;return(0,s.jsx)(o.A,{children:(0,s.jsx)(n.A,{children:u.map(((e,o)=>{return(0,s.jsx)(l.A,{align:e.alignRight?"right":"left",sortDirection:t===e.id&&i,children:(0,s.jsxs)(a.A,{hideSortIcon:!0,active:t===e.id,direction:t===e.id?i:"asc",onClick:(n=e.id,e=>{p(e,n)}),children:[e.label,t===e.id?(0,s.jsx)(r.A,{sx:{...d},children:"desc"===i?"sorted descending":"sorted ascending"}):null]})},o);var n}))})})}var u=t(4535),h=t(5263),p=t(5865),v=t(5869),g=t(5043),m=t(8977),x=t(688),y=t(2143),b=t(9456),A=t(9907);const f=[{value:"auctioneer",label:"Auctioneer"},{value:"auction",label:"Auction"},{value:"condition_light",label:"Condition Light"},{value:"sale_status",label:"Sale Status"}];function j(e){let{weekId:i,userId:t,setLoader:o}=e;const[n,l]=(0,g.useState)(null),[a,r]=(0,g.useState)("auctioneer"),d=(0,b.wA)(),{filterType:c}=(0,b.d4)((e=>e.users)),u=(e,n)=>{o(!0),"auctioneer"===e?d((0,A.Np)({userId:t,weekId:i})).finally((()=>o(!1))):"auction"===e?d((0,A.x1)({user_id:t,week_id:i})).finally((()=>o(!1))):"condition_light"===e?d((0,A.S4)({user_id:t,week_id:i})).finally((()=>o(!1))):"sale_status"===e&&d((0,A.yh)({user_id:t,week_id:i})).finally((()=>o(!1))),r(n||e),l(null)};(0,g.useEffect)((()=>{u(c||"auctioneer")}),[]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(m.A,{color:"inherit",disableRipple:!0,onClick:e=>{l(e.currentTarget)},endIcon:(0,s.jsx)(v.A,{icon:n?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Filter by \xa0",(0,s.jsx)(p.A,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:a})]}),(0,s.jsx)(x.A,{keepMounted:!0,anchorEl:n,open:Boolean(n),onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:f.map((e=>(0,s.jsx)(y.A,{selected:e.value===a,onClick:()=>u(e.value,e.label),sx:{typography:"body2"},children:e.label},e.value+"_"+e.label)))})]})}const w=(0,u.Ay)(h.A)((e=>{let{theme:i}=e;return{height:96,display:"flex",justifyContent:"flex-end",padding:i.spacing(0,1,0,3)}}));function _(e){let{numSelected:i,filterName:t,onFilterName:o,weekId:n,userId:l,setLoader:a}=e;return(0,s.jsx)(w,{sx:{...i>0&&{color:"primary.main",bgcolor:"primary.lighter"}},children:i>0?(0,s.jsxs)(p.A,{component:"div",variant:"subtitle1",children:[i," selected"]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(j,{weekId:n,userId:l,setLoader:a})})})}},3568:(e,i,t)=>{e.exports=t.p+"static/media/trash.5795bffc2e3ba17cfc33.png"}}]);
//# sourceMappingURL=420.c931343f.chunk.js.map

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