Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangomz committed Dec 10, 2021
2 parents de2e0b7 + 061ffc9 commit 6ce08d2
Show file tree
Hide file tree
Showing 19 changed files with 369 additions and 120 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# CHANGELOG
All notable changes to this project will be documented in this file.

## 2.2.3 - 2021-12-10 ✅
### Added
- (**Opt**) Student docs 🎉
### Changed
- Shimmer effect for ledger
- Force only minor and major versions updates
- OneSignal package version
### Fixed
- Invert order for movements in the same day for employees ledger at least
- Not entering to the app if no internet connection

## 2.2.2 - 2021-11-29
### Added
- Docs for services
Expand Down
6 changes: 4 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ _**Changes & release dates in versions further from the next release are more li
- Notifications are not marked as received on arrival
- Because that code should be written in native code... F

## 2.2.3 - 2021-12-03 🚧
## 2.2.3 - 2021-12-10 ✅
### Adds
- (**Opt**) Student docs 🎉
### Change
- Shimmer effect for ledger
- Force only minor and major versions updates
- Deprectad splash screen for new way
- OneSignal package version
### Fixes
- Invert order for movements in the same day for employees ledger at least
- Not entering to the app if no internet connection

## 2.2.2 - 2021-11-29 ✅
### Adds
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ end

target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignalXCFramework', '= 3.7.0'
pod 'OneSignalXCFramework', '>= 3.4.3', '< 4.0'
end

