Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
B
Byodv2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
Byodv2
Commits
fd2ad158
Commit
fd2ad158
authored
Oct 20, 2022
by
Jasa Digital
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bersih-bersih
parent
2e8610ce
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
90 additions
and
95 deletions
+90
-95
api.dart
lib/api/api.dart
+0
-1
mq.dart
lib/helper/mq.dart
+0
-3
confirm_order.dart
lib/ui/confirm_order/confirm_order.dart
+3
-2
bottom_sheet_menu_new.dart
lib/ui/home/bottom_sheet_menu_new.dart
+0
-2
bottom_sheet_note.dart
lib/ui/home/bottom_sheet_note.dart
+2
-2
bottom_sheet_variant_new.dart
lib/ui/home/bottom_sheet_variant_new.dart
+1
-5
menu_list_utama.dart
lib/ui/home/menu_list_utama.dart
+0
-1
new_home2.dart
lib/ui/home/new_home2.dart
+15
-13
no_route.dart
lib/ui/no_route.dart
+4
-4
splash.dart
lib/ui/splash.dart
+0
-1
view_bill_new.dart
lib/ui/viewbill/view_bill_new.dart
+65
-61
No files found.
lib/api/api.dart
View file @
fd2ad158
...
...
@@ -20,7 +20,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import
'package:flutter_easyloading/flutter_easyloading.dart'
;
import
'package:intl/intl.dart'
;
import
'package:uuid/uuid.dart'
;
import
'../bloc/address_user_bloc.dart'
;
import
'../bloc/order_bloc.dart'
;
import
'../helper/widget/open_url.dart'
;
import
'../main.dart'
;
...
...
lib/helper/mq.dart
View file @
fd2ad158
...
...
@@ -5,12 +5,9 @@ import 'dart:io';
import
'package:byod/helper/logger.dart'
;
import
'package:byod/main.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:mqtt_client/mqtt_browser_client.dart'
;
import
'package:mqtt_client/mqtt_client.dart'
;
import
'package:uuid/uuid.dart'
;
import
'../bloc/view_bill.dart'
;
import
'helper.dart'
;
String
mqttUrl
=
'wss://mq.jasadigital.co.id'
;
...
...
lib/ui/confirm_order/confirm_order.dart
View file @
fd2ad158
...
...
@@ -111,9 +111,9 @@ class CoreConfirm extends StatelessWidget {
// totalItem = fixTotalItem + totalItemBukanOrderDetail;
}
void
plus
()
{}
//
void plus() {}
void
minus
()
{}
//
void minus() {}
return
Container
(
width:
widthScreen
,
...
...
@@ -766,6 +766,7 @@ class _VariantOrderState extends State<VariantOrder> {
}
}
}
// ignore: avoid_unnecessary_containers
return
Container
(
// child: listWithVariant(
// listOrders,
...
...
lib/ui/home/bottom_sheet_menu_new.dart
View file @
fd2ad158
...
...
@@ -7,10 +7,8 @@ import '../../bloc/order_variant_temporary.dart';
import
'../../helper/helper.dart'
;
import
'../../helper/widget/style.dart'
;
import
'../../models/filter_menu.dart'
;
import
'../../models/order_details.dart'
;
import
'../../models/orders.dart'
;
import
'bottom_sheet_variant.dart'
;
import
'variant_cat.dart'
;
class
ShowMenuBottomSheet
extends
StatelessWidget
{
const
ShowMenuBottomSheet
({
...
...
lib/ui/home/bottom_sheet_note.dart
View file @
fd2ad158
...
...
@@ -8,7 +8,7 @@ import '../../bloc/order_bloc.dart';
import
'../../helper/helper.dart'
;
import
'../../helper/widget/poni_bottom_sheet.dart'
;
import
'../../helper/widget/style.dart'
;
import
'../../models/order_variants.dart'
;
//
import '../../models/order_variants.dart';
import
'../../models/orders.dart'
;
GestureDetector
noteMenu
(
...
...
@@ -24,7 +24,7 @@ GestureDetector noteMenu(
})
{
var
initialNote
=
note
;
final
noteController
=
TextEditingController
(
text:
initialNote
);
List
<
OrderVariant
>
orderVariants
=
[];
//
List<OrderVariant> orderVariants = [];
double
widthScreen
=
responsiveWidthScreen
(
context
);
double
currentScreen
=
MediaQuery
.
of
(
context
).
size
.
width
;
...
...
lib/ui/home/bottom_sheet_variant_new.dart
View file @
fd2ad158
// ignore_for_file: must_be_immutable, sized_box_for_whitespace
import
'package:byod/helper/widget/plus_minus_button.dart'
;
import
'package:byod/helper/widget/style.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'../../bloc/order_bloc.dart'
;
import
'../../bloc/order_detail_variant.dart'
;
import
'../../bloc/order_variant_temporary.dart'
;
import
'../../helper/helper.dart'
;
import
'../../helper/widget/button_modal.dart'
;
import
'../../main.dart'
;
import
'../../models/order_details.dart'
;
import
'../../models/orders.dart'
;
...
...
@@ -33,7 +29,7 @@ class CustomizeVariantNew extends StatefulWidget {
class
_CustomizeVariantNewState
extends
State
<
CustomizeVariantNew
>
{
@override
Widget
build
(
BuildContext
context
)
{
double
widthScreen
=
responsiveWidthScreen
(
context
);
//
double widthScreen = responsiveWidthScreen(context);
return
Container
(
// width: widthScreen,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.7
,
...
...
lib/ui/home/menu_list_utama.dart
View file @
fd2ad158
...
...
@@ -16,7 +16,6 @@ import '../../helper/widget/style.dart';
import
'../../models/filter_menu.dart'
;
import
'../../models/order_variants.dart'
;
import
'bottom_sheet_menu_new.dart'
;
import
'bottom_sheet_variant.dart'
;
import
'variant_cat_new.dart'
;
class
MenuListUtama
extends
StatelessWidget
{
...
...
lib/ui/home/new_home2.dart
View file @
fd2ad158
...
...
@@ -114,15 +114,15 @@ class _NewHome2State extends State<NewHome2> {
);
runMqTT
(
context
);
_scrollFavItem
.
addListener
(()
{
double
positionMenuFavScroll
=
_scrollFavItem
.
position
.
pixels
;
double
positionMenuFavMax
=
_scrollFavItem
.
position
.
maxScrollExtent
;
if
(
positionMenuFavScroll
>=
positionMenuFavMax
-
50
)
{
if
(
allMenuFav
.
length
>=
countMenuFavToDisplay
)
{
_getMoreDataFav
(
countMenuFavToDisplay
,
allMenuFav
);
}
}
});
//
_scrollFavItem.addListener(() {
//
double positionMenuFavScroll = _scrollFavItem.position.pixels;
//
double positionMenuFavMax = _scrollFavItem.position.maxScrollExtent;
//
if (positionMenuFavScroll >= positionMenuFavMax - 50) {
//
if (allMenuFav.length >= countMenuFavToDisplay) {
//
_getMoreDataFav(countMenuFavToDisplay, allMenuFav);
//
}
//
}
//
});
// _scrollMenuItem.addListener(() {
// double positionMenuItemScrollView = _scrollMenuItem.position.pixels;
...
...
@@ -178,6 +178,7 @@ class _NewHome2State extends State<NewHome2> {
@override
void
dispose
()
{
_scrollController
.
removeListener
(()
{});
_scrollFavItem
.
removeListener
(()
{});
// _scrollMenuItem.removeListener(() {});
super
.
dispose
();
}
...
...
@@ -903,10 +904,11 @@ class _NewHome2State extends State<NewHome2> {
child:
ListView
.
builder
(
controller:
_scrollFavItem
,
scrollDirection:
Axis
.
horizontal
,
itemCount:
(
categoryFavAfterSelect
.
length
)
>
countMenuFavToDisplay
?
countMenuFavToDisplay
:
categoryFavAfterSelect
.
length
,
// itemCount: (categoryFavAfterSelect.length) >
// countMenuFavToDisplay
// ? countMenuFavToDisplay
// : categoryFavAfterSelect.length,
itemCount:
categoryFavAfterSelect
.
length
,
itemBuilder:
(
context
,
i
)
{
double
paddingLeftRigthGrid
=
9
;
double
widthGrid
=
136
;
...
...
lib/ui/no_route.dart
View file @
fd2ad158
...
...
@@ -16,10 +16,10 @@ class NoRoute extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
LocationPermission
?
permission
;
Geolocator
.
checkPermission
().
then
((
value
)
{
permission
=
value
;
});
//
LocationPermission? permission;
//
Geolocator.checkPermission().then((value) {
//
permission = value;
//
});
return
SafeArea
(
child:
Scaffold
(
backgroundColor:
backgroundColor
,
...
...
lib/ui/splash.dart
View file @
fd2ad158
...
...
@@ -6,7 +6,6 @@ import 'package:byod/bloc/member_info.dart';
import
'package:byod/helper/helper.dart'
;
import
'package:byod/helper/prefs.dart'
;
import
'package:byod/ui/no_route.dart'
;
import
'package:byod/ui/viewbill/view_bill.dart'
;
import
'package:byod/ui/viewbill/view_bill_new.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
...
lib/ui/viewbill/view_bill_new.dart
View file @
fd2ad158
...
...
@@ -16,10 +16,8 @@ import 'package:dotted_line/dotted_line.dart';
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_easyloading/flutter_easyloading.dart'
;
import
'package:geolocator/geolocator.dart'
;
import
'package:intl/intl.dart'
;
import
'package:mqtt_client/mqtt_client.dart'
;
import
'package:uuid/uuid.dart'
;
import
'../../api/api.dart'
;
import
'../../bloc/address_user_bloc.dart'
;
...
...
@@ -45,7 +43,6 @@ import '../payment/payment.dart';
import
'../payment/payment_voucher.dart'
;
import
'../webview/webview.dart'
;
import
'app_bar.dart'
;
import
'bottom_sheet_pickup_delivery.dart'
;
import
'component_name_user.dart'
;
import
'list_order.dart'
;
import
'rincian_pembayaran.dart'
;
...
...
@@ -198,46 +195,48 @@ class _ViewBillNewState extends State<ViewBillNew> {
isCoreLayout:
true
,
);
}
else
{
List
<
String
>
listHistoryOrder
=
getListHistory
();
int
indexListhIstory
=
listHistoryOrder
.
indexWhere
(
(
listHistoryOrders
)
=>
jsonDecode
(
listHistoryOrders
)[
'order_id'
]
==
dataBill
[
0
].
id
);
if
(
indexListhIstory
==
-
1
)
{
Map
historyOrder
=
{
"order_id"
:
dataBill
[
0
].
id
,
"table"
:
dataBill
[
0
].
tableName
,
"user_name"
:
dataBill
[
0
].
customerName
,
"total_order"
:
dataBill
[
0
].
totalSeluruhOrderan
,
"date_order"
:
localDate
(
dataBill
[
0
].
dateOrder
,
isHistory:
true
,
),
"branch_code"
:
branchCode
,
"brand"
:
brandCode
,
"token"
:
widget
.
token
,
};
String
historySave
=
jsonEncode
(
historyOrder
);
listHistoryOrder
.
add
(
historySave
);
setListHistory
(
listHistoryOrder
);
}
else
{
listHistoryOrder
.
removeAt
(
indexListhIstory
);
Map
historyOrder
=
{
"order_id"
:
dataBill
[
0
].
id
,
"table"
:
dataBill
[
0
].
tableName
,
"user_name"
:
dataBill
[
0
].
customerName
,
"total_order"
:
dataBill
[
0
].
totalSeluruhOrderan
,
"date_order"
:
localDate
(
dataBill
[
0
].
dateOrder
,
isHistory:
true
,
),
"branch_code"
:
branchCode
,
"brand"
:
brandCode
,
"token"
:
widget
.
token
,
};
String
historySave
=
jsonEncode
(
historyOrder
);
listHistoryOrder
.
add
(
historySave
);
setListHistory
(
listHistoryOrder
);
if
(!
widget
.
isHistory
)
{
List
<
String
>
listHistoryOrder
=
getListHistory
();
int
indexListhIstory
=
listHistoryOrder
.
indexWhere
(
(
listHistoryOrders
)
=>
jsonDecode
(
listHistoryOrders
)[
'order_id'
]
==
dataBill
[
0
].
id
);
if
(
indexListhIstory
==
-
1
)
{
Map
historyOrder
=
{
"order_id"
:
dataBill
[
0
].
id
,
"table"
:
dataBill
[
0
].
tableName
,
"user_name"
:
dataBill
[
0
].
customerName
,
"total_order"
:
dataBill
[
0
].
totalSeluruhOrderan
,
"date_order"
:
localDate
(
dataBill
[
0
].
dateOrder
,
isHistory:
true
,
),
"branch_code"
:
branchCode
,
"brand"
:
brandCode
,
"token"
:
widget
.
token
,
};
String
historySave
=
jsonEncode
(
historyOrder
);
listHistoryOrder
.
add
(
historySave
);
setListHistory
(
listHistoryOrder
);
}
else
{
listHistoryOrder
.
removeAt
(
indexListhIstory
);
Map
historyOrder
=
{
"order_id"
:
dataBill
[
0
].
id
,
"table"
:
dataBill
[
0
].
tableName
,
"user_name"
:
dataBill
[
0
].
customerName
,
"total_order"
:
dataBill
[
0
].
totalSeluruhOrderan
,
"date_order"
:
localDate
(
dataBill
[
0
].
dateOrder
,
isHistory:
true
,
),
"branch_code"
:
branchCode
,
"brand"
:
brandCode
,
"token"
:
widget
.
token
,
};
String
historySave
=
jsonEncode
(
historyOrder
);
listHistoryOrder
.
add
(
historySave
);
setListHistory
(
listHistoryOrder
);
}
}
saveBillDetail
(
dataBill
);
...
...
@@ -1031,24 +1030,29 @@ class CoreBill extends StatelessWidget {
),
);
}
else
{
setIsNewOrder
(
true
);
context
.
read
<
BranchExist
>()
.
branchExist
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
(),
context
,
);
Navigator
.
pushReplacement
(
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
NewHome2
(),
),
);
if
(
getUrlType
()
==
typeUrlSatu
)
{
EasyLoading
.
showToast
(
'Silahkan meminta QR untuk discan'
);
}
else
{
setIsNewOrder
(
true
);
context
.
read
<
BranchExist
>()
.
branchExist
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
(),
context
,
);
Navigator
.
pushReplacement
(
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
NewHome2
(),
),
);
}
}
// if (dataBill[0].state ==
// orderStateDone) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment