mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
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:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user