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

feat: ecosystem dashboard #316

Merged
merged 9 commits into from
Oct 6, 2023
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
31 changes: 31 additions & 0 deletions src/api/ecosystem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { axiosGet } from "../services/apiRequests"

import { apiRoutes } from "../config/apiRoutes";
import { getFromLocalStorage } from "./Auth";
import { storageKeys } from "../config/CommonConstant";

export const getEcosystem = async () => {

const url = `${apiRoutes.Ecosystem.root}`

const token = await getFromLocalStorage(storageKeys.TOKEN)

const config = {
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
}
}
const axiosPayload = {
url,
config
}

try {
return await axiosGet(axiosPayload);
}
catch (error) {
const err = error as Error
return err?.message
}
}
19 changes: 12 additions & 7 deletions src/api/ecosystems.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { axiosPost, axiosPut } from "../services/apiRequests"
import { axiosPost, axiosPut } from "../services/apiRequests"
import { apiRoutes } from "../config/apiRoutes";
import { getFromLocalStorage } from "./Auth";
import { storageKeys } from "../config/CommonConstant";

interface datapayload{
data:object
interface DataPayload {
name: string
description: string
logo: string
tags: string
orgId: number
userId: number
}
export const createEcosystems = async (Datapayload:datapayload) => {

const url = apiRoutes.ecosystem.create
const payload = Datapayload
export const createEcosystems = async (dataPayload: DataPayload) => {
const url = apiRoutes.Ecosystem.root
const payload = dataPayload
const token = await getFromLocalStorage(storageKeys.TOKEN)

const config = {
Expand All @@ -33,7 +38,7 @@ export const createEcosystems = async (Datapayload:datapayload) => {
}
}

export const updateEcosystem = async (data: object, orgId:string) => {
export const updateEcosystem = async (data: object, orgId: string) => {

const url = `${apiRoutes.organizations.update}/${orgId}`
const payload = data
Expand Down
2 changes: 1 addition & 1 deletion src/api/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export const createConnection = async (orgName: string) => {

export const getPublicOrganizations = async (pageNumber: number, pageSize: number, search :string) => {

const url = `${apiRoutes.public.organizations}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}`
const url = `${apiRoutes.Public.organizations}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}`

const config = {
headers: {
Expand Down
728 changes: 481 additions & 247 deletions src/app/SideBar.astro

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions src/assets/endorser-card.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/common/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ export enum IssueCredentialUserText {
done = 'Accepted',
abandoned = 'Declined'
}

export enum EcosystemRoles {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be specific like Ecosystem Member or Ecosystem Lead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved.

ecosystemMember = "Ecosystem Member",
ecosystemLead = "Ecosystem Lead"
}
Loading