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rCtH,CACX,EAEMkJ,EAA8B,SAAH,GAA0B,IAAD,MAAnBD,QAAAA,OAAO,MAAG,CAAC,EAAC,EACzCjJ,EAAS,GAMf,OAJkC,KAAX,QAAnB,EAAQ,OAAPiJ,QAAO,IAAPA,OAAO,EAAPA,EAASvB,iBAAS,QAAI,IACvB1H,EAAOgH,KAAK,CAAEnG,MAAO,YAAayG,UAAW,8BAG1CtH,CACX,C","sources":["views/calendar-page/ColorPalette.js","ui-component/TitlePicker3.js","ui-component/InfringementPicker2.js","ui-component/ActionPicker2.js","ui-component/EntityPickerPopUp.js","ui-component/EventForm.js","ui-component/EventPopUp.js","ui-component/cards/SubCard.js","ui-component/extended/AnimateButton.js","utils/colors.js","utils/dataAccess.js","utils/errors.js","utils/validation.js"],"sourcesContent":["import PropTypes from 'prop-types';\r\n\r\n// material-ui\r\nimport { FormControlLabel, Radio } from '@mui/material';\r\n\r\n// ==============================|| CALENDAR COLOR PALETTE ||============================== //\r\n\r\nconst ColorPalette = ({ color, label, value }) => (\r\n \r\n }\r\n label={label || ''}\r\n sx={{ pr: label ? 1 : 0 }}\r\n />\r\n);\r\n\r\nColorPalette.propTypes = {\r\n color: PropTypes.string,\r\n label: PropTypes.string,\r\n value: PropTypes.string\r\n};\r\n\r\nexport default ColorPalette;\r\n","import PropTypes from 'prop-types';\nimport { useEffect, useState } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\n\n// material-ui\nimport { Autocomplete, TextField, MenuItem, Stack, Typography } from '@mui/material';\nimport { useTheme } from '@mui/material/styles';\n\n// project imports\nimport { getTitleList, initialized as initializedTitles } from 'store/slices/titleSlice';\nimport useAuth from 'hooks/useAuth';\n\nconst getPredicate = (filter) => {\n switch (filter) {\n case 'infringement':\n return (title) => !!title?.infringements;\n case 'action':\n return (title) => title?.infringements?.find((infringment) => !!infringment?.actions);\n case 'registration':\n return (title) => !!title?.regID;\n default:\n return () => true;\n }\n};\n\n// ==============================|| TITLE PICKER ||============================== //\n\nconst TitlePicker3 = ({ chooseTitle, titleID, filter }) => {\n const dispatch = useDispatch();\n const theme = useTheme();\n const { isLoggedIn } = useAuth();\n const titlesInitialized = useSelector(initializedTitles);\n const [title, setTitle] = useState('');\n const [titleList, setTitleList] = useState([]);\n const allTitles = useSelector((state) => state?.title?.titles);\n\n useEffect(() => {\n if (isLoggedIn && !titlesInitialized) {\n dispatch(getTitleList());\n }\n }, [dispatch, isLoggedIn, titlesInitialized]);\n\n useEffect(() => {\n if (titlesInitialized && titleID) {\n const passedTitle = allTitles.find((item) => item.id === titleID);\n if (passedTitle) {\n setTitle(passedTitle);\n }\n }\n }, [allTitles, titleID, titlesInitialized]);\n\n useEffect(() => {\n if (titlesInitialized) {\n const predicate = getPredicate(filter);\n setTitleList(allTitles.filter(predicate));\n console.log(allTitles);\n }\n }, [allTitles, filter, titlesInitialized]);\n\n const handleTitleChange = (title) => {\n setTitle(title);\n chooseTitle(title);\n };\n\n return (\n (option?.name ? `${option.name} (Title ID: ${option.id})` : '')}\n onChange={(event, value) => handleTitleChange(value)}\n renderInput={(params) => }\n renderOption={(props, option) => (\n \n \n {option.name}\n \n (Title ID: {option.id})\n \n \n \n )}\n />\n );\n};\n\nTitlePicker3.propTypes = {\n chooseTitle: PropTypes.func,\n titleID: PropTypes.string,\n filter: PropTypes.string\n};\n\nexport default TitlePicker3;\n","import PropTypes from 'prop-types';\nimport { useState } from 'react';\n\n// material-ui\nimport { TextField, MenuItem, Stack, Typography } from '@mui/material';\nimport { useTheme } from '@mui/material/styles';\n\n// project imports\nimport { formatDateMMDDYY } from 'utils/dates';\n\n// ==============================|| INFRINGEMENT PICKER ||============================== //\n\nconst InfringementPicker2 = ({ chooseInfringement, infringements }) => {\n const theme = useTheme();\n const [infringement, setInfringement] = useState('');\n\n const handleInfringementChange = (value) => {\n const idx = infringements.indexOf(value);\n setInfringement(value);\n chooseInfringement(idx);\n };\n\n return (\n <>\n handleInfringementChange(e.target.value)}\n >\n {infringements.map((infringement, idx) => (\n \n \n {infringement.reference}\n \n (Date Created: {formatDateMMDDYY(infringement.createdOn)})\n \n \n \n ))}\n \n \n );\n};\n\nInfringementPicker2.propTypes = {\n chooseInfringement: PropTypes.func,\n infringements: PropTypes.array\n};\n\nexport default InfringementPicker2;\n","import PropTypes from 'prop-types';\nimport { useState } from 'react';\n\n// material-ui\nimport { TextField, MenuItem, Stack, Typography } from '@mui/material';\nimport { useTheme } from '@mui/material/styles';\n\n// project imports\nimport { formatDateMMDDYY } from 'utils/dates';\n\n// ==============================|| ACTION PICKER ||============================== //\n\nconst ActionPicker2 = ({ chooseAction, actions }) => {\n const theme = useTheme();\n const [action, setAction] = useState('');\n\n const handleActionChange = (value) => {\n const idx = actions.indexOf(value);\n setAction(value);\n chooseAction({ actionID: idx, actionType: value.type });\n };\n\n return (\n <>\n handleActionChange(e.target.value)}\n >\n {actions.map((action, idx) => (\n \n \n {action.type}\n \n (Date Created: {formatDateMMDDYY(action.createdOn)})\n \n \n \n ))}\n \n \n );\n};\n\nActionPicker2.propTypes = {\n chooseAction: PropTypes.func,\n actions: PropTypes.array\n};\n\nexport default ActionPicker2;\n","import { useState } from 'react';\nimport PropTypes from 'prop-types';\n\n// material-ui\nimport { Button, Dialog, DialogActions, DialogContent, Grid, DialogTitle, Typography } from '@mui/material';\n// import TitlePicker2 from './TitlePicker2';\nimport TitlePicker3 from './TitlePicker3';\nimport InfringementPicker2 from './InfringementPicker2';\nimport ActionPicker2 from './ActionPicker2';\n\nconst getSelectionText = (type) => {\n if (type === 'title' || type === 'registration') {\n return 'Select Title:';\n }\n if (type === 'infringement') {\n return 'First select Title, and then the Infringement:';\n }\n if (type === 'action') {\n return 'First select Title, then the Infringement and finally the Action:';\n }\n return 'An error has occurred - please refresh and try again.';\n};\n\nconst EntityPickerPopUp = ({ open, handleClose, entityType }) => {\n const [titleID, setTitleID] = useState();\n const [infringementID, setInfringementID] = useState();\n const [entityID, setEntityID] = useState();\n const [infringements, setInfringements] = useState();\n const [actions, setActions] = useState();\n const [error, setError] = useState();\n\n const chooseTitle = (title) => {\n if (entityType === 'title') {\n setEntityID({ entityType, titleID: title.id });\n return;\n }\n if (entityType === 'registration') {\n setEntityID({ entityType, titleID: title.id, regID: title.regID });\n return;\n }\n if (title.infringements && title.infringements.length > 0) {\n setInfringements(title.infringements);\n setActions();\n setTitleID(title.id);\n setError();\n } else {\n setInfringements();\n setActions();\n setEntityID();\n setError('There are no infringements for this title');\n }\n };\n const chooseInfringement = (idx) => {\n if (entityType === 'infringement') {\n setEntityID({ entityType, titleID, infringementID: idx.toString() });\n return;\n }\n const chosenInfringement = infringements[idx];\n if (chosenInfringement.actions && chosenInfringement.actions.length > 0) {\n setActions(chosenInfringement.actions);\n setInfringementID(idx.toString());\n setError();\n } else {\n setActions();\n setEntityID();\n setError('There are no actions for this infringement');\n }\n };\n\n const chooseAction = ({ actionID, actionType }) => {\n if (entityType === 'action') {\n setEntityID({ entityType, titleID, infringementID, actionID: actionID.toString(), actionType });\n }\n };\n\n const handleCancel = () => {\n handleClose();\n setEntityID();\n setInfringementID();\n setInfringements();\n setActions();\n setError();\n };\n\n const handleSave = () => {\n handleClose(entityID);\n setEntityID();\n setInfringementID();\n setInfringements();\n setActions();\n setError();\n };\n\n return (\n \n Select {entityType.charAt(0).toUpperCase() + entityType.slice(1)}\n \n \n \n {getSelectionText(entityType)}\n \n \n \n \n {infringements && (\n \n \n \n )}\n {actions && (\n \n \n \n )}\n \n {error && (\n \n {error}\n \n )}\n \n \n \n \n \n \n );\n};\n\nEntityPickerPopUp.propTypes = {\n open: PropTypes.bool,\n handleClose: PropTypes.func,\n entityType: PropTypes.string\n};\n\nexport default EntityPickerPopUp;\n","import { useState, useEffect } from 'react';\nimport { useSelector } from 'react-redux';\nimport { useNavigate } from 'react-router-dom';\nimport PropTypes from 'prop-types';\n\n// material-ui\nimport {\n Button,\n Checkbox,\n FormControl,\n FormControlLabel,\n FormHelperText,\n Grid,\n IconButton,\n MenuItem,\n RadioGroup,\n Stack,\n TextField,\n Typography\n} from '@mui/material';\nimport OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';\nimport { DatePicker } from '@mui/x-date-pickers/DatePicker';\n\n// project imports\nimport AnimateButton from 'ui-component/extended/AnimateButton';\nimport ColorPalette from '../views/calendar-page/ColorPalette';\nimport config from 'config';\nimport { getColor } from 'utils/colors';\nimport { getAction, getInfringement } from 'utils/dataAccess';\nimport { formatDateMMDDYY } from 'utils/dates';\n\n// assets\nimport { useTheme } from '@emotion/react';\nimport { errorExists, getErrorText } from 'utils/errors';\nimport EntityPickerPopUp from 'ui-component/EntityPickerPopUp';\n\n// ==============================|| CALENDAR EVENT FORM ||============================== //\n\nconst EventForm = ({ event, updateData, errorList, isCreating }) => {\n const theme = useTheme();\n const navigate = useNavigate();\n const [errors, setErrors] = useState([]);\n const [showEntityPicker, setShowEntityPicker] = useState(false);\n const { title = '', type = '', notes = '', entityID, priority = '', start = null, isCompleted = false } = event || {};\n const titleRecord = useSelector((state) => state?.title?.titles?.find((t) => t.id === entityID?.titleID)) || {};\n\n const eventTypes = [\n {\n value: 'title',\n color: getColor({ id: 'title', theme }),\n label: 'Title'\n },\n {\n value: 'registration',\n color: getColor({ id: 'registration', theme }),\n label: 'Registration'\n },\n {\n value: 'infringement',\n color: getColor({ id: 'infringement', theme }),\n label: 'Infringement'\n },\n {\n value: 'action',\n color: getColor({ id: 'action', theme }),\n label: 'Action'\n },\n {\n value: 'other',\n color: getColor({ id: 'event', theme }),\n label: 'Other'\n }\n ];\n\n useEffect(() => {\n if (errorList) {\n setErrors([...errorList]);\n }\n }, [errorList]);\n\n const resetError = (field) => {\n const updatedErrors = [...errors.filter((item) => item.field !== field)];\n setErrors(updatedErrors);\n };\n\n const chooseEntity = () => {\n setShowEntityPicker(true);\n };\n const openEntity = () => {\n if (!entityID) {\n return;\n }\n const { actionID, entityType, titleID, infringementID, regID, actionType } = entityID;\n if (actionID) {\n navigate(`/enforce/action?title=${titleID}&inf=${infringementID}&action=${actionID}&type=${actionType}`);\n return;\n }\n if (infringementID) {\n navigate(`/summary/${titleID}/${infringementID}`);\n return;\n }\n if (titleID) {\n if (entityType === 'registration') {\n navigate(`/register/title?id=${regID}`);\n } else {\n navigate(`/title/${titleID}`);\n }\n }\n };\n\n const handleEntityPickerClose = (entity) => {\n updateData({ entityID: entity });\n setShowEntityPicker(false);\n };\n\n const getEntityDescription = () => {\n if (!entityID || !titleRecord) {\n return '';\n }\n const { actionID, infringementID } = entityID;\n if (actionID) {\n if (!infringementID) {\n return '';\n }\n const infringement = getInfringement({ title: titleRecord, infringementID });\n const action = getAction({ title: titleRecord, infringementID, actionID });\n return (\n \n \n Title:\n {titleRecord.name}\n \n (Title ID: {titleRecord.id})\n \n \n \n Infringement: \n {infringement.reference}\n \n (Date Created: {formatDateMMDDYY(infringement.createdOn)})\n \n \n \n Action: \n {action.type}\n \n (Date Created: {formatDateMMDDYY(action.createdOn)})\n \n \n \n );\n }\n if (infringementID) {\n const infringement = getInfringement({ title: titleRecord, infringementID });\n return (\n \n \n Title:\n {titleRecord.name}\n \n (Title ID: {titleRecord.id})\n \n \n \n Infringement: \n {infringement.reference}\n \n (Date Created: {formatDateMMDDYY(infringement.createdOn)})\n \n \n \n );\n }\n return (\n \n Title: \n {titleRecord.name}\n \n (Title ID: {titleRecord.id})\n \n \n );\n };\n\n return (\n \n \n updateData({ title: e.target.value })}\n onFocus={() => resetError('title')}\n />\n \n \n \n \n Event Type\n \n \n \n updateData({ type: e.target.value })}\n onFocus={() => resetError('type')}\n sx={{ '& .MuiFormControlLabel-root': { mr: 0 } }}\n >\n {eventTypes.map((item, index) => (\n \n ))}\n \n {getErrorText({ errors, field: 'type' }) && (\n {getErrorText({ errors, field: 'type' })}\n )}\n \n \n {type && type !== 'other' && (\n \n \n \n {entityID ? (\n getEntityDescription()\n ) : (\n \n \n Choose {type}\n \n \n )}\n \n {entityID && !isCreating && (\n \n \n \n \n \n )}\n \n \n )}\n \n \n \n \n updateData({ start: newValue })}\n renderInput={(params) => (\n resetError('start')}\n />\n )}\n />\n \n \n \n updateData({ priority: e.target.value })}\n onFocus={() => resetError('priority')}\n >\n {config.eventPriorities.map((item) => (\n \n {item.name}\n \n ))}\n \n \n \n updateData({ notes: e.target.value })}\n onFocus={() => resetError('notes')}\n />\n \n \n updateData({ isCompleted: e.target.checked })}\n name=\"completed\"\n color=\"primary\"\n />\n }\n label=\"Completed\"\n />\n \n \n \n );\n};\n\nEventForm.propTypes = {\n event: PropTypes.object,\n updateData: PropTypes.func,\n isCreating: PropTypes.bool,\n errorList: PropTypes.array\n};\n\nexport default EventForm;\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\n// material-ui\r\nimport { Button, DialogActions, DialogContent, DialogTitle, Divider, Dialog, Grid, IconButton, Stack, Tooltip } from '@mui/material';\r\n\r\n// project imports\r\nimport EventForm from './EventForm';\r\nimport { validateEventData } from 'utils/validation';\r\n\r\n// assets\r\nimport DeleteIcon from '@mui/icons-material/Delete';\r\n\r\n// ==============================|| CALENDAR EVENT ADD / EDIT / DELETE ||============================== //\r\n\r\nconst EventPopUp = ({ event, handleClose, open, handleDelete, handleCreate, handleUpdate }) => {\r\n const [errors, setErrors] = useState([]);\r\n const [eventData, setEventData] = useState({});\r\n const isCreating = !event;\r\n\r\n useEffect(() => {\r\n if (event) {\r\n setEventData({ ...event });\r\n }\r\n }, [event]);\r\n\r\n const updateData = (data) => {\r\n // Remove entityID if type changes\r\n if (Object.keys(data).includes('type')) {\r\n const enhancedData = { ...eventData, ...data };\r\n delete enhancedData.entityID;\r\n setEventData({ ...enhancedData });\r\n return;\r\n }\r\n setEventData({ ...eventData, ...data });\r\n };\r\n\r\n const handleSave = () => {\r\n const isCreate = !eventData.createdOn;\r\n // Validate data\r\n const checkErrors = validateEventData({ event: eventData });\r\n if (checkErrors.length === 0) {\r\n const data = { ...eventData };\r\n // Ensure everything is \"all-day\"\r\n data.allDay = true;\r\n // Set Medium as the default priority\r\n data.priority = data.priority ? data.priority : '1';\r\n if (isCreate) {\r\n handleCreate(data);\r\n } else {\r\n handleUpdate(data);\r\n }\r\n setErrors([]);\r\n setEventData({});\r\n handleClose();\r\n } else {\r\n setErrors(checkErrors);\r\n }\r\n };\r\n\r\n return (\r\n \r\n {event ? 'Edit Event' : 'Add Event'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!isCreating && (\r\n \r\n handleDelete(event?.id)} size=\"large\">\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nEventPopUp.propTypes = {\r\n event: PropTypes.object,\r\n open: PropTypes.bool,\r\n handleClose: PropTypes.func,\r\n handleCreate: PropTypes.func,\r\n handleDelete: PropTypes.func,\r\n handleUpdate: PropTypes.func\r\n};\r\n\r\nexport default EventPopUp;\r\n","import PropTypes from 'prop-types';\r\nimport { forwardRef } from 'react';\r\n\r\n// material-ui\r\nimport { useTheme } from '@mui/material/styles';\r\nimport { Card, CardContent, CardHeader, Divider, Typography } from '@mui/material';\r\n\r\n// ==============================|| CUSTOM SUB CARD ||============================== //\r\n\r\nconst SubCard = forwardRef(({ children, content, contentClass, darkTitle, secondary, sx = {}, contentSX = {}, title, ...others }, ref) => {\r\n const theme = useTheme();\r\n\r\n return (\r\n \r\n {/* card header and action */}\r\n {!darkTitle && title && {title}} action={secondary} />}\r\n {darkTitle && title && {title}} action={secondary} />}\r\n\r\n {/* content & header divider */}\r\n {title && (\r\n \r\n )}\r\n\r\n {/* card content */}\r\n {content && (\r\n \r\n {children}\r\n \r\n )}\r\n {!content && children}\r\n \r\n );\r\n});\r\n\r\nSubCard.propTypes = {\r\n children: PropTypes.node,\r\n content: PropTypes.bool,\r\n contentClass: PropTypes.string,\r\n darkTitle: PropTypes.bool,\r\n secondary: PropTypes.oneOfType([PropTypes.node, PropTypes.string, PropTypes.object]),\r\n sx: PropTypes.object,\r\n contentSX: PropTypes.object,\r\n title: PropTypes.oneOfType([PropTypes.node, PropTypes.string, PropTypes.object])\r\n};\r\n\r\nSubCard.defaultProps = {\r\n content: true\r\n};\r\n\r\nexport default SubCard;\r\n","import PropTypes from 'prop-types';\r\nimport { forwardRef } from 'react';\r\n// third-party\r\nimport { motion, useCycle } from 'framer-motion';\r\n\r\n// ==============================|| ANIMATION BUTTON ||============================== //\r\n\r\nconst AnimateButton = forwardRef(({ children, type, direction, offset, scale }, ref) => {\r\n let offset1;\r\n let offset2;\r\n switch (direction) {\r\n case 'up':\r\n case 'left':\r\n offset1 = offset;\r\n offset2 = 0;\r\n break;\r\n case 'right':\r\n case 'down':\r\n default:\r\n offset1 = 0;\r\n offset2 = offset;\r\n break;\r\n }\r\n\r\n const [x, cycleX] = useCycle(offset1, offset2);\r\n const [y, cycleY] = useCycle(offset1, offset2);\r\n\r\n switch (type) {\r\n case 'rotate':\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n case 'slide':\r\n if (direction === 'up' || direction === 'down') {\r\n return (\r\n cycleY()}\r\n onHoverStart={() => cycleY()}\r\n >\r\n {children}\r\n \r\n );\r\n }\r\n return (\r\n cycleX()} onHoverStart={() => cycleX()}>\r\n {children}\r\n \r\n );\r\n\r\n case 'scale':\r\n default:\r\n if (typeof scale === 'number') {\r\n scale = {\r\n hover: scale,\r\n tap: scale\r\n };\r\n }\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n }\r\n});\r\n\r\nAnimateButton.propTypes = {\r\n children: PropTypes.node,\r\n offset: PropTypes.number,\r\n type: PropTypes.oneOf(['slide', 'scale', 'rotate']),\r\n direction: PropTypes.oneOf(['up', 'down', 'left', 'right']),\r\n scale: PropTypes.oneOfType([PropTypes.number, PropTypes.object])\r\n};\r\n\r\nAnimateButton.defaultProps = {\r\n type: 'scale',\r\n offset: 10,\r\n direction: 'right',\r\n scale: {\r\n hover: 1,\r\n tap: 0.9\r\n }\r\n};\r\n\r\nexport default AnimateButton;\r\n","const getEntityColors = (theme) => {\n const colors = [];\n colors.push({ id: 'project', color: theme.palette.primary[200] });\n colors.push({ id: 'title', color: theme.palette.secondary[200] });\n colors.push({ id: 'registration', color: theme.palette.secondary.main });\n colors.push({ id: 'infringement', color: theme.palette.primary.main });\n colors.push({ id: 'action', color: theme.palette.orange.dark });\n colors.push({ id: 'event', color: theme.palette.warning.main });\n colors.push({ id: 'other', color: theme.palette.warning.main });\n colors.push({ id: 'completed', color: theme.palette.primary.light });\n colors.push({ id: 'completedText', color: theme.palette.primary[200] });\n return colors;\n};\n\nconst getColor = ({ id, theme }) => {\n if (id) {\n const colorRec = getEntityColors(theme).find((item) => item.id === id);\n if (colorRec?.color) {\n return colorRec.color;\n }\n }\n return '#888888';\n};\n\nexport { getEntityColors, getColor };\n","const getInfringement = ({ title, infringementID }) => {\n if (!title || !title.infringements || !infringementID) {\n return {};\n }\n return title.infringements[infringementID];\n};\n\nconst getInfringementData = ({ title, infringementID }) => {\n if (!title || !title.infringements || !infringementID) {\n return {};\n }\n const infringement = title.infringements[infringementID];\n return infringement.data || {};\n};\n\nconst getAction = ({ title, infringementID, actionID }) => {\n if (!title || !infringementID || !actionID) {\n return {};\n }\n const infringement = getInfringement({ title, infringementID });\n if (!infringement.actions || infringement.actions.length < actionID) {\n return {};\n }\n return infringement.actions[actionID];\n};\n\nexport { getAction, getInfringement, getInfringementData };\n","const errorExists = ({ errors = [], field }) => {\n const errorRecord = errors.find((item) => item.field === field);\n return !!errorRecord;\n};\n\nconst getErrorText = ({ errors = [], field }) => {\n const errorRecord = errors.find((item) => item.field === field);\n if (errorRecord) {\n return errorRecord.errorText || 'undefined error';\n }\n return undefined;\n};\n\nexport { getErrorText, errorExists };\n","// Third party imports\nimport { isBefore } from 'date-fns';\n\nconst validateTitleData = ({ title, isBulk = false }) => {\n const newErrors = [];\n // First check the existance of mandatory fields\n if (!isBulk) {\n if (!title.projectID || title.projectID.length === 0) {\n newErrors.push({ field: 'projectID', errorText: 'You must select a project for this Title' });\n }\n if (!title.name || title.name.length === 0) {\n newErrors.push({ field: 'name', errorText: 'You must enter a name for this Title' });\n }\n if (!title.type || title.type.length === 0) {\n newErrors.push({ field: 'type', errorText: 'You must select a type for this Title' });\n }\n if (!title.isUSWork || title.isUSWork.length === 0) {\n newErrors.push({ field: 'isUSWork', errorText: 'You must specify if this is a US Work' });\n }\n if (!title.titleCreationDate || title.titleCreationDate.length === 0) {\n newErrors.push({ field: 'titleCreationDate', errorText: 'Please enter the date that the title was created' });\n }\n if (!title.isReg || title.isReg.length === 0) {\n newErrors.push({ field: 'isReg', errorText: 'You must define if the title has been registered (outside RightsClick™)' });\n }\n if (!title.isPub || title.isPub.length === 0) {\n newErrors.push({ field: 'isPub', errorText: 'You must indicate if the work has been published' });\n }\n if (!title.isAuthor || title.isAuthor.length === 0) {\n newErrors.push({ field: 'isAuthor', errorText: 'You must choose an option for the author' });\n }\n }\n\n // Now check specific and cross-field validation\n if (title.titleCreationDate && title.titleCreationDate.length > 0) {\n // Check valid date\n const checkDate = Date.parse(title.titleCreationDate);\n if (Number.isNaN(checkDate) === true) {\n newErrors.push({ field: 'titleCreationDate', errorText: 'Please enter a valid date' });\n } else {\n const currentDate = Date.parse(new Date());\n if (currentDate - checkDate < 0) {\n newErrors.push({ field: 'titleCreationDate', errorText: 'Future creation dates are not permitted' });\n }\n }\n }\n\n if (title.isReg === 'yes') {\n if (!title.regNo || title.regNo.length === 0) {\n newErrors.push({ field: 'regNo', errorText: 'For a registered Title you must enter the registration number' });\n }\n if (!title.regAppDate || title.regAppDate.length === 0) {\n newErrors.push({ field: 'regAppDate', errorText: 'For a registered Title you must enter the date the application was made' });\n } else {\n // Check valid date\n const checkDate = Date.parse(title.regAppDate);\n if (Number.isNaN(checkDate) === true) {\n newErrors.push({ field: 'regAppDate', errorText: 'Please enter a valid date' });\n } else {\n const currentDate = Date.parse(new Date());\n const diff = currentDate - checkDate;\n if (diff < 0) {\n newErrors.push({ field: 'regAppDate', errorText: 'Future registration dates are not permitted' });\n } else if (diff > 1576800000000) {\n newErrors.push({ field: 'regAppDate', errorText: 'Invalid registration date (too old)' });\n }\n }\n }\n }\n if (title.isReg === 'inProgress') {\n if (!title.regAppDate || title.regAppDate.length === 0) {\n newErrors.push({\n field: 'regAppDate',\n errorText: 'For an in-process registration, you must enter the date the application was made'\n });\n }\n if (!title.regAppNo || title.regAppNo.length === 0) {\n newErrors.push({\n field: 'regAppNo',\n errorText: 'For an in-process registration, you must enter the eCO Case Number'\n });\n }\n }\n\n if (title.isPub === 'yes') {\n if (!title.pubDate || title.pubDate.length === 0) {\n newErrors.push({ field: 'pubDate', errorText: 'A pubdate is required for published titles' });\n } else if (title.titleCreationDate) {\n // Check valid date\n const checkDate = Date.parse(title.pubDate);\n if (Number.isNaN(checkDate) === true) {\n newErrors.push({ field: 'pubDate', errorText: 'Please enter a valid date' });\n } else {\n const beforeError = isBefore(new Date(title.pubDate), new Date(title.titleCreationDate));\n if (beforeError) {\n newErrors.push({ field: 'pubDate', errorText: 'First Publication date can not be before creation date' });\n }\n }\n }\n }\n if (title.isAuthor === 'no' || title.isAuthor === 'joint') {\n if (!title.altAuthor || title.altAuthor.length === 0) {\n newErrors.push({\n field: 'altAuthor',\n errorText: 'If you are not the sole author, you must specify the (other) author(s) here'\n });\n }\n if (!title.isAuthorEntity || title.isAuthorEntity.length === 0) {\n newErrors.push({ field: 'isAuthorEntity', errorText: 'Please specify if the copyright owner is an entity' });\n }\n if (title.isAuthor === 'no') {\n if (!title.authorAddress || title.authorAddress.length === 0) {\n newErrors.push({ field: 'authorAddress', errorText: \"If you are not the author, you must specify the author's address\" });\n }\n if (!title.authorEmail || title.authorEmail.length === 0) {\n newErrors.push({\n field: 'authorEmail',\n errorText: \"If you are not the author, you must specify the author's email\"\n });\n }\n if (!title.authorPhone || title.authorPhone.length === 0) {\n newErrors.push({\n field: 'authorPhone',\n errorText: \"If you are not the author, you must specify the author's phone number\"\n });\n }\n }\n }\n return newErrors;\n};\n\nconst validateEventData = ({ event = {} }) => {\n const newErrors = [];\n if (!event.title || event.title.length === 0) {\n newErrors.push({ field: 'title', errorText: 'You must specify a name for this event' });\n }\n if (!event.type || event.type.length === 0) {\n newErrors.push({ field: 'type', errorText: 'You must specify what type of event this is' });\n }\n // Check valid date\n const checkDate = Date.parse(event.start);\n if (Number.isNaN(checkDate) === true) {\n newErrors.push({ field: 'start', errorText: 'Please enter a valid date' });\n }\n\n return newErrors;\n};\n\nconst validateProjectData = ({ project = {} }) => {\n const errors = [];\n\n if ((project?.name?.length ?? 0) === 0) {\n errors.push({ field: 'name', errorText: 'You must specify a name for this project' });\n }\n\n if ((project?.type?.length ?? 0) === 0) {\n errors.push({ field: 'type', errorText: 'You must specify what type of project this is' });\n }\n\n return errors;\n};\n\nconst validateExistingProjectData = ({ project = {} }) => {\n const errors = [];\n\n if ((project?.projectID ?? 0) === 0) {\n errors.push({ field: 'projectID', errorText: 'You must choose a project' });\n }\n\n return errors;\n};\n\nexport { validateTitleData, validateEventData, validateProjectData, validateExistingProjectData };\n"],"names":["color","label","value","FormControlLabel","control","Radio","sx","pr","chooseTitle","titleID","filter","dispatch","useDispatch","theme","useTheme","isLoggedIn","useAuth","titlesInitialized","useSelector","initializedTitles","useState","title","setTitle","titleList","setTitleList","allTitles","state","titles","useEffect","getTitleList","passedTitle","find","item","id","predicate","infringements","infringment","actions","regID","getPredicate","console","log","Autocomplete","options","getOptionLabel","option","name","onChange","event","handleTitleChange","renderInput","params","TextField","renderOption","props","MenuItem","key","Stack","direction","spacing","Typography","variant","typography","subMenuCaption","chooseInfringement","infringement","setInfringement","select","fullWidth","e","idx","indexOf","handleInfringementChange","target","map","alignItems","reference","formatDateMMDDYY","createdOn","chooseAction","action","setAction","actionID","actionType","type","handleActionChange","open","handleClose","entityType","setTitleID","infringementID","setInfringementID","entityID","setEntityID","setInfringements","setActions","error","setError","Dialog","onClose","DialogTitle","charAt","toUpperCase","slice","DialogContent","Grid","container","xs","mt","length","chosenInfringement","toString","DialogActions","Button","onClick","size","mr","disabled","updateData","errorList","isCreating","navigate","useNavigate","errors","setErrors","showEntityPicker","setShowEntityPicker","notes","priority","start","isCompleted","titleRecord","t","eventTypes","getColor","resetError","field","updatedErrors","mb","helperText","getErrorText","errorExists","onFocus","FormControl","RadioGroup","row","index","FormHelperText","getInfringement","getAction","getEntityDescription","AnimateButton","disableElevation","pl","IconButton","OpenInNew","md","LocalizationProvider","dateAdapter","AdapterDateFns","DatePicker","newValue","placeholder","config","multiline","rows","Checkbox","checked","entity","handleDelete","handleCreate","handleUpdate","eventData","setEventData","Divider","p","data","Object","keys","includes","enhancedData","justifyContent","Tooltip","Delete","isCreate","checkErrors","validateEventData","allDay","SubCard","forwardRef","ref","children","content","contentClass","darkTitle","secondary","contentSX","others","border","borderColor","palette","mode","dark","light","primary","boxShadow","opacity","className","defaultProps","offset1","offset2","offset","scale","useCycle","x","cycleX","y","cycleY","animate","rotate","transition","repeat","Infinity","repeatType","duration","repeatDelay","undefined","onHoverEnd","onHoverStart","hover","tap","whileHover","whileTap","colorRec","colors","push","main","orange","warning","getEntityColors","errorRecord","errorText","validateTitleData","isBulk","newErrors","projectID","isUSWork","titleCreationDate","isReg","isPub","isAuthor","checkDate","Date","parse","Number","isNaN","regNo","regAppDate","diff","regAppNo","pubDate","isBefore","altAuthor","isAuthorEntity","authorAddress","authorEmail","authorPhone","validateProjectData","project","validateExistingProjectData"],"sourceRoot":""}