Fakultas Ilmu Komputer UI

Commit 3c8e6fa9 authored by Patricia Anugrah Setiani's avatar Patricia Anugrah Setiani
Browse files

[CHORES] edit changelogs 3.5.2

parents 5a34d61c 025958f6
Pipeline #82075 passed with stages
in 14 minutes and 56 seconds
......@@ -6,4 +6,9 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
......@@ -8,7 +8,13 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:requestLegacyExternalStorage="true"
android:name="io.flutter.app.FlutterApplication"
android:label="bisaGo"
android:icon="@mipmap/launcher_icon">
......
......@@ -6,4 +6,9 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
3.5.1:
3.5.2:
- Tersedia nama dan foto profil pada drawer
3.5.0:
- Pengguna dapat mengganti foto profil
- Pengguna dapat mengubah informasi kegiatan yang sudah ada
3.4.0:
- Notifikasi pengguna untuk komentar baru
......@@ -11,16 +10,11 @@
- Kegiatan disabilitas di suatu lokasi
- Perbaikan bugs
3.2.1:
- Perbaikan masalah update fasilitas
3.2.0:
- Tersedia fitur membagikan informasi fasilitas/kegiatan disabilitas kepada orang lain
3.1.2:
- Perbaikan masuk dengan Google
3.1.1:
- Tersedia fitur pencarian layanan
- Tersedia pilihan kamera ketika menambahkan gambar fasilitas
- Tersedia fitur riwayat pencarian
......@@ -36,14 +36,38 @@ class KegiatanBloc {
}
Future<dynamic> addNewKegiatan(
Map<String, dynamic> newKegiatanData, String placeId) async {
Map<String, dynamic> newKegiatanData) async {
try {
return await _kegiatanRepository.createKegiatan(newKegiatanData, placeId);
return await _kegiatanRepository.createKegiatan(newKegiatanData);
} catch (e) {
return Response('Failed to register komentar', 400);
}
}
Future<dynamic> updateKegiatan(
Map<String, dynamic> newKegiatanData,
String placeId,
int id
) async {
try {
return await _kegiatanRepository.updateKegiatan(
newKegiatanData, placeId, id);
} catch (e) {
return {'response': 'FAILED'};
}
}
Future<KegiatanModel> fetchDetailKegiatan(String placeId, int kegiatanId) async {
try {
return await _kegiatanRepository.fetchDetailKegiatan(
placeId,
kegiatanId
);
} catch (e) {
return KegiatanModel();
}
}
void resetKegiatanList() {
kegiatanListSink
.add(NetworkModel.completed(KegiatanList(allKegiatanFromApi)));
......
......@@ -131,7 +131,7 @@ class BisaGoDrawer extends StatelessWidget {
),
Container(
decoration:
BoxDecoration(border: Border(top: BorderSide(color: Colors.white))),
BoxDecoration(border: Border(top: BorderSide(color: Colors.white))),
),
];
menus.forEach((element) => drawerItem.add(element));
......
......@@ -2,6 +2,6 @@ import 'package:intl/intl.dart';
class CustomSerializer {
static DateTime stringToDateTime(String date) {
return DateFormat('dd-MM-yyyy hh:mm').parse(date);
return DateFormat('yyyy-MM-dd HH:mm').parse(date);
}
}
......@@ -99,6 +99,12 @@ const fasilitas = {
'TB': 'Tempat Parkir Biasa',
};
const zonaWaktu = [
'WIB',
'WITA',
'WIT',
];
String getTag(String tag) {
return tags[tag];
}
......@@ -13,34 +13,45 @@ class KegiatanList {
class KegiatanModel {
final int id;
@JsonKey(name: 'place_id')
final String placeId;
final String creator;
@JsonKey(name: 'creator_email')
final String creatorEmail;
String placeId;
String creator;
@JsonKey(name: 'nama_kegiatan')
final String namaKegiatan;
final String penyelenggara;
final String narahubung;
final String deskripsi;
String namaKegiatan;
@JsonKey(name: 'creator_email')
String creatorEmail;
String penyelenggara;
String deskripsi;
@JsonKey(name: 'nama_kontak')
String namaKontak;
@JsonKey(name: 'nomor_kontak')
String nomorKontak;
String links;
@JsonKey(name: 'time_start', fromJson: CustomSerializer.stringToDateTime)
final DateTime timeStart;
DateTime timeStart;
@JsonKey(name: 'time_end', fromJson: CustomSerializer.stringToDateTime)
final DateTime timeEnd;
List<String> image;
DateTime timeEnd;
@JsonKey(name: 'zona_waktu')
String zonaWaktu;
List<String> images;
KegiatanModel({
this.id,
this.placeId,
this.creator,
this.namaKegiatan,
this.penyelenggara,
this.narahubung,
this.deskripsi,
this.timeStart,
this.timeEnd,
this.image,
this.creatorEmail,
});
KegiatanModel(
{
this.id,
this.placeId,
this.creator,
this.namaKegiatan,
this.creatorEmail,
this.penyelenggara,
this.deskripsi,
this.namaKontak,
this.nomorKontak,
this.links,
this.timeStart,
this.timeEnd,
this.zonaWaktu,
this.images,
}
);
factory KegiatanModel.fromJson(Map<String, dynamic> json) =>
_$KegiatanModelFromJson(json);
......
......@@ -27,13 +27,16 @@ KegiatanModel _$KegiatanModelFromJson(Map<String, dynamic> json) {
placeId: json['place_id'] as String,
creator: json['creator'] as String,
namaKegiatan: json['nama_kegiatan'] as String,
creatorEmail: json['creator_email'] as String,
penyelenggara: json['penyelenggara'] as String,
narahubung: json['narahubung'] as String,
deskripsi: json['deskripsi'] as String,
namaKontak: json['nama_kontak'] as String,
nomorKontak: json['nomor_kontak'] as String,
links: json['links'] as String,
timeStart: CustomSerializer.stringToDateTime(json['time_start'] as String),
timeEnd: CustomSerializer.stringToDateTime(json['time_end'] as String),
image: (json['image'] as List)?.map((e) => e as String)?.toList(),
creatorEmail: json['creator_email'] as String,
zonaWaktu: json['zona_waktu'] as String,
images: (json['images'] as List)?.map((e) => e as String)?.toList(),
);
}
......@@ -42,12 +45,15 @@ Map<String, dynamic> _$KegiatanModelToJson(KegiatanModel instance) =>
'id': instance.id,
'place_id': instance.placeId,
'creator': instance.creator,
'creator_email': instance.creatorEmail,
'nama_kegiatan': instance.namaKegiatan,
'creator_email': instance.creatorEmail,
'penyelenggara': instance.penyelenggara,
'narahubung': instance.narahubung,
'deskripsi': instance.deskripsi,
'nama_kontak': instance.namaKontak,
'nomor_kontak': instance.nomorKontak,
'links': instance.links,
'time_start': instance.timeStart?.toIso8601String(),
'time_end': instance.timeEnd?.toIso8601String(),
'image': instance.image,
'zona_waktu': instance.zonaWaktu,
'images': instance.images,
};
import 'package:intl/intl.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:bisaGo/config/custom_serializer.dart';
part 'komentar.g.dart';
......@@ -16,7 +16,7 @@ class KomentarModel {
final String namaLokasi;
final String deskripsi;
final String creator;
@JsonKey(name: 'date_time', fromJson: CustomSerializer.stringToDateTime)
@JsonKey(name: 'date_time', fromJson: _stringToDateTime)
final DateTime dateTime;
final String tag;
final List<String> disabilitas;
......@@ -48,3 +48,7 @@ class KomentarModel {
Map<String, dynamic> toJson() => _$KomentarModelToJson(this);
}
DateTime _stringToDateTime(String date) {
return DateFormat('dd-MM-yyyy hh:mm').parse(date);
}
......@@ -27,7 +27,7 @@ KomentarModel _$KomentarModelFromJson(Map<String, dynamic> json) {
namaLokasi: json['nama_lokasi'] as String,
deskripsi: json['deskripsi'] as String,
creator: json['creator'] as String,
dateTime: CustomSerializer.stringToDateTime(json['date_time'] as String),
dateTime: _stringToDateTime(json['date_time'] as String),
tag: json['tag'] as String,
disabilitas:
(json['disabilitas'] as List)?.map((e) => e as String)?.toList(),
......
import 'package:intl/intl.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:bisaGo/config/custom_serializer.dart';
part 'komentar_posting.g.dart';
......@@ -18,7 +18,7 @@ class KomentarPostingModel {
final String creatorEmail;
@JsonKey(name: 'creator_picture')
final String creatorPicture;
@JsonKey(fromJson: CustomSerializer.stringToDateTime)
@JsonKey(fromJson: _stringToDateTime)
final DateTime created;
KomentarPostingModel({
......@@ -35,3 +35,7 @@ class KomentarPostingModel {
Map<String, dynamic> toJson() => _$KomentarPostingModelToJson(this);
}
DateTime _stringToDateTime(String date) {
return DateFormat('dd-MM-yyyy hh:mm').parse(date);
}
......@@ -29,7 +29,7 @@ KomentarPostingModel _$KomentarPostingModelFromJson(Map<String, dynamic> json) {
creator: json['creator'] as String,
creatorEmail: json['creator_email'] as String,
creatorPicture: json['creator_picture'] as String,
created: CustomSerializer.stringToDateTime(json['created'] as String),
created: _stringToDateTime(json['created'] as String),
);
}
......
import 'package:intl/intl.dart';
import 'package:bisaGo/config/custom_serializer.dart';
import 'package:json_annotation/json_annotation.dart';
part 'komentar_posting_kegiatan.g.dart';
......@@ -18,7 +18,7 @@ class KomentarPostingKegiatanModel {
@JsonKey(name: 'creator_picture')
final String creatorPicture;
final String deskripsi;
@JsonKey(name: 'created', fromJson: _stringToDateTime)
@JsonKey(name: 'created', fromJson: CustomSerializer.stringToDateTime)
final DateTime created;
KomentarPostingKegiatanModel({
......@@ -35,7 +35,3 @@ class KomentarPostingKegiatanModel {
Map<String, dynamic> toJson() => _$KomentarPostingKegiatanModelToJson(this);
}
DateTime _stringToDateTime(String date) {
return DateFormat('yyy-MM-dd hh:mm').parse(date);
}
......@@ -29,7 +29,7 @@ KomentarPostingKegiatanModel _$KomentarPostingKegiatanModelFromJson(
id: json['id'] as int,
creator: json['creator'] as String,
deskripsi: json['deskripsi'] as String,
created: _stringToDateTime(json['created'] as String),
created: CustomSerializer.stringToDateTime(json['created'] as String),
creatorEmail: json['creator_email'] as String,
creatorPicture: json['creator_picture'] as String,
);
......
......@@ -77,7 +77,7 @@ class NetworkInterface {
}
Future<void> setToken(bool isLogin) async {
if (isLogin) {
if (isLogin == true) {
final sharedPreferences = await SharedPreferences.getInstance();
dio.options.headers['Authorization'] =
'Token ${sharedPreferences.getString('token')}';
......
......@@ -422,7 +422,6 @@ class AddInformasiState extends State<AddInformasi> {
.asUint8List();
newKomentarData['image'] =
MultipartFile.fromBytes(bytes, filename: 'kursiroda.jpg');
print('Fasilitas null dalem addinfo adalah: ' + _jenisFasilitas);
break;
case 'LF':
var bytes =
......@@ -520,12 +519,11 @@ class AddInformasiState extends State<AddInformasi> {
.asUint8List();
newKomentarData['image'] =
MultipartFile.fromBytes(bytes, filename: 'defaultDisable.png');
print('Fasilitas null default addinfo adalah: ' + _jenisFasilitas);
break;
}
} else {
final fileName = _image.path.split('/').last;
newKomentarData['image'] = MultipartFile.fromFile(
newKomentarData['image'] = await MultipartFile.fromFile(
_image.path,
filename: fileName,
);
......
......@@ -140,7 +140,7 @@ class DashboardState extends State<Dashboard> {
void _showTurnOnLocationDialog(BuildContext context) {
bloc.isLocationServiceTurnedOn().then(
(value) {
(value) {
if (!value) {
showDialog(
context: context,
......@@ -187,7 +187,7 @@ class DashboardState extends State<Dashboard> {
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: doubleSpace),
const EdgeInsets.symmetric(horizontal: doubleSpace),
child: StreamBuilder<NetworkModel>(
stream: blocKegiatanTerdekat.kegiatanTerdekatStream,
builder: (context, snapshot) {
......@@ -197,9 +197,9 @@ class DashboardState extends State<Dashboard> {
return Container(
child: const Center(
child: LinearProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(
greenPrimary),
)));
valueColor: AlwaysStoppedAnimation<Color>(
greenPrimary),
)));
break;
case Status.completed:
final kegiatanTerdekat = snapshot.data.data;
......@@ -209,14 +209,14 @@ class DashboardState extends State<Dashboard> {
case Status.error:
return Container(
child: const Center(
child: Text(
'Tidak ada kegiatan dalam waktu dekat',
style: TextStyle(
color: greenPrimary,
fontSize: 16,
fontFamily: 'Muli',
)),
));
child: Text(
'Tidak ada kegiatan dalam waktu dekat',
style: TextStyle(
color: greenPrimary,
fontSize: 16,
fontFamily: 'Muli',
)),
));
break;
}
return Container();
......@@ -346,8 +346,8 @@ class DashboardState extends State<Dashboard> {
Row(
children: lokasilistresponse
.map<Widget>((k) => LocationIconButton(
location: k,
))
location: k,
))
.toList()),
],
),
......@@ -366,7 +366,7 @@ class DashboardState extends State<Dashboard> {
} else {
return GoogleMap(
initialCameraPosition:
CameraPosition(target: currentLocation, zoom: cameraZoom),
CameraPosition(target: currentLocation, zoom: cameraZoom),
onMapCreated: (GoogleMapController controller) {
mapController = controller;
},
......@@ -417,20 +417,20 @@ class DashboardState extends State<Dashboard> {
..name = namaLokasi;
final fasilitasRoute = MaterialPageRoute(
builder: (BuildContext context) => DetailPostPage(
lokasi: lokasi,
komentar: KomentarModel(
creator: fasilitas.creator,
dateTime: fasilitas.dateTime,
deskripsi: fasilitas.deskripsi,
id: fasilitas.id,
image: fasilitas.image,
isVerified: fasilitas.isVerified,
namaLokasi: lokasi.name,
tag: fasilitas.tag,
disabilitas: fasilitas.disabilitas,
jumlah: fasilitas.jumlah,
),
));
lokasi: lokasi,
komentar: KomentarModel(
creator: fasilitas.creator,
dateTime: fasilitas.dateTime,
deskripsi: fasilitas.deskripsi,
id: fasilitas.id,
image: fasilitas.image,
isVerified: fasilitas.isVerified,
namaLokasi: lokasi.name,
tag: fasilitas.tag,
disabilitas: fasilitas.disabilitas,
jumlah: fasilitas.jumlah,
),
));
await Navigator.of(context).push(fasilitasRoute);
}
......@@ -447,20 +447,23 @@ class DashboardState extends State<Dashboard> {
..name = namaLokasi;
final fasilitasRoute = MaterialPageRoute(
builder: (BuildContext context) => DetailPostKegiatanPage(
lokasi: lokasi,
kegiatan: KegiatanModel(
id: kegiatan.id,
placeId: lokasi.placeId,
creator: kegiatan.creator,
namaKegiatan: kegiatan.namaKegiatan,
penyelenggara: kegiatan.penyelenggara,
narahubung: kegiatan.narahubung,
deskripsi: kegiatan.deskripsi,
timeStart: kegiatan.timeStart,
timeEnd: kegiatan.timeEnd,
image: kegiatan.image,
),
));
lokasi: lokasi,
kegiatan: KegiatanModel(
id: kegiatan.id,
placeId: lokasi.placeId,
creator: kegiatan.creator,
namaKegiatan: kegiatan.namaKegiatan,
penyelenggara: kegiatan.penyelenggara,
deskripsi: kegiatan.deskripsi,
namaKontak: kegiatan.namaKontak,
nomorKontak: kegiatan.nomorKontak,
links: kegiatan.links,
timeStart: kegiatan.timeStart,
timeEnd: kegiatan.timeEnd,
zonaWaktu: kegiatan.zonaWaktu,
images: kegiatan.images,
),
));
await Navigator.of(context).push(fasilitasRoute);
}
......@@ -470,8 +473,8 @@ class DashboardState extends State<Dashboard> {
_handleDeepLink(data);
FirebaseDynamicLinks.instance.onLink(
onSuccess: (PendingDynamicLinkData dynamicLink) async {
_handleDeepLink(dynamicLink);
}, onError: (OnLinkErrorException e) async {
_handleDeepLink(dynamicLink);
}, onError: (OnLinkErrorException e) async {
print('Link Failed: ${e.message}');
});
}
......
This diff is collapsed.
Supports Markdown
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