Muhamad_Syaroful_Anam/agrilinkvocpro
Cutiful 94b655481c feat: add ClusterViewModel for recommendation feature
This commit introduces `ClusterViewModel` to manage the state and logic for fetching growth recipe recommendations.

Key functionalities:
- Manages a `StateFlow` named `_state` to represent the current state of the recommendation request (Idle, Loading, Success, Error).
- Provides a public `state` flow for observing changes in the recommendation request.
- Implements a `getRecommendation()` function that:
    - Sets the state to `Loading`.
    - Calls the `getRecommendation()` method of the `ClusteringRepository`.
    - If successful and data is present, updates the state to `Success` with the last item from the response.
    - If the response is empty, updates the state to `Error` with a "Data tidak ditemukan" message.
    - Catches exceptions, maps them to user-friendly error messages, and updates the state to `Error`.
    - Logs detailed error messages if fetching data fails.
2025-07-10 18:18:07 +07:00
..
.idea feat: implement detail screen for NPK and DHT sensors 2025-06-29 07:53:51 +07:00
.kotlin/errors feat: Add new drawables and project configuration files 2025-05-19 21:22:20 +07:00
app Bump version to 1.0.1 (13) 2025-07-10 18:17:07 +07:00
commodity_price_prediction_feature feat: add some library 2025-06-29 07:54:37 +07:00
control_feature feat: implement register feature 2025-07-05 11:26:07 +07:00
gradle feat: implement detail screen for NPK and DHT sensors 2025-06-29 07:53:51 +07:00
growth_recipe_feature feat: add ClusterViewModel for recommendation feature 2025-07-10 18:18:07 +07:00
plant_disease_detection_feature feat: enhance UI/UX of plant disease detection feature 2025-07-05 11:25:42 +07:00
.gitignore initial commit 🥗 2025-01-08 14:04:19 +07:00
agrilinkvocpro-keystore.jks feat: Add new drawables and project configuration files 2025-05-19 21:22:20 +07:00
build.gradle.kts feat: update build.gradle.kts 2025-06-12 08:45:59 +07:00
gradle.properties initial commit 🥗 2025-01-08 14:04:19 +07:00
gradlew initial commit 🥗 2025-01-08 14:04:19 +07:00
gradlew.bat initial commit 🥗 2025-01-08 14:04:19 +07:00
settings.gradle.kts feat: integrate plant disease detection, growth recipe, and commodity price prediction features 2025-06-12 11:43:45 +07:00