Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed whats new link #3141

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/config/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 9 additions & 9 deletions src/config/menu.ts
Original file line number Diff line number Diff line change
@@ -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'];
Expand Down Expand Up @@ -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') =>
Expand Down
10 changes: 4 additions & 6 deletions src/containers/Auth/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down Expand Up @@ -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(' ');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
20 changes: 13 additions & 7 deletions src/containers/Template/List/HSMList/HSMList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,19 @@ const mocks = [
...HSM_LIST,
];

const template = (mockQuery: any) => (
<MockedProvider mocks={[...mocks, mockQuery]} addTypename={false}>
<Router>
<HSMList />
</Router>
</MockedProvider>
);
const template = (mockQuery?: any) => {
let MOCKS = mocks;
if (mockQuery) {
MOCKS = [...MOCKS, mockQuery];
}
return (
<MockedProvider mocks={MOCKS} addTypename={false}>
<Router>
<HSMList />
</Router>
</MockedProvider>
);
};

vi.mock('common/notification', async (importOriginal) => {
const mod = await importOriginal<typeof import('common/notification')>();
Expand Down
Loading