- Add Alert Filter to visual production board
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -21,7 +21,7 @@ import { createBoardData } from "./production-board-kanban.utils.js";
|
||||
import ProductionBoardKanbanSettings from "./settings/production-board-kanban.settings.component.jsx";
|
||||
import cloneDeep from "lodash/cloneDeep";
|
||||
import isEqual from "lodash/isEqual";
|
||||
import { mergeWithDefaults } from "./settings/defaultKanbanSettings.js";
|
||||
import { defaultFilters, mergeWithDefaults } from "./settings/defaultKanbanSettings.js";
|
||||
import NoteUpsertModal from "../../components/note-upsert-modal/note-upsert-modal.container";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -41,7 +41,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
function ProductionBoardKanbanComponent({ data, bodyshop, refetch, insertAuditTrail, associationSettings, statuses }) {
|
||||
const [boardLanes, setBoardLanes] = useState({ lanes: [] });
|
||||
const [filter, setFilter] = useState({ search: "", employeeId: null });
|
||||
const [filter, setFilter] = useState(defaultFilters);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [isMoving, setIsMoving] = useState(false);
|
||||
const [orientation, setOrientation] = useState("vertical");
|
||||
@@ -187,11 +187,9 @@ function ProductionBoardKanbanComponent({ data, bodyshop, refetch, insertAuditTr
|
||||
return mergeWithDefaults(kanbanSettings);
|
||||
}, [associationSettings]);
|
||||
|
||||
const handleSettingsChange = useCallback((newSettings) => {
|
||||
setLoading(true);
|
||||
setOrientation(newSettings.orientation ? "vertical" : "horizontal");
|
||||
setLoading(false);
|
||||
}, []);
|
||||
const handleSettingsChange = () => {
|
||||
setFilter(defaultFilters);
|
||||
};
|
||||
|
||||
if (loading) {
|
||||
return <Skeleton active />;
|
||||
|
||||
Reference in New Issue
Block a user