Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nsylwa committed Oct 9, 2023
1 parent 2512d49 commit 24e9939
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
26 changes: 25 additions & 1 deletion components/summary/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, SummaryData>
export type SummaryByType = Map<string, Summary>
export type SummaryByLocation = Map<string, SummaryByType>


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};
Expand Down
27 changes: 1 addition & 26 deletions components/summary/summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, SummaryData>
type SummaryByType = Map<string, Summary>
type SummaryByLocation = Map<string, SummaryByType>


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 => {
Expand Down

0 comments on commit 24e9939

Please sign in to comment.