219 lines
6.3 KiB
Dart
219 lines
6.3 KiB
Dart
import 'package:flutter/material.dart';
|
||
import 'package:satu/widgets/bar/products_app_bar.dart';
|
||
import 'package:satu/widgets/buttons/option_pill.dart';
|
||
import 'component/transaction_item.dart';
|
||
|
||
|
||
class JournalView extends StatefulWidget {
|
||
@override
|
||
_JournalViewState createState() => _JournalViewState();
|
||
}
|
||
|
||
class _JournalViewState extends State<JournalView> {
|
||
|
||
int tabIndex = 0;
|
||
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Scaffold(
|
||
appBar: ProductsAppBar(title: 'Журнал транзакции',),
|
||
body: Padding(
|
||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
|
||
Padding(
|
||
padding: const EdgeInsets.all(8.0),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
|
||
OptionPill(
|
||
text: 'Все',
|
||
selected: tabIndex == 0,
|
||
onTap: () {
|
||
setState(() {
|
||
tabIndex = 0;
|
||
});
|
||
},
|
||
),
|
||
|
||
OptionPill(
|
||
text: 'Приход',
|
||
selected: tabIndex == 1,
|
||
onTap: () {
|
||
setState(() {
|
||
tabIndex = 1;
|
||
});
|
||
},
|
||
),
|
||
|
||
OptionPill(
|
||
text: 'Расход',
|
||
selected: tabIndex == 2,
|
||
onTap: () {
|
||
setState(() {
|
||
tabIndex = 2;
|
||
});
|
||
},
|
||
),
|
||
|
||
],
|
||
),
|
||
),
|
||
|
||
SizedBox(
|
||
height: 16,
|
||
),
|
||
|
||
Expanded(
|
||
child: SingleChildScrollView(
|
||
physics: BouncingScrollPhysics(),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
|
||
SizedBox(
|
||
height: 16,
|
||
),
|
||
|
||
Text(
|
||
'03/06/2020',
|
||
style: TextStyle(
|
||
//color: kGreyColor,
|
||
fontSize: 14,
|
||
fontWeight: FontWeight.bold,
|
||
),
|
||
),
|
||
|
||
SizedBox(
|
||
height: 8,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 52021 13:03:05',
|
||
status: 'Частное лицо',
|
||
amount: '2706.00',
|
||
received: true,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 52020 13:01:05',
|
||
status: 'ИП Иванов В.И.',
|
||
amount: '19000.63',
|
||
received: false,
|
||
),
|
||
|
||
SizedBox(
|
||
height: 16,
|
||
),
|
||
|
||
Divider(
|
||
//color: kPrimaryColor,
|
||
height: 1,
|
||
thickness: 1,
|
||
),
|
||
|
||
SizedBox(
|
||
height: 32,
|
||
),
|
||
|
||
Text(
|
||
'02/06/2020',
|
||
style: TextStyle(
|
||
//color: kGreyColor,
|
||
fontSize: 14,
|
||
fontWeight: FontWeight.bold,
|
||
),
|
||
),
|
||
|
||
SizedBox(
|
||
height: 8,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 5019 13:03:05',
|
||
status: 'Частное лицо',
|
||
amount: '114.00',
|
||
received: true,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 5019 13:03:05',
|
||
status: 'Частное лицо',
|
||
amount: '70.16',
|
||
received: true,
|
||
),
|
||
|
||
SizedBox(
|
||
height: 16,
|
||
),
|
||
|
||
Text(
|
||
'29/05/2020',
|
||
style: TextStyle(
|
||
//color: kGreyColor,
|
||
fontSize: 14,
|
||
fontWeight: FontWeight.bold,
|
||
),
|
||
),
|
||
|
||
SizedBox(
|
||
height: 8,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 5019 13:03:05',
|
||
status: 'Частное лицо',
|
||
amount: '44.50',
|
||
received: true,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 5019 13:03:05',
|
||
status: 'ТОО Рога и копыта',
|
||
amount: '85.50',
|
||
received: false,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 5019 13:03:05',
|
||
status: 'Частное лицо',
|
||
amount: '155.00',
|
||
received: true,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 5019 13:03:05',
|
||
status: 'Частное лицо',
|
||
amount: '23.50',
|
||
received: true,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 5019 13:03:05',
|
||
status: 'Частное лицо',
|
||
amount: '11.50',
|
||
received: true,
|
||
),
|
||
|
||
TransactionItem(
|
||
fullName: 'Чек № 5019 13:03:05',
|
||
status: 'Частное лицо',
|
||
amount: '36.00',
|
||
received: true,
|
||
),
|
||
|
||
],
|
||
),
|
||
),
|
||
),
|
||
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
} |