From cde635df573b6cc8886a5a03f0ec845234d5a23f Mon Sep 17 00:00:00 2001 From: Boris Djotov Date: Mon, 24 Mar 2025 15:11:14 +0100 Subject: [PATCH 1/7] Switch to work on emulator. --- .../mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt b/app/src/main/java/mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt index 3181765..e394726 100644 --- a/app/src/main/java/mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt +++ b/app/src/main/java/mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt @@ -18,7 +18,7 @@ import retrofit2.converter.gson.GsonConverterFactory import java.time.LocalDateTime object RetrofitClient { - private const val BASE_URL = "https://192.168.31.100:8443/" + private const val BASE_URL = "https://10.0.2.2:8443/" @SuppressLint("NewApi") val customGson: Gson = GsonBuilder() From 8a3a060c3c8b2056a117365754466ff55e4a4fc9 Mon Sep 17 00:00:00 2001 From: Boris Djotov Date: Mon, 24 Mar 2025 16:53:53 +0100 Subject: [PATCH 2/7] Started working on driver dashboard fragments and driver activity. Refactored and optimized xml files. --- .idea/navEditor.xml | 9 + .../my_distributor/data/api/RetrofitClient.kt | 5 + .../data/api/service/DashboardApiService.kt | 3 +- .../data/api/service/DeliveryApiService.kt | 10 + .../data/repository/CustomerRepository.kt | 2 +- .../data/repository/DeliveryRepository.kt | 27 + .../domain/dto/DriverDashboardData.kt | 5 + .../ui/activities/DriverActivity.kt | 24 +- .../ui/activities/LoginActivity.kt | 2 +- .../ui/adapters/DriverDeliveriesAdapter.kt | 49 + .../driver/DriverDashboardFragment.kt | 76 + .../ui/viewmodel/DriverDashboardViewModel.kt | 30 + .../DriverDashboardViewModelFactory.kt | 18 + app/src/main/res/drawable/app_logo.xml | 1531 +++++++++-------- .../main/res/drawable/baseline_delete_24.xml | 15 +- .../main/res/drawable/baseline_edit_24.xml | 15 +- app/src/main/res/drawable/ic_create_order.xml | 15 +- app/src/main/res/drawable/ic_dashboard.xml | 15 +- app/src/main/res/drawable/ic_profile.xml | 15 +- app/src/main/res/layout/activity_customer.xml | 3 +- app/src/main/res/layout/activity_driver.xml | 1 - app/src/main/res/layout/activity_manager.xml | 1 - .../main/res/layout/dialog_add_article.xml | 3 +- .../main/res/layout/fragment_create_order.xml | 3 +- .../layout/fragment_customer_dashboard.xml | 3 +- .../res/layout/fragment_delivery_detail.xml | 5 +- .../res/layout/fragment_driver_dashboard.xml | 30 + .../main/res/layout/fragment_order_detail.xml | 16 +- .../main/res/layout/fragment_order_review.xml | 13 +- .../res/layout/fragment_pro_forma_detail.xml | 5 +- app/src/main/res/layout/item_article.xml | 3 +- .../main/res/layout/item_driver_delivery.xml | 37 + app/src/main/res/layout/item_order.xml | 3 +- app/src/main/res/navigation/nav_graph.xml | 20 +- app/src/main/res/values-night/themes.xml | 2 +- app/src/main/res/values/strings.xml | 4 + app/src/main/res/values/styles.xml | 6 +- app/src/main/res/values/themes.xml | 2 +- 38 files changed, 1261 insertions(+), 765 deletions(-) create mode 100644 app/src/main/java/mk/ukim/finki/my_distributor/data/api/service/DeliveryApiService.kt create mode 100644 app/src/main/java/mk/ukim/finki/my_distributor/data/repository/DeliveryRepository.kt create mode 100644 app/src/main/java/mk/ukim/finki/my_distributor/domain/dto/DriverDashboardData.kt create mode 100644 app/src/main/java/mk/ukim/finki/my_distributor/ui/adapters/DriverDeliveriesAdapter.kt create mode 100644 app/src/main/java/mk/ukim/finki/my_distributor/ui/fragments/driver/DriverDashboardFragment.kt create mode 100644 app/src/main/java/mk/ukim/finki/my_distributor/ui/viewmodel/DriverDashboardViewModel.kt create mode 100644 app/src/main/java/mk/ukim/finki/my_distributor/ui/viewmodel/DriverDashboardViewModelFactory.kt create mode 100644 app/src/main/res/layout/fragment_driver_dashboard.xml create mode 100644 app/src/main/res/layout/item_driver_delivery.xml diff --git a/.idea/navEditor.xml b/.idea/navEditor.xml index 9c23fda..50ceae2 100644 --- a/.idea/navEditor.xml +++ b/.idea/navEditor.xml @@ -81,6 +81,15 @@ + diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt b/app/src/main/java/mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt index e394726..57e202d 100644 --- a/app/src/main/java/mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt +++ b/app/src/main/java/mk/ukim/finki/my_distributor/data/api/RetrofitClient.kt @@ -6,6 +6,7 @@ import com.google.gson.GsonBuilder import mk.ukim.finki.my_distributor.data.api.service.ArticleApiService import mk.ukim.finki.my_distributor.data.api.service.AuthApiService import mk.ukim.finki.my_distributor.data.api.service.DashboardApiService +import mk.ukim.finki.my_distributor.data.api.service.DeliveryApiService import mk.ukim.finki.my_distributor.data.api.service.OrderApiService import mk.ukim.finki.my_distributor.data.api.service.UserApiService import mk.ukim.finki.my_distributor.data.local.UserPreferences @@ -65,4 +66,8 @@ object RetrofitClient { fun getOrderApiService(userPreferences: UserPreferences): OrderApiService { return getRetrofit(userPreferences).create(OrderApiService::class.java) } + + fun getDeliveryApiService(userPreferences: UserPreferences): DeliveryApiService { + return getRetrofit(userPreferences).create(DeliveryApiService::class.java) + } } \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/data/api/service/DashboardApiService.kt b/app/src/main/java/mk/ukim/finki/my_distributor/data/api/service/DashboardApiService.kt index 4b2459c..29f63d5 100644 --- a/app/src/main/java/mk/ukim/finki/my_distributor/data/api/service/DashboardApiService.kt +++ b/app/src/main/java/mk/ukim/finki/my_distributor/data/api/service/DashboardApiService.kt @@ -1,11 +1,12 @@ package mk.ukim.finki.my_distributor.data.api.service import mk.ukim.finki.my_distributor.domain.dto.CustomerDashboardData +import mk.ukim.finki.my_distributor.domain.dto.DriverDashboardData import retrofit2.Response import retrofit2.http.GET import retrofit2.http.Path interface DashboardApiService { @GET("api/customer/{customerId}/dashboard") - suspend fun getDashboardData(@Path("customerId") customerId: Long): Response + suspend fun getCustomerDashboardData(@Path("customerId") customerId: Long): Response } \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/data/api/service/DeliveryApiService.kt b/app/src/main/java/mk/ukim/finki/my_distributor/data/api/service/DeliveryApiService.kt new file mode 100644 index 0000000..2b3942a --- /dev/null +++ b/app/src/main/java/mk/ukim/finki/my_distributor/data/api/service/DeliveryApiService.kt @@ -0,0 +1,10 @@ +package mk.ukim.finki.my_distributor.data.api.service + +import mk.ukim.finki.my_distributor.domain.dto.DeliveryDto +import retrofit2.Response +import retrofit2.http.GET + +interface DeliveryApiService { + @GET("api/driver/newDeliveries") + suspend fun getDriverNewDeliveries(): Response> +} \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/data/repository/CustomerRepository.kt b/app/src/main/java/mk/ukim/finki/my_distributor/data/repository/CustomerRepository.kt index b63a858..43bfd74 100644 --- a/app/src/main/java/mk/ukim/finki/my_distributor/data/repository/CustomerRepository.kt +++ b/app/src/main/java/mk/ukim/finki/my_distributor/data/repository/CustomerRepository.kt @@ -19,7 +19,7 @@ class CustomerRepository( return withContext(Dispatchers.IO) { try { - val response = dashboardApiService.getDashboardData(customerId) + val response = dashboardApiService.getCustomerDashboardData(customerId) if (response.isSuccessful) { val data = response.body() if (data != null) { diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/data/repository/DeliveryRepository.kt b/app/src/main/java/mk/ukim/finki/my_distributor/data/repository/DeliveryRepository.kt new file mode 100644 index 0000000..34698f5 --- /dev/null +++ b/app/src/main/java/mk/ukim/finki/my_distributor/data/repository/DeliveryRepository.kt @@ -0,0 +1,27 @@ +package mk.ukim.finki.my_distributor.data.repository + +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import mk.ukim.finki.my_distributor.data.api.service.DashboardApiService +import mk.ukim.finki.my_distributor.data.api.service.DeliveryApiService +import mk.ukim.finki.my_distributor.domain.dto.DeliveryDto + +class DeliveryRepository( + private val dashboardApiService: DeliveryApiService +) { + suspend fun getDriverDeliveries(): Result> { + return withContext(Dispatchers.IO) { + try { + val response = dashboardApiService.getDriverNewDeliveries() + if (response.isSuccessful) { + val deliveries = response.body() ?: emptyList() + Result.success(deliveries) + } else { + Result.failure(Exception("Error: ${response.code()} ${response.message()}")) + } + } catch (ex: Exception) { + Result.failure(ex) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/domain/dto/DriverDashboardData.kt b/app/src/main/java/mk/ukim/finki/my_distributor/domain/dto/DriverDashboardData.kt new file mode 100644 index 0000000..b1adc8d --- /dev/null +++ b/app/src/main/java/mk/ukim/finki/my_distributor/domain/dto/DriverDashboardData.kt @@ -0,0 +1,5 @@ +package mk.ukim.finki.my_distributor.domain.dto + +data class DriverDashboardData( + var newDeliveries: List +) \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/ui/activities/DriverActivity.kt b/app/src/main/java/mk/ukim/finki/my_distributor/ui/activities/DriverActivity.kt index 9a11a9e..e617d3d 100644 --- a/app/src/main/java/mk/ukim/finki/my_distributor/ui/activities/DriverActivity.kt +++ b/app/src/main/java/mk/ukim/finki/my_distributor/ui/activities/DriverActivity.kt @@ -5,17 +5,31 @@ import androidx.activity.enableEdgeToEdge import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat +import androidx.navigation.NavController +import androidx.navigation.fragment.NavHostFragment import mk.ukim.finki.my_distributor.R +import mk.ukim.finki.my_distributor.databinding.ActivityDriverBinding class DriverActivity : AppCompatActivity() { + + private lateinit var binding: ActivityDriverBinding + private lateinit var navController: NavController + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + + binding = ActivityDriverBinding.inflate(layoutInflater) + enableEdgeToEdge() setContentView(R.layout.activity_driver) - ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets -> - val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()) - v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom) - insets - } + + val navHostFragment = supportFragmentManager + .findFragmentById(R.id.nav_host_fragment) as NavHostFragment + navController = navHostFragment.navController + + } + + override fun onSupportNavigateUp(): Boolean { + return navController.navigateUp() || super.onSupportNavigateUp() } } \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/ui/activities/LoginActivity.kt b/app/src/main/java/mk/ukim/finki/my_distributor/ui/activities/LoginActivity.kt index 1b7d886..0e46a3e 100644 --- a/app/src/main/java/mk/ukim/finki/my_distributor/ui/activities/LoginActivity.kt +++ b/app/src/main/java/mk/ukim/finki/my_distributor/ui/activities/LoginActivity.kt @@ -65,7 +65,7 @@ class LoginActivity : AppCompatActivity() { finish() } - decoded.roles.contains("DRIVER") -> { + decoded.roles.contains("ROLE_DRIVER") -> { val intent = Intent(this, DriverActivity::class.java) startActivity(intent) finish() diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/ui/adapters/DriverDeliveriesAdapter.kt b/app/src/main/java/mk/ukim/finki/my_distributor/ui/adapters/DriverDeliveriesAdapter.kt new file mode 100644 index 0000000..f4d0793 --- /dev/null +++ b/app/src/main/java/mk/ukim/finki/my_distributor/ui/adapters/DriverDeliveriesAdapter.kt @@ -0,0 +1,49 @@ +package mk.ukim.finki.my_distributor.ui.adapters + +import android.annotation.SuppressLint +import android.view.LayoutInflater +import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView +import mk.ukim.finki.my_distributor.databinding.ItemDriverDeliveryBinding +import mk.ukim.finki.my_distributor.domain.dto.DeliveryDto + +class DriverDeliveriesAdapter( + private var deliveries: List, + private val onDeliveryClicked: (DeliveryDto) -> Unit +) : RecyclerView.Adapter() { + + inner class DeliveryViewHolder(private val binding: ItemDriverDeliveryBinding) : + RecyclerView.ViewHolder(binding.root) { + @SuppressLint("SetTextI18n") + fun bind(delivery: DeliveryDto) { + binding.deliveryDateTextView.text = "Delivery Date: ${delivery.delDate}" + binding.statusTextView.text = "Status: ${delivery.delStatus}" + binding.routeInfoTextView.text = "Route estimate" + binding.root.setOnClickListener { + onDeliveryClicked(delivery) + } + } + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): DeliveryViewHolder { + val binding = ItemDriverDeliveryBinding.inflate( + LayoutInflater.from(parent.context), + parent, + false + ) + return DeliveryViewHolder(binding) + } + + override fun onBindViewHolder(holder: DeliveryViewHolder, position: Int) { + holder.bind(deliveries[position]) + } + + override fun getItemCount(): Int { + return deliveries.size + } + + fun updateData(newDelivereis: List){ + deliveries = newDelivereis + notifyDataSetChanged() + } +} \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/ui/fragments/driver/DriverDashboardFragment.kt b/app/src/main/java/mk/ukim/finki/my_distributor/ui/fragments/driver/DriverDashboardFragment.kt new file mode 100644 index 0000000..93b0821 --- /dev/null +++ b/app/src/main/java/mk/ukim/finki/my_distributor/ui/fragments/driver/DriverDashboardFragment.kt @@ -0,0 +1,76 @@ +package mk.ukim.finki.my_distributor.ui.fragments.driver + +import androidx.fragment.app.viewModels +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.Toast +import androidx.navigation.fragment.findNavController +import androidx.recyclerview.widget.LinearLayoutManager +import mk.ukim.finki.my_distributor.R +import mk.ukim.finki.my_distributor.data.api.RetrofitClient +import mk.ukim.finki.my_distributor.data.local.UserPreferences +import mk.ukim.finki.my_distributor.data.repository.DeliveryRepository +import mk.ukim.finki.my_distributor.databinding.FragmentDriverDashboardBinding +import mk.ukim.finki.my_distributor.ui.adapters.DriverDeliveriesAdapter +import mk.ukim.finki.my_distributor.ui.viewmodel.DriverDashboardViewModel +import mk.ukim.finki.my_distributor.ui.viewmodel.DriverDashboardViewModelFactory + +class DriverDashboardFragment : Fragment() { + + private var _binding: FragmentDriverDashboardBinding? = null + private val binding get() = _binding!! + + private val deliveryRepository: DeliveryRepository by lazy { + DeliveryRepository( + RetrofitClient.getDeliveryApiService(UserPreferences.getInstance(requireContext())) + ) + } + + private val driverDashboardViewModel: DriverDashboardViewModel by viewModels { + DriverDashboardViewModelFactory(deliveryRepository) + } + + private lateinit var deliveriesAdapter: DriverDeliveriesAdapter + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + _binding = FragmentDriverDashboardBinding.inflate(inflater, container, false) + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + binding.deliveriesRecyclerView.layoutManager = LinearLayoutManager(requireContext()) + + deliveriesAdapter = DriverDeliveriesAdapter(emptyList()) { delivery -> + val action = DriverDashboardFragmentDirections + .actionDriverDashboardFragmentToDeliveryDetailFragment(delivery.id) + findNavController().navigate(action) + } + binding.deliveriesRecyclerView.adapter = deliveriesAdapter + + driverDashboardViewModel.deliveries.observe(viewLifecycleOwner) { deliveries -> + deliveriesAdapter.updateData(deliveries) + } + + driverDashboardViewModel.error.observe(viewLifecycleOwner) { errorMsg -> + Toast.makeText( + requireContext(), + errorMsg, + Toast.LENGTH_SHORT + ).show() + } + + driverDashboardViewModel.loadDriverDeliveries() + } + + override fun onDestroyView() { + super.onDestroyView() + _binding = null + } +} \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/ui/viewmodel/DriverDashboardViewModel.kt b/app/src/main/java/mk/ukim/finki/my_distributor/ui/viewmodel/DriverDashboardViewModel.kt new file mode 100644 index 0000000..39e5954 --- /dev/null +++ b/app/src/main/java/mk/ukim/finki/my_distributor/ui/viewmodel/DriverDashboardViewModel.kt @@ -0,0 +1,30 @@ +package mk.ukim.finki.my_distributor.ui.viewmodel + +import androidx.lifecycle.LiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import kotlinx.coroutines.launch +import mk.ukim.finki.my_distributor.data.repository.DeliveryRepository +import mk.ukim.finki.my_distributor.domain.dto.DeliveryDto + +class DriverDashboardViewModel( + private val repository: DeliveryRepository +) : ViewModel() { + + private val _deliveries = MutableLiveData>() + val deliveries: LiveData> get() = _deliveries + + private val _error = MutableLiveData() + val error: LiveData get() = _error + + fun loadDriverDeliveries(){ + viewModelScope.launch { + repository.getDriverDeliveries().onSuccess { list -> + _deliveries.value = list.sortedBy { it.delDate } + }.onFailure { ex -> + _error.value = ex.message ?: "An error occurred" + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/mk/ukim/finki/my_distributor/ui/viewmodel/DriverDashboardViewModelFactory.kt b/app/src/main/java/mk/ukim/finki/my_distributor/ui/viewmodel/DriverDashboardViewModelFactory.kt new file mode 100644 index 0000000..570b782 --- /dev/null +++ b/app/src/main/java/mk/ukim/finki/my_distributor/ui/viewmodel/DriverDashboardViewModelFactory.kt @@ -0,0 +1,18 @@ +package mk.ukim.finki.my_distributor.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelProvider +import mk.ukim.finki.my_distributor.data.repository.DeliveryRepository +import mk.ukim.finki.my_distributor.ui.fragments.driver.DriverDashboardFragment + +class DriverDashboardViewModelFactory( + private val repository: DeliveryRepository +) : ViewModelProvider.Factory { + override fun create(modelClass: Class): T { + if (modelClass.isAssignableFrom(DriverDashboardViewModel::class.java)) { + @Suppress("UNCHECKED_CAST") + return DriverDashboardViewModel(repository) as T + } + throw IllegalArgumentException("Unknown ViewModel class") + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable/app_logo.xml b/app/src/main/res/drawable/app_logo.xml index c32c1ec..f0e345b 100644 --- a/app/src/main/res/drawable/app_logo.xml +++ b/app/src/main/res/drawable/app_logo.xml @@ -4,706 +4,851 @@ android:height="200dp" android:viewportWidth="3710" android:viewportHeight="3710"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:pathData="M0,0h3710v3710h-3710z" + android:fillColor="#FFFFFF" /> - - - + android:pathData="M3211.6,1649.1c-75.8,-495.9 -386.4,-1105.2 -1000.1,-1169c0,0 -466,-56.7 -925.3,29.2c-272.6,51 -511.7,202.7 -662.9,420.9c-151.3,218.1 -201.8,484.1 -140.5,737.6c39.8,164.7 66.7,335.1 59.4,504.4c-12.9,294.5 -5.5,569.5 280.4,745.1c255.2,156.8 576.4,295.2 882.8,319.4c208.2,16.5 441.8,-10.2 642.5,-64.4C3370.7,2896 3287.3,2145 3211.6,1649.1z" + android:fillColor="#F4F7FA" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + android:pathData="M2689.6,2702.4l0,-1747.4l-781,0l-234.4,659.8l234.4,1087.5z" + android:fillColor="#D8DEE8" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + android:pathData="M1857.6,3096.6a62.1,89 0,1 0,124.1 0a62.1,89 0,1 0,-124.1 0z" + android:fillColor="#D8DEE8" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + android:pathData="M2753.5,2960.1a51.5,77.5 0,1 0,102.9 0a51.5,77.5 0,1 0,-102.9 0z" + android:fillColor="#D8DEE8" /> + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + android:pathData="M2625.8,2353.1c108.7,-137 324.8,-35.9 433.8,-189.6c24.6,-34.6 41.7,-70 53.6,-103.4c7.2,4.4 12,12.2 12,21.2v658.8c0,12.4 -9.2,22.9 -21.5,24.6l-676.7,93.7c42.7,-46.7 85.6,-106.3 116.7,-180.9C2611.9,2513.9 2554.8,2442.6 2625.8,2353.1z" + android:strokeAlpha="0.3" + android:fillAlpha="0.3"> + + + + + + + + + + + + + + + - - - + android:pathData="M1261.2,2793.6l8.4,9.2c-3.6,102.1 -25.8,138.2 161.3,157.4c187.1,19.2 181.4,-137.9 181.4,-137.9l245.4,-107l204.9,-322.6c40.7,-32.8 111.7,-41.7 159.9,-43.8c10,7.1 17.3,17.6 20.1,30.1c20.3,90.9 67.5,353.1 14.8,634.9c-3.9,21 -20.8,37.2 -41.8,40.5l-182.1,29.1c0,0 -1.8,-172.4 -89.3,-183.7c-87.5,-11.3 -169.5,70.7 -175,212.9c0,0 -189.6,25.5 -475.8,-40.1c0,0 -38.3,-8.2 -54.7,-51.5l12.9,-198.3C1252.2,2812.2 1255.6,2802.2 1261.2,2793.6z" + android:strokeAlpha="0.6" + android:fillAlpha="0.6"> + + + + + + + + + + + + + + + - - - + android:pathData="M1628.8,2547.2c105.8,-41.6 193.7,7.7 266.4,-50.5c28,-22.4 44.7,-53.4 54.5,-86.2l37.7,2.3c12.3,0.7 19.5,14.3 13,24.9l-140.3,230.4c-6.6,10.9 -19,16.9 -31.7,15.4l-322.4,-39.5C1548.4,2589 1592,2561.7 1628.8,2547.2z" + android:strokeAlpha="0.3" + android:fillColor="#FFFFFF" + android:fillAlpha="0.3" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:pathData="M1635.1,2993.6c16.3,-1.6 30.1,11.4 29.8,27.8c-0.8,34.9 2.8,71.4 5.9,96.1c-83.2,0.2 -214.7,-7.6 -377.5,-45c0,0 -38.3,-8.2 -54.7,-51.5l4.9,-75.4C1360.8,3012.2 1558.4,3001.1 1635.1,2993.6z" + android:strokeAlpha="0.6" + android:fillAlpha="0.6"> + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/baseline_delete_24.xml b/app/src/main/res/drawable/baseline_delete_24.xml index 883bcaa..ee1fd2d 100644 --- a/app/src/main/res/drawable/baseline_delete_24.xml +++ b/app/src/main/res/drawable/baseline_delete_24.xml @@ -1,5 +1,12 @@ - - - - + + + + diff --git a/app/src/main/res/drawable/baseline_edit_24.xml b/app/src/main/res/drawable/baseline_edit_24.xml index 3c53db7..8cf71ea 100644 --- a/app/src/main/res/drawable/baseline_edit_24.xml +++ b/app/src/main/res/drawable/baseline_edit_24.xml @@ -1,5 +1,12 @@ - - - - + + + + diff --git a/app/src/main/res/drawable/ic_create_order.xml b/app/src/main/res/drawable/ic_create_order.xml index 3c53db7..8cf71ea 100644 --- a/app/src/main/res/drawable/ic_create_order.xml +++ b/app/src/main/res/drawable/ic_create_order.xml @@ -1,5 +1,12 @@ - - - - + + + + diff --git a/app/src/main/res/drawable/ic_dashboard.xml b/app/src/main/res/drawable/ic_dashboard.xml index 20cb4d6..5861b75 100644 --- a/app/src/main/res/drawable/ic_dashboard.xml +++ b/app/src/main/res/drawable/ic_dashboard.xml @@ -1,5 +1,12 @@ - - - - + + + + diff --git a/app/src/main/res/drawable/ic_profile.xml b/app/src/main/res/drawable/ic_profile.xml index f4cc418..4c9dede 100644 --- a/app/src/main/res/drawable/ic_profile.xml +++ b/app/src/main/res/drawable/ic_profile.xml @@ -1,5 +1,12 @@ - - - - + + + + diff --git a/app/src/main/res/layout/activity_customer.xml b/app/src/main/res/layout/activity_customer.xml index 0ed2467..2ff9d2e 100644 --- a/app/src/main/res/layout/activity_customer.xml +++ b/app/src/main/res/layout/activity_customer.xml @@ -1,6 +1,5 @@ - - - - diff --git a/app/src/main/res/layout/fragment_delivery_detail.xml b/app/src/main/res/layout/fragment_delivery_detail.xml index 0f4dea0..7463aa1 100644 --- a/app/src/main/res/layout/fragment_delivery_detail.xml +++ b/app/src/main/res/layout/fragment_delivery_detail.xml @@ -1,6 +1,5 @@ - + app:layout_constraintStart_toStartOf="parent" /> diff --git a/app/src/main/res/layout/fragment_driver_dashboard.xml b/app/src/main/res/layout/fragment_driver_dashboard.xml new file mode 100644 index 0000000..50c9d79 --- /dev/null +++ b/app/src/main/res/layout/fragment_driver_dashboard.xml @@ -0,0 +1,30 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_order_detail.xml b/app/src/main/res/layout/fragment_order_detail.xml index 1f462bd..9ecfe77 100644 --- a/app/src/main/res/layout/fragment_order_detail.xml +++ b/app/src/main/res/layout/fragment_order_detail.xml @@ -1,7 +1,5 @@ - + android:text="@string/order_date" /> + android:text="@string/order_sum" /> + android:text="@string/payment_date" /> + android:text="@string/comment" /> + android:text="@string/order_status" /> + android:layout_margin="4dp" /> diff --git a/app/src/main/res/layout/fragment_order_review.xml b/app/src/main/res/layout/fragment_order_review.xml index 9b8e2f4..38e4105 100644 --- a/app/src/main/res/layout/fragment_order_review.xml +++ b/app/src/main/res/layout/fragment_order_review.xml @@ -1,6 +1,5 @@ - + android:layout_weight="1" /> + + android:text="@string/pro_forma" /> + + android:text="@string/cash" /> + android:layout_margin="4dp" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_pro_forma_detail.xml b/app/src/main/res/layout/fragment_pro_forma_detail.xml index eb53bfd..2cbc73e 100644 --- a/app/src/main/res/layout/fragment_pro_forma_detail.xml +++ b/app/src/main/res/layout/fragment_pro_forma_detail.xml @@ -1,6 +1,5 @@ - + app:layout_constraintStart_toStartOf="parent" /> diff --git a/app/src/main/res/layout/item_article.xml b/app/src/main/res/layout/item_article.xml index c21eb0c..513a888 100644 --- a/app/src/main/res/layout/item_article.xml +++ b/app/src/main/res/layout/item_article.xml @@ -1,6 +1,5 @@ - + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_order.xml b/app/src/main/res/layout/item_order.xml index 1710f03..0ee3257 100644 --- a/app/src/main/res/layout/item_order.xml +++ b/app/src/main/res/layout/item_order.xml @@ -1,6 +1,5 @@ - + + + + + + android:label="Profile" /> + app:destination="@+id/orderDetailFragment" /> + app:destination="@+id/deliveryDetailFragment" /> + app:destination="@+id/proFormaDetailFragment" /> + --> + + +