diff --git a/Accounts/src/App.tsx b/Accounts/src/App.tsx index d74c89e179..fbce41db2a 100644 --- a/Accounts/src/App.tsx +++ b/Accounts/src/App.tsx @@ -20,9 +20,18 @@ function App(): ReactElement { path="/accounts/forgot-password" element={} /> - } /> - } /> - } /> + } + /> + } + /> + } + /> diff --git a/Accounts/src/Pages/Register.tsx b/Accounts/src/Pages/Register.tsx index ca201c6e2c..93fd6ce0c6 100644 --- a/Accounts/src/Pages/Register.tsx +++ b/Accounts/src/Pages/Register.tsx @@ -12,7 +12,6 @@ import HTTPResponse from 'Common/Types/API/HTTPResponse'; import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; const RegisterPage: FunctionComponent = () => { - const [isLaoding, setIsLoading] = useState(false); const user: User = new User(); @@ -20,15 +19,15 @@ const RegisterPage: FunctionComponent = () => { const submitForm = async (values: FormValues) => { setIsLoading(true); - const response: HTTPResponse = await IdentityAPI.post(new Route("/signup"), { - user: values as JSONObject - }); + const response: HTTPResponse = + await IdentityAPI.post(new Route('/signup'), { + user: values as JSONObject, + }); - // navigate to dashboard. + // navigate to dashboard. console.log(response); setIsLoading(false); - } - + }; return ( @@ -108,7 +107,6 @@ const RegisterPage: FunctionComponent = () => {

Have an account? Login -

} diff --git a/Accounts/src/Pages/SsoLogin.tsx b/Accounts/src/Pages/SsoLogin.tsx index 622e7be87c..4a1c58df2c 100644 --- a/Accounts/src/Pages/SsoLogin.tsx +++ b/Accounts/src/Pages/SsoLogin.tsx @@ -33,7 +33,9 @@ const SsoLoginPage: FunctionComponent = () => { footer={

- Use your password instead + + Use your password instead +

Don't have an account? diff --git a/AdminDashboard/src/App.tsx b/AdminDashboard/src/App.tsx index 30a8569705..d63df12bb2 100644 --- a/AdminDashboard/src/App.tsx +++ b/AdminDashboard/src/App.tsx @@ -20,7 +20,6 @@ if (userData !== undefined) { User.setEmail(userData.email); User.setName(userData.name); } else { - window.location.href = ACCOUNTS_URL; } @@ -32,7 +31,9 @@ const App: Function = () => { }> {allRoutes - .filter(route => route.visible) + .filter(route => { + return route.visible; + }) .map((route, index) => { return ( { - public static displayName = ''; public static propTypes = {}; @@ -34,12 +33,11 @@ class NotFound extends Component {

- + ); } } - NotFound.displayName = 'NotFound'; export default NotFound; diff --git a/AdminDashboard/src/Components/AdminNote/AdminNote.tsx b/AdminDashboard/src/Components/AdminNote/AdminNote.tsx index 2f28b98d96..980ca50415 100644 --- a/AdminDashboard/src/Components/AdminNote/AdminNote.tsx +++ b/AdminDashboard/src/Components/AdminNote/AdminNote.tsx @@ -6,7 +6,7 @@ import { Field } from 'redux-form'; const AdminNote: Function = ({ fields, - meta: { error, submitFailed } + meta: { error, submitFailed }, }: $TSFixMe) => { return (
    @@ -37,7 +37,9 @@ const AdminNote: Function = ({ id={`btnRemoveAdminNote${i}`} className="bs-Button bs-DeprecatedButton" type="button" - onClick={() => fields.remove(i)} + onClick={() => { + return fields.remove(i); + }} > Remove @@ -58,7 +60,9 @@ const AdminNote: Function = ({ id="btnAddAdminNotes" type="button" className="bs-Button bs-FileUploadButton bs-Button--icon bs-Button--new" - onClick={() => fields.push({ note: '' })} + onClick={() => { + return fields.push({ note: '' }); + }} > Add Notes diff --git a/AdminDashboard/src/Components/AdminNote/AdminNotes.tsx b/AdminDashboard/src/Components/AdminNote/AdminNotes.tsx index c7b123d061..36a343ac91 100644 --- a/AdminDashboard/src/Components/AdminNote/AdminNotes.tsx +++ b/AdminDashboard/src/Components/AdminNote/AdminNotes.tsx @@ -19,7 +19,6 @@ function validate(values: $TSFixMe) { const adminNotesErrors: $TSFixMe = {}; if (values.adminNotes[i] && values.adminNotes[i].note) { if (!Validate.text(values.adminNotes[i].note)) { - adminNotesErrors.note = 'Note is not in text format.'; adminNotesArrayErrors[i] = adminNotesErrors; } @@ -27,7 +26,6 @@ function validate(values: $TSFixMe) { } if (adminNotesArrayErrors.length) { - errors.adminNotes = adminNotesArrayErrors; } } @@ -35,17 +33,15 @@ function validate(values: $TSFixMe) { return errors; } -export class AdminNotes extends Component{ +export class AdminNotes extends Component { public static displayName = ''; public static propTypes = {}; submitForm = async (values: $TSFixMe) => { - await this.props.addNote(this.props.id, values.adminNotes); }; override render() { - const { handleSubmit, requesting }: $TSFixMe = this.props; return (
    @@ -101,16 +97,16 @@ export class AdminNotes extends Component{ } } - AdminNotes.displayName = 'AdminNotes'; -const mapDispatchToProps: Function = (dispatch: Dispatch) => bindActionCreators({}, dispatch); +const mapDispatchToProps: Function = (dispatch: Dispatch) => { + return bindActionCreators({}, dispatch); +}; const mapStateToProps: Function = () => { return {}; }; - AdminNotes.propTypes = { requesting: PropTypes.bool, addNote: PropTypes.func.isRequired, diff --git a/AdminDashboard/src/Components/AuditLogs/AuditLogsJsonViewModal.tsx b/AdminDashboard/src/Components/AuditLogs/AuditLogsJsonViewModal.tsx index b2942e2b1f..7bb8448867 100644 --- a/AdminDashboard/src/Components/AuditLogs/AuditLogsJsonViewModal.tsx +++ b/AdminDashboard/src/Components/AuditLogs/AuditLogsJsonViewModal.tsx @@ -7,7 +7,6 @@ import ReactJson from 'react-json-view'; import ClickOutside from 'react-click-outside'; class AuditLogsJsonViewModal extends Component { - public static displayName = ''; public static propTypes = {}; @@ -22,7 +21,6 @@ class AuditLogsJsonViewModal extends Component { handleKeyboard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - return this.props.closeThisDialog(); default: return false; @@ -31,7 +29,6 @@ class AuditLogsJsonViewModal extends Component { override render() { const { - isRequesting, error, @@ -142,8 +139,9 @@ class AuditLogsJsonViewModal extends Component {
    - - - + +
    +
    + +
    + + + +
    +
    +
    - - - - ); - }) + + + ); + } + ) ) : ( )} @@ -303,21 +292,15 @@ export class AuditLogsList extends Component{ id="logsStatus" style={{ textAlign: 'center', marginTop: '10px' }} > - {this.props.auditLogs && - - (!this.props.auditLogs.auditLogs || - - !this.props.auditLogs.auditLogs.length) && - - !this.props.requesting && - - !this.props.auditLogs.error + (!this.props.auditLogs.auditLogs || + !this.props.auditLogs.auditLogs.length) && + !this.props.requesting && + !this.props.auditLogs.error ? "We don't have any logs yet" : null} {this.props.auditLogs && this.props.auditLogs.error - ? this.props.auditLogs.error : null} @@ -331,22 +314,17 @@ export class AuditLogsList extends Component{ > - Page {this.props.page} of{' '} {numberOfPages} ( - {this.props.auditLogs.count} {' '} Log 0} > s @@ -363,9 +341,7 @@ export class AuditLogsList extends Component{