Skip to content

Commit

Permalink
Merge pull request #551 from credebl/merge-dev-to-qa
Browse files Browse the repository at this point in the history
merge: devlop to QA
  • Loading branch information
sanjay-k1910 authored Feb 6, 2024
2 parents 6c6d1ae + 8b2c9b3 commit 43768e4
Show file tree
Hide file tree
Showing 44 changed files with 758 additions and 660 deletions.
5 changes: 3 additions & 2 deletions src/app/SideBar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,14 @@ import { pathRoutes } from '../config/pathRoutes';
height="24"
viewBox="0 0 24 24"
fill="none"
class="text-[#6B7280] group-hover:text-gray-700 dark:group-hover:text-white"
>
<path
d="M3.44444 21C2.77222 21 2.19676 20.7745 1.71806 20.3235C1.23935 19.8725 1 19.3303 1 18.697V6.60606C1 5.97273 1.23935 5.43056 1.71806 4.97955C2.19676 4.52854 2.77222 4.30303 3.44444 4.30303H8.57778C8.84259 3.61212 9.28565 3.05556 9.90694 2.63333C10.5282 2.21111 11.2259 2 12 2C12.7741 2 13.4718 2.21111 14.0931 2.63333C14.7144 3.05556 15.1574 3.61212 15.4222 4.30303H20.5556C21.2278 4.30303 21.8032 4.52854 22.2819 4.97955C22.7606 5.43056 23 5.97273 23 6.60606V18.697C23 19.3303 22.7606 19.8725 22.2819 20.3235C21.8032 20.7745 21.2278 21 20.5556 21H3.44444ZM3.17284 18.8889H20.8323V6.22222H3.17284V18.8889ZM12 5.74242C12.2648 5.74242 12.4838 5.66086 12.6569 5.49773C12.8301 5.3346 12.9167 5.12828 12.9167 4.87879C12.9167 4.62929 12.8301 4.42298 12.6569 4.25985C12.4838 4.09672 12.2648 4.01515 12 4.01515C11.7352 4.01515 11.5162 4.09672 11.3431 4.25985C11.1699 4.42298 11.0833 4.62929 11.0833 4.87879C11.0833 5.12828 11.1699 5.3346 11.3431 5.49773C11.5162 5.66086 11.7352 5.74242 12 5.74242Z"
fill="#6B7280"></path>
fill="currentColor"></path>
<path
d="M10.0312 17.5469L9.14062 16.0469L7.45312 15.6719L7.61719 13.9375L6.46875 12.625L7.61719 11.3125L7.45312 9.57812L9.14062 9.20312L10.0312 7.70312L11.625 8.38281L13.2187 7.70312L14.1094 9.20312L15.7969 9.57812L15.6328 11.3125L16.7812 12.625L15.6328 13.9375L15.7969 15.6719L14.1094 16.0469L13.2187 17.5469L11.625 16.8672L10.0312 17.5469ZM10.4297 16.3516L11.625 15.8359L12.8437 16.3516L13.5 15.2266L14.7891 14.9219L14.6719 13.6094L15.5391 12.625L14.6719 11.6172L14.7891 10.3047L13.5 10.0234L12.8203 8.89844L11.625 9.41406L10.4062 8.89844L9.75 10.0234L8.46094 10.3047L8.57812 11.6172L7.71094 12.625L8.57812 13.6094L8.46094 14.9453L9.75 15.2266L10.4297 16.3516ZM11.1328 14.2891L13.7812 11.6406L13.125 10.9609L11.1328 12.9531L10.125 11.9688L9.46875 12.625L11.1328 14.2891Z"
fill="#6B7280"></path>
fill="currentColor"></path>
</svg>

