-
Notifications
You must be signed in to change notification settings - Fork 2
PIN-8688 move 'how to get a voucher' section in developer tools #1584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
antofo
wants to merge
13
commits into
dev
Choose a base branch
from
feature/pin-8688-move-how-to-get-voucher
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
348bf03
feat(pin-8688): move how to get a voucher section in developer tools
54122cd
feat(pin-8688): minor fix drawer
688e8c4
feat(pin-8688): move client id state to context
6486918
feat(pin-8688): fix top page actions
e751a19
feat(pin-8688): add a test for voucher instructions
c3f6859
feat(pin-8688): adding more tests
d8cf877
feat(pin-8688): resolve conflicts
3a1f079
feat(pin-8688): refactor voucher simulation section using react hook …
antofo d457408
Merge branch 'dev' into feature/pin-8688-move-how-to-get-voucher
antofo 1ed9fe8
feat(pin-8688): minor fix on form reset
antofo c2bf31b
feat(pin-8688): minor fix on form reset
antofo d9b5375
Merge branch 'dev' into feature/pin-8688-move-how-to-get-voucher
antofo 5121bc6
feat(pin-8688): refactor VoucherInstructions based on suggestions
antofo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,6 @@ import { TabContext, TabList, TabPanel } from '@mui/lab' | |
| import { Alert, Button, Grid, Link, Stack, Tab, Typography } from '@mui/material' | ||
| import React from 'react' | ||
| import { useTranslation } from 'react-i18next' | ||
| import { VoucherInstructions } from './components/VoucherInstructions' | ||
| import { useClientKind } from '@/hooks/useClientKind' | ||
| import { ClientOperators } from './components/ClientOperators' | ||
| import { ClientPublicKeys } from './components/ClientPublicKeys' | ||
|
|
@@ -19,12 +18,15 @@ import SyncIcon from '@mui/icons-material/Sync' | |
| import { useDrawerState } from '@/hooks/useDrawerState' | ||
| import { SetClientAdminDrawer } from './components/SetClientAdminDrawer/SetClientAdminDrawer' | ||
| import { apiV2GuideLink } from '@/config/constants' | ||
| import { useNavigate } from '@/router' | ||
|
|
||
| const ConsumerClientManagePage: React.FC = () => { | ||
| const { t } = useTranslation('client', { keyPrefix: 'edit' }) | ||
| const { t: actionT } = useTranslation('common', { keyPrefix: 'actions' }) | ||
| const { clientId } = useParams<'SUBSCRIBE_CLIENT_EDIT' | 'SUBSCRIBE_INTEROP_M2M_CLIENT_EDIT'>() | ||
| const clientKind = useClientKind() | ||
| const { activeTab, updateActiveTab } = useActiveTab('voucher') | ||
| const { activeTab, updateActiveTab } = useActiveTab('clientOperators') | ||
| const navigate = useNavigate() | ||
|
|
||
| const { data: client, isLoading: isLoadingClient } = useQuery(ClientQueries.getSingle(clientId)) | ||
|
|
||
|
|
@@ -48,7 +50,17 @@ const ConsumerClientManagePage: React.FC = () => { | |
| <PageContainer | ||
| title={client?.name ?? ''} | ||
| description={client?.description} | ||
| topSideActions={actions} | ||
| topSideActions={[ | ||
| { | ||
| action: () => | ||
| navigate( | ||
| clientKind === 'API' ? 'SIMULATE_GET_VOUCHER_API' : 'SIMULATE_GET_VOUCHER_CONSUMER' | ||
| ), | ||
|
||
| label: actionT('simulateVoucher'), | ||
| variant: 'contained', | ||
| }, | ||
| ...actions, | ||
| ]} | ||
| isLoading={isLoadingClient} | ||
| backToAction={{ | ||
| label: t('actions.backToClientsLabel'), | ||
|
|
@@ -103,15 +115,10 @@ const ConsumerClientManagePage: React.FC = () => { | |
| )} | ||
| <TabContext value={activeTab}> | ||
| <TabList onChange={updateActiveTab} aria-label={t('tabs.ariaLabel')} variant="fullWidth"> | ||
| <Tab label={t('tabs.voucher')} value="voucher" /> | ||
| <Tab label={t('tabs.clientOperators')} value="clientOperators" /> | ||
| <Tab label={t('tabs.publicKeys')} value="publicKeys" /> | ||
| </TabList> | ||
|
|
||
| <TabPanel value="voucher"> | ||
| <VoucherInstructions clientId={clientId} /> | ||
| </TabPanel> | ||
|
|
||
| <TabPanel value="clientOperators"> | ||
| <ClientOperators clientId={clientId} /> | ||
| </TabPanel> | ||
|
|
||
129 changes: 0 additions & 129 deletions
129
...Page/components/VoucherInstructions/VoucherInstructionsStep1/VoucherInstructionsStep1.tsx
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
src/pages/ConsumerSimulateGetVoucherPage/ConsumerSimulateGetVoucherPage.page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { PageContainer } from '@/components/layout/containers' | ||
| import { useTranslation } from 'react-i18next' | ||
| import { VoucherInstructions } from './components/VoucherInstructions' | ||
|
|
||
| const ConsumerDebugVoucherPage: React.FC = () => { | ||
| const { t } = useTranslation('pages', { keyPrefix: 'consumerSimulateGetVoucher' }) | ||
|
|
||
| return ( | ||
| <PageContainer title={t('title')} description={t('description')}> | ||
| <VoucherInstructions /> | ||
| </PageContainer> | ||
| ) | ||
| } | ||
|
|
||
| export default ConsumerDebugVoucherPage |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.