From e9199b87b672af49a4f9312a4ca4752934028b99 Mon Sep 17 00:00:00 2001 From: ajoalex-neoito Date: Tue, 30 Nov 2021 14:01:59 +0530 Subject: [PATCH] fix: admin event page #547 ui updates --- component/admin/AdminBlogsList.jsx | 1 - component/admin/AdminEventList.jsx | 51 +++++++++++------------ component/admin/AdminNavbar.jsx | 19 ++++----- pages/admin/events/create-event.js | 65 ++++++++++++++++++++++++++++-- pages/admin/events/index.js | 7 ++-- services/EventService.js | 13 +++++- 6 files changed, 110 insertions(+), 46 deletions(-) diff --git a/component/admin/AdminBlogsList.jsx b/component/admin/AdminBlogsList.jsx index bb1ecd59..731a2756 100644 --- a/component/admin/AdminBlogsList.jsx +++ b/component/admin/AdminBlogsList.jsx @@ -127,7 +127,6 @@ export default function AdminBlogsList({ posts, updated }) { - {item.status == "published" ? (
{ + router.push({ + pathname:'events/create-event', + query:{ + "id":id + } + }) + } return (
@@ -24,33 +34,18 @@ function AdminEventList(props) {
+ {obj.title} +
{moment(obj.event_time).format("LL")}
- -
- <> -
- - - Preview - - -
- - {obj.status === "published" && ( + {/* {obj.status === "published" && (
@@ -60,7 +55,7 @@ function AdminEventList(props) { Published
- )} + )} */}
deletevents(obj.id)} className={`flex items-center w-28 justify-center hover:opacity-50 duration-500 cursor-pointer rounded-full h-8 mr-3 ${MyBlogStyles.dangerBg}`} @@ -69,7 +64,7 @@ function AdminEventList(props) { Delete
-
editevent(obj.id)} className={`flex items-center px-4 justify-center rounded-full h-8 cursor-pointer hover:opacity-50 duration-500 ${MyBlogStyles.linkBg}`} >
diff --git a/component/admin/AdminNavbar.jsx b/component/admin/AdminNavbar.jsx index e8f5c5a1..c8c9781c 100644 --- a/component/admin/AdminNavbar.jsx +++ b/component/admin/AdminNavbar.jsx @@ -80,16 +80,17 @@ export default function AdminNavbar({ changeTag, changeStatus, event }) { // closeMenuOnSelect={false} /> } + {event ? "" :