Add bulk poster filling endpoint and enhance show deletion options
Introduced a new endpoint for bulk filling collection posters, allowing for automatic assignment of posters to collections without existing images. Updated the DeleteShowCommand to include an option for cutting shows from future airings, enhancing the deletion process. Refactored related components and API calls to support these features, ensuring a seamless user experience. Additionally, updated localization strings to reflect the new functionalities and adjusted tests to verify correct behavior.
This commit is contained in:
@@ -115,8 +115,15 @@ export function ShowsPanel() {
|
||||
// Шоу к удалению: сначала спрашиваем про файлы, и только потом удаляем.
|
||||
const [toDelete, setToDelete] = useState<ShowSummaryDto | null>(null)
|
||||
const deleteMutation = useMutation({
|
||||
mutationFn: ({ id, withMedia }: { id: string; withMedia: boolean }) =>
|
||||
deleteShow(id, withMedia),
|
||||
mutationFn: ({
|
||||
id,
|
||||
withMedia,
|
||||
withSchedule,
|
||||
}: {
|
||||
id: string
|
||||
withMedia: boolean
|
||||
withSchedule: boolean
|
||||
}) => deleteShow(id, withMedia, withSchedule),
|
||||
onSuccess: () => {
|
||||
setToDelete(null)
|
||||
invalidate()
|
||||
@@ -337,7 +344,7 @@ export function ShowsPanel() {
|
||||
<DeleteShowDialog
|
||||
show={toDelete}
|
||||
pending={deleteMutation.isPending}
|
||||
onConfirm={(withMedia) => deleteMutation.mutate({ id: toDelete.id, withMedia })}
|
||||
onConfirm={(options) => deleteMutation.mutate({ id: toDelete.id, ...options })}
|
||||
onClose={() => setToDelete(null)}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user