8000 fix: create schema access to member from dashboard by 16-karan · Pull Request #555 · credebl/studio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: create schema access to member from dashboard #555

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 2 commits into from
Feb 5, 2024
Merged
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/common/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export enum OrganizationRoles {
organizationMember = "member",
organizationOwner = "owner",
organizationIssuer = "issuer",
organizationVerifier = "verifier"
organizationVerifier = "verifier",
organizationAdmin= 'admin'
}

export enum PlatformRoles {
Expand Down
51 changes: 39 additions & 12 deletions src/components/User/UserDashBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,19 @@ const UserDashBoard = () => {
return (
<div className="text-left text-xs">
<p className="text-base">What is Schema?</p>
Schema is a machine-readable semantic
<br />structure, a predefined data template
<br />that provides a standard format for the
<br />digital credential contents. Schemas
<br />define attributes that are used in one
<br />or more Credential Definitions.
<br />Schemas are stored on the ledger.
Schema is a machine-readable semantic
<br />
structure, a predefined data template
<br />
that provides a standard format for the
<br />
digital credential contents. Schemas
<br />
define attributes that are used in one
<br />
or more Credential Definitions.
<br />
Schemas are stored on the ledger.
</div>
);
};
Expand Down Expand Up @@ -729,7 +735,24 @@ const UserDashBoard = () => {
=> {
goToOrgSchema(org, org.id, org.roles);
}}
className="p-1 rounded-md"
className={`p-1 rounded-md ${
organizationsList[index].userOrgRoles[0]
.orgRole.name !==
OrganizationRoles.organizationOwner ||
organizationsList[index].userOrgRoles[0]
.orgRole.name ===
OrganizationRoles.organizationAdmin
? 'cursor-not-allowed opacity-50'
: ''
}`}
disabled={
organizationsList[index].userOrgRoles[0]
.orgRole.name !==
OrganizationRoles.organizationOwner ||
organizationsList[index].userOrgRoles[0]
.orgRole.name ===
OrganizationRoles.organizationAdmin
}
>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -865,7 +888,9 @@ const UserDashBoard = () => {
</>
) : (
<div className="flex items-center justify-center dark:text-gray-400 text-gray-500 min-h-[195px]">
<p className='mb-8'>You have no organizations created or joined</p>
<p className="mb-8">
You have no organizations created or joined
</p>
</div>
)}
</>
Expand Down Expand Up @@ -960,7 +985,7 @@ const UserDashBoard = () => {
</div>
) : (
<div className="flex items-center justify-center h-full text-gray-500 dark:text-gray-400">
<p className='mb-8'>You have no schemas created</p>
<p className="mb-8">You have no schemas created</p>
</div>
)}
</>
Expand Down Expand Up @@ -1145,7 +1170,9 @@ const UserDashBoard = () => {
</>
) : (
<div className="flex items-center justify-center h-full text-gray-500 dark:text-gray-400">
<p className='mb-8'>You have no ecosystems created or joined</p>
<p className="mb-8">
You have no ecosystems created or joined
</p>
</div>
)}
</>
Expand Down Expand Up @@ -1230,7 +1257,7 @@ const UserDashBoard = () => {
</>
) : (
<div className="flex items-center justify-center h-full text-gray-500 dark:text-gray-400">
<p className='mb-8'>You have no cred-defs created</p>
<p className="mb-8">You have no cred-defs created</p>
</div>
)}{' '}
</>
Expand Down
0