diff --git a/src/action/profileActions.ts b/src/action/profileActions.ts index 0a17114b..fd84e8a2 100644 --- a/src/action/profileActions.ts +++ b/src/action/profileActions.ts @@ -51,6 +51,8 @@ export const getSelfieDocument = () => (dispatch: AppDispatch) => { approvalStatus, }) ); + } else { + dispatch(setApprovalStatus(ImageApprovalStatus.REJECTED)); } }) .catch((err) => { diff --git a/src/screens/Profile/index.tsx b/src/screens/Profile/index.tsx index 7cf9d7af..c64e4339 100644 --- a/src/screens/Profile/index.tsx +++ b/src/screens/Profile/index.tsx @@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react'; import { Alert, Linking, - Modal, Pressable, ScrollView, StyleSheet, @@ -53,7 +52,6 @@ const Profile: React.FC = () => { completedList: completeCasesList, caseDetails, supportLink, - isUploadingImage, pendingCases, } = useAppSelector((state: RootState) => ({ originalImageUri: state.profile.originalImageUri, @@ -130,7 +128,7 @@ const Profile: React.FC = () => { approvalStatus === ImageApprovalStatus.APPROVED; return ( - + { - + Help @@ -194,7 +192,13 @@ const Profile: React.FC = () => { {numberOfCompletedCases ? completeCasesList.slice(0, 2).map((caseItem) => { const caseDetailItem = caseDetails[caseItem.caseReferenceId] as CaseDetail; - return ; + return ( + + ); }) : null} {numberOfCompletedCases > 2 ? ( diff --git a/src/screens/notifications/NotificationItem.tsx b/src/screens/notifications/NotificationItem.tsx index 1dbfd4e4..2f77ebec 100644 --- a/src/screens/notifications/NotificationItem.tsx +++ b/src/screens/notifications/NotificationItem.tsx @@ -144,11 +144,11 @@ const NotificationItem: React.FC = ({ data }) => { > {notificationIcon} - - {templateName === NotificationTypes.VISIT_PLAN_UPDATE_NOTIFICATION_TEMPLATE - ? 'New visit plan created!' - : customerName} - + {customerName ? ( + + {customerName} + + ) : null} {getTimeDifference(scheduledAt)} diff --git a/src/screens/notifications/NotificationTemplate.tsx b/src/screens/notifications/NotificationTemplate.tsx index 20710f3c..4aebb7be 100644 --- a/src/screens/notifications/NotificationTemplate.tsx +++ b/src/screens/notifications/NotificationTemplate.tsx @@ -1,9 +1,10 @@ -import { StyleSheet } from 'react-native'; +import { View } from 'react-native'; import React from 'react'; import Text from '../../../RN-UI-LIB/src/components/Text'; import { INotification } from './NotificationItem'; import { NotificationTypes } from './constants'; import { formatAmount } from '../../../RN-UI-LIB/src/utlis/amount'; +import Heading from '../../../RN-UI-LIB/src/components/Heading'; interface INotificationTemplateProps { data: INotification; @@ -167,27 +168,40 @@ const NotificationTemplate: React.FC = ({ data }) => ); case NotificationTypes.VISIT_PLAN_UPDATE_NOTIFICATION_TEMPLATE: return ( - - for {date} with {caseCount} cases - + + + New visit plan created! + + + for {date} with {caseCount} cases + + ); case NotificationTypes.AGENT_ID_APPROVED_TEMPLATE: return ( - - Your ID card has been approved. Head over to profile to checkout your ID card - + + + ID card approved! + + + Your ID card has been approved. Head over to profile to checkout your ID card + + ); case NotificationTypes.AGENT_ID_REJECTED_TEMPLATE: return ( - - Your ID card has been rejected. Please upload your picture again for the ID card - + + + ID card rejected! + + + Your ID card has been rejected. Please upload your picture again for the ID card + + ); default: return New notification; } }; -const styles = StyleSheet.create({}); - export default NotificationTemplate; diff --git a/src/screens/notifications/constants.tsx b/src/screens/notifications/constants.tsx index 2d71d384..8f5e715c 100644 --- a/src/screens/notifications/constants.tsx +++ b/src/screens/notifications/constants.tsx @@ -1,3 +1,5 @@ +import IDCardApproveIcon from '../../../RN-UI-LIB/src/Icons/IDCardApproveIcon'; +import IDCardRejectIcon from '../../../RN-UI-LIB/src/Icons/IDCardRejectIcon'; import NewAddressIcon from '../../../RN-UI-LIB/src/Icons/NewAddressIcon'; import NewTelephoneIcon from '../../../RN-UI-LIB/src/Icons/NewTelephoneIcon'; import NotificationIcon from '../../../RN-UI-LIB/src/Icons/NotificationIcon'; @@ -50,8 +52,8 @@ export const NotificationIconsMap = { [NotificationTypes.LONGHORN_ALERTS_NEW_ENQUIRY]: , [NotificationTypes.REVISIT_SCHEDULED_NOTIFICATION_TEMPLATE]: , [NotificationTypes.VISIT_PLAN_UPDATE_NOTIFICATION_TEMPLATE]: , - [NotificationTypes.AGENT_ID_APPROVED_TEMPLATE]: , - [NotificationTypes.AGENT_ID_REJECTED_TEMPLATE]: , + [NotificationTypes.AGENT_ID_APPROVED_TEMPLATE]: , + [NotificationTypes.AGENT_ID_REJECTED_TEMPLATE]: , }; export enum WidgetStatus {