Added filtering and search to kanban board. BOD-176
This commit is contained in:
@@ -12,6 +12,7 @@ import ProductionBoardCard from "../production-board-kanban-card/production-boar
|
||||
import { createBoardData } from "./production-board-kanban.utils.js";
|
||||
import IndefiniteLoading from "../indefinite-loading/indefinite-loading.component";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import ProductionBoardFilters from "../production-board-filters/production-board-filters.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -22,12 +23,14 @@ export function ProductionBoardKanbanComponent({ data, bodyshop }) {
|
||||
columns: [{ id: "Loading...", title: "Loading...", cards: [] }],
|
||||
});
|
||||
|
||||
const [filter, setFilter] = useState({ search: "", employeeId: null });
|
||||
|
||||
const [isMoving, setIsMoving] = useState(false);
|
||||
|
||||
const { t } = useTranslation();
|
||||
useEffect(() => {
|
||||
setBoardLanes(
|
||||
createBoardData(bodyshop.md_ro_statuses.production_statuses, data)
|
||||
createBoardData(bodyshop.md_ro_statuses.production_statuses, data, filter)
|
||||
);
|
||||
setIsMoving(false);
|
||||
}, [
|
||||
@@ -35,6 +38,7 @@ export function ProductionBoardKanbanComponent({ data, bodyshop }) {
|
||||
setBoardLanes,
|
||||
setIsMoving,
|
||||
bodyshop.md_ro_statuses.production_statuses,
|
||||
filter,
|
||||
]);
|
||||
|
||||
const client = useApolloClient();
|
||||
@@ -111,6 +115,7 @@ export function ProductionBoardKanbanComponent({ data, bodyshop }) {
|
||||
return (
|
||||
<div>
|
||||
<IndefiniteLoading loading={isMoving} />
|
||||
<ProductionBoardFilters filter={filter} setFilter={setFilter} />
|
||||
<Board
|
||||
children={boardLanes}
|
||||
disableCardDrag={isMoving}
|
||||
|
||||
Reference in New Issue
Block a user