From c2f43f9061216c6ec6f4b97cde34e08b76ad5629 Mon Sep 17 00:00:00 2001 From: sindhu Date: Fri, 19 Jan 2024 10:44:49 +0700 Subject: [PATCH] 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, + ), + ), + ), + ), + ], ), ), ],