feat: sales list order
This commit is contained in:
parent
051b64e3a6
commit
7a195705af
@ -167,11 +167,25 @@ class _SalesPageState extends State<SalesPage> {
|
||||
SalesRightTitle(
|
||||
order: orderDetail,
|
||||
actionWidget: [
|
||||
Button.outlined(
|
||||
onPressed: () {},
|
||||
label: 'Refund',
|
||||
icon: Icon(Icons.autorenew),
|
||||
),
|
||||
if (widget.status == 'pending') ...[
|
||||
Button.outlined(
|
||||
onPressed: () {},
|
||||
label: 'Void',
|
||||
icon: Icon(Icons.undo),
|
||||
),
|
||||
SpaceWidth(8),
|
||||
Button.outlined(
|
||||
onPressed: () {},
|
||||
label: 'Bayar',
|
||||
icon: Icon(Icons.payment),
|
||||
),
|
||||
],
|
||||
if (widget.status == 'completed')
|
||||
Button.outlined(
|
||||
onPressed: () {},
|
||||
label: 'Refund',
|
||||
icon: Icon(Icons.autorenew),
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import 'package:enaklo_pos/core/components/spaces.dart';
|
||||
import 'package:enaklo_pos/core/constants/colors.dart';
|
||||
import 'package:enaklo_pos/core/extensions/string_ext.dart';
|
||||
import 'package:enaklo_pos/data/models/response/order_response_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@ -34,6 +36,7 @@ class SalesListOrder extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
SpaceHeight(12),
|
||||
Column(
|
||||
children: List.generate(
|
||||
order?.orderItems?.length ?? 0,
|
||||
@ -48,20 +51,22 @@ class SalesListOrder extends StatelessWidget {
|
||||
Padding _item(OrderItem product) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16)
|
||||
.copyWith(bottom: 0),
|
||||
.copyWith(top: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
product.productName ?? '',
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
(product.unitPrice ?? 0).toString(),
|
||||
(product.unitPrice ?? 0).toString().currencyFormatRpV2,
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
@ -75,7 +80,7 @@ class SalesListOrder extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
(product.totalPrice ?? 0).toString(),
|
||||
(product.totalPrice ?? 0).toString().currencyFormatRpV2,
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user