Skip to content

Commit

Permalink
♻️ Update old references of code
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMarble committed Jan 24, 2025
1 parent d84bf40 commit af07b55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/components/FlawForm/FlawForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ const createdDate = computed(() => {
:error="errors.source"
:options-hidden="hiddenSources"
/>
<FlawLabelsTable v-model="flaw.labels" />

<FlawLabelsTable v-if="mode==='edit'" v-model="flaw.labels!" />
</div>

<div class="col-6">
Expand Down
4 changes: 2 additions & 2 deletions src/components/IssueQueue/IssueQueueItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ const [showLabels, toggleShowLabels] = useToggle();
const sortedLabels = computed(() => issue.labels?.toSorted((a, b) => {
if (
(a.state === 'REQ' && b.state !== 'REQ')
|| (a.collaborator && !b.collaborator)
|| (a.contributor && !b.contributor)
) {
return -1;
}
if (
(a.state !== 'REQ' && b.state === 'REQ')
|| (!a.collaborator && b.collaborator)
|| (!a.contributor && b.contributor)
) {
return 1;
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/__tests__/IssueQueue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ describe('issueQueue', () => {
issues: [{
...mockData[0],
labels: [
{ label: 'test', state: 'NEW', collaborator: '' },
{ label: 'test-2', state: 'NEW', collaborator: '' },
{ label: 'test-3', state: 'REQ', collaborator: '' },
{ label: 'test', state: 'NEW', contributor: '' },
{ label: 'test-2', state: 'NEW', contributor: '' },
{ label: 'test-3', state: 'REQ', contributor: '' },
],
} as ZodFlawType],
});
Expand All @@ -217,7 +217,7 @@ describe('issueQueue', () => {
const wrapper = mountIssueQueue({
issues: [{
...mockData[0],
labels: Array.from({ length: 10 }).map((_, i) => ({ label: `test-${i}`, state: 'NEW', collaborator: '' })),
labels: Array.from({ length: 10 }).map((_, i) => ({ label: `test-${i}`, state: 'NEW', contributor: '' })),
} as ZodFlawType],
});

Expand All @@ -231,7 +231,7 @@ describe('issueQueue', () => {
const wrapper = mountIssueQueue({
issues: [{
...mockData[0],
labels: Array.from({ length: 10 }).map((_, i) => ({ label: `test-${i}`, state: 'NEW', collaborator: '' })),
labels: Array.from({ length: 10 }).map((_, i) => ({ label: `test-${i}`, state: 'NEW', contributor: '' })),
} as ZodFlawType],
});

Expand Down

0 comments on commit af07b55

Please sign in to comment.