Sindbad~EG File Manager
"use strict";(self.webpackChunk_minimal_material_kit_react=self.webpackChunk_minimal_material_kit_react||[]).push([[648],{1648:(e,t,n)=>{n.r(t),n.d(t,{default:()=>_});var o=n(5043),r=n(9252),i=n(8911),a=n(5865),l=n(2110),c=n(8977),s=n(9650),d=n(1806),u=n(3460),h=n(8076),m=n(2420),p=n(3336),A=n(2500),v=n(7894),x=n(3216),g=n(9456),f=n(9907),b=n(7154),y=n(9588),j=n(1036),w=n(2812),S=n(5869),I=n(579);const _=()=>{const[e,t]=(0,o.useState)(!1),[n]=(0,o.useState)([{id:"brand",label:"Brand",alignRight:!1},{id:"expiry",label:"Expiry",alignRight:!1},{id:"last4",label:"Card Number",alignRight:!1},{id:"action",label:"Action",alignRight:!1}]),_=(0,x.Zp)(),C=(0,g.wA)(),{userInfo:M}=(0,g.d4)((e=>e.auth)),{paymentData:k}=(0,g.d4)((e=>e.users));return(0,o.useEffect)((()=>{C((0,f.DM)({email:null===M||void 0===M?void 0:M.email}))}),[]),(0,I.jsxs)(r.A,{children:[(0,I.jsx)(i.A,{direction:"column",mb:2,children:(0,I.jsx)(a.A,{variant:"h4",sx:{mb:5},children:"Payment Method"})}),(0,I.jsxs)(l.A,{children:[(0,I.jsx)(i.A,{direction:"row",alignItems:"center",justifyContent:"space-between",margin:"20px",children:(0,I.jsx)(c.A,{variant:"contained",onClick:()=>{_("/dashboard/newPaymentMehod")},children:"Add Payment Method"})}),(0,I.jsx)(A.A,{children:(0,I.jsx)(s.A,{sx:{minWidth:800},children:(0,I.jsxs)(d.A,{children:[(0,I.jsx)(v.K,{headLabel:n}),(0,I.jsxs)(u.A,{children:[null===k||void 0===k?void 0:k.map(((n,r)=>{const{card:i,payemen_method_id:a}=n,{brand:l,exp_year:c,exp_month:s,last4:d}=i;return(0,I.jsx)(o.Fragment,{children:(0,I.jsxs)(h.A,{hover:!0,tabIndex:-1,role:"checkbox",children:[(0,I.jsx)(m.A,{align:"left",children:l}),(0,I.jsx)(m.A,{align:"left",children:s+"/"+c}),(0,I.jsx)(m.A,{align:"left",children:d}),(0,I.jsx)(m.A,{align:"left",children:(0,I.jsx)(w.A,{loading:e,variant:"outlined",startIcon:(0,I.jsx)(S.A,{icon:"eva:trash-2-outline"}),onClick:()=>(async e=>{try{t(!0);const n=await b.A.post("".concat(y.VY,"/payment/detach-payment-method"),{paymentMethodId:e});200===(null===n||void 0===n?void 0:n.status)&&(j.oR.success("Payment Method Deleted"),t(!1),C((0,f.DM)({email:null===M||void 0===M?void 0:M.email})))}catch(n){t(!1),j.oR.error((null===n||void 0===n?void 0:n.message)||"Something went wrong"),console.log("[Error]",n)}})(a),children:"Delete"})})]})},a)})),!(null!==k&&void 0!==k&&k.length)>0&&(0,I.jsx)(h.A,{style:{height:265},children:(0,I.jsx)(m.A,{align:"center",colSpan:6,sx:{py:5},children:(0,I.jsx)(p.A,{sx:{textAlign:"center"},children:(0,I.jsx)(a.A,{variant:"h4",paragraph:!0,children:"No results found"})})})})]})]})})})]})]})}},7894:(e,t,n)=>{n.d(t,{K:()=>d,H:()=>S});var o=n(4882),r=n(8076),i=n(2420),a=n(8093),l=n(6446),c=n(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 d(e){let{order:t,orderBy:n,rowCount:d,headLabel:u,numSelected:h,onRequestSort:m,onSelectAllClick:p}=e;return(0,c.jsx)(o.A,{children:(0,c.jsx)(r.A,{children:u.map(((e,o)=>{return(0,c.jsx)(i.A,{align:e.alignRight?"right":"left",sortDirection:n===e.id&&t,children:(0,c.jsxs)(a.A,{hideSortIcon:!0,active:n===e.id,direction:n===e.id?t:"asc",onClick:(r=e.id,e=>{m(e,r)}),children:[e.label,n===e.id?(0,c.jsx)(l.A,{sx:{...s},children:"desc"===t?"sorted descending":"sorted ascending"}):null]})},o);var r}))})})}var u=n(4535),h=n(5263),m=n(5865),p=n(5869),A=n(5043),v=n(8977),x=n(688),g=n(2143),f=n(9456),b=n(9907);const y=[{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:t,userId:n,setLoader:o}=e;const[r,i]=(0,A.useState)(null),[a,l]=(0,A.useState)("auctioneer"),s=(0,f.wA)(),{filterType:d}=(0,f.d4)((e=>e.users)),u=(e,r)=>{o(!0),"auctioneer"===e?s((0,b.Np)({userId:n,weekId:t})).finally((()=>o(!1))):"auction"===e?s((0,b.x1)({user_id:n,week_id:t})).finally((()=>o(!1))):"condition_light"===e?s((0,b.S4)({user_id:n,week_id:t})).finally((()=>o(!1))):"sale_status"===e&&s((0,b.yh)({user_id:n,week_id:t})).finally((()=>o(!1))),l(r||e),i(null)};(0,A.useEffect)((()=>{u(d||"auctioneer")}),[]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(v.A,{color:"inherit",disableRipple:!0,onClick:e=>{i(e.currentTarget)},endIcon:(0,c.jsx)(p.A,{icon:r?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Filter by \xa0",(0,c.jsx)(m.A,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:a})]}),(0,c.jsx)(x.A,{keepMounted:!0,anchorEl:r,open:Boolean(r),onClose:()=>{i(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:y.map((e=>(0,c.jsx)(g.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:t}=e;return{height:96,display:"flex",justifyContent:"flex-end",padding:t.spacing(0,1,0,3)}}));function S(e){let{numSelected:t,filterName:n,onFilterName:o,weekId:r,userId:i,setLoader:a}=e;return(0,c.jsx)(w,{sx:{...t>0&&{color:"primary.main",bgcolor:"primary.lighter"}},children:t>0?(0,c.jsxs)(m.A,{component:"div",variant:"subtitle1",children:[t," selected"]}):(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(j,{weekId:r,userId:i,setLoader:a})})})}},9650:(e,t,n)=>{n.d(t,{A:()=>v});var o=n(8168),r=n(8587),i=n(5043),a=n(9292),l=n(8606),c=n(2876),s=n(4535),d=n(7056),u=n(2400);function h(e){return(0,u.Ay)("MuiTableContainer",e)}(0,d.A)("MuiTableContainer",["root"]);var m=n(579);const p=["className","component"],A=(0,s.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),v=i.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiTableContainer"}),{className:i,component:s="div"}=n,d=(0,r.A)(n,p),u=(0,o.A)({},n,{component:s}),v=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},h,t)})(u);return(0,m.jsx)(A,(0,o.A)({ref:t,as:s,className:(0,a.A)(v.root,i),ownerState:u},d))}))},4882:(e,t,n)=>{n.d(t,{A:()=>f});var o=n(8168),r=n(8587),i=n(5043),a=n(9292),l=n(8606),c=n(1573),s=n(2876),d=n(4535),u=n(7056),h=n(2400);function m(e){return(0,h.Ay)("MuiTableHead",e)}(0,u.A)("MuiTableHead",["root"]);var p=n(579);const A=["className","component"],v=(0,d.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),x={variant:"head"},g="thead",f=i.forwardRef((function(e,t){const n=(0,s.A)({props:e,name:"MuiTableHead"}),{className:i,component:d=g}=n,u=(0,r.A)(n,A),h=(0,o.A)({},n,{component:d}),f=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},m,t)})(h);return(0,p.jsx)(c.A.Provider,{value:x,children:(0,p.jsx)(v,(0,o.A)({as:d,className:(0,a.A)(f.root,i),ref:t,role:d===g?null:"rowgroup",ownerState:h},u))})}))},8093:(e,t,n)=>{n.d(t,{A:()=>j});var o=n(8587),r=n(8168),i=n(8606),a=n(9292),l=n(5043),c=n(5429),s=n(9662),d=n(579);const u=(0,s.A)((0,d.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");var h=n(4535),m=n(2876),p=n(6803),A=n(7056),v=n(2400);function x(e){return(0,v.Ay)("MuiTableSortLabel",e)}const g=(0,A.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),f=["active","children","className","direction","hideSortIcon","IconComponent"],b=(0,h.Ay)(c.A,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})((e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(t.vars||t).palette.text.secondary},"&:hover":{color:(t.vars||t).palette.text.secondary,["& .".concat(g.icon)]:{opacity:.5}},["&.".concat(g.active)]:{color:(t.vars||t).palette.text.primary,["& .".concat(g.icon)]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}})),y=(0,h.Ay)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t["iconDirection".concat((0,p.A)(n.direction))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},"desc"===n.direction&&{transform:"rotate(0deg)"},"asc"===n.direction&&{transform:"rotate(180deg)"})})),j=l.forwardRef((function(e,t){const n=(0,m.A)({props:e,name:"MuiTableSortLabel"}),{active:l=!1,children:c,className:s,direction:h="asc",hideSortIcon:A=!1,IconComponent:v=u}=n,g=(0,o.A)(n,f),j=(0,r.A)({},n,{active:l,direction:h,hideSortIcon:A,IconComponent:v}),w=(e=>{const{classes:t,direction:n,active:o}=e,r={root:["root",o&&"active"],icon:["icon","iconDirection".concat((0,p.A)(n))]};return(0,i.A)(r,x,t)})(j);return(0,d.jsxs)(b,(0,r.A)({className:(0,a.A)(w.root,s),component:"span",disableRipple:!0,ownerState:j,ref:t},g,{children:[c,A&&!l?null:(0,d.jsx)(y,{as:v,className:(0,a.A)(w.icon),ownerState:j})]}))}))}}]);
//# sourceMappingURL=648.53992c72.chunk.js.map
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists