mirror of
https://github.com/Nezumi-2711/Foodify-Shipper.git
synced 2026-09-22 20:00:51 +00:00
Fix bug
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 1,
|
"versionCode": 1,
|
||||||
"versionName": "0.5.2",
|
"versionName": "1.0.0-beta",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ public class OrderDetailActivity extends AppCompatActivity {
|
|||||||
private static final String TAG = "OrderDetailActivity";
|
private static final String TAG = "OrderDetailActivity";
|
||||||
private static final String COMPLETE_STATUS = "COMPLETED";
|
private static final String COMPLETE_STATUS = "COMPLETED";
|
||||||
private static final String CANCEL_STATUS = "REJECT_DELIVERY";
|
private static final String CANCEL_STATUS = "REJECT_DELIVERY";
|
||||||
|
private static final String SHIPPING_STATUS = "SHIPPING";
|
||||||
Order order;
|
Order order;
|
||||||
Button btn_shipping, btn_call, btn_confirm_ship_completed, btn_cancel_order;
|
Button btn_shipping, btn_call, btn_confirm_ship_completed, btn_cancel_order;
|
||||||
TextView order_tracking_number, txt_user_name, txt_phone, txt_address, txt_distance, txt_status, txt_total,
|
TextView order_tracking_number, txt_user_name, txt_phone, txt_address, txt_distance, txt_status, txt_total,
|
||||||
@@ -147,7 +148,7 @@ public class OrderDetailActivity extends AppCompatActivity {
|
|||||||
startLocationService();
|
startLocationService();
|
||||||
|
|
||||||
//Change order status
|
//Change order status
|
||||||
FoodApiToken.apiService.changeStatusOrder(order.getUser().getId(), order.getId(), "SHIPPING").enqueue(new Callback<CustomResponse>() {
|
FoodApiToken.apiService.changeStatusOrder(order.getUser().getId(), order.getId(), SHIPPING_STATUS).enqueue(new Callback<CustomResponse>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<CustomResponse> call, Response<CustomResponse> response) {
|
public void onResponse(Call<CustomResponse> call, Response<CustomResponse> response) {
|
||||||
if(response.code() == 200){
|
if(response.code() == 200){
|
||||||
@@ -156,9 +157,10 @@ public class OrderDetailActivity extends AppCompatActivity {
|
|||||||
LatLng latLng = new LatLng(order.getLat(), order.getLng());
|
LatLng latLng = new LatLng(order.getLat(), order.getLng());
|
||||||
addGeofence(latLng, GEOFENCE_RADIUS);
|
addGeofence(latLng, GEOFENCE_RADIUS);
|
||||||
|
|
||||||
|
order.setStatus(SHIPPING_STATUS);
|
||||||
Common.CURRENT_ORDER = order;
|
Common.CURRENT_ORDER = order;
|
||||||
|
|
||||||
|
txt_status.setText(translateStatus(SHIPPING_STATUS));
|
||||||
|
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW,
|
Intent intent = new Intent(Intent.ACTION_VIEW,
|
||||||
Uri.parse("google.navigation:q=" + order.getLat() + "," + order.getLng() + "&mode=l"));
|
Uri.parse("google.navigation:q=" + order.getLat() + "," + order.getLng() + "&mode=l"));
|
||||||
|
|||||||
@@ -241,6 +241,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible"
|
||||||
>
|
>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|||||||
Reference in New Issue
Block a user