fix: ui refund and sales page

This commit is contained in:
efrilm
2025-08-07 20:11:57 +07:00
parent e3da008a9a
commit 49fef5afb2
3 changed files with 75 additions and 66 deletions
+29 -45
View File
@@ -39,7 +39,11 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
late Animation<double> _scaleAnimation;
final List<Map<String, dynamic>> refundReasons = [
{'value': 'Barang Rusak', 'icon': Icons.broken_image, 'color': Colors.red},
{
'value': 'Barang Rusak',
'icon': Icons.broken_image,
'color': AppColors.primary
},
{'value': 'Salah Item', 'icon': Icons.swap_horiz, 'color': Colors.orange},
{
'value': 'Tidak Sesuai Pesanan',
@@ -56,7 +60,11 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
'icon': Icons.thumb_down,
'color': Colors.purple
},
{'value': 'Lainnya', 'icon': Icons.more_horiz, 'color': Colors.grey},
{
'value': 'Lainnya',
'icon': Icons.more_horiz,
'color': Colors.red,
},
];
@override
@@ -201,13 +209,6 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(24),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.08),
blurRadius: 30,
offset: Offset(0, 15),
),
],
),
child: Padding(
padding: EdgeInsets.all(20),
@@ -220,16 +221,12 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
padding: EdgeInsets.all(12),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.green[400]!, Colors.green[600]!],
colors: [
const Color.fromARGB(255, 96, 56, 148),
AppColors.primary
],
),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.green.withOpacity(0.3),
blurRadius: 15,
offset: Offset(0, 8),
),
],
),
child: Icon(
Icons.receipt_long,
@@ -327,13 +324,6 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(24),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.08),
blurRadius: 30,
offset: Offset(0, 15),
),
],
),
child: Padding(
padding: EdgeInsets.all(20),
@@ -345,12 +335,17 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
Container(
padding: EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.amber.withOpacity(0.2),
gradient: LinearGradient(
colors: [
const Color.fromARGB(255, 96, 56, 148),
AppColors.primary
],
),
borderRadius: BorderRadius.circular(12),
),
child: Icon(
Icons.account_balance_wallet,
color: Colors.amber[700],
Icons.account_balance_wallet_outlined,
color: AppColors.white,
size: 24,
),
),
@@ -402,13 +397,6 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(24),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.08),
blurRadius: 30,
offset: Offset(0, 15),
),
],
),
child: Padding(
padding: EdgeInsets.all(20),
@@ -421,19 +409,15 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
padding: EdgeInsets.all(12),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.red[400]!, Colors.red[600]!],
colors: [
const Color.fromARGB(255, 96, 56, 148),
AppColors.primary
],
),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.red.withOpacity(0.3),
blurRadius: 15,
offset: Offset(0, 8),
),
],
),
child: Icon(
Icons.assignment_return,
Icons.assignment_return_outlined,
color: Colors.white,
size: 24,
),
@@ -655,14 +639,14 @@ class _RefundPageState extends State<RefundPage> with TickerProviderStateMixin {
orElse: () => false,
);
return Container(
return SizedBox(
width: double.infinity,
height: 64,
child: ElevatedButton(
onPressed:
isLoading ? null : () => _processRefund(context),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red[600],
backgroundColor: AppColors.primary,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),