diff --git a/src/config/logs.ts b/src/config/logs.ts
index ef1bbc050..af24a043b 100644
--- a/src/config/logs.ts
+++ b/src/config/logs.ts
@@ -8,10 +8,11 @@ const setLogs = (message: any, type: string) => {
const userId = getUserSession('id');
let logger: any;
+ console.log(LOGFLARE_API, LOGFLARE_SOURCE, 'ss');
if (LOGFLARE_API && LOGFLARE_SOURCE) {
- const apiKey = LOGFLARE_API;
const sourceToken = LOGFLARE_SOURCE;
+ const apiKey = LOGFLARE_API;
// create pino-logflare stream
const stream = createWriteStream({
apiKey,
diff --git a/src/config/menu.ts b/src/config/menu.ts
index fb6f1a6c2..3ca3334d2 100644
--- a/src/config/menu.ts
+++ b/src/config/menu.ts
@@ -1,5 +1,5 @@
import { organizationHasDynamicRole } from 'common/utils';
-import { ANALYTICS_URL, GLIFIC_DOCS_URL, NEW_UI_BLOG } from 'config';
+import { ANALYTICS_URL, GLIFIC_DOCS_URL } from 'config';
import { getOrganizationServices } from 'services/AuthService';
const allRoles = ['Staff', 'Manager', 'Admin', 'Dynamic', 'Glific_admin'];
@@ -279,14 +279,14 @@ const menus = (): Menu[] => [
roles: staffLevel,
},
- {
- title: "What's new",
- path: '/changelog',
- url: NEW_UI_BLOG,
- icon: 'new',
- type: 'sideDrawer',
- roles: staffLevel,
- },
+ // {
+ // title: "What's new",
+ // path: '/changelog',
+ // url: NEW_UI_BLOG,
+ // icon: 'new',
+ // type: 'sideDrawer',
+ // roles: staffLevel,
+ // },
];
export const getMenus = (menuType = 'sideDrawer', role = 'Staff') =>
diff --git a/src/containers/Auth/Login/Login.tsx b/src/containers/Auth/Login/Login.tsx
index 6caaa0ead..7ea83dd04 100644
--- a/src/containers/Auth/Login/Login.tsx
+++ b/src/containers/Auth/Login/Login.tsx
@@ -41,8 +41,7 @@ export const Login = () => {
// get the information on current user
const [getCurrentUser, { data: userData, error: userError }] = useLazyQuery(GET_CURRENT_USER);
- const [getOrganizationServices, { data: organizationServicesData }] =
- useLazyQuery(GET_ORGANIZATION_SERVICES);
+ const [getOrganizationServices, { data: organizationServicesData }] = useLazyQuery(GET_ORGANIZATION_SERVICES);
useEffect(() => {
if (userData && organizationServicesData) {
@@ -59,10 +58,7 @@ export const Login = () => {
const userAccessRoles = accessRoles.map((role: any) => role.label);
// check for user role none or empty
- if (
- (userAccessRoles.includes('None') && userAccessRoles.length === 1) ||
- userAccessRoles.length === 0
- ) {
+ if ((userAccessRoles.includes('None') && userAccessRoles.length === 1) || userAccessRoles.length === 0) {
accessDenied();
} else {
// needed to redirect after login
@@ -127,6 +123,8 @@ export const Login = () => {
setAuthSession(response.data.data);
})
.catch((error) => {
+ console.log(error);
+
if (error?.response?.status === 403) {
setErrorMessage(error?.response?.data?.error);
setAuthError(' ');
diff --git a/src/containers/Organization/Onboarding/Steps/PaymentDetails.tsx b/src/containers/Organization/Onboarding/Steps/PaymentDetails.tsx
index 80512c1ef..cc342b24e 100644
--- a/src/containers/Organization/Onboarding/Steps/PaymentDetails.tsx
+++ b/src/containers/Organization/Onboarding/Steps/PaymentDetails.tsx
@@ -32,7 +32,10 @@ export const PaymentDetails = ({ handleStepChange, saveData }: FormStepProps) =>
designation: Yup.string()
.required(t('Designation is required.'))
.max(25, t('Please enter not more than 25 characters')),
- phone: Yup.string().required(t('Phone number is required.')).min(7, t('Enter a valid phone number.')),
+ phone: Yup.string()
+ .required(t('Phone number is required.'))
+ .min(7, t('Enter a valid phone number.'))
+ .matches(/^\+\d{1,4}\d{7,15}$/, 'Please enter a valid phone number.'),
email: Yup.string().required(t('Email is required.')).email(t('Enter a valid email.')),
});
const initialFormValues: any = {
diff --git a/src/containers/Template/List/HSMList/HSMList.test.tsx b/src/containers/Template/List/HSMList/HSMList.test.tsx
index b7116f167..0408464c8 100644
--- a/src/containers/Template/List/HSMList/HSMList.test.tsx
+++ b/src/containers/Template/List/HSMList/HSMList.test.tsx
@@ -63,13 +63,19 @@ const mocks = [
...HSM_LIST,
];
-const template = (mockQuery: any) => (
-
-
-
-
-
-);
+const template = (mockQuery?: any) => {
+ let MOCKS = mocks;
+ if (mockQuery) {
+ MOCKS = [...MOCKS, mockQuery];
+ }
+ return (
+
+
+
+
+
+ );
+};
vi.mock('common/notification', async (importOriginal) => {
const mod = await importOriginal();