feat: add missing propTypes

This commit is contained in:
kasia.oczkowska
2024-06-05 13:26:56 +01:00
parent 725b38c697
commit 3f5df118a0
53 changed files with 597 additions and 81 deletions

View File

@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import { useMutation } from '@apollo/client';
import LoadingButton from '@mui/lab/LoadingButton';
import Divider from '@mui/material/Divider';
@@ -105,4 +106,12 @@ function RoleMappings({ provider, providerLoading }) {
</>
);
}
RoleMappings.propTypes = {
provider: PropTypes.shape({
id: PropTypes.oneOf([PropTypes.number, PropTypes.string]).isRequired,
}),
providerLoading: PropTypes.bool,
};
export default RoleMappings;

View File

@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import { useMutation } from '@apollo/client';
import LoadingButton from '@mui/lab/LoadingButton';
import Stack from '@mui/material/Stack';
@@ -192,4 +193,22 @@ function SamlConfiguration({ provider, providerLoading }) {
</Form>
);
}
SamlConfiguration.propTypes = {
provider: PropTypes.shape({
active: PropTypes.bool,
name: PropTypes.string,
certificate: PropTypes.string,
signatureAlgorithm: PropTypes.oneOf(['sha1', 'sha256', 'sha512']),
issuer: PropTypes.string,
entryPoint: PropTypes.string,
firstnameAttributeName: PropTypes.string,
surnameAttributeName: PropTypes.string,
emailAttributeName: PropTypes.string,
roleAttributeName: PropTypes.string,
defaultRoleId: PropTypes.string,
}),
providerLoading: PropTypes.bool,
};
export default SamlConfiguration;