TP-42461 | ack the comments | Aman Singh

This commit is contained in:
aman.singh
2024-01-04 20:55:49 +05:30
parent 9b2bcb0e66
commit 22a2736498
4 changed files with 18 additions and 35 deletions

View File

@@ -1,33 +1,34 @@
{
"project_info": {
"project_number": "136591056725",
"project_id": "field-verification-app",
"storage_bucket": "field-verification-app.appspot.com"
"project_number": "60755663443",
"project_id": "address-verification-app",
"storage_bucket": "address-verification-app.appspot.com",
"firebase_url": "https://address-verification-app-default-rtdb.firebaseio.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:136591056725:android:c454085ec6505cc01519dc",
"mobilesdk_app_id": "1:60755663443:android:4a948ee9d0b4e3098584a6",
"android_client_info": {
"package_name": "com.avapp"
}
},
"oauth_client": [
{
"client_id": "136591056725-ev8db4hrlud2m23n0o03or3cmmp3a3cq.apps.googleusercontent.com",
"client_id": "60755663443-40k0fbrbbqv4ci4hrjlbrphab5fj387b.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBL32d7WRJTcJawKjT1XCEcFbGGQ8wA6j8"
"current_key": "AIzaSyA70_d2M2ke-Mu0OHGZ6iZilBbD6A-_z0c"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "136591056725-ev8db4hrlud2m23n0o03or3cmmp3a3cq.apps.googleusercontent.com",
"client_id": "60755663443-40k0fbrbbqv4ci4hrjlbrphab5fj387b.apps.googleusercontent.com",
"client_type": 3
}
]

View File

@@ -27,6 +27,8 @@ interface IBlockerScreen {
const RETRY_GEOLOCATION_STEPS =
'Unable to retrieve location. Kindly follow the given steps and try again.';
const BUILD_FOR_FIELD = 'fieldAgents';
const BlockerScreen = (props: IBlockerScreen) => {
const [forceReinstallData, setForceReinstallData] = useState<UninstallInformation>();
const { isTimeSynced, isDeviceLocationEnabled } = useAppSelector(
@@ -34,9 +36,6 @@ const BlockerScreen = (props: IBlockerScreen) => {
);
const { isWifiOrCellularOn, appState } = useAppSelector((state) => state.metadata);
const appUpdate = useSelector((state: RootState) => {
return state.metadata?.appState;
});
const [shouldUpdate, setShouldUpdate] = useState<boolean>();
@@ -75,14 +74,14 @@ const BlockerScreen = (props: IBlockerScreen) => {
React.useEffect(() => {
if (!appUpdate) return;
if (!appState) return;
const buildToCompare = GLOBAL.BUILD_FLAVOUR;
if (!buildToCompare) return;
let flavorToUpdate: IAppState;
if(GLOBAL.BUILD_FLAVOUR.includes('fieldAgents')){
flavorToUpdate = appUpdate?.fieldAgent;
flavorToUpdate = appState?.fieldAgent;
}else {
flavorToUpdate = appUpdate?.telecallingAgents;
flavorToUpdate = appState?.telecallingAgents;
}
if (!flavorToUpdate) return;
@@ -93,7 +92,7 @@ const BlockerScreen = (props: IBlockerScreen) => {
} else {
setShouldUpdate(false);
}
}, [appUpdate]);
}, [appState]);
React.useEffect(() => {
const appStateChange = AppState.addEventListener('change', async (change) => {
@@ -123,10 +122,10 @@ const BlockerScreen = (props: IBlockerScreen) => {
const handleAppUpdate = () => {
let appUpdateUrl;
if(GLOBAL.BUILD_FLAVOUR.includes('fieldAgents')){
appUpdateUrl = appUpdate?.fieldAgent.currentProdAPK;
if(GLOBAL.BUILD_FLAVOUR.includes(BUILD_FOR_FIELD)){
appUpdateUrl = appState?.fieldAgent.currentProdAPK;
}else {
appUpdateUrl = appUpdate?.telecallingAgents.currentProdAPK;
appUpdateUrl = appState?.telecallingAgents.currentProdAPK;
}
if (appUpdateUrl) {
openApkDownloadLink(appUpdateUrl);

View File

@@ -68,11 +68,7 @@ export interface IUserSlice extends IUser {
agentAttendance: {
showAttendanceBanner: boolean;
attendanceDate: string;
};
buildInfo: {
buildNumber: string;
buildVersion: string;
};
}
}
const initialState: IUserSlice = {
@@ -94,10 +90,6 @@ const initialState: IUserSlice = {
showAttendanceBanner: true,
attendanceDate: '',
},
buildInfo: {
buildNumber: getBuildVersion(),
buildVersion: getAppVersion(),
}
};
export const userSlice = createSlice({
@@ -149,13 +141,6 @@ export const userSlice = createSlice({
},
setAgentAttendance: (state, action) => {
state.agentAttendance = action.payload;
},
setBuildInfo: (state, action) => {
const data = {
buildNumber: getBuildVersion(),
buildVersion: getAppVersion(),
}
state.buildInfo = data;
}
},
});
@@ -169,7 +154,6 @@ export const {
setIsExternalAgent,
setCaseSyncLock,
setAgentAttendance,
setBuildInfo
} = userSlice.actions;
export default userSlice.reducer;

View File

@@ -38,7 +38,6 @@ function AuthRouter() {
if (!deviceId) {
getUniqueId().then((id) => dispatch(setDeviceId(id)));
}
dispatch(setBuildInfo(null));
}, []);
const checkFormSubmission = async () => {