BOD-21 Added sorting and saving to production config. Added drag and drop to column ordering

This commit is contained in:
Patrick Fic
2020-04-21 17:14:58 -07:00
parent f2fd1bf7eb
commit 9c84024a08
7 changed files with 103 additions and 43 deletions

View File

@@ -18,10 +18,13 @@ const mapDispatchToProps = (dispatch) => ({
export function ProductionListContainer({ setBreadcrumbs, bodyshop }) {
const { t } = useTranslation();
const columnState = useState(
ProductionListColumns.filter((c) =>
bodyshop.production_config.columnKeys.includes(c.key)
) || []
(bodyshop.production_config &&
bodyshop.production_config.columnKeys.map((k) =>
ProductionListColumns.find((e) => e.key === k)
)) ||
[]
);
// console.log("ProductionListContainer -> columnState", columnState);
useEffect(() => {
document.title = t("titles.productionlist");