(activityDescription)
| 163 | } |
| 164 | |
| 165 | function getActivityCode(activityDescription) { |
| 166 | switch (activityDescription) { |
| 167 | case 'Login Success': |
| 168 | return 0 |
| 169 | case 'Logout Success': |
| 170 | return 1 |
| 171 | case 'Unknown User': |
| 172 | return -1 |
| 173 | case 'Incorrect Credential': |
| 174 | return -2 |
| 175 | case 'User Disabled': |
| 176 | return -3 |
| 177 | case 'No Assigned Workspace': |
| 178 | return -4 |
| 179 | default: |
| 180 | return -99 |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | useEffect(() => { |
| 185 | getLoginActivityApi.request({ |