-
Notifications
You must be signed in to change notification settings - Fork 112
feat(pci.db): improve services capabilities logic #20110
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
base: master
Are you sure you want to change the base?
Conversation
ref: #DATATR-2313 Signed-off-by: Arthur Bullet <arthur.bullet@ovhcloud.com>
| onClick: () => navigate('./update-version'), | ||
| updateButtonDisplayed: availabilitiesVersionQuery.data?.length > 1, | ||
| disable: | ||
| service.capabilities.service.update === |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could create a const as it's always the same check or maybe move it in a utils cause you have the same check in packages/manager/apps/pci-databases-analytics/src/pages/services/[serviceId]/settings/_components/IpRestrictionsUpdate.component.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your point but it's only used at 2 places, so for me it's a little bit overkill to create a utils for that, even a const. We are managing all capabilities this way, so I guess it will be easier to understand "global capa management" if we all use it that way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes use in 2 place but 6 times, and if you forgot to update one it will be painful to find the issue :)
| cell: service.plan, | ||
| onClick: () => navigate('./update-plan'), | ||
| updateButtonDisplayed: availabilitiesPlanQuery.data?.length > 1, | ||
| disable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using -ed for the updateButtonDisplayed, we should be consistent here:
| disable: | |
| disabled: |
ref: #DATATR-2313
Description
Ticket Reference: #...
Additional Information