1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[81955,48272],{90895:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/backoffice/purchases",function(){return a(57570)}])},34811:function(e,t,a){"use strict";var i=a(24043),l=a(85893),r=a(42138);a(67294);var n=a(93965),o=a(20464),s=a(36621),c=a(10028);t.Z=function(e){var t=(0,n.$G)().t,a=(0,i._)((0,r.U$)(e.name),3),u=a[0],d=a[1],f=a[2],p=(0,i._)((0,r.U$)("".concat(e.name,".from")),3),m=p[0],h=p[1],b=p[2],g=(0,i._)((0,r.U$)("".concat(e.name,".to")),3),y=g[0],_=g[1],T=g[2],v=(0,c.u)(d),N=e.selectRange;return(0,l.jsx)(s.Z,{id:e.id||e.name,labelTitle:e.labelTitle&&t(e.labelTitle),optional:e.optional,hint:e.hint&&t(e.hint),inline:e.inline,error:v,errorInPlace:e.errorInPlace,children:(0,l.jsx)(o.Z,{selectRange:N,minDate:e.minDate,maxDate:e.maxDate,placeholderFrom:e.placeholderFrom&&t(e.placeholderFrom),placeholderTo:e.placeholderTo&&t(e.placeholderTo),mobilePickerStartTitle:e.mobilePickerStartTitle,mobilePickerEndTitle:e.mobilePickerEndTitle,monthsToShow:e.monthsToShow,startDate:N?h.value:d.value,endDate:_.value,allowMonthPicking:e.allowMonthPicking,onStartChange:N?b.setValue:f.setValue,onEndChange:T.setValue,onStartBlur:N?m.onBlur:u.onBlur,onEndBlur:y.onBlur})})}},87387:function(e,t,a){"use strict";var i=a(24043),l=a(85893),r=a(42138);a(67294);var n=a(93965),o=a(41979),s=a(36621),c=a(10028);t.Z=function(e){var t=(0,n.$G)().t,a=(0,i._)((0,r.U$)(e),3),u=a[0],d=a[1],f=a[2],p=(0,c.u)(d);return(0,l.jsx)(s.Z,{id:e.id||e.name,labelTitle:e.labelTitle&&t(e.labelTitle),optional:e.optional,hint:e.hint&&t(e.hint),inline:e.inline,error:p,errorInPlace:e.errorInPlace,children:(0,l.jsx)(o.Z,{selectedOption:d.value,onSelect:f.setValue,onBlur:u.onBlur,name:e.name,mobilePickerTitle:e.labelTitle,positionListTop:e.positionListTop,getSuggestionsApiConfig:e.getSuggestionsApiConfig,getSuggestions:e.getSuggestions,suggestions:e.suggestions,sorted:e.sorted,placeholder:e.placeholder&&t(e.placeholder),disabled:e.disabled,readOnly:e.readOnly,multiSection:e.multiSection,renderSuggestionsOnFocus:e.renderSuggestionsOnFocus,arrow:e.arrow,icon:e.icon,iconSelectedColorClass:e.iconSelectedColorClass,iconSizeClass:e.iconSizeClass,rightSlot:e.rightSlot,withTranslation:e.withTranslation})})}},64985:function(e,t,a){"use strict";var i=a(24043),l=a(85893);a(67294);var r=a(93965),n=a(42138),o=a(36621),s=a(93822),c=a(10028);t.Z=function(e){var t=(0,r.$G)().t,a=(0,i._)((0,n.U$)(e),3),u=a[0],d=a[1],f=a[2],p=(0,c.u)(d);return(0,l.jsx)(o.Z,{id:e.id||e.name,labelTitle:e.labelTitle&&t(e.labelTitle),optional:e.optional,hint:e.hint&&t(e.hint),inline:e.inline,error:p,errorInPlace:e.errorInPlace,children:(0,l.jsx)(s.Z,{name:e.name,options:e.options,selectedKey:d.value,placeholder:e.placeholder&&t(e.placeholder),readOnly:e.readOnly,withTranslation:!e.noTranslation,sorted:e.sorted,positionListTop:e.positionListTop,onSelect:f.setValue,onBlur:u.onBlur,clearable:e.clearable,testId:e.testId})})}},45202:function(e,t,a){"use strict";a.d(t,{Z:function(){return g},T:function(){return b}});var i,l,r,n,o,s,c=a(75766),u=a(248),d=a(7258),f=a(26576);(i=l||(l={})).B2B="B2B",i.B2C="B2C",i.API="API";var p={FROM:"from",TO:"to",BOOKING_DATE_RANGE:"bookingDateRange",TRAVEL_DATE_RANGE:"travelDateRange",BUYER_NAME:"buyerName",BUYER_EMAIL:"buyerEmail",STATUS:"status",TERMINAL:"terminal",ORIGIN:"origin",DESTINATION:"destination",CHANNEL:"channel",PURCHASE_LOCATION:"purchaseLocation",AGENCY_NAME:"agencyName",AGENCY_ID:"agencyId",PARENT_AGENCY:"parentAgency",DOMAIN:"domain",PARTNER:"partner"},m=(o={},(0,c._)(o,p.BOOKING_DATE_RANGE,(r={},(0,c._)(r,p.FROM,void 0),(0,c._)(r,p.TO,void 0),r)),(0,c._)(o,p.TRAVEL_DATE_RANGE,(n={},(0,c._)(n,p.FROM,void 0),(0,c._)(n,p.TO,void 0),n)),(0,c._)(o,p.BUYER_NAME,""),(0,c._)(o,p.BUYER_EMAIL,""),(0,c._)(o,p.STATUS,null),(0,c._)(o,p.TERMINAL,""),(0,c._)(o,p.ORIGIN,null),(0,c._)(o,p.DESTINATION,null),(0,c._)(o,p.CHANNEL,null),(0,c._)(o,p.PURCHASE_LOCATION,null),(0,c._)(o,p.AGENCY_NAME,""),(0,c._)(o,p.AGENCY_ID,""),(0,c._)(o,p.PARENT_AGENCY,null),(0,c._)(o,p.DOMAIN,""),(0,c._)(o,p.PARTNER,null),o),h=d.Ry((s={},(0,c._)(s,p.BUYER_NAME,d.Z_().max(64,f.Uf.TOO_LONG)),(0,c._)(s,p.BUYER_EMAIL,d.Z_().max(64,f.Uf.TOO_LONG)),(0,c._)(s,p.AGENCY_NAME,d.Z_().max(64,f.Uf.TOO_LONG)),(0,c._)(s,p.AGENCY_ID,d.Z_().max(64,f.Uf.TOO_LONG)),(0,c._)(s,p.DOMAIN,d.Z_().max(64,f.Uf.TOO_LONG)),s)),b=function(e,t){return(0,u._)(t?[{key:l.B2B,value:l.B2B},{key:l.B2C,value:l.B2C}]:[]).concat((0,u._)(e?[{key:l.API,value:l.API}]:[]))},g={getChannelSelectOptions:b,field:p,initialValues:m,validationSchema:h}},8840:function(e,t,a){"use strict";a.d(t,{P:function(){return d},W:function(){return c}});var i=a(67294),l=a(9473),r=a(66819),n=a(99115),o=a(80749),s=a(39239),c=function(e){var t=(0,l.v9)(n.Z.agencies.item.isAgencyOwn),a=(0,l.v9)(r.Z.appSett
1ings.user.permissions);return(0,i.useMemo)(function(){var i=e?o.y3.createAgency:t?o.y3.updateOwnAgency:o.TG;return s.Z.hasPermission(i,a)},[t,e,a])},u=function(e){return{key:e.id,value:e.name}},d=function(){return(0,i.useCallback)(function(e){return{url:"/back-office/agency/autocomplete",name:e,processItem:u}},[])}},57570:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eh}});var i=a(85893),l=a(67294),r=a(83762),n=a(9473),o=a(13990),s=a(68466),c=a(66498),u=a(42138),d=a(34811),f=a(87387),p=a(64985),m=a(6855),h=a(45202),b=a(20086),g=Object.values(a(41271).AM).map(function(e){return{key:e,value:"layout.backoffice.statuses.".concat(e)}}),y=a(8840),_=a(23778),T=a(80749),v=a(72866),N=a(79093),k=a(3743),x=a(75927),A=a(95276),E=a(66819),S=a(99115),Z=a(28085),j=function(){var e=(0,n.I0)(),t=(0,u.u6)().setFieldValue,a=(0,k.T)(T.y3.manageAgencyParent),i=(0,k.T)(T.y3.viewRailconnectPurchaseFilters),r=(0,k.T)(T.y3.viewRailclickPurchaseFilters),o=h.Z.field,s=(0,n.v9)(S.Z.pageGrid.filters),c=(0,n.v9)(E.Z.cache.stations.localized),d=(0,n.v9)(E.Z.appSettings.locale.allLocationsSelectOptions),f=(0,n.v9)(E.Z.appSettings.financial.paymentSystemSelectOptions),p=(0,n.v9)(S.Z.purchases.list.parentAgencyFilter),m=(0,n.v9)(S.Z.partners.list.partnerFilterOptions),b=(0,l.useMemo)(function(){return(0,h.T)(i,r)},[i,r]);return(0,l.useEffect)(function(){(null==s?void 0:s.parent_agency)&&!a&&e(x.Z.ui.setStatusCode(N.MU.FORBIDDEN)),e(A.Z.purchasesSaga.loadParentAgencyFilter(null==s?void 0:s.parent_agency));var i={from:null==s?void 0:s.booking_at_from,to:null==s?void 0:s.booking_at_to},l={from:null==s?void 0:s.departure_at_from,to:null==s?void 0:s.departure_at_to};t(o.BOOKING_DATE_RANGE,i),t(o.TRAVEL_DATE_RANGE,l),t(o.BUYER_NAME,(null==s?void 0:s.buyer_name)||""),t(o.BUYER_EMAIL,(null==s?void 0:s.buyer_email)||""),t(o.STATUS,(null==s?void 0:s.purchase_status)||null),t(o.CHANNEL,(null==s?void 0:s.channel)||null),t(o.PURCHASE_LOCATION,Z.Z.getCountrySelectOption(null==s?void 0:s.purchase_location)),t(o.AGENCY_NAME,(null==s?void 0:s.agency_name)||""),t(o.AGENCY_ID,(null==s?void 0:s.agency_id)||""),t(o.DOMAIN,(null==s?void 0:s.ui_domain)||""),t(o.TERMINAL,(null==s?void 0:s.payment_system)||""),t(o.PARTNER,(null==s?void 0:s.partner)||"")},[a,s]),(0,l.useEffect)(function(){var a,i,l=null==s?void 0:s.ticket_origin,r=null==s?void 0:s.ticket_destination;l&&e(x.Z.cacheSaga.addStation(l)),r&&e(x.Z.cacheSaga.addStation(r)),t(o.ORIGIN,l?null===(a=c[l])||void 0===a?void 0:a.data:null),t(o.DESTINATION,r?null===(i=c[r])||void 0===i?void 0:i.data:null)},[s,c]),(0,l.useEffect)(function(){t(o.PARENT_AGENCY,p)},[p]),{countryOptions:d,paymentSystemSelectOptions:f,channelSelectOptions:b,partnerFilterOptions:m}},O=function(){var e=j(),t=(0,y.P)(),a=(0,_.Jm)({tripPoint:v.m.origin}),l=(0,_.Jm)({tripPoint:v.m.destination}),n=h.Z.field;return(0,i.jsx)(u.l0,{children:(0,i.jsxs)("div",{className:"form-vertical-util",children:[(0,i.jsxs)(r.Z,{i:T.y3.viewGeneralPurchaseFilters,children:[(0,i.jsx)(d.Z,{name:n.BOOKING_DATE_RANGE,labelTitle:"layout.backoffice.filter.filters.booking_date_range.label",placeholderFrom:"layout.backoffice.filter.filters.date_range_placeholder.from",placeholderTo:"layout.backoffice.filter.filters.date_range_placeholder.to",monthsToShow:1,selectRange:!0,allowMonthPicking:!0,optional:!0}),(0,i.jsx)(d.Z,{name:n.TRAVEL_DATE_RANGE,labelTitle:"layout.backoffice.filter.filters.travel_date_range.label",placeholderFrom:"layout.backoffice.filter.filters.date_range_placeholder.from",placeholderTo:"layout.backoffice.filter.filters.date_range_placeholder.to",monthsToShow:1,selectRange:!0,allowMonthPicking:!0,optional:!0})]}),(0,i.jsxs)(r.Z,{i:T.y3.viewRailclickPurchaseFilters,children:[(0,i.jsx)(m.Z,{name:n.BUYER_NAME,labelTitle:"layout.backoffice.filter.filters.buyer_name.label",placeholder:"layout.backoffice.filter.filters.buyer_name.placeholder",optional:!0}),(0,i.jsx)(m.Z,{name:n.BUYER_EMAIL,type:"email",labelTitle:"layout.backoffice.filter.filters.buyer_email.label",placeholder:"layout.backoffice.filter.filters.buyer_email.placeholder",optional:!0})]}),(0,i.jsx)(r.Z,{i:T.y3.viewGeneralPurchaseFilters,children:(0,i.jsx)(p.Z,{name:n.STATUS,options:g,labelTitle:"layout.backoffice.filter.filters.status.label",placeholder:"layout.backoffice.filter.filters.placeholder.all",clearable:!0,optional:!0})}),(0,i.jsx)(r.Z,{i:T.y3.viewRailclickPurchaseFilters,children:(0,i.jsx)(p.Z,{name:n.TERMINAL,options:e.paymentSystemSelectOptions,labelTitle:"layout.backoffice.summary.payment.rows.terminal.label",placeholder:"layout.backoffice.filter.filters.placeholder.all",sorted:!0,clearable:!0,optional:!0})}),(0,i.jsx)(r.Z,{i:T.y3.viewGeneralPurchaseFilters,children:(0,i.jsx)(f.Z,{name:n.ORIGIN,getSuggestionsApiConfig:a,labelTitle:"layout.backoffice.filter.filters.origin.label",placeholder:"layout.backoffice.filter.filters.select.placeholder",optional:!0})}),(0,i.jsx)(r.Z,{i:T.y3.viewGeneralPurchaseFilters,children:(0,i.jsx)(f.Z,{name:n.DESTINATION,getSuggestionsApiConfig:l,labelTitle:"layout.backoffice.filter.filters.destination.label",placeholder:"layout.backoffice.filter.filters.select.placeholder",optional:!0})}),(0,i.jsx)(p.Z,{name:n.CHANNEL,options:e.channelSelectOptions,labelTitle:"layout.backoffice.filter.filters.channel.label",placeholder:"layout.backoffice.filter.filters.select.placeholder",noTranslation:!0,clearable:!0,optional:!0}),(0,i.jsxs)(r.Z,{i:T.y3.viewRailclickPurchaseFilters,children:[(0,i.jsx)(f.Z,{name:n.PURCHASE_LOCATION,suggestions:e.countryOptions,labelTitle:"form.auth.country.label",placeholder:"layout.backoffice.filter.filters.placeholder.all",renderSuggestionsOnFocus:!0,withTranslation:!0,sorted:!0,arrow:!0,optional:!0}),(0,i.jsx)(m.Z,{name:n.AGENCY_NAME,labelTitle:"layout.backoffice.agencies.list.grid.title.name",placeholder:"layout.backoffice.filter.filters.agencyName.placeholder",optional:!0})]}),(0,i.jsx)(r.Z,{i:T.y3.viewRailclickPurchaseFilters,children:(0,i.jsx)(m.Z,{name:n.AGENCY_ID,labelTitle:"layout.backoffice.agencies.item.info.form.agencyId.label",placeholder:"layout.backoffice.agencies.item.info.form.agencyId.placeholder",optional:!0})}),(0,i.jsx)(r.Z,{i:T.y3.viewRailconnectPurchaseFilters,children:(0,i.jsx)(p.Z,{name:n.PARTNER,options:e.partnerFilterOptions,labelTitle:"layout.backoffice.filter.filters.partner.label",placeholder:"layout.backoffice.filter.filters.partner.placeholder",clearable:!0,optional:!0})}),(0,i.jsx)(r.Z,{i:T.y3.viewRailclickPurchaseFilters,children:(0,i.jsx)(f.Z,{name:n.PARENT_AGENCY,getSuggestionsApiConfig:t,labelTitle:"layout.backoffice.agencies.item.info.form.parent.label",placeholder:"layout.backoffice.agencies.item.info.form.parent.placeholder",renderSuggestionsOnFocus:!0,positionListTop:!0,optional:!0})}),(0,i.jsx)(r.Z,{i:T.y3.viewRailclickPurchaseFilters,children:(0,i.jsx)(m.Z,{name:n.DOMAIN,labelTitle:"layout.backoffice.filter.filters.domain.label",placeholder:"layout.backoffice.filter.filters.domain.placeholder",optional:!0})})]})})},D=a(93965),R=function(e){var t=e.children;return(0,i.jsx)("div",{className:"max-w-full shrink-0 break-words px-2 min-w-24 basis-[16.6%] last:basis-[66.6%]",children:t})},P=a(81667),I=a(24043),w=function(e){var t=e.trainNumber;return(0,i.jsx)("p",{className:"text-sm uppercase mb-1.5 last:mb-0",children:t||"â"})},C=a(5401),G=function(e){var t=(0,D.$G)().t,a=(0,l.useMemo)(function(){var t=Object.keys(e);return{firstSegment:e[t[0]],lastSegment:e[t.at(-1)]}},[e]),r=a.firstSegment,n=a.lastSegment,o=(0,l.useMemo)(function(){var e=r[0],t=e.departureDate,a=e.departureTime,i=e.arrivalDate,l=e.arrivalTime;return{departureDate:t,departureDateTime:a?"".concat(t," ").concat(a):null,arrivalDate:i,arrivalDateTime:l?"".concat(i," ").concat(l):null}},[r]),s=o.departureDate,c=o.departureDateTime,u=o.arrivalDate,d=o.arrivalDateTime,f=(0,I._)(r,1)[0].direction===C.D_.outbound?t("layout.backoffice.purchase_details_grid.tickets.outbound"):t("layout.backoffice.purchase_details_grid.tickets.return");return{arrivalDate:u,arrivalDateTime:d,departureDate:s,departureDateTime:c,firstSegment:r,lastSegment:n,tripDirectionStr:f,vehicleNumbers:Object.values(e).map(function(e){return(0,i.jsx)(w,{trainNumber:e[0].transportNumber},e[0].id)}),vehicleTypes:Object.values(e).map(function(e){return(0,i.jsx)("p",{children:t("layout.backoffice.purchase_details_grid.pnr_tip.".concat(e[0].transportType))},e[0].id)})}},B="flex-1 pr-4 last:flex-initial last:shrink-0 last:pr-0",M="inline-block text-sm font-bold mb-1.5",L="ml-3",F="mb-4 text-xs font-bold uppercase text-secondary even:hidden",U="mb-4 hidden text-xs uppercase text-secondary",Y="text-sm",V={visibility:"visible"},$=function(e){var t,a,l=e.routeDetails,r=(0,D.$G)().t,n=G(l);return(0,i.jsxs)("div",{className:"mb-5 flex border-b border-dashed pb-5 border-secondary-o80 last:mb-0 last:border-none last:pb-0",children:[(0,i.jsxs)("div",{className:B,children:[(0,i.jsx)("h5",{className:F,children:r("layout.backoffice.purchases_grid.details.origin")}),(0,i.jsx)("p",{className:U,style:V,children:n.tripDirectionStr}),(0,i.jsx)("strong",{className:M,children:null===(t=n.firstSegment[0].originStation)||void 0===t?void 0:t.name}),(0,i.jsxs)("p",{className:Y,children:[(0,i.jsx)("span",{children:n.departureDate?P.ZP.timeToDateString(n.departureDate,!1,!0):"NaN"}),(0,i.jsx)("span",{className:L,children:n.departureDateTime?P.ZP.timeToTimeStr
1ing(n.departureDateTime,!0):""})]})]}),(0,i.jsxs)("div",{className:B,children:[(0,i.jsx)("h5",{className:F,children:r("layout.backoffice.purchases_grid.details.destination")}),(0,i.jsx)("p",{className:U,children:n.tripDirectionStr}),(0,i.jsx)("strong",{className:M,children:null===(a=n.lastSegment[0].destinationStation)||void 0===a?void 0:a.name}),(0,i.jsxs)("p",{className:Y,children:[(0,i.jsx)("span",{children:n.arrivalDate?P.ZP.timeToDateString(n.arrivalDate,!1,!0):"NaN"}),(0,i.jsx)("span",{className:L,children:n.arrivalDateTime?P.ZP.timeToTimeString(n.arrivalDateTime,!0):""})]})]}),(0,i.jsxs)("div",{className:B,children:[(0,i.jsx)("h5",{className:F,children:r("layout.backoffice.purchases_grid.details.vehicleType")}),(0,i.jsx)("p",{className:U,children:n.tripDirectionStr}),n.vehicleTypes]}),(0,i.jsxs)("div",{className:B,children:[(0,i.jsx)("h5",{children:r("layout.backoffice.purchases_grid.details.number")}),(0,i.jsx)("p",{className:U,children:n.tripDirectionStr}),n.vehicleNumbers]})]})},H="mb-4 text-xs font-bold uppercase text-secondary",z="text-sm mb-2.5 last:mb-0",X=function(e){var t=e.data,a=(0,D.$G)().t,l=t.tickets,r=l.pnrs.map(function(e){return(0,i.jsx)("p",{className:z,children:e||"â"},e)}),n=l.routes.outbound,o=l.routes.inbound;return(0,i.jsxs)("div",{className:"flex w-full px-10 pt-4 pb-9",children:[(0,i.jsxs)(R,{children:[(0,i.jsx)("h4",{className:H,children:a("layout.backoffice.purchases_grid.details.order_id")}),(0,i.jsx)("p",{className:z,children:t.orderId})]}),(0,i.jsxs)(R,{children:[(0,i.jsx)("h4",{className:H,children:a("layout.backoffice.purchases_grid.details.pnrs")}),r]}),(0,i.jsxs)(R,{children:[n&&(0,i.jsx)($,{routeDetails:n}),o&&(0,i.jsx)($,{routeDetails:o}),!n&&!o&&(0,i.jsx)("div",{className:"text-danger",children:a("layout.backoffice.purchases_grid.details.no_ticket_order")})]})]})},K=a(65366),J=a(75060),q=a(63860),Q=a(87746),W=a(88377),ee=a(6309),et=function(e){var t,a,i,l,r=e.bookingDateRange,n=e.travelDateRange;return{agency_id:e.agencyId,agency_name:e.agencyName,booking_at_from:r.from&&P.ZP.timeToDateString(r.from),booking_at_to:r.to&&P.ZP.timeToDateString(r.to),channel:e.channel,departure_at_from:n.from&&P.ZP.timeToDateString(n.from),departure_at_to:n.to&&P.ZP.timeToDateString(n.to),buyer_name:e.buyerName,buyer_email:e.buyerEmail,parent_agency:null===(t=e.parentAgency)||void 0===t?void 0:t.key,payment_system:e.terminal,purchase_location:null===(a=e.purchaseLocation)||void 0===a?void 0:a.key,purchase_status:e.status,ticket_origin:null===(i=e.origin)||void 0===i?void 0:i.key,ticket_destination:null===(l=e.destination)||void 0===l?void 0:l.key,ui_domain:e.domain,partner:e.partner}},ea=a(39239),ei=a(16447),el=a(65987),er=a(68608),en=a(11163),eo=a(79375),es=a(38998),ec=a(10468),eu=a(13995),ed=a(26143),ef=function(){var e=(0,D.$G)().t,t=(0,en.useRouter)().query,a=(0,n.I0)(),r=(0,I._)((0,l.useState)(""),2),o=r[0],s=r[1];(0,l.useEffect)(function(){s(ec.ZP.parseUrlQueryParams(t).search||"")},[]);var c=(0,l.useCallback)(function(e){s(e),a(A.Z.pageGridSaga.searchInGrid(e))},[]);return(0,i.jsxs)(es.Z,{title:"layout.backoffice.purchases.list.title",children:[(0,i.jsx)("div",{className:"ml-auto min-w-72",children:(0,i.jsx)(eu.Z,{placeholder:e("layout.backoffice.filter.global"),value:o,onChange:c,iconLeft:eo.Z.search})}),(0,i.jsx)(ed.Z,{})]})},ep=function(){var e=(0,n.I0)(),t=(0,W.h)(q.Z.size.tableControlMargin),a=t.ref,r=t.bodyHeight;(0,Q.o)(A.Z.purchasesSaga.loadPurchasesList),(0,ee.j)(A.Z.partnersSaga.loadPartnerShortData);var u=S.Z.purchases.list,d=(0,n.v9)(u.purchasesPending),f=(0,n.v9)(u.items),p=(0,n.v9)(u.purchasesTotal),m=(0,n.v9)(S.Z.partners.list.partnerFilterOptions),y=(0,n.v9)(u.parentAgencyFilter),_=(0,n.v9)(E.Z.cache.stations.localized),v=(0,n.v9)(E.Z.appSettings.locale.allLocationsSelectOptions),N=(0,n.v9)(E.Z.appSettings.financial.paymentSystemSelectOptions),k=(0,n.v9)(E.Z.appSettings.user.permissions),x=ea.Z.hasPermission(T.y3.viewRailclickPurchaseData,k),Z=ea.Z.hasPermission(T.y3.viewRailconnectPurchaseData,k),j=f.some(function(e){return null!==e.partnerName}),D=(0,l.useMemo)(function(){return[{filters:["booking_at_from","booking_at_to"],title:"layout.backoffice.filter.filters.booking_date_range.badge",type:b.g.dateRange},{filters:["departure_at_from","departure_at_to"],title:"layout.backoffice.filter.filters.travel_date_range.badge",type:b.g.dateRange},{filters:["buyer_name"],title:"layout.backoffice.filter.filters.buyer_name.badge"},{filters:["buyer_email"],title:"layout.backoffice.filter.filters.buyer_email.badge"},{filters:["purchase_status"],title:"layout.backoffice.filter.filters.status.badge",type:b.g.select,options:g},{filters:["payment_system"],title:"layout.backoffice.summary.payment.rows.terminal.label",type:b.g.select,options:N},{filters:["ticket_origin"],title:"layout.backoffice.filter.filters.origin.badge",type:b.g.modelOfDict,dict:_,modelProp:"value"},{filters:["ticket_destination"],title:"layout.backoffice.filter.filters.destination.badge",type:b.g.modelOfDict,dict:_,modelProp:"value"},{filters:["channel"],title:"layout.backoffice.filter.filters.channel.label"},{filters:["purchase_location"],title:"form.auth.country.label",type:b.g.select,options:v},{filters:["agency_name"],title:"layout.backoffice.agencies.list.grid.title.name"},{filters:["agency_id"],title:"layout.backoffice.agencies.item.info.form.agencyId.label"},{filters:["partner"],title:"layout.backoffice.filter.filters.partner.label",type:b.g.select,options:m},{filters:["parent_agency"],title:"layout.backoffice.agencies.item.info.form.parent.badge",type:b.g.model,dict:y,modelProp:"value"},{filters:["ui_domain"],title:"layout.backoffice.filter.filters.domain.label"}]},[v,y,m,N,_]),R=(0,l.useCallback)(function(t){e(A.Z.purchasesSaga.viewPurchaseDetails({id:t.id}))},[e]),P=[{headerTitle:"layout.backoffice.purchases_grid.header.reference_code",selector:"referenceCode",type:ei.d7.TEXT,sortBy:"display_id",sortReversed:!0,grow:4},{headerTitle:"layout.backoffice.purchases_grid.header.booking_date_time",selector:"bookingDateTime",type:ei.d7.DATE_TIME,sortBy:"created_at",sortReversed:!0,grow:4},{headerTitle:"layout.backoffice.agencies.list.grid.title.name",selector:"agencyName",type:ei.d7.TEXT,params:{ellipsis:!0},sortBy:"agency.name",grow:10,omit:j||!x},{headerTitle:"layout.backoffice.purchases_grid.header.buyer_name",selector:"buyerName",type:ei.d7.LIST,sortBy:"buyer.name",grow:5,omit:j||!x},{headerTitle:"layout.backoffice.purchases_grid.header.buyer_email",selector:"buyerEmail",type:ei.d7.TEXT,sortBy:"buyer.email",grow:10,omit:j||!x},{headerTitle:"layout.backoffice.purchases_grid.header.partnerName",selector:"partnerName",type:ei.d7.TEXT,grow:5,omit:!j||!Z},{headerTitle:"",selector:"statusDetails",type:ei.d7.STATUS_DETAILS,width:"1.9rem"},{headerTitle:"layout.backoffice.purchases_grid.header.status",selector:"status",type:ei.d7.STATUS,grow:6},{selector:"actions",type:ei.d7.CONTEXT_MENU,width:"2.3rem",allowOverflow:!0,params:el.z}];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.Z,{bottomFixed:(0,i.jsx)(K.Z,{total:p}),children:[(0,i.jsx)(ef,{}),(0,i.jsx)(c.Z,{mapFilters:D}),(0,i.jsx)(J.Z,{ref:a,columns:P,data:f,expandableArea:X,bodyHeight:r,isPending:d,rowHover:!0,onRowDoubleClicked:R}),(0,i.jsx)(er.Z,{})]}),(0,i.jsx)(s.Z,{applyFilters:et,initialValues:h.Z.initialValues,validationSchema:h.Z.validationSchema,pending:d,children:(0,i.jsx)(O,{})})]})},em=a(58017),eh=function(){return(0,i.jsxs)(r.Z,{i:T.$z,else403:!0,children:[(0,i.jsx)(em.Z,{}),(0,i.jsx)(ep,{})]})}}},function(e){e.O(0,[41664,25675,41247,96779,6909,42138,85200,84979,83066,21673,22843,17770,13126,27225,42823,49774,92888,40179],function(){return e(e.s=90895)}),_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.