aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/provider-approval/provider-approval.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/pages/provider-approval/provider-approval.component.js')
-rw-r--r--ui/app/components/pages/provider-approval/provider-approval.component.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/ui/app/components/pages/provider-approval/provider-approval.component.js b/ui/app/components/pages/provider-approval/provider-approval.component.js
new file mode 100644
index 000000000..67e8bdd4c
--- /dev/null
+++ b/ui/app/components/pages/provider-approval/provider-approval.component.js
@@ -0,0 +1,35 @@
+import PageContainerContent from '../../page-container'
+import PropTypes from 'prop-types'
+import React, { Component } from 'react'
+
+export default class ProviderApproval extends Component {
+ static propTypes = {
+ approveProviderRequest: PropTypes.func,
+ origin: PropTypes.string,
+ rejectProviderRequest: PropTypes.func,
+ };
+
+ static contextTypes = {
+ t: PropTypes.func,
+ };
+
+ render () {
+ const { approveProviderRequest, origin, rejectProviderRequest } = this.props
+ return (
+ <PageContainerContent
+ title={this.context.t('providerAPIRequest')}
+ subtitle={this.context.t('reviewProviderRequest')}
+ contentComponent={(
+ <div className="provider_approval_content">
+ {this.context.t('providerRequestInfo')}
+ <div className="provider_approval_origin">{origin}</div>
+ </div>
+ )}
+ submitText={this.context.t('approve')}
+ cancelText={this.context.t('reject')}
+ onSubmit={() => { approveProviderRequest(origin) }}
+ onCancel={() => { rejectProviderRequest(origin) }}
+ onClose={() => { rejectProviderRequest(origin) }} />
+ )
+ }
+}