Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

1.5 KB
Raw Blame
// SPDX-License-Identifier: AGPL-3.0-only
// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
// including ports, remain AGPLv3; serving them over a network requires releasing their source.

import { Badge, Card, CardContent, HStack } from "@carbon/react";
import { Trans } from "@lingui/react/macro";
import { memo } from "react";

type IntercompanyMatchingSummaryProps = {
  unmatched: number;
  matched: number;
  eliminated: number;
};

const IntercompanyMatchingSummary = memo(
  ({ unmatched, matched, eliminated }: IntercompanyMatchingSummaryProps) => {
    return (
      <Card>
        <CardContent className="py-3">
          <HStack spacing={6}>
            <HStack spacing={2}>
              <Badge variant="yellow">{unmatched}</Badge>
              <span className="text-sm text-muted-foreground">
                <Trans>Unmatched</Trans>
              </span>
            </HStack>
            <HStack spacing={2}>
              <Badge variant="green">{matched}</Badge>
              <span className="text-sm text-muted-foreground">
                <Trans>Matched</Trans>
              </span>
            </HStack>
            <HStack spacing={2}>
              <Badge variant="gray">{eliminated}</Badge>
              <span className="text-sm text-muted-foreground">
                <Trans>Eliminated</Trans>
              </span>
            </HStack>
          </HStack>
        </CardContent>
      </Card>
    );
  }
);

IntercompanyMatchingSummary.displayName = "IntercompanyMatchingSummary";
export default IntercompanyMatchingSummary;