Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
#678 Removed DocNoElem
Browse files Browse the repository at this point in the history
  • Loading branch information
damianprzygodzki committed Apr 25, 2017
1 parent 3dc7531 commit a12f754
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 41 deletions.
3 changes: 1 addition & 2 deletions src/components/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Container extends Component {

render() {
const {
docActionElem, docStatusData, docNoElement, docNoData,
docActionElem, docStatusData, docNoData,
docSummaryData, dataId, windowType, breadcrumb, references, actions,
showSidelist, siteName, connectionError, noMargin, entity, children,
query, attachments, showIndicator, isDocumentNotSaved, hideHeader,
Expand All @@ -30,7 +30,6 @@ class Container extends Component {
breadcrumb, dataId, dropzoneFocused, notfound
}}
docStatus = {docActionElem}
docNo = {docNoElement}
/>
}
{connectionError && <ErrorScreen />}
Expand Down
43 changes: 14 additions & 29 deletions src/components/header/Breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { connect } from 'react-redux';
import {push} from 'react-router-redux';

import MenuOverlay from './MenuOverlay';
import MasterWidget from '../widget/MasterWidget';
import Tooltips from '../tooltips/Tooltips';
import keymap from '../../keymap.js';

Expand Down Expand Up @@ -87,8 +86,7 @@ class Breadcrumb extends Component {

render() {
const {
breadcrumb, windowType, docNo, docNoData, docSummaryData,
dataId, siteName
breadcrumb, docSummaryData, siteName
} = this.props;

const {tooltipOpen} = this.state;
Expand All @@ -109,43 +107,30 @@ class Breadcrumb extends Component {
{breadcrumb && breadcrumb.map((item, index) =>
this.renderBtn(item, index+1)
)}
</div>

{docNo && <div className="divider">/</div>}

{docNo && <div className="header-input-id header-input-sm">
<MasterWidget
entity="window"
windowType={windowType}
dataId={dataId}
widgetData={[docNoData]}
noLabel={true}
icon={true}
{...docNo}
/>
</div>}

{docSummaryData && <div
{docSummaryData &&
<div
className="hidden-xs-down header-breadcrumb-line"
>
<span
className="header-breadcrumb-sitename"
>
{docSummaryData.value}
</span>
</div>}
</div>
}

{siteName && <div className="divider">/</div>}
{siteName && <div className="divider">/</div>}

{siteName &&
<div>
<span
className="header-item icon-sm"
>{siteName}</span>
</div>
}
</div>
{siteName &&
<div>
<span
className="header-item icon-sm"
>{siteName}</span>
</div>
}
</div>

)
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/components/header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class Header extends Component {

render() {
const {
docSummaryData, siteName, docNoData, docNo, docStatus,
docSummaryData, siteName, docNoData, docStatus,
docStatusData, windowType, dataId, breadcrumb, showSidelist,
inbox, selected, entity, query, showIndicator, isDocumentNotSaved,
selectedWindowType, notfound
Expand Down Expand Up @@ -310,8 +310,6 @@ class Header extends Component {
<Breadcrumb
breadcrumb={breadcrumb}
windowType={windowType}
docNo={docNo}
docNoData={docNoData}
docSummaryData={docSummaryData}
dataId={dataId}
siteName={siteName}
Expand Down
11 changes: 4 additions & 7 deletions src/containers/MasterWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,12 @@ class MasterWindow extends Component {
} = this.state;

const {
documentNoElement, docActionElement, documentSummaryElement
docActionElement, documentSummaryElement
} = master.layout;

const dataId = master.docId;

const docNoData = findRowByPropName(
master.data, documentNoElement && documentNoElement.fields[0].field
);
const docNoData = findRowByPropName(master.data, 'DocumentNo');

const docStatusData = {
'status': findRowByPropName(master.data, 'DocStatus'),
Expand All @@ -262,10 +260,9 @@ class MasterWindow extends Component {
return (
<Container
entity="window"
{...{dropzoneFocused, docStatusData, docNoData, docSummaryData,
dataId, breadcrumb}}
{...{dropzoneFocused, docStatusData, docSummaryData,
dataId, breadcrumb, docNoData}}
docActionElem = {docActionElement}
docNoElement = {documentNoElement}
windowType={params.windowType}
showSidelist={true}
showIndicator={!modal.visible}
Expand Down

0 comments on commit a12f754

Please sign in to comment.