Skip to content

Commit

Permalink
Fix Reset matched packages do not work on advisory with the same ID (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
maccelf authored Jan 29, 2025
1 parent 2538219 commit 7abc72f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/components/ErrataInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,9 @@
resetMatchedPackages() {
this.loadingReset = true
this.$api
.post(`/errata/reset-matched-packages?record_id=${this.advisory.id}`)
.post(
`/errata/reset-matched-packages?record_id=${this.advisory.id}&platform_id=${this.advisory.platform_id}`
)
.then((response) => {
this.loadingReset = false
Notify.create({
Expand Down
14 changes: 8 additions & 6 deletions src/pages/ErrataFeed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<q-tr
:props="props"
class="cursor-pointer"
:class="markAdvisory(props.row.id)"
:class="markAdvisory(props.row.complexId)"
@click="loadAdvisory(props.row.id, props.row.platform_id)"
>
<q-td key="id" :props="props">
Expand Down Expand Up @@ -266,14 +266,14 @@
{
name: 'release_status',
required: true,
align: 'left',
align: 'center',
label: 'Status',
field: 'release_status',
},
{
name: 'updated_date',
required: true,
label: 'Update date',
label: 'Updated date',
align: 'left',
field: 'updated_date',
headerStyle: 'width: 120px',
Expand Down Expand Up @@ -448,6 +448,7 @@
.then((response) => {
this.loadingTable = false
this.selectedAdvisory = response.data
this.selectedAdvisory.complexId = `${platform_id}-${id}`
this.$router.push({
query: {
id: this.selectedAdvisory.id,
Expand All @@ -470,7 +471,6 @@
const dateInput = document.querySelector('.date')
if (dateInput.value) {
const formattedDate = dateInput.value.replace('T', ' ') + ':00'
console.log(formattedDate)
this.loadingReset = true
this.$api
.post(
Expand Down Expand Up @@ -511,9 +511,11 @@
name: 'CreateErrata',
})
},
markAdvisory(id) {
markAdvisory(complexId) {
if (this.selectedAdvisory)
return this.selectedAdvisory.id === id ? 'bg-grey-4' : ''
return this.selectedAdvisory.complexId === complexId
? 'bg-grey-4'
: ''
},
formatDate(date) {
const longEnUSFormatter = new Intl.DateTimeFormat('en-US', {
Expand Down

0 comments on commit 7abc72f

Please sign in to comment.