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

View Invoice Button Visible on Order Details when Invoices Feature Disabled #97

Open
1 task
SE-Graham opened this issue Aug 21, 2024 · 0 comments
Open
1 task
Labels

Comments

@SE-Graham
Copy link

Please fill out this template to help us diagnose and address your issue effectively.

Type: (Select one)

  • [x ] Bug Report
  • Feature Request

Summary:

View Invoice button is visible and works on Order Details when invoice feature is disabled

Expected Behavior:

View Invoice button should not be visible on Order Details when invoice feature is disabled

Actual Behavior:

View Invoice button is visible and works on Order Details when invoice feature is disabled

Steps to Reproduce (Bug Reports Only):

  1. Disable Invoice Feature
  2. Go to Order > Order Details

Code Snippet (Bug Reports Only):

I assume it's something to do with isCanShow in /Users/SprattG/GitHub/b2b-buyer-portal/apps/storefront/src/pages/OrderDetail/components/OrderAction.tsx

buttons: [
        {
          value: isB2BUser ? b3Lang('orderDetail.viewInvoice') : b3Lang('orderDetail.printInvoice'),
          key: 'aboutInvoice',
          name: isB2BUser ? 'viewInvoice' : 'printInvoice',
          variant: 'outlined',
          isCanShow: isB2BUser
            ? invoiceBtnPermissions && getInvoicesPermission
            : invoiceBtnPermissions,
        },
      ],

Additional Information:

Please also note the button only works once. First click load the print window when you close the print window and click it again nothing happens.

Version:

b7c20f3

Screenshots/Screen Recordings (Optional):

Screenshot 2024-08-21 at 11 09 15

@bc-victor bc-victor added the bug label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants