mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-60839] Remove unused 'webapp/channels/src/components/admin_console/billing/payment_details.tsx' (#28652)
This commit is contained in:
parent
9d5993d89d
commit
3cd0f1bc1c
@ -1,64 +0,0 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
||||||
// See LICENSE.txt for license information.
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
|
||||||
import {useSelector} from 'react-redux';
|
|
||||||
|
|
||||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
|
||||||
import CardImage from 'components/payment_form/card_image';
|
|
||||||
|
|
||||||
import type {GlobalState} from 'types/store';
|
|
||||||
|
|
||||||
export interface PaymentDetailsProps {
|
|
||||||
children?: React.ReactNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
const PaymentDetails: React.FC<PaymentDetailsProps> = ({children}: PaymentDetailsProps) => {
|
|
||||||
const customerPaymentInfo = useSelector((state: GlobalState) => state.entities.cloud.customer);
|
|
||||||
|
|
||||||
if (!customerPaymentInfo?.payment_method && !customerPaymentInfo?.billing_address) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const address = customerPaymentInfo.billing_address;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='PaymentInfoDisplay__paymentInfo-text'>
|
|
||||||
<CardImage brand={customerPaymentInfo.payment_method.card_brand}/>
|
|
||||||
<div className='PaymentInfoDisplay__paymentInfo-cardInfo'>
|
|
||||||
<FormattedMarkdownMessage
|
|
||||||
id='admin.billing.payment_info.cardBrandAndDigits'
|
|
||||||
defaultMessage='{brand} ending in {digits}'
|
|
||||||
values={{
|
|
||||||
brand: customerPaymentInfo.payment_method.card_brand,
|
|
||||||
digits: customerPaymentInfo.payment_method.last_four,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<br/>
|
|
||||||
<FormattedMarkdownMessage
|
|
||||||
id='admin.billing.payment_info.cardExpiry'
|
|
||||||
defaultMessage='Expires {month}/{year}'
|
|
||||||
values={{
|
|
||||||
month: String(customerPaymentInfo.payment_method.exp_month).padStart(2, '0'),
|
|
||||||
year: String(customerPaymentInfo.payment_method.exp_year).padStart(2, '0'),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className='PaymentInfoDisplay__paymentInfo-addressTitle'>
|
|
||||||
<FormattedMessage
|
|
||||||
id='admin.billing.payment_info.billingAddress'
|
|
||||||
defaultMessage='Billing Address'
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className='PaymentInfoDisplay__paymentInfo-address'>
|
|
||||||
<div>{address.line1}</div>
|
|
||||||
{address.line2 && <div>{address.line2}</div>}
|
|
||||||
<div>{`${address.city}, ${address.state}, ${address.postal_code}`}</div>
|
|
||||||
<div>{address.country}</div>
|
|
||||||
</div>
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default PaymentDetails;
|
|
@ -323,9 +323,6 @@
|
|||||||
"admin.billing.history.title": "Billing History",
|
"admin.billing.history.title": "Billing History",
|
||||||
"admin.billing.history.total": "Total",
|
"admin.billing.history.total": "Total",
|
||||||
"admin.billing.history.transactions": "Transactions",
|
"admin.billing.history.transactions": "Transactions",
|
||||||
"admin.billing.payment_info.billingAddress": "Billing Address",
|
|
||||||
"admin.billing.payment_info.cardBrandAndDigits": "{brand} ending in {digits}",
|
|
||||||
"admin.billing.payment_info.cardExpiry": "Expires {month}/{year}",
|
|
||||||
"admin.billing.subscription.byClickingYouAgree": "By clicking {buttonContent}, you agree to the <linkAgreement>{legalText}</linkAgreement>",
|
"admin.billing.subscription.byClickingYouAgree": "By clicking {buttonContent}, you agree to the <linkAgreement>{legalText}</linkAgreement>",
|
||||||
"admin.billing.subscription.cancelSubscriptionSection.contactUs": "Contact Us",
|
"admin.billing.subscription.cancelSubscriptionSection.contactUs": "Contact Us",
|
||||||
"admin.billing.subscription.cancelSubscriptionSection.description": "At this time, deleting a workspace can only be done with the help of a customer support representative.",
|
"admin.billing.subscription.cancelSubscriptionSection.description": "At this time, deleting a workspace can only be done with the help of a customer support representative.",
|
||||||
|
Loading…
Reference in New Issue
Block a user