Fakultas Ilmu Komputer UI

Commit 3425e89c authored by Muhammad Farhan Ghaffar's avatar Muhammad Farhan Ghaffar
Browse files

pulling from staging

parents 275a9e45 cb4acebb
Pipeline #83933 passed with stages
in 7 minutes and 42 seconds
......@@ -710,7 +710,7 @@
"languageVersion": "2.7"
}
],
"generated": "2021-06-28T03:33:48.914668Z",
"generated": "2021-06-28T05:42:37.870816Z",
"generator": "pub",
"generatorVersion": "2.13.0"
}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_web"]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-06-28 12:00:28.226522","version":"2.1.0-12.1.pre"}
\ No newline at end of file
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_web"]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-06-28 12:42:38.818553","version":"2.1.0-12.1.pre"}
\ No newline at end of file
......@@ -3,7 +3,7 @@
#
# For more info see: https://dart.dev/go/dot-packages-deprecation
#
# Generated by pub on 2021-06-28 10:33:48.803964.
# Generated by pub on 2021-06-28 12:42:37.799009.
_fe_analyzer_shared:file:///D:/src/flutter/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-14.0.0/lib/
analyzer:file:///D:/src/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.41.2/lib/
args:file:///D:/src/flutter/.pub-cache/hosted/pub.dartlang.org/args-2.0.0/lib/
......
import 'dart:convert';
import 'dart:io';
import 'package:fundex_app/pages/business/EquityOfferings.dart';
import 'package:fundex_app/storage/storage.dart';
import 'package:http/http.dart' show Client;
import 'package:http/http.dart' as http;
......@@ -1576,4 +1577,49 @@ class Api {
throw Exception('Get Failed');
}
}
Future equityPurchases() async {
final apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/equity-purchases');
var token = await secureStorage.readSecureData('accessToken');
var headers = {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
};
var apiResult = await client.get(apiURL, headers: headers);
print(await secureStorage.readSecureData('accessToken'));
print(apiResult.reasonPhrase);
print(apiResult.request);
print("get ref state: " + (apiResult.statusCode).toString());
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
List<dynamic> equityPurchases = jsonData['equity_purchases'];
return equityPurchases;
} else {
throw Exception('Get Failed');
}
}
Future equityPurchasesId(int id) async {
final apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/equity-purchases/:$id');
var token = await secureStorage.readSecureData('accessToken');
var headers = {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
};
var apiResult = await client.get(apiURL, headers: headers);
print(await secureStorage.readSecureData('accessToken'));
print(apiResult.reasonPhrase);
print(apiResult.request);
print("get ref state: " + (apiResult.statusCode).toString());
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
return jsonData;
} else {
throw Exception('Get Failed');
}
}
}
This diff is collapsed.
import 'transaksi.dart';
class EquityPurchased {
List<Transaksi> transaksiList;
EquityPurchased({this.transaksiList});
factory EquityPurchased.fromJson(Map<String, dynamic> jsonData) {
var list = jsonData['equity_purchased'] as List;
List<Transaksi> transaksiLists =
list.map((i) => Transaksi.fromJson(i)).toList();
return EquityPurchased(transaksiList: transaksiLists);
}
List<Transaksi> getTransaksiList() {
return this.transaksiList;
}
}
This diff is collapsed.
class DetailTransaksiPembelian {
String name;
int id;
String amount;
String price;
int status;
String trxid;
String createdAt;
String createdBy;
DetailTransaksiPembelian({
this.name,
this.id,
this.amount,
this.price,
this.status,
this.trxid,
this.createdAt,
this.createdBy,
});
factory DetailTransaksiPembelian.fromJson(Map<String, dynamic> json) =>
DetailTransaksiPembelian(
name: json['name'],
id: json['id'],
amount: json['amount'],
price: json['price'],
status: json['status'],
trxid: json['trx_id'],
createdAt: json['created_at'],
createdBy: json['created_by'],
);
Map<String, dynamic> toJson() => {
'name': name,
'id': id,
'amount': amount,
'price': price,
'status': status,
'trxid': trxid,
'createdAt': createdAt,
'createdBy': createdBy,
};
}
......@@ -8,20 +8,7 @@ void main() {
final tabMenungguKonfirmasiText =
find.byKey(Key('tabMenungguKonfirmasiText'));
final tabRiwayatText = find.byKey(Key('tabRiwayatText'));
final deposit = find.byKey(Key('deposit'));
final valueDeposit = find.byKey(Key('valueDeposit'));
final keteranganDeposit = find.byKey(Key('keteranganDeposit'));
final tanggalKadaluarsaDeposit =
find.byKey(Key('tanggalKadaluarsaDeposit'));
final keteranganTanggalKadaluarsaDeposit =
find.byKey(Key('keteranganTanggalKadaluarsaDeposit'));
final pembelian = find.byKey(Key('pembelian'));
final valuePembelian = find.byKey(Key('valuePembelian'));
final keteranganPembelian = find.byKey(Key('keteranganPembelian'));
final tanggalKadaluarsaPembelian =
find.byKey(Key('tanggalKadaluarsaPembelian'));
final keteranganTanggalKadaluarsaPembelian =
find.byKey(Key('keteranganTanggalKadaluarsaPembelian'));
// execute
await tester.pumpWidget(MaterialApp(home: Transaction()));
......@@ -29,15 +16,5 @@ void main() {
expect(tabMenungguKonfirmasiText, findsOneWidget);
expect(tabRiwayatText, findsOneWidget);
expect(deposit, findsOneWidget);
expect(valueDeposit, findsOneWidget);
expect(keteranganDeposit, findsOneWidget);
expect(tanggalKadaluarsaDeposit, findsOneWidget);
expect(keteranganTanggalKadaluarsaDeposit, findsOneWidget);
expect(pembelian, findsOneWidget);
expect(valuePembelian, findsOneWidget);
expect(keteranganPembelian, findsOneWidget);
expect(tanggalKadaluarsaPembelian, findsOneWidget);
expect(keteranganTanggalKadaluarsaPembelian, findsOneWidget);
});
}
......@@ -8,36 +8,11 @@ void main() {
final tabMenungguKonfirmasiText =
find.byKey(Key('tabMenungguKonfirmasiText'));
final tabRiwayatText = find.byKey(Key('tabRiwayatText'));
final deposit = find.byKey(Key('deposit'));
final valueDeposit = find.byKey(Key('valueDeposit'));
final keteranganDeposit = find.byKey(Key('keteranganDeposit'));
final tanggalKadaluarsaDeposit =
find.byKey(Key('tanggalKadaluarsaDeposit'));
final keteranganTanggalKadaluarsaDeposit =
find.byKey(Key('keteranganTanggalKadaluarsaDeposit'));
final pembelian = find.byKey(Key('pembelian'));
final valuePembelian = find.byKey(Key('valuePembelian'));
final keteranganPembelian = find.byKey(Key('keteranganPembelian'));
final tanggalKadaluarsaPembelian =
find.byKey(Key('tanggalKadaluarsaPembelian'));
final keteranganTanggalKadaluarsaPembelian =
find.byKey(Key('keteranganTanggalKadaluarsaPembelian'));
// execute
await tester.pumpWidget(MaterialApp(home: Transaction()));
// check outputs
expect(tabMenungguKonfirmasiText, findsOneWidget);
expect(tabRiwayatText, findsOneWidget);
expect(deposit, findsOneWidget);
expect(valueDeposit, findsOneWidget);
expect(keteranganDeposit, findsOneWidget);
expect(tanggalKadaluarsaDeposit, findsOneWidget);
expect(keteranganTanggalKadaluarsaDeposit, findsOneWidget);
expect(pembelian, findsOneWidget);
expect(valuePembelian, findsOneWidget);
expect(keteranganPembelian, findsOneWidget);
expect(tanggalKadaluarsaPembelian, findsOneWidget);
expect(keteranganTanggalKadaluarsaPembelian, findsOneWidget);
});
}
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