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()} - (editDialogOpen = false)} disabled={loading}> - Cancel - - - {loading ? 'Saving...' : 'Save'} - - {/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()} - (deleteDialogOpen = false)} disabled={deleting}> - Cancel - - - {deleting ? 'Deleting...' : 'Delete Party'} - - {/snippet} - - {/snippet} - + (deleteDialogOpen = false)} +/>
Are you sure you want to permanently delete this team?
Are you sure you want to delete this party?
{party.name || 'Unnamed Party'}
⚠️ This action cannot be undone.