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th/with-auth.tsx","webpack://_N_E/./src/components/with-auth/index.ts","webpack://_N_E/./src/hooks/use-booking-stock.ts","webpack://_N_E/./src/hooks/use-bookings-config.ts","webpack://_N_E/./src/components/stockbook-required/stockbook-required-mobile.tsx","webpack://_N_E/./src/components/category-selector/sub-category/sub-category.tsx","webpack://_N_E/./src/components/category-selector/main-category/main-category.tsx","webpack://_N_E/./src/components/category-selector/index.ts","webpack://_N_E/./src/components/filter-wrapper/filter-wrapper.tsx","webpack://_N_E/./src/components/filter-wrapper/index.ts","webpack://_N_E/./src/components/stock-required-summary/stock-required-summary-header.tsx","webpack://_N_E/./src/components/stock-required-summary/index.ts","webpack://_N_E/./src/pages/stockbook-required-summary/index.tsx","webpack://_N_E/./node_modules/ag-grid-community/styles/ag-theme-quartz.css"],"sourcesContent":["import { logger } from '@hatchd/utils';\nimport { Loader, Text } from 'components/ui';\nimport { useBuyerOrg } from 'hooks/use-buyer-org';\nimport { useStore } from 'lib/store';\nimport { NextPage } from 'next';\nimport { signIn, useSession } from 'next-auth/react';\nimport { useRouter } from 'next/router';\nimport { useEffect } from 'react';\nimport { PATHS, SAFE_PATHS_NO_ORG } from 'settings/config';\nimport styled from 'styled-components';\n\ntype Options = {\n hideHeader?: boolean;\n hideNav?: boolean;\n overrideHeaderContent?: boolean;\n hideHomeLink?: boolean;\n marketplace?: boolean;\n app?: boolean;\n};\n\nconst Wrapper = styled.div`\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n`;\n\n/** Protect this page and prevent rendering if the current user session is invalid */\nexport function withAuth(\n WrappedComponent: NextPage,\n options?: Options\n) {\n // Try to create a nice displayName for React Dev Tools.\n const displayName =\n WrappedComponent.displayName || WrappedComponent.name || 'Component';\n\n // Creating the inner component. The calculated Props type here is the where the magic happens.\n const ComponentWithAuth = (props: T) => {\n const { data: session, status } = useSession();\n const loading = status === 'loading';\n const router = useRouter();\n const activeBuyerOrgId = useStore((store) => store.activeBuyerOrgId);\n const setBuyerOrgId = useStore((store) => store.setActiveBuyerOrgId);\n const { data: buyerOrg } = useBuyerOrg();\n\n useEffect(() => {\n if (!buyerOrg && !activeBuyerOrgId && router?.query?.buyerOrgId) {\n setBuyerOrgId(router.query.buyerOrgId as string);\n }\n }, [router.query.buyerOrgId]);\n\n // Redirect the user to the org picker page if there is no active buyer org ID\n useEffect(() => {\n if (\n !activeBuyerOrgId &&\n !SAFE_PATHS_NO_ORG.includes(router.pathname) &&\n session?.accessToken\n ) {\n console.log('Redirect to org picker');\n logger.info('No buyer org set, redirecting to org picker page');\n router.push(PATHS.organisation.picker);\n }\n }, [activeBuyerOrgId, router.pathname, session?.accessToken]);\n\n // Redirect to login page, user is not authenticated\n useEffect(() => {\n if (!session && !loading) {\n signIn();\n }\n }, [loading, session]);\n\n // Render the passed in component\n if (session && (buyerOrg || SAFE_PATHS_NO_ORG.includes(router.pathname))) {\n return ;\n }\n\n return (\n \n \n Authenticating\n \n \n \n );\n };\n\n ComponentWithAuth.displayName = `withAuth(${displayName})`;\n ComponentWithAuth.overrideHeaderContent = options?.overrideHeaderContent;\n ComponentWithAuth.hideNav = !!options?.hideNav;\n ComponentWithAuth.hideHeader = !!options?.hideHeader;\n ComponentWithAuth.hideHomeLink = !!options?.hideHomeLink;\n ComponentWithAuth.marketplace = !!options?.marketplace;\n ComponentWithAuth.app = !!options?.app;\n\n return ComponentWithAuth;\n}\n","export * from './with-auth';\n","import { useQuery } from '@tanstack/react-query';\nimport { ApiClient } from 'lib/api/client';\nimport { useStore } from 'lib/store';\nimport { QUERY_KEYS } from 'settings/config';\nimport { useApiReady } from './use-api-ready';\n\n/** Get the selected buyer org */\nexport function useBookingStock({ product }: any) {\n const enabled = useApiReady();\n const activeBuyerOrgId = useStore((store) => store.activeBuyerOrgId);\n\n return useQuery(\n [QUERY_KEYS.bookingStock, product],\n () =>\n new ApiClient().OrganisationBookingStockApi.orgBookingStockList({\n product: product || '',\n buyerOrgId: activeBuyerOrgId || '',\n }),\n {\n select: (data) => data.data,\n enabled: enabled && !!activeBuyerOrgId && !!product,\n }\n );\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { ApiClient } from 'lib/api/client';\nimport { useStore } from 'lib/store';\nimport { QUERY_KEYS } from 'settings/config';\nimport { useApiReady } from './use-api-ready';\n\ntype Params = {\n orgId?: string;\n};\n\nexport function useBookingsConfig({ orgId: overrideOrgId }: Params = {}) {\n const enabled = useApiReady();\n const activeBuyerOrgId = useStore((store) => store.activeBuyerOrgId);\n const orgId = overrideOrgId || activeBuyerOrgId;\n\n return useQuery(\n [QUERY_KEYS.bookingsConfig, orgId],\n () =>\n new ApiClient().bookingsApi.orgBookingConfigRetrieve({\n buyerOrgId: orgId || '',\n }),\n {\n select: (data) => data.data,\n enabled: enabled && !!orgId,\n keepPreviousData: true,\n }\n );\n}\n","import React, {\n useMemo,\n useRef,\n useState,\n useEffect,\n useCallback,\n} from 'react';\nimport { AgGridReact } from 'ag-grid-react';\nimport 'ag-grid-enterprise';\nimport { ICellRendererParams } from 'ag-grid-enterprise';\nimport 'ag-grid-community/styles/ag-grid.css';\nimport 'ag-grid-community/styles/ag-theme-quartz.css';\nimport { Button, EllipsisText, Flex } from 'components/ui';\nimport styled from 'styled-components';\nimport { useRouter } from 'next/router';\nimport { globalTheme } from 'styles/global-theme';\nimport {\n endOfMonth,\n endOfWeek,\n format,\n startOfMonth,\n startOfWeek,\n} from 'date-fns';\nimport { formatAUD } from 'lib/helpers';\nimport {\n BookingConfig,\n BookingProductCategories,\n BookingStockSearchResult,\n BookingSubCategories,\n} from '../../lib/api/generated';\n\ninterface StockBookRequiredMobileProps {\n config: BookingConfig;\n stockData: BookingStockSearchResult[] | undefined;\n dataLoading: boolean;\n allCategories?: BookingProductCategories;\n productType?: string;\n categories?: {\n mainCategory?: string;\n subCategory?: string | string[];\n };\n hideMainCat?: any;\n}\n\ninterface StockGroupRow {\n group: string;\n name: string;\n kill: number;\n required: number;\n incoming: number;\n [id: string]: any;\n}\n\nconst ColorButton = styled(Button)(() => ({\n color: 'white',\n backgroundColor: '#C934E1',\n}));\n\nconst ValueWrapper = styled(Flex)`\n padding: 4px 0;\n`;\n\nexport const StockBookRequiredMobile = ({\n stockData,\n allCategories,\n dataLoading,\n productType,\n config,\n categories,\n hideMainCat,\n}: StockBookRequiredMobileProps) => {\n const gridStyle = useMemo(() => ({ height: '100%', width: '100%' }), []);\n const [gridHeight, setGridHeight] = useState(0);\n const gridRef = useRef();\n const router = useRouter();\n const datesRef = useRef>>({});\n\n const loadingTemplate = `Loading...`;\n\n const numberFormatter = useCallback((params: any) => {\n return params.value?.toLocaleString();\n }, []);\n\n const calculateGridHeight = useCallback(() => {\n const windowHeight = window.innerHeight;\n const navbarHeight = 190; // Example height of a navbar\n const buttonHeight = 64; // Example height of a button\n const calculatedHeight = windowHeight - navbarHeight - buttonHeight;\n setGridHeight(calculatedHeight);\n }, [window.innerHeight]);\n\n useEffect(() => {\n calculateGridHeight();\n window.addEventListener('resize', calculateGridHeight);\n return () => {\n window.removeEventListener('resize', calculateGridHeight);\n };\n }, [calculateGridHeight]);\n\n const getFilteredCategories = useCallback(() => {\n const subCats: { [id: string]: string } = {};\n const groupRows: { [id: string]: string } = {};\n\n // Build subCategories lookup\n (allCategories?.SUB?.values as unknown as BookingSubCategories[])?.forEach(\n (subData: any) => {\n subCats[subData.key] = subData.name;\n }\n );\n\n // Get all valid main categories based on filter\n const validMainCategories = (\n allCategories?.MAIN?.values as unknown as BookingSubCategories[]\n ).filter(\n (mainData: any) =>\n !categories?.mainCategory || mainData.key === categories.mainCategory\n );\n\n // For each valid main category, get valid subcategories\n validMainCategories.forEach((mainData: any) => {\n const validSubCategories = mainData.sub_categories.filter(\n (subCatKey: string) =>\n !categories?.subCategory?.length ||\n categories.subCategory.includes(subCatKey)\n );\n\n // Build group rows only for valid combinations\n validSubCategories.forEach((subCatKey: string) => {\n const mainName = !hideMainCat ? mainData.name : '';\n const subCatName = subCats[subCatKey];\n groupRows[`m_${mainData.key}_s_${subCatKey}`] =\n `${mainName} ${subCatName}`.trim();\n });\n });\n\n return { groupRows, subCats };\n }, [allCategories, categories]);\n\n const processData = useCallback(\n (incomingData: any) => {\n if (!stockData) return undefined;\n\n const emptyData: { [id: string]: StockGroupRow } = {};\n const groups = new Set();\n const { groupRows } = getFilteredCategories();\n\n datesRef.current = {};\n\n // Generate groups and dates\n incomingData.forEach((obj: any) => {\n groups.add(obj.group);\n datesRef.current[obj.group] = {\n startDate: config?.settings?.monthly\n ? format(startOfMonth(new Date(obj.date)), 'yyyy-MM-dd')\n : format(startOfWeek(new Date(obj.date)), 'yyyy-MM-dd'),\n endDate: config?.settings?.monthly\n ? format(endOfMonth(new Date(obj.date)), 'yyyy-MM-dd')\n : format(endOfWeek(new Date(obj.date)), 'yyyy-MM-dd'),\n };\n });\n\n // Initialize empty data structure\n groups.forEach((groupName) => {\n Object.entries(groupRows).forEach(([rowId, rowName]) => {\n emptyData[`${groupName}_${rowId}`] = {\n group: groupName,\n name: rowName,\n incoming: 0,\n required: 0,\n kill: 0,\n dates: datesRef.current[groupName],\n };\n });\n });\n\n // Populate data\n stockData.forEach((groupData: any) => {\n Object.entries(groupData).forEach(([key, value]) => {\n const match = key.match(/^(incoming|kill)_(m_.*_s_.*)$/);\n if (match && emptyData[`${groupData.group}_${match[2]}`]) {\n emptyData[`${groupData.group}_${match[2]}`][match[1]] +=\n value as number;\n }\n });\n });\n\n // Convert to array and calculate required values\n return Object.values(emptyData).map((row) => ({\n ...row,\n required: row.kill - row.incoming,\n }));\n },\n [stockData, config?.settings?.monthly, getFilteredCategories]\n );\n\n const handleClickSummary = (\n startDate: string,\n endDate: string,\n type: string\n ) => {\n router.push(`/stockbook?type=${type}&date=${startDate}&date_to=${endDate}`);\n };\n\n const purchasedCellRenderer = useCallback(\n (props: any) => {\n // Outputs the normal value except for the grouped header row, instead we\n // links to the relevant Stockbook data\n if (props.node.parent.id === 'ROOT_NODE_ID') {\n return (\n {\n handleClickSummary?.(\n datesRef.current[props.node.key]?.startDate,\n datesRef.current[props.node.key]?.endDate,\n productType as string\n );\n }}\n fontSize={4}\n >\n View\n \n );\n }\n return valueRenderer(props);\n },\n [productType]\n );\n\n const valueRenderer = (params: any) => {\n return (\n \n \n {typeof params.value === 'number'\n ? formatAUD(params.value, false, false)\n : params.value}\n \n \n );\n };\n\n const columnDefs: any = useMemo(() => {\n return [\n {\n field: 'group',\n rowGroup: true,\n hide: true,\n suppressMenu: true,\n suppressSorting: true,\n },\n {\n field: 'name',\n rowGroup: true,\n hide: true,\n headerClass: 'stockbook-required-header',\n cellRenderer: valueRenderer,\n suppressMenu: true,\n },\n {\n headerName: 'Req',\n headerClass: 'stockbook-required-header',\n field: 'required',\n valueFormatter: numberFormatter,\n cellRenderer: valueRenderer,\n aggFunc: 'sum',\n suppressMenu: true,\n suppressSorting: true,\n minWidth: 80,\n width: 100,\n maxWidth: 250,\n },\n {\n headerName: 'Sch',\n headerClass: 'stockbook-required-header',\n field: 'kill',\n valueFormatter: numberFormatter,\n cellRenderer: valueRenderer,\n aggFunc: 'sum',\n suppressMenu: true,\n suppressSorting: true,\n minWidth: 80,\n width: 100,\n maxWidth: 250,\n },\n {\n headerName: 'Pur',\n headerClass: 'stockbook-required-header',\n field: 'incoming',\n valueFormatter: numberFormatter,\n aggFunc: 'sum',\n cellRenderer: purchasedCellRenderer,\n suppressMenu: true,\n suppressSorting: true,\n minWidth: 100,\n width: 100,\n maxWidth: 250,\n },\n ];\n }, [numberFormatter, purchasedCellRenderer]);\n\n useEffect(() => {\n if (gridRef && gridRef?.current?.api) {\n if (dataLoading) {\n gridRef.current.api.showLoadingOverlay();\n } else {\n gridRef.current.api.hideOverlay();\n }\n }\n }, [dataLoading]);\n\n return (\n <>\n
\n
\n {\n if (params.node.parent?.id !== 'ROOT_NODE_ID') {\n // Blocks the expanding feature on the second row\n return undefined;\n }\n\n return {\n component: 'agGroupCellRenderer',\n };\n },\n }}\n groupRowRendererParams={{\n suppressCount: true,\n suppressPadding: true,\n }}\n getRowStyle={(params) => {\n if (params.node.uiLevel === 0) {\n return {\n fontWeight: 'bold',\n backgroundColor: globalTheme.colors.aqua,\n };\n }\n }}\n groupDefaultExpanded={\n (!hideMainCat && categories?.mainCategory) ||\n categories?.subCategory\n ? 1\n : 0\n }\n suppressAggFuncInHeader={true}\n overlayLoadingTemplate={loadingTemplate}\n suppressHorizontalScroll={false} // Make the header sticky\n suppressExcelExport={true}\n suppressDragLeaveHidesColumns\n />\n
\n
\n \n );\n};\n","import { Flex, RadioBox, Text } from 'components/ui';\nimport { BookingConfig } from 'lib/api/generated';\nimport { getSubCategory } from 'lib/helpers';\nimport React, { ChangeEvent, FC, useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { breakpoints } from 'styles/breakpoints';\nimport { globalTheme } from 'styles/global-theme';\n\ninterface ISubCategory {\n config?: BookingConfig;\n productType?: string;\n onChange?: (value: string | string[]) => void;\n showTitle?: boolean;\n mainCategory?: string;\n value?: string | string[];\n type?: 'radio' | 'checkbox';\n}\n\nexport const SubCategory: FC = ({\n config,\n productType,\n onChange,\n showTitle = true,\n mainCategory,\n value,\n type,\n}) => {\n const [values, setValues] = useState(\n undefined\n );\n\n useEffect(() => {\n setValues(value);\n }, [value]);\n\n const isMobile = useMedia(`(max-width: ${breakpoints.medium})`);\n\n if (!config || !mainCategory) {\n return null;\n }\n const subCategory = getSubCategory(config, mainCategory, productType);\n\n if (!subCategory || !Array.isArray(subCategory.values)) {\n return null;\n }\n\n const handleChange = (event: ChangeEvent) => {\n const selectedValue = event.target.value;\n\n if (type === 'checkbox') {\n // Handle multiple selections for checkboxes\n setValues((prev) => {\n const currentValues = Array.isArray(prev) ? prev : [];\n const newValues = currentValues.includes(selectedValue)\n ? currentValues.filter((val) => val !== selectedValue) // Remove if already selected\n : [...currentValues, selectedValue]; // Add if not selected\n onChange?.(newValues);\n return newValues;\n });\n } else {\n // Handle single selection for radio buttons\n setValues(selectedValue);\n onChange?.(selectedValue);\n }\n };\n\n return (\n <>\n {subCategory && subCategory?.values && !!subCategory?.values?.length && (\n \n {showTitle && (\n \n {subCategory?.name}\n \n )}\n \n {subCategory.values.map((el, idx) => (\n \n ))}\n \n \n )}\n \n );\n};\n","import { Flex, RadioBox, Text } from 'components/ui';\nimport { BookingConfig } from 'lib/api/generated';\nimport { getMainCategory } from 'lib/helpers';\nimport React, { ChangeEvent, FC, useMemo } from 'react';\nimport { useMedia } from 'react-use';\nimport { breakpoints } from 'styles/breakpoints';\nimport { globalTheme } from 'styles/global-theme';\n\ninterface IMainCategory {\n config?: BookingConfig;\n productType?: string;\n onChange?: (value?: string) => void;\n showTitle?: boolean;\n value?: string;\n}\n\nexport const MainCategory: FC = ({\n config,\n productType,\n onChange,\n showTitle = true,\n value,\n}) => {\n const isMobile = useMedia(`(max-width: ${breakpoints.medium})`);\n\n if (!config) {\n return null;\n }\n\n const mainCategory = getMainCategory(config, productType);\n\n if (!mainCategory || !Array.isArray(mainCategory.values)) {\n return null;\n }\n\n return (\n \n {showTitle && (\n \n {mainCategory?.name}\n \n )}\n \n {mainCategory.values.map((el, idx) => (\n ) => {\n if (event.target.checked) {\n onChange?.(event.target.value);\n } else {\n onChange?.(undefined);\n }\n }}\n bookingCell={isMobile}\n />\n ))}\n \n \n );\n};\n","export * from './sub-category/sub-category';\nexport * from './main-category/main-category';\n","import { Button } from 'components/ui';\nimport React, { FC, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport styled from 'styled-components';\nimport { breakpoints } from 'styles/breakpoints';\nimport { globalTheme } from 'styles/global-theme';\n\ninterface IFilterWrapper {\n children: React.ReactNode;\n}\n\nconst Container = styled.div`\n position: sticky;\n top: 0;\n left: 0;\n z-index: 2;\n background-color: ${globalTheme.colors.white};\n padding: ${globalTheme.space[1]} ${globalTheme.space[2]};\n\n @media screen and (min-width: ${breakpoints.large}) {\n .smallScreen {\n display: none;\n }\n }\n\n @media screen and (max-width: ${breakpoints.large}) {\n .smallScreen {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n\n .smallScreen-toggleFilters.active {\n color: ${globalTheme.colors.white};\n background-color: ${globalTheme.colors.black};\n box-shadow: none;\n }\n\n > .filters {\n &:not(.active) {\n height: 0;\n overflow: hidden;\n opacity: 0;\n transition: opacity 0.2s linear, height 0.25s linear;\n }\n &.active {\n padding-top: ${globalTheme.space[1]};\n margin: ${globalTheme.space[1]};\n border-top: 1px solid ${globalTheme.colors.lightGray};\n height: max-content;\n opacity: 1;\n transition: height 0.25s linear, opacity 0.2s linear;\n }\n }\n }\n\n @media screen and (max-width: ${breakpoints.small}) {\n top: ${globalTheme.space[0]};\n border-radius: ${globalTheme.space[0]};\n box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.05);\n }\n`;\n\nconst Wrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n @media screen and (max-width: ${breakpoints.small}) {\n flex-direction: column;\n }\n`;\n\nexport const FilterWrapper: FC = ({ children }) => {\n const isMobile = useMedia(`(max-width: ${breakpoints.medium})`);\n\n const [toggleFilters, setToggleFilters] = useState(false);\n const handleToggleFilters = () => {\n setToggleFilters(!toggleFilters);\n };\n\n return (\n \n
\n handleToggleFilters()}\n fontSize={isMobile ? 'bookingMobile' : 'default'}\n >\n Filters\n \n
\n \n {children}\n \n
\n );\n};\n","export * from './filter-wrapper';\n","import { MainCategory, SubCategory } from 'components/category-selector';\nimport { FilterWrapper } from 'components/filter-wrapper';\nimport { Flex, RadioBox, Text } from 'components/ui';\nimport { BookingConfig, ProductEnum, ProductTypes } from 'lib/api/generated';\nimport { getMainCategory } from 'lib/helpers';\nimport React, { FC, SetStateAction, useEffect, useMemo } from 'react';\nimport { useMedia } from 'react-use';\nimport { breakpoints } from 'styles/breakpoints';\nimport { globalTheme } from '../../styles/global-theme';\n\ninterface IStockRequiredSummaryHeader {\n config: BookingConfig;\n categories: {\n mainCategory?: string;\n subCategory?: string | string[];\n };\n setCategories: React.Dispatch<\n SetStateAction<{\n mainCategory?: string;\n subCategory?: string | string[];\n }>\n >;\n setProductType: React.Dispatch>;\n productType: string | undefined;\n}\n\nexport const StockRequiredSummaryHeader: FC = ({\n config,\n categories,\n setCategories,\n setProductType,\n productType,\n}) => {\n const isMobile = useMedia(`(max-width: ${breakpoints.medium})`);\n const mainCategory = useMemo(\n () => getMainCategory(config, productType),\n [productType]\n );\n\n useEffect(() => {\n if (\n mainCategory &&\n mainCategory.values &&\n mainCategory.values?.length === 1 &&\n !categories.mainCategory\n ) {\n setCategories?.({ mainCategory: mainCategory.values[0]?.key });\n }\n }, [mainCategory]);\n\n return (\n \n \n \n \n Product type\n \n {config?.products.map((stockType: any, idx: any) => {\n const defaultValue = config?.products.find(\n (product) => product.product_id === productType\n );\n\n return (\n {\n setProductType({ type: stockType['product_id'] });\n setCategories({\n mainCategory: undefined,\n subCategory: undefined,\n });\n }}\n value={stockType['product_id']}\n label={stockType['name']}\n defaultChecked={\n stockType.product_id === defaultValue?.product_id\n }\n checked={stockType.product_id === defaultValue?.product_id}\n defaultValue={defaultValue?.product_id}\n name={`radio_select-type`}\n height={globalTheme.space[3]}\n type='radio'\n />\n );\n })}\n \n {\n {\n /** Assign the main category and reset the sub category */\n }\n setCategories({ mainCategory: el, subCategory: undefined });\n }}\n productType={productType}\n />\n \n setCategories((prev) => ({ ...prev, subCategory: el }))\n }\n productType={productType}\n />\n \n \n );\n};\n","export * from './stock-required-summary-header';\n","'use strict';\n\nimport React, { useEffect, useMemo, useState } from 'react';\nimport 'ag-grid-enterprise';\nimport 'ag-grid-community/styles/ag-grid.css';\nimport 'ag-grid-community/styles/ag-theme-quartz.css';\nimport { useRouter } from 'next/router';\nimport { useBookingsConfig } from 'hooks/use-bookings-config';\nimport { useBookingStock } from 'hooks/use-booking-stock';\nimport Link from 'next/link';\nimport styled from 'styled-components';\nimport { useIntercom } from 'react-use-intercom';\nimport { Flex, ListCard, Loader, Text } from '../../components/ui';\nimport { StockBookRequiredMobile } from '../../components/stockbook-required/stockbook-required-mobile';\nimport { NextPage } from 'next';\nimport { withAuth } from '../../components/with-auth';\nimport { StockRequiredSummaryHeader } from 'components/stock-required-summary';\nimport { useBuyerOrg } from 'hooks/use-buyer-org';\nimport { ApiClient } from 'lib/api/client';\nimport { useQuery } from '@tanstack/react-query';\nimport { globalTheme } from 'styles/global-theme';\nimport { breakpoints } from 'styles/breakpoints';\nimport { ProductTypes } from '../../lib/api/generated';\n\nconst Container = styled(ListCard)`\n margin: 110px auto;\n display: flex;\n gap: 15px;\n align-items: center;\n text-align: center;\n justify-content: center;\n flex-direction: column;\n height: 200px;\n max-width: 570px;\n`;\n\nconst FieldSet = styled.fieldset`\n @media screen and (max-width: ${breakpoints.large}) {\n border: none;\n padding: 0;\n margin: 0;\n legend {\n display: none;\n }\n }\n @media screen and (min-width: ${breakpoints.small}) {\n border-radius: ${globalTheme.space[0]};\n border-color: ${globalTheme.colors.lightGray};\n legend {\n font-size: ${globalTheme.fontSizes[2]};\n font-weight: 600;\n padding: 0 8px;\n left: 10px;\n background-color: ${globalTheme.colors.lightGray};\n border-radius: ${globalTheme.space[0]};\n }\n }\n`;\n\nconst StockBookRequiredSummary: NextPage = () => {\n const router = useRouter();\n const [filters, setFilters] = useState<{ type: string } | undefined>(\n { type: router?.query?.type as string } || undefined\n );\n const { data: config, isLoading: configLoading } = useBookingsConfig();\n\n const { data: org } = useBuyerOrg();\n\n const { isLoading, data: orgConfig } = useQuery(['reports'], () =>\n new ApiClient().organisationApi.orgConfigRetrieve({\n buyerOrgId: org?.buyer_org_id || '',\n })\n );\n\n const [categories, setCategories] = useState<{\n mainCategory?: string;\n subCategory?: string | string[];\n }>({\n mainCategory: undefined,\n subCategory: undefined,\n });\n\n const { data: stockData, isLoading: dataLoading } = useBookingStock({\n product: filters?.type,\n });\n\n const { show } = useIntercom();\n\n const configCategories = useMemo(() => {\n return config?.categories[filters?.type as string];\n }, [filters?.type, filters]);\n\n useEffect(() => {\n if (\n (router.query.type === undefined || router.query.type === '') &&\n config\n ) {\n const updatedParams = { type: config?.products?.[0]?.product_id };\n\n setFilters(updatedParams);\n }\n }, [router, config]);\n\n if (configLoading || isLoading) {\n return ;\n }\n\n if (!config || !orgConfig) {\n return <>;\n }\n\n const hideMainCat = orgConfig?.data.reports?.homepage?.find(\n (ac) => ac.id === 'stockbook_summary'\n )?.['settings']['hide_main_cat'];\n\n return (\n
\n \n Stock Required Summary\n \n
\n Filters\n \n
\n \n {(configCategories && Object.keys(configCategories?.MAIN).length > 0) ||\n (configCategories && Object.keys(configCategories?.SUB).length) ? (\n \n \n \n ) : (\n \n \n This product type needs configuration from the Agora team. Please\n \n {' '}\n chat to us find out more.\n \n \n \n )}\n
\n );\n};\n\nexport default withAuth(StockBookRequiredSummary);\n","// extracted by mini-css-extract-plugin"],"names":["Wrapper","styled","div","withConfig","withAuth","WrappedComponent","options","displayName","name","ComponentWithAuth","data","session","status","useSession","loading","router","useRouter","activeBuyerOrgId","useStore","store","setBuyerOrgId","setActiveBuyerOrgId","buyerOrg","useBuyerOrg","useEffect","query","buyerOrgId","SAFE_PATHS_NO_ORG","includes","pathname","accessToken","console","log","logger","info","push","PATHS","organisation","picker","signIn","jsx_runtime","jsx","props","jsxs","Text","textAlign","fontSize","Loader","size","concat","overrideHeaderContent","hideNav","hideHeader","hideHomeLink","marketplace","app","useBookingStock","param","product","enabled","useApiReady","useQuery","QUERY_KEYS","bookingStock","ApiClient","OrganisationBookingStockApi","orgBookingStockList","select","useBookingsConfig","orgId","overrideOrgId","arguments","length","bookingsConfig","bookingsApi","orgBookingConfigRetrieve","keepPreviousData","ColorButton","Button","color","backgroundColor","ValueWrapper","Flex","StockBookRequiredMobile","config","stockData","allCategories","dataLoading","productType","categories","hideMainCat","gridStyle","useMemo","height","width","gridHeight","setGridHeight","useState","gridRef","useRef","datesRef","numberFormatter","useCallback","params","value","toLocaleString","calculateGridHeight","windowHeight","innerHeight","window","addEventListener","removeEventListener","getFilteredCategories","subCats","groupRows","SUB","values","_allCategories_SUB_values","forEach","subData","key","validMainCategories","MAIN","filter","mainCategory","mainData","validSubCategories","sub_categories","subCategory","subCatKey","mainName","subCatName","trim","processData","emptyData","groups","Set","current","incomingData","add","obj","group","startDate","settings","monthly","format","startOfMonth","Date","date","startOfWeek","endDate","endOfMonth","endOfWeek","Object","entries","rowId","rowName","groupName","incoming","required","kill","dates","groupData","match","map","row","handleClickSummary","type","purchasedCellRenderer","node","parent","id","onClick","valueRenderer","padding","EllipsisText","formatAUD","columnDefs","field","rowGroup","hide","suppressMenu","suppressSorting","headerClass","cellRenderer","headerName","valueFormatter","aggFunc","minWidth","maxWidth","api","showLoadingOverlay","hideOverlay","Fragment","style","className","AgGridReact","ref","rowData","defaultColDef","flex","groupDisplayType","autoGroupColumnDef","cellRendererParams","suppressCount","cellRendererSelector","component","groupRowRendererParams","suppressPadding","getRowStyle","uiLevel","fontWeight","globalTheme","colors","aqua","groupDefaultExpanded","suppressAggFuncInHeader","overlayLoadingTemplate","suppressHorizontalScroll","suppressExcelExport","suppressDragLeaveHidesColumns","SubCategory","onChange","showTitle","setValues","undefined","isMobile","useMedia","breakpoints","medium","getSubCategory","Array","isArray","handleChange","selectedValue","event","target","currentValues","prev","newValues","val","gap","alignItems","direction","wrap","justifyContent","el","idx","RadioBox","label","checked","space","bookingCell","MainCategory","getMainCategory","defaultChecked","disabled","Container","white","large","black","lightGray","small","FilterWrapper","children","toggleFilters","setToggleFilters","handleToggleFilters","variant","StockRequiredSummaryHeader","setCategories","setProductType","products","stockType","defaultValue","find","product_id","ListCard","FieldSet","fieldset","fontSizes","stockbook_required_summary","orgConfig","filters","setFilters","isLoading","configLoading","org","organisationApi","orgConfigRetrieve","buyer_org_id","show","useIntercom","configCategories","floating","reports","homepage","ac","legend","keys","span","Link","href"],"sourceRoot":""}