Skip to content
Merged

Deploy #1826

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/frontend/components/home/table/row/HomeTableRowTask.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
import sortBy from 'lodash/sortBy';

import { taskMap } from '@/data/tasks';
import { QuestStatus } from '@/enums/quest-status';
import { uiIcons } from '@/shared/icons/ui';
Expand All @@ -7,6 +9,7 @@
import type { CharacterProps } from '@/types/props';

import IconifyWrapper from '@/shared/components/images/IconifyWrapper.svelte';
import QuestStatusIcon from '@/shared/components/icons/QuestStatusIcon.svelte';

type Props = CharacterProps & {
fullTaskName: string;
Expand All @@ -24,6 +27,10 @@
return charChore.skipped || oof?.alwaysStarted === true || charChore?.status > 0;
})
);

let sortedChores = $derived(
task.sortByExpiry && charTask && sortBy(charTask.chores, (chore) => chore.expiresAt)
);
</script>

<style lang="scss">
Expand Down Expand Up @@ -66,6 +73,10 @@
{:else}
Done
{/if}
{:else if task.showRowStars}
{#each sortedChores as sortedChore}
<QuestStatusIcon status={sortedChore.status} useStatusColors={true} />
{/each}
{:else}
{charTask.countCompleted} / {charTask.countTotal}
{/if}
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/data/tasks/06-legion/emissaryQuests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const legionEmissaryQuests: Task = {
name: '[Legion] Emissaries',
shortName: 'Leg',
showExpiry: true,
showRowStars: true,
showSeparate: true,
sortByExpiry: true,
chores: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const bfaEmissaryQuests: Task = {
name: '[BfA] Emissaries',
shortName: 'BfA',
showExpiry: true,
showRowStars: true,
showSeparate: true,
sortByExpiry: true,
chores: [
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/data/tasks/08-shadowlands/callings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const slCallings: Task = {
shortName: 'SL',
minimumLevel: 60,
showExpiry: true,
showRowStars: true,
showSeparate: true,
sortByExpiry: true,
chores: [
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/types/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type Task = {
requiredHolidays?: Holiday[];
requiredQuestId?: number;
showExpiry?: boolean;
showRowStars?: boolean;
showSeparate?: boolean;
sortByExpiry?: boolean;
sumChores?: boolean;
Expand Down
Loading