diff --git a/Dashboard/src/Components/Header/Help.tsx b/Dashboard/src/Components/Header/Help.tsx index ce1df501f7..e178f3ba26 100644 --- a/Dashboard/src/Components/Header/Help.tsx +++ b/Dashboard/src/Components/Header/Help.tsx @@ -3,7 +3,7 @@ import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconD import IconDropdwonItem from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownItem'; import IconDropdwonMenu from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownMenu'; import IconDropdwonRow from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownRow'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import URL from 'Common/Types/API/URL'; const Help: FunctionComponent = (): ReactElement => { diff --git a/Dashboard/src/Components/Header/Notifications.tsx b/Dashboard/src/Components/Header/Notifications.tsx index b9b6b6bafb..fc9b72f694 100644 --- a/Dashboard/src/Components/Header/Notifications.tsx +++ b/Dashboard/src/Components/Header/Notifications.tsx @@ -2,7 +2,7 @@ import React, { FunctionComponent, ReactElement } from 'react'; import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton'; import Notifications from 'CommonUI/src/Components/Header/Notifications/Notifications'; import NotificationItem from 'CommonUI/src/Components/Header/Notifications/NotificationItem'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; const DashboardHeader: FunctionComponent = (): ReactElement => { return ( diff --git a/Dashboard/src/Components/Header/ProjectPicker.tsx b/Dashboard/src/Components/Header/ProjectPicker.tsx index b535203a50..ba7ab01b51 100644 --- a/Dashboard/src/Components/Header/ProjectPicker.tsx +++ b/Dashboard/src/Components/Header/ProjectPicker.tsx @@ -5,7 +5,7 @@ import React, { useEffect, } from 'react'; import ProjectPicker from 'CommonUI/src/Components/Header/ProjectPicker/ProjectPicker'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import Project from 'Model/Models/Project'; import ModelFormModal from 'CommonUI/src/Components/ModelFormModal/ModelFormModal'; import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; @@ -142,13 +142,11 @@ const DashboardProjectPicker: FunctionComponent = ( ).map((plan: SubscriptionPlan): RadioButton => { let description: string = plan.isCustomPricing() ? `Our sales team will contact you soon.` - : `Billed ${ - isSubsriptionPlanYearly ? 'yearly' : 'monthly' - }. ${ - plan.getTrialPeriod() > 0 - ? `Free ${plan.getTrialPeriod()} days trial.` - : '' - }`; + : `Billed ${isSubsriptionPlanYearly ? 'yearly' : 'monthly' + }. ${plan.getTrialPeriod() > 0 + ? `Free ${plan.getTrialPeriod()} days trial.` + : '' + }`; if ( isSubsriptionPlanYearly && @@ -173,20 +171,20 @@ const DashboardProjectPicker: FunctionComponent = ( sideTitle: plan.isCustomPricing() ? 'Custom Price' : isSubsriptionPlanYearly - ? '$' + - ( - plan.getYearlySubscriptionAmountInUSD() * - 12 - ).toString() - : '$' + - plan - .getMonthlySubscriptionAmountInUSD() - .toString(), + ? '$' + + ( + plan.getYearlySubscriptionAmountInUSD() * + 12 + ).toString() + : '$' + + plan + .getMonthlySubscriptionAmountInUSD() + .toString(), sideDescription: plan.isCustomPricing() ? '' : isSubsriptionPlanYearly - ? `/year per user` - : `/month per user`, + ? `/year per user` + : `/month per user`, }; }), title: 'Please select a plan.', diff --git a/Dashboard/src/Components/Header/Upgrade.tsx b/Dashboard/src/Components/Header/Upgrade.tsx index 6ce237f4bc..e129ffa5a9 100644 --- a/Dashboard/src/Components/Header/Upgrade.tsx +++ b/Dashboard/src/Components/Header/Upgrade.tsx @@ -1,5 +1,5 @@ import React, { FunctionComponent, ReactElement, useState } from 'react'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import ModelFormModal from 'CommonUI/src/Components/ModelFormModal/ModelFormModal'; import Project from 'Model/Models/Project'; import Navigation from 'CommonUI/src/Utils/Navigation'; @@ -82,21 +82,19 @@ const Upgrade: FunctionComponent = (): ReactElement => { let description: string = plan.isCustomPricing() ? `Our sales team will contact you soon.` - : `Billed ${ - isSubsriptionPlanYearly - ? 'yearly' - : 'monthly' - }. ${ - plan.getTrialPeriod() > - 0 - ? `Free ${plan.getTrialPeriod()} days trial.` - : '' - }`; + : `Billed ${isSubsriptionPlanYearly + ? 'yearly' + : 'monthly' + }. ${plan.getTrialPeriod() > + 0 + ? `Free ${plan.getTrialPeriod()} days trial.` + : '' + }`; if ( isSubsriptionPlanYearly && plan.getYearlySubscriptionAmountInUSD() === - 0 + 0 ) { description = 'This plan is free, forever. '; @@ -105,7 +103,7 @@ const Upgrade: FunctionComponent = (): ReactElement => { if ( !isSubsriptionPlanYearly && plan.getMonthlySubscriptionAmountInUSD() === - 0 + 0 ) { description = 'This plan is free, forever. '; @@ -121,21 +119,21 @@ const Upgrade: FunctionComponent = (): ReactElement => { plan.isCustomPricing() ? 'Custom Price' : isSubsriptionPlanYearly - ? '$' + - ( - plan.getYearlySubscriptionAmountInUSD() * - 12 - ).toString() - : '$' + - plan - .getMonthlySubscriptionAmountInUSD() - .toString(), + ? '$' + + ( + plan.getYearlySubscriptionAmountInUSD() * + 12 + ).toString() + : '$' + + plan + .getMonthlySubscriptionAmountInUSD() + .toString(), sideDescription: plan.isCustomPricing() ? '' : isSubsriptionPlanYearly - ? `/year per user` - : `/month per user`, + ? `/year per user` + : `/month per user`, }; } ), diff --git a/Dashboard/src/Components/Header/UserProfile.tsx b/Dashboard/src/Components/Header/UserProfile.tsx index 81d41baf73..a36b32094e 100644 --- a/Dashboard/src/Components/Header/UserProfile.tsx +++ b/Dashboard/src/Components/Header/UserProfile.tsx @@ -1,5 +1,5 @@ import React, { FunctionComponent, ReactElement } from 'react'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import Route from 'Common/Types/API/Route'; import RouteMap, { RouteUtil } from '../../Utils/RouteMap'; import PageMap from '../../Utils/PageMap'; diff --git a/Dashboard/src/Components/Incident/ChangeState.tsx b/Dashboard/src/Components/Incident/ChangeState.tsx index f0877dc91a..aa198a8aa0 100644 --- a/Dashboard/src/Components/Incident/ChangeState.tsx +++ b/Dashboard/src/Components/Incident/ChangeState.tsx @@ -5,7 +5,7 @@ import Button, { ButtonSize, ButtonStyleType, } from 'CommonUI/src/Components/Button/Button'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import ModelAPI, { ListResult } from 'CommonUI/src/Utils/ModelAPI/ModelAPI'; import ProjectUtil from 'CommonUI/src/Utils/Project'; import IncidentState from 'Model/Models/IncidentState'; diff --git a/Dashboard/src/Components/Incident/IncidentsTable.tsx b/Dashboard/src/Components/Incident/IncidentsTable.tsx index 4bc81134d4..4f3f665e39 100644 --- a/Dashboard/src/Components/Incident/IncidentsTable.tsx +++ b/Dashboard/src/Components/Incident/IncidentsTable.tsx @@ -1,5 +1,5 @@ import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import FieldType from 'CommonUI/src/Components/Types/FieldType'; import React, { FunctionComponent, ReactElement } from 'react'; import Incident from 'Model/Models/Incident'; @@ -186,14 +186,14 @@ const IncidentsTable: FunctionComponent = ( color={ ( item[ - 'currentIncidentState' + 'currentIncidentState' ] as JSONObject )['color'] as Color } text={ ( item[ - 'currentIncidentState' + 'currentIncidentState' ] as JSONObject )['name'] as string } @@ -230,14 +230,14 @@ const IncidentsTable: FunctionComponent = ( color={ ( item[ - 'incidentSeverity' + 'incidentSeverity' ] as JSONObject )['color'] as Color } text={ ( item[ - 'incidentSeverity' + 'incidentSeverity' ] as JSONObject )['name'] as string } diff --git a/Dashboard/src/Components/Monitor/MonitorTable.tsx b/Dashboard/src/Components/Monitor/MonitorTable.tsx index 3516a01be1..72bfe21e9d 100644 --- a/Dashboard/src/Components/Monitor/MonitorTable.tsx +++ b/Dashboard/src/Components/Monitor/MonitorTable.tsx @@ -3,7 +3,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable'; import Monitor from 'Model/Models/Monitor'; import FieldType from 'CommonUI/src/Components/Types/FieldType'; import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import Label from 'Model/Models/Label'; import { JSONArray, JSONObject } from 'Common/Types/JSON'; import LabelsElement from '../../Components/Label/Labels'; @@ -151,14 +151,14 @@ const MonitorsTable: FunctionComponent = ( color={ ( item[ - 'currentMonitorStatus' + 'currentMonitorStatus' ] as JSONObject )['color'] as Color } text={ ( item[ - 'currentMonitorStatus' + 'currentMonitorStatus' ] as JSONObject )['name'] as string } diff --git a/Dashboard/src/Components/NavBar/NavBar.tsx b/Dashboard/src/Components/NavBar/NavBar.tsx index eae3afbd0c..87a0007441 100644 --- a/Dashboard/src/Components/NavBar/NavBar.tsx +++ b/Dashboard/src/Components/NavBar/NavBar.tsx @@ -5,7 +5,7 @@ import NavBarItem from 'CommonUI/src/Components/Navbar/NavBarItem'; // import NavBarMenuItem from 'CommonUI/src/Components/Navbar/NavBarMenuItem'; // import NavBarMenuColumn from 'CommonUI/src/Components/Navbar/NavBarMenuColumn'; import Route from 'Common/Types/API/Route'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import PageMap from '../../Utils/PageMap'; import RouteMap, { RouteUtil } from '../../Utils/RouteMap'; diff --git a/Dashboard/src/Components/ScheduledMaintenance/ChangeState.tsx b/Dashboard/src/Components/ScheduledMaintenance/ChangeState.tsx index 756272da66..f2bd14b8d1 100644 --- a/Dashboard/src/Components/ScheduledMaintenance/ChangeState.tsx +++ b/Dashboard/src/Components/ScheduledMaintenance/ChangeState.tsx @@ -5,7 +5,7 @@ import Button, { ButtonSize, ButtonStyleType, } from 'CommonUI/src/Components/Button/Button'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import ModelAPI, { ListResult } from 'CommonUI/src/Utils/ModelAPI/ModelAPI'; import ProjectUtil from 'CommonUI/src/Utils/Project'; import ScheduledMaintenanceState from 'Model/Models/ScheduledMaintenanceState'; diff --git a/Dashboard/src/Components/ScheduledMaintenance/ScheduledMaintenanceTable.tsx b/Dashboard/src/Components/ScheduledMaintenance/ScheduledMaintenanceTable.tsx index daf2a93ae0..9ec5519e26 100644 --- a/Dashboard/src/Components/ScheduledMaintenance/ScheduledMaintenanceTable.tsx +++ b/Dashboard/src/Components/ScheduledMaintenance/ScheduledMaintenanceTable.tsx @@ -1,5 +1,5 @@ import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import FieldType from 'CommonUI/src/Components/Types/FieldType'; import React, { FunctionComponent, ReactElement } from 'react'; import ScheduledMaintenance from 'Model/Models/ScheduledMaintenance'; @@ -208,14 +208,14 @@ const ScheduledMaintenancesTable: FunctionComponent = ( color={ ( item[ - 'currentScheduledMaintenanceState' + 'currentScheduledMaintenanceState' ] as JSONObject )['color'] as Color } text={ ( item[ - 'currentScheduledMaintenanceState' + 'currentScheduledMaintenanceState' ] as JSONObject )['name'] as string } @@ -286,7 +286,7 @@ const ScheduledMaintenancesTable: FunctionComponent = ( statusPages={ JSONFunctions.fromJSON( (item['statusPages'] as JSONArray) || - [], + [], StatusPage ) as Array } diff --git a/Dashboard/src/Pages/Global/ActiveIncidents.tsx b/Dashboard/src/Pages/Global/ActiveIncidents.tsx index 74decb6fb7..04fc2ecef5 100644 --- a/Dashboard/src/Pages/Global/ActiveIncidents.tsx +++ b/Dashboard/src/Pages/Global/ActiveIncidents.tsx @@ -5,7 +5,7 @@ import Route from 'Common/Types/API/Route'; import RouteMap, { RouteUtil } from '../../Utils/RouteMap'; import PageMap from '../../Utils/PageMap'; import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import FieldType from 'CommonUI/src/Components/Types/FieldType'; import { JSONArray, JSONObject } from 'Common/Types/JSON'; import Incident from 'Model/Models/Incident'; @@ -69,8 +69,7 @@ const Home: FunctionComponent = ( pluralName="Active Incidents" onViewPage={(item: Incident) => { return new Route( - `/dashboard/${ - item.projectId || item.project?._id || '' + `/dashboard/${item.projectId || item.project?._id || '' }/incidents/${item._id}` ); }} @@ -92,7 +91,7 @@ const Home: FunctionComponent = ( project={ JSONFunctions.fromJSON( (item['project'] as JSONObject) || - [], + [], Project ) as Project } @@ -132,14 +131,14 @@ const Home: FunctionComponent = ( color={ ( item[ - 'currentIncidentState' + 'currentIncidentState' ] as JSONObject )['color'] as Color } text={ ( item[ - 'currentIncidentState' + 'currentIncidentState' ] as JSONObject )['name'] as string } @@ -166,14 +165,14 @@ const Home: FunctionComponent = ( color={ ( item[ - 'incidentSeverity' + 'incidentSeverity' ] as JSONObject )['color'] as Color } text={ ( item[ - 'incidentSeverity' + 'incidentSeverity' ] as JSONObject )['name'] as string } @@ -200,7 +199,7 @@ const Home: FunctionComponent = ( monitors={ JSONFunctions.fromJSON( (item['monitors'] as JSONArray) || - [], + [], Monitor ) as Array } diff --git a/Dashboard/src/Pages/Global/ProjectInvitations.tsx b/Dashboard/src/Pages/Global/ProjectInvitations.tsx index 9f0c080043..f54f1b63bb 100644 --- a/Dashboard/src/Pages/Global/ProjectInvitations.tsx +++ b/Dashboard/src/Pages/Global/ProjectInvitations.tsx @@ -7,7 +7,7 @@ import PageMap from '../../Utils/PageMap'; import TeamMember from 'Model/Models/TeamMember'; import User from 'CommonUI/src/Utils/User'; import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import FieldType from 'CommonUI/src/Components/Types/FieldType'; import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button'; import { JSONObject } from 'Common/Types/JSON'; diff --git a/Dashboard/src/Pages/Global/UserProfile.tsx b/Dashboard/src/Pages/Global/UserProfile.tsx index 2e411812e2..52b07c8966 100644 --- a/Dashboard/src/Pages/Global/UserProfile.tsx +++ b/Dashboard/src/Pages/Global/UserProfile.tsx @@ -6,7 +6,7 @@ import RouteMap, { RouteUtil } from '../../Utils/RouteMap'; import PageMap from '../../Utils/PageMap'; import User from 'Model/Models/User'; import UserUtil from 'CommonUI/src/Utils/User'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail'; import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm'; diff --git a/Dashboard/src/Pages/Home/SideMenu.tsx b/Dashboard/src/Pages/Home/SideMenu.tsx index 70558b609d..671df88b18 100644 --- a/Dashboard/src/Pages/Home/SideMenu.tsx +++ b/Dashboard/src/Pages/Home/SideMenu.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent, ReactElement } from 'react'; import Route from 'Common/Types/API/Route'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu'; import SideMenuItem from 'CommonUI/src/Components/SideMenu/CountModelSideMenuItem'; import RouteMap, { RouteUtil } from '../../Utils/RouteMap'; @@ -61,7 +61,7 @@ const DashboardSideMenu: FunctionComponent = ( title: 'Ongoing Events', to: RouteUtil.populateRouteParams( RouteMap[ - PageMap.HOME_ONGOING_SCHEDULED_MAINTENANCE_EVENTS + PageMap.HOME_ONGOING_SCHEDULED_MAINTENANCE_EVENTS ] as Route ), }} diff --git a/Dashboard/src/Pages/Incidents/SideMenu.tsx b/Dashboard/src/Pages/Incidents/SideMenu.tsx index 92611e05e0..33ab04e838 100644 --- a/Dashboard/src/Pages/Incidents/SideMenu.tsx +++ b/Dashboard/src/Pages/Incidents/SideMenu.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent, ReactElement } from 'react'; import Route from 'Common/Types/API/Route'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu'; import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem'; import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection'; diff --git a/Dashboard/src/Pages/Incidents/View/Index.tsx b/Dashboard/src/Pages/Incidents/View/Index.tsx index b5f6d1d13a..839a8dbedf 100644 --- a/Dashboard/src/Pages/Incidents/View/Index.tsx +++ b/Dashboard/src/Pages/Incidents/View/Index.tsx @@ -7,7 +7,7 @@ import PageComponentProps from '../../PageComponentProps'; import SideMenu from './SideMenu'; import FieldType from 'CommonUI/src/Components/Types/FieldType'; import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; -import { IconProp } from 'CommonUI/src/Components/Icon/Icon'; +import IconProp from 'Common/Types/Icon/IconProp'; import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail'; import Navigation from 'CommonUI/src/Utils/Navigation'; import { JSONArray, JSONObject } from 'Common/Types/JSON'; @@ -208,14 +208,14 @@ const IncidentView: FunctionComponent = ( color={ ( item[ - 'currentIncidentState' + 'currentIncidentState' ] as JSONObject )['color'] as Color } text={ ( item[ - 'currentIncidentState' + 'currentIncidentState' ] as JSONObject )['name'] as string } @@ -244,14 +244,14 @@ const IncidentView: FunctionComponent = ( color={ ( item[ - 'incidentSeverity' + 'incidentSeverity' ] as JSONObject )['color'] as Color } text={ ( item[ - 'incidentSeverity' + 'incidentSeverity' ] as JSONObject )['name'] as string } @@ -305,7 +305,7 @@ const IncidentView: FunctionComponent = ( labels={ JSONFunctions.fromJSON( (item['labels'] as JSONArray) || - [], + [], Label ) as Array