dev #1
10
assets/icons/people.svg
Normal file
10
assets/icons/people.svg
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_17_4760)">
|
||||||
|
<path d="M9 13.75C6.66 13.75 2 14.92 2 17.25V19H16V17.25C16 14.92 11.34 13.75 9 13.75ZM4.34 17C5.18 16.42 7.21 15.75 9 15.75C10.79 15.75 12.82 16.42 13.66 17H4.34ZM9 12C10.93 12 12.5 10.43 12.5 8.5C12.5 6.57 10.93 5 9 5C7.07 5 5.5 6.57 5.5 8.5C5.5 10.43 7.07 12 9 12ZM9 7C9.83 7 10.5 7.67 10.5 8.5C10.5 9.33 9.83 10 9 10C8.17 10 7.5 9.33 7.5 8.5C7.5 7.67 8.17 7 9 7ZM16.04 13.81C17.2 14.65 18 15.77 18 17.25V19H22V17.25C22 15.23 18.5 14.08 16.04 13.81ZM15 12C16.93 12 18.5 10.43 18.5 8.5C18.5 6.57 16.93 5 15 5C14.46 5 13.96 5.13 13.5 5.35C14.13 6.24 14.5 7.33 14.5 8.5C14.5 9.67 14.13 10.76 13.5 11.65C13.96 11.87 14.46 12 15 12Z" fill="white"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_17_4760">
|
||||||
|
<rect width="24" height="24" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 892 B |
@ -101,6 +101,9 @@ class $AssetsIconsGen {
|
|||||||
/// File path: assets/icons/payments.svg
|
/// File path: assets/icons/payments.svg
|
||||||
SvgGenImage get payments => const SvgGenImage('assets/icons/payments.svg');
|
SvgGenImage get payments => const SvgGenImage('assets/icons/payments.svg');
|
||||||
|
|
||||||
|
/// File path: assets/icons/people.svg
|
||||||
|
SvgGenImage get people => const SvgGenImage('assets/icons/people.svg');
|
||||||
|
|
||||||
/// File path: assets/icons/print.svg
|
/// File path: assets/icons/print.svg
|
||||||
SvgGenImage get print => const SvgGenImage('assets/icons/print.svg');
|
SvgGenImage get print => const SvgGenImage('assets/icons/print.svg');
|
||||||
|
|
||||||
@ -152,6 +155,7 @@ class $AssetsIconsGen {
|
|||||||
orders,
|
orders,
|
||||||
pajak,
|
pajak,
|
||||||
payments,
|
payments,
|
||||||
|
people,
|
||||||
print,
|
print,
|
||||||
qrCode,
|
qrCode,
|
||||||
report,
|
report,
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'dart:async';
|
|||||||
import 'dart:developer';
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
|
import 'package:enaklo_pos/presentation/customer/pages/customer_page.dart';
|
||||||
import 'package:enaklo_pos/presentation/setting/pages/setting_page.dart';
|
import 'package:enaklo_pos/presentation/setting/pages/setting_page.dart';
|
||||||
import 'package:enaklo_pos/presentation/table/pages/table_page.dart';
|
import 'package:enaklo_pos/presentation/table/pages/table_page.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -15,7 +16,6 @@ import 'package:enaklo_pos/data/datasources/auth_local_datasource.dart';
|
|||||||
import 'package:enaklo_pos/presentation/auth/login_page.dart';
|
import 'package:enaklo_pos/presentation/auth/login_page.dart';
|
||||||
import 'package:enaklo_pos/presentation/report/pages/report_page.dart';
|
import 'package:enaklo_pos/presentation/report/pages/report_page.dart';
|
||||||
import 'package:enaklo_pos/presentation/setting/bloc/sync_order/sync_order_bloc.dart';
|
import 'package:enaklo_pos/presentation/setting/bloc/sync_order/sync_order_bloc.dart';
|
||||||
import 'package:enaklo_pos/presentation/setting/pages/printer_configuration_page.dart';
|
|
||||||
|
|
||||||
import '../../../core/assets/assets.gen.dart';
|
import '../../../core/assets/assets.gen.dart';
|
||||||
import '../../auth/bloc/logout/logout_bloc.dart';
|
import '../../auth/bloc/logout/logout_bloc.dart';
|
||||||
@ -59,8 +59,7 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||||||
),
|
),
|
||||||
const TablePage(),
|
const TablePage(),
|
||||||
const ReportPage(),
|
const ReportPage(),
|
||||||
const PrinterConfigurationPage(),
|
const CustomerPage(),
|
||||||
// SalesPage(),
|
|
||||||
const SettingPage(),
|
const SettingPage(),
|
||||||
];
|
];
|
||||||
// ignore: unused_local_variable
|
// ignore: unused_local_variable
|
||||||
@ -121,7 +120,7 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||||||
onTap: () => _onItemTapped(2),
|
onTap: () => _onItemTapped(2),
|
||||||
),
|
),
|
||||||
NavItem(
|
NavItem(
|
||||||
iconPath: Assets.icons.print.path,
|
iconPath: Assets.icons.people.path,
|
||||||
isActive: _selectedIndex == 3,
|
isActive: _selectedIndex == 3,
|
||||||
onTap: () => _onItemTapped(3),
|
onTap: () => _onItemTapped(3),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import 'package:enaklo_pos/core/constants/colors.dart';
|
|||||||
import 'package:enaklo_pos/core/extensions/build_context_ext.dart';
|
import 'package:enaklo_pos/core/extensions/build_context_ext.dart';
|
||||||
import 'package:enaklo_pos/core/extensions/string_ext.dart';
|
import 'package:enaklo_pos/core/extensions/string_ext.dart';
|
||||||
import 'package:enaklo_pos/data/models/response/table_model.dart';
|
import 'package:enaklo_pos/data/models/response/table_model.dart';
|
||||||
import 'package:enaklo_pos/presentation/customer/pages/customer_page.dart';
|
|
||||||
import 'package:enaklo_pos/presentation/home/bloc/checkout/checkout_bloc.dart';
|
import 'package:enaklo_pos/presentation/home/bloc/checkout/checkout_bloc.dart';
|
||||||
import 'package:enaklo_pos/presentation/home/dialog/delivery_dialog.dart';
|
import 'package:enaklo_pos/presentation/home/dialog/delivery_dialog.dart';
|
||||||
import 'package:enaklo_pos/presentation/home/dialog/type_dialog.dart';
|
import 'package:enaklo_pos/presentation/home/dialog/type_dialog.dart';
|
||||||
@ -20,7 +19,7 @@ class HomeRightTitle extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
height: context.deviceHeight * 0.15,
|
height: context.deviceHeight * 0.12,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.primary,
|
color: AppColors.primary,
|
||||||
border: Border(
|
border: Border(
|
||||||
@ -33,52 +32,77 @@ class HomeRightTitle extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Expanded(
|
||||||
children: [
|
child: Row(
|
||||||
Expanded(
|
children: [
|
||||||
child: Button.filled(
|
Expanded(
|
||||||
width: 180.0,
|
child: Button.filled(
|
||||||
height: 40,
|
width: 180.0,
|
||||||
elevation: 0,
|
height: 40,
|
||||||
onPressed: () => context.push(SalesPage(
|
elevation: 0,
|
||||||
status: 'pending',
|
onPressed: () => context.push(SalesPage(
|
||||||
)),
|
status: 'pending',
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
)),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
icon: Icon(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Icons.list,
|
icon: Icon(
|
||||||
color: Colors.white,
|
Icons.list,
|
||||||
size: 24,
|
color: Colors.white,
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
label: 'Daftar Pesanan',
|
||||||
),
|
),
|
||||||
label: 'Daftar Pesanan',
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
Expanded(
|
),
|
||||||
child: Button.filled(
|
|
||||||
width: 180.0,
|
|
||||||
height: 40,
|
|
||||||
elevation: 0,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
icon: Icon(
|
|
||||||
Icons.person_outline,
|
|
||||||
color: Colors.white,
|
|
||||||
size: 24,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
if (table == null) {
|
|
||||||
context.push(CustomerPage());
|
|
||||||
}
|
|
||||||
},
|
|
||||||
label: 'Pelanggan',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
Expanded(
|
||||||
children: [
|
child: Row(
|
||||||
Expanded(
|
children: [
|
||||||
child: BlocBuilder<CheckoutBloc, CheckoutState>(
|
Expanded(
|
||||||
|
child: BlocBuilder<CheckoutBloc, CheckoutState>(
|
||||||
|
builder: (context, state) {
|
||||||
|
return state.maybeWhen(
|
||||||
|
orElse: () => const SizedBox.shrink(),
|
||||||
|
loaded: (
|
||||||
|
items,
|
||||||
|
discountModel,
|
||||||
|
discount,
|
||||||
|
discountAmount,
|
||||||
|
tax,
|
||||||
|
serviceCharge,
|
||||||
|
totalQuantity,
|
||||||
|
totalPrice,
|
||||||
|
draftName,
|
||||||
|
orderType,
|
||||||
|
deliveryType,
|
||||||
|
) {
|
||||||
|
return Button.filled(
|
||||||
|
width: 180.0,
|
||||||
|
height: 40,
|
||||||
|
elevation: 0,
|
||||||
|
onPressed: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return TypeDialog();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.dinner_dining_outlined,
|
||||||
|
color: Colors.white,
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
label: orderType.value.toTitleCase(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
BlocBuilder<CheckoutBloc, CheckoutState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return state.maybeWhen(
|
return state.maybeWhen(
|
||||||
orElse: () => const SizedBox.shrink(),
|
orElse: () => const SizedBox.shrink(),
|
||||||
@ -95,109 +119,68 @@ class HomeRightTitle extends StatelessWidget {
|
|||||||
orderType,
|
orderType,
|
||||||
deliveryType,
|
deliveryType,
|
||||||
) {
|
) {
|
||||||
return Button.filled(
|
switch (orderType) {
|
||||||
width: 180.0,
|
case OrderType.dineIn:
|
||||||
height: 40,
|
return Expanded(
|
||||||
elevation: 0,
|
child: Button.filled(
|
||||||
onPressed: () {
|
width: 180.0,
|
||||||
showDialog(
|
height: 40,
|
||||||
context: context,
|
elevation: 0,
|
||||||
builder: (context) {
|
icon: Icon(
|
||||||
return TypeDialog();
|
Icons.table_restaurant_outlined,
|
||||||
});
|
color: Colors.white,
|
||||||
},
|
size: 24,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
onPressed: () {
|
||||||
icon: Icon(
|
if (table == null) {
|
||||||
Icons.dinner_dining_outlined,
|
context.push(DashboardPage(
|
||||||
color: Colors.white,
|
index: 1,
|
||||||
size: 24,
|
));
|
||||||
),
|
}
|
||||||
label: orderType.value.toTitleCase(),
|
},
|
||||||
);
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
label: table == null
|
||||||
|
? 'Pilih Meja'
|
||||||
|
: '${table!.tableName}',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
case OrderType.takeAway:
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
case OrderType.delivery:
|
||||||
|
return Expanded(
|
||||||
|
child: Button.filled(
|
||||||
|
width: 180.0,
|
||||||
|
height: 40,
|
||||||
|
elevation: 0,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.motorcycle_outlined,
|
||||||
|
color: Colors.white,
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return DeliveryDialog();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
label: deliveryType == null
|
||||||
|
? 'Pilih Pengiriman'
|
||||||
|
: deliveryType.name,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
BlocBuilder<CheckoutBloc, CheckoutState>(
|
),
|
||||||
builder: (context, state) {
|
|
||||||
return state.maybeWhen(
|
|
||||||
orElse: () => const SizedBox.shrink(),
|
|
||||||
loaded: (
|
|
||||||
items,
|
|
||||||
discountModel,
|
|
||||||
discount,
|
|
||||||
discountAmount,
|
|
||||||
tax,
|
|
||||||
serviceCharge,
|
|
||||||
totalQuantity,
|
|
||||||
totalPrice,
|
|
||||||
draftName,
|
|
||||||
orderType,
|
|
||||||
deliveryType,
|
|
||||||
) {
|
|
||||||
switch (orderType) {
|
|
||||||
case OrderType.dineIn:
|
|
||||||
return Expanded(
|
|
||||||
child: Button.filled(
|
|
||||||
width: 180.0,
|
|
||||||
height: 40,
|
|
||||||
elevation: 0,
|
|
||||||
icon: Icon(
|
|
||||||
Icons.table_restaurant_outlined,
|
|
||||||
color: Colors.white,
|
|
||||||
size: 24,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
if (table == null) {
|
|
||||||
context.push(DashboardPage(
|
|
||||||
index: 1,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
label: table == null
|
|
||||||
? 'Pilih Meja'
|
|
||||||
: '${table!.tableName}',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
case OrderType.takeAway:
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
case OrderType.delivery:
|
|
||||||
return Expanded(
|
|
||||||
child: Button.filled(
|
|
||||||
width: 180.0,
|
|
||||||
height: 40,
|
|
||||||
elevation: 0,
|
|
||||||
icon: Icon(
|
|
||||||
Icons.motorcycle_outlined,
|
|
||||||
color: Colors.white,
|
|
||||||
size: 24,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return DeliveryDialog();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
label: deliveryType == null
|
|
||||||
? 'Pilih Pengiriman'
|
|
||||||
: deliveryType.name,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -512,12 +512,11 @@ class _$SuccessImpl implements _Success {
|
|||||||
return identical(this, other) ||
|
return identical(this, other) ||
|
||||||
(other.runtimeType == runtimeType &&
|
(other.runtimeType == runtimeType &&
|
||||||
other is _$SuccessImpl &&
|
other is _$SuccessImpl &&
|
||||||
const DeepCollectionEquality().equals(other.printer, printer));
|
(identical(other.printer, printer) || other.printer == printer));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode => Object.hash(runtimeType, printer);
|
||||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(printer));
|
|
||||||
|
|
||||||
/// Create a copy of GetPrinterTicketState
|
/// Create a copy of GetPrinterTicketState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user