Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/static.3/js/
Upload File :
Current File : /home/infinitibizsol/.trash/static.3/js/524.f06f7f27.chunk.js

"use strict";(self.webpackChunk_minimal_material_kit_react=self.webpackChunk_minimal_material_kit_react||[]).push([[524],{7550:(e,i,t)=>{t(5043);var n=t(4535),l=t(310),o=t(6446);(0,n.Ay)(o.A)((e=>{let{theme:i,ownerState:t}=e;const n="light"===i.palette.mode,o="filled"===t.variant,r="outlined"===t.variant,d="soft"===t.variant,a={..."default"===t.color&&{...r&&{backgroundColor:"transparent",color:i.palette.text.primary,border:"1px solid ".concat((0,l.X4)(i.palette.grey[500],.32))},...d&&{color:n?i.palette.text.primary:i.palette.common.white,backgroundColor:(0,l.X4)(i.palette.grey[500],.16)}}},s={..."default"!==t.color&&{...o&&{color:i.palette[t.color].contrastText,backgroundColor:i.palette[t.color].main},...r&&{backgroundColor:"transparent",color:i.palette[t.color].main,border:"1px solid ".concat(i.palette[t.color].main)},...d&&{color:i.palette[t.color][n?"dark":"light"],backgroundColor:(0,l.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,...s,...a}}));t(579)},524:(e,i,t)=>{t.r(i),t.d(i,{default:()=>N});var n=t(3536),l=t(5043),o=t(9252),r=t(8911),d=t(5865),a=t(2110),s=t(8977),c=t(1637),u=t(9650),h=t(1806),x=t(3460),v=t(8076),p=t(2420),g=t(3336),j=t(1574),A=t(7625),f=t(6446),m=(t(7550),t(5869),t(2500)),b=t(7894),y=t(3216),w=t(7154),k=t(9588),_=t(9456),S=t(1036),C=t(3568),I=t(9907),D=t(3383),F=t(579);const R={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 V(e,i,t){return i[t]<e[t]?-1:i[t]>e[t]?1:0}const N=()=>{const[e,i]=(0,l.useState)([]),t=(0,y.Zp)(),N=(0,_.wA)(),{userInfo:L}=(0,_.d4)((e=>e.auth)),{userData:z,filterType:W}=(0,_.d4)((e=>e.users)),{state:U}=(0,y.zy)();(0,l.useEffect)((()=>{U||t("/dashboard/app");let e=[];"auctioneer"===W&&(e=[{id:"auctioneer",label:"Name",alignRight:!1},{id:"units",label:"Units",alignRight:!1},{id:"view",label:"View",alignRight:!1},{id:"action",label:"Action",alignRight:!1},{id:""}]),"condition_light"===W&&(e=[{id:"conditionLight",label:"Condition Light"},{id:"conditionLightUnits",label:"Units"},{id:"viewConditionLight",label:"View"}]),"auction"===W&&(e=[{id:"auctionName",label:"Auction Name"},{id:"auctionUnits",label:"Units"},{id:"viewAuction",label:"View"}]),"sale_status"===W&&(e=[{id:"saleStatus",label:"Sale Status"},{id:"saleUnits",label:"Units"},{id:"viewSale",label:"View"}]),i(e)}),[z]);const T=(e,i)=>{t("/dashboard/opportunities/users/cars",{state:{name:i,startDate:null===U||void 0===U?void 0:U.startDate,endDate:null===U||void 0===U?void 0:U.endDate,weekId:null===U||void 0===U?void 0:U.week,filterValue:"conditonLight",filterId:e.opportunity_id,filterData:e.condition_light}})},P=(e,i)=>{t("/dashboard/opportunities/users/cars",{state:{name:i,startDate:null===U||void 0===U?void 0:U.startDate,endDate:null===U||void 0===U?void 0:U.endDate,weekId:null===U||void 0===U?void 0:U.week,filterValue:"saleStatus",filterId:e.opportunity_id,filterData:"false"===e.sale_status?0:1}})},[E,B]=(0,l.useState)(!1),[O,Y]=(0,l.useState)(0),[H,X]=(0,l.useState)("asc"),[q,G]=(0,l.useState)("name"),[K,M]=(0,l.useState)(""),[Z,J]=(0,l.useState)([]),[Q,$]=(0,l.useState)(5),[ee,ie]=(0,l.useState)(null),[te,ne]=(0,l.useState)(!1),le=O>0?Math.max(0,(1+O)*Q-(null===z||void 0===z?void 0:z.length)):0,oe=function(e,i,t){const l=null===e||void 0===e?void 0:e.map(((e,i)=>[e,i]));return null===l||void 0===l||l.sort(((e,t)=>{const n=i(e[0],t[0]);return 0!==n?n:e[1]-t[1]})),t?(0,n.filter)(e,(e=>{var i;return-1!==(null===e||void 0===e||null===(i=e.first_name)||void 0===i?void 0:i.toLowerCase().indexOf(t.toLowerCase()))})):null===l||void 0===l?void 0:l.map((e=>e[0]))}(z,function(e,i){return"desc"===e?(e,t)=>V(e,t,i):(e,t)=>-V(e,t,i)}(H,q),K),re=!(null!==oe&&void 0!==oe&&oe.length)&&!!K;return(0,F.jsx)(F.Fragment,{children:(0,F.jsxs)(o.A,{children:[(0,F.jsx)(r.A,{direction:"row",alignItems:"center",justifyContent:"space-between",mb:5,children:(0,F.jsxs)(d.A,{variant:"h4",sx:{mb:5},children:[null===U||void 0===U?void 0:U.startDate," - ",null===U||void 0===U?void 0:U.endDate]})}),(0,F.jsxs)(a.A,{children:[(0,F.jsxs)(r.A,{direction:"row",alignItems:"center",justifyContent:"space-between",margin:"10px 10px 0 10px",children:[(0,F.jsx)(s.A,{variant:"contained",onClick:()=>{t("/dashboard/opportunities/add-auctioneer",{state:{weekId:null===U||void 0===U?void 0:U.week,startDate:null===U||void 0===U?void 0:U.startDate,endDate:null===U||void 0===U?void 0:U.endDate}})},children:"Add Auctioneer"}),(0,F.jsxs)(r.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[te&&(0,F.jsx)(c.A,{}),(0,F.jsx)(b.H,{filterName:K,onFilterName:e=>{Y(0),M(e.target.value)},weekId:null===U||void 0===U?void 0:U.week,userId:null===L||void 0===L?void 0:L.user_id,setLoader:ne})]})]}),(0,F.jsx)(m.A,{children:(0,F.jsx)(u.A,{sx:{minWidth:800},children:(0,F.jsxs)(h.A,{children:[(0,F.jsx)(b.K,{order:H,orderBy:q,headLabel:e,rowCount:null===z||void 0===z?void 0:z.length,onRequestSort:(e,i)=>{X(q===i&&"asc"===H?"desc":"asc"),G(i)}}),(0,F.jsxs)(x.A,{children:[null===oe||void 0===oe?void 0:oe.slice(O*Q,O*Q+Q).map(((e,i)=>{const{user_id:n,first_name:o,units:r,auction_id:a,auctioneer_id:c,auction_name:u}=e;return(0,F.jsx)(l.Fragment,{children:o?(0,F.jsxs)(v.A,{hover:!0,tabIndex:-1,role:"checkbox",children:[(0,F.jsx)(p.A,{align:"left",children:o}),(0,F.jsx)(p.A,{align:"left",children:r}),(0,F.jsxs)(p.A,{align:"left",children:[(0,F.jsx)(s.A,{variant:"contained",onClick:()=>{return i=null===e||void 0===e?void 0:e.opportunity_id,n=c,void t("/dashboard/opportunities/users/cars",{state:{name:o,totalUnits:r,startDate:null===U||void 0===U?void 0:U.startDate,endDate:null===U||void 0===U?void 0:U.endDate,weekId:null===U||void 0===U?void 0:U.week,opportunity_id:i,filterValue:"auctioneer",filterId:i,auctioneerId:n}});var i,n},children:"View"})," "]}),(0,F.jsx)(p.A,{align:"left",children:(0,F.jsx)("img",{width:"40px",style:{cursor:"pointer"},alt:"Delete Auctioneer",src:C,onClick:()=>{B(!0),J([null===e||void 0===e?void 0:e.auctioneer_id])}})})]},n):u?(0,F.jsxs)(v.A,{hover:!0,tabIndex:-1,role:"checkbox",children:[(0,F.jsx)(p.A,{align:"left",children:u}),(0,F.jsx)(p.A,{align:"left",children:r}),(0,F.jsxs)(p.A,{align:"left",children:[(0,F.jsx)(s.A,{variant:"contained",onClick:()=>{return i=null===e||void 0===e?void 0:e.auction_id,void t("/dashboard/opportunities/users/cars",{state:{name:u,totalUnits:r,startDate:null===U||void 0===U?void 0:U.startDate,endDate:null===U||void 0===U?void 0:U.endDate,weekId:null===U||void 0===U?void 0:U.week,filterValue:"auction",filterId:i}});var i},children:"View"})," "]})]},a):"condition_light"===W?(0,F.jsxs)(F.Fragment,{children:[1===(null===e||void 0===e?void 0:e.condition_light)&&(0,F.jsxs)(v.A,{children:[(0,F.jsx)(p.A,{children:(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,F.jsx)(D.A,{style:{color:"#FF0000",fontSize:"30px",marginRight:"5px"}}),(0,F.jsx)(d.A,{sx:{color:"#FF0000",fontWeight:"bold"},children:"Red Status"})]})}),(0,F.jsx)(p.A,{children:null===e||void 0===e?void 0:e.units}),(0,F.jsx)(p.A,{children:(0,F.jsx)("div",{children:(0,F.jsx)(s.A,{variant:"contained",onClick:()=>T(e,"Red"),children:"View"})})})]}),2===(null===e||void 0===e?void 0:e.condition_light)&&(0,F.jsxs)(v.A,{children:[(0,F.jsx)(p.A,{children:(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,F.jsx)(D.A,{style:{color:"#FFFF00",fontSize:"30px",marginRight:"5px"}}),(0,F.jsx)(d.A,{sx:{color:"#FFFF00",fontWeight:"bold"},children:"Yellow Status"})]})}),(0,F.jsx)(p.A,{children:null===e||void 0===e?void 0:e.units}),(0,F.jsx)(p.A,{children:(0,F.jsx)("div",{children:(0,F.jsx)(s.A,{variant:"contained",onClick:()=>T(e,"Yellow"),children:"View"})})})]}),3===(null===e||void 0===e?void 0:e.condition_light)&&(0,F.jsxs)(v.A,{children:[(0,F.jsx)(p.A,{children:(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,F.jsx)(D.A,{style:{color:"#008000",fontSize:"30px",marginRight:"5px"}}),(0,F.jsx)(d.A,{sx:{color:"#008000",fontWeight:"bold"},children:"Green Status"})]})}),(0,F.jsx)(p.A,{children:null===e||void 0===e?void 0:e.units}),(0,F.jsx)(p.A,{children:(0,F.jsx)("div",{children:(0,F.jsx)(s.A,{variant:"contained",onClick:()=>T(e,"Green"),children:"View"})})})]}),4===(null===e||void 0===e?void 0:e.condition_light)&&(0,F.jsxs)(v.A,{children:[(0,F.jsx)(p.A,{children:(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,F.jsx)(D.A,{style:{color:"gray",fontSize:"30px",marginRight:"5px"}}),(0,F.jsx)(d.A,{sx:{color:"gray",fontWeight:"bold"},children:"Uncategorized"})]})}),(0,F.jsx)(p.A,{children:null===e||void 0===e?void 0:e.units}),(0,F.jsx)(p.A,{children:(0,F.jsx)("div",{children:(0,F.jsx)(s.A,{variant:"contained",onClick:()=>T(e,"uncategorized"),children:"View"})})})]})]}):2===(null===z||void 0===z?void 0:z.length)?(0,F.jsxs)(F.Fragment,{children:["true"===(null===e||void 0===e?void 0:e.sale_status)&&(0,F.jsxs)(v.A,{children:[(0,F.jsx)(p.A,{children:(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,F.jsx)(D.A,{style:{color:"#008000",fontSize:"30px",marginRight:"5px"}}),(0,F.jsx)(d.A,{sx:{color:"#008000",fontWeight:"bold"},children:"Sold"})]})}),(0,F.jsx)(p.A,{children:null===e||void 0===e?void 0:e.units}),(0,F.jsx)(p.A,{children:(0,F.jsx)("div",{children:(0,F.jsx)(s.A,{variant:"contained",onClick:()=>P(e,"Sold"),children:"View"})})})]}),"false"===(null===e||void 0===e?void 0:e.sale_status)&&(0,F.jsxs)(v.A,{children:[(0,F.jsx)(p.A,{children:(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,F.jsx)(D.A,{style:{color:"#FF0000",fontSize:"30px",marginRight:"5px"}}),(0,F.jsx)(d.A,{sx:{color:"#FF0000",fontWeight:"bold"},children:"Not Sold"})]})}),(0,F.jsx)(p.A,{children:null===e||void 0===e?void 0:e.units}),(0,F.jsx)(p.A,{children:(0,F.jsx)("div",{children:(0,F.jsx)(s.A,{variant:"contained",onClick:()=>P(e,"Not Sold"),children:"View"})})})]})]}):null},i)})),!(null!==z&&void 0!==z&&z.length)>0&&(0,F.jsx)(v.A,{style:{height:53*le},children:(0,F.jsx)(p.A,{align:"center",colSpan:6,sx:{py:5},children:(0,F.jsx)(g.A,{sx:{textAlign:"center"},children:(0,F.jsx)(d.A,{variant:"h4",paragraph:!0,children:"No results found"})})})})]}),re&&(0,F.jsx)(x.A,{children:(0,F.jsx)(v.A,{children:(0,F.jsx)(p.A,{align:"center",colSpan:6,sx:{py:3},children:(0,F.jsxs)(g.A,{sx:{textAlign:"center"},children:[(0,F.jsx)(d.A,{variant:"h6",paragraph:!0,children:"Not found"}),(0,F.jsxs)(d.A,{variant:"body2",children:["No results found for \xa0",(0,F.jsxs)("strong",{children:['"',K,'"']}),".",(0,F.jsx)("br",{})," Try checking for typos or using complete words."]})]})})})})]})})}),(0,F.jsx)(j.A,{rowsPerPageOptions:[5,10,25],component:"div",count:null===z||void 0===z?void 0:z.length,rowsPerPage:Q,page:O,onPageChange:(e,i)=>{Y(i)},onRowsPerPageChange:e=>{Y(0),$(parseInt(e.target.value,10))}}),(0,F.jsx)(A.A,{open:E,onClose:()=>B(!1),"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:(0,F.jsxs)(f.A,{sx:R,children:[(0,F.jsx)(d.A,{id:"modal-modal-title",variant:"h6",component:"h2",sx:{color:"#1976D2",mb:1,textAlign:"center"},children:"Are you sure you want to remove"}),(0,F.jsx)(d.A,{id:"modal-modal-description",variant:"h6",component:"h2",align:"center",children:"this Auctioneer?"}),(0,F.jsxs)(r.A,{spacing:2,direction:"row",justifyContent:"center",alignItems:"flex-end",sx:{mt:2},children:[(0,F.jsx)(s.A,{variant:"contained",style:{width:"150px",backgroundColor:"#E53935",borderRadius:"30px",color:"white",marginRight:"8px",fontWeight:"bold"},onClick:async()=>{if(Z.length>0)try{B(!1);const e={headers:{"Content-Type":"application/json"}},{data:i}=await w.A.post("".concat(k.VY,"/user/remove-auctioneer-from-opportunity"),{auctioneer_ids:Z,weekId:null===U||void 0===U?void 0:U.week,user_id:null===L||void 0===L?void 0:L.user_id},e);if(i)return N((0,I.Np)({userId:null===L||void 0===L?void 0:L.user_id,weekId:null===U||void 0===U?void 0:U.week})),void S.oR.success("Auctioneer removed successfully!")}catch(e){console.log(e),B(!1),S.oR.error("Error while removing Auctioneer!")}console.log("Deleted!")},children:"Yes"}),(0,F.jsx)(s.A,{variant:"contained",style:{width:"150px",backgroundColor:"#4CAF50",borderRadius:"30px",color:"white",fontWeight:"bold"},onClick:()=>B(!1),children:"No"})]})]})})]})]})})}},7894:(e,i,t)=>{t.d(i,{K:()=>c,H:()=>k});var n=t(4882),l=t(8076),o=t(2420),r=t(8093),d=t(6446),a=t(579);const s={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:x,onSelectAllClick:v}=e;return(0,a.jsx)(n.A,{children:(0,a.jsx)(l.A,{children:u.map(((e,n)=>{return(0,a.jsx)(o.A,{align:e.alignRight?"right":"left",sortDirection:t===e.id&&i,children:(0,a.jsxs)(r.A,{hideSortIcon:!0,active:t===e.id,direction:t===e.id?i:"asc",onClick:(l=e.id,e=>{x(e,l)}),children:[e.label,t===e.id?(0,a.jsx)(d.A,{sx:{...s},children:"desc"===i?"sorted descending":"sorted ascending"}):null]})},n);var l}))})})}var u=t(4535),h=t(5263),x=t(5865),v=t(5869),p=t(5043),g=t(8977),j=t(688),A=t(2143),f=t(9456),m=t(9907);const b=[{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:i,userId:t,setLoader:n}=e;const[l,o]=(0,p.useState)(null),[r,d]=(0,p.useState)("auctioneer"),s=(0,f.wA)(),{filterType:c}=(0,f.d4)((e=>e.users)),u=(e,l)=>{n(!0),"auctioneer"===e?s((0,m.Np)({userId:t,weekId:i})).finally((()=>n(!1))):"auction"===e?s((0,m.x1)({user_id:t,week_id:i})).finally((()=>n(!1))):"condition_light"===e?s((0,m.S4)({user_id:t,week_id:i})).finally((()=>n(!1))):"sale_status"===e&&s((0,m.yh)({user_id:t,week_id:i})).finally((()=>n(!1))),d(l||e),o(null)};(0,p.useEffect)((()=>{u(c||"auctioneer")}),[]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(g.A,{color:"inherit",disableRipple:!0,onClick:e=>{o(e.currentTarget)},endIcon:(0,a.jsx)(v.A,{icon:l?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Filter by \xa0",(0,a.jsx)(x.A,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:r})]}),(0,a.jsx)(j.A,{keepMounted:!0,anchorEl:l,open:Boolean(l),onClose:()=>{o(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:b.map((e=>(0,a.jsx)(A.A,{selected:e.value===r,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 k(e){let{numSelected:i,filterName:t,onFilterName:n,weekId:l,userId:o,setLoader:r}=e;return(0,a.jsx)(w,{sx:{...i>0&&{color:"primary.main",bgcolor:"primary.lighter"}},children:i>0?(0,a.jsxs)(x.A,{component:"div",variant:"subtitle1",children:[i," selected"]}):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(y,{weekId:l,userId:o,setLoader:r})})})}},3568:(e,i,t)=>{e.exports=t.p+"static/media/trash.5795bffc2e3ba17cfc33.png"}}]);
//# sourceMappingURL=524.f06f7f27.chunk.js.map

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