NTP-21010 | telephone address api migration (#1038)
This commit is contained in:
@@ -113,8 +113,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
|
||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
|
||||
def VERSION_CODE = 223
|
||||
def VERSION_NAME = "2.16.0"
|
||||
def VERSION_CODE = 224
|
||||
def VERSION_NAME = "2.16.1"
|
||||
|
||||
android {
|
||||
namespace "com.avapp"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "AV_APP",
|
||||
"version": "2.16.0",
|
||||
"buildNumber": "223",
|
||||
"version": "2.16.1",
|
||||
"buildNumber": "224",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android:dev": "yarn move:dev && react-native run-android",
|
||||
|
||||
@@ -41,9 +41,21 @@ export const getAddressesGeolocation =
|
||||
};
|
||||
|
||||
export const addAddress =
|
||||
(payload: IAddAddressPayload, commonPayload: IAddressGeolocationPayload) =>
|
||||
(
|
||||
payload: IAddAddressPayload,
|
||||
commonPayload: IAddressGeolocationPayload,
|
||||
caseReferenceId: string,
|
||||
caseBusinessVertical: string
|
||||
) =>
|
||||
(dispatch: AppDispatch) => {
|
||||
const url = getApiUrl(ApiKeys.NEW_ADDRESS);
|
||||
const url = getApiUrl(
|
||||
ApiKeys.NEW_ADDRESS,
|
||||
{},
|
||||
{
|
||||
caseReferenceId,
|
||||
caseBusinessVertical,
|
||||
}
|
||||
);
|
||||
dispatch(setLoading(true));
|
||||
return axiosInstance
|
||||
.post(url, { ...payload, ...commonPayload })
|
||||
@@ -63,15 +75,21 @@ export const addAddress =
|
||||
};
|
||||
|
||||
export const getUngroupedAddress =
|
||||
(loanAccountNumber: string, caseReferenceId: string, caseBusinessVertical: string, includeFeedbacks = false) =>
|
||||
(
|
||||
loanAccountNumber: string,
|
||||
caseReferenceId: string,
|
||||
caseBusinessVertical: string,
|
||||
includeFeedbacks = false
|
||||
) =>
|
||||
(dispatch: AppDispatch) => {
|
||||
dispatch(setUngroupedAddressesLoading({ loanAccountNumber, isLoading: true }));
|
||||
const url = getApiUrl(
|
||||
ApiKeys.GET_UNGROUPED_ADDRESSES,
|
||||
{ },
|
||||
{ includeFeedbacks,
|
||||
{},
|
||||
{
|
||||
includeFeedbacks,
|
||||
caseReferenceId: caseReferenceId,
|
||||
caseBusinessVertical: caseBusinessVertical
|
||||
caseBusinessVertical: caseBusinessVertical,
|
||||
}
|
||||
);
|
||||
axiosInstance
|
||||
|
||||
@@ -110,7 +110,7 @@ const FiltersContainer: React.FC<FilterContainerProps> = (props) => {
|
||||
|
||||
const startCoachMark = async () => {
|
||||
if (onLayoutHandled.current) return;
|
||||
if (userId) {
|
||||
if (userId && copilot.totalStepsNumber > 0) {
|
||||
onLayoutHandled.current = true;
|
||||
showCoachMark(CoachMarkFeatures.CASE_STATUS_FILTERS, userId, serverTimestamp, copilot.start);
|
||||
}
|
||||
|
||||
@@ -16,11 +16,20 @@ interface IAddNewNumberApi {
|
||||
}
|
||||
export const addNewNumberApi = (
|
||||
data: IAddNewNumberApi,
|
||||
caseReferenceId: string,
|
||||
caseBusinessVertical: string,
|
||||
afterApiCallback?: GenericFunctionArgs,
|
||||
successCallbackFn?: GenericFunctionArgs
|
||||
) => {
|
||||
const { tag, source, number, customerReferenceId, caseId } = data;
|
||||
const url = getApiUrl(ApiKeys.TELEPHONES);
|
||||
const url = getApiUrl(
|
||||
ApiKeys.TELEPHONES,
|
||||
{},
|
||||
{
|
||||
caseReferenceId,
|
||||
caseBusinessVertical,
|
||||
}
|
||||
);
|
||||
const payload = [
|
||||
{
|
||||
number,
|
||||
|
||||
@@ -77,6 +77,8 @@ const AddNewNumber: React.FC<IAddNewNumber> = (props) => {
|
||||
...getValues(),
|
||||
caseId,
|
||||
},
|
||||
caseId,
|
||||
caseBusinessVertical,
|
||||
() => {
|
||||
setLoading(false);
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Dimensions, ScrollView, StyleSheet, Text, View } from 'react-native';
|
||||
import React, { useEffect } from 'react';
|
||||
import NavigationHeader from '../../../RN-UI-LIB/src/components/NavigationHeader';
|
||||
import { goBack, navigateToScreen } from '../../components/utlis/navigationUtlis';
|
||||
import { useAppDispatch } from '../../hooks';
|
||||
import { useAppDispatch, useAppSelector } from '../../hooks';
|
||||
import { COLORS } from '../../../RN-UI-LIB/src/styles/colors';
|
||||
import { GenericStyles } from '../../../RN-UI-LIB/src/styles';
|
||||
import { Controller, useForm } from 'react-hook-form';
|
||||
@@ -75,6 +75,9 @@ const NewAddressContainer: React.FC<INewAddressContainer> = ({ route: routeParam
|
||||
const [isPinCodeFieldInteracted, setIsPinCodeFieldInteracted] = React.useState<boolean>(false);
|
||||
const [validFields, setValidFields] = React.useState<ValidStateType>(initialValidState);
|
||||
const isValid = validFields.lineOne && validFields.lineTwo && validFields.pinCode;
|
||||
const caseBusinessVertical = useAppSelector(
|
||||
(state) => state?.allCases?.caseDetails?.[caseId]?.businessVertical
|
||||
);
|
||||
|
||||
|
||||
const handlePinCodeChange = (pinCode: string, onChange: (...event: any[]) => void) => {
|
||||
@@ -143,7 +146,7 @@ const NewAddressContainer: React.FC<INewAddressContainer> = ({ route: routeParam
|
||||
pinCode: getValues('pinCode'),
|
||||
};
|
||||
|
||||
dispatch(addAddress(payload, commonPayload))
|
||||
dispatch(addAddress(payload, commonPayload, caseId, caseBusinessVertical))
|
||||
.then((_) => {
|
||||
toast({
|
||||
type: 'info',
|
||||
|
||||
Reference in New Issue
Block a user