post_install do |installer|
Expand Down
14 changes: 7 additions & 7 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ PODS:
- Flutter
- flutter_custom_tabs (0.0.1):
- Flutter
- onesignal_flutter (3.2.3):
- onesignal_flutter (3.2.7):
- Flutter
- OneSignalXCFramework (= 3.7.0)
- OneSignalXCFramework (3.7.0)
- OneSignalXCFramework (= 3.9.1)
- OneSignalXCFramework (3.9.1)
- package_info_plus (0.4.5):
- Flutter
- path_provider (0.0.1):
Expand All @@ -26,7 +26,7 @@ DEPENDENCIES:
- flutter_config (from `.symlinks/plugins/flutter_config/ios`)
- flutter_custom_tabs (from `.symlinks/plugins/flutter_custom_tabs/ios`)
- onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`)
- OneSignalXCFramework (= 3.7.0)
- OneSignalXCFramework (< 4.0, >= 3.4.3)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
Expand Down Expand Up @@ -64,15 +64,15 @@ SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_config: 2226c1df19c78fe34a05eb7f1363445f18e76fc1
flutter_custom_tabs: 7a10a08686955cb748e5d26e0ae586d30689bf89
onesignal_flutter: abfc75e8d08a0d9c977aacfab9454af58f4f4fcc
OneSignalXCFramework: 974dc438d68910cf04f3c8ab034e0131d41438c1
onesignal_flutter: be350169f5b07461e7b1e9c978d8a39908c5cf37
OneSignalXCFramework: 27159b0a150cdfe528c85325215c9d78b2f973c7
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider: d1e9807085df1f9cc9318206cd649dc0b76be3de
shared_preferences: 5033afbb22d372e15aff8ff766df9021b845f273
syncfusion_flutter_pdfviewer: bb9998884b864cfedf72628df3503bdf57e397c0
url_launcher: b6e016d912f04be9f5bf6e8e82dc599b7ba59649
video_player: ecd305f42e9044793efd34846e1ce64c31ea6fcb

PODFILE CHECKSUM: 99365d509a55af430558a41d568eef646ebb286c
PODFILE CHECKSUM: 7ce4868f8f23a4006f1b03860bcb2dd1ba15b1a0

COCOAPODS: 1.11.2
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = CA5M4WA2HG;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
Expand All @@ -681,7 +681,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = mx.edu.um.students.OneSignalNotificationServiceExtension;
Expand All @@ -706,7 +706,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = CA5M4WA2HG;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
Expand All @@ -716,7 +716,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.3;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = mx.edu.um.students.OneSignalNotificationServiceExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -738,7 +738,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = CA5M4WA2HG;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
Expand All @@ -748,7 +748,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.3;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = mx.edu.um.students.OneSignalNotificationServiceExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ummobile/modules/app_bar/modules/questionnaire/bindings/health_questionnaire_bindings.dart';
import 'package:ummobile/modules/app_bar/views/appBar.dart';
import 'package:ummobile/modules/tabs/modules/profile/models/user_credentials.dart';

import 'subpages/health_questionnaire/health_questionnaire.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@ import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ummobile/modules/app_bar/modules/questionnaire/bindings/health_questionnaire_bindings.dart';
import 'package:ummobile/modules/app_bar/modules/questionnaire/views/subpages/health_questionnaire/subpages/answered_page.dart';
import 'package:ummobile/modules/app_bar/modules/questionnaire/views/subpages/responses_list/answered_page_scaffold.dart';
import 'package:ummobile/modules/app_bar/views/appBar.dart';
import 'package:ummobile/modules/login/controllers/login_controller.dart';
import 'package:ummobile/modules/login/controllers/questionnaire_response_controller.dart';
import 'package:ummobile/modules/tabs/modules/profile/models/user_credentials.dart';

import '../health_questionnaire/health_questionnaire.dart';

class HealthQuestionnaireResponses extends StatelessWidget {
final LoginController _login = Get.find<LoginController>();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'package:get/get.dart';
import 'package:ummobile/modules/drawer/modules/portal/documents/controllers/document_images_controller.dart';

class DocumentImagesBinding implements Bindings {
final int documentId;

final int pagesCount;

DocumentImagesBinding(this.documentId, this.pagesCount);

@override
void dependencies() {
Get.lazyPut<DocumentImagesController>(
() => DocumentImagesController(documentId, pagesCount));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import 'package:get/get.dart';
import 'package:ummobile/modules/login/controllers/login_controller.dart';
import 'package:ummobile/statics/templates/controller_template.dart';
import 'package:ummobile_sdk/ummobile_sdk.dart';

class DocumentImagesController extends ControllerTemplate
with StateMixin<List<DocumentPage>> {
/// The document id
final int documentId;

/// The amount of pages in the document
final int pagesCount;

/// The document pages
List<DocumentPage> pages = List<DocumentPage>.empty(growable: true);

DocumentImagesController(this.documentId, this.pagesCount);

Future<UMMobileAcademic> get academicApi async {
String accessToken = await Get.find<LoginController>().token;
return UMMobileAcademic(token: accessToken);
}

@override
void onInit() {
fetchPages();
super.onInit();
}

@override
void refreshContent() {
change(null, status: RxStatus.loading());
fetchPages();
super.refreshContent();
}

void fetchPages() async {
for (int i = 0; i < pagesCount; i++) {
await call<DocumentPage>(
httpCall: () async =>
await (await academicApi).getImagePage(this.documentId, i + 1),
onSuccess: (data) => pages.add(data),
onCallError: (status) => change(null, status: status),
onError: (e) => change(null, status: RxStatus.error(e.toString())),
);
}

if (pages.isNotEmpty) {
change(pages, status: RxStatus.success());
} else {
change(pages, status: RxStatus.empty());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ class DocumentsPage extends GetView<DocumentsController> {
),
];
for (int i = 0; i < archives.length; i++) {
list.add(ButtonDocument(name: archives[i].name));
list.add(ButtonDocument(
id: archives[i].id,
name: archives[i].name,
pagesCount: archives[i].pages.length,
));
}
list.add(SizedBox(
height: 20.0,
));
list.add(
SizedBox(
height: 20.0,
),
);
return list;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ummobile/modules/drawer/modules/portal/documents/controllers/document_images_controller.dart';

class DocumentImages extends StatefulWidget {
/// The document Name
final String documentName;

DocumentImages({required this.documentName});

@override
State<DocumentImages> createState() => _DocumentImagesState();
}

class _DocumentImagesState extends State<DocumentImages> {
final controller = Get.find<DocumentImagesController>();

@override
void dispose() {
Get.delete<DocumentImagesController>();
super.dispose();
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
iconTheme: IconThemeData(color: Colors.white),
title: Text(
widget.documentName,
style: TextStyle(color: Colors.white),
),
backgroundColor: Colors.black,
),
backgroundColor: Colors.black,
body: controller.obx(
(images) => InteractiveViewer(
clipBehavior: Clip.none,
child: ListView(
padding: const EdgeInsets.all(20),
children: images!
.map(
(image) => Image.memory(base64Decode(image.base64Image!)),
)
.toList(),
),
),
onEmpty: Center(
child: Text(
"No existen imágenes para este documento",
style: TextStyle(
color: Colors.white,
),
),
),
),
);
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ummobile/modules/drawer/modules/portal/documents/bindings/document_images_binding.dart';
import 'package:ummobile/modules/drawer/modules/portal/documents/views/subpages/document_images.dart';
import 'package:ummobile/statics/settings/colors.dart';

class ButtonDocument extends StatelessWidget {
/// The document legal name
final String? name;

ButtonDocument({Key? key, this.name}) : super(key: key);
/// The document id
final int id;

/// The amount of images in the document
final int pagesCount;

ButtonDocument({
Key? key,
this.name,
required this.id,
required this.pagesCount,
}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -36,9 +50,10 @@ class ButtonDocument extends StatelessWidget {
),
)
]),
onPressed: () {
print('no image available');
},
onPressed: () => Get.to(
() => DocumentImages(documentName: name!),
binding: DocumentImagesBinding(id, pagesCount),
),
));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class BalancesController extends ControllerTemplate
/// Selects a balance automatically if balances length = 1
void _autoSelectBalance(List<Balance> balances) {
if (balances.length == 1) {
Balance onlyBalance = balances[0];
Balance onlyBalance = balances.first;
balanceSelect(onlyBalance.id, onlyBalance.name, 0);
} else {
Get.find<MovementsController>().displayBalanceSelectPage();
Expand Down
Loading

0 comments on commit 6ce08d2

Please sign in to comment.