Skip to content

Commit ed163af

Browse files
committed
Merge branch 'main' into integration
2 parents f9571d1 + 8453a26 commit ed163af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2042
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can find here detailed about the product (or mini-app or module), from a hig
2020
* [Implementation]
2121
* [Test]
2222
* [Configuration and change management]
23-
* [Project management]
23+
* [Project management](./docs/ProjectManagement.md)
2424

2525
So far, contributions are exclusively made by the initial team, but we hope to open them to the community, in all areas and topics: requirements, technologies, development, experimentation, testing, etc.
2626

docs/ProjectManagement.md

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
## Project management
2+
3+
Below, you can find information, plans, and retrospective about our project on the context of ESOF. This is still an ongoing project and may suffer some changes
4+
5+
## Release 1.0
6+
* Release management: [Release 1.0](https://github.com/LEIC-ES-2021-22/2LEIC15T2/releases/tag/v1.0)
7+
8+
## Release 1.1
9+
* Backlog management: Product backlog and Iteration backlog in a [Github Projects board](https://github.com/LEIC-ES-2021-22/templates/projects/1);
10+
* Release management: [Release 1.1](https://github.com/LEIC-ES-2021-22/2LEIC15T2/releases/tag/v1.1)
11+
* Iteration planning and retrospectives:
12+
* Final Board
13+
* Example:
14+
<p align="center" justify="center">
15+
<img src="../images/iteration1.PNG"/>
16+
</p>
17+
18+
* Retrospectives:
19+
* Did well: </br>
20+
Work items planning</br>
21+
Good Communication</br>
22+
Work consistency</br>
23+
Fast development in the user GUI app </br>
24+
25+
* Do Differently:</br>
26+
Bad assigning to user stories (1 person can´t be in 2+ user stories at the same time)</br>
27+
Assign 2 people to focus on tests implementation </br>
28+
29+
30+
* Puzzles: </br>
31+
Task assigning to iteration backlog </br>
32+
Choosing the right tags to each work item</br>
33+
Flutter programming (we are still newbies!) </br>
34+
Gherkin Tests</br>
35+
36+
## Release 1.2
37+
38+
* Release management: [Release 1.2](https://github.com/LEIC-ES-2021-22/2LEIC15T2/releases/tag/v1.2);
39+
* Iteration planning and retrospectives:
40+
* Initial Board:
41+
<p align="center" justify="center">
42+
<img src="../images/Iteration 2 board.PNG"/>
43+
</p>
44+
* Final Board:
45+
<p align="center" justify="center">
46+
<img src="../images/Iteration2BoardFinal.PNG"/>
47+
</p>
48+
49+
* Retrospectives:
50+
51+
* Did well: </br>
52+
Gherkin Tests</br>
53+
Good communication among the team maintained</br>
54+
Dart programming is becoming more intuitive</br>
55+
56+
57+
* Do Differently:</br>
58+
Unit testing - Some tests could be implemented in easier ways </br>
59+
60+
61+
* Puzzles: </br>
62+
Dificulty of user stories - some where underestimated</br>
63+
Integration of tests with the UNI app</br>
64+
65+
66+
67+
## Final Release
68+
69+
* Release management: [Release 1.2](https://github.com/LEIC-ES-2021-22/2LEIC15T2/releases/tag/v1.2);
70+
71+
* Iteration planning and retrospectives:
72+
* Initial Board:
73+
<p align="center" justify="center">
74+
<img src="../images/finalreleaseinitial.png"/>
75+
</p>
76+
* Final Board:
77+
<p align="center" justify="center">
78+
<img src="../images/finalreleasefinal (1).png"/>
79+
</p>
80+
81+
* Retrospectives:
82+
83+
* Did well: </br>
84+
Finished Gherkin Tests and Unit Tests</br>
85+
Good communication among the team maintained</br>
86+
Dart programming is becoming more intuitive</br>
87+
88+
89+
* Do Differently:</br>
90+
91+
92+
93+
* Puzzles: </br>
94+
Integration of tests with the UNI app</br>
95+
We were unable to optimize the GPS Location due to some bugs while interacting with the UNI app. </br>
96+
97+
98+

flutter_prototype/lib/main.dart

+188
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_code/src/objects/facility.dart';
3+
import 'package:flutter_code/src/server_comm/authentication.dart';
4+
import 'package:flutter_code/src/views/facility_view.dart';
5+
import 'src/server_comm/requests.dart';
6+
import 'package:geolocator/geolocator.dart';
7+
import 'package:geocoding/geocoding.dart';
8+
9+
void main() => runApp(const MyApp());
10+
11+
class MyApp extends StatelessWidget {
12+
const MyApp({Key? key}) : super(key: key);
13+
14+
@override
15+
Widget build(BuildContext context) {
16+
return MaterialApp(
17+
title: 'FEUPQ',
18+
theme: ThemeData(primarySwatch: Colors.deepOrange),
19+
home: const HomeView(),
20+
);
21+
}
22+
}
23+
24+
// Filter makes it so the Widget is Stateful
25+
class HomeView extends StatefulWidget {
26+
final String? authToken;
27+
const HomeView({Key? key, this.authToken}) : super(key: key);
28+
29+
@override
30+
State<HomeView> createState() => _HomeViewState();
31+
}
32+
33+
class _HomeViewState extends State<HomeView> {
34+
final List<Facility> __facility = getFacilitiesList();
35+
late List<Facility> facility;
36+
@override
37+
void initState() {
38+
super.initState();
39+
facility = __facility;
40+
}
41+
42+
// var nearestFacility = getNearestFacility();
43+
// facility.remove(nearestFacility);
44+
// facility.insert(0, nearestFacility);
45+
@override
46+
Widget build(BuildContext context) {
47+
return Scaffold(
48+
appBar: AppBar(
49+
title: const Center(
50+
child: Text('FEUPQ'),
51+
),
52+
),
53+
body: Column(children: [
54+
FutureBuilder<Facility>(
55+
future: getNearestFacility(facility),
56+
builder: (context, snapshot) {
57+
if (snapshot.hasData) {
58+
return Column(children: [
59+
Text("Fila mais perto:",style: const TextStyle(height: 3, fontSize: 20)),
60+
Card(
61+
child: ListTile(
62+
title: Text(snapshot.data!.name),
63+
onTap: () {
64+
Navigator.of(context).push(MaterialPageRoute(
65+
builder: (context) => FacilityView(
66+
facility: facility[snapshot.data!.id],
67+
)));
68+
}),
69+
)
70+
]);
71+
} else {
72+
return Text("Não há fila mais proxima",style: const TextStyle(height: 3, fontSize: 20));
73+
}
74+
}),
75+
Text("Todas as Filas: ",style: const TextStyle(height: 3, fontSize: 20)),
76+
Padding(
77+
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
78+
child: TextField(
79+
key: const ValueKey("searchBar"),
80+
onChanged: (text) {
81+
setState(() {
82+
if (text == "") {
83+
facility = __facility;
84+
} else {
85+
facility = __facility
86+
.where((facility) => facility.name
87+
.toLowerCase()
88+
.contains(text.toLowerCase()))
89+
.toList();
90+
}
91+
});
92+
},
93+
decoration: const InputDecoration(
94+
border: OutlineInputBorder(),
95+
hintText: 'Barra de Pesquisa',
96+
),
97+
),
98+
),
99+
ListView.builder(
100+
itemCount: facility.length,
101+
itemBuilder: (context, index) {
102+
return Card(
103+
child: ListTile(
104+
title: Text(facility[index].name),
105+
onTap: () {
106+
Navigator.of(context).push(MaterialPageRoute(
107+
builder: (context) => FacilityView(
108+
facility: facility[index],
109+
)));
110+
}),
111+
);
112+
},
113+
shrinkWrap: true,
114+
),
115+
]),
116+
);
117+
}
118+
}
119+
120+
class LoginView extends StatefulWidget {
121+
const LoginView({Key? key}) : super(key: key);
122+
123+
@override
124+
LoginViewState createState() => LoginViewState();
125+
}
126+
127+
class LoginViewState extends State<LoginView> {
128+
bool visible = true;
129+
130+
@override
131+
Widget build(BuildContext context) {
132+
return Scaffold(
133+
appBar: AppBar(
134+
title: const Center(
135+
child: Text('FEUPQ'),
136+
),
137+
),
138+
body: Column(
139+
children: [
140+
Padding(
141+
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
142+
child: TextFormField(
143+
obscureText: true,
144+
decoration: const InputDecoration(
145+
border: UnderlineInputBorder(),
146+
labelText: 'Enter your username',
147+
),
148+
),
149+
),
150+
Padding(
151+
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
152+
child: TextFormField(
153+
obscureText: visible,
154+
decoration: InputDecoration(
155+
border: const UnderlineInputBorder(),
156+
labelText: 'Enter your password',
157+
suffix: InkWell(
158+
onTap: changePasswordVisibilityState,
159+
child: Icon(
160+
visible ? Icons.visibility : Icons.visibility_off,
161+
),
162+
)),
163+
),
164+
),
165+
ElevatedButton(
166+
child: const Text(
167+
'Login/Register',
168+
textAlign: TextAlign.center,
169+
),
170+
onPressed: () {
171+
Navigator.push(
172+
context,
173+
MaterialPageRoute(
174+
builder: (context) =>
175+
HomeView(authToken: logIn("user", "pass"))),
176+
);
177+
},
178+
)
179+
],
180+
));
181+
}
182+
183+
void changePasswordVisibilityState() {
184+
setState(() {
185+
visible = !visible;
186+
});
187+
}
188+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import 'package:location/location.dart';
2+
import 'package:geolocator/geolocator.dart';
3+
import 'package:geocoding/geocoding.dart';
4+
5+
class Facility {
6+
final int id;
7+
final String name;
8+
String state;
9+
bool hasCap;
10+
bool hasQueue;
11+
Facility(this.id, this.name,
12+
{this.state = "Bom", this.hasCap = false, this.hasQueue = true});
13+
}

0 commit comments

Comments
 (0)