Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit cd9ec06

Browse files
Suisin/Changes on authenticate.js to show Manual Upload after Onfido fail 3 … (#7269)
* Changes on authenticate.js to show Manual Upload after Onfido fail 3 times * Update logic for handle manual * Fix: Displaying Pending Message when websocket network message is in pending --------- Co-authored-by: Matin shafiei <[email protected]>
1 parent ef449b2 commit cd9ec06

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

src/javascript/app/pages/user/account/authenticate.js

+25-6
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ const Authenticate = (() => {
13781378
case 'suspected':
13791379
case 'rejected':
13801380
if (Number(submissions_left) < 1) {
1381-
$('#limited_poi').setVisibility(1);
1381+
handleManual();
13821382
} else {
13831383
const maximum_reasons = rejected_reasons.slice(0, 3);
13841384
const has_minimum_reasons = rejected_reasons.length > 3;
@@ -1440,13 +1440,32 @@ const Authenticate = (() => {
14401440
}
14411441
};
14421442

1443-
const handleManual = () => {
1444-
$('#idv-container').setVisibility(0);
1443+
const handleManual = async () => {
1444+
account_status = await getAccountStatus();
1445+
const { manual } = account_status.authentication.identity.services;
1446+
const { status } = manual;
14451447
$('#authentication_tab').setVisibility(1);
1446-
$('#msg_personal_details').setVisibility(1);
14471448
TabSelector.updateTabDisplay();
1448-
$('#not_authenticated_uns').setVisibility(1);
1449-
initUnsupported();
1449+
1450+
switch (status){
1451+
case 'none':
1452+
$('#idv-container').setVisibility(0);
1453+
$('#msg_personal_details').setVisibility(1);
1454+
$('#not_authenticated_uns').setVisibility(1);
1455+
initUnsupported();
1456+
break;
1457+
case 'pending':
1458+
$('#idv-container').setVisibility(0);
1459+
$('#upload_complete').setVisibility(1);
1460+
break;
1461+
case 'rejected':
1462+
case 'suspected':
1463+
$('#idv-container').setVisibility(0);
1464+
$('#limited_poi').setVisibility(1);
1465+
break;
1466+
default:
1467+
break;
1468+
}
14501469
};
14511470

14521471
const initAuthentication = async () => {

0 commit comments

Comments
 (0)