PageSourceSearch

https://get.checkfront.com/lib/vite/OccupancyReport-daa12a3e.js

js checkfront.com collected 2026-09-24 15:19:37 UTC 5,086 bytes, 1 lines download raw bytes

1import{a as z,b as L,v as S,e as U,c as i,j as t,F as O,P as r}from"./componentLoader.jsx-2026.09.09-3cefc4ce.js";import{r as c}from"./logger-3e1e3eff.js";import{a as N}from"./index-213dd4d3.js";import{S as V,T as W}from"./universe.js-2026.09.09-3cefc4ce.js";import{c as q}from"./capitalize-7d1af713.js";import{E as G}from"./EmptyState-53c9c04c.js";import{E as d}from"./Link-0005ddf4.js";import{P as J,a as K}from"./Page-4b335602.js";import{T as Q}from"./Table-d34d9412.js";import{D as X}from"./DropdownMultiFilter-625b8f13.js";import{u as Z,c as x}from"./hooks-f60b45da.js";import{u,a as tt}from"./filterParamsToQueryString-45819f69.js";import{F as rt}from"./FilterRow-94afa8e2.js";import{B as ot}from"./BannerOnboard-59253617.js";import{c as et,d as n,b as l}from"./commonReportColumns-d2159f73.js";import{D as v}from"./DropdownFilter-07117f30.js";import{R as at}from"./ReportSecondaryActions-11398b26.js";import"./vendor-21ae10b1.js";import"./brand-387037d2.js";import"./toString-4b4600cf.js";import"./isSymbol-34885b27.js";import"./_baseSlice-35988e44.js";import"./flatten-a652afe7.js";import"./_getAllKeys-a79fe303.js";import"./_isIndex-1f105582.js";import"./DropDown2-ecd6eae7.js";import"./index-e642497c.js";import"./isEqual-8f2d02ec.js";import"./_baseIsEqual-8f542891.js";import"./_Uint8Array-4a201bc7.js";import"./eq-9168d086.js";import"./_equalByTag-f809a93d.js";import"./tokens-95b521bf.js";import"./index-6a18cc6d.js";import"./orderBy-697545e4.js";import"./_baseOrderBy-8b0fc0ae.js";import"./_baseIteratee-2da5a91f.js";import"./_baseMap-d2567cee.js";import"./_baseEach-5996395c.js";import"./debounce-a96a8bf6.js";import"./toNumber-8f88376b.js";import"./Button-ad9712a3.js";import"./Tooltip-a5f55937.js";import"./Columns-7dbee6ce.js";import"./customColumns-1c693f03.js";import"./Banner-09ca2b24.js";import"./Image-61a89831.js";import"./Text-393329c6.js";import"./staffside.js-2026.09.09-3cefc4ce.js";import"./Stack-97d1572e.js";import"./styled-f01f0f1d.js";import"./objectWithoutPropertiesLoose-4f48578a.js";import"./clsx.m-1229b3e0.js";import"./styled-6a8caa33.js";import"./extendSxProp-8303275a.js";import"./Box-d04dcb04.js";import"./index-33a30c39.js";import"./index-2506ba77.js";import"./TableCell-183a8630.js";import"./TableHeader-4f2098a5.js";import"./StatusDot-e7dbbec9.js";import"./dates-c5bd0e78.js";import"./CurrencyField-9c2f59bc.js";import"./TextField-3930079d.js";import"./CurrencyLabel-c23ac7bc.js";import"./customerside.js-2026.09.09-3cefc4ce.js";import"./Download-b378aa08.js";import"./Upload-0892eabe.js";import"./HelpButton-171db7a3.js";import"./HelpCircle-0303da15.js";import"./Grid-63374a37.js";import"./MessageCard-a3ebcdc7.js";import"./usePaywall-28cf01a3.js";st.propTypes={dateMonthOptions:r.array,dateYearOptions:r.array,categoryOptions:r.array,currency:r.object,tally:r.object,average:r.object,rows:r.array,hideReportBanner:r.bool,csrfToken:r.string};function st({dateMonthOptions:F,dateYearOptions:P,categoryOptions:j,currency:p,tally:_,average:k,rows:D,hideReportBanner:R,csrfToken:T}){const o=z(),E=L(),[g,M]=c.useState(D),[e,C]=c.useState(_),[B,A]=c.useState(k),[H,f]=c.useState(!1),[y,I]=u("date_year",V(S.legacyParse(new Date))),[h,Y]=u("date_month",W(S.legacyParse(new Date))+1),[b,$]=u("category_id",[]),m=Z({date_month:h,date_year:y,category_id:b}),w=U();return x(()=>{async function a(){f(!0);const{data:s}=await N("/reports/occupancy/",{params:{format:"json",...m}});M(s.rows),C(s.tally),A(s.average),f(!1)}a()},[m]),x(()=>{tt({...m})},[m]),i(J,{className:"margin-bottom-4",width:"lg",pageHeader:t(K.PageHeader,{title:o.heading,content:i(ot,{csrfToken:T,reportId:"occupancyReport",hideBanner:R,imageSrc:"/images/reports/occupancy-icon.png",children:[o.bannerOnboardInfo," ",!w.isHighlander&&i(O,{children:[o.learnMore," ",t(d,{url:"https://www.checkfront.com/support/docs/reports/allocation-occupancy-report",external:!0,children:o.bannerOnboardSupport})," ",o.or," "]}),i(O,{children:[w.isHighlander?`${q(o.bannerOnboardSee)} `:`${o.bannerOnboardSee} `,t(d,{url:"/reports/",external:!0,children:o.bannerOnboardOverview})]})]}),secondaryActions:t(at,{helpUrl:"https://www.checkfront.com/support/docs/reports/allocation-occupancy-report"})}),children:[i(rt,{children:[t(v,{id:"year",selected:y,setSelected:I,options:P}),t(v,{id:"month",selected:h,setSelected:Y,options:F}),t(X,{id:"categories",selected:b,setSelected:$,options:j})]}),g.length?t(Q,{isLoading:H,defaultPageSize:20,size:"sm",data:g,columns:[et({accessor:"name",Cell:({value:a,original:{item_id:s}})=>t(d,{url:E.canViewBookingIndex&&`/booking/index/?item_id=${s}`,children:a}),minWidth:192,style:{whiteSpace:"unset"}}),n({accessor:"booked",tally:e}),n({accessor:"unbooked",tally:e}),n({accessor:"closed",tally:e}),n({accessor:"total",tally:e}),n({accessor:"occupancy",Cell:({value:a})=>`${a>0?a.toFixed(2):0} %`,average:B}),l({accessor:"rate",currency:p,tally:e}),l({accessor:"avail_rate",currency:p,tally:e}),l({accessor:"day_rate",currency:p,tally:e}),l({accessor:"revenue",currency:p,tally:e})],tableOptions:{defaultSorted:[{id:"name"}]}}):t(G,{})]})}
1export{st 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.