\r\n
\r\n {values.months.slice(0, 6).map((item, index) => (\r\n \r\n ))}\r\n
\r\n
\r\n {values.months.slice(6).map((item, index) => (\r\n \r\n ))}\r\n
\r\n
\r\n )}\r\n />\r\n );\r\n};\r\n\r\nexport default memo(Months);\r\n","export const getInitialValues = (workingHours, selectedYear) => {\r\n return {\r\n year: selectedYear,\r\n months: workingHours?.find(item => item.year === selectedYear)?.months.map(item => ({ month: item.month, hours: item.hours ?? '' })) ?? [],\r\n };\r\n};\r\n","import React, { memo, useMemo } from 'react';\r\nimport { FormControl, MenuItem, Select } from '@material-ui/core';\r\n\r\nimport useStyles from '../styles';\r\n\r\nconst Toolbar = ({\r\n withSearchByOwner,\r\n selectedOwner,\r\n setSelectedOwner,\r\n selectedYear,\r\n setSelectedYear,\r\n ownerList,\r\n workingHoursList,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n const ownersOptions = useMemo(() => ownerList?.map(item => ({ id: item.id, label: item.name, value: item.id })), [\r\n ownerList,\r\n ]);\r\n\r\n const yearOptions = useMemo(\r\n () => workingHoursList?.map(item => ({ id: item.year, label: item.year, value: item.year })),\r\n [workingHoursList],\r\n );\r\n\r\n return (\r\n