diff --git a/lib/dataGrids/AdministrationHeader.dart b/lib/dataGrids/AdministrationHeader.dart index e701cac4..2fff64c9 100644 --- a/lib/dataGrids/AdministrationHeader.dart +++ b/lib/dataGrids/AdministrationHeader.dart @@ -2,7 +2,7 @@ import 'package:avapp/dataGrids/SingleTableDataGrid.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; -import '../models/PlutoAbstract.dart'; +import 'PlutoAbstract.dart'; import '../services/DialogHelper.dart'; import '../services/ToastHelper.dart'; diff --git a/lib/services/DataGridHelper.dart b/lib/dataGrids/DataGridHelper.dart similarity index 100% rename from lib/services/DataGridHelper.dart rename to lib/dataGrids/DataGridHelper.dart diff --git a/lib/models/PlutoAbstract.dart b/lib/dataGrids/PlutoAbstract.dart similarity index 100% rename from lib/models/PlutoAbstract.dart rename to lib/dataGrids/PlutoAbstract.dart diff --git a/lib/dataGrids/SingleTableDataGrid.dart b/lib/dataGrids/SingleTableDataGrid.dart index 0acd9ca9..e03e2a0e 100644 --- a/lib/dataGrids/SingleTableDataGrid.dart +++ b/lib/dataGrids/SingleTableDataGrid.dart @@ -2,7 +2,7 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; -import '../models/PlutoAbstract.dart'; +import 'PlutoAbstract.dart'; import 'AdministrationHeader.dart'; enum DataGridFirstColumn{ diff --git a/lib/models/EventModel.dart b/lib/models/EventModel.dart index 2863161d..51562627 100644 --- a/lib/models/EventModel.dart +++ b/lib/models/EventModel.dart @@ -1,9 +1,9 @@ import 'package:avapp/models/PlaceModel.dart'; -import 'package:avapp/services/DataGridHelper.dart'; +import 'package:avapp/dataGrids/DataGridHelper.dart'; import 'package:intl/intl.dart'; import 'package:pluto_grid/pluto_grid.dart'; -import '../models/PlutoAbstract.dart'; +import '../dataGrids/PlutoAbstract.dart'; import '../services/DataService.dart'; class EventModel extends IPlutoRowModel { diff --git a/lib/models/ExclusiveGroupModel.dart b/lib/models/ExclusiveGroupModel.dart index efce87c5..81f91099 100644 --- a/lib/models/ExclusiveGroupModel.dart +++ b/lib/models/ExclusiveGroupModel.dart @@ -1,6 +1,6 @@ import 'package:pluto_grid/pluto_grid.dart'; -import '../models/PlutoAbstract.dart'; +import '../dataGrids/PlutoAbstract.dart'; import '../services/DataService.dart'; class ExclusiveGroupModel extends IPlutoRowModel { diff --git a/lib/models/InformationModel.dart b/lib/models/InformationModel.dart index 1331ca75..b3d847ca 100644 --- a/lib/models/InformationModel.dart +++ b/lib/models/InformationModel.dart @@ -1,7 +1,7 @@ import 'package:avapp/services/DataService.dart'; import 'package:pluto_grid/pluto_grid.dart'; -import 'PlutoAbstract.dart'; +import '../dataGrids/PlutoAbstract.dart'; class InformationModel extends IPlutoRowModel { diff --git a/lib/models/PlaceModel.dart b/lib/models/PlaceModel.dart index d7714d61..2be1081f 100644 --- a/lib/models/PlaceModel.dart +++ b/lib/models/PlaceModel.dart @@ -1,7 +1,7 @@ import 'package:avapp/services/DataService.dart'; import 'package:pluto_grid/pluto_grid.dart'; -import 'PlutoAbstract.dart'; +import '../dataGrids/PlutoAbstract.dart'; class PlaceModel extends IPlutoRowModel { dynamic latLng; diff --git a/lib/models/UserGroupInfoModel.dart b/lib/models/UserGroupInfoModel.dart index 8d267d95..1b74b941 100644 --- a/lib/models/UserGroupInfoModel.dart +++ b/lib/models/UserGroupInfoModel.dart @@ -1,6 +1,6 @@ import 'package:pluto_grid/pluto_grid.dart'; -import '../models/PlutoAbstract.dart'; +import '../dataGrids/PlutoAbstract.dart'; import '../services/DataService.dart'; import 'PlaceModel.dart'; import 'UserInfoModel.dart'; diff --git a/lib/models/UserInfoModel.dart b/lib/models/UserInfoModel.dart index fcb30004..ffd34c0c 100644 --- a/lib/models/UserInfoModel.dart +++ b/lib/models/UserInfoModel.dart @@ -4,7 +4,7 @@ import 'package:intl/intl.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../services/DataService.dart'; -import 'PlutoAbstract.dart'; +import '../dataGrids/PlutoAbstract.dart'; class UserInfoModel extends IPlutoRowModel { String? id; @@ -39,6 +39,7 @@ class UserInfoModel extends IPlutoRowModel { PlaceModel? place; + static const sexes = ["male", "female"]; static const migrateColumns = { diff --git a/lib/pages/AdministrationPage.dart b/lib/pages/AdministrationPage.dart index af1d82d6..fa96c3dd 100644 --- a/lib/pages/AdministrationPage.dart +++ b/lib/pages/AdministrationPage.dart @@ -5,7 +5,7 @@ import 'package:avapp/models/PlaceModel.dart'; import 'package:avapp/models/UserGroupInfoModel.dart'; import 'package:avapp/models/UserInfoModel.dart'; import 'package:avapp/pages/MapPage.dart'; -import 'package:avapp/services/DataGridHelper.dart'; +import 'package:avapp/dataGrids/DataGridHelper.dart'; import 'package:avapp/services/DataService.dart'; import 'package:avapp/services/MailerSendHelper.dart'; import 'package:avapp/services/MapIconService.dart'; @@ -127,8 +127,8 @@ class _AdministrationPageState extends State { PlutoColumn( title: "PohlavĂ­", field: UserInfoModel.sexColumn, - type: PlutoColumnType.select(["male", "female"]), - formatter: (value) => DataGridHelper.returnQuestionMarkOnInvalid(value, ["male", "female"]), + type: PlutoColumnType.select(UserInfoModel.sexes), + formatter: (value) => DataGridHelper.returnQuestionMarkOnInvalid(value, UserInfoModel.sexes), applyFormatterInEditing: true, width: 100, ),