Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/static.2/js/
Upload File :
Current File : /home/infinitibizsol/.trash/static.2/js/898.76c6a7d0.chunk.js

"use strict";(self.webpackChunk_minimal_material_kit_react=self.webpackChunk_minimal_material_kit_react||[]).push([[898],{5898:(e,t,n)=>{n.r(t),n.d(t,{default:()=>T});var r=n(5043),o=n(8185),i=n(9252),a=n(8911),l=n(5865),s=n(2110),c=n(8977),d=n(9650),u=n(1806),h=n(3460),m=n(8076),p=n(2420),v=n(3336),A=n(2500),x=n(7894),y=n(3216),f=n(9456),g=n(7154),b=n(9588),j=n(1036),w=n(2812),S=n(5869),_=n(3393),I=n(4397),C=n(9907),k=n(579);const R=(0,I.c)("pk_test_51ODisKJARDo7ZutI9zfuXZdCP0sAyicryawFWyQ71qjzVdLHLPVFUY3mm0RDg4ad60AFsaJYxP3HoloUeTzpM9WM000wawbv5I"),M=e=>{let{state:t,paymentIntent:n,paymentData:o,userInfo:I}=e;const[R,M]=(0,r.useState)({}),T=(0,y.Zp)(),L=(0,_.useStripe)(),D=(0,f.wA)();(0,r.useEffect)((()=>{let e={};o.map((t=>e[null===t||void 0===t?void 0:t.payemen_method_id]=!1)),M(e)}),[]);const N=async()=>{try{const e={headers:{"Content-Type":"application/json"}};await g.A.post("".concat(b.VY,"/subscribe/subscribe-auctioneer"),{user_id:null===I||void 0===I?void 0:I.user_id,auctioneer_id:null===t||void 0===t?void 0:t.auctioneerId},e),M(!1),D((0,C.Fn)({userId:null===I||void 0===I?void 0:I.user_id,weekId:null===t||void 0===t?void 0:t.week})),T(-2)}catch(e){M(!1),j.oR.error((null===e||void 0===e?void 0:e.message)||"Something went wrong"),console.log("[Error]",e)}};return(0,k.jsxs)(i.A,{children:[(0,k.jsx)(a.A,{direction:"column",mb:2,children:(0,k.jsx)(l.A,{variant:"h4",sx:{mb:5},children:"Select Payment Method"})}),(0,k.jsxs)(s.A,{children:[(0,k.jsxs)(a.A,{direction:"row",alignItems:"center",justifyContent:"space-between",margin:"20px",children:[(0,k.jsx)(c.A,{variant:"contained",onClick:()=>{T("/dashboard/newPaymentMehod")},children:"Add Payment Method"}),(0,k.jsxs)(a.A,{direction:"column",alignItems:"center",justifyContent:"space-between",children:[(0,k.jsxs)(l.A,{variant:"h4",sx:{mb:1},children:["Auctioneer : ",null===t||void 0===t?void 0:t.first_name]}),(0,k.jsx)(l.A,{variant:"h4",sx:{mb:1},children:"Amount : $50"})]})]}),(0,k.jsx)(A.A,{children:(0,k.jsx)(d.A,{sx:{minWidth:800},children:(0,k.jsxs)(u.A,{children:[(0,k.jsx)(x.K,{headLabel:[{id:"brand",label:"Brand",alignRight:!1},{id:"expiry",label:"Expiry",alignRight:!1},{id:"last4",label:"Card Number",alignRight:!1},{id:""},{id:""}]}),(0,k.jsxs)(h.A,{children:[null===o||void 0===o?void 0:o.map(((e,o)=>{const{card:i,payemen_method_id:a}=e,{brand:l,exp_year:s,exp_month:c,last4:d}=i;return(0,k.jsx)(r.Fragment,{children:(0,k.jsxs)(m.A,{hover:!0,tabIndex:-1,role:"checkbox",children:[(0,k.jsx)(p.A,{align:"left",children:l}),(0,k.jsx)(p.A,{align:"left",children:c+"/"+s}),(0,k.jsx)(p.A,{align:"left",children:d}),(0,k.jsx)(p.A,{align:"left",children:(0,k.jsx)(w.A,{loading:null===R||void 0===R?void 0:R[a],variant:"outlined",startIcon:(0,k.jsx)(S.A,{icon:"eva:checkmark-circle-2-outline"}),onClick:()=>(async e=>{if(!L)return;M((t=>({...t,[e]:!0})));const r=await L.confirmPayment({clientSecret:n.clientSecret,confirmParams:{payment_method:e,return_url:b.RM+"/dashboard/app/subscription-success?auctioneer_id="+(null===t||void 0===t?void 0:t.auctioneerId)},redirect:"if_required"});r.error&&(M(!1),j.oR.error(r.error.message),M((t=>({...t,[e]:!1})))),"succeeded"===r.paymentIntent.status&&(N(),M((t=>({...t,[e]:!1}))))})(a),children:"Complete Payment"})})]},a)})})),!(null!==o&&void 0!==o&&o.length)>0&&(0,k.jsx)(m.A,{style:{height:265},children:(0,k.jsx)(p.A,{align:"center",colSpan:6,sx:{py:5},children:(0,k.jsx)(v.A,{sx:{textAlign:"center"},children:(0,k.jsx)(l.A,{variant:"h4",paragraph:!0,children:"No results found"})})})})]})]})})})]})]})},T=()=>{const{state:e}=(0,y.zy)(),[t,n]=(0,r.useState)(),{userInfo:i}=(0,f.d4)((e=>e.auth)),{paymentData:a}=(0,f.d4)((e=>e.users));(0,r.useEffect)((()=>{l()}),[]);const l=async t=>{try{const t={headers:{"Content-Type":"application/json"}},{data:r}=await g.A.post("".concat(b.VY,"/payment/create-payment-intent"),{email:null===i||void 0===i?void 0:i.email,name:null===i||void 0===i?void 0:i.name,amount:50,currency:"USD",auctioneer_id:null===e||void 0===e?void 0:e.auctioneerId,user_id:null===i||void 0===i?void 0:i.user_id},t);null!==r&&void 0!==r&&r.success&&n({clientSecret:null===r||void 0===r?void 0:r.clientSecret,ephemeralKey:null===r||void 0===r?void 0:r.ephemeralKey})}catch(r){j.oR.error((null===r||void 0===r?void 0:r.message)||"Something went wrong"),console.log("[Error]",r)}};return t&&a?(0,k.jsx)(_.Elements,{stripe:R,options:t,children:(0,k.jsx)(M,{state:e,paymentIntent:t,paymentData:a,userInfo:i})}):(0,k.jsx)(o.A,{variant:"rectangular",width:"100%",height:300})}},7894:(e,t,n)=>{n.d(t,{K:()=>d,H:()=>S});var r=n(4882),o=n(8076),i=n(2420),a=n(8093),l=n(6446),s=n(579);const c={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,s.jsx)(r.A,{children:(0,s.jsx)(o.A,{children:u.map(((e,r)=>{return(0,s.jsx)(i.A,{align:e.alignRight?"right":"left",sortDirection:n===e.id&&t,children:(0,s.jsxs)(a.A,{hideSortIcon:!0,active:n===e.id,direction:n===e.id?t:"asc",onClick:(o=e.id,e=>{m(e,o)}),children:[e.label,n===e.id?(0,s.jsx)(l.A,{sx:{...c},children:"desc"===t?"sorted descending":"sorted ascending"}):null]})},r);var o}))})})}var u=n(4535),h=n(5263),m=n(5865),p=n(5869),v=n(5043),A=n(8977),x=n(688),y=n(2143),f=n(9456),g=n(9907);const b=[{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:r}=e;const[o,i]=(0,v.useState)(null),[a,l]=(0,v.useState)("auctioneer"),c=(0,f.wA)(),{filterType:d}=(0,f.d4)((e=>e.users)),u=(e,o)=>{r(!0),"auctioneer"===e?c((0,g.Np)({userId:n,weekId:t})).finally((()=>r(!1))):"auction"===e?c((0,g.x1)({user_id:n,week_id:t})).finally((()=>r(!1))):"condition_light"===e?c((0,g.S4)({user_id:n,week_id:t})).finally((()=>r(!1))):"sale_status"===e&&c((0,g.yh)({user_id:n,week_id:t})).finally((()=>r(!1))),l(o||e),i(null)};(0,v.useEffect)((()=>{u(d||"auctioneer")}),[]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(A.A,{color:"inherit",disableRipple:!0,onClick:e=>{i(e.currentTarget)},endIcon:(0,s.jsx)(p.A,{icon:o?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Filter by \xa0",(0,s.jsx)(m.A,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:a})]}),(0,s.jsx)(x.A,{keepMounted:!0,anchorEl:o,open:Boolean(o),onClose:()=>{i(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:b.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: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:r,weekId:o,userId:i,setLoader:a}=e;return(0,s.jsx)(w,{sx:{...t>0&&{color:"primary.main",bgcolor:"primary.lighter"}},children:t>0?(0,s.jsxs)(m.A,{component:"div",variant:"subtitle1",children:[t," selected"]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(j,{weekId:o,userId:i,setLoader:a})})})}},9650:(e,t,n)=>{n.d(t,{A:()=>A});var r=n(8168),o=n(8587),i=n(5043),a=n(9292),l=n(8606),s=n(2876),c=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"],v=(0,c.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),A=i.forwardRef((function(e,t){const n=(0,s.A)({props:e,name:"MuiTableContainer"}),{className:i,component:c="div"}=n,d=(0,o.A)(n,p),u=(0,r.A)({},n,{component:c}),A=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},h,t)})(u);return(0,m.jsx)(v,(0,r.A)({ref:t,as:c,className:(0,a.A)(A.root,i),ownerState:u},d))}))},4882:(e,t,n)=>{n.d(t,{A:()=>f});var r=n(8168),o=n(8587),i=n(5043),a=n(9292),l=n(8606),s=n(1573),c=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 v=["className","component"],A=(0,d.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),x={variant:"head"},y="thead",f=i.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiTableHead"}),{className:i,component:d=y}=n,u=(0,o.A)(n,v),h=(0,r.A)({},n,{component:d}),f=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},m,t)})(h);return(0,p.jsx)(s.A.Provider,{value:x,children:(0,p.jsx)(A,(0,r.A)({as:d,className:(0,a.A)(f.root,i),ref:t,role:d===y?null:"rowgroup",ownerState:h},u))})}))},8093:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(8587),o=n(8168),i=n(8606),a=n(9292),l=n(5043),s=n(5429),c=n(9662),d=n(579);const u=(0,c.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),v=n(7056),A=n(2400);function x(e){return(0,A.Ay)("MuiTableSortLabel",e)}const y=(0,v.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),f=["active","children","className","direction","hideSortIcon","IconComponent"],g=(0,h.Ay)(s.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(y.icon)]:{opacity:.5}},["&.".concat(y.active)]:{color:(t.vars||t).palette.text.primary,["& .".concat(y.icon)]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}})),b=(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,o.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:s,className:c,direction:h="asc",hideSortIcon:v=!1,IconComponent:A=u}=n,y=(0,r.A)(n,f),j=(0,o.A)({},n,{active:l,direction:h,hideSortIcon:v,IconComponent:A}),w=(e=>{const{classes:t,direction:n,active:r}=e,o={root:["root",r&&"active"],icon:["icon","iconDirection".concat((0,p.A)(n))]};return(0,i.A)(o,x,t)})(j);return(0,d.jsxs)(g,(0,o.A)({className:(0,a.A)(w.root,c),component:"span",disableRipple:!0,ownerState:j,ref:t},y,{children:[s,v&&!l?null:(0,d.jsx)(b,{as:A,className:(0,a.A)(w.icon),ownerState:j})]}))}))}}]);
//# sourceMappingURL=898.76c6a7d0.chunk.js.map

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