Merge branch 'feature/viewer-attachment' of bitbucket.org:equilibriumito/gabinete-digital-fo into feature/viewer-attachment
@@ -489,7 +489,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 5;
|
CURRENT_PROJECT_VERSION = 81;
|
||||||
DEVELOPMENT_TEAM = 94BRNM2LSS;
|
DEVELOPMENT_TEAM = 94BRNM2LSS;
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
INFOPLIST_FILE = App/Info.plist;
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
@@ -498,7 +498,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2;
|
MARKETING_VERSION = 3.1;
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
|
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@@ -516,7 +516,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 5;
|
CURRENT_PROJECT_VERSION = 81;
|
||||||
DEVELOPMENT_TEAM = 94BRNM2LSS;
|
DEVELOPMENT_TEAM = 94BRNM2LSS;
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
INFOPLIST_FILE = App/Info.plist;
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
@@ -525,7 +525,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2;
|
MARKETING_VERSION = 3.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
|
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
||||||
|
|||||||
|
After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 774 B |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,116 +1,14 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"filename" : "AppIcon-1024.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "universal",
|
||||||
"filename" : "AppIcon-20x20@2x.png",
|
"platform" : "ios",
|
||||||
"scale" : "2x"
|
"size" : "1024x1024"
|
||||||
},
|
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
"version" : 1,
|
"author" : "xcode",
|
||||||
"author" : "xcode"
|
"version" : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"info" : {
|
"info" : {
|
||||||
"version" : 1,
|
"author" : "xcode",
|
||||||
"author" : "xcode"
|
"version" : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 250 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 250 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 250 KiB |
@@ -2,82 +2,76 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Gabinete Digital</string>
|
<string>Gabinete Digital</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>$(PRODUCT_NAME)</string>
|
<string>$(PRODUCT_NAME)</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>$(MARKETING_VERSION)</string>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Editor</string>
|
<string>Editor</string>
|
||||||
<key>CFBundleURLName</key>
|
<key>CFBundleURLName</key>
|
||||||
<string>com.gpr.gabinetedigital.teste</string>
|
<string>com.gpr.gabinetedigital.teste</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>gabinetedigital</string>
|
<string>gabinetedigital</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<dict>
|
<string>This app requires access to the camera.</string>
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<true/>
|
<string>This app does not require access to the microphone.</string>
|
||||||
<key>NSAllowsArbitraryLoadsForMedia</key>
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
<true/>
|
<string>This app requires access to the photo library.</string>
|
||||||
<key>NSAllowsArbitraryLoadsInWebContent</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<true/>
|
<string>This app requires access to the photo library.</string>
|
||||||
<key>NSAllowsLocalNetworking</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<true/>
|
<string>LaunchScreen</string>
|
||||||
</dict>
|
<key>UIMainStoryboardFile</key>
|
||||||
<key>NSCameraUsageDescription</key>
|
<string>Main</string>
|
||||||
<string>This app requires access to the camera.</string>
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<array>
|
||||||
<string>This app does not require access to the microphone.</string>
|
<string>armv7</string>
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
</array>
|
||||||
<string>This app requires access to the photo library.</string>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<array>
|
||||||
<string>This app requires access to the photo library.</string>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<key>UILaunchStoryboardName</key>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>LaunchScreen</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
<key>UIMainStoryboardFile</key>
|
</array>
|
||||||
<string>Main</string>
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
<array>
|
||||||
<array>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<string>armv7</string>
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
</array>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
<array>
|
</array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<true/>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<key>NSAppTransportSecurity</key>
|
||||||
</array>
|
<dict>
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
<array>
|
<true/>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
</dict>
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -14,30 +14,19 @@
|
|||||||
<key>NSExtensionAttributes</key>
|
<key>NSExtensionAttributes</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSExtensionActivationRule</key>
|
<key>NSExtensionActivationRule</key>
|
||||||
<string>TRUEPREDICATE</string>
|
<dict>
|
||||||
|
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSExtensionMainStoryboard</key>
|
<key>NSExtensionMainStoryboard</key>
|
||||||
<string>MainInterface</string>
|
<string>MainInterface</string>
|
||||||
<key>NSExtensionPointIdentifier</key>
|
<key>NSExtensionPointIdentifier</key>
|
||||||
<string>com.apple.share-services</string>
|
<string>com.apple.share-services</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSExtensionAttributes</key>
|
|
||||||
<dict>
|
|
||||||
<key>NSExtensionActivationRule</key>
|
|
||||||
<dict>
|
|
||||||
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
|
|
||||||
<integer>5</integer>
|
|
||||||
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
|
|
||||||
<integer>5</integer>
|
|
||||||
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
|
|
||||||
<integer>5</integer>
|
|
||||||
<key>NSExtensionActivationSupportsText</key>
|
|
||||||
<true/>
|
|
||||||
<key>NSExtensionActivationSupportsWebPageWithMaxCount</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div width-100">
|
||||||
<div>
|
<div>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Todo dia</ion-label>
|
<ion-label>Todo dia</ion-label>
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div width-100">
|
<div *ngIf="allDayCheck" class="container-div width-100">
|
||||||
<div class="ion-item-class-2 width-100">
|
<div class="ion-item-class-2 width-100">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
@@ -164,7 +164,9 @@
|
|||||||
[showSeconds]="showSeconds"
|
[showSeconds]="showSeconds"
|
||||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
[stepSecond]="stepSecond"
|
[stepSecond]="stepSecond"
|
||||||
[touchUi]="touchUi">
|
[touchUi]="touchUi"
|
||||||
|
[hideTime]="true">
|
||||||
|
|
||||||
</ngx-mat-datetime-picker>
|
</ngx-mat-datetime-picker>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@@ -172,6 +174,66 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="!allDayCheck" class="container-div width-100">
|
||||||
|
<div class="ion-item-class-2 width-100">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||||
|
|
||||||
|
<mat-form-field appearance="none" floatLabel="never" class="date-hour-picker">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
|
placeholder="Choose a date"
|
||||||
|
[(ngModel)]="postEvent.StartDate"
|
||||||
|
[max]="maxDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #picker1
|
||||||
|
[showSpinners]="showSpinners"
|
||||||
|
[showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
|
[stepSecond]="stepSecond"
|
||||||
|
[touchUi]="touchUi"
|
||||||
|
[hideTime]="false">
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngIf="allDayCheck" class="container-div width-100">
|
||||||
|
<div class="ion-item-class-2 width-100 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||||
|
|
||||||
|
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
|
placeholder="Choose a date"
|
||||||
|
[(ngModel)]="postEvent.EndDate"
|
||||||
|
[min]="postEvent.StartDate"
|
||||||
|
[max]="maxDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #fim
|
||||||
|
[showSpinners]="showSpinners"
|
||||||
|
[showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
|
[stepSecond]="stepSecond"
|
||||||
|
[hideTime]="true">
|
||||||
|
>
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div *ngIf="!allDayCheck" class="container-div width-100">
|
<div *ngIf="!allDayCheck" class="container-div width-100">
|
||||||
<div class="ion-item-class-2 width-100 d-flex">
|
<div class="ion-item-class-2 width-100 d-flex">
|
||||||
@@ -193,7 +255,8 @@
|
|||||||
[showSpinners]="showSpinners"
|
[showSpinners]="showSpinners"
|
||||||
[showSeconds]="showSeconds"
|
[showSeconds]="showSeconds"
|
||||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
[stepSecond]="stepSecond">
|
[stepSecond]="stepSecond"
|
||||||
|
[hideTime]="false">
|
||||||
</ngx-mat-datetime-picker>
|
</ngx-mat-datetime-picker>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|||||||
@@ -108,8 +108,6 @@ export class EditEventPage implements OnInit {
|
|||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
/* this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''}; */
|
/* this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''}; */
|
||||||
this.postEvent = this.navParams.get('event');
|
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.caller = this.navParams.get('caller');
|
||||||
this.initCalendarName = this.postEvent.CalendarName;
|
this.initCalendarName = this.postEvent.CalendarName;
|
||||||
@@ -405,6 +403,7 @@ export class EditEventPage implements OnInit {
|
|||||||
this.httpErrorHandle.httpStatusHandle(error)
|
this.httpErrorHandle.httpStatusHandle(error)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
console.log('edid calendar id',this.postEvent.CalendarId);
|
||||||
this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => {
|
this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => {
|
||||||
|
|
||||||
if (window['reloadCalendar']) {
|
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) {
|
onCheckboxChange(event: any) {
|
||||||
|
console.log(this.postEvent.CalendarId)
|
||||||
if (this.allDayCheck) {
|
if (this.allDayCheck) {
|
||||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||||
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
|
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
|
||||||
|
this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
|
||||||
|
|
||||||
console.log('Recurso ativado!!');
|
console.log('Recurso ativado!!');
|
||||||
} else {
|
} else {
|
||||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||||
|
this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
|
||||||
console.log('Recurso desativado');
|
console.log('Recurso desativado');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -676,6 +666,28 @@ export class EditEventPage implements OnInit {
|
|||||||
date.setSeconds(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
|
return date
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
<div *ngIf="allDayCheck" class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||||
|
|
||||||
<mat-form-field appearance="none" class="date-hour-picker">
|
<mat-form-field appearance="none" class="date-hour-picker">
|
||||||
|
|
||||||
@@ -154,8 +154,42 @@
|
|||||||
|
|
||||||
[stepHour]="1"
|
[stepHour]="1"
|
||||||
[stepMinute]="15"
|
[stepMinute]="15"
|
||||||
[hideTime]="!allDayCheck"
|
[hideTime]="true"
|
||||||
[disabled]="true"
|
|
||||||
|
|
||||||
|
>
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="!allDayCheck" class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||||
|
|
||||||
|
<mat-form-field appearance="none" class="date-hour-picker">
|
||||||
|
|
||||||
|
<!-- <input matInput [matDatepicker]="picker1"
|
||||||
|
placeholder="Data Inicio*"
|
||||||
|
[(ngModel)]="postEvent.StartDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker1></mat-datepicker> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
|
placeholder="Data Inicio*"
|
||||||
|
[(ngModel)]="postEvent.StartDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" ></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #picker1
|
||||||
|
|
||||||
|
[stepHour]="1"
|
||||||
|
[stepMinute]="15"
|
||||||
|
[hideTime]="false"
|
||||||
|
|
||||||
|
|
||||||
>
|
>
|
||||||
</ngx-mat-datetime-picker>
|
</ngx-mat-datetime-picker>
|
||||||
@@ -164,7 +198,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="!allDayCheck" class="container-div">
|
<div *ngIf="!allDayCheck" class="container-div">
|
||||||
<div class="ion-item-class-2 d-flex">
|
<div class="ion-item-class-2 d-flex">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
@@ -194,6 +227,36 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="allDayCheck" class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
|
||||||
|
-->
|
||||||
|
<div class="ion-input-class flex-grow-1 justify-center align-center materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||||
|
|
||||||
|
<mat-form-field appearance="none" class="date-hour-picker" >
|
||||||
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
|
placeholder="Data de fim*"
|
||||||
|
[(ngModel)]="postEvent.EndDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
[min]="postEvent.StartDate"
|
||||||
|
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" ></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #fim
|
||||||
|
|
||||||
|
[stepHour]="1" [stepMinute]="15"
|
||||||
|
[hideTime]="true"
|
||||||
|
>
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="postEvent.EventRecurrence.Type != '-1'" class="container-div width-100">
|
<div *ngIf="postEvent.EventRecurrence.Type != '-1'" class="container-div width-100">
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { ToastService } from 'src/app/services/toast.service';
|
|||||||
import { Event } from '../../../models/event.model';
|
import { Event } from '../../../models/event.model';
|
||||||
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
|
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
|
||||||
import { SearchPage } from '../../search/search.page';
|
import { SearchPage } from '../../search/search.page';
|
||||||
import { ThemePalette } from '@angular/material/core';
|
|
||||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { ThemeService } from 'src/app/services/theme.service';
|
import { ThemeService } from 'src/app/services/theme.service';
|
||||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
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 { ContactsService } from 'src/app/services/contacts.service';
|
||||||
import { DomSanitizerService } from 'src/app/services/DomSanitizer.service';
|
import { DomSanitizerService } from 'src/app/services/DomSanitizer.service';
|
||||||
import { momentG } from 'src/plugin/momentG';
|
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 = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
parse: {
|
parse: {
|
||||||
@@ -37,12 +39,25 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
|||||||
monthYearA11yLabel: "MMMM YYYY"
|
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({
|
@Component({
|
||||||
selector: 'app-new-event',
|
selector: 'app-new-event',
|
||||||
templateUrl: './new-event.page.html',
|
templateUrl: './new-event.page.html',
|
||||||
styleUrls: ['./new-event.page.scss'],
|
styleUrls: ['./new-event.page.scss'],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
|
{ 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,
|
private processeService: ProcessesService,
|
||||||
public TaskService: TaskService,
|
public TaskService: TaskService,
|
||||||
private contactsService: ContactsService,
|
private contactsService: ContactsService,
|
||||||
private domSanitazerService: DomSanitizerService
|
private domSanitazerService: DomSanitizerService,
|
||||||
|
private dateAdapter: DateAdapter<Date>
|
||||||
) {
|
) {
|
||||||
this.loggeduser = SessionStore.user;
|
this.loggeduser = SessionStore.user;
|
||||||
this.postEvent = new Event();
|
this.postEvent = new Event();
|
||||||
@@ -883,10 +899,12 @@ export class NewEventPage implements OnInit {
|
|||||||
if (this.allDayCheck) {
|
if (this.allDayCheck) {
|
||||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||||
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
|
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
|
||||||
|
this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
|
||||||
|
|
||||||
console.log('Recurso ativado!!');
|
console.log('Recurso ativado!!');
|
||||||
} else {
|
} else {
|
||||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||||
|
this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
|
||||||
console.log('Recurso desativado');
|
console.log('Recurso desativado');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -900,6 +918,28 @@ export class NewEventPage implements OnInit {
|
|||||||
date.setSeconds(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
|
return date
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
(click)="imageSize(capturedImage)" style="height: 69px;"></ion-img>
|
(click)="imageSize(capturedImage)" style="height: 69px;"></ion-img>
|
||||||
|
|
||||||
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
|
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
|
||||||
controls="controls" preload="metadata" autoplay="autoplay" webkit-playsinline="webkit-playsinline">
|
controls="controls" preload="metadata" webkit-playsinline="webkit-playsinline">
|
||||||
<source type="video/mp4" [src]="seleted.FileBase64">
|
<source type="video/mp4" [src]="seleted.FileBase64">
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|||||||
@@ -250,8 +250,6 @@ export class NewPublicationPage implements OnInit {
|
|||||||
this.video = data[0];
|
this.video = data[0];
|
||||||
console.log('video record', data)
|
console.log('video record', data)
|
||||||
data.forEach(async element => {
|
data.forEach(async element => {
|
||||||
Capacitor.convertFileSrc(element.fullPath);
|
|
||||||
console.log('convert url', (Capacitor.convertFileSrc(element.fullPath)));
|
|
||||||
this.filesSizeSum = this.filesSizeSum + element.size
|
this.filesSizeSum = this.filesSizeSum + element.size
|
||||||
if (this.fileSizeToMB(this.filesSizeSum) <= 20) {
|
if (this.fileSizeToMB(this.filesSizeSum) <= 20) {
|
||||||
|
|
||||||
@@ -259,7 +257,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
if (this.platform.is('ios')) {
|
if (this.platform.is('ios')) {
|
||||||
this.recordevideoIos(element.fullPath)
|
this.recordevideoIos(element.fullPath)
|
||||||
} else {
|
} else {
|
||||||
|
this.recordVideoAndroid(element.fullPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -286,7 +284,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
multiple: true,
|
multiple: true,
|
||||||
});
|
});
|
||||||
console.log(result.files)
|
console.log(result.files)
|
||||||
result.files.forEach(element => {
|
result.files.forEach(async element => {
|
||||||
|
|
||||||
this.filesSizeSum = this.filesSizeSum + element.size
|
this.filesSizeSum = this.filesSizeSum + element.size
|
||||||
if (this.fileSizeToMB(this.filesSizeSum) <= 20) {
|
if (this.fileSizeToMB(this.filesSizeSum) <= 20) {
|
||||||
@@ -296,30 +294,13 @@ export class NewPublicationPage implements OnInit {
|
|||||||
console.log('pass type verification ', resultUrl)
|
console.log('pass type verification ', resultUrl)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Filesystem.readFile({ path: resultUrl })
|
|
||||||
|
|
||||||
.then(async (content) => {
|
if(this.platform.is('ios')) {
|
||||||
console.log(result)
|
this.recordevideoIos(resultUrl)
|
||||||
console.log(content)
|
} else {
|
||||||
this.filecontent = true;
|
this.loadVideoAndroid(resultUrl,element)
|
||||||
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));
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('upload video error: ', error)
|
console.log('upload video error: ', error)
|
||||||
}
|
}
|
||||||
@@ -768,6 +749,16 @@ export class NewPublicationPage implements OnInit {
|
|||||||
let FileExtension = this.removeTextBeforeSlash(element.title, '.')
|
let FileExtension = this.removeTextBeforeSlash(element.title, '.')
|
||||||
if (this.checkFileType.checkFileType(FileExtension) == 'image' || this.checkFileType.checkFileType(FileExtension) == 'video') {
|
if (this.checkFileType.checkFileType(FileExtension) == 'image' || this.checkFileType.checkFileType(FileExtension) == 'video') {
|
||||||
let resultUrl = decodeURIComponent(element.url);
|
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) => {
|
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
|
||||||
let fileObject;
|
let fileObject;
|
||||||
try {
|
try {
|
||||||
@@ -793,7 +784,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
console.log('error shared filesystem', error)
|
console.log('error shared filesystem', error)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
}) */
|
||||||
} else {
|
} else {
|
||||||
this.httpErrorHandle.validationMessagge('filetype');
|
this.httpErrorHandle.validationMessagge('filetype');
|
||||||
}
|
}
|
||||||
@@ -813,41 +804,67 @@ export class NewPublicationPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
closeApp() {
|
closeApp() {
|
||||||
if (this.platform.is('android'))
|
if (this.platform.is('android')) {
|
||||||
App.exitApp()
|
App.exitApp()
|
||||||
|
} else {
|
||||||
|
window["sharedContent"] = null
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async recordevideoIos(fullPath) {
|
async recordevideoIos(fullPath) {
|
||||||
|
console.log('fullpath', fullPath)
|
||||||
try {
|
try {
|
||||||
const directory = await Filesystem.getUri({
|
const directory = await Filesystem.getUri({
|
||||||
directory: Directory.Cache,
|
directory: Directory.Cache,
|
||||||
path: '',
|
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`})
|
||||||
|
|
||||||
|
.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));
|
||||||
|
});
|
||||||
|
|
||||||
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
|
|
||||||
|
|
||||||
.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) {
|
} catch (error) {
|
||||||
console.log('record video ios erro, ', error)
|
console.log('record video ios erro, ', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async recordVideoAndroid(fullPath) {
|
async recordVideoAndroid(fullPath) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const savedFile = await Filesystem.copy({
|
const savedFile = await Filesystem.copy({
|
||||||
from: Capacitor.convertFileSrc(fullPath),
|
from: fullPath,
|
||||||
to: "video.mp4",
|
to: "video.mp4",
|
||||||
toDirectory: FilesystemDirectory.Data
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<swiper-container [modules]="swiperModules" [pagination]="{clickable: true, dynamicBullets: true }">
|
<swiper-container [modules]="swiperModules" [pagination]="{clickable: true, dynamicBullets: true }">
|
||||||
<swiper-slide *ngFor="let files of publication.Files let k = index">
|
<swiper-slide *ngFor="let files of publication.Files let k = index">
|
||||||
<div (click)="goToPublicationDetail(publication.DocumentId, publication.ProcessId)">
|
<div >
|
||||||
<img *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'image'" class="post-img"
|
<img *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'image'" class="post-img"
|
||||||
[lazyLoad]="'data:image/jpg;base64,' + files.FileBase64">
|
[lazyLoad]="'data:image/jpg;base64,' + files.FileBase64">
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div class="post-content" >
|
<div (click)="goToPublicationDetail(publication.DocumentId, publication.ProcessId)" class="post-content" >
|
||||||
<div class="post-title-time">
|
<div class="post-title-time">
|
||||||
<div class="post-title font-15-em">
|
<div class="post-title font-15-em">
|
||||||
<ion-label>{{publication.Title}}</ion-label>
|
<ion-label>{{publication.Title}}</ion-label>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export class checkFileTypeService {
|
|||||||
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp','tiff','tif',
|
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
|
'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',
|
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
|
// Check if it's an image
|
||||||
if (imageExtensions.includes(lowerCaseType)) {
|
if (imageExtensions.includes(lowerCaseType)) {
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ export class ProcessesService {
|
|||||||
this.headers2 = new HttpHeaders();;
|
this.headers2 = new HttpHeaders();;
|
||||||
|
|
||||||
this.headers2 = this.headers2.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
this.headers2 = this.headers2.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadFile(formData: any) {
|
uploadFile(formData: any) {
|
||||||
|
|||||||
@@ -10,11 +10,12 @@ export class VideoconvertService {
|
|||||||
private ffmpeg: FFMpeg
|
private ffmpeg: FFMpeg
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
async convertVideo(inputPath, outputPath, formart) {
|
async convertVideo(inputPath, outputPath,filename, formart) {
|
||||||
const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}output.${formart}"`;
|
const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}${filename}.${formart}"`;
|
||||||
|
|
||||||
const result = await this.ffmpeg.exec(ffmpegCommand)
|
const result = await this.ffmpeg.exec(ffmpegCommand)
|
||||||
|
|
||||||
console.log('Convert returns ', `${outputPath}output.${formart}`);
|
console.log('Convert returns ', `${outputPath}${filename}.${formart}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,6 +124,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
|
<div>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Todo dia</ion-label>
|
||||||
|
<ion-checkbox [(ngModel)]="allDayCheck" (ionChange)="onCheckboxChange($event)"></ion-checkbox>
|
||||||
|
</ion-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="allDayCheck" class="container-div">
|
||||||
<div class="ion-item-class-2 width-100 d-flex">
|
<div class="ion-item-class-2 width-100 d-flex">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
@@ -135,7 +144,7 @@
|
|||||||
[(ngModel)]="_postEvent.StartDate" [max]="maxDate" [disabled]="disabled">
|
[(ngModel)]="_postEvent.StartDate" [max]="maxDate" [disabled]="disabled">
|
||||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
<ngx-mat-datetime-picker #picker1 [showSpinners]="showSpinners" [showSeconds]="showSeconds"
|
<ngx-mat-datetime-picker #picker1 [showSpinners]="showSpinners" [showSeconds]="showSeconds"
|
||||||
[stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" [touchUi]="touchUi">
|
[stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" [touchUi]="touchUi" [hideTime]="true">
|
||||||
</ngx-mat-datetime-picker>
|
</ngx-mat-datetime-picker>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@@ -143,7 +152,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div *ngIf="!allDayCheck" class="container-div">
|
||||||
|
<div class="ion-item-class-2 width-100 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||||
|
|
||||||
|
<mat-form-field appearance="none" floatLabel="never" class="date-hour-picker">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="picker1" placeholder="Choose a date"
|
||||||
|
[(ngModel)]="_postEvent.StartDate" [max]="maxDate" [disabled]="disabled">
|
||||||
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #picker1 [showSpinners]="showSpinners" [showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" [touchUi]="touchUi" [hideTime]="false">
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="allDayCheck" class="container-div">
|
||||||
<div class="ion-item-class-2 width-100 d-flex">
|
<div class="ion-item-class-2 width-100 d-flex">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
@@ -155,7 +184,27 @@
|
|||||||
[max]="maxDate" [disabled]="disabled" [min]="_postEvent.StartDate">
|
[max]="maxDate" [disabled]="disabled" [min]="_postEvent.StartDate">
|
||||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||||
<ngx-mat-datetime-picker #fim [showSpinners]="showSpinners" [showSeconds]="showSeconds"
|
<ngx-mat-datetime-picker #fim [showSpinners]="showSpinners" [showSeconds]="showSeconds"
|
||||||
[stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond">
|
[stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" [hideTime]="true">
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="!allDayCheck" class="container-div">
|
||||||
|
<div class="ion-item-class-2 width-100 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||||
|
|
||||||
|
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="fim" placeholder="Choose a date" [(ngModel)]="_postEvent.EndDate"
|
||||||
|
[max]="maxDate" [disabled]="disabled" [min]="_postEvent.StartDate">
|
||||||
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #fim [showSpinners]="showSpinners" [showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" [hideTime]="false">
|
||||||
</ngx-mat-datetime-picker>
|
</ngx-mat-datetime-picker>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
CalendarNameOwnerName = ''
|
CalendarNameOwnerName = ''
|
||||||
CalendarNamesOptions = []
|
CalendarNamesOptions = []
|
||||||
|
allDayCheck: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -107,8 +108,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this._postEvent = this.postEvent
|
this._postEvent = this.postEvent
|
||||||
this.postEvent.StartDate = new Date(this.ajustMinuts(this.postEvent.StartDate))
|
this.allDayCheck = this.postEvent.IsAllDayEvent;
|
||||||
this.postEvent.EndDate = new Date(this.ajustMinuts(this.postEvent.EndDate))
|
|
||||||
if(!this.restoreTemporaryData()) {
|
if(!this.restoreTemporaryData()) {
|
||||||
// clear
|
// clear
|
||||||
|
|
||||||
@@ -584,16 +584,53 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ajustMinuts(string) {
|
onCheckboxChange(event: any) {
|
||||||
var partes = string.split(' ');
|
console.log(this.postEvent.CalendarId)
|
||||||
var horaMinuto = partes[1].split(':');
|
if (this.allDayCheck) {
|
||||||
if (horaMinuto[1] === '59') {
|
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||||
horaMinuto[1] = '00';
|
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
|
||||||
var novaString = partes[0] + ' ' + horaMinuto.join(':');
|
this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
|
||||||
|
|
||||||
return novaString;
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,6 +124,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
|
<div>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Todo dia</ion-label>
|
||||||
|
<ion-checkbox [(ngModel)]="allDayCheck" (ionChange)="onCheckboxChange($event)"></ion-checkbox>
|
||||||
|
</ion-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="allDayCheck" class="container-div">
|
||||||
<div class="ion-item-class-2 d-flex" >
|
<div class="ion-item-class-2 d-flex" >
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
@@ -144,6 +153,7 @@
|
|||||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
[stepSecond]="stepSecond"
|
[stepSecond]="stepSecond"
|
||||||
[touchUi]="touchUi"
|
[touchUi]="touchUi"
|
||||||
|
[hideTime]="true"
|
||||||
>
|
>
|
||||||
</ngx-mat-datetime-picker>
|
</ngx-mat-datetime-picker>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@@ -152,7 +162,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div *ngIf="!allDayCheck" class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex" >
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" >
|
||||||
|
|
||||||
|
<mat-form-field appearance="none" class="date-hour-picker">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
|
placeholder="Data Inicio*"
|
||||||
|
[(ngModel)]="postEvent.StartDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" ></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #picker1
|
||||||
|
[showSpinners]="showSpinners"
|
||||||
|
[showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
|
[stepSecond]="stepSecond"
|
||||||
|
[touchUi]="touchUi"
|
||||||
|
[hideTime]="false"
|
||||||
|
>
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="allDayCheck" class="container-div">
|
||||||
<div class="ion-item-class-2 d-flex">
|
<div class="ion-item-class-2 d-flex">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
@@ -175,6 +215,39 @@
|
|||||||
[showSeconds]="showSeconds"
|
[showSeconds]="showSeconds"
|
||||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
[stepSecond]="stepSecond"
|
[stepSecond]="stepSecond"
|
||||||
|
[hideTime]="true"
|
||||||
|
>
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="!allDayCheck" class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
|
||||||
|
-->
|
||||||
|
<div (click)="openFim()" class="ion-input-class flex-grow-1 justify-center align-center materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||||
|
|
||||||
|
<mat-form-field appearance="none" class="date-hour-picker">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
|
placeholder="Data de fim*"
|
||||||
|
[(ngModel)]="postEvent.EndDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
[min]="postEvent.StartDate"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" ></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #fim
|
||||||
|
[showSpinners]="showSpinners"
|
||||||
|
[showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
|
[stepSecond]="stepSecond"
|
||||||
|
[hideTime]="false"
|
||||||
>
|
>
|
||||||
</ngx-mat-datetime-picker>
|
</ngx-mat-datetime-picker>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ export class NewEventPage implements OnInit {
|
|||||||
environment = environment
|
environment = environment
|
||||||
eventPersons: EventPerson[];
|
eventPersons: EventPerson[];
|
||||||
contacts: EventPerson[] = [];
|
contacts: EventPerson[] = [];
|
||||||
|
allDayCheck: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
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
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -763,7 +763,10 @@ export class NewPublicationPage implements OnInit {
|
|||||||
path: '',
|
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`})
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||