diff --git a/ios/App/App/Info.plist b/ios/App/App/Info.plist
index 97818e13d..4854f5059 100644
--- a/ios/App/App/Info.plist
+++ b/ios/App/App/Info.plist
@@ -1,6 +1,95 @@
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleDisplayName
+ Gabinete Digital
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(MARKETING_VERSION)
+ CFBundleURLTypes
+
+
+ CFBundleTypeRole
+ Editor
+ CFBundleURLName
+ com.gpr.gabinetedigital.teste
+ CFBundleURLSchemes
+
+ gabinetedigital
+
+
+
+ CFBundleVersion
+ $(CURRENT_PROJECT_VERSION)
+ LSApplicationCategoryType
+
+ LSRequiresIPhoneOS
+
+ NSCameraUsageDescription
+ This app requires access to the camera.
+ NSMicrophoneUsageDescription
+ This app does not require access to the microphone.
+ NSPhotoLibraryAddUsageDescription
+ This app requires access to the photo library.
+ NSPhotoLibraryUsageDescription
+ This app requires access to the photo library.
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ NSAppTransportSecurity
+
+ NSAllowsArbitraryLoads
+
+
+
+
+ FirebaseAppDelegateProxyEnabled
+
+ UNUserNotificationCenterDelegate
+ YourApp.NotificationDelegate
+ UIBackgroundModes
+
+ remote-notification
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/chat/new-group/new-group.page.ts b/src/app/pages/chat/new-group/new-group.page.ts
index 0786f7a0e..b31738dac 100644
--- a/src/app/pages/chat/new-group/new-group.page.ts
+++ b/src/app/pages/chat/new-group/new-group.page.ts
@@ -6,6 +6,7 @@ import { ThemeService } from 'src/app/services/theme.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { SessionStore } from 'src/app/store/session.service';
import { ToastService } from 'src/app/services/toast.service';
+import { catchError } from 'rxjs/operators';
@Component({
selector: 'app-new-group',
@@ -66,46 +67,72 @@ export class NewGroupPage implements OnInit {
let customFields = {}
let res: any;
- if (this.thedate) {
- let customFields = {
- "countDownDate": this.thedate
- }
- res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
- }
- else {
- res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
+ if(!SessionStore.user?.ChatData?.data) {
+ this.toastService._successMessage("Chat temporariamente indisponível")
}
- this.isGroupCreated = true;
- this.addContacts(res.result);
- this.ChatSystemService.getRoom([res.result]);
+ try {
- setTimeout(() => {
- this.ChatSystemService.subscribeToRoomUpdate(res.result.rid, res.result);
- }, 10)
-
-
-
- if (res?.result?.rid) {
-
- this.ChatSystemService.getAllRooms(() => {
- if (!this.ChatSystemService.getGroupRoom(res.result.rid)) {
- this.createGroupWithAttachmentsCath(res)
- } else {
- setTimeout(() => {
-
- this.createGroupWithAttachments(res)
-
- }, 500)
+ if (this.thedate) {
+ let customFields = {
+ "countDownDate": this.thedate
}
- }, res.result.rid);
+ res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
+ }
+ else {
+ res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
+ }
+
+ try {
+ this.isGroupCreated = true;
+ this.addContacts(res.result);
+ this.ChatSystemService.getRoom([res.result]);
+
+ setTimeout(() => {
+ this.ChatSystemService.subscribeToRoomUpdate(res.result.rid, res.result);
+ }, 10)
+
+ } catch (error) {
+ await this.ChatSystemService.getUser();
+ await this.ChatSystemService.getAllRooms();
+ await this.ChatSystemService.subscribeToRoom();
+
+ this.isGroupCreated = true;
+ this.addContacts(res.result);
+ this.ChatSystemService.getRoom([res.result]);
+
+ setTimeout(() => {
+ this.ChatSystemService.subscribeToRoomUpdate(res.result.rid, res.result);
+ }, 10)
+
+ }
- } else {
+ if (res?.result?.rid) {
- this.toastService._badRequest('Existe um grupo com este nome!');
+ this.ChatSystemService.getAllRooms(() => {
+ if (!this.ChatSystemService.getGroupRoom(res.result.rid)) {
+ this.createGroupWithAttachmentsCath(res)
+ } else {
+ setTimeout(() => {
+ this.createGroupWithAttachments(res)
+
+ }, 500)
+ }
+ }, res.result.rid);
+
+
+
+ } else {
+
+ this.toastService._badRequest('Existe um grupo com este nome!');
+
+ }
+
+ } catch(error) {
+ this.toastService._successMessage("Chat temporariamente indisponível")
}
}
diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts
index bdb56be30..0ce3fde6c 100644
--- a/src/app/services/notifications.service.ts
+++ b/src/app/services/notifications.service.ts
@@ -65,6 +65,7 @@ export class NotificationsService {
}
requestPermissions() {
+ console.log('init notificaton permission')
if (this.platform.is('mobile')) {
if (!this.isPushNotificationsAvailable) {
@@ -72,17 +73,22 @@ export class NotificationsService {
}
PushNotifications.requestPermissions().then(async (result) => {
if (result.receive === 'granted') {
+ console.log('permission granted')
// Register with Apple / Google to receive push via APNS/FCM
try {
- PushNotifications.register().catch((error) => {
- console.log("Register device", error)
+ PushNotifications.register().then((value) => {
+ console.log("Register device", value)
+ this.getAndpostToken("")
+ }) .catch((error) => {
+ console.log("Register device error", error)
})
- this.getAndpostToken("")
+
} catch (error) {
console.log("Granted permission error", error)
}
} else {
// Show some error
+ console.log('permission notification erro')
}
});
} else {
diff --git a/src/app/shared/popover/deploma-options/deploma-options.page.html b/src/app/shared/popover/deploma-options/deploma-options.page.html
index 87e350eda..908c60caa 100644
--- a/src/app/shared/popover/deploma-options/deploma-options.page.html
+++ b/src/app/shared/popover/deploma-options/deploma-options.page.html
@@ -27,7 +27,7 @@
-
diff --git a/src/app/shared/popover/despachos-options/despachos-options.page.scss b/src/app/shared/popover/despachos-options/despachos-options.page.scss
index 46754f488..b18219baf 100644
--- a/src/app/shared/popover/despachos-options/despachos-options.page.scss
+++ b/src/app/shared/popover/despachos-options/despachos-options.page.scss
@@ -60,5 +60,5 @@
.desk{
text-align: left;
- background-color: white;
+ background-color: transparent;
}
diff --git a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.scss b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.scss
index 89b518e17..13ee31a1a 100644
--- a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.scss
+++ b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.scss
@@ -59,5 +59,5 @@
.desk{
text-align: left;
- background-color: white;
+ background-color: transparent;
}
diff --git a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts
index cbcad8e04..227d189de 100644
--- a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts
+++ b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts
@@ -143,6 +143,7 @@ export class OptsExpedientePage implements OnInit {
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
this.toastService._successMessage()
+ this.popoverController.dismiss()
}, (error) => {
this.httpErrorHanlde.httpStatusHandle(error)
},()=> {
@@ -151,7 +152,7 @@ export class OptsExpedientePage implements OnInit {
});
- this.popoverController.dismiss()
+
}
}, (error) => {
diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts
index 3a647365a..9deb62969 100644
--- a/src/app/shared/publication/new-publication/new-publication.page.ts
+++ b/src/app/shared/publication/new-publication/new-publication.page.ts
@@ -181,7 +181,6 @@ export class NewPublicationPage implements OnInit {
FileType: 'image'
}
)
- newAttachment.needUpload()
this.publicationFormMV.form.Files.push(newAttachment)
});
}
@@ -357,8 +356,8 @@ export class NewPublicationPage implements OnInit {
if(upload) {
this.publicationFormMV.form.Files = this.publicationFormMV.form.Files.map((e:PublicationAttachmentEntity)=> {
- if(e.FileType == 'video' && e.toUpload) {
- e.OriginalFileName = e.chucksManager.path.replace(".mp4", "")
+ if(e.FileType == 'video' && e.blobFile && e.toUpload) {
+ e.OriginalFileName = e?.chucksManager?.path?.replace(".mp4", "") || e.OriginalFileName
e.FileExtension = "mp4"
}
return e
@@ -408,7 +407,7 @@ export class NewPublicationPage implements OnInit {
if(upload) {
this.publicationFormMV.form.Files = this.publicationFormMV.form.Files.map((e:PublicationAttachmentEntity) => {
- if(e.FileType == 'video' && e.toUpload) {
+ if(e.FileType == 'video' && e.blobFile && e.toUpload) {
e.OriginalFileName = e.chucksManager.path.replace(".mp4", "")
e.FileExtension = "mp4"
e.Base64 = ""
diff --git a/src/app/shared/publication/upload/upload-streaming.service.ts b/src/app/shared/publication/upload/upload-streaming.service.ts
index e3856a660..a5a995ef1 100644
--- a/src/app/shared/publication/upload/upload-streaming.service.ts
+++ b/src/app/shared/publication/upload/upload-streaming.service.ts
@@ -303,7 +303,7 @@ export class PublicationFormMV {
// this.ObjectMergeNotification.socket.registerWhenConnected(() => {
const videosFiles = this.getVideoFiles()
- const videosFilesToUploads = videosFiles.filter( e => e.FileType == "video" && e.toUpload)
+ const videosFilesToUploads = videosFiles.filter( e => e.FileType == "video" && e.toUpload && e.blobFile)
const Promises: Promise[] = []