Commit df3c2863 authored by Kryzl Deanne Pascual's avatar Kryzl Deanne Pascual

Merge remote-tracking branch 'origin/master'

Conflicts:

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/AddEditProfile.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/Admin.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/Cart.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/Customer.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/EditBill.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/EditMenu.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/Kitchen.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/Login.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/MainActivity.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/R$id.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/R$layout.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/R$menu.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/R$string.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/R$style.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/Register.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/SelectAccount.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/Settings.class

	RestaurantOrderingSystem/bin/classes/com/cs123grpE/restaurantorderingsystem/ViewProfile.class

	RestaurantOrderingSystem/gen/com/cs123grpE/restaurantorderingsystem/R.java
	RestaurantOrderingSystem/res/layout/activity_add_edit_profile.xml
parents 0f975aef b6c87e87
......@@ -29,64 +29,66 @@ public final class R {
public static final int prelimlogo=0x7f020003;
}
public static final class id {
public static final int action_settings=0x7f080039;
public static final int btnAddMenu=0x7f08001a;
public static final int btnAddToCart=0x7f080036;
public static final int btnAdmin=0x7f08002d;
public static final int btnBack=0x7f080035;
public static final int btnCancel=0x7f08002a;
public static final int btnCart=0x7f080016;
public static final int action_settings=0x7f08003b;
public static final int btnAddMenu=0x7f08001b;
public static final int btnAddToCart=0x7f080038;
public static final int btnAdmin=0x7f08002e;
public static final int btnBack=0x7f080037;
public static final int btnCancel=0x7f08002b;
public static final int btnCart=0x7f080017;
public static final int btnConfigure=0x7f08000b;
public static final int btnConfirm=0x7f08002b;
public static final int btnCustomer=0x7f08002f;
public static final int btnDelete=0x7f080018;
public static final int btnDeleteMenu=0x7f080019;
public static final int btnConfirm=0x7f08002c;
public static final int btnCustomer=0x7f080030;
public static final int btnDelete=0x7f080019;
public static final int btnDeleteMenu=0x7f08001a;
public static final int btnDone=0x7f080005;
public static final int btnEditBill=0x7f08000a;
public static final int btnEditMenu=0x7f080009;
public static final int btnFinalize=0x7f08000e;
public static final int btnKitchen=0x7f08002e;
public static final int btnLogin=0x7f080021;
public static final int btnKitchen=0x7f08002f;
public static final int btnLogin=0x7f080022;
public static final int btnLogout=0x7f08000c;
public static final int btnOff=0x7f080010;
public static final int btnOn=0x7f080011;
public static final int btnRegister=0x7f080022;
public static final int btnRevert=0x7f080017;
public static final int btnOff=0x7f080011;
public static final int btnOn=0x7f080012;
public static final int btnRegister=0x7f080023;
public static final int btnRevert=0x7f080018;
public static final int btnSave=0x7f080006;
public static final int btnSearch=0x7f080014;
public static final int checkRem=0x7f080020;
public static final int list=0x7f080015;
public static final int btnSearch=0x7f080015;
public static final int checkRem=0x7f080021;
public static final int list=0x7f080016;
public static final int listCart=0x7f08000d;
public static final int listKitchen=0x7f08001b;
public static final int listview1=0x7f080012;
public static final int listKitchen=0x7f08001c;
public static final int listview1=0x7f080013;
public static final int logo=0x7f080007;
public static final int logout=0x7f080030;
public static final int textView00=0x7f080037;
public static final int textView01=0x7f080038;
public static final int textView1=0x7f08001c;
public static final int textView2=0x7f08001e;
public static final int textView3=0x7f08002c;
public static final int textView4=0x7f080023;
public static final int textView5=0x7f080024;
public static final int textView6=0x7f080026;
public static final int textView7=0x7f080028;
public static final int logout=0x7f080031;
public static final int priceName=0x7f080033;
public static final int textView00=0x7f080039;
public static final int textView01=0x7f08003a;
public static final int textView1=0x7f08001d;
public static final int textView2=0x7f08001f;
public static final int textView3=0x7f08002d;
public static final int textView4=0x7f080024;
public static final int textView5=0x7f080025;
public static final int textView6=0x7f080027;
public static final int textView7=0x7f080029;
public static final int textView8=0x7f080008;
public static final int textView9=0x7f08000f;
public static final int tvDesc=0x7f080033;
public static final int tvName=0x7f080031;
public static final int tvPrice=0x7f080032;
public static final int tvTags=0x7f080034;
public static final int textView9=0x7f080010;
public static final int totesPrice=0x7f08000f;
public static final int tvDesc=0x7f080035;
public static final int tvName=0x7f080032;
public static final int tvPrice=0x7f080034;
public static final int tvTags=0x7f080036;
public static final int txtCategory=0x7f080002;
public static final int txtDescription=0x7f080003;
public static final int txtIngredients=0x7f080004;
public static final int txtItemName=0x7f080000;
public static final int txtPass=0x7f08001f;
public static final int txtPass2=0x7f080029;
public static final int txtPass=0x7f080020;
public static final int txtPass2=0x7f08002a;
public static final int txtPrice=0x7f080001;
public static final int txtResto=0x7f080025;
public static final int txtSearch=0x7f080013;
public static final int txtTags=0x7f080004;
public static final int txtUser=0x7f08001d;
public static final int txtUser2=0x7f080027;
public static final int txtResto=0x7f080026;
public static final int txtSearch=0x7f080014;
public static final int txtUser=0x7f08001e;
public static final int txtUser2=0x7f080028;
}
public static final class layout {
public static final int activity_add_edit_profile=0x7f030000;
......
......@@ -125,7 +125,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtTags"
android:id="@+id/txtIngredients"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine" />
......
......@@ -38,6 +38,7 @@
</TextView>
<TextView
android:id="@+id/totesPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0.00"
......
......@@ -10,7 +10,7 @@
tools:context="com.cs123grpE.restaurantorderingsystem.EditMenu" >
<ExpandableListView
android:id="@android:id/list"
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
......
......@@ -41,6 +41,7 @@
android:layout_height="wrap_content" >
<TextView
android:id="@+id/priceName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Price:"
......
......@@ -5,6 +5,7 @@ import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public class AddEditProfile extends Activity {
......@@ -45,6 +46,13 @@ public class AddEditProfile extends Activity {
public void save (View v) {
// do stuff to save fields
EditText nm = (EditText) findViewById (R.id.txtItemName);
EditText price = (EditText) findViewById (R.id.txtPrice);
EditText des = (EditText) findViewById (R.id.txtDescription);
EditText tag = (EditText) findViewById (R.id.txtIngredients);
Toast.makeText (this, "Item is added to menu.", Toast.LENGTH_SHORT).show();
finish();
}
......
......@@ -38,4 +38,5 @@ public class Cart extends Activity {
// Send cart contents to kitchen and clear
Toast.makeText(this, "Orders finalized.", Toast.LENGTH_SHORT).show();
}
}
......@@ -102,6 +102,10 @@ public class Customer extends Activity {
order.put("quantity", 1);
order.saveInBackground();
Intent i = new Intent(getApplicationContext(), ViewProfile.class);
i.putExtra("menu_name", name);
startActivity(i);
}catch(Exception e) {}
......
......@@ -124,10 +124,6 @@ public class EditMenu extends Activity {
Toast.makeText(this, "You will delete a Menu Item.", Toast.LENGTH_SHORT).show();
}
public void onResume() {
// refresh menu list
}
private void prepareListData() {
listDataHeader = new ArrayList<String>();
listDataChild = new HashMap<String, List<String>>();
......
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import com.parse.*;
public class ViewProfile extends Activity {
String itemname = "";
String description = "";
String tags = "";
double price = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_profile);
Intent i = getIntent();
String name = i.getStringExtra("menu_name");
ParseObject x = null;
try{
x = (new ParseQuery("Menu_Item")).whereMatches("item_name", name).getFirst();
itemname = x.getString("item_name");
description = x.getString("item_desc");
tags = x.getString("ingridient_name");
price = x.getDouble("item_price");
}catch(Exception e) {}
TextView ax = (TextView) findViewById (R.id.tvName);
TextView bx = (TextView) findViewById (R.id.priceName);
TextView cx = (TextView) findViewById (R.id.tvDesc);
TextView dx = (TextView) findViewById (R.id.tvTags);
ax.setText(itemname);
bx.setText(Double.toString(price));
cx.setText(description);
dx.setText(tags);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment