diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj
index 2325a68ae..5854d2b87 100644
--- a/ios/App/App.xcodeproj/project.pbxproj
+++ b/ios/App/App.xcodeproj/project.pbxproj
@@ -489,7 +489,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 5;
+ CURRENT_PROJECT_VERSION = 81;
DEVELOPMENT_TEAM = 94BRNM2LSS;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = App/Info.plist;
@@ -498,7 +498,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.2;
+ MARKETING_VERSION = 3.1;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -516,7 +516,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 5;
+ CURRENT_PROJECT_VERSION = 81;
DEVELOPMENT_TEAM = 94BRNM2LSS;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = App/Info.plist;
@@ -525,7 +525,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.2;
+ MARKETING_VERSION = 3.1;
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-1024.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-1024.png
new file mode 100644
index 000000000..b85ec353d
Binary files /dev/null and b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-1024.png differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png
deleted file mode 100644
index 2f503741c..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png
deleted file mode 100644
index dd72c1ce8..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png
deleted file mode 100644
index dd72c1ce8..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png
deleted file mode 100644
index 7fbf0a84a..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png
deleted file mode 100644
index f996ea18f..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png
deleted file mode 100644
index bb2935fb7..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png
deleted file mode 100644
index bb2935fb7..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png
deleted file mode 100644
index 21d16e5b1..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png
deleted file mode 100644
index dd72c1ce8..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png
deleted file mode 100644
index ff0754519..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png
deleted file mode 100644
index ff0754519..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png
deleted file mode 100644
index 3401fa887..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
deleted file mode 100644
index adf6ba01d..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png
deleted file mode 100644
index ffd0da781..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png
deleted file mode 100644
index 90aea7cd2..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png
deleted file mode 100644
index 2f5eafb6b..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png
deleted file mode 100644
index 89c8d0448..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png b/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png
deleted file mode 100644
index ef541c90a..000000000
Binary files a/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png and /dev/null differ
diff --git a/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json
index 90eea7ec7..f22e10cde 100644
--- a/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,116 +1,14 @@
{
"images" : [
{
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "AppIcon-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "AppIcon-20x20@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "AppIcon-29x29@2x-1.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "AppIcon-29x29@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "AppIcon-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "AppIcon-40x40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "AppIcon-60x60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "AppIcon-60x60@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "AppIcon-20x20@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "AppIcon-20x20@2x-1.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "AppIcon-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "AppIcon-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "AppIcon-40x40@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "AppIcon-40x40@2x-1.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "AppIcon-76x76@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "AppIcon-76x76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "AppIcon-83.5x83.5@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "1024x1024",
- "idiom" : "ios-marketing",
- "filename" : "AppIcon-512@2x.png",
- "scale" : "1x"
+ "filename" : "AppIcon-1024.png",
+ "idiom" : "universal",
+ "platform" : "ios",
+ "size" : "1024x1024"
}
],
"info" : {
- "version" : 1,
- "author" : "xcode"
+ "author" : "xcode",
+ "version" : 1
}
-}
\ No newline at end of file
+}
diff --git a/ios/App/App/Assets.xcassets/Contents.json b/ios/App/App/Assets.xcassets/Contents.json
index da4a164c9..73c00596a 100644
--- a/ios/App/App/Assets.xcassets/Contents.json
+++ b/ios/App/App/Assets.xcassets/Contents.json
@@ -1,6 +1,6 @@
{
"info" : {
- "version" : 1,
- "author" : "xcode"
+ "author" : "xcode",
+ "version" : 1
}
-}
\ No newline at end of file
+}
diff --git a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png
index 33ea6c970..07a32962e 100644
Binary files a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png and b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png differ
diff --git a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png
index 33ea6c970..07a32962e 100644
Binary files a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png and b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png differ
diff --git a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png
index 33ea6c970..07a32962e 100644
Binary files a/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png and b/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png differ
diff --git a/ios/App/App/Info.plist b/ios/App/App/Info.plist
index a3dc95ea3..97818e13d 100644
--- a/ios/App/App/Info.plist
+++ b/ios/App/App/Info.plist
@@ -2,82 +2,76 @@
- 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
-
- NSAppTransportSecurity
-
- NSAllowsArbitraryLoads
-
- NSAllowsArbitraryLoadsForMedia
-
- NSAllowsArbitraryLoadsInWebContent
-
- NSAllowsLocalNetworking
-
-
- 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
-
+ 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
+
+
diff --git a/ios/App/Share/Info.plist b/ios/App/Share/Info.plist
index 1bc711114..7beb8da40 100644
--- a/ios/App/Share/Info.plist
+++ b/ios/App/Share/Info.plist
@@ -14,30 +14,19 @@
NSExtensionAttributes
NSExtensionActivationRule
- TRUEPREDICATE
+
+ NSExtensionActivationSupportsImageWithMaxCount
+ 1
+ NSExtensionActivationSupportsMovieWithMaxCount
+ 1
+ NSExtensionActivationSupportsWebURLWithMaxCount
+ 1
+
NSExtensionMainStoryboard
MainInterface
NSExtensionPointIdentifier
com.apple.share-services
- NSExtensionAttributes
-
- NSExtensionActivationRule
-
- NSExtensionActivationSupportsFileWithMaxCount
- 5
- NSExtensionActivationSupportsImageWithMaxCount
- 5
- NSExtensionActivationSupportsMovieWithMaxCount
- 5
- NSExtensionActivationSupportsText
-
- NSExtensionActivationSupportsWebPageWithMaxCount
- 1
- NSExtensionActivationSupportsWebURLWithMaxCount
- 1
-
-
diff --git a/src/app/pages/agenda/edit-event/edit-event.page.html b/src/app/pages/agenda/edit-event/edit-event.page.html
index 2873f7c2f..9d211078a 100644
--- a/src/app/pages/agenda/edit-event/edit-event.page.html
+++ b/src/app/pages/agenda/edit-event/edit-event.page.html
@@ -135,7 +135,7 @@
-
+
Todo dia
@@ -144,7 +144,7 @@
-
+
@@ -164,7 +164,9 @@
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
- [touchUi]="touchUi">
+ [touchUi]="touchUi"
+ [hideTime]="true">
+
@@ -172,6 +174,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+
+
+
+
+
+
@@ -193,7 +255,8 @@
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
- [stepSecond]="stepSecond">
+ [stepSecond]="stepSecond"
+ [hideTime]="false">
diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts
index 04f8d0ddb..250b37cea 100644
--- a/src/app/pages/agenda/edit-event/edit-event.page.ts
+++ b/src/app/pages/agenda/edit-event/edit-event.page.ts
@@ -108,8 +108,6 @@ export class EditEventPage implements OnInit {
this.isEventEdited = false;
/* this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''}; */
this.postEvent = this.navParams.get('event');
- this.postEvent.StartDate = new Date(this.ajustMinuts(this.postEvent.StartDate))
- this.postEvent.EndDate = new Date(this.ajustMinuts(this.postEvent.EndDate))
this.caller = this.navParams.get('caller');
this.initCalendarName = this.postEvent.CalendarName;
@@ -405,6 +403,7 @@ export class EditEventPage implements OnInit {
this.httpErrorHandle.httpStatusHandle(error)
});
} else {
+ console.log('edid calendar id',this.postEvent.CalendarId);
this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => {
if (window['reloadCalendar']) {
@@ -643,26 +642,17 @@ export class EditEventPage implements OnInit {
}
- ajustMinuts(string) {
- var partes = string.split(' ');
- var horaMinuto = partes[1].split(':');
- if (horaMinuto[1] === '59') {
- horaMinuto[1] = '00';
- var novaString = partes[0] + ' ' + horaMinuto.join(':');
-
- return novaString;
- }
- return string;
- }
-
onCheckboxChange(event: any) {
+ console.log(this.postEvent.CalendarId)
if (this.allDayCheck) {
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
+ this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
console.log('Recurso ativado!!');
} else {
this.postEvent.IsAllDayEvent = this.allDayCheck;
+ this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
console.log('Recurso desativado');
}
@@ -676,6 +666,28 @@ export class EditEventPage implements OnInit {
date.setSeconds(0);
+ return date
+ }
+
+ setAlldayTimeEndDate(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(23)
+ date.setMinutes(59)
+ date.setSeconds(0);
+
+
+ return date
+ }
+
+ setAlldayTimeEndDateNotAlday(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(23)
+ date.setMinutes(0)
+ date.setSeconds(0);
+
+
return date
}
}
diff --git a/src/app/pages/agenda/new-event/new-event.page.html b/src/app/pages/agenda/new-event/new-event.page.html
index 8a71d5f0e..5b638751a 100644
--- a/src/app/pages/agenda/new-event/new-event.page.html
+++ b/src/app/pages/agenda/new-event/new-event.page.html
@@ -129,7 +129,7 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts
index 4235073ba..dce9c8b2d 100644
--- a/src/app/pages/agenda/new-event/new-event.page.ts
+++ b/src/app/pages/agenda/new-event/new-event.page.ts
@@ -11,7 +11,6 @@ import { ToastService } from 'src/app/services/toast.service';
import { Event } from '../../../models/event.model';
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
import { SearchPage } from '../../search/search.page';
-import { ThemePalette } from '@angular/material/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ThemeService } from 'src/app/services/theme.service';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
@@ -25,6 +24,9 @@ import { TaskService } from 'src/app/services/task.service'
import { ContactsService } from 'src/app/services/contacts.service';
import { DomSanitizerService } from 'src/app/services/DomSanitizer.service';
import { momentG } from 'src/plugin/momentG';
+import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, ThemePalette } from '@angular/material/core';
+import { MatDatepickerModule } from '@angular/material/datepicker';
+import { MomentDateAdapter } from '@angular/material-moment-adapter';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -37,12 +39,25 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
monthYearA11yLabel: "MMMM YYYY"
}
}
+const MY_DATE_FORMAT = {
+ parse: {
+ dateInput: 'DD-MM-YYYY',
+ },
+ display: {
+ dateInput: 'DD/MM/YYYY',
+ monthYearLabel: 'MMMM YYYY',
+ dateA11yLabel: 'LL',
+ monthYearA11yLabel: 'MMMM YYYY'
+ }
+};
@Component({
selector: 'app-new-event',
templateUrl: './new-event.page.html',
styleUrls: ['./new-event.page.scss'],
providers: [
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
+ { provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE] },
+{ provide: MAT_DATE_FORMATS, useValue: MY_DATE_FORMAT }
]
})
@@ -114,7 +129,8 @@ export class NewEventPage implements OnInit {
private processeService: ProcessesService,
public TaskService: TaskService,
private contactsService: ContactsService,
- private domSanitazerService: DomSanitizerService
+ private domSanitazerService: DomSanitizerService,
+ private dateAdapter: DateAdapter
) {
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
@@ -883,10 +899,12 @@ export class NewEventPage implements OnInit {
if (this.allDayCheck) {
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
+ this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
console.log('Recurso ativado!!');
} else {
this.postEvent.IsAllDayEvent = this.allDayCheck;
+ this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
console.log('Recurso desativado');
}
@@ -900,6 +918,28 @@ export class NewEventPage implements OnInit {
date.setSeconds(0);
+ return date
+ }
+
+ setAlldayTimeEndDate(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(23)
+ date.setMinutes(59)
+ date.setSeconds(0);
+
+
+ return date
+ }
+
+ setAlldayTimeEndDateNotAlday(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(23)
+ date.setMinutes(0)
+ date.setSeconds(0);
+
+
return date
}
}
diff --git a/src/app/pages/publications/new-publication/new-publication.page.html b/src/app/pages/publications/new-publication/new-publication.page.html
index 4ea5b0adc..a091392c3 100644
--- a/src/app/pages/publications/new-publication/new-publication.page.html
+++ b/src/app/pages/publications/new-publication/new-publication.page.html
@@ -44,7 +44,7 @@
(click)="imageSize(capturedImage)" style="height: 69px;">
diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts
index 7581ea20c..86b6814c1 100644
--- a/src/app/pages/publications/new-publication/new-publication.page.ts
+++ b/src/app/pages/publications/new-publication/new-publication.page.ts
@@ -250,8 +250,6 @@ export class NewPublicationPage implements OnInit {
this.video = data[0];
console.log('video record', data)
data.forEach(async element => {
- Capacitor.convertFileSrc(element.fullPath);
- console.log('convert url', (Capacitor.convertFileSrc(element.fullPath)));
this.filesSizeSum = this.filesSizeSum + element.size
if (this.fileSizeToMB(this.filesSizeSum) <= 20) {
@@ -259,7 +257,7 @@ export class NewPublicationPage implements OnInit {
if (this.platform.is('ios')) {
this.recordevideoIos(element.fullPath)
} else {
-
+ this.recordVideoAndroid(element.fullPath)
}
} catch (e) {
@@ -286,7 +284,7 @@ export class NewPublicationPage implements OnInit {
multiple: true,
});
console.log(result.files)
- result.files.forEach(element => {
+ result.files.forEach(async element => {
this.filesSizeSum = this.filesSizeSum + element.size
if (this.fileSizeToMB(this.filesSizeSum) <= 20) {
@@ -296,30 +294,13 @@ export class NewPublicationPage implements OnInit {
console.log('pass type verification ', resultUrl)
try {
- Filesystem.readFile({ path: resultUrl })
- .then(async (content) => {
- console.log(result)
- console.log(content)
- this.filecontent = true;
- let fileObject;
- if (this.removeTextBeforeSlash(element.mimeType, '/') == "mp4") {
- fileObject = {
- FileBase64: 'data:video/mp4;base64,' + content.data,
- FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
- OriginalFileName: 'video'
- }
- } else {
- fileObject = {
- FileBase64: content.data,
- FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
- OriginalFileName: 'image'
- }
- }
+ if(this.platform.is('ios')) {
+ this.recordevideoIos(resultUrl)
+ } else {
+ this.loadVideoAndroid(resultUrl,element)
+ }
- this.seletedContent.push(fileObject)
- })
- .catch((err) => console.error(err));
} catch (error) {
console.log('upload video error: ', error)
}
@@ -768,6 +749,16 @@ export class NewPublicationPage implements OnInit {
let FileExtension = this.removeTextBeforeSlash(element.title, '.')
if (this.checkFileType.checkFileType(FileExtension) == 'image' || this.checkFileType.checkFileType(FileExtension) == 'video') {
let resultUrl = decodeURIComponent(element.url);
+
+ if(this.platform.is('ios')) {
+ const stringGerada = this.gerarStringAleatoria();
+console.log(stringGerada);
+ this.shareContentIso(resultUrl,FileExtension,stringGerada)
+ } else {
+ this.shareContentAndroid(resultUrl,FileExtension)
+ }
+
+/*
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
let fileObject;
try {
@@ -793,7 +784,7 @@ export class NewPublicationPage implements OnInit {
console.log('error shared filesystem', error)
}
- })
+ }) */
} else {
this.httpErrorHandle.validationMessagge('filetype');
}
@@ -813,41 +804,67 @@ export class NewPublicationPage implements OnInit {
}
closeApp() {
- if (this.platform.is('android'))
+ if (this.platform.is('android')) {
App.exitApp()
+ } else {
+ window["sharedContent"] = null
+ }
+
}
async recordevideoIos(fullPath) {
+ console.log('fullpath', fullPath)
try {
const directory = await Filesystem.getUri({
directory: Directory.Cache,
path: '',
});
- this.videoconvertService.convertVideo(fullPath,directory.uri,'mp4');
+ const stringGerada = this.gerarStringAleatoria();
+console.log(stringGerada);
+ let fileObject ={};
+ this.videoconvertService.convertVideo(fullPath,directory.uri,stringGerada,'mp4').then(async () => {
+ await Filesystem.readFile({ path: `${directory.uri}${stringGerada}.mp4`})
- Filesystem.readFile({ path: `${directory.uri}output.mp4`})
+ .then(async (content) => {
+ this.filecontent = true;
+ fileObject = {}
+ console.log('First clean',fileObject)
+ fileObject = {
+ FileBase64: 'data:video/mp4;base64,' + content.data,
+ FileExtension: 'mp4',
+ OriginalFileName: stringGerada
+ }
+ console.log('what do we have',fileObject)
+ this.seletedContent.push(fileObject)
+ console.log('file object 1',fileObject)
+ fileObject ={};
+ const deleteSecretFile = async () => {
+ await Filesystem.deleteFile({
+ path: 'output.mp4',
+ directory: Directory.Cache,
+ });
+ };
+ await deleteSecretFile().then((value) => {
+ console.log('delete file',value)
+ fileObject ={};
+ console.log('file object 2',fileObject)
+ })
+ })
+ .catch((erro) => console.error('read converted video erro ', erro));
+ });
- .then(async (content) => {
- console.log(content.data)
- this.filecontent = true;
- let fileObject = {
- FileBase64: 'data:video/mp4;base64,' + content.data,
- FileExtension: 'mp4',
- OriginalFileName: 'video'
- }
- this.seletedContent.push(fileObject)
- })
- .catch((erro) => console.error('read converted video erro ', erro));
+
} catch (error) {
console.log('record video ios erro, ', error)
}
}
async recordVideoAndroid(fullPath) {
+
try {
const savedFile = await Filesystem.copy({
- from: Capacitor.convertFileSrc(fullPath),
+ from: fullPath,
to: "video.mp4",
toDirectory: FilesystemDirectory.Data
});
@@ -870,5 +887,147 @@ export class NewPublicationPage implements OnInit {
}
}
+ loadVideoIso() {
+
+ }
+
+ loadVideoAndroid(resultUrl,element) {
+ Filesystem.readFile({ path: resultUrl })
+
+ .then(async (content) => {
+ console.log(content)
+ this.filecontent = true;
+ let fileObject;
+ if (this.removeTextBeforeSlash(element.mimeType, '/') == "mp4") {
+ fileObject = {
+ FileBase64: 'data:video/mp4;base64,' + content.data,
+ FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
+ OriginalFileName: 'video'
+ }
+ } else {
+ fileObject = {
+ FileBase64: content.data,
+ FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
+ OriginalFileName: 'image'
+ }
+ }
+
+ this.seletedContent.push(fileObject)
+ })
+ .catch((err) => console.error(err));
+
+ }
+
+ gerarStringAleatoria() {
+ const caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
+ let stringAleatoria = '';
+
+ for (let i = 0; i < 4; i++) {
+ const indiceAleatorio = Math.floor(Math.random() * caracteres.length);
+ stringAleatoria += caracteres.charAt(indiceAleatorio);
+ }
+
+ return stringAleatoria;
+ }
+
+ async shareContentIso(fullPath,FileExtension,filename) {
+ try {
+
+ if (this.checkFileType.checkFileType(FileExtension) == 'image') {
+
+ Filesystem.readFile({ path: fullPath }).then(async (content) => {
+ let fileObject;
+ try {
+ fileObject = {
+ FileBase64: this.removeTextBeforeSlash(content.data, ','),
+ FileExtension: FileExtension,
+ OriginalFileName: 'shared',
+ }
+ console.log('shared base', content.data)
+
+ this.seletedContent.push(fileObject)
+ } catch (error) {
+ console.log('error shared filesystem', error)
+ }
+
+ })
+ } else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
+ const directory = await Filesystem.getUri({
+ directory: Directory.Cache,
+ path: '',
+ });
+
+ let fileObject ={};
+ this.videoconvertService.convertVideo(fullPath,directory.uri,filename,'mp4').then(() => {
+ Filesystem.readFile({ path: `${directory.uri}output.mp4`})
+
+ .then(async (content) => {
+ console.log(content.data)
+ this.filecontent = true;
+ fileObject = {
+ FileBase64: this.removeTextBeforeSlash(content.data, ','),
+ FileExtension: FileExtension,
+ OriginalFileName: 'shared',
+ }
+ fileObject = {
+ FileBase64: 'data:video/mp4;base64,' + this.removeTextBeforeSlash(content.data, ','),
+ FileExtension: FileExtension,
+ OriginalFileName: 'shared',
+ }
+ this.seletedContent.push(fileObject)
+ fileObject ={};
+ const deleteSecretFile = async () => {
+ await Filesystem.deleteFile({
+ path: 'output.mp4',
+ directory: Directory.Cache,
+ });
+ };
+ deleteSecretFile().then((value) => {
+ console.log('delete file',value)
+ fileObject ={};
+ })
+ })
+ .catch((erro) => console.error('read converted video erro ', erro));
+ });
+
+ }
+
+
+ } catch (error) {
+ console.log('record video ios erro, ', error)
+ }
+ }
+
+ shareContentAndroid(resultUrl,FileExtension) {
+
+ Filesystem.readFile({ path: resultUrl }).then(async (content) => {
+ let fileObject;
+ try {
+ if (this.checkFileType.checkFileType(FileExtension) == 'image') {
+ fileObject = {
+ FileBase64: this.removeTextBeforeSlash(content.data, ','),
+ FileExtension: FileExtension,
+ OriginalFileName: 'shared',
+ }
+
+ } else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
+ fileObject = {
+ FileBase64: 'data:video/mp4;base64,' + this.removeTextBeforeSlash(content.data, ','),
+ FileExtension: FileExtension,
+ OriginalFileName: 'shared',
+ }
+
+ }
+ console.log('shared base', content.data)
+
+ this.seletedContent.push(fileObject)
+ } catch (error) {
+ console.log('error shared filesystem', error)
+ }
+
+ })
+
+ }
+
}
diff --git a/src/app/pages/publications/view-publications/view-publications.page.html b/src/app/pages/publications/view-publications/view-publications.page.html
index fec91d0e3..eeb82b286 100644
--- a/src/app/pages/publications/view-publications/view-publications.page.html
+++ b/src/app/pages/publications/view-publications/view-publications.page.html
@@ -47,7 +47,7 @@
-
+
![]()
@@ -65,7 +65,7 @@
-->
-
+
{{publication.Title}}
diff --git a/src/app/services/checkFileType.service.ts b/src/app/services/checkFileType.service.ts
index a8038130c..e0168d542 100644
--- a/src/app/services/checkFileType.service.ts
+++ b/src/app/services/checkFileType.service.ts
@@ -18,7 +18,7 @@ export class checkFileTypeService {
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp','tiff','tif',
'image/jpg', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp','image/tiff','image/tif', 'image/*']; // Add more if needed
const videoExtensions = ['mp4', 'webm', 'mpg', 'mpeg', 'ogg',
- 'video/mp4', 'video/webm', 'video/mpg', 'video/mpeg', 'video/ogg','video/quicktime', 'video/*']; // Add more if needed
+ 'video/mp4', 'video/webm', 'video/mpg', 'video/mpeg', 'video/ogg','video/quicktime','MOV','mov', 'video/*']; // Add more if needed
// Check if it's an image
if (imageExtensions.includes(lowerCaseType)) {
diff --git a/src/app/services/processes.service.ts b/src/app/services/processes.service.ts
index 397e75ce2..46fb847fc 100644
--- a/src/app/services/processes.service.ts
+++ b/src/app/services/processes.service.ts
@@ -51,7 +51,6 @@ export class ProcessesService {
this.headers2 = new HttpHeaders();;
this.headers2 = this.headers2.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
-
}
uploadFile(formData: any) {
diff --git a/src/app/services/videoconvert.service.ts b/src/app/services/videoconvert.service.ts
index d4ef617ae..0dce197b0 100644
--- a/src/app/services/videoconvert.service.ts
+++ b/src/app/services/videoconvert.service.ts
@@ -10,11 +10,12 @@ export class VideoconvertService {
private ffmpeg: FFMpeg
) { }
- async convertVideo(inputPath, outputPath, formart) {
- const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}output.${formart}"`;
+ async convertVideo(inputPath, outputPath,filename, formart) {
+ const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}${filename}.${formart}"`;
const result = await this.ffmpeg.exec(ffmpegCommand)
- console.log('Convert returns ', `${outputPath}output.${formart}`);
+ console.log('Convert returns ', `${outputPath}${filename}.${formart}`);
}
+
}
diff --git a/src/app/shared/agenda/edit-event/edit-event.page.html b/src/app/shared/agenda/edit-event/edit-event.page.html
index 30eec93b3..6307f2797 100644
--- a/src/app/shared/agenda/edit-event/edit-event.page.html
+++ b/src/app/shared/agenda/edit-event/edit-event.page.html
@@ -124,6 +124,15 @@
+
+
@@ -135,7 +144,7 @@
[(ngModel)]="_postEvent.StartDate" [max]="maxDate" [disabled]="disabled">
+ [stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" [touchUi]="touchUi" [hideTime]="true">
@@ -143,7 +152,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -155,7 +184,27 @@
[max]="maxDate" [disabled]="disabled" [min]="_postEvent.StartDate">
+ [stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" [hideTime]="true">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/shared/agenda/edit-event/edit-event.page.ts b/src/app/shared/agenda/edit-event/edit-event.page.ts
index f1b0a3e2a..b7c558d8b 100644
--- a/src/app/shared/agenda/edit-event/edit-event.page.ts
+++ b/src/app/shared/agenda/edit-event/edit-event.page.ts
@@ -93,6 +93,7 @@ export class EditEventPage implements OnInit {
CalendarNameOwnerName = ''
CalendarNamesOptions = []
+ allDayCheck: boolean = false;
constructor(
private modalController: ModalController,
@@ -107,8 +108,7 @@ export class EditEventPage implements OnInit {
ngOnInit() {
this._postEvent = this.postEvent
- this.postEvent.StartDate = new Date(this.ajustMinuts(this.postEvent.StartDate))
- this.postEvent.EndDate = new Date(this.ajustMinuts(this.postEvent.EndDate))
+ this.allDayCheck = this.postEvent.IsAllDayEvent;
if(!this.restoreTemporaryData()) {
// clear
@@ -584,16 +584,53 @@ export class EditEventPage implements OnInit {
}
- ajustMinuts(string) {
- var partes = string.split(' ');
- var horaMinuto = partes[1].split(':');
- if (horaMinuto[1] === '59') {
- horaMinuto[1] = '00';
- var novaString = partes[0] + ' ' + horaMinuto.join(':');
-
- return novaString;
+ onCheckboxChange(event: any) {
+ console.log(this.postEvent.CalendarId)
+ if (this.allDayCheck) {
+ this.postEvent.IsAllDayEvent = this.allDayCheck;
+ this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
+ this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
+
+ console.log('Recurso ativado!!');
+ } else {
+ this.postEvent.IsAllDayEvent = this.allDayCheck;
+ this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
+ console.log('Recurso desativado');
+
+ }
}
- return string;
+
+ setAlldayTime(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(0)
+ date.setMinutes(0)
+ date.setSeconds(0);
+
+
+ return date
+ }
+
+ setAlldayTimeEndDate(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(23)
+ date.setMinutes(59)
+ date.setSeconds(0);
+
+
+ return date
+ }
+
+ setAlldayTimeEndDateNotAlday(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(23)
+ date.setMinutes(0)
+ date.setSeconds(0);
+
+
+ return date
}
}
diff --git a/src/app/shared/agenda/new-event/new-event.page.html b/src/app/shared/agenda/new-event/new-event.page.html
index a0c124df4..166cf8a45 100644
--- a/src/app/shared/agenda/new-event/new-event.page.html
+++ b/src/app/shared/agenda/new-event/new-event.page.html
@@ -124,6 +124,15 @@
+
+
@@ -144,6 +153,7 @@
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
[touchUi]="touchUi"
+ [hideTime]="true"
>
@@ -152,7 +162,37 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -175,6 +215,39 @@
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
+ [hideTime]="true"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts
index 0a8cefb74..1405b6c7d 100644
--- a/src/app/shared/agenda/new-event/new-event.page.ts
+++ b/src/app/shared/agenda/new-event/new-event.page.ts
@@ -135,6 +135,7 @@ export class NewEventPage implements OnInit {
environment = environment
eventPersons: EventPerson[];
contacts: EventPerson[] = [];
+ allDayCheck: boolean = false;
constructor(
private modalController: ModalController,
@@ -1044,5 +1045,53 @@ console.log(this.loggeduser.Profile)
}
}
+ onCheckboxChange(event: any) {
+ if (this.allDayCheck) {
+ this.postEvent.IsAllDayEvent = this.allDayCheck;
+ this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
+ this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
+
+ console.log('Recurso ativado!!');
+ } else {
+ this.postEvent.IsAllDayEvent = this.allDayCheck;
+ this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
+ console.log('Recurso desativado');
+
+ }
+ }
+
+ setAlldayTime(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(0)
+ date.setMinutes(0)
+ date.setSeconds(0);
+
+
+ return date
+ }
+
+ setAlldayTimeEndDate(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(23)
+ date.setMinutes(59)
+ date.setSeconds(0);
+
+
+ return date
+ }
+
+ setAlldayTimeEndDateNotAlday(timeToReturn) {
+ let date: any = new Date(timeToReturn) || new Date();
+ let newdate = new Date();
+ date.setHours(23)
+ date.setMinutes(0)
+ date.setSeconds(0);
+
+
+ return date
+ }
+
}
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 35ab80390..20e1a0db1 100644
--- a/src/app/shared/publication/new-publication/new-publication.page.ts
+++ b/src/app/shared/publication/new-publication/new-publication.page.ts
@@ -763,7 +763,10 @@ export class NewPublicationPage implements OnInit {
path: '',
});
- this.videoconvertService.convertVideo(fullPath,directory.uri,'mp4');
+ const stringGerada = this.gerarStringAleatoria();
+console.log(stringGerada);
+
+ this.videoconvertService.convertVideo(fullPath,directory.uri,stringGerada,'mp4');
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
@@ -814,6 +817,18 @@ export class NewPublicationPage implements OnInit {
}
}
+
+ gerarStringAleatoria() {
+ const caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
+ let stringAleatoria = '';
+
+ for (let i = 0; i < 4; i++) {
+ const indiceAleatorio = Math.floor(Math.random() * caracteres.length);
+ stringAleatoria += caracteres.charAt(indiceAleatorio);
+ }
+
+ return stringAleatoria;
+}
}