mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat: add drag-and-drop tariff sorting in admin panel
Implement DnD reorder for tariffs using @dnd-kit, matching the pattern from AdminPaymentMethods. Add updateOrder API method and i18n keys for all locales.
This commit is contained in:
@@ -231,6 +231,11 @@ export const tariffsApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Update tariff display order
|
||||
updateOrder: async (tariffIds: number[]): Promise<void> => {
|
||||
await apiClient.put('/cabinet/admin/tariffs/order', { tariff_ids: tariffIds });
|
||||
},
|
||||
|
||||
// Get available servers for selection
|
||||
getAvailableServers: async (): Promise<ServerInfo[]> => {
|
||||
const response = await apiClient.get('/cabinet/admin/tariffs/available-servers');
|
||||
|
||||
Reference in New Issue
Block a user