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

#187854921: Add Seller and Admin Dashboard Features #46

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

ErnestTchami
Copy link
Collaborator

@ErnestTchami ErnestTchami commented Jun 27, 2024

What does this PR do?

Dashboard

Description of Task to be completed?

Two different dashboards based on the type of user who are logged in and all work smoothly with functionalities.

How should this be manually tested?

  • localhost : npm run dev
  • deployed version preview

Any background context you want to provide?

What are the relevant pivotal tracker/Trello stories?

https://www.pivotaltracker.com/n/projects/2698211/stories/187854921

Screenshots (if appropriate)

image

Questions:

@ErnestTchami ErnestTchami added enhancement New feature or request WIP Work in progress labels Jun 27, 2024
@ErnestTchami ErnestTchami self-assigned this Jun 27, 2024
Copy link

vercel bot commented Jun 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
champs-ec-fe-staging.deploysite.com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 3:13pm

@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 4b6e98c to a91b697 Compare June 27, 2024 21:29
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from a91b697 to 17b8893 Compare June 28, 2024 08:52
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 17b8893 to 0e80c01 Compare June 29, 2024 11:25
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 0e80c01 to 7baef6a Compare July 1, 2024 09:13
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 7baef6a to a45840e Compare July 1, 2024 09:20
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from a45840e to 0582cad Compare July 1, 2024 20:05
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 0582cad to 2a9740f Compare July 2, 2024 11:34
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 2a9740f to da9a6ff Compare July 2, 2024 13:42
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from da9a6ff to d01666c Compare July 2, 2024 17:38
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from d01666c to 67ef90c Compare July 2, 2024 18:34
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 67ef90c to ab3ddcf Compare July 2, 2024 18:40
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from ab3ddcf to d1e2e82 Compare July 2, 2024 18:50
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from d1e2e82 to fe10013 Compare July 2, 2024 19:14
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from cfaa959 to 4e0f87a Compare July 8, 2024 12:45
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 4e0f87a to 57d44b8 Compare July 8, 2024 12:52
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 57d44b8 to 732bdec Compare July 8, 2024 13:00
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 732bdec to b6bcb1a Compare July 8, 2024 13:20
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from b6bcb1a to 6a58e69 Compare July 8, 2024 13:32
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 6a58e69 to 89b769e Compare July 8, 2024 13:45
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 89b769e to 351e254 Compare July 8, 2024 14:05
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 351e254 to 6aad0f9 Compare July 8, 2024 14:10
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 6aad0f9 to 3775755 Compare July 8, 2024 14:21
Copy link
Collaborator

@Eli250 Eli250 left a comment

Choose a reason for hiding this comment

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

Resolve all feedback.

@@ -1,4 +1,4 @@
"use client";
Copy link
Collaborator

Choose a reason for hiding this comment

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

This endpoint src/app/(profile)/profile-edit/... does not not follow our naming conventions. It has to be something close to .../profile/[profileId].

if (response.payload && response.payload.User) {
currentProfile.User = response.payload.User;
console.log("currentProfile", currentProfile);
console.log('currentProfile', currentProfile);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove these consoles.

<li className='flex items-center text-gray-600'>
<svg className='w-4 h-4 mr-2' fill='none' stroke='currentColor' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path strokeLinecap='round' strokeLinejoin='round' strokeWidth={2} d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z' /></svg>
{watchedValues.birthDate || "YYYY-MM-DD"}
<ul className="hidden md:block text-sm space-y-2">
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file is too long. You are probably not using reusable components. Refactor this component by dividing it into smaller components that perform specific tasks.

src/app/dashboard/addproduct/page.tsx Show resolved Hide resolved
src/app/dashboard/home/page.tsx Outdated Show resolved Hide resolved
@@ -0,0 +1,43 @@
'use client';
import React, { useEffect, useState } from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

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

This page endpoint is wrong, and I have mentioned this several times.


useEffect(() => {
const categ = async () => {
const responsecat: any = await request.get(`/products/${productId}`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not use any

@@ -32,7 +31,7 @@ const OtpVerify: React.FC<OtpVerifyInterface> = ({ isOpen }) => {

useEffect(() => {
if (isAuthenticated) {
router.push('/seller/dashboard/products');
router.push('/dashboard/home');
Copy link
Collaborator

Choose a reason for hiding this comment

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

/dashboard/home endpoint does not make sense.

</div>
);
};

Copy link
Collaborator

Choose a reason for hiding this comment

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

This component is too long. You have to rafactor it.

@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 3775755 to 62ebac3 Compare July 8, 2024 20:37
@ErnestTchami ErnestTchami changed the title seller and admin dashboard #187854921: Add Seller and Admin Dashboard Features Jul 8, 2024
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 62ebac3 to 32f14cd Compare July 9, 2024 10:03
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from 32f14cd to bcbfd5d Compare July 9, 2024 10:08
@ErnestTchami ErnestTchami force-pushed the ft-dashboard-#187854921 branch from bcbfd5d to d3163af Compare July 9, 2024 15:10
@Eli250 Eli250 merged commit 09b247f into development Jul 9, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants