Skip to content

Instantly share code, notes, and snippets.

@snahor
Created June 7, 2016 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snahor/ddc9c4409a5dc593fefabcf6d6738094 to your computer and use it in GitHub Desktop.
Save snahor/ddc9c4409a5dc593fefabcf6d6738094 to your computer and use it in GitHub Desktop.
{
do {
if (!this.isQuotePublished()) {
<div>
<Dialog ref="modalDeleteQuoteDraft" type="modal">
<DialogOverlay>
<DialogHeader>
<DialogTitle>{ t('QUOTE_DRAFT_DELETE') }</DialogTitle>
</DialogHeader>
<p style={ { padding: 20 } }>
{ t('QUOTE_DRAFT_DELETE_QUESTION') }<br />
{ t('QUOTE_DRAFT_DELETE_TEXT') }
</p>
<DialogActions>
<Button label={ t('CANCEL') }
type="flat"
onTouchTap={ () => this.refs.modalDeleteQuoteDraft.close() } />
<Button label={ t('DELETE') }
type="flat"
onTouchTap={ () => this.deleteQuoteDraft() } />
</DialogActions>
</DialogOverlay>
</Dialog>
<Dialog ref="publishQuoteDialog" type="modal">
<DialogOverlay>
<DialogHeader>
<DialogTitle>{ t('PUBLISH_THIS_QUOTE') }</DialogTitle>
</DialogHeader>
<p style={ { padding: 20 } }>
{ t('PUBLISH_QUOTE_DIALOG_P_0') }
</p>
<p style={ { padding: 20 } }>
{ t('PUBLISH_QUOTE_DIALOG_P_1') }
</p>
<DialogActions>
<Button label={ t('CANCEL') }
type="flat"
onTouchTap={ () => this.refs.publishQuoteDialog.close() } />
<Button label={ t('PUBLISH') }
type="flat"
onTouchTap={ this.publish } />
</DialogActions>
</DialogOverlay>
</Dialog>
<TwoPanelPage>
<LeftPanel>
{ displayQuoteSections &&
<Section className={ cf('title') }>
<TitleSection inventory={ inventory }
model={ model } />
</Section> }
{ displayQuoteSections && !isEmptyState &&
<Section className={ cf('title') }>
<BaseChargeSection model={ model } />
</Section> }
</LeftPanel>
<RightPanel>
{ inventory && <AmenitySection inventory={ inventory } /> }
</RightPanel>
</TwoPanelPage>
</div>
} else {
<QuotePublished quote={ quoteDraft }
inventory={ inventory }
contact={ {} } />
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment