Commit 6fcd3426 authored by samdbeckham's avatar samdbeckham

Moves the shouldRenderFooterSection of the issues modal from computed to methods to bust the cache

parent 7abbde6e
...@@ -32,15 +32,7 @@ ...@@ -32,15 +32,7 @@
this.modal.vulnerability.dismissalFeedback.author this.modal.vulnerability.dismissalFeedback.author
); );
}, },
/**
* The slot for the footer should be rendered if any of the conditions is true.
*/
shouldRenderFooterSection() {
return (
!this.modal.isResolved &&
(this.canCreateFeedbackPermission || this.canCreateIssuePermission)
);
},
}, },
methods: { methods: {
...mapActions(['dismissIssue', 'revertDismissIssue', 'createNewIssue']), ...mapActions(['dismissIssue', 'revertDismissIssue', 'createNewIssue']),
...@@ -66,6 +58,15 @@ ...@@ -66,6 +58,15 @@
hasLinks(field, key) { hasLinks(field, key) {
return key === 'links' && this.hasValue(field); return key === 'links' && this.hasValue(field);
}, },
/**
* The slot for the footer should be rendered if any of the conditions is true.
*/
shouldRenderFooterSection() {
return (
!this.modal.isResolved &&
(this.canCreateFeedbackPermission || this.canCreateIssuePermission)
);
},
}, },
}; };
</script> </script>
...@@ -73,7 +74,7 @@ ...@@ -73,7 +74,7 @@
<modal <modal
id="modal-mrwidget-security-issue" id="modal-mrwidget-security-issue"
:header-title-text="modal.title" :header-title-text="modal.title"
:class="{ 'modal-hide-footer': !shouldRenderFooterSection }" :class="{ 'modal-hide-footer': !shouldRenderFooterSection() }"
class="modal-security-report-dast" class="modal-security-report-dast"
> >
<slot> <slot>
...@@ -212,7 +213,7 @@ ...@@ -212,7 +213,7 @@
</div> </div>
</slot> </slot>
<div slot="footer"> <div slot="footer">
<template v-if="shouldRenderFooterSection"> <template v-if="shouldRenderFooterSection()">
<button <button
type="button" type="button"
class="btn btn-default" class="btn btn-default"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment