feat: show affected subscriptions count on tariff deletion

Update delete mutation to use affected_subscriptions from API response.
Show contextual success notification with subscription count.
Add deleteSuccessWithSubscriptions translation key in all 4 locales.
This commit is contained in:
Fringg
2026-02-09 22:30:28 +03:00
parent 32998697c3
commit f10a02ceb6
6 changed files with 15 additions and 3 deletions

View File

@@ -208,7 +208,9 @@ export const tariffsApi = {
},
// Delete tariff
deleteTariff: async (tariffId: number): Promise<{ message: string }> => {
deleteTariff: async (
tariffId: number,
): Promise<{ message: string; affected_subscriptions: number }> => {
const response = await apiClient.delete(`/cabinet/admin/tariffs/${tariffId}`);
return response.data;
},