diff --git a/apps/dragon-foods/components/orderHistory/emptyOrder.tsx b/apps/dragon-foods/components/orderHistory/emptyOrder.tsx index 170c5698..02a43267 100644 --- a/apps/dragon-foods/components/orderHistory/emptyOrder.tsx +++ b/apps/dragon-foods/components/orderHistory/emptyOrder.tsx @@ -47,7 +47,7 @@ const EmptyOrder = () => { router.push('/')} /> diff --git a/apps/dragon-foods/pages/orderHistory.tsx b/apps/dragon-foods/pages/orderHistory.tsx index 9b2ec8f1..5eaa1c96 100644 --- a/apps/dragon-foods/pages/orderHistory.tsx +++ b/apps/dragon-foods/pages/orderHistory.tsx @@ -1,27 +1,26 @@ import Cookies from 'js-cookie' -import { DetailCard } from '@beckn-ui/becknified-components' -import { Loader, Typography } from '@beckn-ui/molecules' -import { Box, Text, Flex } from '@chakra-ui/react' +import { Accordion, Loader, Typography } from '@beckn-ui/molecules' +import { Box, Text, Flex, Divider, Stack } from '@chakra-ui/react' import React, { useEffect, useState } from 'react' import { formatTimestamp } from '@beckn-ui/common/src/utils' import { useRouter } from 'next/router' import EmptyOrder from '@components/orderHistory/emptyOrder' import { orderHistoryData } from '@beckn-ui/common/lib/types' import { testIds } from '@shared/dataTestIds' +import { OrderStatusProgress } from '@beckn-ui/becknified-components' -const floodDataList = [ +const mockData = [ { - title: 'High resolution probabilistic flood prediction data', - provider: 'Provided by Sky Analytics', - description: '2 year historical data set covering temporal, spatial, and metric coverage for floods Bhutan.', - placedAt: 'Placed at 21st Jun 2021, 3.30 pm' + label: 'Data Requested', + statusTime: '21st Jun 2021, 12:11pm', + noLine: false, + lastElement: false }, { - title: 'Medium resolution integrated model flood prediction data', - provider: 'Provided by Climatic', - description: - 'Founded in 2019, Climatic is a climate disaster modelling company based out of Dhaka, offering high resolution services for flood modelling.', - placedAt: 'Placed at 21st Jun 2021, 3.30 pm' + label: 'Request Status', + statusTime: '21st Jun 2021, 12:11pm', + noLine: true, + lastElement: true } ] @@ -30,10 +29,10 @@ const OrderHistory = () => { const [isLoading, setIsLoading] = useState(true) const strapiUrl = process.env.NEXT_PUBLIC_STRAPI_URL const [error, setError] = useState('') + const [completed, setCompleted] = useState(true) const bearerToken = Cookies.get('authToken') const router = useRouter() - console.log(bearerToken) useEffect(() => { const myHeaders = new Headers() myHeaders.append('Authorization', `Bearer ${bearerToken}`) @@ -89,6 +88,60 @@ const OrderHistory = () => { ) } + const accordionHeader = (order: any) => { + return ( + <> + + + + + + + + + + + ) + } + return ( { > {orderHistoryList.map((order, idx) => { return ( - + - - - - + + + {mockData.map((data, index) => ( + + ))} + - + ) })}