TP-31863 | fixes
This commit is contained in:
@@ -51,6 +51,8 @@ export const getSelfieDocument = () => (dispatch: AppDispatch) => {
|
||||
approvalStatus,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
dispatch(setApprovalStatus(ImageApprovalStatus.REJECTED));
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
@@ -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 (
|
||||
<View style={[GenericStyles.fill, GenericStyles.whiteBackground]}>
|
||||
<View style={[GenericStyles.fill]}>
|
||||
<NavigationHeader
|
||||
title={name}
|
||||
subTitle={phoneNumber}
|
||||
@@ -158,9 +156,9 @@ const Profile: React.FC = () => {
|
||||
<TouchableOpacity
|
||||
activeOpacity={0.7}
|
||||
onPress={helpButtonClickHandler}
|
||||
style={[GenericStyles.row, GenericStyles.centerAlignedRow, GenericStyles.p16]}
|
||||
style={[GenericStyles.row, GenericStyles.p16]}
|
||||
>
|
||||
<QuestionMarkIcon />
|
||||
<QuestionMarkIcon style={GenericStyles.mt4} />
|
||||
<Text style={[GenericStyles.whiteText, styles.helpText, GenericStyles.fw500]}>
|
||||
Help
|
||||
</Text>
|
||||
@@ -194,7 +192,13 @@ const Profile: React.FC = () => {
|
||||
{numberOfCompletedCases
|
||||
? completeCasesList.slice(0, 2).map((caseItem) => {
|
||||
const caseDetailItem = caseDetails[caseItem.caseReferenceId] as CaseDetail;
|
||||
return <CaseItem caseDetailObj={caseDetailItem} isCompleted={true} />;
|
||||
return (
|
||||
<CaseItem
|
||||
key={caseItem.caseReferenceId}
|
||||
caseDetailObj={caseDetailItem}
|
||||
isCompleted={true}
|
||||
/>
|
||||
);
|
||||
})
|
||||
: null}
|
||||
{numberOfCompletedCases > 2 ? (
|
||||
|
||||
@@ -144,11 +144,11 @@ const NotificationItem: React.FC<INotificationProps> = ({ data }) => {
|
||||
>
|
||||
{notificationIcon}
|
||||
<View style={[GenericStyles.pl16, GenericStyles.flex80]}>
|
||||
<Heading type="h5" dark>
|
||||
{templateName === NotificationTypes.VISIT_PLAN_UPDATE_NOTIFICATION_TEMPLATE
|
||||
? 'New visit plan created!'
|
||||
: customerName}
|
||||
</Heading>
|
||||
{customerName ? (
|
||||
<Heading type="h5" dark>
|
||||
{customerName}
|
||||
</Heading>
|
||||
) : null}
|
||||
<NotificationTemplate data={data} />
|
||||
<Text small>{getTimeDifference(scheduledAt)}</Text>
|
||||
</View>
|
||||
|
||||
@@ -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<INotificationTemplateProps> = ({ data }) =>
|
||||
);
|
||||
case NotificationTypes.VISIT_PLAN_UPDATE_NOTIFICATION_TEMPLATE:
|
||||
return (
|
||||
<Text light>
|
||||
for <Text dark>{date}</Text> with <Text dark>{caseCount}</Text> cases
|
||||
</Text>
|
||||
<View>
|
||||
<Heading type="h5" dark>
|
||||
New visit plan created!
|
||||
</Heading>
|
||||
<Text light>
|
||||
for <Text dark>{date}</Text> with <Text dark>{caseCount}</Text> cases
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
case NotificationTypes.AGENT_ID_APPROVED_TEMPLATE:
|
||||
return (
|
||||
<Text light>
|
||||
Your ID card has been approved. Head over to profile to checkout your ID card
|
||||
</Text>
|
||||
<View>
|
||||
<Heading type="h5" dark>
|
||||
ID card approved!
|
||||
</Heading>
|
||||
<Text light>
|
||||
Your ID card has been approved. Head over to profile to checkout your ID card
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
case NotificationTypes.AGENT_ID_REJECTED_TEMPLATE:
|
||||
return (
|
||||
<Text light>
|
||||
Your ID card has been rejected. Please upload your picture again for the ID card
|
||||
</Text>
|
||||
<View>
|
||||
<Heading type="h5" dark>
|
||||
ID card rejected!
|
||||
</Heading>
|
||||
<Text light>
|
||||
Your ID card has been rejected. Please upload your picture again for the ID card
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
default:
|
||||
return <Text>New notification</Text>;
|
||||
}
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({});
|
||||
|
||||
export default NotificationTemplate;
|
||||
|
||||
@@ -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]: <NotificationIcon />,
|
||||
[NotificationTypes.REVISIT_SCHEDULED_NOTIFICATION_TEMPLATE]: <NotificationIcon />,
|
||||
[NotificationTypes.VISIT_PLAN_UPDATE_NOTIFICATION_TEMPLATE]: <NotificationVisitPlanIcon />,
|
||||
[NotificationTypes.AGENT_ID_APPROVED_TEMPLATE]: <NotificationIcon />,
|
||||
[NotificationTypes.AGENT_ID_REJECTED_TEMPLATE]: <NotificationIcon />,
|
||||
[NotificationTypes.AGENT_ID_APPROVED_TEMPLATE]: <IDCardApproveIcon />,
|
||||
[NotificationTypes.AGENT_ID_REJECTED_TEMPLATE]: <IDCardRejectIcon />,
|
||||
};
|
||||
|
||||
export enum WidgetStatus {
|
||||
|
||||
Reference in New Issue
Block a user