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
7a75e7bb
Commit
7a75e7bb
authored
Oct 14, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor change pada viewbill page
parent
b29fe28b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
473 additions
and
409 deletions
+473
-409
config.json
assets/config.json
+1
-1
api.dart
lib/api/api.dart
+6
-1
helper.dart
lib/helper/helper.dart
+15
-9
main.dart
lib/main.dart
+1
-1
view_bill_new.dart
lib/ui/viewbill/view_bill_new.dart
+450
-397
No files found.
assets/config.json
View file @
7a75e7bb
{
{
"base_url"
:
"https://
cc79-125-165-111-49.ap.ngrok.io
/"
,
"base_url"
:
"https://
neo.ravku.com
/"
,
"title"
:
"Ravintola Dev BYOD"
,
"title"
:
"Ravintola Dev BYOD"
,
"isResponsive"
:
true
,
"isResponsive"
:
true
,
"debug"
:
true
"debug"
:
true
...
...
lib/api/api.dart
View file @
7a75e7bb
...
@@ -93,7 +93,11 @@ class Api {
...
@@ -93,7 +93,11 @@ class Api {
"order_id"
:
orderID
,
"order_id"
:
orderID
,
"session_id"
:
sessionId
,
"session_id"
:
sessionId
,
"from"
:
fromByod
,
"from"
:
fromByod
,
"url_lookup"
:
(
debug
)
?
'https://www.ravintola.web.id/'
:
(
urlType
==
typeUrlTiga
)
?
getUrlLookUp
()
:
''
,
"url_lookup"
:
(
debug
)
?
'https://www.ravintola.web.id/'
:
(
urlType
==
typeUrlTiga
)
?
getUrlLookUp
()
:
''
,
"customer_lat"
:
latitude
,
"customer_lat"
:
latitude
,
"customer_long"
:
longitude
,
"customer_long"
:
longitude
,
"type_url"
:
urlType
,
"type_url"
:
urlType
,
...
@@ -162,6 +166,7 @@ class Api {
...
@@ -162,6 +166,7 @@ class Api {
setIsPickup
(
jsonObject
[
'data'
][
'is_pickup'
]);
setIsPickup
(
jsonObject
[
'data'
][
'is_pickup'
]);
setOpenTime
(
jsonObject
[
'data'
][
'open_time'
]);
setOpenTime
(
jsonObject
[
'data'
][
'open_time'
]);
setCloseTime
(
jsonObject
[
'data'
][
'close_time'
]);
setCloseTime
(
jsonObject
[
'data'
][
'close_time'
]);
setTableNumber
(
jsonObject
[
'data'
][
'table_number'
]
??
''
);
if
(
jsonObject
[
'data'
][
'payment_mode'
]
!=
null
)
{
if
(
jsonObject
[
'data'
][
'payment_mode'
]
!=
null
)
{
setPaymentMode
(
jsonObject
[
'data'
][
'payment_mode'
]);
setPaymentMode
(
jsonObject
[
'data'
][
'payment_mode'
]);
}
}
...
...
lib/helper/helper.dart
View file @
7a75e7bb
...
@@ -67,11 +67,13 @@ Future<dynamic> sendTele(String teks, String namaFungsi) async {
...
@@ -67,11 +67,13 @@ Future<dynamic> sendTele(String teks, String namaFungsi) async {
//**get orderStatus and color status */
//**get orderStatus and color status */
String
getOrderStatus
(
int
status
)
{
String
getOrderStatus
(
int
status
)
{
if
(
status
==
completeOrder
)
{
if
(
status
==
completeOrder
)
{
return
'
Complete
'
;
return
'
Processed
'
;
}
else
if
(
status
==
cancelOrder
)
{
}
else
if
(
status
==
cancelOrder
)
{
return
'Canceld'
;
return
'Cancel
e
d'
;
}
else
if
(
status
==
processingOrder
)
{
}
else
if
(
status
==
processingOrder
)
{
return
'Preparing'
;
return
'Processing'
;
}
else
if
(
status
==
approvedOrder
)
{
return
'Approved'
;
}
else
{
}
else
{
return
'Pending'
;
return
'Pending'
;
}
}
...
@@ -81,9 +83,11 @@ Color getOrderStatusColor(int status) {
...
@@ -81,9 +83,11 @@ Color getOrderStatusColor(int status) {
if
(
status
==
completeOrder
)
{
if
(
status
==
completeOrder
)
{
return
successColor
;
return
successColor
;
}
else
if
(
status
==
cancelOrder
)
{
}
else
if
(
status
==
cancelOrder
)
{
return
cancelColorButton
;
return
dangerColor
;
}
else
if
(
status
==
processingOrder
)
{
}
else
if
(
status
==
processingOrder
)
{
return
processingColor
;
return
processingColor
;
}
else
if
(
status
==
approvedOrder
)
{
return
approvedColor
;
}
else
{
}
else
{
return
pendingColor
;
return
pendingColor
;
}
}
...
@@ -348,12 +352,12 @@ String textButtonCheckout(int orderState) {
...
@@ -348,12 +352,12 @@ String textButtonCheckout(int orderState) {
orderState
==
orderStateInproses
||
orderState
==
orderStateInproses
||
orderState
==
orderStateReady
))
{
orderState
==
orderStateReady
))
{
return
'Pesanan Diproses'
;
return
'Pesanan Diproses'
;
}
else
if
(
orderState
==
orderStateDone
)
{
}
else
if
(
paymentMethod
==
openBill
&&
orderState
!=
orderStateCanceled
)
{
return
'B
uat Pesanan Baru
'
;
return
'B
ayar
'
;
}
else
if
(
orderState
==
orderStateCanceled
)
{
}
else
if
(
orderState
==
orderStateCanceled
)
{
return
'Transaksi Dibatalkan'
;
return
'Transaksi Dibatalkan'
;
}
else
{
}
else
{
return
''
;
return
'
Bayar
'
;
}
}
}
}
...
@@ -426,6 +430,7 @@ const Color textInButton = Colors.white;
...
@@ -426,6 +430,7 @@ const Color textInButton = Colors.white;
const
Color
textCancelColor
=
Color
(
0xff333333
);
const
Color
textCancelColor
=
Color
(
0xff333333
);
const
Color
successColor
=
Colors
.
green
;
const
Color
successColor
=
Colors
.
green
;
const
Color
processingColor
=
Colors
.
blue
;
const
Color
processingColor
=
Colors
.
blue
;
const
Color
approvedColor
=
Colors
.
blue
;
const
Color
pendingColor
=
Colors
.
amber
;
const
Color
pendingColor
=
Colors
.
amber
;
const
Color
disabledColor
=
Colors
.
grey
;
const
Color
disabledColor
=
Colors
.
grey
;
// const Color selectedColor = Color.fromARGB(255, 225, 250, 5);
// const Color selectedColor = Color.fromARGB(255, 225, 250, 5);
...
@@ -480,9 +485,10 @@ const int maxLengthTextField = 100;
...
@@ -480,9 +485,10 @@ const int maxLengthTextField = 100;
//** untuk nampilin orderan preparing atau compelete */
//** untuk nampilin orderan preparing atau compelete */
const
int
cancelOrder
=
-
1
;
const
int
cancelOrder
=
-
1
;
const
int
completeOrder
=
2
;
const
int
pendingOrder
=
0
;
const
int
pendingOrder
=
0
;
const
int
processingOrder
=
1
;
const
int
approvedOrder
=
1
;
const
int
processingOrder
=
2
;
const
int
completeOrder
=
99
;
//** untuk nampilin orderan preparing atau compelete */
//** untuk nampilin orderan preparing atau compelete */
//** constanta order status bill */
//** constanta order status bill */
...
...
lib/main.dart
View file @
7a75e7bb
...
@@ -43,7 +43,7 @@ bool isExcelso = false;
...
@@ -43,7 +43,7 @@ bool isExcelso = false;
bool
isResponsive
=
false
;
bool
isResponsive
=
false
;
final
GlobalKey
<
NavigatorState
>
navigatorKey
=
GlobalKey
<
NavigatorState
>();
final
GlobalKey
<
NavigatorState
>
navigatorKey
=
GlobalKey
<
NavigatorState
>();
String
defaultTitle
=
'Ravintola - BYOD'
;
String
defaultTitle
=
'Ravintola - BYOD'
;
bool
debug
=
false
;
// set true pada config.json jika ingin
ada log pri
nt
bool
debug
=
false
;
// set true pada config.json jika ingin
mode developme
nt
String
browserName
=
'Wrong platform'
;
String
browserName
=
'Wrong platform'
;
String
browserVersion
=
''
;
String
browserVersion
=
''
;
...
...
lib/ui/viewbill/view_bill_new.dart
View file @
7a75e7bb
This diff is collapsed.
Click to expand it.
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