refactoring added customer fragment
This commit is contained in:
parent
4982aae836
commit
3e2928d3a9
|
|
@ -24,7 +24,7 @@ android {
|
|||
multiDexEnabled true
|
||||
|
||||
resValue "string", "default_account_iccid", properties.getProperty("default.account.iccid", "")
|
||||
resValue "string", "default_webserver_url", properties.getProperty("default.webserver.url", "UNSET")
|
||||
resValue "string", "default_webserver_url", properties.getProperty("default.webserver.url", "http://10.0.0.1:8080")
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ package eu.csc.vehown.services.rest.vehownserver;
|
|||
import eu.csc.ODPAppVehOwnServer.models.VehicleBrandDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.data.LanguageDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.data.PropulsionTypeDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.regist.CustomerDeviceDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.regist.CustomerVehicleDto;
|
||||
import eu.csc.vehown.data.model.Customer;
|
||||
import eu.csc.vehown.data.model.CustomerDevice;
|
||||
import eu.csc.vehown.data.model.Vehicle;
|
||||
import retrofit2.Call;
|
||||
|
||||
|
|
@ -23,4 +25,7 @@ public interface IVehOwnAppClient {
|
|||
Call<Void> deregisterCustomerVehicle(String vin) throws IOException;
|
||||
|
||||
Call<List<CustomerVehicleDto>> getCustomerVehicles() throws IOException;
|
||||
|
||||
|
||||
Call<CustomerDeviceDto> registerCustomerDevice(String serialnumber);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@ import eu.csc.ODPAppVehOwnServer.client.service.CustomerService;
|
|||
import eu.csc.ODPAppVehOwnServer.models.VehicleBrandDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.data.LanguageDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.data.PropulsionTypeDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.regist.CustomerDeviceDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.regist.CustomerVehicleDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.regist.UserVehicleRegistrationDto;
|
||||
import eu.csc.vehown.data.model.Customer;
|
||||
import eu.csc.vehown.data.model.CustomerDevice;
|
||||
import eu.csc.vehown.data.model.Vehicle;
|
||||
import retrofit2.Call;
|
||||
|
||||
|
|
@ -72,4 +74,9 @@ public class ServerVehicleApiClient implements IVehOwnAppClient {
|
|||
public Call<List<CustomerVehicleDto>> getCustomerVehicles() throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Call<CustomerDeviceDto> registerCustomerDevice(String serialnumber) {
|
||||
return customerService.registerCustomerDevices(serialnumber);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import eu.csc.ODPAppVehOwnServer.models.VehicleBrandDto;
|
|||
import eu.csc.ODPAppVehOwnServer.models.VehicleModelDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.data.LanguageDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.data.PropulsionTypeDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.regist.CustomerDeviceDto;
|
||||
import eu.csc.ODPAppVehOwnServer.models.regist.CustomerVehicleDto;
|
||||
import eu.csc.vehown.data.model.Customer;
|
||||
import eu.csc.vehown.data.model.CustomerDevice;
|
||||
import eu.csc.vehown.data.model.Vehicle;
|
||||
import eu.csc.vehown.services.rest.vehownserver.pub.OfflineDummyCall;
|
||||
import lombok.var;
|
||||
|
|
@ -158,6 +160,14 @@ public class VehOwnAppClientDummy implements IVehOwnAppClient {
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Call<CustomerDeviceDto> registerCustomerDevice(String body) {
|
||||
var body2 = new CustomerDeviceDto();
|
||||
|
||||
body2.setSerialNumber(body);
|
||||
return OfflineDummyCall.getInstance(body2);
|
||||
}
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public class BaseRegistrationActivity extends AppCompatActivity {
|
|||
R.id.navigation_home,
|
||||
R.id.navigation_dashboard,
|
||||
R.id.navigation_notifications,
|
||||
R.id.navigation_register_customer,
|
||||
R.id.navigation_register_device)
|
||||
.build();
|
||||
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_activity_base_registration);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
package eu.csc.vehown.ui.dialogs;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import eu.csc.vehown.R;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link DialogInfoFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class DialogInfoFragment extends DialogFragment {
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
public DialogInfoFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment DialogInfoFragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static DialogInfoFragment newInstance(String param1, String param2) {
|
||||
DialogInfoFragment fragment = new DialogInfoFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_dialog_info, container, false);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,8 +5,10 @@ import android.content.IntentFilter;
|
|||
import android.net.ConnectivityManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.StrictMode;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
|
|
@ -14,7 +16,9 @@ import androidx.navigation.NavController;
|
|||
import androidx.navigation.Navigation;
|
||||
import androidx.navigation.ui.AppBarConfiguration;
|
||||
import androidx.navigation.ui.NavigationUI;
|
||||
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
|
||||
import eu.csc.log.CSCLog4jFactory;
|
||||
import eu.csc.vehown.R;
|
||||
import eu.csc.vehown.broadcast.VehicleEventReceivedReceiver;
|
||||
|
|
@ -106,6 +110,8 @@ public class MainActivity extends AppCompatActivity {
|
|||
Intent intent = null;
|
||||
switch (item.getItemId()) {
|
||||
case R.id.nav_register_base:
|
||||
Log.d("MainA", "Starting Base Activity")
|
||||
;
|
||||
intent = new Intent(this, BaseRegistrationActivity.class);
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -216,6 +216,20 @@ public abstract class Helper {
|
|||
});
|
||||
}
|
||||
|
||||
public static void showErrorDialog(@NotNull Context context, @NotNull String title, @NotNull String message, IDialogOkHandler okHandler) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
AlertDialog alertDialog = builder.create();
|
||||
alertDialog.setIcon( R.drawable.ic_dlg_warning);
|
||||
alertDialog.setTitle(title);
|
||||
alertDialog.setMessage(message);
|
||||
alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, "OK", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
if (okHandler != null) okHandler.onOk();
|
||||
});
|
||||
alertDialog.show();
|
||||
|
||||
}
|
||||
|
||||
private static boolean fieldsAreSet(List<View> fields) {
|
||||
for (View field : fields) {
|
||||
if (field instanceof EditText) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package eu.csc.vehown.ui.pub;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.widget.DatePicker;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
|
@ -16,4 +19,27 @@ public class UIUtils {
|
|||
public static void startActitivity(FragmentActivity activity, Intent intent) {
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void showDialog(Context context, String title, String message) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
|
||||
// 2. Chain together various setter methods to set the dialog characteristics
|
||||
builder.setMessage(message)
|
||||
.setTitle(title);
|
||||
|
||||
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
// User clicked OK button
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton("Abort", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
// User cancelled the dialog
|
||||
}
|
||||
});
|
||||
// 3. Get the <code><a href="/reference/android/app/AlertDialog.html">AlertDialog</a></code> from <code><a href="/reference/android/app/AlertDialog.Builder.html#create()">create()</a></code>
|
||||
AlertDialog dialog = builder.create();
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package eu.csc.vehown.ui.registration.customer;
|
||||
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import eu.csc.vehown.R;
|
||||
import eu.csc.vehown.databinding.DeviceRegistrationFragmentBinding;
|
||||
import eu.csc.vehown.databinding.FragmentCustomerRegistrationFragmentBinding;
|
||||
import eu.csc.vehown.ui.registration.devices.DeviceRegistrationViewModel;
|
||||
import eu.csc.vehown.ui.viewmodels.AppViewModelFactory;
|
||||
|
||||
public class FragmentCustomerRegistration extends Fragment {
|
||||
|
||||
private FragmentCustomerRegistrationViewModel mViewModel;
|
||||
|
||||
private FragmentCustomerRegistrationFragmentBinding binding;
|
||||
public static FragmentCustomerRegistration newInstance() {
|
||||
return new FragmentCustomerRegistration();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
|
||||
binding = FragmentCustomerRegistrationFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
|
||||
View root = binding.getRoot();
|
||||
|
||||
mViewModel = new ViewModelProvider(this, new AppViewModelFactory(getContext()))
|
||||
.get(FragmentCustomerRegistrationViewModel.class);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
mViewModel = new ViewModelProvider(this).get(FragmentCustomerRegistrationViewModel.class);
|
||||
// TODO: Use the ViewModel
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package eu.csc.vehown.ui.registration.customer;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import eu.csc.vehown.persist.sharedPreferences.LocalStorageClient;
|
||||
import eu.csc.vehown.ui.viewmodels.AbstractBaseViewModel;
|
||||
|
||||
public class FragmentCustomerRegistrationViewModel extends AbstractBaseViewModel {
|
||||
public FragmentCustomerRegistrationViewModel(LocalStorageClient localStorage, Context context) {
|
||||
super(localStorage);
|
||||
}
|
||||
// TODO: Implement the ViewModel
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package eu.csc.vehown.ui.registration.customer;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import eu.csc.vehown.databinding.FragmentItemListDialogListDialog2Binding;
|
||||
import eu.csc.vehown.databinding.FragmentItemListDialogListDialogItem2Binding;
|
||||
|
||||
/**
|
||||
* <p>A fragment that shows a list of items as a modal bottom sheet.</p>
|
||||
* <p>You can show this modal bottom sheet from your activity like this:</p>
|
||||
* <pre>
|
||||
* ItemListDialogFragment.newInstance(30).show(getSupportFragmentManager(), "dialog");
|
||||
* </pre>
|
||||
*/
|
||||
public class ItemListDialogFragment extends BottomSheetDialogFragment {
|
||||
|
||||
// TODO: Customize parameter argument names
|
||||
private static final String ARG_ITEM_COUNT = "item_count";
|
||||
private FragmentItemListDialogListDialog2Binding binding;
|
||||
|
||||
// TODO: Customize parameters
|
||||
public static ItemListDialogFragment newInstance(int itemCount) {
|
||||
final ItemListDialogFragment fragment = new ItemListDialogFragment();
|
||||
final Bundle args = new Bundle();
|
||||
args.putInt(ARG_ITEM_COUNT, itemCount);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
|
||||
binding = FragmentItemListDialogListDialog2Binding.inflate(inflater, container, false);
|
||||
return binding.getRoot();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
final RecyclerView recyclerView = (RecyclerView) view;
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
recyclerView.setAdapter(new ItemAdapter(getArguments().getInt(ARG_ITEM_COUNT)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
|
||||
private class ViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
final TextView text;
|
||||
|
||||
ViewHolder(FragmentItemListDialogListDialogItem2Binding binding) {
|
||||
super(binding.getRoot());
|
||||
text = binding.text;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class ItemAdapter extends RecyclerView.Adapter<ViewHolder> {
|
||||
|
||||
private final int mItemCount;
|
||||
|
||||
ItemAdapter(int itemCount) {
|
||||
mItemCount = itemCount;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
return new ViewHolder(FragmentItemListDialogListDialogItem2Binding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ViewHolder holder, int position) {
|
||||
holder.text.setText(String.valueOf(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mItemCount;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
package eu.csc.vehown.ui.registration.data;
|
||||
|
||||
import eu.csc.ODPAppVehOwnServer.client.service.AuthenticationService;
|
||||
import eu.csc.vehown.data.model.Customer;
|
||||
import eu.csc.vehown.data.model.CustomerDevice;
|
||||
import eu.csc.vehown.data.model.ICustomer;
|
||||
import eu.csc.vehown.persist.sharedPreferences.LocalStorageClient;
|
||||
import eu.csc.vehown.services.rest.vehownserver.VehOwnApiClientFactory;
|
||||
|
|
@ -52,7 +54,9 @@ public class CustomerRegistrationRepository {
|
|||
// @see https://developer.android.com/training/articles/keystore
|
||||
}
|
||||
|
||||
|
||||
public Result<CustomerDevice> registerDevice(ICustomer customer, CustomerDevice device){
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public Result<LoggedInUser> registerCustomer(ICustomer customer) {
|
||||
// handle login
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ public class CustomerVehicleRegistrationRepository {
|
|||
|
||||
private CustomerContentDataSource dataSource;
|
||||
private LocalStorageClient localStorageClient;
|
||||
private final AuthenticationService authenticationService;
|
||||
|
||||
private final AuthenticationService authenticationService;
|
||||
// If user credentials will be cached in local storage, it is recommended it be encrypted
|
||||
// @see https://developer.android.com/training/articles/keystore
|
||||
private LoggedInUser user = null;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package eu.csc.vehown.ui.registration.devices;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.widget.Button;
|
||||
|
|
@ -15,8 +18,16 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import eu.csc.vehown.R;
|
||||
import eu.csc.vehown.data.model.CustomerDevice;
|
||||
import eu.csc.vehown.databinding.DeviceRegistrationFragmentBinding;
|
||||
import eu.csc.vehown.databinding.FragmentDashboardBinding;
|
||||
import eu.csc.vehown.ui.modal.Helper;
|
||||
import eu.csc.vehown.ui.models.Result;
|
||||
import eu.csc.vehown.ui.pub.UIUtils;
|
||||
import eu.csc.vehown.ui.register.RegisterCustomerActivity;
|
||||
import eu.csc.vehown.ui.register.RegistrationViewModel;
|
||||
import eu.csc.vehown.ui.registration.customer.ItemListDialogFragment;
|
||||
import eu.csc.vehown.ui.viewmodels.AppViewModelFactory;
|
||||
|
||||
public class DeviceRegistrationFragment extends Fragment {
|
||||
|
||||
|
|
@ -35,6 +46,9 @@ public class DeviceRegistrationFragment extends Fragment {
|
|||
|
||||
|
||||
View root = binding.getRoot();
|
||||
|
||||
mViewModel = new ViewModelProvider(this, new AppViewModelFactory(getContext()))
|
||||
.get(DeviceRegistrationViewModel.class);
|
||||
mViewModel = new ViewModelProvider(this).get(DeviceRegistrationViewModel.class);
|
||||
EditText edSerialnumber = binding.edSerialnumber;
|
||||
Button btnRegister = binding.btnRegisterDevice;
|
||||
|
|
@ -56,7 +70,7 @@ public class DeviceRegistrationFragment extends Fragment {
|
|||
mViewModel.getMSerialnumber().postValue(s.toString());
|
||||
}
|
||||
});
|
||||
mViewModel.getMSerialnumber().observe(this, new Observer<String>() {
|
||||
mViewModel.getMSerialnumber().observe(getViewLifecycleOwner(), new Observer<String>() {
|
||||
@Override
|
||||
public void onChanged(String s) {
|
||||
btnRegister.setEnabled(s != null && !s.equals(""));
|
||||
|
|
@ -65,20 +79,24 @@ mViewModel.getMSerialnumber().observe(this, new Observer<String>() {
|
|||
btnRegister.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mViewModel.getMIsEnabled().postValue(false);
|
||||
mViewModel.doRegisterDevice();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//return inflater.inflate(R.layout.device_registration_fragment, container, false);
|
||||
|
||||
mViewModel.getMIsEnabled().observe(this, new Observer<Boolean>() {
|
||||
mViewModel.getMIsEnabled().observe(getViewLifecycleOwner(), new Observer<Boolean>() {
|
||||
@Override
|
||||
public void onChanged(Boolean aBoolean) {
|
||||
if(aBoolean != null && aBoolean== false){
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
if(aBoolean != null && aBoolean == false){
|
||||
btnRegister.setEnabled(false);
|
||||
edSerialnumber.setEnabled(false);
|
||||
|
||||
if(mViewModel.getMSerialnumber().getValue() != null)
|
||||
progressBar.setVisibility(View.GONE);
|
||||
else
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
progressBar.setVisibility(View.GONE);
|
||||
btnRegister.setEnabled(true);
|
||||
|
|
@ -87,9 +105,60 @@ mViewModel.getMSerialnumber().observe(this, new Observer<String>() {
|
|||
}
|
||||
});
|
||||
|
||||
mViewModel.getMRegistrationResult().observe(getViewLifecycleOwner(), new Observer<Result<CustomerDevice>>() {
|
||||
@Override
|
||||
public void onChanged(Result<CustomerDevice> result) {
|
||||
if(result instanceof Result.Success){
|
||||
mViewModel.getMIsEnabled().postValue(true);
|
||||
}else{
|
||||
Helper.showErrorDialog(getContext(), "ERROR", result.toString(), new Helper.IDialogOkHandler() {
|
||||
@Override
|
||||
public void onOk() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
checkUserAuth();
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
private void checkUserAuth() {
|
||||
|
||||
// UIUtils.showDialog(this.getContext(), "A", "mess");
|
||||
String title = "Error";
|
||||
String message = "No User is registered";
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
|
||||
// 2. Chain together various setter methods to set the dialog characteristics
|
||||
builder.setMessage(message)
|
||||
.setTitle(title);
|
||||
|
||||
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
// User clicked OK button
|
||||
|
||||
Intent intent = new Intent(getContext(), RegisterCustomerActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton("Abort", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
mViewModel.getMIsEnabled().postValue(false);
|
||||
ItemListDialogFragment.newInstance(3).show(getChildFragmentManager(), "dialog");
|
||||
|
||||
}
|
||||
});
|
||||
// 3. Get the <code><a href="/reference/android/app/AlertDialog.html">AlertDialog</a></code> from <code><a href="/reference/android/app/AlertDialog.Builder.html#create()">create()</a></code>
|
||||
AlertDialog dialog = builder.create();
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,10 +1,20 @@
|
|||
package eu.csc.vehown.ui.registration.devices;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
import lombok.Getter;
|
||||
import android.content.Context;
|
||||
|
||||
public class DeviceRegistrationViewModel extends ViewModel {
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import eu.csc.vehown.data.model.CustomerDevice;
|
||||
import eu.csc.vehown.persist.sharedPreferences.LocalStorageClient;
|
||||
import eu.csc.vehown.services.rest.vehownserver.VehOwnApiClientFactory;
|
||||
import eu.csc.vehown.ui.models.Result;
|
||||
import eu.csc.vehown.ui.viewmodels.AbstractBaseViewModel;
|
||||
import lombok.Getter;
|
||||
import lombok.var;
|
||||
|
||||
public class DeviceRegistrationViewModel extends AbstractBaseViewModel {
|
||||
|
||||
|
||||
@Getter
|
||||
|
|
@ -12,8 +22,63 @@ public class DeviceRegistrationViewModel extends ViewModel {
|
|||
@Getter
|
||||
private final MutableLiveData<Boolean> mIsEnabled;
|
||||
|
||||
public DeviceRegistrationViewModel() {
|
||||
@Getter
|
||||
private final MutableLiveData<Result<CustomerDevice>> mRegistrationResult;
|
||||
|
||||
//private IVehOwnAppClient restClient;
|
||||
|
||||
|
||||
public DeviceRegistrationViewModel(LocalStorageClient localStorage, Context context) {
|
||||
super(localStorage);
|
||||
mSerialnumber = new MutableLiveData<>();
|
||||
mIsEnabled = new MutableLiveData<>();
|
||||
|
||||
|
||||
|
||||
mRegistrationResult = new MutableLiveData<>();
|
||||
|
||||
mSerialnumber.setValue(localStorage.getLastSerialnumber());
|
||||
}
|
||||
|
||||
|
||||
public void doRegisterDevice() {
|
||||
|
||||
getMIsEnabled().postValue(false);
|
||||
|
||||
|
||||
executorService.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//ToDo add
|
||||
|
||||
Result<CustomerDevice> result = null;
|
||||
try {
|
||||
localStorageClient.storeSerialnumber(getMSerialnumber().getValue());
|
||||
|
||||
var restClient = VehOwnApiClientFactory.getAuthenticatedDataClient(localStorageClient.getLoggedInUser());
|
||||
var response = restClient.registerCustomerDevice(getMSerialnumber().getValue()).execute();
|
||||
|
||||
CustomerDevice item = new CustomerDevice();
|
||||
item.setSerialNumber(response.body().getSerialNumber());
|
||||
item.setDeviceNumber(response.body().getDeviceNumber());
|
||||
item.setName(response.body().getName());
|
||||
result = new Result.Success(item);
|
||||
|
||||
|
||||
|
||||
//response.
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
result = new Result.Error(e);
|
||||
}
|
||||
|
||||
mRegistrationResult.postValue(result);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package eu.csc.vehown.ui.viewmodels;
|
||||
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import eu.csc.vehown.persist.sharedPreferences.LocalStorageClient;
|
||||
|
||||
public abstract class AbstractBaseViewModel extends ViewModel {
|
||||
|
||||
|
||||
protected final LocalStorageClient localStorageClient;
|
||||
protected ExecutorService executorService = Executors.newFixedThreadPool(4);
|
||||
|
||||
protected AbstractBaseViewModel(LocalStorageClient localStorage) {
|
||||
this.localStorageClient = localStorage;
|
||||
}
|
||||
}
|
||||
|
|
@ -5,8 +5,10 @@ import androidx.lifecycle.ViewModel;
|
|||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import eu.csc.vehown.persist.sharedPreferences.LocalStorageClient;
|
||||
import eu.csc.vehown.persist.sharedPreferences.SharedPreferencesFactory;
|
||||
import eu.csc.vehown.ui.register.RegistrationViewModel;
|
||||
import eu.csc.vehown.ui.registration.customer.FragmentCustomerRegistrationViewModel;
|
||||
import eu.csc.vehown.ui.registration.data.CustomerContentDataSource;
|
||||
import eu.csc.vehown.ui.registration.data.CustomerRegistrationRepository;
|
||||
import eu.csc.vehown.ui.registration.data.CustomerVehicleRegistrationRepository;
|
||||
|
|
@ -29,19 +31,22 @@ public class AppViewModelFactory implements ViewModelProvider.Factory {
|
|||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
|
||||
LocalStorageClient localStorage = SharedPreferencesFactory.getInstance(context);
|
||||
if (modelClass.isAssignableFrom(CustomerRegistrationViewModel.class)) {
|
||||
return (T) new CustomerRegistrationViewModel(CustomerRegistrationRepository.getInstance(
|
||||
new CustomerContentDataSource(),
|
||||
SharedPreferencesFactory.getInstance(context)));
|
||||
localStorage));
|
||||
}
|
||||
else if (modelClass.isAssignableFrom(RegistrationViewModel.class)) {
|
||||
return (T) new RegistrationViewModel(CustomerVehicleRegistrationRepository.getInstance(
|
||||
new CustomerContentDataSource(),
|
||||
SharedPreferencesFactory.getInstance(context)), context);
|
||||
localStorage), context);
|
||||
}
|
||||
else if (modelClass.isAssignableFrom(DeviceRegistrationViewModel.class)) {
|
||||
return (T) new DeviceRegistrationViewModel(
|
||||
SharedPreferencesFactory.getInstance(context)), context);
|
||||
return (T) new DeviceRegistrationViewModel(localStorage, context);
|
||||
}
|
||||
else if(modelClass.isAssignableFrom(FragmentCustomerRegistrationViewModel.class)){
|
||||
return (T) new FragmentCustomerRegistrationViewModel(localStorage, context);
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("Unknown ViewModel class");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M9,17l3,-2.94c-0.39,-0.04 -0.68,-0.06 -1,-0.06 -2.67,0 -8,1.34 -8,4v2h9l-3,-3zM11,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.47,20.5L12,17l1.4,-1.41 2.07,2.08 5.13,-5.17 1.4,1.41z"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="ui.registration.customer.FragmentCustomerRegistration">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edEmail"
|
||||
android:nextFocusDown="@id/edFirstname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="96dp"
|
||||
android:autofillHints="@string/prompt_email"
|
||||
android:hint="@string/prompt_email"
|
||||
android:inputType="textEmailAddress"
|
||||
android:selectAllOnFocus="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edFirstname"
|
||||
android:nextFocusDown="@id/edLastname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:autofillHints="@string/prompt_firstname"
|
||||
android:hint="@string/prompt_firstname"
|
||||
android:inputType="text"
|
||||
android:selectAllOnFocus="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edEmail"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edLastname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="@string/prompt_lastname"
|
||||
android:hint="@string/prompt_lastname"
|
||||
android:inputType="text"
|
||||
android:selectAllOnFocus="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/edFirstname"/>
|
||||
|
||||
<EditText
|
||||
|
||||
android:id="@+id/edZip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:autofillHints="@string/prompt_Postal"
|
||||
android:hint="@string/prompt_Postal"
|
||||
android:imeActionLabel="@string/action_sign_in_short"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:selectAllOnFocus="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edLastname"/>
|
||||
<EditText
|
||||
|
||||
android:id="@+id/edStreet"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:autofillHints="@string/prompt_street"
|
||||
android:hint="@string/prompt_street"
|
||||
android:imeActionLabel="@string/action_sign_in_short"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:selectAllOnFocus="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edZip"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:autofillHints="@string/prompt_password"
|
||||
android:hint="@string/prompt_password"
|
||||
android:imeActionLabel="@string/action_sign_in_short"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:selectAllOnFocus="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edStreet"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edPassword2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:autofillHints="@string/prompt_password"
|
||||
android:hint="@string/prompt_password"
|
||||
android:imeActionLabel="@string/action_sign_in_short"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:selectAllOnFocus="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/password"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRegister"
|
||||
android:enabled="false"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="64dp"
|
||||
android:text="@string/action_register_customer"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edPassword2"
|
||||
app:layout_constraintVertical_bias="0.2"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="64dp"
|
||||
android:layout_marginBottom="64dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/password"
|
||||
app:layout_constraintStart_toStartOf="@+id/password"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.3"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.dialogs.DialogInfoFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="@dimen/list_item_spacing_half"
|
||||
android:paddingBottom="@dimen/list_item_spacing_half"
|
||||
tools:context=".ui.registration.customer.ItemListDialogFragment"
|
||||
tools:listitem="@layout/fragment_item_list_dialog_list_dialog_item2" />
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingLeft="@dimen/list_item_spacing"
|
||||
android:paddingTop="@dimen/list_item_spacing_half"
|
||||
android:paddingRight="@dimen/list_item_spacing"
|
||||
android:paddingBottom="@dimen/list_item_spacing_half"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
tools:text="Hello" />
|
||||
|
|
@ -18,8 +18,12 @@
|
|||
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_register_device"
|
||||
android:icon="@drawable/ic_baseline_add_road_24"
|
||||
android:title="@string/title_register_device"/>
|
||||
android:id="@+id/navigation_register_customer"
|
||||
android:icon="@drawable/ic_baseline_how_to_reg_24"
|
||||
android:title="@string/title_register_customer"/>
|
||||
<item
|
||||
android:id="@+id/navigation_register_device"
|
||||
android:icon="@drawable/ic_baseline_add_road_24"
|
||||
android:title="@string/title_register_device"/>
|
||||
|
||||
</menu>
|
||||
|
|
@ -23,8 +23,14 @@
|
|||
android:label="@string/title_notifications"
|
||||
tools:layout="@layout/fragment_notifications"/>
|
||||
|
||||
<fragment android:id="@+id/navigation_register_customer"
|
||||
android:name="eu.csc.vehown.ui.registration.customer.FragmentCustomerRegistration"
|
||||
android:label="Customer"
|
||||
tools:layout="@layout/fragment_customer_registration_fragment"/>
|
||||
|
||||
|
||||
<fragment android:id="@+id/navigation_register_device"
|
||||
android:name="eu.csc.vehown.ui.registration.devices.DeviceRegistrationFragment"
|
||||
android:label="RegisterDeviceFragment"
|
||||
tools:layout="@layout/fragment_register_device"/>
|
||||
android:name="eu.csc.vehown.ui.registration.devices.DeviceRegistrationFragment"
|
||||
android:label="RegisterDeviceFragment"
|
||||
tools:layout="@layout/fragment_register_device"/>
|
||||
</navigation>
|
||||
|
|
@ -158,6 +158,7 @@
|
|||
<string name="register_base_title">Registration</string>
|
||||
<string name="title_register_device">Device</string>
|
||||
<string name="btn_registration">Register</string>
|
||||
<string name="title_register_customer">Customer</string>
|
||||
|
||||
<!--string-array name="languages">
|
||||
<item>english</item>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import java.io.Serializable;
|
|||
@ToString
|
||||
public class CustomerDevice implements Serializable {
|
||||
|
||||
|
||||
private String deviceNumber;
|
||||
private String serialNumber;
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ public interface LocalStorageClient extends IVehOwnData {
|
|||
|
||||
Optional<Vehicle> findVehicleByVin(String id);
|
||||
|
||||
void storeSerialnumber(String value);
|
||||
|
||||
String getLastSerialnumber();
|
||||
|
||||
|
||||
//region ServerData
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import java.util.List;
|
|||
import java.util.Optional;
|
||||
|
||||
public class LocalStorageClientImpl implements LocalStorageClient {
|
||||
private static final String KEY_LAST_SERIALNUMBER = "prefs_serialnumber_last";
|
||||
|
||||
// private static final String TAG = LocalStorageClientImpl.class.getSimpleName();
|
||||
|
||||
|
|
@ -176,6 +177,16 @@ public class LocalStorageClientImpl implements LocalStorageClient {
|
|||
return loadVehicles().stream().filter(x-> x.getVin().equals(id)).findFirst();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeSerialnumber(String value) {
|
||||
getEditor().putString(KEY_LAST_SERIALNUMBER, value).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLastSerialnumber() {
|
||||
return sharedPreferences.getString(KEY_LAST_SERIALNUMBER, "");
|
||||
}
|
||||
|
||||
private SharedPreferences.Editor getEditor() {
|
||||
return sharedPreferences.edit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue