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
f825c3fd
Commit
f825c3fd
authored
Nov 03, 2022
by
Jasa Digital
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug
parent
e92aa2ba
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
19 deletions
+36
-19
api.dart
lib/api/api.dart
+1
-1
branch_exist.dart
lib/bloc/branch_exist.dart
+2
-1
splash.dart
lib/ui/splash.dart
+26
-15
view_bill_new.dart
lib/ui/viewbill/view_bill_new.dart
+7
-2
No files found.
lib/api/api.dart
View file @
f825c3fd
...
...
@@ -102,7 +102,7 @@ class Api {
"session_id"
:
sessionId
,
"from"
:
fromByod
,
"url_lookup"
:
(
debug
)
?
'https://
www.ravintola.web.id/
'
?
'https://
byod-neo.ravku.com
'
:
(
urlType
==
typeUrlTiga
)
?
getUrlLookUp
()
:
''
,
...
...
lib/bloc/branch_exist.dart
View file @
f825c3fd
...
...
@@ -25,12 +25,13 @@ class BranchExist extends Cubit<String> {
BuildContext
context
,
{
bool
getMenu
=
false
,
bool
getBrancList
=
false
,
String
token
=
''
,
})
{
getBranch
(
branchCode
,
brandCode
,
role
,
cashierName
,
orderId
).
then
((
value
)
{
if
(
getMenu
)
{
context
.
read
<
FilterMenuBloc
>()
.
catAndMenu
(
branchCode
,
brandCode
,
role
,
cashierName
,
orderId
);
.
catAndMenu
(
branchCode
,
brandCode
,
role
,
cashierName
,
token
);
}
if
(
getBrancList
)
{
context
.
read
<
BranchList
>().
getBranchList
();
...
...
lib/ui/splash.dart
View file @
f825c3fd
...
...
@@ -56,6 +56,7 @@ class _SplashState extends State<Splash> {
loadBaseUrl
().
then
((
baseUrl
)
{
setBaseUrl
(
baseUrl
);
if
(
widget
.
pathSegmentString
.
isEmpty
)
{
// contoh url http://localhost/
Geolocator
.
requestPermission
().
then
((
permission
)
{
if
(
permission
!=
LocationPermission
.
denied
&&
permission
!=
LocationPermission
.
deniedForever
)
{
...
...
@@ -90,14 +91,15 @@ class _SplashState extends State<Splash> {
widget
.
context
,
// getBrancList: true,
);
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
// if (getStatusOrderCreated()) {
context
.
read
<
FilterMenuBloc
>().
catAndMenu
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
()
,
''
,
);
context
.
read
<
ChangeDeliveryPickupBloc
>()
...
...
@@ -131,6 +133,7 @@ class _SplashState extends State<Splash> {
});
}
else
if
(
widget
.
pathSegmentString
.
length
==
1
)
{
if
(
widget
.
pathSegmentString
[
0
]
==
'go'
)
{
// contoh url http://localhost/go
Geolocator
.
requestPermission
().
then
((
permission
)
{
if
(
permission
!=
LocationPermission
.
denied
&&
permission
!=
LocationPermission
.
deniedForever
)
{
...
...
@@ -165,14 +168,15 @@ class _SplashState extends State<Splash> {
widget
.
context
,
getBrancList:
true
,
);
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
// if (getStatusOrderCreated()) {
context
.
read
<
FilterMenuBloc
>().
catAndMenu
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
()
,
''
,
);
context
.
read
<
ChangeDeliveryPickupBloc
>()
...
...
@@ -205,6 +209,7 @@ class _SplashState extends State<Splash> {
}
});
}
else
{
// contoh url http://localhost/asalaja <-- ini tidak di allow
setPaymentMode
(
closebill
);
setIsDeliveryPickup
(
false
);
setUrlLookUp
(
''
);
...
...
@@ -222,6 +227,7 @@ class _SplashState extends State<Splash> {
setIsDeliveryPickup
(
false
);
setUrlLookUp
(
''
);
if
(
widget
.
pathSegmentString
[
0
]
==
'o'
)
{
// contoh url http://localhost/o/uuid <--- ini untuk QR dynamic
if
(
widget
.
pathSegmentString
[
1
]
!=
''
)
{
setOrderId
(
widget
.
pathSegmentString
[
1
]);
setUrlType
(
typeUrlSatu
);
...
...
@@ -277,6 +283,7 @@ class _SplashState extends State<Splash> {
setIsDeliveryPickup
(
false
);
setUrlLookUp
(
''
);
if
(
widget
.
pathSegmentString
[
0
]
==
'o'
)
{
// contoh url http://localhost/o/uuid/go <--- ini untuk QR dynamic direct go bill
if
(
widget
.
pathSegmentString
[
1
]
!=
''
)
{
setOrderId
(
widget
.
pathSegmentString
[
1
]);
setUrlType
(
typeUrlSatu
);
...
...
@@ -305,14 +312,15 @@ class _SplashState extends State<Splash> {
widget
.
context
,
getMenu:
true
,
);
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
// if (getStatusOrderCreated()) {
context
.
read
<
FilterMenuBloc
>().
catAndMenu
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
()
,
''
,
);
Navigator
.
pushReplacement
(
widget
.
context
,
...
...
@@ -340,6 +348,7 @@ class _SplashState extends State<Splash> {
);
}
}
else
{
// contoh url http://localhost/as/uuiasasd/goasasasas <--- ini ketika tidak valid url
Navigator
.
pushReplacement
(
widget
.
context
,
MaterialPageRoute
(
...
...
@@ -350,6 +359,7 @@ class _SplashState extends State<Splash> {
);
}
}
else
{
// contoh url http://localhost/EXC/RVN2/D-12 <--- ini untuk QR static
setPaymentMode
(
closebill
);
setIsDeliveryPickup
(
false
);
setUrlLookUp
(
''
);
...
...
@@ -385,6 +395,7 @@ class _SplashState extends State<Splash> {
}
}
else
if
(
widget
.
pathSegmentString
.
length
==
4
)
{
if
(
widget
.
pathSegmentString
[
3
]
==
'go'
)
{
// contoh url http://localhost/EXC/RVN2/D-12/go <--- ini untuk QR static direct ke bill
setPaymentMode
(
closebill
);
setIsDeliveryPickup
(
false
);
setUrlLookUp
(
''
);
...
...
@@ -416,15 +427,11 @@ class _SplashState extends State<Splash> {
widget
.
context
,
getMenu:
true
,
);
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
// if (getStatusOrderCreated()) {
context
.
read
<
FilterMenuBloc
>().
catAndMenu
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
(),
);
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
''
);
Navigator
.
pushReplacement
(
widget
.
context
,
MaterialPageRoute
(
...
...
@@ -433,6 +440,7 @@ class _SplashState extends State<Splash> {
);
});
}
else
{
// contoh url http://localhost/EXC/RVN2/D-12/UUID <--- ini untuk QR static dengan securetoken
setPaymentMode
(
closebill
);
setIsDeliveryPickup
(
false
);
setUrlLookUp
(
''
);
...
...
@@ -466,11 +474,13 @@ class _SplashState extends State<Splash> {
getOrderId
(),
// ini orderId dari path URL
widget
.
context
,
getMenu:
true
,
token:
widget
.
pathSegmentString
[
3
],
);
goToMenu
(
widget
.
context
);
}
}
else
if
(
widget
.
pathSegmentString
.
length
==
5
)
{
if
(
widget
.
pathSegmentString
[
4
]
==
'go'
)
{
// contoh url http://localhost/EXC/RVN2/D-12/UUID/go <--- ini untuk QR static dengan securetoken dan direct bill
setPaymentMode
(
closebill
);
setIsDeliveryPickup
(
false
);
setUrlLookUp
(
''
);
...
...
@@ -505,14 +515,15 @@ class _SplashState extends State<Splash> {
widget
.
context
,
getMenu:
true
,
);
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
Future
.
delayed
(
Duration
(
milliseconds:
durationDelayBeforToMenu
),
()
async
{
// if (getStatusOrderCreated()) {
context
.
read
<
FilterMenuBloc
>().
catAndMenu
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
()
,
''
,
);
Navigator
.
pushReplacement
(
widget
.
context
,
...
...
lib/ui/viewbill/view_bill_new.dart
View file @
f825c3fd
...
...
@@ -1687,8 +1687,13 @@ class OutletDetail extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
List
<
String
>
listHistoryOrder
=
getListHistory
();
int
indexListhIstory
=
listHistoryOrder
.
indexWhere
((
listHistoryOrders
)
=>
jsonDecode
(
listHistoryOrders
)[
'order_id'
]
==
dataBill
[
0
].
id
);
int
indexListhIstory
=
-
1
;
if
(
isHistory
)
{
indexListhIstory
=
listHistoryOrder
.
indexWhere
((
listHistoryOrders
)
=>
jsonDecode
(
listHistoryOrders
)[
'order_id'
]
==
dataBill
[
0
].
id
);
}
String
openHours
=
"
${timeHm(getOpenTime())}
-
${timeHm(getCloseTime())}
"
;
String
phoneOutlet
=
getPhoneOutlet
();
bool
isDeliveryCustomer
=
getIsCustomerDelivery
();
...
...
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