TP-65635 | Anshuman | Merged with master
This commit is contained in:
Submodule RN-UI-LIB updated: 034483be95...15c42e0262
@@ -212,7 +212,6 @@ export const handleLogout = () => async (dispatch: AppDispatch) => {
|
||||
setGlobalUserData({
|
||||
token: '',
|
||||
agentId: '',
|
||||
deviceId: '',
|
||||
isImpersonated: false,
|
||||
selectedAgentId: '',
|
||||
});
|
||||
|
||||
@@ -287,7 +287,6 @@ const allCasesSlice = createSlice({
|
||||
} added to the visit plan`,
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (removedVisitedCasesLoanIds.length > 0) {
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_VISIT_PLAN_UPDATED, {
|
||||
|
||||
@@ -99,7 +99,8 @@ const CustomerProfile: React.FC<ICustomerProfile> = (props) => {
|
||||
DOCUMENT_TYPE.AADHAR_PHOTO,
|
||||
DOCUMENT_TYPE.AADHAR,
|
||||
DOCUMENT_TYPE.DRIVING_LICENSE,
|
||||
DOCUMENT_TYPE.PAN
|
||||
DOCUMENT_TYPE.PAN,
|
||||
DOCUMENT_TYPE.AUTHORIZATION_LETTER
|
||||
];
|
||||
updatedDocList.forEach((documentType) => {
|
||||
const document = findDocumentByDocumentType(docList, documentType);
|
||||
|
||||
@@ -14,6 +14,7 @@ import { useAppSelector } from '@hooks';
|
||||
import { navigateToScreen } from '@components/utlis/navigationUtlis';
|
||||
import LegalDocumentItem from './LegalDocumentItem';
|
||||
import Text from '@rn-ui-lib/components/Text';
|
||||
import { shareableAndDownloadableDoctypesMap } from './constants';
|
||||
|
||||
interface IDocumentDataItem {
|
||||
document: DocumentDetail;
|
||||
@@ -41,7 +42,7 @@ const DocumentDataItem: React.FC<IDocumentDataItem> = ({
|
||||
const { docContentType, url, documentRefId, docType, unSignedUri } = document || {};
|
||||
const isPDF = docContentType === DocumentContentType.PDF;
|
||||
const isVideo = docContentType === DocumentContentType.VIDEO;
|
||||
const isLDNLRNDoc = docType === DOCUMENT_TYPE.LDN || docType === DOCUMENT_TYPE.LRN;
|
||||
const isShareableAndDownloadableDoc = !!shareableAndDownloadableDoctypesMap.get(docType);
|
||||
|
||||
const handleOpenPdfPress = () => {
|
||||
navigateToScreen('pdfFull', {
|
||||
@@ -85,7 +86,7 @@ const DocumentDataItem: React.FC<IDocumentDataItem> = ({
|
||||
{document?.icon}
|
||||
<Text style={[GenericStyles.pl6]}>{document?.title}</Text>
|
||||
</View>
|
||||
{!isLDNLRNDoc ? (
|
||||
{!isShareableAndDownloadableDoc ? (
|
||||
<Pressable onPress={handleOpenPdfPress} style={[GenericStyles.ph16, GenericStyles.pt12]}>
|
||||
<Text style={styles.openPdfTxt}>Open PDF</Text>
|
||||
</Pressable>
|
||||
@@ -99,7 +100,6 @@ const DocumentDataItem: React.FC<IDocumentDataItem> = ({
|
||||
<Accordion
|
||||
key={documentRefId}
|
||||
accordionStyle={[
|
||||
GenericStyles.pt12,
|
||||
GenericStyles.br8,
|
||||
getShadowStyle(4),
|
||||
GenericStyles.ph0,
|
||||
@@ -114,7 +114,8 @@ const DocumentDataItem: React.FC<IDocumentDataItem> = ({
|
||||
GenericStyles.alignCenter,
|
||||
GenericStyles.row,
|
||||
GenericStyles.ph16,
|
||||
GenericStyles.mb12,
|
||||
GenericStyles.pv12,
|
||||
GenericStyles.br8
|
||||
]}
|
||||
>
|
||||
{document?.icon}
|
||||
@@ -170,7 +171,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
accordionExpandBtn: {
|
||||
fontSize: 13,
|
||||
marginTop: 8,
|
||||
marginTop: 20,
|
||||
fontWeight: '500',
|
||||
lineHeight: 20,
|
||||
color: COLORS.TEXT.BLUE,
|
||||
@@ -183,7 +184,7 @@ const styles = StyleSheet.create({
|
||||
height: 250,
|
||||
padding: 16,
|
||||
},
|
||||
rotateBtn: { transform: [{ rotateX: '180deg' }], marginTop: 0 },
|
||||
rotateBtn: { transform: [{ rotateX: '180deg' }], marginTop: 12 },
|
||||
pt0: { paddingTop: 0 },
|
||||
btnDivider: {
|
||||
width: 1,
|
||||
|
||||
@@ -21,7 +21,7 @@ interface IEmiDetailsSection {
|
||||
|
||||
const EmiDetailsSection = ({ caseId }: IEmiDetailsSection) => {
|
||||
const caseDetail = useAppSelector((state: RootState) => state.allCases?.caseDetails?.[caseId]) || {};
|
||||
const { loanAccountNumber, outstandingEmiDetails, totalOverdueAmount } = caseDetail;
|
||||
const { loanAccountNumber, totalOverdueEMICount, totalOverdueAmount } = caseDetail;
|
||||
|
||||
const [isLoading, setIsLoading] = React.useState<boolean>(false);
|
||||
const [emiData, setEmiData] = React.useState<IEmiItem | null>(null);
|
||||
@@ -110,7 +110,7 @@ const EmiDetailsSection = ({ caseId }: IEmiDetailsSection) => {
|
||||
<View style={GenericStyles.fill}>
|
||||
<View style={[GenericStyles.row, GenericStyles.pb4, GenericStyles.alignCenter]}>
|
||||
<Text style={[styles.yellowText, GenericStyles.fontSize16]}>
|
||||
{outstandingEmiDetails?.length}
|
||||
{totalOverdueEMICount || 0}
|
||||
</Text>
|
||||
<Text style={[GenericStyles.pl4, styles.yellowText, GenericStyles.fontSize12]}>
|
||||
Overdue EMI's
|
||||
|
||||
@@ -36,7 +36,7 @@ const LegalDocumentItem: React.FC<ILegalDocumentItem> = ({ document, lan, caseId
|
||||
const [pdfUrl, setPdfUrl] = useState(url);
|
||||
const disableDownload = isSharingOnWhatsapp || isValidating;
|
||||
const fileName = `${caseDetails?.customerName || ''}_${lan || ''}_${
|
||||
LegalDocumentFullName[docType] || LegalDocumentFullName.LDN
|
||||
LegalDocumentFullName[docType] || LegalDocumentFullName.DEFAULT
|
||||
}`;
|
||||
|
||||
useS3UrlCheck(
|
||||
|
||||
7
src/screens/caseDetails/constants.ts
Normal file
7
src/screens/caseDetails/constants.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { DOCUMENT_TYPE } from './interface';
|
||||
|
||||
export const shareableAndDownloadableDoctypesMap = new Map([
|
||||
[DOCUMENT_TYPE.LDN, true],
|
||||
[DOCUMENT_TYPE.LRN, true],
|
||||
[DOCUMENT_TYPE.AUTHORIZATION_LETTER, true],
|
||||
]);
|
||||
@@ -147,11 +147,14 @@ export enum DOCUMENT_TYPE {
|
||||
DRIVING_LICENSE = 'DRIVING_LICENSE',
|
||||
LDN = 'LDN',
|
||||
LRN = 'LRN',
|
||||
AUTHORIZATION_LETTER = 'AUTHORIZATION_LETTER'
|
||||
}
|
||||
|
||||
export enum LegalDocumentFullName {
|
||||
LDN = 'Loan_Demand_Notice',
|
||||
LRN = 'Loan_Recall_Notice',
|
||||
AUTHORIZATION_LETTER = 'Authorization_Letter',
|
||||
DEFAULT = 'Legal_Document',
|
||||
}
|
||||
|
||||
export enum DocumentTitle {
|
||||
@@ -164,6 +167,7 @@ export enum DocumentTitle {
|
||||
AADHAR = 'Aadhar',
|
||||
SELFIE = 'Selfie',
|
||||
OPTIMIZED_SELFIE = 'Selfie',
|
||||
AUTHORIZATION_LETTER = 'Authorization letter',
|
||||
}
|
||||
|
||||
export enum DocumentContentType {
|
||||
@@ -279,7 +283,7 @@ export interface CaseDetail {
|
||||
loanAccountNumber: string;
|
||||
documents?: IDocument[];
|
||||
interactionStatus: keyof typeof InteractionStatuses;
|
||||
outstandingEmiDetails?: IOutstandingEmiDetail[];
|
||||
totalOverdueEMICount: number;
|
||||
totalOverdueAmount?: number;
|
||||
disbursalDate?: string;
|
||||
tenureMonths?: number;
|
||||
|
||||
@@ -102,6 +102,17 @@ export const getDocumentDetails = async (document: IDocument) => {
|
||||
unSignedUri: document.unSignedUri,
|
||||
documentRefId: document.referenceId,
|
||||
};
|
||||
|
||||
case DOCUMENT_TYPE.AUTHORIZATION_LETTER:
|
||||
return {
|
||||
icon: <PdfIcon />,
|
||||
title: DocumentTitle.AUTHORIZATION_LETTER,
|
||||
docType: DOCUMENT_TYPE.AUTHORIZATION_LETTER,
|
||||
docContentType: docType,
|
||||
url: imageUrl,
|
||||
unSignedUri: document.unSignedUri,
|
||||
documentRefId: document.referenceId,
|
||||
};
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -28,6 +28,7 @@ import { logError } from '../../components/utlis/errorUtils';
|
||||
import GoogleIcon from '../../assets/icons/GoogleIcon';
|
||||
import { toast } from '../../../RN-UI-LIB/src/components/toast';
|
||||
import { ToastMessages } from '../allCases/constants';
|
||||
import { setGlobalUserData } from '@constants/Global';
|
||||
|
||||
interface ILoginForm {
|
||||
phoneNumber: string;
|
||||
@@ -51,11 +52,12 @@ function Login() {
|
||||
formState: { isValid },
|
||||
} = useForm<ILoginForm>();
|
||||
const dispatch = useAppDispatch();
|
||||
const { phoneNumber, OTPError, isLoading, otpToken } = useSelector((state: RootState) => ({
|
||||
const { phoneNumber, OTPError, isLoading, otpToken, deviceId } = useSelector((state: RootState) => ({
|
||||
phoneNumber: state.loginInfo.phoneNumber,
|
||||
otpToken: state.loginInfo.otpToken,
|
||||
OTPError: state.loginInfo.OTPError,
|
||||
isLoading: state.loginInfo.isLoading,
|
||||
deviceId: state.user?.deviceId,
|
||||
}));
|
||||
|
||||
useEffect(() => {
|
||||
@@ -66,6 +68,9 @@ function Login() {
|
||||
}, [isValid]);
|
||||
|
||||
useEffect(() => {
|
||||
if(deviceId){
|
||||
setGlobalUserData({deviceId});
|
||||
}
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.AV_LOGIN_SCREEN_LOAD);
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user