-
Notifications
You must be signed in to change notification settings - Fork 73
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
Custom Policy Deletion #723
Conversation
54bdf14
to
40859b6
Compare
Codecov Report
@@ Coverage Diff @@
## master #723 +/- ##
=========================================
Coverage ? 92.86%
=========================================
Files ? 2388
Lines ? 77734
Branches ? 0
=========================================
Hits ? 72185
Misses ? 5549
Partials ? 0
Continue to review full report at Codecov.
|
44eba3c
to
d09e1f1
Compare
@@ -66,3 +66,5 @@ export type ElementEventTemplate<E> = { | |||
} & Event & SyntheticEvent<> | |||
|
|||
export type InputEvent = ElementEventTemplate<HTMLInputElement> | |||
|
|||
export type Window = any |
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.
Should this go in libdefs.js
?
@@ -44,9 +44,18 @@ function CSRFToken ({win = window}: {win?: any}) { | |||
) | |||
} | |||
|
|||
function CustomPolicyForm ({policy, onChange}: {policy: Policy, onChange: OnChange}) { | |||
function CustomPolicyForm ({policy, onChange, win = window}: {policy: Policy, onChange: OnChange, win?: Window}) { | |||
const isNewPolicy = !(policy.id && policy.id !== 0) |
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.
To fix codeclimate complexity error, maybe
const isNewPolicy = !(policy.id && policy.id !== 0) | |
const isNewPolicy = !policy.id |
8fe7a31
to
6a78e20
Compare
* Works better with hooks and shallow renderinig
[codeclimate] Fixing some issues
* Added pseudo type Window
6a78e20
to
872bc33
Compare
@@ -43,11 +43,21 @@ def create | |||
end | |||
end | |||
|
|||
def edit; end |
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.
You don't need this I think.
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 guess code climate will complain without it :/
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 think you are right and Code Climate should not complain. I will remove
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.
Codeclimate complained about it, that was why hehe
906f498
to
872bc33
Compare
Removing Policy not in use
Removing Policy in use is not possible
What this PR does / why we need it:
Makes it possible to delete a policy from the UI
Which issue(s) this PR fixes
fixes https://issues.jboss.org/browse/THREESCALE-2100
Verification steps
Special notes for your reviewer: