pizzapass count on profile

This commit is contained in:
cimenmus
2018-08-16 23:13:04 +03:00
parent 6827a97cd2
commit 2ef3eb0f92
7 changed files with 57 additions and 10 deletions

View File

@@ -55,7 +55,25 @@
</entry>
<entry key="vectorWizard">
<value>
<PersistentState />
<PersistentState>
<option name="children">
<map>
<entry key="vectorAssetStep">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="assetSourceType" value="FILE" />
<entry key="outputName" value="ic_diamond" />
<entry key="sourceFile" value="$USER_HOME$/Downloads/diamond (1).svg" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
</map>

2
.idea/misc.xml generated
View File

@@ -25,7 +25,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@@ -41,14 +41,11 @@ import static android.app.Activity.RESULT_OK;
public class ProfileFragment extends BaseFragment {
@BindView(R.id.firstnamePizzalinkInfoLayout)
AppInfoView firstnamePizzalinkInfoLayout;
@BindView(R.id.lastnamePizzalinkInfoLayout)
AppInfoView lastnamePizzalinkInfoLayout;
@BindView(R.id.emailPizzalinkInfoLayout)
AppInfoView emailPizzalinkInfoLayout;
@BindView(R.id.phonePizzalinkInfoLayout)
AppInfoView phonePizzalinkInfoLayout;
@BindView(R.id.pizzapassCountPizzalinkInfoLayout) AppInfoView pizzapassCountPizzalinkInfoLayout;
@BindView(R.id.firstnamePizzalinkInfoLayout) AppInfoView firstnamePizzalinkInfoLayout;
@BindView(R.id.lastnamePizzalinkInfoLayout) AppInfoView lastnamePizzalinkInfoLayout;
@BindView(R.id.emailPizzalinkInfoLayout) AppInfoView emailPizzalinkInfoLayout;
@BindView(R.id.phonePizzalinkInfoLayout) AppInfoView phonePizzalinkInfoLayout;
@BindView(R.id.myAddressesLayout) RelativeLayout myAddressesLayout;
@BindView(R.id.updateProfileLayout) RelativeLayout updateProfileLayout;
@BindView(R.id.updatePasswordLayout) RelativeLayout updatePasswordLayout;
@@ -120,6 +117,7 @@ public class ProfileFragment extends BaseFragment {
if(requestCode == REQUEST_CODE_UPDATE_PROFILE &&
resultCode == RESULT_OK){
userModel = SessionHelper.getUser();
pizzapassCountPizzalinkInfoLayout.setText(userModel.getPizzapassCount());
firstnamePizzalinkInfoLayout.setText(userModel.getFirstname());
lastnamePizzalinkInfoLayout.setText(userModel.getLastname());
emailPizzalinkInfoLayout.setText(userModel.getEmail());
@@ -163,6 +161,7 @@ public class ProfileFragment extends BaseFragment {
userModel = user;
SessionHelper.saveCustomer(userModel);
pizzapassCountPizzalinkInfoLayout.setText(userModel.getPizzapassCount());
firstnamePizzalinkInfoLayout.setText(userModel.getFirstname());
lastnamePizzalinkInfoLayout.setText(userModel.getLastname());
emailPizzalinkInfoLayout.setText(userModel.getEmail());

View File

@@ -13,6 +13,7 @@ public class UserModel implements Serializable{
@Expose @SerializedName("customer_id") private String id;
@Expose @SerializedName("address_id") private String addressId;
@Expose @SerializedName("pizza_pass_count") private String pizzapassCount;
private String firstname;
private String lastname;
private String email;
@@ -39,6 +40,9 @@ public class UserModel implements Serializable{
if(telephone == null)
telephone = "";
if(pizzapassCount == null)
pizzapassCount = "";
if(token != null)
token.checkNull();
}
@@ -102,4 +106,12 @@ public class UserModel implements Serializable{
public void setToken(CustomerTokenModel token) {
this.token = token;
}
public String getPizzapassCount() {
return pizzapassCount;
}
public void setPizzapassCount(String pizzapassCount) {
this.pizzapassCount = pizzapassCount;
}
}

View File

@@ -0,0 +1,11 @@
<vector android:height="24dp" android:viewportHeight="33"
android:viewportWidth="33" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M16.5,30.5c-0.147,0 -0.288,-0.065 -0.382,-0.178l-16,-19C-0.032,11.144 -0.04,10.886 0.1,10.7l6,-8c0.094,-0.126 0.243,-0.2 0.4,-0.2h20c0.157,0 0.306,0.074 0.4,0.2l6,8c0.14,0.186 0.132,0.444 -0.018,0.622l-16,19C16.788,30.435 16.647,30.5 16.5,30.5zM1.139,10.982L16.5,29.224l15.361,-18.242L26.25,3.5H6.75L1.139,10.982z"/>
<path android:fillColor="#FF000000" android:pathData="M32.5,11.5h-32C0.224,11.5 0,11.277 0,11s0.224,-0.5 0.5,-0.5h32c0.276,0 0.5,0.224 0.5,0.5S32.776,11.5 32.5,11.5z"/>
<path android:fillColor="#FF000000" android:pathData="M16.5,30.5c-0.05,0 -0.101,-0.007 -0.15,-0.023c-0.264,-0.083 -0.41,-0.364 -0.326,-0.627l6,-19c0.083,-0.263 0.366,-0.411 0.627,-0.326c0.264,0.083 0.41,0.364 0.326,0.627l-6,19C16.91,30.364 16.712,30.5 16.5,30.5z"/>
<path android:fillColor="#FF000000" android:pathData="M16.5,30.5c-0.212,0 -0.41,-0.136 -0.477,-0.35l-6,-19c-0.083,-0.263 0.063,-0.544 0.326,-0.627c0.264,-0.085 0.544,0.063 0.627,0.326l6,19c0.083,0.263 -0.063,0.544 -0.326,0.627C16.601,30.493 16.55,30.5 16.5,30.5z"/>
<path android:fillColor="#FF000000" android:pathData="M10.5,11.5c-0.184,0 -0.36,-0.101 -0.448,-0.276l-4,-8C5.929,2.977 6.029,2.677 6.276,2.553C6.524,2.43 6.823,2.53 6.947,2.777l4,8c0.124,0.247 0.023,0.547 -0.224,0.671C10.652,11.483 10.576,11.5 10.5,11.5z"/>
<path android:fillColor="#FF000000" android:pathData="M10.5,11.5c-0.104,0 -0.209,-0.033 -0.299,-0.1c-0.221,-0.166 -0.266,-0.479 -0.1,-0.7l6,-8c0.166,-0.221 0.479,-0.265 0.7,-0.1c0.221,0.166 0.266,0.479 0.1,0.7l-6,8C10.802,11.431 10.652,11.5 10.5,11.5z"/>
<path android:fillColor="#FF000000" android:pathData="M22.5,11.5c-0.152,0 -0.302,-0.069 -0.4,-0.2l-6,-8c-0.166,-0.221 -0.121,-0.534 0.1,-0.7c0.22,-0.167 0.534,-0.122 0.7,0.1l6,8c0.166,0.221 0.121,0.534 -0.1,0.7C22.71,11.468 22.605,11.5 22.5,11.5z"/>
<path android:fillColor="#FF000000" android:pathData="M22.5,11.5c-0.075,0 -0.151,-0.017 -0.223,-0.053c-0.247,-0.124 -0.347,-0.424 -0.224,-0.671l4,-8c0.124,-0.247 0.423,-0.347 0.671,-0.224c0.247,0.124 0.347,0.424 0.224,0.671l-4,8C22.859,11.399 22.683,11.5 22.5,11.5z"/>
</vector>

View File

@@ -34,6 +34,12 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<ch.pizzapp.android.view.AppInfoView
android:id="@+id/pizzapassCountPizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/pizza_pass" />
<ch.pizzapp.android.view.AppInfoView
android:id="@+id/firstnamePizzalinkInfoLayout"
android:layout_width="match_parent"

View File

@@ -191,6 +191,7 @@
<!-- CreateOrderSummaryFragment-->
<!-- ProfileFragment-->    
<string name="pizza_pass">PIZZA PASS</string>    
<string name="profile_firstname">VORNAME</string>    
<string name="profile_lastname">NACHNAME</string>    
<string name="profile_telephone">TELEFONNUMMER</string>