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

Commit a8560b7

Browse files
committed
Update logic for handle manual
1 parent ff44501 commit a8560b7

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

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

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,13 +1438,31 @@ const Authenticate = (() => {
14381438
}
14391439
};
14401440

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

14501468
const initAuthentication = async () => {

0 commit comments

Comments
 (0)