Commit c7e669c2 authored by Lucas Braz Cunha's avatar Lucas Braz Cunha
Browse files

Issue AGILE#199: [WP] Done New Dependent, Update Dependent needs check(back-end issue)


Signed-off-by: Lucas Braz Cunha's avatarLucas B. Cunha <lbc16@inf.ufpr.br>
parent 2c3810a7
......@@ -62,6 +62,7 @@ import br.ufpr.c3sl.agendador.agendador.views.AccountView;
public class AccountActivity extends AppCompatActivity implements AccountView {
private EditText et_name, et_cpf, et_rg, et_birthdate,
et_disability, et_cep, et_address, et_number, et_neighborhood,
et_city, et_state, et_complement, et_phone, et_phone2,
......@@ -317,9 +318,9 @@ public class AccountActivity extends AppCompatActivity implements AccountView {
android.support.v7.app.AlertDialog.Builder builderSingle = new android.support.v7.app.AlertDialog.Builder(AccountActivity.this);
//builderSingle.setIcon(R.drawable.ic_action_search);
//TODO: this message is too long for the dialog.
builderSingle.setTitle(getString(R.string.prof_pic_dialog));
builderSingle.setTitle(getString(R.string.picture_dialog));
final String[] opts = {getString(R.string.prof_pic_update), getString(R.string.prof_pic_remove)};
final String[] opts = {getString(R.string.picture_update), getString(R.string.picture_remove)};
int[] drawableIds = {android.R.drawable.ic_menu_camera, android.R.drawable.ic_menu_close_clear_cancel};
final PhotoSelectionAdapter arrayAdapter = new PhotoSelectionAdapter(getBaseContext(), opts, drawableIds);
......@@ -846,45 +847,45 @@ public class AccountActivity extends AppCompatActivity implements AccountView {
public HashMap<String, String> getValues() {
HashMap<String, String> values = new HashMap<>();
values.put("name", et_name.getText().toString());
values.put("rg", et_rg.getText().toString());
values.put("birth_date", DateValidator.stringToDate(et_birthdate.getText().toString(), false));
values.put(Utils.NAME, et_name.getText().toString());
values.put(Utils.RG, et_rg.getText().toString());
values.put(Utils.BIRTH_DATE, DateValidator.stringToDate(et_birthdate.getText().toString(), false));
if (rb_no.isChecked()) {
values.put("pcd", null);
values.put(Utils.PCD, null);
} else {
if (et_disability.getText().toString().isEmpty()) {
values.put("pcd", null);
values.put(Utils.PCD, null);
} else {
values.put("pcd", et_disability.getText().toString());
values.put(Utils.PCD, et_disability.getText().toString());
}
}
values.put("cep", Mask.unmask(et_cep.getText().toString()));
values.put("address_number", et_number.getText().toString());
values.put("address_complement", et_complement.getText().toString());
values.put(Utils.CEP, Mask.unmask(et_cep.getText().toString()));
values.put(Utils.ADDRESS_NUMBER, et_number.getText().toString());
values.put(Utils.ADDRESS_COMPLEMENT, et_complement.getText().toString());
values.put("phone1", Mask.unmask(et_phone.getText().toString()));
values.put("phone2", Mask.unmask(et_phone2.getText().toString()));
values.put("email", et_email.getText().toString());
values.put(Utils.PHONE_1, Mask.unmask(et_phone.getText().toString()));
values.put(Utils.PHONE_2, Mask.unmask(et_phone2.getText().toString()));
values.put(Utils.EMAIL, et_email.getText().toString());
if (et_new_password.getText().toString().isEmpty() && et_new_password.getText().toString().isEmpty()) {
values.put("password", null);
values.put("password_confirmation", null);
values.put(Utils.PASSWORD, null);
values.put(Utils.PASSWORD_CONFIRMATION, null);
} else {
values.put("current_password", this.current_password);
values.put("password", et_new_password.getText().toString());
values.put("password_confirmation", et_password_confirmation.getText().toString());
values.put(Utils.CURRENT_PASSWORD, this.current_password);
values.put(Utils.PASSWORD, et_new_password.getText().toString());
values.put(Utils.PASSWORD_CONFIRMATION, et_password_confirmation.getText().toString());
}
if(isChangingPhoto) {
if(isPhotoDelete) {
values.put("photo_type", "delete");
values.put(Utils.PHOTO_TYPE, "delete");
}else {
values.put("photo_content", Utils.getBase64FromFile(userImgHelper.getTempFilePath(Utils.USR_PICT_FILE_NAME, id)));
values.put("photo_type", "image/png");
values.put(Utils.PHOTO_CONTENT, Utils.getBase64FromFile(userImgHelper.getTempFilePath(Utils.USR_PICT_FILE_NAME, id)));
values.put(Utils.PHOTO_TYPE, "image/png");
// TODO: 03/05/17 Change here to work with multi photo types
values.put("photo_name", id + ".png");
values.put(Utils.PHOTO_NAME, id + ".png");
}
}
......@@ -978,7 +979,7 @@ public class AccountActivity extends AppCompatActivity implements AccountView {
// Filesystem.
final Intent galleryIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
galleryIntent.setType("image/*");
chooserIntent = Intent.createChooser(galleryIntent, getString(R.string.prof_pic_chooser));
chooserIntent = Intent.createChooser(galleryIntent, getString(R.string.picture_chooser));
}
if(hasCameraPermission) {
......@@ -999,7 +1000,7 @@ public class AccountActivity extends AppCompatActivity implements AccountView {
}
if(!hasReadPermission) {
chooserIntent = Intent.createChooser(cameraIntents.get(cameraIntents.size() - 1), getString(R.string.prof_pic_chooser));
chooserIntent = Intent.createChooser(cameraIntents.get(cameraIntents.size() - 1), getString(R.string.picture_chooser));
cameraIntents.remove(cameraIntents.get(cameraIntents.size() - 1));
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, cameraIntents.toArray(new Parcelable[cameraIntents.size()]));
}
......
......@@ -12,6 +12,7 @@ import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
......@@ -47,6 +48,12 @@ public class DependentsListActivity extends AppCompatActivity implements Depende
private List<Dependent> dependents;
private boolean updateList;
private static final int DEPENDENT_UPDATE_CODE = 1;
private static final int NEW_DEPENDENT_CODE = 2;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -61,7 +68,7 @@ public class DependentsListActivity extends AppCompatActivity implements Depende
setContentView(R.layout.activity_dependents_list);
FloatingActionButton fab_new_dependent = (FloatingActionButton) findViewById(R.id.fab_new_dependent);
FloatingActionButton fabNewDependent = (FloatingActionButton) findViewById(R.id.fab_new_dependent);
pb_dependents = (ProgressBar) findViewById(R.id.pb_dependentact);
......@@ -87,17 +94,18 @@ public class DependentsListActivity extends AppCompatActivity implements Depende
}
}));
fab_new_dependent.setOnClickListener(new View.OnClickListener() {
fabNewDependent.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DependentsListActivity.this, NewDependentActivity.class);
startActivity(intent);
startActivityForResult(intent, NEW_DEPENDENT_CODE);
}
});
}
public void successfulDependents(List<Dependent> dependents) {
this.dependents = dependents;
updateList = false;
showLayout(true);
}
......@@ -108,8 +116,7 @@ public class DependentsListActivity extends AppCompatActivity implements Depende
Bundle bundle = new Bundle();
bundle.putParcelable(Utils.CITIZEN, dependent);
intent.putExtra(Utils.CITIZEN_BUNDLE, bundle);
startActivity(intent);
finish();
startActivityForResult(intent, DEPENDENT_UPDATE_CODE);
}
......@@ -136,8 +143,29 @@ public class DependentsListActivity extends AppCompatActivity implements Depende
}
}
public void afterPictureFailed(){
Toast.makeText(this, "Ocorreu um problema ao carregar sua foto de perfil", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "Ocorreu um problema ao carregar a foto", Toast.LENGTH_SHORT).show();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode){
case DEPENDENT_UPDATE_CODE:
break;
case NEW_DEPENDENT_CODE:
if(resultCode == Activity.RESULT_OK){
updateList = true;
}
/* do nothing
if (resultCode == Activity.RESULT_CANCELED) {
//Write your code if there's no result
}*/
break;
default:
break;
}
}
......@@ -150,7 +178,7 @@ public class DependentsListActivity extends AppCompatActivity implements Depende
protected void onResume() {
super.onResume();
presenter.bindView(this);
if(dependents == null)
if(dependents == null || updateList)
presenter.requestDependents();
}
......@@ -180,6 +208,7 @@ public class DependentsListActivity extends AppCompatActivity implements Depende
rv_dependents.setVisibility(View.INVISIBLE);
} else {
pb_dependents.setVisibility(View.INVISIBLE);
rv_dependents.setVisibility(View.VISIBLE);
}
}
......
......@@ -2,6 +2,7 @@ package br.ufpr.c3sl.agendador.agendador;
import android.Manifest;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.FragmentManager;
import android.content.ComponentName;
import android.content.DialogInterface;
......@@ -43,7 +44,7 @@ import br.ufpr.c3sl.agendador.agendador.helpers.Mask;
import br.ufpr.c3sl.agendador.agendador.helpers.UserImgHelper;
import br.ufpr.c3sl.agendador.agendador.helpers.Utils;
import br.ufpr.c3sl.agendador.agendador.helpers.adapters.PhotoSelectionAdapter;
import br.ufpr.c3sl.agendador.agendador.models.Dependent;
import br.ufpr.c3sl.agendador.agendador.models.FullDependent;
import br.ufpr.c3sl.agendador.agendador.models.UserOutput;
import br.ufpr.c3sl.agendador.agendador.presenters.NewDependentPresenter;
import br.ufpr.c3sl.agendador.agendador.presenters.PresenterManager;
......@@ -51,6 +52,7 @@ import br.ufpr.c3sl.agendador.agendador.views.NewDependentsView;
public class NewDependentActivity extends AppCompatActivity implements NewDependentsView{
private static final String EMPTY_FIELDS_DIALOG = "emptyFieldsDialog";
private NewDependentPresenter presenter;
......@@ -76,7 +78,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
private UserImgHelper userImgHelper;
private boolean isChangingPhoto;
private boolean isChangingPhoto, hasSucceed;
private final int REQUEST_PERMISSIONS = 1;
private final int LOAD_IMAGE_INTENT = 1;
......@@ -266,11 +268,11 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
android.support.v7.app.AlertDialog.Builder builderSingle = new android.support.v7.app.AlertDialog.Builder(NewDependentActivity.this);
builderSingle.setIcon(R.drawable.ic_action_search);
//TODO: this message is too long for the dialog.
builderSingle.setTitle(getString(R.string.prof_pic_dialog));
builderSingle.setTitle(getString(R.string.picture_dialog));
// TODO: 30/08/17 Change alert dialog layout
//builderSingle.setView(Layout bonito);
final String[] opts = {getString(R.string.prof_pic_update), getString(R.string.prof_pic_remove)};
final String[] opts = {getString(R.string.picture_update), getString(R.string.picture_remove)};
int[] drawableIds = {android.R.drawable.ic_menu_camera, android.R.drawable.ic_menu_close_clear_cancel};
final PhotoSelectionAdapter arrayAdapter = new PhotoSelectionAdapter(getBaseContext(), opts, drawableIds);
......@@ -287,7 +289,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
public void onClick(DialogInterface dialog, int which) {
//1 = array position of remove option
if(which == 1){
isChangingPhoto = true;
isChangingPhoto = false;
imv_profile.setImageBitmap(null);
}
else{
......@@ -300,6 +302,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
}
});
hasSucceed = false;
}
@Override
......@@ -332,6 +335,14 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
}
}
@Override
public void onBackPressed() {
if(hasSucceed)
setResult(Activity.RESULT_OK);
else
setResult(Activity.RESULT_CANCELED);
super.onBackPressed();
}
public void enableAllFields(boolean enabled){
et_name.setEnabled(enabled);
......@@ -365,6 +376,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
et_city.setText(values.get("cityname_su"));
et_state.setText(values.get("statename_su"));
} else {
FragmentManager manager = getFragmentManager();
AccountActivity.CepWarningDialog cepWarningDialog = new AccountActivity.CepWarningDialog();
cepWarningDialog.show(manager, "cepWarningDialog");
......@@ -421,36 +433,53 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
public HashMap<String, String> getValues() {
HashMap<String, String> values = new HashMap<>();
values.put("name", et_name.getText().toString());
values.put("cpf", et_cpf.getText().toString());
values.put("rg", et_rg.getText().toString());
values.put("birth_date", DateValidator.stringToDate(et_birthdate.getText().toString(), false));
values.put(Utils.NAME, et_name.getText().toString().trim());
if(!et_cpf.getText().toString().isEmpty())
values.put(Utils.CPF, et_cpf.getText().toString().replaceAll("\\.", "").replace("-",""));
if(!et_rg.getText().toString().isEmpty())
values.put(Utils.RG, et_rg.getText().toString().trim());
values.put(Utils.BIRTH_DATE, DateValidator.stringToDate(et_birthdate.getText().toString(), false));
if (rb_no.isChecked()) {
values.put("pcd", null);
values.put(Utils.PCD, null);
} else {
if (et_disability.getText().toString().isEmpty()) {
values.put("pcd", null);
values.put(Utils.PCD, null);
} else {
values.put("pcd", et_disability.getText().toString());
values.put(Utils.PCD, et_disability.getText().toString().trim());
}
}
values.put("cep", Mask.unmask(et_cep.getText().toString()));
values.put("address_number", et_number.getText().toString());
values.put("address_complement", et_complement.getText().toString());
if(!et_cep.getText().toString().isEmpty())
values.put(Utils.CEP, Mask.unmask(et_cep.getText().toString()));
if(!et_number.getText().toString().isEmpty())
values.put(Utils.ADDRESS_NUMBER, et_number.getText().toString().trim());
if(!et_complement.getText().toString().isEmpty())
values.put(Utils.ADDRESS_COMPLEMENT, et_complement.getText().toString().trim());
if(!et_phone.getText().toString().isEmpty())
values.put(Utils.PHONE_1, Mask.unmask(et_phone.getText().toString()));
if(!et_phone2.getText().toString().isEmpty())
values.put(Utils.PHONE_2, Mask.unmask(et_phone2.getText().toString()));
if(!et_email.getText().toString().isEmpty())
values.put(Utils.EMAIL, et_email.getText().toString().trim());
values.put("phone1", Mask.unmask(et_phone.getText().toString()));
values.put("phone2", Mask.unmask(et_phone2.getText().toString()));
values.put("email", et_email.getText().toString());
values.put(Utils.ACTIVE, "true");
values.put("active", "true");
if(isChangingPhoto) {
values.put("photo_content", Utils.getBase64FromFile(userImgHelper.getTempFilePath(Utils.USR_TEMP_PICT_FILE_NAME, 0)));
values.put("photo_type", "image/png");
values.put(Utils.PHOTO_CONTENT, Utils.getBase64FromFile(userImgHelper.getTempFilePath(Utils.USR_TEMP_PICT_FILE_NAME, 0)));
values.put(Utils.PHOTO_TYPE, "image/png");
// TODO: 03/05/17 Change here to work with multi photo types
values.put("photo_name", values.get("cpf") + ".png");
values.put(Utils.PHOTO_NAME, values.get(Utils.NAME).replaceAll(" ","") + ".png");
}
......@@ -508,30 +537,17 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
tv_birthdate_warning.setVisibility(View.INVISIBLE);
}
if (et_email.getText().toString().replaceAll("\\s+", "").isEmpty()) {
tv_email_warning.setText(R.string.empty_email);
tv_email_warning.setVisibility(View.VISIBLE);
openDialog = true;
} else {
if (DateValidator.isValidEmail(et_email.getText().toString())) {
tv_email_warning.setVisibility(View.INVISIBLE);
} else {
tv_email_warning.setText(R.string.invalid_email);
tv_email_warning.setVisibility(View.VISIBLE);
openDialog = true;
}
}
if (et_rg.getText().toString().replaceAll("\\s+", "").isEmpty()) {
tv_rg_warning.setText(R.string.invalid_rg);
tv_rg_warning.setVisibility(View.VISIBLE);
if (!et_email.getText().toString().replaceAll("\\s+", "").isEmpty() && !DateValidator.isValidEmail(et_email.getText().toString())) {
tv_email_warning.setText(R.string.invalid_email);
tv_email_warning.setVisibility(View.VISIBLE);
openDialog = true;
} else {
tv_rg_warning.setVisibility(View.INVISIBLE);
tv_email_warning.setVisibility(View.INVISIBLE);
}
if(et_cpf.getText().toString().replaceAll("\\s+", "").isEmpty() || !DateValidator.isValidCPF(et_cpf.getText().toString().replaceAll("\\.", "").replace("-",""))){
if(!et_cpf.getText().toString().replaceAll("\\s+", "").isEmpty() && !DateValidator.isValidCPF(et_cpf.getText().toString().replaceAll("\\.", "").replace("-",""))){
tv_cpf_warning.setText(R.string.invalid_cpf);
tv_cpf_warning.setVisibility(View.VISIBLE);
openDialog = true;
......@@ -539,21 +555,12 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
tv_cpf_warning.setVisibility(View.INVISIBLE);
}
if (et_phone.getText().toString().replaceAll("\\s+", "").isEmpty()) {
tv_phone_warning.setText(R.string.signup_invalid_phone);
tv_phone_warning.setVisibility(View.VISIBLE);
openDialog = true;
} else {
tv_phone_warning.setVisibility(View.INVISIBLE);
}
if(openDialog){
AccountActivity.EmptyFieldsWarningDialog emptyFieldsDialog = new AccountActivity.EmptyFieldsWarningDialog();
emptyFieldsDialog.show(getFragmentManager(), "emptyFieldsDialog");
return false;
emptyFieldsDialog.show(getFragmentManager(), EMPTY_FIELDS_DIALOG);
}
return true;
return !openDialog;
}
......@@ -605,7 +612,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
// Filesystem.
final Intent galleryIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
galleryIntent.setType("image/*");
chooserIntent = Intent.createChooser(galleryIntent, getString(R.string.prof_pic_chooser));
chooserIntent = Intent.createChooser(galleryIntent, getString(R.string.picture_chooser));
}
if(hasCameraPermission) {
......@@ -626,7 +633,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
}
if(!hasReadPermission) {
chooserIntent = Intent.createChooser(cameraIntents.get(cameraIntents.size() - 1), getString(R.string.prof_pic_chooser));
chooserIntent = Intent.createChooser(cameraIntents.get(cameraIntents.size() - 1), getString(R.string.picture_chooser));
cameraIntents.remove(cameraIntents.get(cameraIntents.size() - 1));
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, cameraIntents.toArray(new Parcelable[cameraIntents.size()]));
}
......@@ -661,6 +668,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
if (requestCode == LOAD_IMAGE_INTENT) {
final boolean isCamera;
......@@ -685,7 +693,6 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
e.printStackTrace();
}
isChangingPhoto = true;
Bitmap content = userImgHelper.getRoundBitmap(userImgHelper.getTempFileUri(Utils.USR_TEMP_PICT_FILE_NAME, TEMP_FILE_ID));
//TODO: user messages & error warning (same as above).
......@@ -695,6 +702,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
Toast.makeText(this, "Ocorreu um erro, tem certeza de que é uma imagem?", Toast.LENGTH_SHORT).show();
}
else{
isChangingPhoto = true;
imv_profile.setImageBitmap(content);
}
......@@ -703,6 +711,7 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
}
//end of picture selection functions
public void onRequestError(){
scrollUp();
......@@ -717,16 +726,17 @@ public class NewDependentActivity extends AppCompatActivity implements NewDepen
}
public void onDependentReceived(UserOutput dependent){
public void onDependentReceived(FullDependent dependent){
try {
userImgHelper.copyFromTo(userImgHelper.getTempFileUri(Utils.USR_TEMP_PICT_FILE_NAME, 0), userImgHelper.getFileUri(Utils.USR_PICT_FILE_NAME, dependent.getmId()));
userImgHelper.copyFromTo(userImgHelper.getTempFileUri(Utils.USR_TEMP_PICT_FILE_NAME, 0), userImgHelper.getFileUri(Utils.USR_PICT_FILE_NAME, dependent.getInfo().getmId()));
} catch (Exception e) {
// TODO: 31/08/17 change to snackBar
Toast.makeText(this, "Ocorreu um erro ao armazenar a foto!", Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
finally {
finish();
hasSucceed = true;
onBackPressed();
}
}
......
......@@ -20,6 +20,7 @@ import br.ufpr.c3sl.agendador.agendador.helpers.ConnectionChecker;
import br.ufpr.c3sl.agendador.agendador.helpers.ConnectionErrorDialog;
import br.ufpr.c3sl.agendador.agendador.helpers.DateValidator;
import br.ufpr.c3sl.agendador.agendador.helpers.Mask;
import br.ufpr.c3sl.agendador.agendador.helpers.Utils;
import br.ufpr.c3sl.agendador.agendador.presenters.PresenterManager;
import br.ufpr.c3sl.agendador.agendador.presenters.SignUpPresenter;
import br.ufpr.c3sl.agendador.agendador.views.SignupView;
......@@ -297,15 +298,15 @@ public class SignUpActivity extends AppCompatActivity implements SignupView {
public HashMap<String,String> getValues(){
HashMap<String,String> values = new HashMap<String,String>();
values.put("cpf",Mask.unmask(et_cpf.getText().toString()));
values.put("birth_date", DateValidator.stringToDate(et_birthday.getText().toString(),false));
values.put("name",et_name.getText().toString());
values.put("cep",Mask.unmask(et_cep.getText().toString()));
values.put("password_confirmation",et_password_confirm.getText().toString());
values.put("password",et_password.getText().toString());
values.put("email",et_email.getText().toString());
values.put("phone1",Mask.unmask(et_phone.getText().toString()));
values.put("rg",et_rg.getText().toString());
values.put(Utils.CPF,Mask.unmask(et_cpf.getText().toString()));
values.put(Utils.BIRTH_DATE, DateValidator.stringToDate(et_birthday.getText().toString(),false));
values.put(Utils.NAME,et_name.getText().toString());
values.put(Utils.CEP,Mask.unmask(et_cep.getText().toString()));
values.put(Utils.PASSWORD_CONFIRMATION,et_password_confirm.getText().toString());
values.put(Utils.PASSWORD,et_password.getText().toString());
values.put(Utils.EMAIL,et_email.getText().toString());
values.put(Utils.PHONE_1,Mask.unmask(et_phone.getText().toString()));
values.put(Utils.RG,et_rg.getText().toString());
return values;
}
......
......@@ -4,6 +4,8 @@ import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Base64;
......@@ -21,6 +23,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Calendar;
import br.ufpr.c3sl.agendador.agendador.models.UserOutput;
/**
* Created by Lucas B. Cunha on 31/03/17.
*/
......@@ -48,7 +52,44 @@ public class Utils {
public static final String CITIZEN_BUNDLE = "br.ufpr.c3sl.agendador.agendador.citizen_bundle";
public static final String JOB_FILE_NAME = "fileName_tag";
public static final String ADDRESS_NEIGHBORHOOD = "address.neighborhood";
public static final String ADDRESS_NUMBER = "address_number";
public static final String UPDATED_AT = "updated_at";
public static final String ADDRESS_ADDRESS = "address.address";
public static final String AVATAR_UPDATED_AT = "avatar_updated_at";
public static final String ID = "id";
public static final String PHOTO_CONTENT_TYPE = "photo_content_type";
public static final String PHOTO_FILE_NAME = "photo_file_name";
public static final String PHOTO_FILE_SIZE = "photo_file_size";
public static final String NOTE = "note";
public static final String RG = "rg";
public static final String EMAIL = "email";