From e8d95bdb68dc20ef6c7dd31264f355475dfccca2 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 8 Nov 2021 11:12:56 -0800 Subject: [PATCH] IO-1508 Add # of jobs in production. --- .../production-board-filters.component.jsx | 6 +-- .../production-board-kanban.component.jsx | 37 ++++++++++++++++--- .../production-list-table.component.jsx | 14 +++++-- 3 files changed, 43 insertions(+), 14 deletions(-) diff --git a/client/src/components/production-board-filters/production-board-filters.component.jsx b/client/src/components/production-board-filters/production-board-filters.component.jsx index 16bc72fea..394ab6096 100644 --- a/client/src/components/production-board-filters/production-board-filters.component.jsx +++ b/client/src/components/production-board-filters/production-board-filters.component.jsx @@ -26,8 +26,7 @@ export function ProductionBoardFilters({ const { t } = useTranslation(); return ( - {loading && } - } - > + ); } diff --git a/client/src/components/production-board-kanban/production-board-kanban.component.jsx b/client/src/components/production-board-kanban/production-board-kanban.component.jsx index 2c3c4f6d0..423f3ea55 100644 --- a/client/src/components/production-board-kanban/production-board-kanban.component.jsx +++ b/client/src/components/production-board-kanban/production-board-kanban.component.jsx @@ -1,7 +1,7 @@ import { useApolloClient } from "@apollo/client"; import Board, { moveCard } from "@lourenci/react-kanban"; import "@lourenci/react-kanban/dist/styles.css"; -import { notification } from "antd"; +import { notification, PageHeader, Space, Statistic } from "antd"; import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -130,15 +130,40 @@ export function ProductionBoardKanbanComponent({ }); } }; - + const totalHrs = data + .reduce( + (acc, val) => + acc + + (val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0) + + (val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0), + 0 + ) + .toFixed(1); return (
- + + + + } + extra={ + + } /> + + + + + } extra={