diff --git a/commit/api/commit_project/commit_project.py b/commit/api/commit_project/commit_project.py
index 66000ab..4b45ff5 100644
--- a/commit/api/commit_project/commit_project.py
+++ b/commit/api/commit_project/commit_project.py
@@ -11,7 +11,7 @@ def get_project_list_with_branches():
"name", 'organization_name', 'github_org', 'image', 'about', 'creation'])
for organization in organizations:
projects = frappe.get_all("Commit Project", filters={
- "org": organization.get("name")}, fields=["name", "display_name", "repo_name", "app_name", "image", "banner_image", "path_to_folder", 'description'], order_by="modified asc")
+ "org": organization.get("name")}, fields=["name", "display_name", "repo_name", "app_name", "image", "banner_image", "path_to_folder", 'description'], order_by="creation desc")
# organization["projects"] = projects
for project in projects:
branches = frappe.get_all("Commit Project Branch", filters={"project": project.get(
diff --git a/dashboard/src/components/features/meta_apps/YourApps.tsx b/dashboard/src/components/features/meta_apps/YourApps.tsx
index 2a62b28..401e4e7 100644
--- a/dashboard/src/components/features/meta_apps/YourApps.tsx
+++ b/dashboard/src/components/features/meta_apps/YourApps.tsx
@@ -1,14 +1,14 @@
import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader"
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
-import { CardDescription } from "@/components/ui/card"
-import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
+import { Card, CardContent, CardDescription, CardFooter, CardTitle } from "@/components/ui/card"
import { AvatarImage } from "@radix-ui/react-avatar"
import { useFrappeGetCall } from "frappe-react-sdk"
import { useMemo } from "react"
import { BsDatabase } from "react-icons/bs"
import { useNavigate } from "react-router-dom"
import { YourAppAPIExplorer } from "./YourAppAPIExplorer"
+import { Badge } from "@/components/ui/badge"
export interface AppsData {
app_name: string
@@ -39,9 +39,8 @@ export const YourApps = () => {
if (data && data.message) {
return (
-
-
-
+
+
-
-
- {data.message.map((app: AppsData) => {
- return
- })}
-
+
+ {data.message.map((app: AppsData) => {
+ return
+ })}
)
@@ -66,45 +63,27 @@ export const YourApps = () => {
}
-export const ProjectCard = ({ app }: { app: AppsData }) => {
+const AppsCard = ({ app }: { app: AppsData }) => {
const appNameInitials = useMemo(() => {
return app.app_name.split('_').map((word) => word[0]).join('').toUpperCase()
}, [app])
return (
-
-
-
-
-
-
- {appNameInitials}
-
-
-
-
{app.app_name}
-
- by
-
- {app.app_publisher}
-
-
{app.app_description}
-
-
-
-
-
-
+
+
+
+
+ {appNameInitials}
+
+ {app.app_name}
+
+ {app.app_description}
+
+
+
+ {app.app_publisher}
+
+
)
}
\ No newline at end of file
diff --git a/dashboard/src/components/features/projects/Org/OrgList.tsx b/dashboard/src/components/features/projects/Org/OrgComponent.tsx
similarity index 70%
rename from dashboard/src/components/features/projects/Org/OrgList.tsx
rename to dashboard/src/components/features/projects/Org/OrgComponent.tsx
index 23fe5d4..212959d 100644
--- a/dashboard/src/components/features/projects/Org/OrgList.tsx
+++ b/dashboard/src/components/features/projects/Org/OrgComponent.tsx
@@ -5,7 +5,8 @@ import { KeyedMutator } from "swr";
import { ProjectData } from "../Projects";
import DeleteOrgModal from "./DeleteOrgModal";
import { AlertDialog, AlertDialogTrigger } from "@/components/ui/alert-dialog";
-import { ProjectCard } from "../Projects/ProjectsList";
+import { ProjectCard } from "../Projects/ProjectCard";
+
interface OrgComponentProps {
org: ProjectData, mutate: KeyedMutator<{ message: ProjectData[]; }>
@@ -20,21 +21,21 @@ export const OrgComponent = ({ org, mutate }: OrgComponentProps) => {
{org.organization_name}
{isCreateAccess &&
-
-
-
-
+
+
+
+
}
- {org.projects.map((project => {
+ {org.projects.map((project) => {
return (
)
}
- ))}
+ )}
)
diff --git a/dashboard/src/components/features/projects/Projects.tsx b/dashboard/src/components/features/projects/Projects.tsx
index 98c98c0..46746d7 100644
--- a/dashboard/src/components/features/projects/Projects.tsx
+++ b/dashboard/src/components/features/projects/Projects.tsx
@@ -1,42 +1,49 @@
-import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader"
-import { Button } from "@/components/ui/button"
-import { Dialog, DialogTrigger } from "@/components/ui/dialog"
-import { CommitProject } from "@/types/commit/CommitProject"
-import { useFrappeGetCall } from "frappe-react-sdk"
-import { BsDatabase } from "react-icons/bs"
-import { ViewERDDialogContent } from "./ViewERDAppDialog"
-import { isSystemManager } from "@/utils/roles"
-import { CommitProjectBranch } from "@/types/commit/CommitProjectBranch"
-import { OrgComponent } from "./Org/OrgList"
-import { DropdownMenuDemo } from "./AddMenuButton"
-import { APIExplorer } from "./APIExplorer"
+import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader";
+import { Button } from "@/components/ui/button";
+import { Dialog, DialogTrigger } from "@/components/ui/dialog";
+import { CommitProject } from "@/types/commit/CommitProject";
+import { useFrappeGetCall } from "frappe-react-sdk";
+import { BsDatabase } from "react-icons/bs";
+import { ViewERDDialogContent } from "./ViewERDAppDialog";
+import { isSystemManager } from "@/utils/roles";
+import { CommitProjectBranch } from "@/types/commit/CommitProjectBranch";
+import { DropdownMenuDemo } from "./AddMenuButton";
+import { APIExplorer } from "./APIExplorer";
+import ProjectCard from "./Projects/ProjectCard";
+
export interface ProjectWithBranch extends CommitProject {
- branches: CommitProjectBranch[]
+ branches: CommitProjectBranch[];
}
export interface ProjectData extends CommitProjectBranch {
- projects: ProjectWithBranch[]
- organization_name: string
- image: string
- name: string
- about: string
+ projects: ProjectWithBranch[];
+ organization_name: string;
+ image: string;
+ name: string;
+ about: string;
}
export const Projects = () => {
+ const isCreateAccess = isSystemManager();
- const isCreateAccess = isSystemManager()
-
- const { data, error, isLoading, mutate } = useFrappeGetCall<{ message: ProjectData[] }>('commit.api.commit_project.commit_project.get_project_list_with_branches', {}, 'get_project_list_with_branches', {
- keepPreviousData: true,
- revalidateOnFocus: true,
- revalidateIfStale: false,
- })
+ const { data, error, isLoading, mutate } = useFrappeGetCall<{
+ message: ProjectData[];
+ }>(
+ "commit.api.commit_project.commit_project.get_project_list_with_branches",
+ {},
+ "get_project_list_with_branches",
+ {
+ keepPreviousData: true,
+ revalidateOnFocus: true,
+ revalidateIfStale: false,
+ }
+ );
if (error) {
- return Error
+ return Error
;
}
if (isLoading) {
- return
+ return ;
}
if (data && data.message) {
@@ -48,20 +55,29 @@ export const Projects = () => {
-