update for chech in

This commit is contained in:
Mohamed Nouffer
2022-07-14 23:10:24 +05:30
parent 264cd828f4
commit 42accf9f3a
10 changed files with 532 additions and 311 deletions

View File

@ -39,7 +39,9 @@ class DatabaseHelper{
list_order INTEGER,
photos TEXT,
checkin_radious REAL,
auto_checkin INTEGER
auto_checkin INTEGER,
selected INTEGER,
checkedin INTEGER
)
''');
}
@ -85,6 +87,20 @@ class DatabaseHelper{
return res;
}
Future<int> updateAction(Destination destination, bool checkin)async {
Database db = await instance.database;
int act = checkin == false ? 0 : 1;
Map<String, dynamic> row = {
"checkedin": act
};
return await db.update(
"destination",
row,
where: 'location_id = ?',
whereArgs: [destination.location_id]
);
}
// Future<int?> getPending() async{
// Database db = await instance.database;
// return await Sqflite.firstIntValue(await db.rawQuery("SELECT COUNT(*) FROM incidents"));