diff --git a/src/javascript/app/pages/trade/purchase/contract-details.jsx b/src/javascript/app/pages/trade/purchase/contract-details.jsx index 745ae9cae2f..ba39472445f 100644 --- a/src/javascript/app/pages/trade/purchase/contract-details.jsx +++ b/src/javascript/app/pages/trade/purchase/contract-details.jsx @@ -13,16 +13,19 @@ import { TimeTooltipWrapper, triggerClick } from '../../../common/helpers'; const AuditSection = ({ data }) => { const auditData = { start: { - title : localize('Contract starts'), - content: data?.auditDataStart, + title : localize('Contract starts'), + content : data?.auditDataStart, + isVisible: data?.auditDataStart?.length > 0, }, end: { - title : localize('Contract ends'), - content: data?.auditDataEnd, + title : localize('Contract ends'), + content : data?.auditDataEnd, + isVisible: data?.auditDataEnd?.length > 0, }, details: { - title : localize('Contract details'), - content: data?.auditDataDetails, + title : localize('Contract details'), + content : data?.auditDataDetails, + isVisible: data?.auditDataDetails?.length > 0, }, }; @@ -37,6 +40,9 @@ const AuditSection = ({ data }) => { onClick={() => { dataManager.setPurchase({ cd_showAudit: false, + auditDataEnd: [], + cd_infoMsg : null, + }); triggerClick('#contract_purchase_button'); }} @@ -57,17 +63,17 @@ const AuditSection = ({ data }) => {
{Object.keys(auditData).map(adk =>{ - const { title,content } = auditData[adk]; + const { title,content, isVisible } = auditData[adk]; if (content){ return ( -
+
{title}
-
+
@@ -130,7 +136,14 @@ const DetailsSection = ({ data }) => ( onClick={() => { dataManager.setPurchase({ showContractDetailsPopup: false, + cd_showSell : false, + cd_contractEnded : false, + cd_infoMsg : null, + cd_showAuditBtn : false, + auditDataEnd : [], + }); + }} />
@@ -177,6 +190,12 @@ const ContractDetails = () => { if (event.key === 'Escape') { dataManager.setPurchase({ showContractDetailsPopup: false, + cd_showSell : false, + cd_contractEnded : false, + cd_infoMsg : null, + cd_showAuditBtn : false, + cd_showAudit : false, + auditDataEnd : [], }); } }; diff --git a/src/javascript/app/pages/trade/purchase/purchase.jsx b/src/javascript/app/pages/trade/purchase/purchase.jsx index e23e65c9d13..b88f792b7f2 100644 --- a/src/javascript/app/pages/trade/purchase/purchase.jsx +++ b/src/javascript/app/pages/trade/purchase/purchase.jsx @@ -29,6 +29,8 @@ const Purchase = () => { error : null, cd_errorMsg : null, cd_showAuditBtn : false, + cd_contractEnded : false, + auditDataEnd : [], cd_infoMsg : null, }); diff --git a/src/sass/_common/reskin.scss b/src/sass/_common/reskin.scss index 0978daf788f..e3820dca2fe 100644 --- a/src/sass/_common/reskin.scss +++ b/src/sass/_common/reskin.scss @@ -14,6 +14,10 @@ body { } } +.hide-table { + display: none !important; +} + .quill { &-container { &-centered {