This commit is contained in:
J. A. Messias 2024-11-14 11:10:08 -03:00
parent 29c246fe03
commit b6e83dbaa8
1 changed files with 36 additions and 44 deletions

View File

@ -72,12 +72,6 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
return null;
}
/// ABOUT THE VISITORS
if (options.contains(MenuOption.VisitorsRegister))
addMenuEntry(Icons.person_add_alt_1_outlined, 'Register Visitor', 'Cadastrar Visitante', () async {
await open(context, '/registerVisitorPage');
safeSetState;
});
if (options.contains(MenuOption.WorkersOnTheProperty))
addMenuEntry(Icons.engineering_outlined, 'Schedule Providers', 'Agendar Prestadores', () async {
if (await StorageHelper().get(SQLiteStorageKey.provisional.value, Storage.SQLiteStorage) == 'true')
@ -107,31 +101,6 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
await open(context, '/scheduleCompleteVisitPage');
safeSetState;
});
/// ABOUT THE PROPERTY
if (options.contains(MenuOption.PetsOnTheProperty))
addMenuEntry(Icons.pets, 'Pets', 'Pets', () async {
if (await StorageHelper().get(SQLiteStorageKey.pets.value, Storage.SQLiteStorage) == 'true')
await open(context, '/petsOnThePropertyPage');
else
DialogUnavailable.unavailableFeature(context);
safeSetState;
});
if (options.contains(MenuOption.ResidentsOnTheProperty))
addMenuEntry(Icons.groups, 'Residents', 'Moradores', () async {
await open(context, '/peopleOnThePropertyPage');
safeSetState;
});
if (options.contains(MenuOption.VehiclesOnTheProperty))
addMenuEntry(Symbols.directions_car, 'Vehicles', 'Veículos', () async {
await open(context, '/vehiclesOnThePropertyPage');
safeSetState;
});
if (options.contains(MenuOption.VisitsOnTheProperty))
addMenuEntry(Symbols.perm_contact_calendar, 'Opened Visits', 'Visitas em Aberto', () async {
await open(context, '/visitsOnThePropertyPage');
safeSetState;
});
if (options.contains(MenuOption.PackagesOnTheProperty))
addMenuEntry(Icons.inventory_2_outlined, 'Orders', 'Encomendas', () async {
if (await StorageHelper().get(SQLiteStorageKey.whatsapp.value, Storage.SQLiteStorage) == 'true')
@ -140,23 +109,17 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
DialogUnavailable.unavailableFeature(context);
safeSetState;
});
/// ABOUT THE RESIDENTS
if (options.contains(MenuOption.PetsRegister))
addMenuEntry(Icons.pets, 'Pets Register', 'Cadastrar Pet', () async {
if (await StorageHelper().get(SQLiteStorageKey.pets.value, Storage.SQLiteStorage) == 'true')
await open(context, '/petsPage');
else
DialogUnavailable.unavailableFeature(context);
safeSetState;
});
if (options.contains(MenuOption.ReservationsOnTheLocal))
addMenuEntry(Icons.event_available, 'Reservations', 'Reservas', () async {
if (await StorageHelper().get(SQLiteStorageKey.whatsapp.value, Storage.SQLiteStorage) == 'true')
await open(context, '/reservation');
else
DialogUnavailable.unavailableFeature(context);
safeSetState;
});
if (options.contains(MenuOption.VisitorsRegister))
addMenuEntry(Icons.person_add_alt_1_outlined, 'Register Visitor', 'Cadastrar Visitante', () async {
await open(context, '/registerVisitorPage');
safeSetState;
});
if (options.contains(MenuOption.QRCodeAccessInProperty))
@ -164,11 +127,24 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
await open(context, '/qrCodePage');
safeSetState;
});
if (options.contains(MenuOption.PetsOnTheProperty))
addMenuEntry(Icons.pets, 'Pets', 'Pets', () async {
if (await StorageHelper().get(SQLiteStorageKey.pets.value, Storage.SQLiteStorage) == 'true')
await open(context, '/petsOnThePropertyPage');
else
DialogUnavailable.unavailableFeature(context);
safeSetState;
});
if (options.contains(MenuOption.AccessOnTheProperty))
addMenuEntry(Icons.transfer_within_a_station_outlined, 'Access History', 'Consultar Acessos', () async {
await open(context, '/acessHistoryPage');
safeSetState;
});
if (options.contains(MenuOption.ResidentsOnTheProperty))
addMenuEntry(Icons.groups, 'Residents', 'Moradores', () async {
await open(context, '/peopleOnThePropertyPage');
safeSetState;
});
if (options.contains(MenuOption.LiberationsOnTheProperty))
addMenuEntry(Icons.how_to_reg_outlined, 'Liberations History', 'Consultar Liberações', () async {
await open(context, '/liberationHistory');
@ -179,8 +155,24 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
await open(context, '/messageHistoryPage');
safeSetState;
});
/// ABOUT THE SYSTEM
if (options.contains(MenuOption.VehiclesOnTheProperty))
addMenuEntry(Symbols.directions_car, 'Vehicles', 'Veículos', () async {
await open(context, '/vehiclesOnThePropertyPage');
safeSetState;
});
if (options.contains(MenuOption.VisitsOnTheProperty))
addMenuEntry(Symbols.perm_contact_calendar, 'Opened Visits', 'Visitas em Aberto', () async {
await open(context, '/visitsOnThePropertyPage');
safeSetState;
});
if (options.contains(MenuOption.PetsRegister))
addMenuEntry(Icons.pets, 'Pets Register', 'Cadastrar Pet', () async {
if (await StorageHelper().get(SQLiteStorageKey.pets.value, Storage.SQLiteStorage) == 'true')
await open(context, '/petsPage');
else
DialogUnavailable.unavailableFeature(context);
safeSetState;
});
if (options.contains(MenuOption.AboutProperty))
addMenuEntry(Icons.home, 'About Property', 'Sobre a Propriedade', () async {
if (await StorageHelper().get(SQLiteStorageKey.whatsapp.value, Storage.SQLiteStorage) == 'true')