Add scheduled tariff synchronization and bulk update functionality
- Introduced `runScheduledSyncTariffs` function to handle tariff synchronization independently from VPS and payment sync. - Updated `syncFromBillmanager` to accept options for skipping tariff and VPS payment syncs. - Added new database columns for `syncTariffsIntervalMinutes` and `customFields` in settings. - Enhanced settings page to configure tariff sync interval. - Implemented bulk update functionality for VPS status and deletion in the VPS management page. - Updated various components to support new features, including sync log display and improved payment handling.
This commit is contained in:
@@ -128,6 +128,13 @@ export async function deleteRecord(collectionName, id) {
|
||||
return fetchCollection(collectionName)
|
||||
}
|
||||
|
||||
export async function bulkUpdateVps(ids, action, value) {
|
||||
return fetchApi('/api/vps/bulk', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify({ ids, action, value }),
|
||||
})
|
||||
}
|
||||
|
||||
export async function syncAccount(accountId) {
|
||||
return fetchApi(`/api/sync/${encodeURIComponent(accountId)}`, { method: 'POST' })
|
||||
}
|
||||
@@ -142,3 +149,7 @@ export async function testApiConnection(apiBaseUrl, apiCredentials) {
|
||||
body: JSON.stringify({ apiBaseUrl, apiCredentials }),
|
||||
})
|
||||
}
|
||||
|
||||
export async function fetchSyncStatus() {
|
||||
return fetchApi('/api/sync/status')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user