From c2f43f9061216c6ec6f4b97cde34e08b76ad5629 Mon Sep 17 00:00:00 2001 From: sindhu Date: Fri, 19 Jan 2024 10:44:49 +0700 Subject: [PATCH 1/3] step 28 : add usertransaki home dan history --- .../lib/screen/home/home_screen.dart | 41 +++++++++- .../transaksi/history_transaksi_screen.dart | 76 ++++++++++++++----- 2 files changed, 96 insertions(+), 21 deletions(-) diff --git a/app_petty_cash/lib/screen/home/home_screen.dart b/app_petty_cash/lib/screen/home/home_screen.dart index 13262da..2b57fa1 100644 --- a/app_petty_cash/lib/screen/home/home_screen.dart +++ b/app_petty_cash/lib/screen/home/home_screen.dart @@ -430,7 +430,8 @@ class HomeScreen extends HookConsumerWidget { Align( alignment: Alignment.centerLeft, child: Text( - listTransaksiHome.value[idx].note + listTransaksiHome + .value[idx].note .toString(), style: Constant.body1( context: context) @@ -446,7 +447,7 @@ class HomeScreen extends HookConsumerWidget { context: context, y: 10), ), - // Tanggal Created align right + // Tanggal Created and by align right Row( mainAxisAlignment: @@ -472,6 +473,42 @@ class HomeScreen extends HookConsumerWidget { fontSize: 14, ), ), + Text( + ' by : '+listTransaksiHome + .value[idx].usertransaksi + .toString(), + overflow: + TextOverflow.ellipsis, + style: Constant.body1( + context: context) + .copyWith( + fontWeight: + FontWeight.normal, + fontStyle: FontStyle.italic, + color: Constant.pcBtnBackgroundColor, + fontSize: 14, + ), + ), + Expanded( + child: Container( + child: Text( + ' by : '+listTransaksiHome + .value[idx].usertransaksi + .toString(), + overflow: + TextOverflow.ellipsis, + style: Constant.body1( + context: context) + .copyWith( + fontWeight: + FontWeight.normal, + fontStyle: FontStyle.italic, + color: Constant.pcBtnBackgroundColor, + fontSize: 14, + ), + ), + ), + ), ], ), ], diff --git a/app_petty_cash/lib/screen/transaksi/history_transaksi_screen.dart b/app_petty_cash/lib/screen/transaksi/history_transaksi_screen.dart index 4456d76..accb87b 100644 --- a/app_petty_cash/lib/screen/transaksi/history_transaksi_screen.dart +++ b/app_petty_cash/lib/screen/transaksi/history_transaksi_screen.dart @@ -1362,28 +1362,66 @@ class HistoryTransaksiScreen extends HookConsumerWidget { ), ], ), - // Tanggal Created align right + // Tanggal Created dan by align right - Row( - mainAxisAlignment: - MainAxisAlignment.end, + Column( children: [ - Text( - 'created : ' + - formatDateString( - listSearchHistory - .value[idx] - .tanggalcreated - .toString(), + Align( + alignment: + Alignment.centerRight, + child: Row( + mainAxisAlignment: + MainAxisAlignment.end, + children: [ + Text( + 'created : ' + + formatDateString( + listSearchHistory + .value[idx] + .tanggalcreated + .toString(), + ), + overflow: + TextOverflow.ellipsis, + style: Constant.body1( + context: context) + .copyWith( + fontWeight: + FontWeight.normal, + fontStyle: + FontStyle.italic, + color: + Constant.textBlack, + fontSize: 14, + ), ), - overflow: TextOverflow.ellipsis, - style: Constant.body1( - context: context) - .copyWith( - fontWeight: FontWeight.normal, - fontStyle: FontStyle.italic, - color: Constant.textBlack, - fontSize: 14, + Expanded( + child: Container( + child: Text( + ' by : ' + + listSearchHistory + .value[idx] + .usertransaksi + .toString(), + overflow: TextOverflow + .ellipsis, + style: Constant.body1( + context: + context) + .copyWith( + fontWeight: + FontWeight + .normal, + fontStyle: FontStyle + .italic, + color: Constant + .pcBtnBackgroundColor, + fontSize: 14, + ), + ), + ), + ), + ], ), ), ], From 2cab59c86cafdd87146279b46e053c367f82f84e Mon Sep 17 00:00:00 2001 From: sindhu Date: Fri, 19 Jan 2024 12:13:19 +0700 Subject: [PATCH 2/3] step 29 : add base 64 param in repository insert tx --- .../android/app/src/main/AndroidManifest.xml | 3 +- .../app/src/main/res/xml/filepaths.xml | 1 + .../lib/repository/transaksi_repository.dart | 1 + .../lib/screen/home/home_screen.dart | 30 ++++++------------- app_petty_cash/pubspec.lock | 16 ++++++++++ app_petty_cash/pubspec.yaml | 2 ++ 6 files changed, 31 insertions(+), 22 deletions(-) diff --git a/app_petty_cash/android/app/src/main/AndroidManifest.xml b/app_petty_cash/android/app/src/main/AndroidManifest.xml index 9404999..0778a2b 100644 --- a/app_petty_cash/android/app/src/main/AndroidManifest.xml +++ b/app_petty_cash/android/app/src/main/AndroidManifest.xml @@ -1,13 +1,14 @@ + + > + \ No newline at end of file diff --git a/app_petty_cash/lib/repository/transaksi_repository.dart b/app_petty_cash/lib/repository/transaksi_repository.dart index a8fd128..5c90c8f 100644 --- a/app_petty_cash/lib/repository/transaksi_repository.dart +++ b/app_petty_cash/lib/repository/transaksi_repository.dart @@ -100,6 +100,7 @@ class TransaksiRepository extends BaseRepository { 'userid': userid, 'sender': sender, 'companyid': M_CompanyID, + 'base64File': base64file, 'fileName': fileName, 'fileSize': fileSize, 'fileEkstension': fileExtension diff --git a/app_petty_cash/lib/screen/home/home_screen.dart b/app_petty_cash/lib/screen/home/home_screen.dart index 2b57fa1..9400a73 100644 --- a/app_petty_cash/lib/screen/home/home_screen.dart +++ b/app_petty_cash/lib/screen/home/home_screen.dart @@ -473,28 +473,14 @@ class HomeScreen extends HookConsumerWidget { fontSize: 14, ), ), - Text( - ' by : '+listTransaksiHome - .value[idx].usertransaksi - .toString(), - overflow: - TextOverflow.ellipsis, - style: Constant.body1( - context: context) - .copyWith( - fontWeight: - FontWeight.normal, - fontStyle: FontStyle.italic, - color: Constant.pcBtnBackgroundColor, - fontSize: 14, - ), - ), Expanded( child: Container( child: Text( - ' by : '+listTransaksiHome - .value[idx].usertransaksi - .toString(), + ' by : ' + + listTransaksiHome + .value[idx] + .usertransaksi + .toString(), overflow: TextOverflow.ellipsis, style: Constant.body1( @@ -502,8 +488,10 @@ class HomeScreen extends HookConsumerWidget { .copyWith( fontWeight: FontWeight.normal, - fontStyle: FontStyle.italic, - color: Constant.pcBtnBackgroundColor, + fontStyle: + FontStyle.italic, + color: Constant + .pcBtnBackgroundColor, fontSize: 14, ), ), diff --git a/app_petty_cash/pubspec.lock b/app_petty_cash/pubspec.lock index 7afe483..32e6cf8 100644 --- a/app_petty_cash/pubspec.lock +++ b/app_petty_cash/pubspec.lock @@ -278,6 +278,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + flutter_share: + dependency: "direct main" + description: + name: flutter_share + sha256: ae12c1cea13b35926a109824ffac601531e40cb94ad53eeae58625eceb3eaaaa + url: "https://pub.dev" + source: hosted + version: "2.0.0" flutter_svg: dependency: "direct main" description: @@ -893,6 +901,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.17" + whatsapp_share: + dependency: "direct main" + description: + name: whatsapp_share + sha256: d1884f302a52d9f400bc3d7d4274b77aad83424e08f425351cea8d13b4cb8649 + url: "https://pub.dev" + source: hosted + version: "2.0.2" win32: dependency: transitive description: diff --git a/app_petty_cash/pubspec.yaml b/app_petty_cash/pubspec.yaml index 16d731f..041ccbc 100644 --- a/app_petty_cash/pubspec.yaml +++ b/app_petty_cash/pubspec.yaml @@ -58,6 +58,8 @@ dependencies: photo_view: ^0.14.0 mime: ^1.0.4 path_provider: ^2.1.2 + flutter_share: ^2.0.0 + whatsapp_share: ^2.0.2 dev_dependencies: flutter_test: From c67f771d25cf06cb229fce723273739af01830eb Mon Sep 17 00:00:00 2001 From: sindhu Date: Fri, 19 Jan 2024 12:14:11 +0700 Subject: [PATCH 3/3] step 30 : update versi 1.1.5 --- app_petty_cash/lib/app/constant.dart | 2 +- app_petty_cash/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app_petty_cash/lib/app/constant.dart b/app_petty_cash/lib/app/constant.dart index 9c87299..8abf404 100644 --- a/app_petty_cash/lib/app/constant.dart +++ b/app_petty_cash/lib/app/constant.dart @@ -13,7 +13,7 @@ class Constant { // static String version = "1.00"; // NOTE VERSI HARUS SAMA DENGAN PUBSPEC.YAML - static String version = "1.1.0"; + static String version = "1.1.5"; // static String baseUrl = "https://devregonline.pramita.co.id/one-api/xdoc/"; diff --git a/app_petty_cash/pubspec.yaml b/app_petty_cash/pubspec.yaml index 041ccbc..8329872 100644 --- a/app_petty_cash/pubspec.yaml +++ b/app_petty_cash/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.0 +version: 1.1.5 environment: sdk: '>=3.0.6 <4.0.0'