Merge branch 'fix/remove-console-warnings' into 'release'
Remove console warnings - Remove console eslint warnings like react hook dependency warnings and unused vars warnings See merge request theappsmith/internal-tools-client!738
This commit is contained in:
commit
f70d92b8d0
|
|
@ -1,7 +1,6 @@
|
||||||
import Api from "./Api";
|
import Api from "./Api";
|
||||||
import { ApiResponse } from "./ApiResponses";
|
import { ApiResponse } from "./ApiResponses";
|
||||||
import { AxiosPromise } from "axios";
|
import { AxiosPromise } from "axios";
|
||||||
import { getUserCurrentOrgId } from "selectors/organizationSelectors";
|
|
||||||
|
|
||||||
export interface PublishApplicationRequest {
|
export interface PublishApplicationRequest {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import {
|
||||||
WrappedFieldMetaProps,
|
WrappedFieldMetaProps,
|
||||||
WrappedFieldInputProps,
|
WrappedFieldInputProps,
|
||||||
} from "redux-form";
|
} from "redux-form";
|
||||||
import FormFieldError from "components/editorComponents/form/FieldError";
|
|
||||||
import SelectComponent from "components/editorComponents/SelectComponent";
|
import SelectComponent from "components/editorComponents/SelectComponent";
|
||||||
|
|
||||||
const renderComponent = (
|
const renderComponent = (
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,7 @@ import {
|
||||||
} from "actions/metaActions";
|
} from "actions/metaActions";
|
||||||
import AppRoute from "pages/common/AppRoute";
|
import AppRoute from "pages/common/AppRoute";
|
||||||
import { editorInitializer } from "utils/EditorUtils";
|
import { editorInitializer } from "utils/EditorUtils";
|
||||||
import { getCurrentOrg } from "selectors/organizationSelectors";
|
|
||||||
import { PERMISSION_TYPE } from "pages/Applications/permissionHelpers";
|
import { PERMISSION_TYPE } from "pages/Applications/permissionHelpers";
|
||||||
import { Organization } from "constants/orgConstants";
|
|
||||||
|
|
||||||
const AppViewWrapper = styled.div`
|
const AppViewWrapper = styled.div`
|
||||||
margin-top: ${props => props.theme.headerHeight};
|
margin-top: ${props => props.theme.headerHeight};
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,13 @@ import {
|
||||||
getApplicationViewerPageURL,
|
getApplicationViewerPageURL,
|
||||||
BUILDER_PAGE_URL,
|
BUILDER_PAGE_URL,
|
||||||
} from "constants/routes";
|
} from "constants/routes";
|
||||||
import { Card, Tooltip, Classes, Icon } from "@blueprintjs/core";
|
import { Card, Tooltip, Icon } from "@blueprintjs/core";
|
||||||
import { ApplicationPayload } from "constants/ReduxActionConstants";
|
import { ApplicationPayload } from "constants/ReduxActionConstants";
|
||||||
import Button from "components/editorComponents/Button";
|
import Button from "components/editorComponents/Button";
|
||||||
import {
|
import {
|
||||||
theme,
|
theme,
|
||||||
getBorderCSSShorthand,
|
getBorderCSSShorthand,
|
||||||
getColorWithOpacity,
|
getColorWithOpacity,
|
||||||
Theme,
|
|
||||||
} from "constants/DefaultTheme";
|
} from "constants/DefaultTheme";
|
||||||
import ContextDropdown, {
|
import ContextDropdown, {
|
||||||
ContextDropdownOption,
|
ContextDropdownOption,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ type Props = InjectedFormProps<
|
||||||
// TODO(abhinav): abstract onCancel out.
|
// TODO(abhinav): abstract onCancel out.
|
||||||
|
|
||||||
export const CreateApplicationForm = (props: Props) => {
|
export const CreateApplicationForm = (props: Props) => {
|
||||||
const { error, handleSubmit, pristine, submitting, orgId } = props;
|
const { error, handleSubmit, pristine, submitting } = props;
|
||||||
return (
|
return (
|
||||||
<Form onSubmit={handleSubmit(createApplicationFormSubmitHandler)}>
|
<Form onSubmit={handleSubmit(createApplicationFormSubmitHandler)}>
|
||||||
{error && !pristine && <FormMessage intent="danger" message={error} />}
|
{error && !pristine && <FormMessage intent="danger" message={error} />}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import {
|
||||||
getIsCreatingApplication,
|
getIsCreatingApplication,
|
||||||
getCreateApplicationError,
|
getCreateApplicationError,
|
||||||
getIsDeletingApplication,
|
getIsDeletingApplication,
|
||||||
getUserApplicationsOrgs,
|
|
||||||
getUserApplicationsOrgsList,
|
getUserApplicationsOrgsList,
|
||||||
} from "selectors/applicationSelectors";
|
} from "selectors/applicationSelectors";
|
||||||
import {
|
import {
|
||||||
|
|
@ -20,17 +19,13 @@ import {
|
||||||
import PageWrapper from "pages/common/PageWrapper";
|
import PageWrapper from "pages/common/PageWrapper";
|
||||||
import SubHeader from "pages/common/SubHeader";
|
import SubHeader from "pages/common/SubHeader";
|
||||||
import PageSectionDivider from "pages/common/PageSectionDivider";
|
import PageSectionDivider from "pages/common/PageSectionDivider";
|
||||||
import { getApplicationPayloads } from "mockComponentProps/ApplicationPayloads";
|
|
||||||
import ApplicationCard from "./ApplicationCard";
|
import ApplicationCard from "./ApplicationCard";
|
||||||
import CreateApplicationForm from "./CreateApplicationForm";
|
import CreateApplicationForm from "./CreateApplicationForm";
|
||||||
import InviteUsersFormv2 from "pages/organization/InviteUsersFromv2";
|
import InviteUsersFormv2 from "pages/organization/InviteUsersFromv2";
|
||||||
import { CREATE_APPLICATION_FORM_NAME } from "constants/forms";
|
|
||||||
import { PERMISSION_TYPE } from "./permissionHelpers";
|
import { PERMISSION_TYPE } from "./permissionHelpers";
|
||||||
import { DELETING_APPLICATION } from "constants/messages";
|
import { DELETING_APPLICATION } from "constants/messages";
|
||||||
import { AppToaster } from "components/editorComponents/ToastComponent";
|
import { AppToaster } from "components/editorComponents/ToastComponent";
|
||||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
|
||||||
import FormDialogComponent from "components/editorComponents/form/FormDialogComponent";
|
import FormDialogComponent from "components/editorComponents/form/FormDialogComponent";
|
||||||
import OrganizationListMockResponse from "mockResponses/OrganisationListResponse";
|
|
||||||
import { User } from "constants/userConstants";
|
import { User } from "constants/userConstants";
|
||||||
import CustomizedDropdown, {
|
import CustomizedDropdown, {
|
||||||
CustomizedDropdownProps,
|
CustomizedDropdownProps,
|
||||||
|
|
@ -60,12 +55,6 @@ const ApplicationCardsWrapper = styled.div`
|
||||||
font-size: ${props => props.theme.fontSizes[4]}px;
|
font-size: ${props => props.theme.fontSizes[4]}px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const OrgName = styled.div`
|
|
||||||
font-size: ${props => props.theme.fontSizes[6]}px;
|
|
||||||
padding-top: ${props => props.theme.spaces[2]}px;
|
|
||||||
padding-left: ${props => props.theme.spaces[5]}px;
|
|
||||||
`;
|
|
||||||
|
|
||||||
const ApplicationAddCardWrapper = styled(Card)`
|
const ApplicationAddCardWrapper = styled(Card)`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -135,9 +124,6 @@ class Applications extends Component<
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
const applicationList = this.props.isFetchingApplications
|
|
||||||
? getApplicationPayloads(8)
|
|
||||||
: this.props.applicationList;
|
|
||||||
const Form: any = InviteUsersFormv2;
|
const Form: any = InviteUsersFormv2;
|
||||||
const DropdownProps = (
|
const DropdownProps = (
|
||||||
user: User,
|
user: User,
|
||||||
|
|
@ -215,7 +201,7 @@ class Applications extends Component<
|
||||||
/>
|
/>
|
||||||
<PageSectionDivider />
|
<PageSectionDivider />
|
||||||
{this.props.userOrgs &&
|
{this.props.userOrgs &&
|
||||||
this.props.userOrgs.length != 0 &&
|
this.props.userOrgs.length !== 0 &&
|
||||||
this.props.userOrgs.map((organizationObject: any) => {
|
this.props.userOrgs.map((organizationObject: any) => {
|
||||||
const { organization, applications } = organizationObject;
|
const { organization, applications } = organizationObject;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import {
|
||||||
InjectedFormProps,
|
InjectedFormProps,
|
||||||
FormSubmitHandler,
|
FormSubmitHandler,
|
||||||
formValueSelector,
|
formValueSelector,
|
||||||
Field,
|
|
||||||
} from "redux-form";
|
} from "redux-form";
|
||||||
import {
|
import {
|
||||||
HTTP_METHOD_OPTIONS,
|
HTTP_METHOD_OPTIONS,
|
||||||
|
|
@ -29,7 +28,6 @@ import CollapsibleHelp from "components/designSystems/appsmith/help/CollapsibleH
|
||||||
import KeyValueFieldArray from "components/editorComponents/form/fields/KeyValueFieldArray";
|
import KeyValueFieldArray from "components/editorComponents/form/fields/KeyValueFieldArray";
|
||||||
import PostBodyData from "./PostBodyData";
|
import PostBodyData from "./PostBodyData";
|
||||||
import ApiResponseView from "components/editorComponents/ApiResponseView";
|
import ApiResponseView from "components/editorComponents/ApiResponseView";
|
||||||
import _ from "lodash";
|
|
||||||
import EntityNameComponent from "components/editorComponents/EntityNameComponent";
|
import EntityNameComponent from "components/editorComponents/EntityNameComponent";
|
||||||
import { editApiName, saveApiName } from "actions/actionActions";
|
import { editApiName, saveApiName } from "actions/actionActions";
|
||||||
import { ApiNameValidation } from "reducers/uiReducers/apiPaneReducer";
|
import { ApiNameValidation } from "reducers/uiReducers/apiPaneReducer";
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ class ApiSidebar extends React.Component<Props> {
|
||||||
};
|
};
|
||||||
|
|
||||||
handleCreateNewApiClick = (selectedPageId: string) => {
|
handleCreateNewApiClick = (selectedPageId: string) => {
|
||||||
const { history, createNewApiAction } = this.props;
|
const { history } = this.props;
|
||||||
const { pageId, applicationId } = this.props.match.params;
|
const { pageId, applicationId } = this.props.match.params;
|
||||||
history.push(
|
history.push(
|
||||||
API_EDITOR_URL_WITH_SELECTED_PAGE_ID(
|
API_EDITOR_URL_WITH_SELECTED_PAGE_ID(
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { Route } from "react-router-dom";
|
import { Route } from "react-router-dom";
|
||||||
import { useDispatch } from "react-redux";
|
|
||||||
import {
|
import {
|
||||||
useShowPropertyPane,
|
useShowPropertyPane,
|
||||||
useWidgetSelection,
|
useWidgetSelection,
|
||||||
} from "utils/hooks/dragResizeHooks";
|
} from "utils/hooks/dragResizeHooks";
|
||||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||||
import { setCurrentUserDetails } from "actions/userActions";
|
|
||||||
|
|
||||||
export const WrappedComponent = (props: any) => {
|
export const WrappedComponent = (props: any) => {
|
||||||
const showPropertyPane = useShowPropertyPane();
|
const showPropertyPane = useShowPropertyPane();
|
||||||
|
|
@ -31,8 +29,6 @@ const AppRoute = ({
|
||||||
name: string;
|
name: string;
|
||||||
location?: any;
|
location?: any;
|
||||||
}) => {
|
}) => {
|
||||||
const dispatch = useDispatch();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!rest.logDisable) {
|
if (!rest.logDisable) {
|
||||||
AnalyticsUtil.logEvent("NAVIGATE_EDITOR", {
|
AnalyticsUtil.logEvent("NAVIGATE_EDITOR", {
|
||||||
|
|
|
||||||
|
|
@ -1,55 +1,8 @@
|
||||||
import React from "react";
|
|
||||||
import Badge from "./Badge";
|
|
||||||
import { Directions } from "utils/helpers";
|
import { Directions } from "utils/helpers";
|
||||||
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
||||||
import { getOnSelectAction, DropdownOnSelectActions } from "./dropdownHelpers";
|
import { getOnSelectAction, DropdownOnSelectActions } from "./dropdownHelpers";
|
||||||
import DropdownComponent, { CustomizedDropdownProps } from "./index";
|
import { CustomizedDropdownProps } from "./index";
|
||||||
import { Org } from "constants/orgConstants";
|
|
||||||
import { User } from "constants/userConstants";
|
import { User } from "constants/userConstants";
|
||||||
import FormDialogComponent from "components/editorComponents/form/FormDialogComponent";
|
|
||||||
import CreateOrganizationForm from "pages/organization/CreateOrganizationForm";
|
|
||||||
|
|
||||||
const switchdropdown = (
|
|
||||||
orgs: Org[],
|
|
||||||
currentOrg: Org,
|
|
||||||
): CustomizedDropdownProps => ({
|
|
||||||
sections: [
|
|
||||||
{
|
|
||||||
isSticky: true,
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
content: (
|
|
||||||
<FormDialogComponent
|
|
||||||
trigger="Create Organization"
|
|
||||||
Form={CreateOrganizationForm}
|
|
||||||
title="Create Organization"
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
shouldCloseDropdown: false,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
options: orgs
|
|
||||||
.filter(org => org.id !== currentOrg.id)
|
|
||||||
.map(org => ({
|
|
||||||
content: org.name,
|
|
||||||
onSelect: () =>
|
|
||||||
getOnSelectAction(DropdownOnSelectActions.DISPATCH, {
|
|
||||||
type: ReduxActionTypes.SWITCH_ORGANIZATION_INIT,
|
|
||||||
payload: {
|
|
||||||
orgId: org.id,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
})),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
trigger: {
|
|
||||||
text: "Switch Organization",
|
|
||||||
},
|
|
||||||
openDirection: Directions.RIGHT,
|
|
||||||
openOnHover: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
export const options = (
|
export const options = (
|
||||||
user: User,
|
user: User,
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ export const PageHeader = (props: PageHeaderProps) => {
|
||||||
<StyledPageHeader>
|
<StyledPageHeader>
|
||||||
<LogoContainer>
|
<LogoContainer>
|
||||||
<a href="/applications">
|
<a href="/applications">
|
||||||
<img className="logoimg" src={Logo} />
|
<img className="logoimg" src={Logo} alt="Appsmith Logo" />
|
||||||
</a>
|
</a>
|
||||||
</LogoContainer>
|
</LogoContainer>
|
||||||
<StyledDropDownContainer>
|
<StyledDropDownContainer>
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,20 @@
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import TagListField from "components/editorComponents/form/fields/TagListField";
|
import TagListField from "components/editorComponents/form/fields/TagListField";
|
||||||
import FormGroup from "components/editorComponents/form/FormGroup";
|
|
||||||
import { reduxForm } from "redux-form";
|
import { reduxForm } from "redux-form";
|
||||||
import SelectField from "components/editorComponents/form/fields/SelectField";
|
import SelectField from "components/editorComponents/form/fields/SelectField";
|
||||||
import Button from "components/editorComponents/Button";
|
import Button from "components/editorComponents/Button";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { AppState } from "reducers";
|
import { AppState } from "reducers";
|
||||||
import {
|
import {
|
||||||
getRoles,
|
|
||||||
getDefaultRole,
|
getDefaultRole,
|
||||||
getRolesForField,
|
getRolesForField,
|
||||||
getAllUsers,
|
getAllUsers,
|
||||||
} from "selectors/organizationSelectors";
|
} from "selectors/organizationSelectors";
|
||||||
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
||||||
import { InviteUsersToOrgFormValues, inviteUsersToOrg } from "./helpers";
|
import { InviteUsersToOrgFormValues, inviteUsersToOrg } from "./helpers";
|
||||||
import { OrgRole } from "constants/orgConstants";
|
|
||||||
import { INVITE_USERS_TO_ORG_FORM } from "constants/forms";
|
import { INVITE_USERS_TO_ORG_FORM } from "constants/forms";
|
||||||
import { Classes } from "@blueprintjs/core";
|
import { Classes } from "@blueprintjs/core";
|
||||||
import { noop } from "lodash";
|
|
||||||
import FormMessage from "components/editorComponents/form/FormMessage";
|
import FormMessage from "components/editorComponents/form/FormMessage";
|
||||||
import {
|
import {
|
||||||
INVITE_USERS_SUBMIT_SUCCESS,
|
INVITE_USERS_SUBMIT_SUCCESS,
|
||||||
|
|
@ -89,11 +85,13 @@ const InviteUsersForm = (props: any) => {
|
||||||
submitFailed,
|
submitFailed,
|
||||||
submitSucceeded,
|
submitSucceeded,
|
||||||
error,
|
error,
|
||||||
|
fetchUser,
|
||||||
|
fetchAllRoles,
|
||||||
} = props;
|
} = props;
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
props.fetchUser(props.orgId);
|
fetchUser(props.orgId);
|
||||||
props.fetchAllRoles(props.orgId);
|
fetchAllRoles(props.orgId);
|
||||||
}, [props.orgId]);
|
}, [props.orgId, fetchUser, fetchAllRoles]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledForm>
|
<StyledForm>
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,23 @@
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Icon } from "@blueprintjs/core";
|
import { Icon } from "@blueprintjs/core";
|
||||||
import _ from "lodash";
|
|
||||||
import {
|
import {
|
||||||
GridComponent,
|
GridComponent,
|
||||||
ColumnsDirective,
|
ColumnsDirective,
|
||||||
ColumnDirective,
|
ColumnDirective,
|
||||||
} from "@syncfusion/ej2-react-grids";
|
} from "@syncfusion/ej2-react-grids";
|
||||||
import { useHistory } from "react-router-dom";
|
|
||||||
import { AppState } from "reducers";
|
import { AppState } from "reducers";
|
||||||
import {
|
import {
|
||||||
getCurrentOrg,
|
|
||||||
getAllUsers,
|
getAllUsers,
|
||||||
getAllRoles,
|
getAllRoles,
|
||||||
getOrgs,
|
getOrgs,
|
||||||
} from "selectors/organizationSelectors";
|
} from "selectors/organizationSelectors";
|
||||||
import { ORG_INVITE_USERS_PAGE_URL } from "constants/routes";
|
|
||||||
import PageSectionDivider from "pages/common/PageSectionDivider";
|
import PageSectionDivider from "pages/common/PageSectionDivider";
|
||||||
import PageSectionHeader from "pages/common/PageSectionHeader";
|
import PageSectionHeader from "pages/common/PageSectionHeader";
|
||||||
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
||||||
import InviteUsersFormv2 from "pages/organization/InviteUsersFromv2";
|
import InviteUsersFormv2 from "pages/organization/InviteUsersFromv2";
|
||||||
import Button from "components/editorComponents/Button";
|
import Button from "components/editorComponents/Button";
|
||||||
import { Org, OrgUser, Organization } from "constants/orgConstants";
|
import { OrgUser, Organization } from "constants/orgConstants";
|
||||||
import { Menu, MenuItem, Popover, Position } from "@blueprintjs/core";
|
import { Menu, MenuItem, Popover, Position } from "@blueprintjs/core";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { FormIcons } from "icons/FormIcons";
|
import { FormIcons } from "icons/FormIcons";
|
||||||
|
|
@ -87,7 +83,6 @@ const StyledMenu = styled(Menu)`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const OrgSettings = (props: PageProps) => {
|
export const OrgSettings = (props: PageProps) => {
|
||||||
const history = useHistory();
|
|
||||||
const {
|
const {
|
||||||
match: {
|
match: {
|
||||||
params: { orgId },
|
params: { orgId },
|
||||||
|
|
@ -95,6 +90,9 @@ export const OrgSettings = (props: PageProps) => {
|
||||||
deleteOrgUser,
|
deleteOrgUser,
|
||||||
changeOrgUserRole,
|
changeOrgUserRole,
|
||||||
allOrgs,
|
allOrgs,
|
||||||
|
fetchUser,
|
||||||
|
fetchAllRoles,
|
||||||
|
getAllApplication,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const userTableData = props.allUsers.map(user => ({
|
const userTableData = props.allUsers.map(user => ({
|
||||||
|
|
@ -105,10 +103,10 @@ export const OrgSettings = (props: PageProps) => {
|
||||||
const currentOrgName = currentOrg?.organization.name ?? "";
|
const currentOrgName = currentOrg?.organization.name ?? "";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
props.fetchUser(orgId);
|
fetchUser(orgId);
|
||||||
props.fetchAllRoles(orgId);
|
fetchAllRoles(orgId);
|
||||||
props.getAllApplication();
|
getAllApplication();
|
||||||
}, [orgId]);
|
}, [orgId, fetchUser, fetchAllRoles, getAllApplication]);
|
||||||
|
|
||||||
const Dropdown = (props: DropdownProps) => {
|
const Dropdown = (props: DropdownProps) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import {
|
||||||
} from "constants/ReduxActionConstants";
|
} from "constants/ReduxActionConstants";
|
||||||
import { Organization } from "constants/orgConstants";
|
import { Organization } from "constants/orgConstants";
|
||||||
import { ERROR_MESSAGE_CREATE_APPLICATION } from "constants/messages";
|
import { ERROR_MESSAGE_CREATE_APPLICATION } from "constants/messages";
|
||||||
import { getApplicationPayload } from "mockComponentProps/ApplicationPayloads";
|
|
||||||
|
|
||||||
const initialState: ApplicationsReduxState = {
|
const initialState: ApplicationsReduxState = {
|
||||||
isFetchingApplications: false,
|
isFetchingApplications: false,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import ApplicationApi, {
|
||||||
ApplicationPagePayload,
|
ApplicationPagePayload,
|
||||||
SetDefaultPageRequest,
|
SetDefaultPageRequest,
|
||||||
DeleteApplicationRequest,
|
DeleteApplicationRequest,
|
||||||
GetAllApplicationResponse,
|
|
||||||
FetchUsersApplicationsOrgsResponse,
|
FetchUsersApplicationsOrgsResponse,
|
||||||
OrganizationApplicationObject,
|
OrganizationApplicationObject,
|
||||||
ApplicationObject,
|
ApplicationObject,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import OrgApi, {
|
||||||
CreateOrgRequest,
|
CreateOrgRequest,
|
||||||
FetchAllUsersResponse,
|
FetchAllUsersResponse,
|
||||||
FetchAllUsersRequest,
|
FetchAllUsersRequest,
|
||||||
FetchAllRolesRequest,
|
|
||||||
FetchAllRolesResponse,
|
FetchAllRolesResponse,
|
||||||
DeleteOrgUserRequest,
|
DeleteOrgUserRequest,
|
||||||
ChangeUserRoleRequest,
|
ChangeUserRoleRequest,
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ import UserApi, {
|
||||||
ForgotPasswordRequest,
|
ForgotPasswordRequest,
|
||||||
VerifyTokenRequest,
|
VerifyTokenRequest,
|
||||||
TokenPasswordUpdateRequest,
|
TokenPasswordUpdateRequest,
|
||||||
FetchUserRequest,
|
|
||||||
FetchUserResponse,
|
|
||||||
SwitchUserOrgRequest,
|
SwitchUserOrgRequest,
|
||||||
AddUserToOrgRequest,
|
AddUserToOrgRequest,
|
||||||
} from "api/UserApi";
|
} from "api/UserApi";
|
||||||
|
|
@ -25,11 +23,6 @@ import {
|
||||||
getResponseErrorMessage,
|
getResponseErrorMessage,
|
||||||
callAPI,
|
callAPI,
|
||||||
} from "./ErrorSagas";
|
} from "./ErrorSagas";
|
||||||
import * as Sentry from "@sentry/browser";
|
|
||||||
|
|
||||||
import { fetchOrgsSaga } from "./OrgSagas";
|
|
||||||
|
|
||||||
import { resetAuthExpiration } from "utils/storage";
|
|
||||||
import {
|
import {
|
||||||
logoutUserSuccess,
|
logoutUserSuccess,
|
||||||
logoutUserError,
|
logoutUserError,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { createSelector } from "reselect";
|
import { createSelector } from "reselect";
|
||||||
import { AppState } from "reducers";
|
import { AppState } from "reducers";
|
||||||
import { OrgRole, Org, Organization } from "constants/orgConstants";
|
import { OrgRole, Organization } from "constants/orgConstants";
|
||||||
|
|
||||||
export const getRolesFromState = (state: AppState) => {
|
export const getRolesFromState = (state: AppState) => {
|
||||||
return state.ui.orgs.roles;
|
return state.ui.orgs.roles;
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class FormWidget extends ContainerWidget {
|
||||||
getFormData(formWidget: ContainerWidgetProps<WidgetProps>) {
|
getFormData(formWidget: ContainerWidgetProps<WidgetProps>) {
|
||||||
const formData: any = {};
|
const formData: any = {};
|
||||||
if (formWidget.children)
|
if (formWidget.children)
|
||||||
formWidget.children.map(widgetData => {
|
formWidget.children.forEach(widgetData => {
|
||||||
if (widgetData.value) {
|
if (widgetData.value) {
|
||||||
formData[widgetData.widgetName] = widgetData.value;
|
formData[widgetData.widgetName] = widgetData.value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user