[INJIMOB-3188]: QR consent claims display text updates (#1922)

* [INJIMOB-3188]: QR consent claims display text updates

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-3188]: Remove field mapping and update display text based on field from api response

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

---------

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>
This commit is contained in:
balachandarg-tw
2025-04-30 15:01:27 +05:30
committed by GitHub
parent 91e74a75d0
commit a091a2c70a
4 changed files with 28 additions and 9 deletions

4
.env
View File

@@ -2,9 +2,9 @@
# eg . npm build android:newlogic --reset-cache
#MIMOTO_HOST=http://mock.mimoto.newlogic.dev
MIMOTO_HOST=https://api.qa-inji.mosip.net
MIMOTO_HOST=https://api.iom.mosip.net
ESIGNET_HOST=https://esignet.qa-inji.mosip.net
ESIGNET_HOST=https://esignet.iom.mosip.net
OBSRV_HOST = https://dataset-api.telemetry.mosip.net

View File

@@ -200,7 +200,7 @@ fileignoreconfig:
- filename: screens/Home/IntroSlidersScreen.tsx
checksum: e893b77e3858b9bbe623c0bbdac99f05760fcf8196af5710be177509bb4c207d
- filename: .env
checksum: f8375c44b0e70e691f942ea3323a0bf12cb0e2a7653a5551b34e2403a47119a8
checksum: bc67aefaf61251c4edd400d02a35dbcc27b8072f34231be4daa3144713d1e8a9
- filename: machines/VCItemMachine/VCItemMachine.typegen.ts
checksum: 850b5d02636bef9e286fc0fbc4ffffbd38068f332c319302a906496f4bc1c8a1
- filename: machines/VerifiableCredential/VCItemMachine/VCItemModel.ts

View File

@@ -9,6 +9,7 @@ import {Modal} from '../../components/ui/Modal';
import {QrLoginRef} from '../../machines/QrLogin/QrLoginMachine';
import {ScrollView} from 'react-native';
import {getClientNameForCurrentLanguage} from '../../i18n';
import {ACRONYMS} from '../../shared/constants';
export const QrConsent: React.FC<QrConsentProps> = props => {
const {t} = useTranslation('QrLogin');
@@ -60,9 +61,17 @@ export const QrConsent: React.FC<QrConsentProps> = props => {
<Text
color={Theme.Colors.Details}
style={Theme.TextStyles.base}>
{t(claim[0].toUpperCase() + claim.slice(1))
.split('_')
.join(' ')}
{t(
claim
.split('_')
.map(word => {
const lower = word.toLowerCase();
return ACRONYMS.has(lower)
? lower.toUpperCase()
: word.charAt(0).toUpperCase() + word.slice(1);
})
.join(' '),
)}
</Text>
<Text
color={Theme.Colors.GrayIcon}
@@ -93,9 +102,17 @@ export const QrConsent: React.FC<QrConsentProps> = props => {
<ListItem.Content>
<ListItem.Title>
<Text color={Theme.Colors.Details}>
{t(claim[0].toUpperCase() + claim.slice(1))
.split('_')
.join(' ')}
{t(
claim
.split('_')
.map(word => {
const lower = word.toLowerCase();
return ACRONYMS.has(lower)
? lower.toUpperCase()
: word.charAt(0).toUpperCase() + word.slice(1);
})
.join(' '),
)}
</Text>
</ListItem.Title>
</ListItem.Content>

View File

@@ -172,3 +172,5 @@ export const EXPIRED_VC_ERROR_CODE = 'ERR_VC_EXPIRED';
export const BASE_36 = 36;
export const DEFAULT_OTP = '111111';
export const ACRONYMS = new Set(['id']);