2024-06-25 02:08:24 -04:00
|
|
|
import AddCollaborators from './add-collaborators'
|
|
|
|
import AddCollaboratorsUpgrade from './add-collaborators-upgrade'
|
|
|
|
import CollaboratorsLimitUpgrade from './collaborators-limit-upgrade'
|
2024-08-26 09:03:37 -04:00
|
|
|
import AccessLevelsChanged from './access-levels-changed'
|
2024-06-25 02:08:24 -04:00
|
|
|
import PropTypes from 'prop-types'
|
2024-10-09 08:13:50 -04:00
|
|
|
import OLRow from '@/features/ui/components/ol/ol-row'
|
2024-06-25 02:08:24 -04:00
|
|
|
|
|
|
|
export default function SendInvites({
|
|
|
|
canAddCollaborators,
|
|
|
|
hasExceededCollaboratorLimit,
|
2024-08-26 09:03:37 -04:00
|
|
|
haveAnyEditorsBeenDowngraded,
|
|
|
|
somePendingEditorsResolved,
|
2024-06-25 02:08:24 -04:00
|
|
|
}) {
|
|
|
|
return (
|
2024-10-09 08:13:50 -04:00
|
|
|
<OLRow className="invite-controls">
|
2024-08-26 09:03:37 -04:00
|
|
|
{hasExceededCollaboratorLimit && !haveAnyEditorsBeenDowngraded && (
|
|
|
|
<AddCollaboratorsUpgrade />
|
2024-06-25 02:08:24 -04:00
|
|
|
)}
|
2024-08-26 09:03:37 -04:00
|
|
|
|
|
|
|
{haveAnyEditorsBeenDowngraded && (
|
|
|
|
<AccessLevelsChanged
|
|
|
|
somePendingEditorsResolved={somePendingEditorsResolved}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
|
|
|
|
{!canAddCollaborators &&
|
|
|
|
!hasExceededCollaboratorLimit &&
|
|
|
|
!haveAnyEditorsBeenDowngraded && <CollaboratorsLimitUpgrade />}
|
2024-07-01 04:30:04 -04:00
|
|
|
<AddCollaborators readOnly={!canAddCollaborators} />
|
2024-10-09 08:13:50 -04:00
|
|
|
</OLRow>
|
2024-06-25 02:08:24 -04:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
SendInvites.propTypes = {
|
|
|
|
canAddCollaborators: PropTypes.bool,
|
|
|
|
hasExceededCollaboratorLimit: PropTypes.bool,
|
2024-08-26 09:03:37 -04:00
|
|
|
haveAnyEditorsBeenDowngraded: PropTypes.bool,
|
|
|
|
somePendingEditorsResolved: PropTypes.bool,
|
2024-06-25 02:08:24 -04:00
|
|
|
}
|