@acuteinfo/common-screens 1.0.34 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +44 -41
- package/dist/index.js.map +1 -1
- package/dist/pages/types.d.ts +32 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -459,9 +459,7 @@ const OTPModel = ({ classes, OTPResendRequest, open, handleClose, loginState, Ve
|
|
|
459
459
|
// fullWidth
|
|
460
460
|
disabled: loginState.otploading, onClick: () => {
|
|
461
461
|
previousStep(false, "");
|
|
462
|
-
}, className: classes.otpButtons,
|
|
463
|
-
// color={"var(--theme-color3) "}
|
|
464
|
-
sx: {
|
|
462
|
+
}, className: classes.otpButtons, textColor: "var(--theme-color3)", sx: {
|
|
465
463
|
border: "var(--theme-color3)1px solid",
|
|
466
464
|
minWidth: "50%",
|
|
467
465
|
background: "var(--theme-color2)",
|
|
@@ -570,10 +568,10 @@ const OTPModelForm = ({ classes, OTPResendRequest, handleClose, loginState, Veri
|
|
|
570
568
|
gap: "10px",
|
|
571
569
|
margin: "42px 0 0 42px",
|
|
572
570
|
width: "60%",
|
|
573
|
-
}, children: [jsx(GradientButton, { fullWidth: true, disabled: loginState.otploading, onClick: handleCloseEvent, className: classes.otpButtons, starticon: "West", textColor: "var(--theme-
|
|
571
|
+
}, children: [jsx(GradientButton, { fullWidth: true, disabled: loginState.otploading, onClick: handleCloseEvent, className: classes.otpButtons, starticon: "West", textColor: "var(--theme-color3) !important", sx: {
|
|
574
572
|
"&:disabled": {
|
|
575
|
-
color: "var(-theme-
|
|
576
|
-
}
|
|
573
|
+
color: "var(-theme-color3) !important",
|
|
574
|
+
},
|
|
577
575
|
}, rotateIcon: "scale(1.4) rotateX(360deg)", style: {
|
|
578
576
|
border: "var(--theme-color3)1px solid",
|
|
579
577
|
// color: "var(--theme-color2)",
|
|
@@ -1243,42 +1241,47 @@ const AuthControllerWrapper = ({ bannerDetails, logoUrl, logoTitle, loginFn, vei
|
|
|
1243
1241
|
const verifyUsernamePassword = async (username, password) => {
|
|
1244
1242
|
if (Boolean(username) && Boolean(password)) {
|
|
1245
1243
|
dispath({ type: "inititatePasswordVerification" });
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1244
|
+
try {
|
|
1245
|
+
const { status = "", data = null, message = "", responseType = "", access_token = null } = await veirfyUsernameandPassword(username, password);
|
|
1246
|
+
if (status === "0" && responseType === "S") {
|
|
1247
|
+
dispath({
|
|
1248
|
+
type: "passwordRotation",
|
|
1249
|
+
payload: {
|
|
1250
|
+
username: username,
|
|
1251
|
+
access_token: access_token?.access_token || "",
|
|
1252
|
+
token_type: access_token?.token_type || "",
|
|
1253
|
+
},
|
|
1254
|
+
});
|
|
1255
|
+
setOpenPwdReset(true);
|
|
1256
|
+
}
|
|
1257
|
+
else if (status === "0") {
|
|
1258
|
+
dispath({
|
|
1259
|
+
type: "passwordVerificationSuccessful",
|
|
1260
|
+
payload: {
|
|
1261
|
+
transactionID: data?.REQUEST_CD,
|
|
1262
|
+
username: username,
|
|
1263
|
+
access_token: access_token?.access_token,
|
|
1264
|
+
token_type: access_token?.token_type,
|
|
1265
|
+
authType: data?.AUTH_TYPE,
|
|
1266
|
+
auth_data: [
|
|
1267
|
+
{
|
|
1268
|
+
company_ID: data?.BASE_COMP_CD ?? "",
|
|
1269
|
+
branch_cd: data?.BASE_BRANCH_CD,
|
|
1270
|
+
},
|
|
1271
|
+
],
|
|
1272
|
+
otpValidFor: data?.OTP_VALID,
|
|
1273
|
+
},
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
else {
|
|
1277
|
+
dispath({
|
|
1278
|
+
type: "passwordVerificationFailure",
|
|
1279
|
+
payload: { error: message, errorPassword: message },
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1276
1282
|
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
type: "passwordVerificationFailure",
|
|
1280
|
-
payload: { error: message, errorPassword: message },
|
|
1281
|
-
});
|
|
1283
|
+
catch (err) {
|
|
1284
|
+
console.log("Error occurred while verifying username and password!", err);
|
|
1282
1285
|
}
|
|
1283
1286
|
}
|
|
1284
1287
|
else if (!Boolean(username) && !Boolean(password)) {
|