Skip to content

Commit

Permalink
[INJIMOB-780]: Implemented Pop up for downloading VC failure scenario (
Browse files Browse the repository at this point in the history
…mosip#1365)

* [INJIMOB-780]: Implemented Pop up for downloading VC failure scenario

Signed-off-by: Anil_Kumar_Majji <106086523+Anil-kumar-Majji@users.noreply.github.com>

* [INJIMOB-780] remove unused imports and constants

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>

---------

Signed-off-by: Anil_Kumar_Majji <106086523+Anil-kumar-Majji@users.noreply.github.com>
Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>
Co-authored-by: srikanth716 <srikanthsri7447@gmail.com>
  • Loading branch information
Anil-kumar-Majji and srikanth716 authored Apr 10, 2024
1 parent 06fff78 commit a732821
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,6 @@ fileignoreconfig:
checksum: 948efb4d61551e4f3cd9eb9913b927158daa5c3d16f49ad297e7cb63190bc023
- filename: machines/IssuersMachine.typegen.ts
checksum: 959fef1e51f0f3d5b12933f7b362e96401fb776ab12f0d13c6e542918b2ff255
- filename: screens/Home/MyVcsTab.tsx
checksum: 4e94bbbd0fe486108a4612e461ae1066fe0c2f44187549158d6369b51a1ba055
version: ""
1 change: 1 addition & 0 deletions locales/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
"generateVcFABDescription": "اضغط على \"+\" أدناه لتنزيل بطاقتك",
"downloadCard": "تحميل البطاقة",
"downloadingYourCard": "تنزيل بطاقتك ، قد يستغرق هذا ما يصل إلى 5 دقائق",
"downloadingVcFailed": "آسف! بسبب خطأ فني، لا يمكننا تنزيل بطاقتك الآن. الرجاء معاودة المحاولة في وقت لاحق.",
"activated": "يتم تمكين بيانات الاعتماد للمصادقة عبر الإنترنت.",
"noCardsTitle": "لم يتم العثور على بطاقات!",
"noCardsDescription": "عذرا، لم نتمكن من العثور على أي نتائج. الرجاء محاولة إدخال كلمة بحث أخرى",
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
"generateVcFABDescription": "Tap on \"+\" below to download your card",
"downloadCard": "Download Card",
"downloadingYourCard": "Downloading your card, this can take upto 5 minutes",
"downloadingVcFailed": "Sorry! Due to technical error we are unable to download your card now. Please try again later.",
"activated": "Credentials are enabled for online authentication.",
"noCardsTitle": "No Cards Found!",
"noCardsDescription": "Sorry, we couldn’t find any results. Please try entering another search keyword.",
Expand Down
1 change: 1 addition & 0 deletions locales/fil.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
"generateVcFABDescription": "Upang i-download ang iyong card i-tap ang + sa ibaba",
"downloadCard": "I-download ang Card",
"downloadingYourCard": "Ang pagda-download ng iyong card, maaari itong tumagal nang hanggang 5 minuto",
"downloadingVcFailed": "Paumanhin! Dahil sa teknikal na error hindi namin ma-download ang iyong card ngayon. Subukang muli mamaya.",
"activated": "Ang mga kredensyal ay pinagana para sa online na pagpapatotoo.",
"noCardsTitle": "Walang Nahanap na Mga Card!",
"noCardsDescription": "Paumanhin, wala kaming mahanap na anumang resulta. Pakisubukang maglagay ng ibang keyword sa paghahanap.",
Expand Down
1 change: 1 addition & 0 deletions locales/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
"generateVcDescription": "अपना कार्ड डाउनलोड करने के लिए नीचे डाउनलोड कार्ड टैप करें",
"generateVcFABDescription": "अपना कार्ड डाउनलोड करने के लिए नीचे + कार्ड टैप करें",
"downloadingYourCard": "आपका कार्ड डाउनलोड करने में 5 मिनट तक का समय लग सकता है",
"downloadingVcFailed": "क्षमा मांगना! तकनीकी त्रुटि के कारण हम अभी आपका कार्ड डाउनलोड नहीं कर पा रहे हैं। कृपया बाद में पुन: प्रयास करें।",
"activated": "ऑनलाइन प्रमाणीकरण के लिए क्रेडेंशियल सक्षम हैं।",
"noCardsTitle": "कोई कार्ड नहीं मिला!",
"noCardsDescription": "क्षमा करें, हमें कोई परिणाम नहीं मिला। कृपया कोई अन्य खोज कीवर्ड दर्ज करने का प्रयास करें।",
Expand Down
1 change: 1 addition & 0 deletions locales/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
"generateVcDescription": "ನಿಮ್ಮ ಕಾರ್ಡ್ ಅನ್ನು ಡೌನ್‌ಲೋಡ್ ಮಾಡಲು ಕೆಳಗಿನ ಡೌನ್‌ಲೋಡ್ ಕಾರ್ಡ್ ಅನ್ನು ಟ್ಯಾಪ್ ಮಾಡಿ",
"generateVcFABDescription": "ನಿಮ್ಮ ಕಾರ್ಡ್ ಡೌನ್ ಲೋಡ್ ಮಾಡಲು + ಕೆಳಗೆ ಟ್ಯಾಪ್ ಮಾಡಿ",
"downloadingYourCard": "ನಿಮ್ಮ ಕಾರ್ಡ್ ಅನ್ನು ಡೌನ್‌ಲೋಡ್ ಮಾಡಲಾಗುತ್ತಿದೆ, ಇದು 5 ನಿಮಿಷಗಳವರೆಗೆ ತೆಗೆದುಕೊಳ್ಳಬಹುದು",
"downloadingVcFailed": "ಕ್ಷಮಿಸಿ! ತಾಂತ್ರಿಕ ದೋಷದಿಂದಾಗಿ ನಿಮ್ಮ ಕಾರ್ಡ್ ಅನ್ನು ಈಗ ಡೌನ್‌ಲೋಡ್ ಮಾಡಲು ನಮಗೆ ಸಾಧ್ಯವಾಗುತ್ತಿಲ್ಲ. ದಯವಿಟ್ಟು ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ.",
"activated": "ಆನ್‌ಲೈನ್ ದೃಢೀಕರಣಕ್ಕಾಗಿ ರುಜುವಾತುಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ.",
"noCardsTitle": "ಯಾವುದೇ ಕಾರ್ಡ್‌ಗಳು ಕಂಡುಬಂದಿಲ್ಲ!",
"noCardsDescription": "ಕ್ಷಮಿಸಿ, ನಮಗೆ ಯಾವುದೇ ಫಲಿತಾಂಶಗಳನ್ನು ಕಂಡುಹಿಡಿಯಲಾಗಲಿಲ್ಲ. ದಯವಿಟ್ಟು ಇನ್ನೊಂದು ಹುಡುಕಾಟ ಕೀವರ್ಡ್ ನಮೂದಿಸಲು ಪ್ರಯತ್ನಿಸಿ.",
Expand Down
1 change: 1 addition & 0 deletions locales/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
"generateVcFABDescription": "உங்கள் அட்டை ஐப் பதிவிறக்க, கீழே உள்ள + என்பதைத் தட்டவும்",
"downloadCard": "கார்டைப் பதிவிறக்கவும்",
"downloadingYourCard": "உங்கள் கார்டைப் பதிவிறக்க, இதற்கு 5 நிமிடங்கள் வரை ஆகலாம்",
"downloadingVcFailed": "மன்னிக்கவும்! தொழில்நுட்பப் பிழை காரணமாக இப்போது உங்கள் கார்டைப் பதிவிறக்க முடியவில்லை. பிறகு முயற்சிக்கவும்.",
"activated": "ஆன்லைன் அங்கீகாரத்திற்காக நற்சான்றிதழ்கள் இயக்கப்பட்டுள்ளன.",
"noCardsTitle": "கார்டுகள் எதுவும் கிடைக்கவில்லை!",
"noCardsDescription": "மன்னிக்கவும், எந்த முடிவுகளையும் எங்களால் கண்டுபிடிக்க முடியவில்லை. தயவுசெய்து வேறு தேடல் குறிச்சொல்லை உள்ளிட முயற்சிக்கவும்.",
Expand Down
27 changes: 14 additions & 13 deletions screens/Home/MyVcsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,30 @@ import {HomeScreenTabProps} from './HomeScreen';
import {AddVcModal} from './MyVcs/AddVcModal';
import {GetVcModal} from './MyVcs/GetVcModal';
import {useTranslation} from 'react-i18next';
import {GET_INDIVIDUAL_ID} from '../../shared/constants';
import {
ErrorMessageOverlay,
MessageOverlay,
} from '../../components/MessageOverlay';
BANNER_TYPE_ERROR,
BANNER_TYPE_SUCCESS,
GET_INDIVIDUAL_ID,
} from '../../shared/constants';
import {MessageOverlay} from '../../components/MessageOverlay';
import {VcItemContainer} from '../../components/VC/VcItemContainer';
import {BannerNotification} from '../../components/BannerNotification';
import {
getErrorEventData,
sendErrorEvent,
} from '../../shared/telemetry/TelemetryUtils';
import {TelemetryConstants} from '../../shared/telemetry/TelemetryConstants';

