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
f95c5dae
Commit
f95c5dae
authored
Oct 10, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
outlet gmaps on
parent
c7a0b437
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
139 additions
and
72 deletions
+139
-72
config.json
assets/config.json
+1
-1
api.dart
lib/api/api.dart
+6
-0
helper.dart
lib/helper/helper.dart
+1
-1
prefs.dart
lib/helper/prefs.dart
+18
-1
splash.dart
lib/ui/splash.dart
+22
-22
view_bill_new.dart
lib/ui/viewbill/view_bill_new.dart
+91
-47
No files found.
assets/config.json
View file @
f95c5dae
{
"base_url"
:
"https://
6b3f
-125-165-111-49.ap.ngrok.io/"
,
"base_url"
:
"https://
cc79
-125-165-111-49.ap.ngrok.io/"
,
"title"
:
"Ravintola Dev BYOD"
,
"isResponsive"
:
true
,
"debug"
:
true
...
...
lib/api/api.dart
View file @
f95c5dae
...
...
@@ -154,6 +154,10 @@ class Api {
setBranch
(
jsonObject
[
'data'
][
'code'
]);
setBrand
(
jsonObject
[
'data'
][
'brand_code'
]);
setBranchName
(
jsonObject
[
'data'
][
'name'
]);
setLatOutlet
(
jsonObject
[
'data'
][
'lat'
]);
setLongOutlet
(
jsonObject
[
'data'
][
'long'
]);
setIsDelivery
(
jsonObject
[
'data'
][
'is_delivery'
]);
setIsPickup
(
jsonObject
[
'data'
][
'is_pickup'
]);
if
(
jsonObject
[
'data'
][
'payment_mode'
]
!=
null
)
{
setPaymentMode
(
jsonObject
[
'data'
][
'payment_mode'
]);
}
...
...
@@ -1997,6 +2001,8 @@ class Api {
if
(
jsonObject
[
'status'
].
toString
().
toLowerCase
()
==
'ok'
)
{
setBranch
(
newBranch
);
setBranchName
(
jsonObject
[
'data'
][
'branch_name'
]);
setLatOutlet
(
jsonObject
[
'data'
][
'lat'
]);
setLongOutlet
(
jsonObject
[
'data'
][
'long'
]);
return
true
;
}
return
false
;
...
...
lib/helper/helper.dart
View file @
f95c5dae
...
...
@@ -296,7 +296,7 @@ bool isCanTapAddMoreButton(int orderState) {
bool
isVisibleAddMoreButton
(
int
tableStatus
,
int
orderState
)
{
int
paymentMethod
=
getPaymentMode
();
if
(
tableStatus
==
tableStatusOpen
)
{
if
(
tableStatus
==
tableStatusOpen
&&
getTableMode
()
==
tableIndividu
)
{
if
(
paymentMethod
==
closebill
)
{
if
(
orderState
==
orderStatePending
||
orderState
==
orderStateCreated
||
...
...
lib/helper/prefs.dart
View file @
f95c5dae
...
...
@@ -34,6 +34,8 @@ const String _mqMessage = 'mqmsg';
const
String
_tableMode
=
'tbm'
;
const
String
_branchName
=
'bN'
;
const
String
_orderCreated
=
'oC'
;
const
String
_latOutlet
=
'latO'
;
const
String
_longOutlet
=
'longO'
;
String
getBaseUrl
(
)
{
return
prefs
.
getString
(
_baseUrl
)
??
''
;
...
...
@@ -287,7 +289,6 @@ Future<void> setBranchName(String value) async {
prefs
.
setString
(
_branchName
,
value
);
}
bool
getStatusOrderCreated
(
)
{
return
prefs
.
getBool
(
_orderCreated
)
??
false
;
}
...
...
@@ -295,3 +296,19 @@ bool getStatusOrderCreated() {
Future
<
void
>
setStatusOrderCreated
(
bool
value
)
async
{
prefs
.
setBool
(
_orderCreated
,
value
);
}
String
getLatOutlet
(
)
{
return
prefs
.
getString
(
_latOutlet
)
??
''
;
}
Future
<
void
>
setLatOutlet
(
String
value
)
async
{
prefs
.
setString
(
_latOutlet
,
value
);
}
String
getLongOutlet
(
)
{
return
prefs
.
getString
(
_longOutlet
)
??
''
;
}
Future
<
void
>
setLongOutlet
(
String
value
)
async
{
prefs
.
setString
(
_longOutlet
,
value
);
}
lib/ui/splash.dart
View file @
f95c5dae
...
...
@@ -90,28 +90,28 @@ class _SplashState extends State<Splash> {
getBrancList:
true
,
);
Future
.
delayed
(
const
Duration
(
milliseconds:
2000
),
()
async
{
if
(
getStatusOrderCreated
())
{
context
.
read
<
FilterMenuBloc
>().
catAndMenu
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
(),
);
Navigator
.
pushReplacement
(
widget
.
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
NewHome2
(),
),
);
}
else
{
Navigator
.
pushReplacement
(
widget
.
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
SelectBranch
(),
),
);
}
//
if (getStatusOrderCreated()) {
context
.
read
<
FilterMenuBloc
>().
catAndMenu
(
getBranchPref
(),
getBrand
(),
getRole
(),
getCashierName
(),
getOrderId
(),
);
Navigator
.
pushReplacement
(
widget
.
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
NewHome2
(),
),
);
//
} else {
//
Navigator.pushReplacement(
//
widget.context,
//
MaterialPageRoute(
//
builder: (_) => const SelectBranch(),
//
),
//
);
//
}
});
});
}
else
{
...
...
lib/ui/viewbill/view_bill_new.dart
View file @
f95c5dae
...
...
@@ -1451,11 +1451,56 @@ class DeliveryPickupDetail extends StatelessWidget {
const
SizedBox
(
width:
12
,
),
defaultText
(
context
,
getBranchName
(),
maxLines:
2
,
overFlow:
TextOverflow
.
ellipsis
,
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
defaultText
(
context
,
getBranchName
(),
maxLines:
2
,
overFlow:
TextOverflow
.
ellipsis
,
),
const
SizedBox
(
height:
5
,
),
GestureDetector
(
onTap:
()
{
htmlOpenLink
(
'https://maps.google.com/?q=
${getLatOutlet()}
,
${getLongOutlet()}
'
,
self:
false
,
);
},
child:
Container
(
width:
100
,
height:
23
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
40
),
color:
buttonColor
,
),
child:
Center
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
const
Image
(
image:
AssetImage
(
'assets/icons/pin-address.png'
),
),
const
SizedBox
(
width:
12.6
,
),
defaultText
(
context
,
'Alamat Outlet'
,
style:
addButton
(
font:
8
,
),
)
],
),
),
),
)
],
),
const
SizedBox
(
width:
12
,
...
...
@@ -1855,10 +1900,8 @@ class EmptyBill extends StatelessWidget {
child:
defaultText
(
context
,
(
getIsDeliveryPickup
())
?
(
getIsCustomerDelivery
())
?
'Delivery'
:
'Pickup'
:
'Meja
${tableNumber}
'
,
?
'Delivery / Pickup'
:
'Meja
$tableNumber
'
,
style:
viewbillStyle
()),
),
Container
(
...
...
@@ -1872,44 +1915,45 @@ class EmptyBill extends StatelessWidget {
),
],
),
(
getIsDeliveryPickup
())
?
GestureDetector
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
SelectBranch
(),
),
);
},
child:
Container
(
height:
30
,
width:
80
,
margin:
const
EdgeInsets
.
only
(
right:
20
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
40
),
color:
backgroundWhite
,
border:
Border
.
all
(
color:
buttonColor
,
),
),
child:
Center
(
child:
defaultText
(
context
,
'Ganti Outlet'
,
style:
addButton
(
font:
8
,
color:
textColorBlack
,
),
),
),
),
)
:
const
SizedBox
()
// (getIsDeliveryPickup())
// ? GestureDetector(
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (_) => const SelectBranch(
// isFormBill: true,
// ),
// ),
// );
// },
// child: Container(
// height: 30,
// width: 80,
// margin: const EdgeInsets.only(
// right: 20,
// ),
// decoration: BoxDecoration(
// borderRadius:
// BorderRadius.circular(40),
// color: backgroundWhite,
// border: Border.all(
// color: buttonColor,
// ),
// ),
// child: Center(
// child: defaultText(
// context,
// 'Ganti Outlet',
// style: addButton(
// font: 8,
// color: textColorBlack,
// ),
// ),
// ),
// ),
// )
// : const SizedBox()
],
),
),
...
...
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