update reordering
This commit is contained in:
@ -235,6 +235,13 @@ class DestinationController extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
void deleteAllDestinations(){
|
||||
DatabaseHelper db = DatabaseHelper.instance;
|
||||
db.deleteAllDestinations().then((value){
|
||||
PopulateDestinations();
|
||||
});
|
||||
}
|
||||
|
||||
// ---------- database ------------------///
|
||||
|
||||
void addDestinations(Destination dest){
|
||||
@ -294,8 +301,11 @@ class DestinationController extends GetxController {
|
||||
}
|
||||
|
||||
|
||||
void makeOrder(String locationId){
|
||||
|
||||
void makeOrder(Destination d, int dir){
|
||||
DatabaseHelper db = DatabaseHelper.instance;
|
||||
db.updateOrder(d, dir).then((value){
|
||||
PopulateDestinations();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -39,14 +39,15 @@ class DestinationMapPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
String getDisplaytext(Destination dp){
|
||||
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
|
||||
String txt = "";
|
||||
if(dp.cp! > 0){
|
||||
txt = "${dp.cp}";
|
||||
txt = "${dp.cp.toString().replaceAll(regex, '')}";
|
||||
if(dp.checkin_point != null && dp.checkin_point! > 0){
|
||||
txt = txt + "{${dp.checkin_point}}";
|
||||
txt = txt + "{${dp.checkin_point.toString().replaceAll(regex, '')}}";
|
||||
}
|
||||
if(dp.buy_point != null && dp.buy_point! > 0){
|
||||
txt = txt + "[${dp.buy_point}]";
|
||||
txt = txt + "[${dp.buy_point.toString().replaceAll(regex, '')}]";
|
||||
}
|
||||
}
|
||||
return txt;
|
||||
|
||||
Reference in New Issue
Block a user