From 7dae71965a89fc4afe053216b9b2f4230c3f850c Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 13 Dec 2025 20:02:18 -0800 Subject: [PATCH] extract DeleteTeamDialog component --- .../dialogs/DeleteTeamDialog.svelte | 47 +++++++++++ src/lib/components/party/Party.svelte | 78 ++++++------------- 2 files changed, 70 insertions(+), 55 deletions(-) create mode 100644 src/lib/components/dialogs/DeleteTeamDialog.svelte diff --git a/src/lib/components/dialogs/DeleteTeamDialog.svelte b/src/lib/components/dialogs/DeleteTeamDialog.svelte new file mode 100644 index 00000000..4a8cd8a6 --- /dev/null +++ b/src/lib/components/dialogs/DeleteTeamDialog.svelte @@ -0,0 +1,47 @@ + + + + {#snippet children()} + + +

Are you sure you want to permanently delete this team?

+
+ + {/snippet} +
+ + diff --git a/src/lib/components/party/Party.svelte b/src/lib/components/party/Party.svelte index ca2a8601..63447ee6 100644 --- a/src/lib/components/party/Party.svelte +++ b/src/lib/components/party/Party.svelte @@ -63,6 +63,7 @@ import { transformSkillsToArray } from '$lib/utils/jobSkills' import { findNextEmptySlot, SLOT_NOT_FOUND } from '$lib/utils/gridHelpers' import ConflictDialog from '$lib/components/dialogs/ConflictDialog.svelte' + import DeleteTeamDialog from '$lib/components/dialogs/DeleteTeamDialog.svelte' import type { ConflictData } from '$lib/types/api/conflict' import { isConflictResponse, createConflictData } from '$lib/types/api/conflict' @@ -743,9 +744,11 @@ transcendenceStep?: number, _editKey?: string ) { + if (uncapLevel === undefined) return try { await updateCharacterUncap.mutateAsync({ id: gridCharacterId, + partyId: party.id, partyShortcode: party.shortcode, uncapLevel, transcendenceStep @@ -761,9 +764,11 @@ transcendenceStep?: number, _editKey?: string ) { + if (uncapLevel === undefined) return try { await updateWeaponUncap.mutateAsync({ id: gridWeaponId, + partyId: party.id, partyShortcode: party.shortcode, uncapLevel, transcendenceStep @@ -779,9 +784,11 @@ transcendenceStep?: number, _editKey?: string ) { + if (uncapLevel === undefined) return try { await updateSummonUncap.mutateAsync({ id: gridSummonId, + partyId: party.id, partyShortcode: party.shortcode, uncapLevel, transcendenceStep @@ -1021,42 +1028,26 @@ /> - - {#snippet children()} - - - {/snippet} - + (editDialogOpen = false)} + cancelDisabled={loading} + primaryAction={{ + label: loading ? 'Saving...' : 'Save', + onclick: savePartyTitle, + disabled: loading || !editingTitle.trim() + }} + /> {/snippet} - - {#snippet children()} - - -
-

Are you sure you want to delete this party?

-

{party.name || 'Unnamed Party'}

-

⚠️ This action cannot be undone.

-
-
- - {#snippet children()} - - - {/snippet} - - {/snippet} -
+ (deleteDialogOpen = false)} +/>