Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meenu/fix: fixed audit page #779

Conversation

meenakshi-deriv
Copy link
Contributor

Changes:

  • ...

Type of change

  • Bug fix
  • New feature
  • Update feature
  • Refactor code
  • Translation to code
  • Translation to crowdin
  • Script configuration
  • Improve performance
  • Style only
  • Dependency update
  • Documentation update
  • Release

@meenakshi-deriv meenakshi-deriv requested a review from a team as a code owner August 8, 2024 09:00
Comment on lines 189 to 195
showContractDetailsPopup: false,
cd_showSell : false,
cd_contractEnded : false,
cd_infoMsg : null,
cd_showAuditBtn : false,
cd_showAudit : false,
auditDataEnd : [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reuse the close function from the purchase?

Comment on lines 13 to 25
const getDefaultPurchaseObject = () => ({
cd_showAudit: false,
auditDataEnd: [],
cd_infoMsg : null,
});

const setPurchaseWithDefaults = (additionalProps = {}) => {
dataManager.setPurchase({
...getDefaultPurchaseObject(),
...additionalProps,
});
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const getDefaultPurchaseObject = () => ({
cd_showAudit: false,
auditDataEnd: [],
cd_infoMsg : null,
});
const setPurchaseWithDefaults = (additionalProps = {}) => {
dataManager.setPurchase({
...getDefaultPurchaseObject(),
...additionalProps,
});
};
const setPurchaseWithDefaults = (isAuditReset=false) => {
const audit_reset_object = {
cd_showAudit: false,
auditDataEnd: [],
cd_infoMsg : null
}
const contract_reset_object = {
{...audit_reset_object}
showContractDetailsPopup: false,
cd_showSell : false,
cd_contractEnded : false,
cd_showAuditBtn : false,
}
dataManager.setPurchase({
isAuditReset ? ...audit_reset_object : contract_reset_object
});
};

Copy link

github-actions bot commented Aug 8, 2024

Preview Link: https://pr-779.smarttrader-preview.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

@prince-deriv prince-deriv merged commit 44fd237 into deriv-com:redesign Aug 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants