Skip to content

Commit

Permalink
Inizio implementazione informativa COVID
Browse files Browse the repository at this point in the history
  • Loading branch information
federunco committed Oct 2, 2020
1 parent c6eb549 commit c789be0
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 52 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (flutterVersionName == null) {

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
//apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'io.fabric'

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
//classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
Expand Down
Binary file added assets/images/covid_alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,8 @@
"clickToEnd": "Touch the highlighted area to end the tutorial.",
"NOT_DEFINED": "Not defined",
"SESSION_EXPIRED": "This session is expired",
"ANOTHER_DEVICE_CONNECTED": "Another device has signed in mySobrero, to preserve your security, this session has been terminated. To continue using the app, reopen it and do the login."
"ANOTHER_DEVICE_CONNECTED": "Another device has signed in mySobrero, to preserve your security, this session has been terminated. To continue using the app, reopen it and do the login.",
"COVID19_INFO_NOT_ACCEPTED": "Daily COVID informative not accepted",
"COVID19_INFO_DESC": "Login to Axios Web with a parent account to accept the daily COVID-19 informative and access school."

}
4 changes: 3 additions & 1 deletion i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,7 @@
"clickToEnd": "Clicca sull'area evidenziata per finire il tutorial",
"NOT_DEFINED": "Non specificato",
"SESSION_EXPIRED": "La sessione è scaduta",
"ANOTHER_DEVICE_CONNECTED": "Un'altro dispositivo ha effettuato l'accesso a mySobrero, per preservare la tua sicurezza questa sessione è stata interrotta. Per continuare ad usare l'app, chiudere e riaprire l'app per effettuare di nuovo l'accesso"
"ANOTHER_DEVICE_CONNECTED": "Un'altro dispositivo ha effettuato l'accesso a mySobrero, per preservare la tua sicurezza questa sessione è stata interrotta. Per continuare ad usare l'app, chiudere e riaprire l'app per effettuare di nuovo l'accesso",
"COVID19_INFO_NOT_ACCEPTED": "Informativa COVID giornaliera non accettata",
"COVID19_INFO_DESC": "Passa ad Axios Web con un account genitore per accettare l'informativa COVID-19 giornaliera ed accedere in Istituto."
}
4 changes: 0 additions & 4 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3C848EC923D0CAA700C7F466 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3C848EC823D0CAA700C7F466 /* GoogleService-Info.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
Expand All @@ -36,7 +35,6 @@
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3C40E7F124CE3DA90023E8EF /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Main.strings; sourceTree = "<group>"; };
3C40E7F224CE3DA90023E8EF /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
3C848EC823D0CAA700C7F466 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
4585BB718130C1782D6F08D0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
4DFA0AEFA417E7A1A7964145 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -100,7 +98,6 @@
children = (
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
3C848EC823D0CAA700C7F466 /* GoogleService-Info.plist */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
Expand Down Expand Up @@ -204,7 +201,6 @@
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
3C848EC923D0CAA700C7F466 /* GoogleService-Info.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
Expand Down
38 changes: 0 additions & 38 deletions ios/Runner/GoogleService-Info.plist

This file was deleted.

40 changes: 39 additions & 1 deletion lib/app_main/app_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import 'package:mySobrero/ui/helper.dart';
import 'package:mySobrero/ui/layouts.dart';
import 'package:mySobrero/ui/user_header.dart';


class Homepage extends StatefulWidget {
SobreroFeed feed;
SwitchPageCallback switchPageCallback;
Expand Down Expand Up @@ -208,6 +207,45 @@ class _HomepageState extends State<Homepage>
course: reAPI4.instance.getStartupCache().user.course,
profileURL: globals.profileURL,
),
/// Avviso COVID non firmato
ExpandedSection(
expand: reAPI4.instance.getStartupCache().covid19info.data_accettazione == null,
child: Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Image.asset(
"assets/images/covid_alert.png",
width: 27,
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppLocalizations.of(context).translate("COVID19_INFO_NOT_ACCEPTED"),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Color(0xffFF4B2B),
),
),
Text(
AppLocalizations.of(context).translate("COVID19_INFO_DESC"),
style: TextStyle(
color: Color(0xffFF4B2B),
),
),
],
),
),
],
),
)
),
/// Intestazione remota
ExpandedSection(
expand: _remoteNotice.headingNewsEnabled,
Expand Down
2 changes: 1 addition & 1 deletion lib/app_main/app_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'package:flutter/services.dart';
import 'package:animations/animations.dart';

import 'package:mySobrero/app_main/app_home.dart';

import 'package:mySobrero/app_main/more.dart';
import 'package:mySobrero/app_main/votes.dart';
import 'package:mySobrero/app_main/communications.dart';
Expand All @@ -26,6 +25,7 @@ import 'package:mySobrero/ui/helper.dart';
import 'package:mySobrero/ui/layouts.dart';
import 'package:mySobrero/ui/sobrero_appbar.dart';
import 'package:mySobrero/ui/drawer.dart';

import 'package:flutter_tabler_icons/flutter_tabler_icons.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tutorial_coach_mark/animated_focus_light.dart';
Expand Down
Binary file modified lib/reAPI/reapi.dart.enc
Binary file not shown.
33 changes: 33 additions & 0 deletions lib/reAPI/types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// found in the LICENSE file.

import 'package:flutter/foundation.dart';
import 'dart:convert';


class REAPIException implements Exception {
Expand All @@ -17,6 +18,7 @@ class StartupData {
List<Mark> marks_firstperiod, marks_finalperiod;
List<Notice> notices;
List<Assignment> assignments;
COVID19Info covid19info;
}

class User {
Expand Down Expand Up @@ -184,6 +186,37 @@ class File {
File({@required this.name, @required this.url});
}

class COVID19Info {
String fam_enabled;
String fam_required;
String fam_file;
String fam_pin;
String fam_text;
String fam_url;
String data_accettazione;

COVID19Info({
this.fam_enabled,
this.fam_required,
this.fam_file,
this.fam_pin,
this.fam_text,
this.fam_url,
this.data_accettazione
});

COVID19Info.fromJSON(Map<String, dynamic> json) {
fam_enabled = json["fam_enabled"];
fam_required = json["fam_required"];
fam_file = json["fam_file"];
fam_pin = json["fam_pin"];
fam_text = utf8.decode(base64.decode(json["fam_text"]));
fam_url = json["fam_url"];
data_accettazione = json["data_accettazione"];
}

}




Expand Down
4 changes: 0 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ dependencies:
fl_chart: ^0.6.3
intl: ^0.16.1
shared_preferences: ^0.5.6
#firebase_core: ^0.4.0+9
#firebase_analytics: ^5.0.9
#firebase_messaging: ^6.0.9
#firebase_crashlytics: ^0.1.2+4
local_auth: ^0.6.1
auto_size_text: ^2.1.0
cached_network_image: ^2.0.0
Expand Down

0 comments on commit c789be0

Please sign in to comment.