update for permission and destination ordering
This commit is contained in:
@ -643,6 +643,25 @@ class DestinationController extends GetxController {
|
||||
|
||||
}
|
||||
|
||||
void toggleSelection(Destination dest) async {
|
||||
DatabaseHelper db = DatabaseHelper.instance;
|
||||
await db.toggleSelecttion(dest);
|
||||
destinations.clear();
|
||||
db.getDestinations().then((value){
|
||||
destinationCount.value = 0;
|
||||
currentSelectedDestinations.clear();
|
||||
for(Destination d in value){
|
||||
//print("------ destination controller populating destination-------- ${d.checkedin}-------- :::::");
|
||||
//print("-----populated----- ${d.toMap()}");
|
||||
if(d.selected!){
|
||||
currentSelectedDestinations.add(d);
|
||||
}
|
||||
destinations.add(d);
|
||||
}
|
||||
destinationCount.value = destinations.length;
|
||||
});
|
||||
}
|
||||
|
||||
void PopulateDestinations(){
|
||||
print("--------- destination controller populsting destinations ----------- ::::::");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user