<span class="ml-2">Verify</span>
Expand Down
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
4 changes: 4 additions & 0 deletions src/common/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,7 @@ ul.timelinestatic {
.select__input-container {
width: 1px;
}

.email-bulk-issuance .select__single-value{
width: calc(100% - 15px) !important;
}
23 changes: 12 additions & 11 deletions src/commonComponents/EcosystemProfileCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'
import { Card } from 'flowbite-react';
import type { IEcosystem } from '../components/Ecosystem/interfaces';
import type { IEndorsement, IEcosystem } from '../components/Ecosystem/interfaces';
import { getFromLocalStorage, removeFromLocalStorage, setToLocalStorage } from '../api/Auth';
import { apiStatusCodes, storageKeys } from '../config/CommonConstant';
import type { AxiosResponse } from 'axios';
Expand All @@ -11,7 +11,8 @@ import CustomSpinner from '../components/CustomSpinner';
import { pathRoutes } from '../config/pathRoutes';
import { EmptyListMessage } from '../components/EmptyListComponent';

const EcosystemProfileCard = () => {

const EcosystemProfileCard = ({getEndorsementListData}:IEndorsement) => {
const [ecosystemDetails, setEcosystemDetails] = useState<IEcosystem | null>();
const [ecosystemList, setEcosystemList] = useState<IEcosystem[] | null>();
const [loading, setLoading] = useState<boolean>();
Expand All @@ -26,8 +27,9 @@ const EcosystemProfileCard = () => {
const response = await getEcosystems(id);
setLoading(false)
const { data } = response as AxiosResponse;
if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
setEcosystemList(data?.data)
if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
setEcosystemList(data?.data.ecosystemDetails
)
const ecosystemData = data?.data?.ecosystemDetails?.find((item: { id: string }) => item.id === ecosystemId);
if (ecosystemData) {
setEcosystemId(ecosystemData?.id)
Expand Down Expand Up @@ -66,7 +68,7 @@ const EcosystemProfileCard = () => {
const handleSelectEcosystem = async (e: { target: { value: string; }; }) => {
await fetchEcosystemDetails(e.target.value)
await setToLocalStorage(storageKeys.ECOSYSTEM_ID, e.target.value);
window.location.reload()
await getEndorsementListData()
}


Expand All @@ -90,28 +92,27 @@ const EcosystemProfileCard = () => {
)}
</div>

<div className="w-full sm:w-100/22rem min-w-[12rem]">
<div className="w-full sm:w-100/22rem min-w-[12rem] word-break-word">
<h3 className="mb-1 text-xl font-bold text-gray-900 dark:text-white">
{ecosystemDetails?.name}
</h3>
<div className="flex items-center">
<span className="dark:text-white">Role: </span>{' '}
<RoleTablet role={ecosystemDetails?.role || ''} />
<RoleTablet role={ecosystemDetails?.role ?? ''} />
</div>
</div>


<div className="inline-flex items-end ml-auto flex-col">
{
Boolean(ecosystemOptions && ecosystemOptions.length > 0) &&
Boolean(ecosystemOptions && ecosystemOptions?.length > 0) &&
<select
className="mb-4 bg-gray-50 sm:min-w-[244px] border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
onChange={handleSelectEcosystem}
>
<option selected>Select Ecosystem</option>
{
ecosystemOptions && ecosystemOptions.length > 0 && ecosystemOptions.map(item => (
<option key={item.id} value={item.id}>{item.name}</option>
ecosystemOptions && ecosystemOptions?.map(item => (
<option key={item?.id} value={item?.id}>{item?.name}</option>
))
}
</select>
Expand Down
9 changes: 7 additions & 2 deletions src/commonComponents/EditPopup.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Label, Modal } from 'flowbite-react';
import { Field, Form, Formik } from 'formik';
import React, { useEffect, useState } from 'react';
import * as yup from 'yup';
import { useRef } from 'react';

const EditModal = (props: {
openModal: boolean;
Expand All @@ -11,6 +11,7 @@ const EditModal = (props: {
interface nameValue {
name: string;
}
const formikRef = useRef<any>(null);

const saveName = (values: nameValue) => {
props.onSucess(values.name);
Expand All @@ -21,11 +22,15 @@ const EditModal = (props: {
<Modal
size="lg"
show={props.openModal}
onClose={() => props.closeModal(false)}
onClose={() => {
formikRef.current.resetForm();
props.closeModal(false);
}}
>
<Modal.Header>Edit Device</Modal.Header>
<div className="relative p-2 text-center bg-white rounded-lg shadow dark:bg-gray-800 pr-5 pl-5">
<Formik
innerRef={formikRef}
initialValues={{
name: '',
}}
Expand Down
Loading

0 comments on commit 43768e4

Please sign in to comment.