1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{12460:(e,r,o)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/orders/[ordergroupid]",function(){return o(41537)}])},14762:(e,r,o)=>{"use strict";o.d(r,{VY:()=>n,Z5:()=>c,dM:()=>i,dv:()=>m});var t=o(15878),s=o(93473);let i=t.styled.div.withConfig({componentId:"sc-e55d483d-0"})(["display:flex;justify-content:",";align-items:",";margin:0;",";",";",";",";"],e=>e.$justifyContent||"space-between",e=>e.$alignItems||"start",e=>`padding: ${e.$noPadding?"0":"1"}em 0;`,e=>e.$withBorder&&`border-top: 1px solid ${e.theme.colors.midGrey};`,e=>e.$preWrap&&"text-align: right",e=>e.$preWrap&&"white-space: pre-wrap"),n=t.styled.article.withConfig({componentId:"sc-e55d483d-1"})(["display:flex;flex-direction:column;justify-content:space-between;position:relative;border:1px solid ",";border-radius:10px;background:",";h4{margin-bottom:0;word-wrap:anywhere;}header{flex-grow:1;}header,.cardBody{padding:1em 1em 0 1em;}.dropdown{flex:1;max-width:200px;}img{max-height:30px;}footer{background:",";padding:0.5em 1em;border-bottom-left-radius:10px;border-bottom-right-radius:10px;}mark{background-color:",";font-weight:bold;}"],e=>e.$isChecked?e.theme.colors.midGreen:e.theme.colors.midBlue,e=>e.theme.colors.white,e=>e.$isChecked?e.theme.colors.lightGreen:e.theme.colors.lightGrey,e=>e.theme.colors.lightMidGreen),a=(0,t.css)(["",""],e=>` 2 border-color: ${e.theme.colors.midGreen}; 3 header { 4 color:${e.theme.colors.darkGreen}; 5 } 6 footer { 7 background: ${e.theme.colors.lightGreen}; 8 svg { 9 color: ${e.theme.colors.darkGreen}; 10 } 11 } 12 `),d={online:a,offline:(0,t.css)(["",""],e=>` 13 border-color: ${e.theme.colors.midGrey}; 14 header { 15 color:${e.theme.colors.darkGrey}; 16 } 17 footer { 18 background: ${e.theme.colors.lightGrey}; 19 svg { 20 color: ${e.theme.colors.darkGrey}; 21 } 22 } 23 `),in_progress:(0,t.css)(["",""],e=>` 24 border-color: ${e.theme.colors.darkGrey}; 25 header { 26 color:${e.theme.colors.darkGrey}; 27 } 28 footer { 29 background:${e.theme.colors.midGrey}; 30 svg { 31 color: ${e.theme.colors.darkGrey}; 32 } 33 } 34 `)},l=(0,t.css)(["footer{padding:0;&:hover{background:",";transition:color var(--transition-fast);}a{display:flex;justify-content:space-between;align-items:center;cursor:pointer;text-decoration:none;padding:1em 1em;color:",";&:active,&:visited{color:",";}}svg{color:",";}}"],e=>e.theme.colors.midGrey,e=>e.theme.colors.black,e=>e.theme.colors.black,e=>e.theme.colors.midGreen),c=(0,t.styled)(n).withConfig({componentId:"sc-e55d483d-2"})(["flex:1;header{display:flex;flex-direction:column;span{display:flex;&:first-of-type{margin-bottom:1em;}}svg{margin-right:0.5em;}}h4{margin-top:0;overflow:hidden;}.status{font-size:0.85em;}"," ",""],l,({$orderState:e="in_progress"})=>d[`${e}`]),m=(0,t.styled)(n).withConfig({componentId:"sc-e55d483d-3"})(["flex:1;margin-bottom:0;max-width:100%;border-color:",";header{border-bottom:1px solid ",";flex-grow:0;padding:0.5em 1em;}h4{margin-top:0;}.is-bold{font-weight:bold;}"],e=>e.theme.colors.darkGrey,e=>e.theme.colors.darkGrey);(0,t.styled)(s.A).withConfig({componentId:"sc-e55d483d-4"})(["color:",";cursor:pointer;transition:color var(--transition-fast);margin-left:0.5em;transform:rotate(180deg);color:",";&:hover{color:",";}"],e=>e.theme.colors.darkGrey,e=>e.theme.colors.darkBlue,e=>e.theme.colors.midGreen),(0,t.styled)("a").withConfig({componentId:"sc-e55d483d-5"})(["text-decoration:none;color:unset;cursor:pointer;"]),t.styled.small.withConfig({componentId:"sc-e55d483d-6"})(["font-style:italic;margin-top:0.5em;font-size:0.6875rem;color:",";"],e=>e.theme.colors.darkGrey)},24990:(e,r,o)=>{"use strict";o.d(r,{p:()=>i,v:()=>s});var t=o(30810);let s=e=>Object.values(Object.groupBy(e,({ordergroupnumber:e})=>e)).map(e=>{let r,o=e.filter(e=>!e.is_ordergroup_leader);return r=1===e.length?[e[0].product_name_short]:Array.from(new Set(o.map(e=>e.product_name_short))),{ordernumber:`${e[0].ordernumber}`,ordergroupnumber:e[0].ordergroupnumber,title:e[0].title,items:e,publishDate:e[0].date,platforms:r,status:1===e.length?"in_progress"===e[0].workflow_status?"in_progress":e[0].active?"online":"offline":o.some(e=>"in_progress"===e.workflow_status)?"in_progress":o.some(e=>e.active)?"online":"offline"}}),i=e=>{let r=Object.groupBy(e.map(e=>({...e,product_name_short:e.product_name_short??e.product_name})),({product_name_short:e})=>e);return Object.keys(r).map(e=>{var o;return{name:e,status:(o=r[e]).some(e=>e?.moderation_status_data?.list?.some(e=>
34["ON_HOLD","BLOCKING"].includes(e.severity)))?"on_hold_or_blocking":o.some(e=>"in_progress"===e.workflow_status)?"in_progress":o.some(e=>"published"===e.workflow_status)?"online":o.some(e=>"cancelled"===e.workflow_status)?"cancelled":"offline",expires:(e=>{let r=e=>(0,t.qg)(e,"yyyy-MM-dd",new Date),o=(e,o)=>e.expires||o.expires?e.expires?o.expires?Number(r(e.expires)<r(o.expires)):-1:1:0;if(e.some(e=>"in_progress"===e.workflow_status))return"";let s=e.filter(e=>"published"===e.workflow_status);return s.length>0?s.sort(o)[0].expires:e.filter(e=>"deleted"===e.workflow_status||"expired"===e.workflow_status).sort(o)[0]?.expires??""})(r[e]),orders:r[e]}})}},34868:(e,r,o)=>{"use strict";o.d(r,{A:()=>l});var t=o(89099),s=o(14232),i=o(14368),n=o(32203),a=o(61169);let d={de:"de-DE",en:"en-US","de-AT":"de-AT","de-CH":"de-CH",fr:"fr-FR",cz:"cs-CZ",es:"es-ES",it:"it-IT",pl:"pl-PL",ro:"ro-RO",tr:"tr-TR",hu:"hu-HU",nl:"nl-NL"},l=()=>{let e=(0,t.useRouter)(),{currencyRates:r,defaultCurrency:o}=(0,a.A)(),{currency:l}=(0,i.A)(n.Z1,e=>e)||{},c=(0,s.useMemo)(()=>r?.find(e=>e.short_name===l),[l,r]);return{formatMoney:(r,t)=>{let s,i={style:"currency",location:d[e?.locale]??d.de,minimumFractionDigits:2,hideZeros:!0,...t};i.currency||(i.currency="EUR"),i.hideZeros&&r%1==0&&(i.minimumFractionDigits=0);let n=1;return!i.skipConversion&&(s=i.currency,c&&o===s)&&(n=c?.rate??1,i.currency=c?.short_name??"EUR"??"EUR"),new Intl.NumberFormat(i.location,i).format(r*n)}}}},41537:(e,r,o)=>{"use strict";o.r(r),o.d(r,{__N_SSP:()=>H,default:()=>K});var t=o(37876),s=o(72309),i=o(15878),n=o(18847),a=o.n(n),d=o(89099),l=o(67914),c=o(66669),m=o(43),h=o(6166),u=o(49833),p=o(24990);let g=async({authToken:e,locale:r,orderGroupId:o})=>{if(!o)throw Error("ordergroupid is required");let t=await (0,u.A)({endpoint:h.v.cockpitApi.orders,authToken:e,locale:r,requestBody:{ordersearchparam:{ordergroupid:o,performance_details:!0}}});if(!t)throw Error("Could not fetch order details from API");let s=(0,p.v)(t.orders);if(1!==s.length)throw Error(`For ordergroupid ${o} there was not exactly 1 order group returned`);return s[0]};var f=o(96597),x=o(64506),b=o(20235),j=o(11268),y=o(67096),w=o(95142),k=o(62027),_=o(14232),v=o(67768),$=o(42835),A=o(22207),G=o(19383),C=o(88743),N=o(92264),M=o(15753);let I=({toggleModal:e,modalPayload:r,queryToRefetch:o})=>{let{t:i}=(0,s.Bd)(["orders","errors"]),{authToken:n,customerData:a}=(0,x.Z2)(),l=(0,d.useRouter)(),{generateToast:c}=(0,$.A)(),m=(0,v.jE)(),[u,p]=(0,_.useState)(!1);if(!r)return null;let{jobId:g=null,publish:f=null,postingIds:b=[]}=r,j=async(r,t)=>{p(!0);try{await (0,A.A)({authToken:n,endpoint:h.v.jobPostingApi.jobpostings,locale:l.locale,requestBody:{jobid:r,billingaccountid:a.billingaccounts?.[0].billingaccountid,products:t.map(e=>({postingid:e,offline:!0}))}}),e(),c(i("card.message.offline-success"),"success"),m.resetQueries({queryKey:o})}catch(e){if(e instanceof G.I)return void c(i(e.code.toString(),{ns:"errors"}),"error");c(i("card.message.offline-failed"),"error")}finally{p(!1)}},y=g?`catalog?jobId=${g}`:"catalog";return(0,t.jsxs)(N.$m,{children:[(0,t.jsx)(N.rQ,{children:(0,t.jsxs)(C.A,{$gap:"2rem",$direction:"column",$justify:"center",$align:"center",children:[(0,t.jsx)(w.A,{as:"h3",$variant:"h1",$weight:800,$color:"error",children:i("modal.alert")}),(0,t.jsx)(w.A,{as:"p",children:f?i("modal.body.book-again"):i("modal.body.cancel")})]})}),(0,t.jsx)(N.jl,{children:(0,t.jsxs)(M.e,{$spacing:"1rem",$width:"100%",children:[(0,t.jsx)(M.A,{variant:"secondary",onClick:()=>e(),"aria-label":"discard modal",children:i("modal.button.cancel")}),f?(0,t.jsx)(M.A,{component:"link",href:y,"aria-label":"confirm to book this jobposting again",children:i("modal.button.book-again")}):(0,t.jsx)(M.A,{variant:"success",onClick:()=>j(g,b),state:u?"loading":null,children:i("modal.button.delete")})]})})]})};var B=o(48230),E=o.n(B),F=o(55408),D=o(56571),S=o(93473),O=o(84184),R=o(14762);let P=({orderGroup:e,view:r="list",className:o,views:i,clicks:n,highlightSearchMatches:a,toggleModal:d})=>{let l,[c]=e.items,{t:h}=(0,s.Bd)("orders"),{userPermissions:u}=(0,x.Z2)(),{formatDate:p}=(0,m.Ay)(),g=e.items.find(e=>e?.expires),[f]=(0,_.useState)((l=new Date(g?.expires),-1===(0,F.z)(l,Date.now())?h("card.status.offline"):(0,D.c)(l,Date.now())||"-")),b={online:()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.A,{iconName:"FiberManualRecord"}),h("card.status.published")," ",p(e.publishDate)]}),in_progress:()=>
34(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.A,{iconName:"AccessTime"}),h("card.status.in_progress")]}),offline:()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.A,{iconName:"FiberManualRecord"}),h("card.status.offline")]})},j=()=>{let r=Array.from(new Set(e.items.filter(e=>e.jobposting).map(e=>e.jobposting?.postingid)));d({jobId:e.items.find(e=>e.jobposting?.job?.jobid)?.jobposting?.job?.jobid,publish:"offline"===e.status,postingIds:r})};return(0,t.jsxs)(R.Z5,{className:o,"data-testid":"order-card",$orderState:e.status??"in_progress",children:[(0,t.jsxs)("header",{children:[(0,t.jsx)("span",{children:b[e.status]?.()??b.offline()}),u.check(["bookProducts"])&&(()=>{if("in_progress"===e.status)return(0,t.jsx)("span",{className:"status",children:h("card.status.progress-message")});let r=e.items.find(e=>e?.jobposting?.job);return"online"!==e.status||r?(0,t.jsx)(O.K4,{role:"button",name:"online"===e.status?"cancel active order":"rebook order",onClick:j,"aria-label":"online"===e.status?`cancel active order ${c.ordernumber}`:`rebook order ${c.ordernumber}`,className:"status",children:"online"===e.status?h("card.button.offline"):h("card.button.book-again")}):null})()]}),(0,t.jsxs)("div",{className:"cardBody",children:[(0,t.jsx)(R.dM,{children:(0,t.jsx)("h4",{"aria-label":"card-heading",children:a?a(e.title,"title",e.searchMatches):e.title})}),(0,t.jsxs)(R.dM,{children:[(0,t.jsx)("span",{children:h("card.applications")}),(0,t.jsx)("span",{children:n??"-"})]}),(0,t.jsxs)(R.dM,{$withBorder:!0,children:[(0,t.jsx)("span",{children:h("card.duration")}),(0,t.jsxs)("span",{"data-testid":"card-duration",children:[f," ","number"==typeof f?h("card.days"):""]})]}),(0,t.jsxs)(R.dM,{$withBorder:!0,children:[(0,t.jsx)("span",{children:h("card.hits")}),(0,t.jsx)("span",{children:i??"-"})]})]}),(0,t.jsx)("footer",{children:(()=>{if("list"===r)return(0,t.jsxs)(E(),{href:`/orders/${c.ordergroupnumber}`,children:[(0,t.jsxs)("span",{children:[h("card.bookingnumber")," ",a?a(e.ordernumber,"ordernumber",e.searchMatches):e.ordernumber]}),(0,t.jsx)(S.A,{iconName:"ArrowForwardIos"})]})})()})]})};var T=o(34868);let Z=i.styled.ul.withConfig({componentId:"sc-402a873e-0"})(["list-style:none;padding-left:1em;margin-top:0;margin-bottom:2em;li{margin:0.5em 0;}"]),q=({orderGroup:e})=>{let{t:r}=(0,s.Bd)("orders"),{formatMoney:o}=(0,T.A)(),i=e.items.filter(e=>!!e.customercontract).map(e=>e.customercontract),n=(e.items??[]).reduce((e,r)=>e+(r.vk_kalk_ustbasis??0),0),a=e.items[0]?.["vk_kalk_ustbasis-currency"]?.short_name;return(0,t.jsxs)(R.dv,{children:[(0,t.jsx)("header",{children:(0,t.jsx)(R.dM,{children:(0,t.jsx)("span",{children:r("details.order-details")})})}),(0,t.jsxs)("div",{className:"cardBody",children:[(0,t.jsx)(R.dM,{children:(0,t.jsx)("h4",{children:r("details.platforms")})}),(0,t.jsx)(Z,{children:e.platforms.map(e=>(0,t.jsx)("li",{children:e},e))}),i.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.dM,{$withBorder:!0,children:(0,t.jsx)("h4",{children:r("details.packages")})}),(0,t.jsx)(Z,{children:i.map(({customercontract_backend_id:e,name:r})=>(0,t.jsx)("li",{children:r},e))})]})]}),(0,t.jsx)("footer",{children:(0,t.jsxs)(R.dM,{children:[r("details.total"),(0,t.jsx)("span",{className:"is-bold",children:o(n,{currency:a})})]})})]})},z=a()(()=>Promise.all([o.e(2697),o.e(1718),o.e(107),o.e(1782)]).then(o.bind(o,41782)),{loadableGenerated:{webpack:()=>[41782]},ssr:!1}),U=i.styled.div.withConfig({componentId:"sc-795555e4-0"})(["display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:'order-card' 'order-details-card' 'statistic';grid-gap:2rem;","{grid-template-columns:1fr 1fr;grid-template-areas:'order-card order-details-card' 'statistic statistic';}"],({theme:e})=>e.breakpoints.up("xlDesktop"));var H=!0;let K=({orderGroup:e})=>{let{query:r,locale:o}=(0,d.useRouter)(),{t:i}=(0,s.Bd)(["orders","common"]),{authToken:n}=(0,x.Z2)(),{modalOpen:a,toggleModal:h,modalPayload:u}=(0,f.A)(),p=r.ordergroupid?.toString(),_=["order",p],v=()=>h(),{formatDate:$}=(0,m.Ay)(),{data:A,isError:G,isFetching:M}=(0,l.I)({queryKey:_,queryFn:async()=>g({authToken:n,locale:o,orderGroupId:p}),initialData:e,gcTime:0});if(M)return(0,t.jsx)(k.A,{state:"loading",title:i("messages.loading",{ns:"common"})});if(!A||G)return(0,t.jsx)(k.A,{state:"error",title:i("messages.error",{ns:"common"})});let B=(0,c.Cg)(A);return B&&(B.labels=B?.labels?.map(e=>$(e,{inputFormat:"yyyy-MM-dd"}))),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(b.A,{children:[(0,t.jsx)(j.A,{title:i("details.title"),origin:"back",flat:!0,children:(0,t.jsx)(w.A,{as:"h2",$variant:"h2",$color:"midGreen",$weight:800,children:i("details.details-for-order",{number:A.ordernumber})})}),(0,t.jsx)(y.A,{children:(0,t.jsxs)(U,{children:[(0,t.jsx)(C.A,{$area:"order-card",$canGrow:!0,children:(0,t.jsx)(P,{orderGroup:A,view:"detail",views:B?(0,c.NN)("views",B.metrics):null,clicks:B?(0,c.NN)("clicks",B.metrics):null,toggleModal:h})}),(0,t.jsx)(C.A,{$area:"order-details-card",children:(0,t.jsx)(q,{orderGroup:A})}),(0,t.jsx)(C.A,{$area:"statistic",children:(0,t.jsx)(z,{data:B})})]})})]}),(0,t.jsx)(N.aF,{role:"dialog","aria-modal":a,"aria-labelledby":"dialogTitle","aria-describedby":"dialogDescription",isOpen:a,onBackgroun
34dClick:v,onEscapeKeydown:v,children:(0,t.jsx)(I,{modalPayload:u,toggleModal:h,queryToRefetch:_})})]})}},62027:(e,r,o)=>{"use strict";o.d(r,{A:()=>m});var t=o(37876),s=o(15878),i=o(93473),n=o(12010),a=o(52516),d=o(95142);let l=s.styled.section.withConfig({componentId:"sc-dfa8ced-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;gap:1rem;"]),c=s.styled.div.withConfig({componentId:"sc-dfa8ced-1"})(["display:flex;justify-content:center;align-items:center;gap:1rem;padding:1rem;color:",";"],({theme:e,$state:r})=>"error"===r?e.colors.error:e.colors.primary),m=({title:e,subtitle:r,state:o="empty",children:s,disableBackButton:m=!1})=>(0,t.jsxs)(l,{children:[(0,t.jsxs)(c,{$state:o,children:["loading"===o&&(0,t.jsx)(n.A,{size:"8rem"}),"error"===o&&(0,t.jsx)(i.A,{size:"8rem",iconName:"ErrorOutline"}),"empty"===o&&(0,t.jsx)(i.A,{size:"8rem",iconName:"Info"})]}),(0,t.jsx)(d.A,{as:"h1",$variant:"h1",$weight:700,children:Array.isArray(e)?(0,t.jsx)("ul",{children:e.map(e=>(0,t.jsx)("li",{children:e},e))}):e}),r&&(0,t.jsx)(d.A,{as:"h2",$variant:"copy",children:r}),s,!m&&("empty"===o||"error"===o)&&(0,t.jsx)(l,{children:(0,t.jsx)(a.A,{})})]})},96597:(e,r,o)=>{"use strict";o.d(r,{A:()=>s});var t=o(14232);function s(e={}){let{defaultModalOpen:r=!1}=e,[o,i]=(0,t.useState)(r),[n,a]=(0,t.useState)();return{modalOpen:o,toggleModal:e=>{i(!o),a(e)},modalPayload:n}}}},e=>{e.O(0,[2223,636,6593,8792],()=>e(e.s=12460)),_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.