filter data farmer portal

This commit is contained in:
2026-03-17 14:14:35 +07:00
parent 8ca1307c21
commit 2a22320b15
3 changed files with 67 additions and 28 deletions
+4 -2
View File
@@ -149,11 +149,13 @@ export const OfflineService = {
}
}
},
downloadFromServer: async () => {
downloadFromServer: async (user) => {
const token = localStorage.getItem('access_token');
const baseURL = import.meta.env.VITE_BASE44_API_URL.replace(/\/+$/, "");
console.log(user, "Userr")
const syncConfigs = [
{ endpoint: 'auth/profile', table: db.farmers },
{ endpoint: `auth/profile/1`, table: db.farmers },
{ endpoint: 'map/lahan', table: db.lands },
{ endpoint: 'map/tanaman', table: db.plants },
{ endpoint: 'map/panen', table: db.harvest},