import {Error} from '../../components/ui/Error';
import {useIsFocused} from '@react-navigation/native';
import {getVCsOrderedByPinStatus} from '../../shared/Utils';
import {SvgImage} from '../../components/ui/svg';
import {SearchBar} from '../../components/ui/SearchBar';
import {Icon} from 'react-native-elements';
import {VCMetadata} from '../../shared/VCMetadata';
import {BANNER_TYPE_SUCCESS} from '../../shared/constants';

export const MyVcsTab: React.FC<HomeScreenTabProps> = props => {
const {t} = useTranslation('MyVcsTab');
const controller = useMyVcsTab(props);
const storeErrorTranslationPath = 'errors.savingFailed';
const vcMetadataOrderedByPinStatus = getVCsOrderedByPinStatus(
controller.vcMetadatas,
);
Expand Down Expand Up @@ -208,6 +206,15 @@ export const MyVcsTab: React.FC<HomeScreenTabProps> = props => {
testId={'downloadingVcPopup'}
/>
)}
{controller.isSavingFailedInIdle && (
<BannerNotification
type={BANNER_TYPE_ERROR}
message={t('downloadingVcFailed')}
onClosePress={controller.DISMISS}
key={'downloadingVcFailedPopup'}
testId={'downloadingVcFailedPopup'}
/>
)}
<Column fill pY={2} pX={8}>
{vcMetadataOrderedByPinStatus.length > 0 && (
<React.Fragment>
Expand Down Expand Up @@ -374,12 +381,6 @@ export const MyVcsTab: React.FC<HomeScreenTabProps> = props => {
</Row>
</MessageOverlay>

<ErrorMessageOverlay
translationPath={'MyVcsTab'}
isVisible={controller.isSavingFailedInIdle}
error={storeErrorTranslationPath}
onDismiss={controller.DISMISS}
/>
<MessageOverlay
isVisible={controller.isBindingError}
title={controller.walletBindingError}
Expand Down

0 comments on commit a732821

Please sign in to comment.