diff --git a/.circleci/config.yml b/.circleci/config.yml index 379740beb9be..496e5c988c09 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,10 +13,10 @@ executors: aliases: - &restore_cache restore_cache: - key: dependencies-{{ .Branch }}-{{ checksum "package-lock.json" }}-4 + key: dependencies-{{ .Branch }}-{{ checksum "package-lock.json" }}-5 - &save_cache save_cache: - key: dependencies-{{ .Branch }}-{{ checksum "package-lock.json" }}-4 + key: dependencies-{{ .Branch }}-{{ checksum "package-lock.json" }}-5 paths: - ~/mattermost/mattermost-webapp/node_modules diff --git a/components/admin_console/billing/billing_history.tsx b/components/admin_console/billing/billing_history.tsx index 179633ddbe10..624db239e23a 100644 --- a/components/admin_console/billing/billing_history.tsx +++ b/components/admin_console/billing/billing_history.tsx @@ -8,6 +8,8 @@ import FormattedAdminHeader from 'components/widgets/admin_console/formatted_adm import FormattedMarkdownMessage from 'components/formatted_markdown_message'; import noBillingHistoryGraphic from 'images/no_billing_history_graphic.svg'; +import {CloudLinks} from 'utils/constants'; + import './billing_history.scss'; type Props = { @@ -27,9 +29,9 @@ const noBillingHistorySection = ( /> ( -
-
- -
-
- -
-
- -
- -
-); - -const privateCloudCard = () => ( -
-
-
- -
-
- -
- -
-
- -
-
-); +import './billing_subscriptions.scss'; const WARNING_THRESHOLD = 3; @@ -105,6 +53,8 @@ const BillingSubscriptions: React.FC = () => { const getCategory = makeGetCategory(); const preferences = useSelector((state) => getCategory(state, Preferences.ADMIN_CLOUD_UPGRADE_PANEL)); + const contactSalesLink = useSelector((state: GlobalState) => getCloudContactUsLink(state, InquiryType.Sales)); + useEffect(() => { getCloudSubscription()(dispatch, store.getState()); getCloudProducts()(dispatch, store.getState()); @@ -144,6 +94,66 @@ const BillingSubscriptions: React.FC = () => { ])); }; + const upgradeMattermostCloud = () => ( +
+
+ +
+
+ +
+
+ +
+ +
+ ); + + const privateCloudCard = () => ( +
+
+
+ +
+
+ +
+
+
+
+ +
+
+ ); + return (
+ + + )} diff --git a/components/purchase_modal/index.ts b/components/purchase_modal/index.ts index 5a5ab8b86851..4537a4e9e69b 100644 --- a/components/purchase_modal/index.ts +++ b/components/purchase_modal/index.ts @@ -3,27 +3,24 @@ import {connect} from 'react-redux'; import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux'; +import {Stripe} from '@stripe/stripe-js'; import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {GenericAction, ActionFunc} from 'mattermost-redux/types/actions'; -import {Stripe} from '@stripe/stripe-js'; - import {getCloudProducts} from 'mattermost-redux/actions/cloud'; +import {getClientConfig} from 'mattermost-redux/actions/general'; -import { - getClientConfig, -} from 'mattermost-redux/actions/general'; - +import {GlobalState} from 'types/store'; import {BillingDetails} from 'types/cloud/sku'; import {isModalOpen} from 'selectors/views/modals'; +import {getCloudContactUsLink, InquiryType} from 'selectors/cloud'; + import {ModalIdentifiers} from 'utils/constants'; import {closeModal} from 'actions/views/modals'; import {completeStripeAddPaymentMethod} from 'actions/cloud'; -import {GlobalState} from 'types/store'; - import PurchaseModal from './purchase_modal'; function mapStateToProps(state: GlobalState) { @@ -31,6 +28,8 @@ function mapStateToProps(state: GlobalState) { show: isModalOpen(state, ModalIdentifiers.CLOUD_PURCHASE), products: state.entities.cloud!.products, isDevMode: getConfig(state).EnableDeveloper === 'true', + contactSupportLink: getCloudContactUsLink(state, InquiryType.Technical), + contactSalesLink: getCloudContactUsLink(state, InquiryType.Sales), }; } type Actions = { diff --git a/components/purchase_modal/purchase_modal.tsx b/components/purchase_modal/purchase_modal.tsx index 3255c3f564b5..2434e1b61886 100644 --- a/components/purchase_modal/purchase_modal.tsx +++ b/components/purchase_modal/purchase_modal.tsx @@ -20,12 +20,14 @@ import RootPortal from 'components/root_portal'; import FullScreenModal from 'components/widgets/modals/full_screen_modal'; import {areBillingDetailsValid, BillingDetails} from 'types/cloud/sku'; import {getNextBillingDate} from 'utils/utils'; +import {CloudLinks} from 'utils/constants'; import PaymentForm from '../payment_form/payment_form'; +import ProcessPaymentSetup from './process_payment_setup'; + import './purchase.scss'; import 'components/payment_form/payment_form.scss'; -import ProcessPaymentSetup from './process_payment_setup'; const stripePromise = loadStripe(STRIPE_PUBLIC_KEY); @@ -33,6 +35,8 @@ type Props = { show: boolean; isDevMode: boolean; products?: Dictionary; + contactSupportLink: string; + contactSalesLink: string; actions: { closeModal: () => void; getCloudProducts: () => void; @@ -113,7 +117,9 @@ export default class PurchaseModal extends React.PureComponent { { /> {'\u00A0'} - + {
{'Need other billing options?'}