PageSourceSearch

https://myg2.g2ocean.com/assets/OrganisationBookingsOverview-DAspgOI6.js

js g2ocean.com collected 2026-09-26 10:52:54 UTC 22,538 bytes, 1 lines download raw bytes

1import{ap as X,_ as U,aq as re,ar as se,as as de,at as j,au as H,av as $e,aw as q,ax as Y,ay as Se,k as pe,l as Be,az as Te,ai as ue,a4 as C,aA as ce,aB as Oe,b as xe,aC as Ie,S as A,ah as Pe,c as me,aD as z,U as ae,d as Ee,q as Ne,aE as Ae,aF as Le}from"./app_admin-DnIMOVmj.js";import{w as h,x as o,B as y,V as r,P as d,Y as n,af as ge,A as M,y as c,z as L,E as K,F as k,ak as x,j as F,C as E,G as ve,a9 as Qe,r as B,m as fe,a7 as Ue,S as I,aw as Me,i as Re,bA as le,bB as oe}from"./vendor-YXgVPBQl.js";import{u as Ge}from"./useBookingsOverviewFilters-DMeiIatW.js";import{_ as We}from"./BookingsDeclarationEmptyState.vue_vue_type_script_setup_true_name_BookingsDeclarationEmptyState_lang-D91EDR0p.js";import{V as qe}from"./vendor_apexcharts-C0e6KjC-.js";import{s as Q}from"./useChartHelpers-CIMh5NH3.js";import{d as Ye,a as ze}from"./useDeepMerge-DKarbY12.js";import{a as De}from"./useChartAnnotations-B4AkWCV8.js";import{_ as ne}from"./OrganisationStatisticsChartCard.vue_vue_type_script_setup_true_name_OrganisationStatisticsChartCard_lang-BALAY0zm.js";import{_ as je}from"./OrganisationStatisticsChartNoDataCard.vue_vue_type_script_setup_true_name_OrganisationStatisticsChartNoDataCard_lang-DOZN6hoX.js";import{_ as He}from"./OrganisationStatisticsLoading.vue_vue_type_script_setup_true_name_OrganisationStatisticsLoading_lang-7IZ6VLVl.js";import{_ as Xe}from"./BookingsOverviewDateFilter.vue_vue_type_script_setup_true_name_BookingsOverviewDateFilter_lang-D06fn0O2.js";import{_ as Ke}from"./FilterMenuSingleSelectDate.vue_vue_type_script_setup_true_name_FilterMenuSingleSelectDate_lang-qM4naXrt.js";import"./vendor_leaflet-D4pRDrnS.js";import"./CargoBookingTemplate.vue_vue_type_script_setup_true_name_CargoBookingTemplate_lang-B4ULwR8S.js";import"./useLoadingChart-ChPIYr3P.js";import"./FilterMenuSelectPeriodCalendar.vue_vue_type_script_setup_true_name_FilterMenuSelectPeriodCalendar_lang-DSfgA290.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"[email protected]"};var l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="5780aa96-65c4-4fb6-aad4-a661d5ddfef2",e._sentryDebugIdIdentifier="sentry-dbid-5780aa96-65c4-4fb6-aad4-a661d5ddfef2")}catch{}})();const Je=h({__name:"BookingsDeclarationFiltersLayout",props:{declarationDate:{},hasSelectedDate:{type:Boolean},title:{},loading:{type:Boolean}},emits:["clear"],setup(e,{emit:l}){const a=l,{lastUpdated:t}=X();return(i,m)=>(o(),y(U,{title:e.title,subtitle:r(t)?`Last update: ${r(re)(r(t))}`:"",divider:"header",padding:"none",loading:{header:e.loading,body:!1}},{default:d(()=>[n(se,{onClear:m[1]||(m[1]=w=>a("clear"))},ge({default:d(()=>[M(i.$slots,"default")]),_:2},[e.hasSelectedDate&&e.declarationDate.cp_start?{name:"tags",fn:d(()=>[(o(),y(de,{key:e.declarationDate.id,name:r(j)(e.declarationDate.cp_start),onClick:m[0]||(m[0]=w=>a("clear"))},null,8,["name"]))]),key:"0"}:void 0]),1024)]),_:3},8,["title","subtitle","loading"]))}}),T=h({__name:"BookingsDeclaredVolumeColumn",props:{value:{},loading:{type:Boolean},align:{default:"right"}},setup(e){return(l,a)=>e.loading||e.value===void 0?(o(),c("p",{key:0,class:L(["text-loading h-5 w-24",e.align==="left"?"mr-auto":"ml-auto"])},null,2)):(o(),c("p",{key:1,class:L(e.align==="right"?"text-right":"text-left")},[M(l.$slots,"default")],2))}}),P=h({__name:"BookingsDeclaredVolumeValueColumn",props:{value:{}},setup(e){const l=a=>typeof a=="string"?a:a?H(a):"NA";return(a,t)=>(o(),c("span",null,K(l(e.value)),1))}}),Ze={},_e={class:"declared-volume-grid w-full py-4 pl-14 pr-6"};function et(e,l){return o(),c("div",_e,[M(e.$slots,"default")])}const J=$e(Ze,[["render",et]]),ye=h({__name:"BookingsDeclaredVolumeWidgetHeader",props:{heading:{}},setup(e){return(l,a)=>(o(),y(J,{class:"bg-charcoal-2 font-bold"},{default:d(()=>[(o(!0),c(k,null,x(e.heading,(t,i)=>(o(),y(T,{key:t,align:i===0?"left":"right",value:t},{default:d(()=>[n(P,{value:t},null,8,["value"])]),_:2},1032,["align","value"]))),128))]),_:1}))}}),tt=h({__name:"BookingsDeclaredVolumeChangeColumn",props:{value:{}},setup(e){const l=t=>t===0?0:t>0?`+${H(t)}`:H(t),a=F(()=>e.value>=0?"above":"below");return(t,i)=>(o(),c("span",{class:L({"text-success-6":a.value==="above","text-orange-3":a.value==="below"})},K(l(e.value)),3))}}),at={class:"flex gap-x-2"},he=h({__name:"BookingsDeclaredVolumeWidgetRow",props:{volume:{},comparativeVolume:{},change:{},loading:{type:Boolean}},setup(e){return(l,a)=>(o(),c(k,null,[E("div",at,[M(l.$slots,"default")]),n(T,{align:"right",loading:e.loading,value:e.volume},{default:d(()=>[n(P,{value:e.volume},null,8,["value"])]),_:1},8,["loading","value"]),n(T,{align:"right",loading:e.loading,value:e.volume},{default:d(()=>[n(P,{value:e.comparativeVolume},null,8,["value"])]),_:1},8,["loading","value"]),n(T,{align:"right",loading:e.loading,value:e.volume},{default:d(()=>[n(tt,{value:e.change},null,8,["value"])]),_:1},8,["loading","value"])],64))}}),lt={class:"divide-y divide-charcoal-2 border-t border-charcoal-2"},ot=h({__name:"BookingsDeclaredVolumeBreakdowns",props:{breakdowns:{},loading:{type:Boolean}},setup(e){return(l,a)=>(o(),c("div",lt,[(o(!0),c(k,null,x(e.breakdowns,t=>(o(),y(J,{key:t.value,class:"bg-charcoal-0"},{default:d(()=>[n(he,{change:t.change,loading:e.loading,volume:t.volume,comparativeVolume:t.comparativeVolume},{default:d(()=>[n(T,{align:"left",loading:e.loading,value:t.value},{default:d(()=>[n(P,{value:t.value},null,8,["value"])]),_:2},1032,["loading","value"])]),_:2},1032,["change","loading","volume","comparativeVolume"])]),_:2},1024))),128))]))}}),nt=h({__name:"CargoBookingTypeTag",props:{type:{}},setup(e){const l={[q.BINDING]:Y.PURPLE_1,[q.FIXED]:Y.INDIGO_1,[q.EXPECTED]:Y.MAGENTA_1};return(a,t)=>(o(),y(Se,{name:e.type,variant:l[e.type]},null,8,["name","variant"]))}}),it={key:0,class:"text-loading mr-auto h-5 w-24"},rt={key:1,class:"flex gap-x-2"},st=h({__name:"BookingsDeclaredVolumeWidgetTrigger",props:{change:{},volume:{},comparativeVolume:{},period:{},open:{type:Boolean},loading:{type:Boolean},itemsCount:{},type:{}},emits:["toggle"],setup(e,{emit:l}){const a=l;return(t,i)=>(o(),c("button",{type:"button",class:"declared-volume-grid w-full py-4 pl-6 pr-6 hover:text-primary-8",onClick:i[0]||(i[0]=m=>e.itemsCount?a("toggle"):void 0)},[n(he,{loading:e.loading,change:e.change,volume:e.volume,comparativeVolume:e.comparativeVolume},{default:d(()=>[n(pe,{icon:e.open?"mdi:chevron-up":"mdi:chevron-down",class:L(e.itemsCount?"text-primary-8":"text-charcoal-4")}
1,null,8,["icon","class"]),e.loading?(o(),c("p",it)):(o(),c("div",rt,[e.type?(o(),y(nt,{key:0,type:e.type},null,8,["type"])):ve("",!0),E("p",null,K(e.period),1)]))]),_:1},8,["loading","change","volume","comparativeVolume"])]))}}),dt=h({__name:"BookingsDeclaredVolumeCollapsible",props:{period:{},loading:{type:Boolean}},setup(e){const l=B(!1);return Qe(()=>e.period.breakdowns.length,a=>{a||(l.value=!1)}),(a,t)=>(o(),y(Be,{onOpen:t[0]||(t[0]=i=>l.value=!0),onClose:t[1]||(t[1]=i=>l.value=!1),openByDefault:l.value},{trigger:d(({toggle:i})=>[n(st,{change:e.period.change,period:e.period.period,type:e.period.type,open:l.value,loading:e.loading,itemsCount:e.period.breakdowns.length,volume:e.period.volume,comparativeVolume:e.period.comparativeVolume,onToggle:i},null,8,["change","period","type","open","loading","itemsCount","volume","comparativeVolume","onToggle"])]),default:d(()=>[n(ot,{loading:e.loading,breakdowns:e.period.breakdowns},null,8,["loading","breakdowns"])]),_:1},8,["openByDefault"]))}}),ut={class:"divide-y divide-charcoal-2"},ct={key:0,class:"divide-y divide-charcoal-2"},mt=h({__name:"BookingsDeclaredVolumeContent",props:{loading:{type:Boolean},widget:{}},setup(e){return(l,a)=>(o(),c("div",ut,[e.widget?(o(!0),c(k,{key:1},x(e.widget.periods,(t,i)=>(o(),y(dt,{key:i,loading:e.loading,period:t},null,8,["loading","period"]))),128)):(o(),c("div",ct,[(o(),c(k,null,x(6,t=>n(J,{key:t},{default:d(()=>[(o(),c(k,null,x(4,i=>E("div",{key:i,class:"text-loading not-first:ml-auto h-5 w-24"})),64))]),_:2},1024)),64))]))]))}}),gt={class:"declared-volume-grid border-t border-charcoal-5 px-6 pt-4 font-bold"},vt=h({__name:"BookingsDeclaredVolumeWidgetFooter",props:{loading:{type:Boolean},currentVolumeTotal:{},previousVolumeTotal:{}},setup(e){return(l,a)=>(o(),c("div",gt,[n(T,{align:"left",class:"ml-8",value:"Total",loading:e.loading},{default:d(()=>[n(P,{value:"Total"})]),_:1},8,["loading"]),n(T,{align:"right",loading:e.loading,value:e.currentVolumeTotal},{default:d(()=>[n(P,{value:e.currentVolumeTotal},null,8,["value"])]),_:1},8,["loading","value"]),n(T,{align:"right",loading:e.loading,value:e.previousVolumeTotal},{default:d(()=>[n(P,{value:e.previousVolumeTotal},null,8,["value"])]),_:1},8,["loading","value"])]))}}),ft=h({__name:"BookingsDeclaredVolumeWidget",props:{widget:{},heading:{},loading:{type:Boolean}},setup(e){return(l,a)=>{var t,i;return o(),c(k,null,[n(ye,{heading:e.heading},null,8,["heading"]),n(mt,{loading:e.loading,widget:e.widget},null,8,["loading","widget"]),n(vt,{loading:e.loading,currentVolumeTotal:(t=e.widget)==null?void 0:t.volumeTotal,previousVolumeTotal:(i=e.widget)==null?void 0:i.comparativeVolumeTotal},null,8,["loading","currentVolumeTotal","previousVolumeTotal"])],64)}}}),Dt={class:"pb-4"},yt=h({__name:"CargoBookingVolumeByTrade",props:{loading:{type:Boolean},title:{},tooltip:{},subtitle:{},heading:{},filters:{},selectedFilter:{},widget:{}},emits:["onSelect"],setup(e,{emit:l}){const a=l,t=i=>{a("onSelect",i)};return(i,m)=>(o(),y(U,{padding:"none",title:e.title,subtitle:e.subtitle,loading:{body:!1,header:e.loading},tooltip:e.tooltip},{actions:d(()=>[(o(!0),c(k,null,x(e.filters,w=>(o(),y(Te,{key:w.id,filter:w,selected:e.selectedFilter,onSelect:t},null,8,["filter","selected"]))),128))]),default:d(()=>[E("div",Dt,[n(ft,{loading:e.loading,widget:e.widget,heading:e.heading},null,8,["loading","widget","heading"])])]),_:1},8,["title","subtitle","loading","tooltip"]))}}),be=h({__name:"BookingsDeclaredVolumeOverview",props:{service:{},title:{},tooltip:{},subtitle:{},formattedDate:{},heading:{},organisationId:{},filters:{},showEmptyState:{type:Boolean},overviewFiltersQuery:{}},emits:["onNoData","onSelect"],setup(e,{emit:l}){const a=l,t=fe({breakdown:e.filters[0]}),i=B(null),m=B(null),w=D=>{t.breakdown=D,a("onSelect",D.label)},g=ue(e.service,({data:D})=>(i.value=D.table,m.value=D.currentDeclarationDate,!0),{query:F(()=>{var D,v,s;return{breakdown:t.breakdown,declarationDate:e.formattedDate.declarationDate,year:e.formattedDate.year,tradelanes:C((D=e.overviewFiltersQuery)==null?void 0:D.tradelanes),loadingPorts:C((v=e.overviewFiltersQuery)==null?void 0:v.loadingPorts),dischargePorts:C((s=e.overviewFiltersQuery)==null?void 0:s.dischargePorts)}}),loading:"skeleton",getQuery:()=>{var D,v,s;return{breakdown:t.breakdown.id,declarationDate:e.formattedDate.declarationDate,year:e.formattedDate.year,tradelanes:C((D=e.overviewFiltersQuery)==null?void 0:D.tradelanes),loadingPorts:C((v=e.overviewFiltersQuery)==null?void 0:v.loadingPorts),dischargePorts:C((s=e.overviewFiltersQuery)==null?void 0:s.dischargePorts)}},onNoData:()=>{a("onNoData")}}),u=F(()=>({title:e.title,subtitle:e.subtitle??`Current Declaration: ${m.value}`}));return Ue(()=>{a("onSelect",e.filters[0].label)}),(D,v)=>(o(),y(ce,I(r(g),{styled:""}),{"no-data":d(()=>[n(U,I(u.value,{padding:"none"}),{default:d(()=>[n(ye,{heading:e.heading},null,8,["heading"]),v[0]||(v[0]=E("div",{class:"flex-center"},[E("p",{class:"flex-center h-36 text-sm text-charcoal-6"}
1," No data available yet ")],-1))]),_:1},16)]),default:d(()=>[n(yt,I(u.value,{widget:i.value,filters:e.filters,heading:e.heading,tooltip:e.tooltip,selectedFilter:t.breakdown,loading:r(g).stateIsLoading,onOnSelect:w}),null,16,["widget","filters","heading","tooltip","selectedFilter","loading"])]),_:1},16))}}),ht=e=>({colors:["#408481","#66BCBC","#F3925C"],chart:{type:"line",id:"DeclaredVolume",events:{mounted:Q,updated:Q,dataPointMouseEnter:De(),dataPointMouseLeave:(l,a)=>a.clearAnnotations()}},plotOptions:{bar:{horizontal:!1,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},tooltip:{custom:()=>null,onDatasetHover:{highlightDataSeries:!0}},yaxis:{labels:{formatter:l=>Oe(l)??"-"},forceNiceScale:!0,min:0},...e}),bt=(e,l)=>{l.clearAnnotations()},wt=(e,l,a)=>{De(null,"kFormat")(e,l,a)},Vt=e=>Ye(ze({height:"400px"}),ht(e)),ie="Budget",we=h({__name:"BookingsDeclaredVolumeOverviewChart",props:{service:{},title:{},chartColors:{},formattedDate:{},subtitle:{},overviewFiltersQuery:{}},emits:["onEmptyData","loaded"],setup(e,{emit:l}){const a=l,{setLastUpdated:t}=X(),i=B({}),m=B([]),w=B(""),g=xe().CARGO_NOMINATION_BUDGET_OVERVIEW,u=F(()=>({title:e.title,subtitle:e.subtitle??`Current Declaration: ${w.value}`})),D=s=>(g||delete s[ie],s),v=ue(e.service,({data:s,meta:f})=>{if(Ie(s.series))return a("loaded"),a("onEmptyData"),!1;w.value=s.currentDeclarationDate,t(f.lastUpdated),a("loaded");const $=D(s.series);return m.value=Object.keys($).map((N,R)=>({name:N,type:N===ie?"line":"column",data:Object.values($[N]).map(S=>({x:"",y:S.value===0?null:S.value,fillColor:S!=null&&S.isInThePast?`${e.chartColors[R]}80`:""}))})),i.value=Vt({colors:e.chartColors,xaxis:{categories:s.categories}}),!0},{query:F(()=>{var s,f,$;return{declarationDate:e.formattedDate.declarationDate,year:e.formattedDate.year,tradelanes:C((s=e.overviewFiltersQuery)==null?void 0:s.tradelanes),loadingPorts:C((f=e.overviewFiltersQuery)==null?void 0:f.loadingPorts),dischargePorts:C(($=e.overviewFiltersQuery)==null?void 0:$.dischargePorts)}}),getQuery:()=>{var s,f,$;return{declarationDate:e.formattedDate.declarationDate,year:e.formattedDate.year,tradelanes:C((s=e.overviewFiltersQuery)==null?void 0:s.tradelanes),loadingPorts:C((f=e.overviewFiltersQuery)==null?void 0:f.loadingPorts),dischargePorts:C(($=e.overviewFiltersQuery)==null?void 0:$.dischargePorts)}},onNoData:()=>a("loaded")});return(s,f)=>(o(),y(ce,I(r(v),{styled:""}),{loading:d(()=>[n(He,{xaxisName:""})]),"no-data":d(()=>[n(ne,I({"data-test":"declared-volume-chart"},u.value),{default:d(()=>[n(je,{illustration:"man_on_ladder",ytitle:"MT",xtitle:"Time period"})]),_:1},16)]),default:d(()=>[n(ne,I({"data-test":"declared-volume-chart"},u.value),{default:d(()=>[n(r(qe),{class:"mx-2 -mt-2",type:"bar",width:"100%",height:"400px",options:i.value,series:m.value,onMounted:r(Q),onUpdated:r(Q),onDataPointMouseEnter:r(wt),onDataPointMouseLeave:r(bt)},null,8,["options","series","onMounted","onUpdated","onDataPointMouseEnter","onDataPointMouseLeave"])]),_:1},16)]),_:1},16))}}),kt=h({__name:"BookingsDeclaredVolume",props:{organisationId:{},declarationDate:{},formattedDate:{},overviewFiltersQuery:{}},emits:["onNoData","onEmptyData","loaded"],setup(e,{emit:l}){const a=l,t=B(""),i=F(()=>`Total Declared Volume by ${t.value}`),m=A.organisation(e.organisationId).cargoBookings().overview().declaredVolume().table(),w=A.organisation(e.organisationId).cargoBookings().overview().declaredVolume().chart(),g=[{label:"Trade",id:"trade"},{label:"Load Port",id:"load_port"},{label:"Discharge Port",id:"discharge_port"}],u=F(()=>e.declarationDate?`Current Declaration: ${e.declarationDate}`:void 0);return(D,v)=>(o(),c(k,null,[n(we,{title:"Total Declared Volume",service:r(w),chartColors:["#408481","#66BCBC","#F3925C"],formattedDate:e.formattedDate,subtitle:u.value,overviewFiltersQuery:e.overviewFiltersQuery,onOnEmptyData:v[0]||(v[0]=s=>a("onEmptyData")),onLoaded:v[1]||(v[1]=s=>a("loaded"))},null,8,["service","formattedDate","subtitle","overviewFiltersQuery"]),n(be,{tooltip:"This widget shows the change since last declaration of total volumes declared for future periods. You can customize your view by filtering the data based on trade, as well as the load and discharge ports.",heading:["Current Period","Current Volume","Previous Volume","Change"],title:i.value,subtitle:u.value,filters:g,service:r(m),formattedDate:e.formattedDate,organisationId:e.organisationId,overviewFiltersQuery:e.overviewFiltersQuery,onOnSelect:v[2]||(v[2]=s=>
1t.value=s),onOnNoData:v[3]||(v[3]=s=>a("onNoData"))},null,8,["title","subtitle","service","formattedDate","organisationId","overviewFiltersQuery"])],64))}}),Ft=h({__name:"BookingsDeclaredVolumeNominated",props:{organisationId:{},formattedDate:{},templateType:{},overviewFiltersQuery:{}},emits:["onNoData","onEmptyData","loaded"],setup(e,{emit:l}){const a=l,t=B(""),i=F(()=>`Total Declared Volume Against Nominated by ${t.value}`),m=A.organisation(e.organisationId).cargoBookings().overview().nominatedVolume().table(),w=A.organisation(e.organisationId).cargoBookings().overview().nominatedVolume().chart(),g=[{label:"Trade",id:"trade"},{label:"Load Port",id:"load_port"},...Pe(me().isG2OEmployee,{label:"Discharge Port",id:"discharge_port"})],u=F(()=>e.templateType==="cmpc"?"Last 12 Months":"Last 3 Months"),D=F(()=>e.templateType==="cmpc"?"Last 6 Months":"Last 3 Months");return(v,s)=>(o(),c(k,null,[n(we,{title:"Total Declared Volume Against Nominated",subtitle:u.value,service:r(w),chartColors:["#F3925C","#408481","#F3925C"],formattedDate:e.formattedDate,overviewFiltersQuery:e.overviewFiltersQuery,onOnEmptyData:s[0]||(s[0]=f=>a("onEmptyData")),onLoaded:s[1]||(s[1]=f=>a("loaded"))},null,8,["subtitle","service","formattedDate","overviewFiltersQuery"]),n(be,{tooltip:"This widget provides a visual representation of the G2 Ocean's nominated total volume in comparison to declared volumes for previous periods. You can easily filter the data by trade, as well as by the load and discharge ports.",subtitle:D.value,title:i.value,heading:["Period","Declared Volume","Nominated Volume","TBA"],filters:g,service:r(m),formattedDate:e.formattedDate,organisationId:e.organisationId,overviewFiltersQuery:e.overviewFiltersQuery,onOnSelect:s[2]||(s[2]=f=>t.value=f),onOnNoData:s[3]||(s[3]=f=>a("onNoData"))},null,8,["subtitle","title","service","formattedDate","organisationId","overviewFiltersQuery"])],64))}}),Ct=h({__name:"OrganisationBookingsOverviewFilters",props:{tradelanes:{},loadingPorts:{},dischargePorts:{},declarationDates:{},modelValue:{},activeFilters:{},title:{},loading:{type:Boolean}},emits:["update:modelValue","clearFilters","clearFilter"],setup(e,{emit:l}){const a=e,t=l,i=Me(a,"modelValue",t),{lastUpdated:m}=X();return(w,g)=>(o(),y(U,{title:e.title,subtitle:r(m)?`Last update: ${r(re)(r(m))}`:"",loading:{header:e.loading,body:!1},divider:"header",padding:"none"},{default:d(()=>[n(se,{onClear:g[4]||(g[4]=u=>t("clearFilters"))},ge({default:d(()=>[n(Ke,{modelValue:r(i).declarationDate,"onUpdate:modelValue":g[0]||(g[0]=u=>r(i).declarationDate=u),label:"Declaration Date",options:e.declarationDates},null,8,["modelValue","options"]),n(z,{modelValue:r(i).tradelanes,"onUpdate:modelValue":g[1]||(g[1]=u=>r(i).tradelanes=u),label:"Trade",searchable:"",sorted:"",options:e.tradelanes},null,8,["modelValue","options"]),n(z,{modelValue:r(i).loadingPorts,"onUpdate:modelValue":g[2]||(g[2]=u=>r(i).loadingPorts=u),label:"Load Port",searchable:"",sorted:"",options:e.loadingPorts},null,8,["modelValue","options"]),n(z,{modelValue:r(i).dischargePorts,"onUpdate:modelValue":g[3]||(g[3]=u=>r(i).dischargePorts=u),label:"Discharge Port",searchable:"",sorted:"",options:e.dischargePorts},null,8,["modelValue","options"])]),_:2},[e.activeFilters.length?{name:"tags",fn:d(()=>[(o(!0),c(k,null,x(e.activeFilters,u=>(o(),y(de,{key:u.id,name:u.label,onClick:D=>t("clearFilter",u)},null,8,["name","onClick"]))),128))]),key:"0"}:void 0]),1024)]),_:1},8,["title","subtitle","loading"]))}}),Gt=h({__name:"OrganisationBookingsOverview",props:{organisationId:{}},setup(e){var te;const l=B(!0),a=()=>{l.value=!1},t=["IDLE","NO_DATA","NO_RESULTS"],{stateIs:i,setState:m}=ae(...t),{stateIs:w,setState:g}=ae(...t),u=b=>s==="main"?i.value(b):i.value(b)&&w.value(b),D=(te=Ee().getById(e.organisationId))==null?void 0:te.canDeclareCargo,{showOverviewAdvancedFilters:v,templateType:s}=Ne(),{query:f,activeFilters:$,filterOptions:N,clearAllFilters:R,clearActiveFilter:Z}=Ge(),{lastOccurrence:S,lastSixOccurrences:Ve}=Ae(),p=fe({declarationDate:{id:"cp",name:"Custom range",cp_start:S,cp_end:null}}),G=F(()=>{if(!p.declarationDate.cp_start)return!1;const b=p.declarationDate.cp_start;
1return!le(b,S)}),_=F(()=>{var b;return v&&((b=f.declarationDate)!=null&&b.id)?{declarationDate:oe(new Date(f.declarationDate.id)),year:f.declarationDate.year}:{declarationDate:G.value?oe(p.declarationDate.cp_start):""}}),ke=F(()=>{var b;return v?(b=f.declarationDate)!=null&&b.id?j(f.declarationDate.id):"":j(p.declarationDate.cp_start)}),Fe=b=>{!le(b.cp_start,p.declarationDate.cp_start)&&(p.declarationDate.cp_start=b.cp_start)},ee=()=>{m("IDLE"),g("IDLE"),p.declarationDate.cp_start=S},W=b=>{if(!b){R(),ee();return}Z(b)},Ce=()=>{m("IDLE"),g("IDLE"),W()};return(b,V)=>(o(),c(k,null,[r(v)?(o(),y(Ct,I({key:0,title:"Overview"},r(N),{modelValue:r(f),"onUpdate:modelValue":V[0]||(V[0]=O=>Re(f)?f.value=O:null),activeFilters:r($),loading:l.value,onClearFilter:W,onClearFilters:W}),null,16,["modelValue","activeFilters","loading"])):(o(),y(Je,{key:1,loading:l.value,title:"Overview",declarationDate:p.declarationDate,hasSelectedDate:G.value,onClear:ee},{default:d(()=>[n(Xe,{modelValue:p.declarationDate,"onUpdate:modelValue":V[1]||(V[1]=O=>p.declarationDate=O),"last-occurrence":r(S),hasSelectedDate:G.value,"last-six-occurrences":r(Ve),onApply:Fe},null,8,["modelValue","last-occurrence","hasSelectedDate","last-six-occurrences"])]),_:1},8,["loading","declarationDate","hasSelectedDate"])),u("NO_DATA")?(o(),y(We,{key:2,illustration:"man_on_ship",title:r(me)().isCustomer?"This Is Where You’ll Find Overview of Your Bookings":"This Is Where You’ll Find Overview of Bookings",disabled:!r(D),organisationId:e.organisationId},null,8,["title","disabled","organisationId"])):u("NO_RESULTS")?(o(),y(Le,{key:3,message:"Please amend filter criteria to see available data.",styled:"",onClear:Ce})):(o(),c(k,{key:4},[n(kt,{organisationId:e.organisationId,declarationDate:ke.value,formattedDate:_.value,overviewFiltersQuery:r(f),onOnNoData:V[2]||(V[2]=O=>r(m)("NO_DATA")),onOnEmptyData:V[3]||(V[3]=O=>r(m)("NO_RESULTS")),onLoaded:a},null,8,["organisationId","declarationDate","formattedDate","overviewFiltersQuery"]),r(s)!=="main"?(o(),y(Ft,{key:0,templateType:r(s),organisationId:e.organisationId,formattedDate:_.value,overviewFiltersQuery:r(f),onOnNoData:V[4]||(V[4]=O=>r(g)("NO_DATA")),onOnEmptyData:V[5]||(V[5]=O=>r(g)("NO_RESULTS"))},null,8,["templateType","organisationId","formattedDate","overviewFiltersQuery"])):ve("",!0)],64))],64))}});export{Gt as default};

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.