Merge branch 'master' of https://github.com/ebivibe/SEG2105-Olympus into DBBranch
This commit is contained in:
commit
a8f5aade8b
11 changed files with 21 additions and 54 deletions
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WizardSettings">
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="vectorWizard">
|
||||
<value>
|
||||
<PersistentState />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
Binary file not shown.
|
@ -1,29 +1,5 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<DBN-PSQL>
|
||||
<case-options enabled="false">
|
||||
<option name="KEYWORD_CASE" value="lower" />
|
||||
<option name="FUNCTION_CASE" value="lower" />
|
||||
<option name="PARAMETER_CASE" value="lower" />
|
||||
<option name="DATATYPE_CASE" value="lower" />
|
||||
<option name="OBJECT_CASE" value="preserve" />
|
||||
</case-options>
|
||||
<formatting-settings enabled="false" />
|
||||
</DBN-PSQL>
|
||||
<DBN-SQL>
|
||||
<case-options enabled="false">
|
||||
<option name="KEYWORD_CASE" value="lower" />
|
||||
<option name="FUNCTION_CASE" value="lower" />
|
||||
<option name="PARAMETER_CASE" value="lower" />
|
||||
<option name="DATATYPE_CASE" value="lower" />
|
||||
<option name="OBJECT_CASE" value="preserve" />
|
||||
</case-options>
|
||||
<formatting-settings enabled="false">
|
||||
<option name="STATEMENT_SPACING" value="one_line" />
|
||||
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
|
||||
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
|
||||
</formatting-settings>
|
||||
</DBN-SQL>
|
||||
<Objective-C-extensions>
|
||||
<file>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -20,6 +20,8 @@ import android.widget.RadioGroup;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class Bookings extends AppCompatActivity {
|
||||
|
@ -43,10 +45,12 @@ public class Bookings extends AppCompatActivity {
|
|||
dbhelper = new DBHelper(this);
|
||||
|
||||
List<Booking> booking = (List<Booking>)dbhelper.findBookings(username);
|
||||
Collections.reverse(booking);
|
||||
Booking[] bookings = new Booking[booking.size()];
|
||||
bookings = booking.toArray(bookings);
|
||||
Booking[] mostRecentBookings = new Booking[bookings.length];
|
||||
|
||||
/* mock data
|
||||
/* //mock data
|
||||
Booking[] bookings = {new Booking(5, 5, 6, 6, 2, 3, 2019, (ServiceProvider)dbhelper.findUserByUsername("testing"),
|
||||
(HomeOwner)dbhelper.findUserByUsername("tester"), dbhelper.findService("service1"))};
|
||||
*/
|
||||
|
|
|
@ -85,7 +85,14 @@ public class FindServiceProvider extends AppCompatActivity {
|
|||
|
||||
public void Reset(View view){
|
||||
|
||||
|
||||
Button button = findViewById(R.id.Start);
|
||||
Button button2 = findViewById(R.id.End);
|
||||
Button button3 = findViewById(R.id.Date);
|
||||
RadioGroup ratingselect = findViewById(R.id.RatingSelect);
|
||||
button.setText("START");
|
||||
button2.setText("END");
|
||||
button3.setText("DATE");
|
||||
ratingselect.clearCheck();
|
||||
//clears recycler view
|
||||
String[][] empty = {};
|
||||
mAdapter = new MyAdapter(empty, this);
|
||||
|
|
|
@ -82,8 +82,6 @@ public class MakeBooking extends AppCompatActivity {
|
|||
if (starth<endh || (starth==endh && startmin<endmin)){
|
||||
DBHelper dbHelper = new DBHelper(this);
|
||||
|
||||
//check if sp is availible not just true
|
||||
if(true) {
|
||||
|
||||
if (dbHelper.addBooking(serviceprovider, homeowner, service, year, month, day,
|
||||
starth, startmin, endh, endmin)) {
|
||||
|
@ -96,7 +94,6 @@ public class MakeBooking extends AppCompatActivity {
|
|||
} else {
|
||||
Toast.makeText(this, "Booking could not be made", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@ class UserType
|
|||
firstname;
|
||||
lastname;
|
||||
username;
|
||||
password;
|
||||
salt;
|
||||
hash;
|
||||
}
|
||||
|
||||
class HomeOwner
|
||||
|
@ -25,7 +26,7 @@ isA UserType;
|
|||
class Admin
|
||||
{
|
||||
isA UserType;
|
||||
1 -- * Service creates;
|
||||
1 -- * Service;
|
||||
}
|
||||
|
||||
class Service
|
||||
|
@ -48,6 +49,7 @@ class Booking
|
|||
int year;
|
||||
status;
|
||||
int rating;
|
||||
comment;
|
||||
* -- 1 HomeOwner;
|
||||
* -- 1 ServiceProvider;
|
||||
* -- 1 Service;
|
||||
|
@ -73,6 +75,7 @@ class Admin
|
|||
position 490 236 109 41;
|
||||
position.association Admin__Service 66,41 0,52;
|
||||
position.association Admin__Service:create 109,28 0,60;
|
||||
position.association Admin__Service:creates 109,16 0,28;
|
||||
}
|
||||
|
||||
class Service
|
||||
|
@ -83,7 +86,7 @@ class Service
|
|||
|
||||
class Booking
|
||||
{
|
||||
position 99 433 178 211;
|
||||
position 99 433 178 194;
|
||||
position.association Booking__HomeOwner 62,0 54,41;
|
||||
position.association Booking__ServiceProvider 178,50 0,94;
|
||||
position.association Booking__Service 178,120 0,68;
|
||||
|
|
|
@ -15,5 +15,5 @@ password = testing
|
|||
APK tested on a Sony Xperia XA2, model H3123
|
||||
|
||||
Build Status
|
||||
[![CircleCI](https://circleci.com/gh/ebivibe/SEG2105-Olympus/tree/deliverable3.svg?style=svg&circle-token=01dbbc3800d7ee80871796675582a67ba7c83604)](https://circleci.com/gh/ebivibe/SEG2105-Olympus/tree/deliverable3)
|
||||
[![CircleCI](https://circleci.com/gh/ebivibe/SEG2105-Olympus/tree/master.svg?style=svg&circle-token=01dbbc3800d7ee80871796675582a67ba7c83604)](https://circleci.com/gh/ebivibe/SEG2105-Olympus/tree/master)
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue