1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72773],{69023:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/backoffice/marketplace/discounts/ordered",function(){return t(56166)}])},54586:function(e,a,t){"use strict";var l=t(85893),r=t(41664),o=t.n(r),n=t(11163),s=t(85874),i=t(78184);a.Z=()=>{let e=(0,n.useRouter)(),{t:a}=(0,s.useTranslation)(),t=e.pathname,{tertiaryColor:r}=(0,i.KX)(),_=[{title:a("IN_PROCESS"),path:"/backoffice/marketplace/discounts/in-process"},{title:a("ORDERED"),path:"/backoffice/marketplace/discounts/ordered"},{title:a("PURCHASED"),path:"/backoffice/marketplace/discounts/purchased"},{title:a("ALL"),path:"/backoffice/marketplace/discounts/all"}];return(0,l.jsx)("div",{className:"flex overflow-x-auto gap-4 pt-2 mt-6 border-b",children:_.map(e=>(0,l.jsx)(o(),{href:e.path,children:(0,l.jsx)("button",{className:"flex gap-2 items-center px-1 pb-3 text-base font-medium whitespace-nowrap border-b-2 border-transparent transition-all cursor-pointer select-none hover:brightness-125 first-letter:capitalize",style:{borderBottom:t===e.path?"solid 2px ".concat(r):"",color:t===e.path?r:"#9ca3af",transition:"all 0.3s ease"},children:e.title})},e.path))})}},56166:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSG:function(){return O}});var l=t(85893),r=t(67294),o=t(11163),n=t(85874),s=t(50982),i=t(8324),_=t(67835),c=t(12406),d=t(54586),u=t(82152),E=t(98559),p=t(32692),f=t(68268),b=t(50925),h=t(24522),R=t(94837),m=t(78184),A=t(47972),I=t(5942),N=t(21991),O=!0;a.default=()=>{(0,h.q)(["admin_marketplace"]);let{t:e}=(0,n.useTranslation)(),{employeeName:a}=(0,A.f)(),t=(0,o.useRouter)(),{user:O}=(0,b.a)({middleware:"auth"}),v=E.uH,{benefitName:T}=(0,m.KX)(),C=[{value:"benefit_name",label:e("BENEFIT"),placeholder:e("SEARCH_BY_BENEFIT",{benefit:T})},{value:"order_id",label:e("ORDER_ID"),placeholder:e("SEARCH_BY_ORDER_ID")},{value:"benefit_provider_id",label:e("PROVIDER_ID"),placeholder:e("SEARCH_BY_PROVIDER_ID")},{value:"user_name",label:e("USER"),placeholder:e("SEARCH_BY_NAME")},{value:"employee_email",label:e("EMPLOYEE_EMAIL",{employeeName:a}),placeholder:e("SEARCH_BY_EMPLOYEE_EMAIL",{employeeName:a})},{value:"user_email",label:e("USER_EMAIL"),placeholder:e("SEARCH_BY_USER_EMAIL")},{value:"company_name",label:e("COMPANY"),placeholder:e("SEARCH_BY_COMPANY_NAME")}
1,{value:"benefit_country",label:e("BENEFIT_COUNTRY",{benefit:T}),placeholder:e("SEARCH_BY_BENEFIT_COUNTRY"),dropdown:(0,l.jsx)(_.V,{showGlobal:!0,showInternational:!0})},{value:"company_country",label:e("COMPANY_COUNTRY"),dropdown:(0,l.jsx)(_.V,{showGlobal:!0,showInternational:!0})},{value:"date",label:e("SPECIFIC_DATE"),dropdown:(0,l.jsx)(c.f,{})},{value:"date_from",label:e("DATE_FROM"),dropdown:(0,l.jsx)(c.f,{})},{value:"date_to",label:e("DATE_TO"),dropdown:(0,l.jsx)(c.f,{})},{value:"benefit_category_id",label:e("CATEGORY"),placeholder:e("SEARCH_BY_CATEGORY"),dropdown:(0,l.jsx)(i.f,{})},{value:"variation_title",label:e("VARIATION_TITLE"),placeholder:e("SEARCH_BY_VARIATION_TITLE")},{value:"benefit_provider_name",label:e("BENEFIT_PROVIDER_NAME",{benefit:T}),placeholder:e("SEARCH_BY_BENEFIT_PROVIDER_NAME")}],{data:S,refetch:D,isLoading:w,isFetched:Y,isError:x}=(0,R.Z)({filters:C,query:N.k8,params:{benefit_type:v,only_maslow:1,status:[p.iF.ORDERED.value]},queryOptions:{transform:e=>({...e,data:e.data.map(e=>({...e,days_since_creation:Math.floor((new Date-new Date(e.created_at))/864e5)}))})},defaultParams:[{name:"sort",value:"delay_days"},{name:"direction",value:"desc"}]});return(0,r.useEffect)(()=>{D()},[O,t]),(0,l.jsxs)(f.Z,{children:[(0,l.jsx)(s.f,{children:"".concat(e("DISCOUNTS"))}),(0,l.jsx)(d.Z,{}),(0,l.jsx)(u.M,{benefitType:v,exportQuery:N.Gb,filters:C,getBatchStatusOptions:I.vD,isError:x,isFetched:Y,isLoading:w,orders:S,refetchOrders:D,selectableIf:e=>e.status!==p.iF.SENT.value&&e.status!==p.iF.REFUND.value,title:"DISCOUNTS"})]})}}},function(e){e.O(0,[74885,57383,41664,18573,42444,23157,67206,47536,32484,4939,2610,74549,36551,21876,98027,9e3,18082,85421,49848,93884,36197,68268,11177,69040,16369,34241,99014,92888,49774,40179],function(){return e(e.s=69023)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.