diff --git a/android/app/src/main/java/com/example/petstoremobile/api/CategoryApi.java b/android/app/src/main/java/com/example/petstoremobile/api/CategoryApi.java new file mode 100644 index 00000000..d1084482 --- /dev/null +++ b/android/app/src/main/java/com/example/petstoremobile/api/CategoryApi.java @@ -0,0 +1,15 @@ +package com.example.petstoremobile.api; + +import com.example.petstoremobile.dtos.CategoryDTO; +import com.example.petstoremobile.dtos.PageResponse; +import retrofit2.Call; +import retrofit2.http.GET; +import retrofit2.http.Query; + +public interface CategoryApi { + + @GET("api/v1/categories") + Call> getAllCategories( + @Query("page") int page, + @Query("size") int size); +} \ No newline at end of file diff --git a/android/app/src/main/java/com/example/petstoremobile/api/RetrofitClient.java b/android/app/src/main/java/com/example/petstoremobile/api/RetrofitClient.java index 8a7f48bc..250dabb6 100644 --- a/android/app/src/main/java/com/example/petstoremobile/api/RetrofitClient.java +++ b/android/app/src/main/java/com/example/petstoremobile/api/RetrofitClient.java @@ -51,6 +51,34 @@ public class RetrofitClient { return getClient(context).create(SupplierApi.class); } + public static AdoptionApi getAdoptionApi(Context context) { + return getClient(context).create(AdoptionApi.class); + } + + public static AppointmentApi getAppointmentApi(Context context) { + return getClient(context).create(AppointmentApi.class); + } + + public static ProductApi getProductApi(Context context) { + return getClient(context).create(ProductApi.class); + } + + public static SaleApi getSaleApi(Context context) { + return getClient(context).create(SaleApi.class); + } + + public static PurchaseOrderApi getPurchaseOrderApi(Context context) { + return getClient(context).create(PurchaseOrderApi.class); + } + + public static ProductSupplierApi getProductSupplierApi(Context context) { + return getClient(context).create(ProductSupplierApi.class); + } + + public static InventoryApi getInventoryApi(Context context) { + return getClient(context).create(InventoryApi.class); + } + public static AuthApi getAuthApi(Context context) { return getClient(context).create(AuthApi.class); } @@ -67,4 +95,13 @@ public class RetrofitClient { return getClient(context).create(MessageApi.class); } + + public static StoreApi getStoreApi(Context context) { + return getClient(context).create(StoreApi.class); + } + + public static CategoryApi getCategoryApi(Context context) { + return getClient(context).create(CategoryApi.class); + } + } \ No newline at end of file diff --git a/android/app/src/main/java/com/example/petstoremobile/api/StoreApi.java b/android/app/src/main/java/com/example/petstoremobile/api/StoreApi.java new file mode 100644 index 00000000..8fe7f9c1 --- /dev/null +++ b/android/app/src/main/java/com/example/petstoremobile/api/StoreApi.java @@ -0,0 +1,16 @@ +package com.example.petstoremobile.api; + +import com.example.petstoremobile.dtos.PageResponse; +import com.example.petstoremobile.dtos.StoreDTO; + +import retrofit2.Call; +import retrofit2.http.GET; +import retrofit2.http.Query; + +public interface StoreApi { + + @GET("api/v1/stores") + Call> getAllStores( + @Query("page") int page, + @Query("size") int size); +} diff --git a/android/app/src/main/java/com/example/petstoremobile/dtos/CategoryDTO.java b/android/app/src/main/java/com/example/petstoremobile/dtos/CategoryDTO.java new file mode 100644 index 00000000..6596845b --- /dev/null +++ b/android/app/src/main/java/com/example/petstoremobile/dtos/CategoryDTO.java @@ -0,0 +1,29 @@ +package com.example.petstoremobile.dtos; + +public class CategoryDTO { + private Long categoryId; + private String categoryName; + private String categoryType; + private String createdAt; + private String updatedAt; + + public Long getCategoryId() { + return categoryId; + } + + public String getCategoryName() { + return categoryName; + } + + public String getCategoryType() { + return categoryType; + } + + public String getCreatedAt() { + return createdAt; + } + + public String getUpdatedAt() { + return updatedAt; + } +} \ No newline at end of file diff --git a/android/app/src/main/res/layout/fragment_appointment_detail.xml b/android/app/src/main/res/layout/fragment_appointment_detail.xml index 3396f459..ef1d8b33 100644 --- a/android/app/src/main/res/layout/fragment_appointment_detail.xml +++ b/android/app/src/main/res/layout/fragment_appointment_detail.xml @@ -65,54 +65,76 @@ android:layout_gravity="end" android:layout_marginBottom="8dp"/> + + + - + - + + - + + + + + + + + + + + + - + android:orientation="horizontal" + android:layout_marginBottom="16dp" + android:gravity="center_vertical"> + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file