feature/IO-3255-simplified-parts-management - Favor isPartsEntry over isPartsManagementOnly
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Col, Row } from "antd";
|
||||
import React from "react";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import BillDetailEditcontainer from "../bill-detail-edit/bill-detail-edit.container";
|
||||
import BillsListTable from "../bills-list-table/bills-list-table.component";
|
||||
@@ -7,15 +6,15 @@ import JobBillsTotal from "../job-bills-total/job-bills-total.component";
|
||||
import PartsDispatchTable from "../parts-dispatch-table/parts-dispatch-table.component";
|
||||
import PartsOrderListTableComponent from "../parts-order-list-table/parts-order-list-table.component";
|
||||
import PartsOrderModal from "../parts-order-modal/parts-order-modal.container";
|
||||
import { selectIsPartsEntry } from "../../redux/application/application.selectors";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectPartsManagementOnly } from "../../redux/user/user.selectors";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
partsManagementOnly: selectPartsManagementOnly
|
||||
isPartsEntry: selectIsPartsEntry
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({});
|
||||
const mapDispatchToProps = () => ({});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsDetailPliComponent);
|
||||
|
||||
export function JobsDetailPliComponent({
|
||||
@@ -24,9 +23,9 @@ export function JobsDetailPliComponent({
|
||||
handleBillOnRowClick,
|
||||
handlePartsOrderOnRowClick,
|
||||
handlePartsDispatchOnRowClick,
|
||||
partsManagementOnly
|
||||
isPartsEntry
|
||||
}) {
|
||||
if (partsManagementOnly) {
|
||||
if (isPartsEntry) {
|
||||
return (
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col span={24}>
|
||||
|
||||
Reference in New Issue
Block a user