/
home
/
infinitibizsol
/
www
/
auction-sync.com
/
static
/
js
/
File Upload :
llllll
Current File: /home/infinitibizsol/www/auction-sync.com/static/js/770.7fbbb7a2.chunk.js
"use strict";(self.webpackChunk_minimal_material_kit_react=self.webpackChunk_minimal_material_kit_react||[]).push([[770],{2770:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var o=i(2791),n=i(1614),l=i(3767),a=i(890),r=i(9113),d=i(4830),s=i(6934),c=(i(7870),i(2065)),u=i(4554);(0,s.ZP)(u.Z)((e=>{let{theme:t,ownerState:i}=e;const o="light"===t.palette.mode,n="filled"===i.variant,l="outlined"===i.variant,a="soft"===i.variant,r={..."default"===i.color&&{...l&&{backgroundColor:"transparent",color:t.palette.text.primary,border:"1px solid ".concat((0,c.Fq)(t.palette.grey[500],.32))},...a&&{color:o?t.palette.text.primary:t.palette.common.white,backgroundColor:(0,c.Fq)(t.palette.grey[500],.16)}}},d={..."default"!==i.color&&{...n&&{color:t.palette[i.color].contrastText,backgroundColor:t.palette[i.color].main},...l&&{backgroundColor:"transparent",color:t.palette[i.color].main,border:"1px solid ".concat(t.palette[i.color].main)},...a&&{color:t.palette[i.color][o?"dark":"light"],backgroundColor:(0,c.Fq)(t.palette[i.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:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...d,...r}}));var h=i(184);var v=i(3609);(0,s.ZP)("img")({top:0,width:"100%",height:"100%",objectFit:"contain",position:"absolute"}),(0,d.Z)({root:{minWidth:500}});var p=i(1889),g=i(9281),x=i(9836),m=i(3382),y=i(5855),b=i(3994),f=i(7047),j=i(7689),w=i(7267),Z=i(8252);function _(e){let{productsData:t,loading:i,...n}=e;const l=(0,j.s0)(),[d,s]=(0,o.useState)([]);(0,o.useEffect)((()=>{s([{id:"image",label:"Image"},{id:"title",label:"Title"},{id:"sale_status",label:"Sale Status"},{id:"vin",label:"VIN"},{id:"condition_light",label:"Condition"},{id:"auction",label:"Auction"},{id:"lane",label:"Lane"},{id:"run_no",label:"Run"}])}),[]);return!(null!==t&&void 0!==t&&t.length)>0&&!i?(0,h.jsx)("h1",{style:{marginTop:"100px"},children:"No results were found!"}):(0,h.jsx)(p.ZP,{container:!0,...n,justifyContent:"center",children:(0,h.jsxs)(g.Z,{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.jsxs)(x.Z,{stickyHeader:!0,size:"small",children:[(0,h.jsx)(Z.e,{headLabel:d}),i?(0,h.jsx)(m.Z,{children:[...Array(3)].map(((e,t)=>(0,h.jsx)(y.Z,{children:null===d||void 0===d?void 0:d.map(((e,t)=>(0,h.jsx)(b.Z,{children:(0,h.jsx)(f.Z,{variant:"text",sx:{fontSize:"2.1rem",borderRadius:"10px"}})},t)))},t)))}):(0,h.jsx)(m.Z,{children:(0,h.jsx)(o.Fragment,{children:null===t||void 0===t?void 0:t.map(((e,t)=>(0,h.jsxs)(y.Z,{children:[(0,h.jsx)(b.Z,{children:(0,h.jsx)("img",{src:"".concat(r.q,"/").concat(null===e||void 0===e?void 0:e.imageUrl),height:40,width:40,alt:"",style:{objectFit:"contain"}})}),(0,h.jsx)(b.Z,{children:(0,h.jsx)(a.Z,{style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden",fontWeight:"bold",cursor:"pointer",minWidth:"170px"},onClick:()=>l("/dashboard/opportunities/users/cars/preview",{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)(b.Z,{style:{minWidth:"130px",color:!0===(null===e||void 0===e?void 0:e.sale_status)?"#008000":"#C70039"},children:!0===(null===e||void 0===e?void 0:e.sale_status)?"SOLD":"NOT SOLD"}),(0,h.jsx)(b.Z,{style:{width:140},children:(null===e||void 0===e?void 0:e.vin)||""}),(0,h.jsx)(b.Z,{children:(0,h.jsx)(w.Z,{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)?"#FFBF00":3===(null===e||void 0===e?void 0:e.condition_light)?"#008000":"transparent",fontSize:"30px"}})}),(0,h.jsx)(b.Z,{style:{display:"-webkit-box",WebkitLineClamp:"2",WebkitBoxOrient:"vertical",overflow:"hidden",width:80},children:"".concat((null===e||void 0===e?void 0:e.auction_name)||"")}),(0,h.jsx)(b.Z,{style:{width:100},children:"".concat((null===e||void 0===e?void 0:e.lane_name)||"")}),(0,h.jsx)(b.Z,{style:{width:100},children:"".concat((null===e||void 0===e?void 0:e.run_no)||"")})]},t)))})})]})]})})}var k=i(4518),C=i(1715),S=i(3786),I=i(3240);const F=[{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(e){let{stateData:t,setVehicles:i,url:n,setLoading:l}=e;const[d,s]=(0,o.useState)(null),[c,u]=(0,o.useState)("ASC: (A TO Z)");return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(k.Z,{color:"inherit",disableRipple:!0,onClick:e=>{s(e.currentTarget)},endIcon:(0,h.jsx)(v.Z,{icon:d?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Sort By:\xa0",(0,h.jsx)(a.Z,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:c})]}),(0,h.jsx)(C.Z,{keepMounted:!0,anchorEl:d,open:Boolean(d),onClose:()=>{s(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:F.map(((e,o)=>(0,h.jsx)(S.Z,{selected:c===e.label,onClick:()=>(async(e,o,a)=>{l(!0),s(null);try{const{data:a}=await I.Z.post("".concat(r.v,"/").concat(n),{...t,sortBy:e,orderDirection:o},{headers:{"Content-Type":"application/json"}});a&&(i(a.data),l(!1))}catch(d){console.log(d),l(!1)}u(a)})(e.value,e.condition,e.label),sx:{typography:"body2"},children:e.label},o)))})]})}i(4942);var A=i(9434);function T(){const e=(0,j.s0)(),{state:t}=(0,j.TH)(),[i,d]=(0,o.useState)(!1),[s,c]=(0,o.useState)([]),[u,v]=(0,o.useState)(null),[p,g]=(0,o.useState)(null),[x,m]=(0,o.useState)(!0),{userInfo:y}=(0,A.v9)((e=>e.auth));return(0,o.useEffect)((()=>{if(!t)return e("/dashboard/opportunities");let i,o={};"auction"===t.filter&&(o={auctioneer_id:null===y||void 0===y?void 0:y.user_id,week_id:null===t||void 0===t?void 0:t.week_id,orderDirection:"ASC",sortBy:"name"},"Uncategorized"===(null===t||void 0===t?void 0:t.name)?o.filter_type="unCategorized":o.auction_id=null===t||void 0===t?void 0:t.auction_id,i="auction/auctioneer-vehicles-by-auctionId"),"condition_light"===t.filter&&(o={condition_light:null===t||void 0===t?void 0:t.condition_light,auctioneer_id:null===t||void 0===t?void 0:t.auctioneer_id,week_id:null===t||void 0===t?void 0:t.week_id,orderDirection:"ASC",sortBy:"name"},i="auctioneer/get-condition-light-vehicles"),"sales_status"===t.filter&&(o={sale_status:null===t||void 0===t?void 0:t.sale_status,auctioneer_id:null===t||void 0===t?void 0:t.auctioneer_id,week_id:null===t||void 0===t?void 0:t.week_id,orderDirection:"ASC",sortBy:"name"},i="auctioneer/get-sale-status-vehicles"),"users"===t.filter&&(o={user_id:null===t||void 0===t?void 0:t.user_id,auctioneer_id:null===t||void 0===t?void 0:t.auctioneer_id,weekId:null===t||void 0===t?void 0:t.week_id,orderDirection:"ASC",sortBy:"name"},i="auctioneer/auctioneer-vehicles-only"),(async(e,t)=>{m(!0);try{const{data:i}=await I.Z.post("".concat(r.v,"/").concat(e),{...t},{headers:{"Content-Type":"application/json"}});i&&(c(i.data),m(!1))}catch(i){console.log(i),m(!1)}})(i,o),v(o),g(i)}),[t]),(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(n.Z,{children:[(0,h.jsxs)(l.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",fontWeight:"bold",mb:0,children:[(0,h.jsxs)(a.Z,{variant:"h6",children:[null===t||void 0===t?void 0:t.startDate," - ",null===t||void 0===t?void 0:t.endDate," "]}),(0,h.jsx)(a.Z,{variant:"h6",children:null===t||void 0===t?void 0:t.name}),(0,h.jsxs)(a.Z,{variant:"h6",children:[null===s||void 0===s?void 0:s.length," units"]})]}),(0,h.jsx)(l.Z,{direction:"row",flexWrap:"wrap-reverse",alignItems:"center",justifyContent:"flex-end",children:(0,h.jsx)(l.Z,{direction:"row",spacing:1,flexShrink:0,sx:{my:1},children:(0,h.jsx)(D,{weekId:null===t||void 0===t?void 0:t.weekId,setVehicles:c,stateData:u,url:p,setLoading:m})})}),(0,h.jsx)(_,{productsData:s,loading:x})]})})}},8252:(e,t,i)=>{i.d(t,{e:()=>r,s:()=>S});var o=i(6890),n=i(5855),l=i(3994),a=i(184);function r(e){let{order:t,orderBy:i,rowCount:r,headLabel:d,numSelected:s,onRequestSort:c,onSelectAllClick:u}=e;return(0,a.jsx)(o.Z,{children:(0,a.jsx)(n.Z,{children:d.map(((e,o)=>(0,a.jsx)(l.Z,{align:e.alignRight?"right":"left",sortDirection:i===e.id&&t,children:e.label},o)))})})}var d=i(6934),s=i(2065),c=i(4663),u=i(8029),h=i(890),v=i(3466),p=i(3767),g=i(3609),x=i(2791),m=i(4518),y=i(1715),b=i(3786),f=i(9434),j=i(8400),w=i(8300);const Z=[{value:"whole_saler",label:"Wholesalers"},{value:"auction",label:"Auction"},{value:"condition_light",label:"Condition Light"},{value:"sale_status",label:"Sale Status"}];function _(e){let{weekId:t,auctioneerId:i,setLoader:o}=e;const[n,l]=(0,x.useState)(null),[r,d]=(0,x.useState)("whole_saler"),s=(0,f.I0)(),{userData:c}=(0,f.v9)((e=>e.users)),u=(e,n)=>{o(!0),"sale_status"===e?s((0,j.im)({auctioneerId:i,weekId:t})).finally((()=>o(!1))):"condition_light"===e?s((0,j.Ow)({auctioneerId:i,weekId:t})).finally((()=>o(!1))):"whole_saler"===e?s((0,j.v6)({auctioneerId:i,weekId:t})).finally((()=>o(!1))):"auction"===e&&s((0,j.fp)({auctioneerId:i,weekId:t})).finally((()=>o(!1))),d(n),s((0,w.j)(e)),l(null)};(0,x.useEffect)((()=>{const e=Z.find((e=>e.value===(null===c||void 0===c?void 0:c.filter_type))),t=e?e.label:"Wholesalers";u(null!==c&&void 0!==c&&c.filter_type?null===c||void 0===c?void 0:c.filter_type:"whole_saler",t)}),[]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(m.Z,{color:"inherit",disableRipple:!0,onClick:e=>{l(e.currentTarget)},endIcon:(0,a.jsx)(g.Z,{icon:n?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Filter by \xa0",(0,a.jsx)(h.Z,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:r})]}),(0,a.jsx)(y.Z,{keepMounted:!0,anchorEl:n,open:Boolean(n),onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:Z.map((e=>(0,a.jsx)(b.Z,{selected:"auctioneer"===e.value,onClick:()=>u(e.value,e.label),sx:{typography:"body2"},children:e.label},e.value)))})]})}const k=(0,d.ZP)(c.Z)((e=>{let{theme:t}=e;return{height:60,display:"flex",justifyContent:"space-between",padding:t.spacing(0,1,0,3)}})),C=(0,d.ZP)(u.Z)((e=>{let{theme:t}=e;return{width:240,transition:t.transitions.create(["box-shadow","width"],{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.shorter}),"&.Mui-focused":{width:280,boxShadow:t.customShadows.z8},"& fieldset":{borderWidth:"1px !important",borderColor:"".concat((0,s.Fq)(t.palette.grey[500],.32)," !important")},"& input":{paddingTop:10,paddingBottom:10}}}));function S(e){let{numSelected:t,filterName:i,searchValue:o,weekId:n,auctioneerId:l,setLoader:r}=e;return(0,a.jsx)(k,{sx:{...t>0&&{color:"primary.main",bgcolor:"primary.lighter"}},children:t>0?(0,a.jsxs)(h.Z,{component:"div",variant:"subtitle1",children:[t," selected"]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{value:i,onChange:o,py:1,placeholder:"Search ...",sx:{py:0},startAdornment:(0,a.jsx)(v.Z,{position:"start",children:(0,a.jsx)(g.Z,{icon:"eva:search-fill",sx:{color:"text.disabled",width:20,height:20}})})}),(0,a.jsx)(p.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:(0,a.jsx)(_,{weekId:n,auctioneerId:l,setLoader:r})})]})})}}}]); //# sourceMappingURL=770.7fbbb7a2.chunk.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure