connected files
files connected to load
This commit is contained in:
@@ -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<PageResponse<CategoryDTO>> getAllCategories(
|
||||
@Query("page") int page,
|
||||
@Query("size") int size);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResponse<StoreDTO>> getAllStores(
|
||||
@Query("page") int page,
|
||||
@Query("size") int size);
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -65,54 +65,76 @@
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
|
||||
|
||||
<!-- Customer -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Customer Name"
|
||||
android:text="Customer"
|
||||
android:textColor="@color/text_dark"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etCustomerName"
|
||||
<Spinner
|
||||
android:id="@+id/spinnerCustomer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Enter customer name"
|
||||
android:inputType="text"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<!-- Store -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Pet Name"
|
||||
android:text="Store"
|
||||
android:textColor="@color/text_dark"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etApptPetName"
|
||||
<Spinner
|
||||
android:id="@+id/spinnerStore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Enter pet name"
|
||||
android:inputType="text"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<!-- Pet -->
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Service Type"
|
||||
android:text="Pet"
|
||||
android:textColor="@color/text_dark"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etServiceType"
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerPet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="e.g. Grooming, Vet Checkup"
|
||||
android:inputType="text"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<!-- Service -->
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Service"
|
||||
android:textColor="@color/text_dark"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerService"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<!-- Appointment Date -->
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -125,10 +147,14 @@
|
||||
android:id="@+id/etAppointmentDate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="YYYY-MM-DD"
|
||||
android:inputType="text"
|
||||
android:hint="Tap to select date"
|
||||
android:inputType="none"
|
||||
android:focusable="false"
|
||||
android:clickable="true"
|
||||
android:drawableEnd="@android:drawable/ic_menu_my_calendar"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<!-- Appointment Time-->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -137,14 +163,45 @@
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etAppointmentTime"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="e.g. 10:00 AM"
|
||||
android:inputType="text"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hour:"
|
||||
android:textColor="@color/text_dark"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginEnd="6dp"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerHour"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="16dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Min:"
|
||||
android:textColor="@color/text_dark"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginEnd="6dp"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerMinute"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Status -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
android:orientation="vertical"
|
||||
android:background="@color/primary_dark">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -133,6 +135,30 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- Appointments -->
|
||||
<LinearLayout
|
||||
android:id="@+id/drawerAppointments"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Appointments"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Adoptions -->
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawerAdoptions"
|
||||
android:layout_width="match_parent"
|
||||
@@ -152,25 +178,9 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawerAppointments"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Appointments"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Inventory -->
|
||||
<LinearLayout
|
||||
android:id="@+id/drawerInventory"
|
||||
android:layout_width="match_parent"
|
||||
@@ -190,6 +200,9 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- Product -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawerProducts"
|
||||
android:layout_width="match_parent"
|
||||
@@ -209,6 +222,78 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- Sale -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawerSale"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sale"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- PurchaseOrder -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawerPurchaseOrderView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PurchaseOrder"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ProductSupplier -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawerProductSupplier"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ProductSupplier"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
Reference in New Issue
Block a user