8000 fix: page breaking issues by pranalidhanavade · Pull Request #688 · credebl/studio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: page breaking issues #688

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

Merged
merged 51 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8892e6e
WIP:resolve page breaking issue
shitrerohit May 14, 2024
0994b09
fix: changes in API handler function
pranalidhanavade May 16, 2024
bf8a027
- upgrade astro & related packages to latest
ajile-in May 16, 2024
482b21c
Working on fixing the data type related issues
shitrerohit May 17, 2024
a78c538
Merge branch 'develop' of https://github.com/credebl/studio into fix/…
pranalidhanavade May 17, 2024
d12ad9d
Merge branch 'fix/resolve-page-breaking-issues' of https://github.com…
pranalidhanavade May 17, 2024
dfe0e8a
fix: type errors for sign-up user and organization
pranalidhanavade May 17, 2024
8af2c57
fix: import for formik actions
pranalidhanavade May 19, 2024
5e7f9ca
fix: type errors from all components
pranalidhanavade May 20, 2024
3609041
fix: type errors, svg component errors and key prop erros
pranalidhanavade May 21, 2024
d23163e
fix: email and bulk issance Select component logic
pranalidhanavade May 22, 2024
757e0bb
fix: avatar component issues
pranalidhanavade May 23, 2024
2d4c092
fix:resolved conflicts
pranalidhanavade May 24, 2024
8ef43a8
fix: sonarlint issues and spinner issue
pranalidhanavade May 24, 2024
b02e8bb
fix: resolved conflicts
pranalidhanavade May 24, 2024
85decf8
fix: downgraded eslint version
pranalidhanavade May 24, 2024
89b3b35
fix: downgraded eslint version
pranalidhanavade May 24, 2024
17ac7a6
fix: uninstalled markdown version
pranalidhanavade May 24, 2024
87f7fd5
fix: astro package issue
pranalidhanavade May 24, 2024
b184ae2
fix: astro package issue
pranalidhanavade May 24, 2024
3437560
fix: astro package issue
pranalidhanavade May 24, 2024
5e1282f
fix: astro package issue
pranalidhanavade May 24, 2024
62b3434
fix: astro package issue
pranalidhanavade May 24, 2024
4483608
fix: astro package issue
pranalidhanavade May 24, 2024
275c864
fix: astro package issue
pranalidhanavade May 24, 2024
25c9117
fix: astro package issue
pranalidhanavade May 24, 2024
ccf13f6
fix: package dependency issue
pranalidhanavade May 27, 2024
dda772e
fix: package dependency issue
pranalidhanavade May 27, 2024
e0af267
fix: sonarlint issues
pranalidhanavade May 27, 2024
3e8fed9
fix: sonarlint issues
pranalidhanavade May 27, 2024
ff8ff1f
[Deno Deploy] Update .github/workflows/deploy.yml
deno-deploy[bot] May 27, 2024
5e273c4
fix: flowbite react package issues
pranalidhanavade May 27, 2024
bdd6ba4
Merge branch 'develop' of https://github.com/credebl/studio into fix/…
pranalidhanavade May 27, 2024
4d29619
Merge branch 'fix/resolve-page-breaking-issues' of https://github.com…
pranalidhanavade May 27, 2024
b32177a
fix: resolved passkey issue by downgrading package version
pranalidhanavade May 28, 2024
00f15d1
fix: resolved sonarcloud errors
pranalidhanavade May 28, 2024
0fb4833
fix deploy.yml changes
pranalidhanavade May 29, 2024
4d1368e
fix:css issues on endorsement popup
pranalidhanavade May 29, 2024
c0301f0
fix:css issues on endorsement popup
pranalidhanavade May 29, 2024
878a487
Merge branch 'develop' of https://github.com/credebl/studio into fix/…
pranalidhanavade May 29, 2024
733c37c
fix: type errors
pranalidhanavade May 29, 2024
43e73a6
fix: type errors
pranalidhanavade May 29, 2024
85e3749
[Deno Deploy] Update .github/workflows/deploy.yml
deno-deploy[bot] May 29, 2024
176ced1
fix: type errors
pranalidhanavade May 29, 2024
072b0a8
Merge branch 'fix/resolve-page-breaking-issues' of https://github.com…
pranalidhanavade May 29, 2024
5485693
fix: type errors
pranalidhanavade May 29, 2024
903e642
fix: endorsement pop-up css
pranalidhanavade May 29, 2024
4aea320
Merge branch 'develop' of https://github.com/credebl/studio into fix/…
pranalidhanavade May 29, 2024
1b29172
fix: endorsement pop-up css
pranalidhanavade May 29, 2024
6281c3d
fix: endorsement pop-up css
pranalidhanavade May 29, 2024
46ab999
fix: orgdropdown conditions
pranalidhanavade May 29, 2024
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
8 changes: 4 additions & 4 deletions src/commonComponents/AgentHealth.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { apiStatusCodes, storageKeys } from '../config/CommonConstant';
import { apiStatusCodes, storageKeys } from '../config/CommonConstant.ts';
import { useEffect, useState } from 'react';

