From 24e99397a90f34ac7b3137a1b43274380a44fafb Mon Sep 17 00:00:00 2001 From: antipov Date: Mon, 9 Oct 2023 20:09:54 +0530 Subject: [PATCH] fix --- components/summary/columns.tsx | 26 +++++++++++++++++++++++++- components/summary/summary.tsx | 27 +-------------------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/components/summary/columns.tsx b/components/summary/columns.tsx index 29a9d15..2ec5663 100644 --- a/components/summary/columns.tsx +++ b/components/summary/columns.tsx @@ -4,9 +4,33 @@ import { ColumnsType } from "antd/es/table" import Link from "next/link" import styled from "styled-components" import { statusMap } from "../Status" -import { Summary, SummaryData, SummaryDataType } from "./summary" +export type SummaryByDestination = Map +export type SummaryByType = Map +export type SummaryByLocation = Map + + +export interface Summary { + recieved: SummaryByDestination, + created: SummaryByDestination, + sended: SummaryByDestination, +} + +export interface SummaryData { + count: number, + shippings: Shipping[] +} + + +export interface SummaryDataType { + key: string + content: string + recieved: SummaryByDestination + created: SummaryByDestination + sended: SummaryByDestination +} + export const SmallTag = styled.div<{ $status: string }>` display: flex; background-color: ${({ $status }) => statusMap.get($status)?.hexColorBg}; diff --git a/components/summary/summary.tsx b/components/summary/summary.tsx index a40f745..248ecc6 100644 --- a/components/summary/summary.tsx +++ b/components/summary/summary.tsx @@ -10,32 +10,7 @@ import { Shipping } from "@/interfaces/Shipping"; import { User } from "@/interfaces/UserInterface"; import { useRouter } from "next/router"; import { Table } from "antd"; -import { summaryColumns } from "./columns"; - -type SummaryByDestination = Map -type SummaryByType = Map -type SummaryByLocation = Map - - -export interface Summary { - recieved: SummaryByDestination, - created: SummaryByDestination, - sended: SummaryByDestination, -} - -export interface SummaryData { - count: number, - shippings: Shipping[] -} - - -export interface SummaryDataType { - key: string - content: string - recieved: SummaryByDestination - created: SummaryByDestination - sended: SummaryByDestination -} +import { Summary, SummaryByLocation, SummaryByType, summaryColumns, SummaryData, SummaryDataType } from "./columns"; export const LocationSummary = (): JSX.Element => {