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

Commit

Permalink
Merge pull request #559 from metasfresh/dev-558
Browse files Browse the repository at this point in the history
#558 saveStatus respected inside modal
  • Loading branch information
damianprzygodzki authored Mar 21, 2017
2 parents 3b16749 + e822824 commit 62868c4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/app/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class Modal extends Component {

render() {
const {
data, modalTitle, modalType
data, modalTitle, modalType, isDocumentNotSaved
} = this.props;

const {
Expand Down Expand Up @@ -275,7 +275,7 @@ class Modal extends Component {
}
</div>
</div>
<Indicator />
<Indicator {...{isDocumentNotSaved}}/>
<div
className={
`panel-modal-content js-panel-modal-content
Expand Down
4 changes: 4 additions & 0 deletions src/containers/DocList.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ class DocList extends Component {
viewId={query.viewId}
rawModalVisible={rawModal.visible}
indicator={indicator}
isDocumentNotSaved={
!modal.saveStatus.saved &&
!modal.validStatus.initialValue
}
/>
}
{rawModal.visible &&
Expand Down
4 changes: 4 additions & 0 deletions src/containers/MasterWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ class MasterWindow extends Component {
closeCallback={this.closeModalCallback}
rawModalVisible={rawModal.visible}
indicator={indicator}
isDocumentNotSaved={
!modal.saveStatus.saved &&
!modal.validStatus.initialValue
}
/>
}
{rawModal.visible &&
Expand Down
4 changes: 3 additions & 1 deletion src/reducers/windowHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const initialState = {
modalType: '',
isAdvanced: false,
viewDocumentIds: null,
triggerField: null
triggerField: null,
saveStatus: {},
validStatus: {}
},
rawModal: {
visible: false,
Expand Down

0 comments on commit 62868c4

Please sign in to comment.