import type { AxiosResponse } from 'axios';
import CustomSpinner from '../components/CustomSpinner';
import { getAgentHealth } from '../api/Agent';
import { getFromLocalStorage } from '../api/Auth';
import { getAgentHealth } from '../api/Agent.ts';
import { getFromLocalStorage } from '../api/Auth.ts';

interface Agent {
label: string;
Expand Down Expand Up @@ -51,7 +51,7 @@ const AgentHealth = () => {
{loader ? (
<div>
<CustomSpinner hideMessage={true} />
</div>
</div>
) : orgId && (
agentHealthDetails?.isInitialized ? (
<div className="w-fit flex shrink-0 items-center bg-green-100 text-green-800 text-xs font-medium rounded-full px-2 py-2 md:py-1 dark:bg-green-900 dark:text-green-300">
Expand Down
4 changes: 2 additions & 2 deletions src/commonComponents/EcosystemProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ const EcosystemProfileCard = ({getEndorsementListData}:IEndorsement) => {
>
<div className="mr-4">
{ecosystemDetails?.logoUrl ? (
<CustomAvatar size="60" src={ecosystemDetails?.logoUrl} />
<CustomAvatar size="80px" round src={ecosystemDetails?.logoUrl} />
) : (
<CustomAvatar size="70" name={ecosystemDetails?.name} />
<CustomAvatar size="80px" round name={ecosystemDetails?.name} />
)}
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/components/Authentication/SignUpUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Form,
Formik
} from 'formik';
import { checkUserExist, sendVerificationMail, setToLocalStorage } from '../../api/Auth.js';
import { checkUserExist, sendVerificationMail, setToLocalStorage } from '../../api/Auth.ts';
import { apiStatusCodes, storageKeys } from '../../config/CommonConstant.js';
import { useEffect, useState } from 'react';
import SignUpUserName from './SignUpUserName'
Expand Down
14 changes: 7 additions & 7 deletions src/components/Ecosystem/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import BreadCrumbs from '../BreadCrumbs';
import CustomAvatar from '../Avatar';
import CustomSpinner from '../CustomSpinner';
import MemberList from './MemberList';
import { getEcosystems, getEcosystemDashboard } from '../../api/ecosystem';
import { getEcosystems, getEcosystemDashboard } from '../../api/ecosystem.ts';
import { EmptyListMessage } from '../EmptyListComponent';
import CreateEcosystemOrgModal from '../CreateEcosystemOrgModal';
import { AlertComponent } from '../AlertComponent';
Expand All @@ -17,16 +17,16 @@ import {
getEcosystemId,
getOwnerAdminRole,
} from '../../config/ecosystem';
import type { ICheckEcosystem} from '../../config/ecosystem';
import type { ICheckEcosystem} from '../../config/ecosystem.ts';
import { Button, Dropdown } from 'flowbite-react';
import EditPopupModal from '../EditEcosystemOrgModal';
import { getFromLocalStorage, removeFromLocalStorage } from '../../api/Auth';
import { getUserEcosystemInvitations } from '../../api/invitations';
import { pathRoutes } from '../../config/pathRoutes';
import { getFromLocalStorage, removeFromLocalStorage } from '../../api/Auth.ts';
import { getUserEcosystemInvitations } from '../../api/invitations.ts';
import { pathRoutes } from '../../config/pathRoutes.ts';
import type { EcosystemDashboard } from '../organization/interfaces';
import { dateConversion } from '../../utils/DateConversion';
import { dateConversion } from '../../utils/DateConversion.ts';
import DateTooltip from '../Tooltip';
import DashboardCard from '../../commonComponents/DashboardCard';
import DashboardCard from '../../commonComponents/DashboardCard.tsx';
import { Roles } from '../../utils/enums/roles';

interface IRoleTablet {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Ecosystem/EcosystemSidebarOption.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
6D47 import { checkEcosystem } from '../../config/ecosystem';
import type { ICheckEcosystem } from '../../config/ecosystem';
import { pathRoutes } from '../../config/pathRoutes';
import { checkEcosystem } from '../../config/ecosystem.ts';
import type { ICheckEcosystem } from '../../config/ecosystem.ts';
import { pathRoutes } from '../../config/pathRoutes.ts';

const EcosystemSidebarOption = () => {
const [isEcosystemEnabled, setIsEcosystemEnabled] = useState(false);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Ecosystem/Endorsement/EndorsementPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ const EndorsementPopup = (props: {
<Button
=> props.closeModal()}

className="text-primary-700 hover:bg-secondary-700 bg-transparent ring-2 font-medium rounded-lg text-sm dark:text-white dark:hover:text-primary-700 enabled:hover:bg-cyan-100"
className="text-primary-700 hover:bg-secondary-700 bg-transparent dark:bg-transparent ring-2 font-medium rounded-lg text-sm dark:text-white dark:hover:text-primary-700 dark:enabled:hover:bg-cyan-100 enabled:hover:bg-cyan-100 "
>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
8 changes: 4 additions & 4 deletions src/components/Issuance/SchemaSelection.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import { setToLocalStorage } from "../../api/Auth";
import { storageKeys } from "../../config/CommonConstant";
import { pathRoutes } from "../../config/pathRoutes";
import SchemaList from "../Resources/Schema/SchemasList";
import { setToLocalStorage } from "../../api/Auth.ts";
import { storageKeys } from "../../config/CommonConstant.ts";
import { pathRoutes } from "../../config/pathRoutes.ts";
import SchemaList from "../Resources/Schema/SchemasList.tsx";

const SchemaSelection = () => {

Expand Down
6 changes: 3 additions & 3 deletions src/components/Profile/DisplayProfileImg.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useEffect, useState } from "react";

import CustomAvatar from '../Avatar/index'
import CustomAvatar from '../Avatar/index.tsx'
import type { IUserProfile } from "./interfaces";
import { getFromLocalStorage } from "../../api/Auth";
import { storageKeys } from "../../config/CommonConstant";
import { getFromLocalStorage } from "../../api/Auth.ts";
import { storageKeys } from "../../config/CommonConstant.ts";

const DisplayProfileImg = () => {
const [userObj, setUserObj] = useState<IUserProfile | null>(null)
Expand Down
6 changes: 3 additions & 3 deletions src/components/Profile/DisplayUser.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useEffect, useState } from "react";

import { TextTittlecase } from "../../utils/TextTransform";
import { getFromLocalStorage } from "../../api/Auth";
import { storageKeys } from "../../config/CommonConstant";
import { TextTittlecase } from "../../utils/TextTransform.ts";
import { getFromLocalStorage } from "../../api/Auth.ts";
import { storageKeys } from "../../config/CommonConstant.ts";

const DisplayUser = () => {

Expand Down
53 changes: 29 additions & 24 deletions src/components/organization/OrgDropDown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiStatusCodes, storageKeys } from '../../config/CommonConstant';
import { apiStatusCodes, storageKeys } from '../../config/CommonConstant.ts';
import {
getFromLocalStorage,
removeFromLocalStorage,
Expand All @@ -9,10 +9,10 @@ import '../../common/global.css';
import type { AxiosResponse } from 'axios';
import { BiChevronDown } from 'react-icons/bi';
import { AiOutlineSearch } from 'react-icons/ai';
import CustomAvatar from '../Avatar/index';
import CustomAvatar from '../Avatar/index.tsx';
import type { IOrgInfo, Organisation } from './interfaces';
import { getOrganizations } from '../../api/organization';
import { pathRoutes } from '../../config/pathRoutes';
import { getOrganizations } from '../../api/organization.ts';
import { pathRoutes } from '../../config/pathRoutes.ts';

const OrgDropDown = () => {
const [orgList, setOrgList] = useState<Organisation[]>([]);
Expand Down Expand Up @@ -48,25 +48,29 @@ const OrgDropDown = () => {
await removeFromLocalStorage(storageKeys.ECOSYSTEM_ID);
await removeFromLocalStorage(storageKeys.ECOSYSTEM_ROLE);

await setOrgRoleDetails(org);
const roles: string[] = org?.userOrgRoles?.length > 0 ? org?.userOrgRoles?.map(
(role) => role?.orgRole?.name,
) : [];
const { id, name, description, logoUrl } = org || {};
const orgInfo = {
name, description, logoUrl, roles, id
if (org) { // Added check
await setOrgRoleDetails(org);
const roles: string[] = org?.userOrgRoles?.length > 0 ? org?.userOrgRoles?.map((role) => role?.orgRole?.name)
: [];
const { id, name, description, logoUrl } = org || {};
const orgInfo = {
name, description, logoUrl, roles, id
};
await setToLocalStorage(storageKeys.ORG_INFO, orgInfo);
window.location.href = pathRoutes.organizations.dashboard;
}
await setToLocalStorage(storageKeys.ORG_INFO, orgInfo);
window.location.href = pathRoutes.organizations.dashboard;
};

const setOrgRoleDetails = async (org: Organisation) => {

await setToLocalStorage(storageKeys.ORG_ID, org?.id?.toString());
const roles: string[] = org?.userOrgRoles?.length > 0 ? org?.userOrgRoles?.map(
(role) => role?.orgRole?.name,
) : [];
await setToLocalStorage(storageKeys.ORG_ROLES, roles?.toString());
if (org && org.id !== undefined && org.id !== null) { // Added check
await setToLocalStorage(storageKeys.ORG_ID, org.id.toString());
}
const roles: string[] = org?.userOrgRoles?.length > 0
? org?.userOrgRoles.map((role) => role?.orgRole?.name)
: [];
if (roles.length > 0) { // Added check
await setToLocalStorage(storageKeys.ORG_ROLES, roles.toString());
}
};

const handleActiveOrg = async (organizations: Organisation[]) => {
Expand All @@ -76,26 +80,27 @@ const OrgDropDown = () => {

if (activeOrgDetails && Object.keys(activeOrgDetails)?.length > 0) {
setActiveOrg(activeOrgDetails);
} else {
} else if (organizations?.[0]) {
activeOrgDetails = organizations?.[0];
const roles: string[] = activeOrgDetails?.userOrgRoles.map(
const roles: string[] = activeOrgDetails?.userOrgRoles?.map(
(role: { orgRole: { name: string } }) => role.orgRole.name,
);
const { id, name, description, logoUrl } = organizations[0] || {};
const orgInfo = {
id, name, description, logoUrl, roles
}
};
await setToLocalStorage(storageKeys.ORG_INFO, orgInfo);

setActiveOrg(activeOrgDetails);

await setToLocalStorage(storageKeys.ORG_ROLES, roles.toString());

await setToLocalStorage(storageKeys.ORG_ROLES, roles?.toString());

}
if (activeOrgDetails) {
await setOrgRoleDetails(activeOrgDetails);
}
};

const redirectToCreateOrgModal = () => {
window.location.href = '/organizations?orgModal=true';
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/organization/users/EditUserRolesModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const EditUserRoleModal = (props: { openModal: boolean; user: User; setMessage:
>

<svg className="pr-2" xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="none" viewBox="0 0 18 18">
<path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 1v12l-4-2-4 2V1h8ZM3 17h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2Z"/>
<path stroke="#fff" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M13 1v12l-4-2-4 2V1h8ZM3 17h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2Z"/>
</svg>
Save
</Button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/organization/users/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Users = () => {
<ul className="pl-5 flex flex-wrap -mb-px text-sm font-medium text-center" id="myTab" role="tablist">
<li className="mr-2">
<button
className={`text-xl inline-block p-4 border-b-2 rounded-t-lg ${activeTab === 'users' ? 'text-blue-600 border-blue-600 dark:text-blue-500 dark:border-blue-500' : 'hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300'}`}
className={`text-xl inline-block p-4 border-b-2 rounded-t-lg ${activeTab === 'users' ? 'border-b-2 text-blue-600 border-blue-600 dark:text-blue-500 dark:border-blue-500' : 'border-blue-100 dark:text-gray-400 text-gray-500 hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 hover:border-gray-300 dark:border-transparent'}`}
id="users-tab"
=> setActiveTab('users')}
type="button"
Expand All @@ -36,7 +36,7 @@ const Users = () => {
</li>
<li className="mr-2">
<button
className={`text-xl inline-block p-4 border-b-2 rounded-t-lg ${activeTab === 'invitations' ? 'text-blue-600 border-blue-600 dark:text-blue-500 dark:border-blue-500' : 'hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300'}`}
className={`text-xl inline-block p-4 rounded-t-lg ${activeTab === 'invitations' ? 'border-b-2 text-blue-600 border-blue-600 dark:text-blue-500 dark:border-blue-500' : 'border-blue-100 dark:text-gray-400 text-gray-500 hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 dark:border-transparent'}`}
id="invitations-tab"
=> setActiveTab('invitations')}
type="button"
Expand Down
Loading
0