Merge branch 'feature/ios-notification' into developer-prod

This commit is contained in:
Peter Maquiran
2023-10-30 08:19:52 +01:00
149 changed files with 11443 additions and 47184 deletions
+5 -3
View File
@@ -77,8 +77,8 @@
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "8mb",
"maximumError": "5mb" "maximumError": "8mb"
} }
] ]
}, },
@@ -115,7 +115,9 @@
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js", "karmaConfig": "karma.conf.js",
"styles": [ "./node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css"], "styles": [
"./node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css"
],
"scripts": [], "scripts": [],
"assets": [ "assets": [
{ {
+2 -2
View File
@@ -1,4 +1,4 @@
// / <reference types="@capacitor/local-notifications" />
// / <reference types="@capacitor/push-notifications" /> // / <reference types="@capacitor/push-notifications" />
// / <reference types="@capacitor/splash-screen" /> // / <reference types="@capacitor/splash-screen" />
@@ -6,7 +6,7 @@ import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { const config: CapacitorConfig = {
appId: 'com.capacitorjs.app.testapp', appId: 'com.capacitorjs.app.testapp',
appName: 'capacitor-testapp', appName: 'Gabinete Digital',
webDir: 'www', webDir: 'www',
plugins: { plugins: {
SplashScreen: { SplashScreen: {
+74 -29
View File
@@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 48; objectVersion = 52;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
@@ -15,6 +15,7 @@
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; }; 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; }; 50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; }; A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
DAD1AB3F2ACF3A7F001D9958 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DAD1AB3D2ACF39DE001D9958 /* GoogleService-Info.plist */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
@@ -29,6 +30,13 @@
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; }; 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; }; AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
DA6FE4D02ACEEACD006F1E0D /* CapacitorPushNotifications.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CapacitorPushNotifications.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA6FE4D52ACEF2DA006F1E0D /* FirebaseCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = FirebaseCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA6FE4D62ACEF2DA006F1E0D /* FirebaseCoreInternal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = FirebaseCoreInternal.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA6FE4D72ACEF2DA006F1E0D /* FirebaseInstallations.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = FirebaseInstallations.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA6FE4D82ACEF2DA006F1E0D /* FirebaseMessaging.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = FirebaseMessaging.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA8422AF2AD03FBE00AC9118 /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = "<group>"; };
DAD1AB3D2ACF39DE001D9958 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../../Downloads/App 2023-09-14 12-28-07/GoogleService-Info.plist"; sourceTree = "<group>"; };
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; }; FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@@ -47,6 +55,11 @@
27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = { 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
DA6FE4D52ACEF2DA006F1E0D /* FirebaseCore.framework */,
DA6FE4D62ACEF2DA006F1E0D /* FirebaseCoreInternal.framework */,
DA6FE4D72ACEF2DA006F1E0D /* FirebaseInstallations.framework */,
DA6FE4D82ACEF2DA006F1E0D /* FirebaseMessaging.framework */,
DA6FE4D02ACEEACD006F1E0D /* CapacitorPushNotifications.framework */,
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */, AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */,
); );
name = Frameworks; name = Frameworks;
@@ -73,8 +86,10 @@
504EC3061FED79650016851F /* App */ = { 504EC3061FED79650016851F /* App */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
DA8422AF2AD03FBE00AC9118 /* App.entitlements */,
50379B222058CBB4000EE86E /* capacitor.config.json */, 50379B222058CBB4000EE86E /* capacitor.config.json */,
504EC3071FED79650016851F /* AppDelegate.swift */, 504EC3071FED79650016851F /* AppDelegate.swift */,
DAD1AB3D2ACF39DE001D9958 /* GoogleService-Info.plist */,
504EC30B1FED79650016851F /* Main.storyboard */, 504EC30B1FED79650016851F /* Main.storyboard */,
504EC30E1FED79650016851F /* Assets.xcassets */, 504EC30E1FED79650016851F /* Assets.xcassets */,
504EC3101FED79650016851F /* LaunchScreen.storyboard */, 504EC3101FED79650016851F /* LaunchScreen.storyboard */,
@@ -106,7 +121,7 @@
504EC3011FED79650016851F /* Frameworks */, 504EC3011FED79650016851F /* Frameworks */,
504EC3021FED79650016851F /* Resources */, 504EC3021FED79650016851F /* Resources */,
9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */, 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */,
A99665AA7D5F8360E21EA025 /* [CP] Copy Pods Resources */, 5B7AACB22ECDCEAA343DC840 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@@ -124,7 +139,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0920; LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0920; LastUpgradeCheck = 1420;
TargetAttributes = { TargetAttributes = {
504EC3031FED79650016851F = { 504EC3031FED79650016851F = {
CreatedOnToolsVersion = 9.2; CreatedOnToolsVersion = 9.2;
@@ -142,6 +157,9 @@
Base, Base,
); );
mainGroup = 504EC2FB1FED79650016851F; mainGroup = 504EC2FB1FED79650016851F;
packageReferences = (
DA6FE4D42ACEEC01006F1E0D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
);
productRefGroup = 504EC3051FED79650016851F /* Products */; productRefGroup = 504EC3051FED79650016851F /* Products */;
projectDirPath = ""; projectDirPath = "";
projectRoot = ""; projectRoot = "";
@@ -162,15 +180,31 @@
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */, 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
504EC30D1FED79650016851F /* Main.storyboard in Resources */, 504EC30D1FED79650016851F /* Main.storyboard in Resources */,
2FAD9763203C412B000D30F8 /* config.xml in Resources */, 2FAD9763203C412B000D30F8 /* config.xml in Resources */,
DAD1AB3F2ACF3A7F001D9958 /* GoogleService-Info.plist in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
5B7AACB22ECDCEAA343DC840 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-resources.sh\"\n";
showEnvVarsInLog = 0;
};
6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = { 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 8;
files = ( files = (
); );
inputPaths = ( inputPaths = (
@@ -181,14 +215,14 @@
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt", "$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = { 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 8;
files = ( files = (
); );
inputPaths = ( inputPaths = (
@@ -196,26 +230,11 @@
name = "[CP] Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
A99665AA7D5F8360E21EA025 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@@ -263,6 +282,7 @@
CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES; CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_EMPTY_BODY = YES;
@@ -270,8 +290,10 @@
CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -320,6 +342,7 @@
CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES; CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_EMPTY_BODY = YES;
@@ -327,8 +350,10 @@
CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -351,7 +376,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
}; };
name = Release; name = Release;
@@ -361,15 +387,19 @@
baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */; baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 65;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 94BRNM2LSS; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 94BRNM2LSS;
INFOPLIST_FILE = App/Info.plist; INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = (
MARKETING_VERSION = 2.0.1; "$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.25;
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)";
@@ -386,15 +416,19 @@
baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */; baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 65;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 94BRNM2LSS; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 94BRNM2LSS;
INFOPLIST_FILE = App/Info.plist; INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = (
MARKETING_VERSION = 2.0.1; "$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.25;
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste; PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@@ -427,6 +461,17 @@
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
DA6FE4D42ACEEC01006F1E0D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
requirement = {
branch = master;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */
}; };
rootObject = 504EC2FC1FED79650016851F /* Project object */; rootObject = 504EC2FC1FED79650016851F /* Project object */;
} }
@@ -0,0 +1,113 @@
{
"pins" : [
{
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
"version" : "1.2022062300.0"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : {
"branch" : "master",
"revision" : "a10c9f585db1d37a8e6bf9461ef96b14fffdc8b9"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "56f681586ff006a7982b53dc94082eea31971acf",
"version" : "10.16.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "aae45a320fd0d11811820335b1eabc8753902a40",
"version" : "9.2.5"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "c38ce365d77b04a9a300c31061c5227589e5597b",
"version" : "7.11.5"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "a673bc2937fbe886dd1f99c401b01b6d977a9c98",
"version" : "1.49.1"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
"version" : "3.1.1"
}
},
{
"identity" : "interop-ios-for-google-sdks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/interop-ios-for-google-sdks.git",
"state" : {
"revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
"version" : "100.0.0"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
"version" : "1.22.2"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
"version" : "2.30909.0"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
"version" : "2.3.1"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "3c54ab05249f59f2c6641dd2920b8358ea9ed127",
"version" : "1.24.0"
}
}
],
"version" : 2
}
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "504EC3031FED79650016851F"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "504EC3031FED79650016851F"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "504EC3031FED79650016851F"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,113 @@
{
"pins" : [
{
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
"version" : "1.2022062300.0"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : {
"branch" : "master",
"revision" : "a10c9f585db1d37a8e6bf9461ef96b14fffdc8b9"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "56f681586ff006a7982b53dc94082eea31971acf",
"version" : "10.16.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "aae45a320fd0d11811820335b1eabc8753902a40",
"version" : "9.2.5"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "c38ce365d77b04a9a300c31061c5227589e5597b",
"version" : "7.11.5"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "a673bc2937fbe886dd1f99c401b01b6d977a9c98",
"version" : "1.49.1"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
"version" : "3.1.1"
}
},
{
"identity" : "interop-ios-for-google-sdks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/interop-ios-for-google-sdks.git",
"state" : {
"revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
"version" : "100.0.0"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
"version" : "1.22.2"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
"version" : "2.30909.0"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
"version" : "2.3.1"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "3c54ab05249f59f2c6641dd2920b8358ea9ed127",
"version" : "1.24.0"
}
}
],
"version" : 2
}
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
+31
View File
@@ -1,5 +1,7 @@
import UIKit import UIKit
import Capacitor import Capacitor
import FirebaseCore
import Firebase
@UIApplicationMain @UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate { class AppDelegate: UIResponder, UIApplicationDelegate {
@@ -8,9 +10,27 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
// Specify the custom file path
// let customGoogleServiceInfoPlistPath = Bundle.main.path(forResource: "11", ofType: "plist")
// Check if the custom plist file exists
// if let filePath = customGoogleServiceInfoPlistPath,
// let fileOptions = FirebaseOptions(contentsOfFile: filePath) {
// FirebaseApp.configure(options: fileOptions)
// } else {
// Handle the case where the custom plist file is not found
// print("Custom GoogleService-Info.plist not found or invalid.")
FirebaseApp.configure()
//}
return true return true
} }
func applicationWillResignActive(_ application: UIApplication) { func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
@@ -46,4 +66,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler) return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
} }
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
NotificationCenter.default.post(name: .capacitorDidRegisterForRemoteNotifications, object: deviceToken)
Messaging.messaging().apnsToken = deviceToken
}
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error)
}
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

+294 -56
View File
@@ -1,116 +1,354 @@
{ {
"images" : [ "images" : [
{ {
"size" : "20x20", "filename" : "40.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-20x20@2x.png", "scale" : "2x",
"scale" : "2x" "size" : "20x20"
}, },
{ {
"size" : "20x20", "filename" : "60.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-20x20@3x.png", "scale" : "3x",
"scale" : "3x" "size" : "20x20"
}, },
{ {
"size" : "29x29", "filename" : "29.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-29x29@2x-1.png", "scale" : "1x",
"scale" : "2x" "size" : "29x29"
}, },
{ {
"size" : "29x29", "filename" : "58.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-29x29@3x.png", "scale" : "2x",
"scale" : "3x" "size" : "29x29"
}, },
{ {
"size" : "40x40", "filename" : "87.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-40x40@2x.png", "scale" : "3x",
"scale" : "2x" "size" : "29x29"
}, },
{ {
"size" : "40x40", "filename" : "80.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-40x40@3x.png", "scale" : "2x",
"scale" : "3x" "size" : "40x40"
}, },
{ {
"size" : "60x60", "filename" : "120.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-60x60@2x.png", "scale" : "3x",
"scale" : "2x" "size" : "40x40"
}, },
{ {
"size" : "60x60", "filename" : "57.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-60x60@3x.png", "scale" : "1x",
"scale" : "3x" "size" : "57x57"
}, },
{ {
"size" : "20x20", "filename" : "114.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "57x57"
},
{
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "180.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "20.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-20x20@1x.png", "scale" : "1x",
"scale" : "1x" "size" : "20x20"
}, },
{ {
"size" : "20x20", "filename" : "40.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-20x20@2x-1.png", "scale" : "2x",
"scale" : "2x" "size" : "20x20"
}, },
{ {
"size" : "29x29", "filename" : "29.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-29x29@1x.png", "scale" : "1x",
"scale" : "1x" "size" : "29x29"
}, },
{ {
"size" : "29x29", "filename" : "58.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-29x29@2x.png", "scale" : "2x",
"scale" : "2x" "size" : "29x29"
}, },
{ {
"size" : "40x40", "filename" : "40.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-40x40@1x.png", "scale" : "1x",
"scale" : "1x" "size" : "40x40"
}, },
{ {
"size" : "40x40", "filename" : "80.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-40x40@2x-1.png", "scale" : "2x",
"scale" : "2x" "size" : "40x40"
}, },
{ {
"size" : "76x76", "filename" : "50.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-76x76@1x.png", "scale" : "1x",
"scale" : "1x" "size" : "50x50"
}, },
{ {
"size" : "76x76", "filename" : "100.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-76x76@2x.png", "scale" : "2x",
"scale" : "2x" "size" : "50x50"
}, },
{ {
"size" : "83.5x83.5", "filename" : "72.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-83.5x83.5@2x.png", "scale" : "1x",
"scale" : "2x" "size" : "72x72"
}, },
{ {
"size" : "1024x1024", "filename" : "144.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "72x72"
},
{
"filename" : "76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "152.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "167.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"filename" : "1024.png",
"idiom" : "ios-marketing", "idiom" : "ios-marketing",
"filename" : "AppIcon-512@2x.png", "scale" : "1x",
"scale" : "1x" "size" : "1024x1024"
},
{
"filename" : "16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "32.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "32.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "64.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "128.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "256.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "256.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "512.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "512.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "1024.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
},
{
"filename" : "48.png",
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "24x24",
"subtype" : "38mm"
},
{
"filename" : "55.png",
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "27.5x27.5",
"subtype" : "42mm"
},
{
"filename" : "58.png",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "87.png",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "66.png",
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "33x33",
"subtype" : "45mm"
},
{
"filename" : "80.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "40x40",
"subtype" : "38mm"
},
{
"filename" : "88.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "44x44",
"subtype" : "40mm"
},
{
"filename" : "92.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "46x46",
"subtype" : "41mm"
},
{
"filename" : "100.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "50x50",
"subtype" : "44mm"
},
{
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "51x51",
"subtype" : "45mm"
},
{
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "54x54",
"subtype" : "49mm"
},
{
"filename" : "172.png",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "86x86",
"subtype" : "38mm"
},
{
"filename" : "196.png",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "98x98",
"subtype" : "42mm"
},
{
"filename" : "216.png",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "108x108",
"subtype" : "44mm"
},
{
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "117x117",
"subtype" : "45mm"
},
{
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "129x129",
"subtype" : "49mm"
},
{
"filename" : "1024.png",
"idiom" : "watch-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"filename" : "102.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "45x45",
"subtype" : "41mm"
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }
+36
View File
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>800733765231-5da370m1mntjk7cg8cc2d331sp8cj91d.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.800733765231-5da370m1mntjk7cg8cc2d331sp8cj91d</string>
<key>API_KEY</key>
<string>AIzaSyCDW6bjQSiSAVCYhai7nFV1wWnLMV_kBeM</string>
<key>GCM_SENDER_ID</key>
<string>800733765231</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.gpr.gabinetedigital.teste</string>
<key>PROJECT_ID</key>
<string>gabinete-digital-2020</string>
<key>STORAGE_BUCKET</key>
<string>gabinete-digital-2020.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:800733765231:ios:af4d35631d70473213779a</string>
<key>DATABASE_URL</key>
<string>https://gabinete-digital-2020.firebaseio.com</string>
</dict>
</plist>
+11 -7
View File
@@ -2,16 +2,18 @@
<!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>NSCameraUsageDescription</key> <key>FirebaseAppDelegateProxyEnabled</key>
<string>Privacy - Camera Usage Description</string> <true/>
<key>NSPhotoLibraryAddUsageDescription</key> <key>UNUserNotificationCenterDelegate</key>
<string>Privacy - Photo Library Additions Usage Description</string> <string>YourApp.NotificationDelegate</string>
<key>NSPhotoLibraryUsageDescription</key> <key>UIBackgroundModes</key>
<string>Privacy - Photo Library Usage Description</string> <array>
<string>remote-notification</string>
</array>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>capacitor-testapp</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>
@@ -42,6 +44,8 @@
<string>This app needs your location to test the location feature of the Google Maps plugin.</string> <string>This app needs your location to test the location feature of the Google Maps plugin.</string>
<key>NSMicrophoneUsageDescription</key> <key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string> <string>Used to capture audio for image picker plugin</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Privacy - Photo Library Additions Usage Description</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string> <string>Used to demonstrate image picker plugin</string>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
+4 -1
View File
@@ -11,6 +11,7 @@ install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods def capacitor_pods
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCommunityFcm', :path => '../../node_modules/@capacitor-community/fcm'
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app' pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser' pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser'
pod 'CapacitorCamera', :path => '../../node_modules/@capacitor/camera' pod 'CapacitorCamera', :path => '../../node_modules/@capacitor/camera'
@@ -18,7 +19,6 @@ def capacitor_pods
pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem' pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem'
pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics' pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard' pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
pod 'CapacitorLocalNotifications', :path => '../../node_modules/@capacitor/local-notifications'
pod 'CapacitorNetwork', :path => '../../node_modules/@capacitor/network' pod 'CapacitorNetwork', :path => '../../node_modules/@capacitor/network'
pod 'CapacitorPushNotifications', :path => '../../node_modules/@capacitor/push-notifications' pod 'CapacitorPushNotifications', :path => '../../node_modules/@capacitor/push-notifications'
pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share' pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share'
@@ -32,6 +32,9 @@ end
target 'App' do target 'App' do
capacitor_pods capacitor_pods
# Add your Pods here # Add your Pods here
pod 'Firebase/CoreOnly', '~> 10.15.0'
pod 'Firebase/Core', '~> 10.15.0'
pod 'Firebase/Messaging', '~> 10.15.0'
end end
post_install do |installer| post_install do |installer|
+7286 -44354
View File
File diff suppressed because it is too large Load Diff
+6 -5
View File
@@ -46,19 +46,19 @@
"@awesome-cordova-plugins/file": "^5.41.0", "@awesome-cordova-plugins/file": "^5.41.0",
"@awesome-cordova-plugins/file-opener": "^5.41.0", "@awesome-cordova-plugins/file-opener": "^5.41.0",
"@awesome-cordova-plugins/multiple-document-picker": "^5.40.0", "@awesome-cordova-plugins/multiple-document-picker": "^5.40.0",
"@capacitor/android": "^4.6.2", "@capacitor-community/fcm": "^5.0.2",
"@capacitor/android": "^5.4.2",
"@capacitor/app": "^4.1.1", "@capacitor/app": "^4.1.1",
"@capacitor/browser": "^4.1.0", "@capacitor/browser": "^4.1.0",
"@capacitor/camera": "^4.1.4", "@capacitor/camera": "^4.1.4",
"@capacitor/core": "^3.3.2", "@capacitor/core": "^5.4.2",
"@capacitor/device": "^4.1.0", "@capacitor/device": "^4.1.0",
"@capacitor/filesystem": "^4.1.4", "@capacitor/filesystem": "^4.1.4",
"@capacitor/haptics": "^4.1.0", "@capacitor/haptics": "^4.1.0",
"@capacitor/ios": "^4.6.1", "@capacitor/ios": "^5.4.2",
"@capacitor/keyboard": "^4.1.0", "@capacitor/keyboard": "^4.1.0",
"@capacitor/local-notifications": "^4.1.4",
"@capacitor/network": "^4.1.0", "@capacitor/network": "^4.1.0",
"@capacitor/push-notifications": "^4.1.2", "@capacitor/push-notifications": "^5.1.0",
"@capacitor/share": "^4.1.0", "@capacitor/share": "^4.1.0",
"@capacitor/storage": "^1.2.5", "@capacitor/storage": "^1.2.5",
"@fortawesome/angular-fontawesome": "^0.9.0", "@fortawesome/angular-fontawesome": "^0.9.0",
@@ -182,6 +182,7 @@
"ts-jest-puppeteer": "^0.0.5", "ts-jest-puppeteer": "^0.0.5",
"tslib": "^2.0.0", "tslib": "^2.0.0",
"uuidv4": "^6.2.11", "uuidv4": "^6.2.11",
"webpack": "^5.88.2",
"wordcloud": "^1.1.2", "wordcloud": "^1.1.2",
"ws": "^7.4.6", "ws": "^7.4.6",
"zod": "^3.22.2", "zod": "^3.22.2",
+23 -25
View File
@@ -164,8 +164,6 @@ export class HomePage implements OnInit {
this.logDeviceInfo(); this.logDeviceInfo();
this.notificationsService.onReciveForeground();
this.notificationsService.onReciveBackground();
window.addEventListener('online', () => { window.addEventListener('online', () => {
this.backgroundservice.online() this.backgroundservice.online()
@@ -238,20 +236,20 @@ export class HomePage implements OnInit {
}, 1000) }, 1000)
/* if (!this.platform.is('desktop')) { /* if (!this.platform.is('desktop')) {
App.addListener('appStateChange', ({ isActive }) => { App.addListener('appStateChange', ({ isActive }) => {
if (isActive) { if (isActive) {
// The app is in the foreground. // The app is in the foreground.
console.log('App is in the foreground'); console.log('App is in the foreground');
this.RochetChatConnectorService.connect() this.RochetChatConnectorService.connect()
this.reloadComponent(true) this.reloadComponent(true)
} else { } else {
// The app is in the background. // The app is in the background.
console.log('App is in the background'); console.log('App is in the background');
// You can perform actions specific to the background state here. // You can perform actions specific to the background state here.
} }
}); });
} */ } */
} }
@@ -344,15 +342,15 @@ export class HomePage implements OnInit {
} }
reloadComponent(self:boolean,urlToNavigateTo ?:string){ reloadComponent(self: boolean, urlToNavigateTo?: string) {
//skipLocationChange:true means dont update the url to / when navigating //skipLocationChange:true means dont update the url to / when navigating
console.log("Current route I am on:",this.router.url); console.log("Current route I am on:", this.router.url);
const url=self ? this.router.url :urlToNavigateTo; const url = self ? this.router.url : urlToNavigateTo;
this.router.navigateByUrl('/',{skipLocationChange:true}).then(()=>{ this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => {
this.router.navigate([`/${url}`]).then(()=>{ this.router.navigate([`/${url}`]).then(() => {
console.log(`After navigation I am on:${this.router.url}`) console.log(`After navigation I am on:${this.router.url}`)
}) })
}) })
} }
} }
+2 -1
View File
@@ -14,7 +14,8 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="buttons width-100"> <div class="buttons width-100">
<button class="btn-ok-medium" shape="round" (click)="close()">Não</button>
<button class="btn-delete-medium" shape="round" (click)="save()">Sim</button> <button class="btn-delete-medium" shape="round" (click)="save()">Sim</button>
<button class="btn-ok-medium" shape="round" (click)="close()">Não</button>
</div> </div>
</ion-footer> </ion-footer>
@@ -170,6 +170,7 @@
<app-attendee-modal <app-attendee-modal
*ngIf="showAttendees" *ngIf="showAttendees"
[footer]="false" [footer]="false"
[taskType]="taskType"
class="d-flex flex-column height-100" class="d-flex flex-column height-100"
[adding]="adding" [adding]="adding"
[taskParticipants]="taskParticipants" [taskParticipants]="taskParticipants"
@@ -186,9 +187,10 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="buttons"> <div class="buttons">
<button class="btn-cancel" shape="round" (click)="cancelTask()">Cancelar</button>
<button *ngIf="taskType == '0'" class="btn-ok" shape="round" (click)="saveTask()">Concluir</button> <button *ngIf="taskType == '0'" class="btn-ok" shape="round" (click)="saveTask()">Concluir</button>
<button *ngIf="taskType == '1'" class="btn-ok" shape="round" (click)="saveTask()">Solicitar</button> <button *ngIf="taskType == '1'" class="btn-ok" shape="round" (click)="saveTask()">Solicitar</button>
<button *ngIf="taskType == '2'" class="btn-ok" shape="round" (click)="saveTask()">Solicitar</button> <button *ngIf="taskType == '2'" class="btn-ok" shape="round" (click)="saveTask()">Solicitar</button>
<button class="btn-cancel" shape="round" (click)="cancelTask()">Cancelar</button>
</div> </div>
</ion-footer> </ion-footer>
@@ -120,6 +120,7 @@ export class CreateProcessPage implements OnInit {
this.taskType = this.navParams.get('taskAction'); this.taskType = this.navParams.get('taskAction');
console.log('this.taskType ',this.taskType )
this.postData = new Despacho(); this.postData = new Despacho();
this.participants = this.participants = new Array(); this.participants = this.participants = new Array();
@@ -598,7 +599,8 @@ export class CreateProcessPage implements OnInit {
componentProps: { componentProps: {
adding: this.adding, adding: this.adding,
taskParticipants: this.taskParticipants, taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc taskParticipantsCc: this.taskParticipantsCc,
taskType: this.taskType
}, },
cssClass: 'modal attendee modal-desktop', cssClass: 'modal attendee modal-desktop',
backdropDismiss: false backdropDismiss: false
@@ -351,8 +351,9 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="buttons"> <div class="buttons">
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
<button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button> <button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
</div> </div>
</ion-footer> </ion-footer>
@@ -163,16 +163,17 @@
<div class="d-flex justify-space-between"> <div class="d-flex justify-space-between">
<ion-buttons slot="start" (click)="close()">
<button class="btn-cancel" fill="clear" color="#061b52">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
<ion-buttons slot="end" (click)="close()"> <ion-buttons slot="end" (click)="close()">
<button class="btn-ok" fill="clear" color="#fff"> <button class="btn-ok" fill="clear" color="#fff">
<ion-label>Enviar</ion-label> <ion-label>Enviar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="start" (click)="close()">
<button class="btn-cancel" fill="clear" color="#061b52">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
</div> </div>
</ion-footer> </ion-footer>
+1
View File
@@ -21,6 +21,7 @@ export interface Environment {
VP: string VP: string
dispatchPR: string dispatchPR: string
storageProduction: boolean storageProduction: boolean
rejectUnauthorized: string
} }
+1
View File
@@ -3,4 +3,5 @@ export class EventPerson{
Name: string; Name: string;
IsRequired: boolean; IsRequired: boolean;
UserType: string; UserType: string;
IsPR: boolean
} }
File diff suppressed because it is too large Load Diff
@@ -361,15 +361,16 @@
<ion-footer class="ion-no-border"> <ion-footer class="ion-no-border">
<ion-toolbar class="footer-toolbar px-20"> <ion-toolbar class="footer-toolbar px-20">
<ion-buttons slot="start"> <ion-buttons slot="start">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
<ion-buttons slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()"> <button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Gravar</ion-label> <ion-label>Gravar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
</ion-toolbar> </ion-toolbar>
</ion-footer> </ion-footer>
@@ -315,15 +315,16 @@
</ion-content> </ion-content>
<ion-footer class="ion-no-border"> <ion-footer class="ion-no-border">
<ion-toolbar class="footer-toolbar px-20"> <ion-toolbar class="footer-toolbar px-20">
<ion-buttons slot="start"> <ion-buttons slot="start">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
<ion-buttons slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()"> <button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Gravar</ion-label> <ion-label>Gravar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
</ion-toolbar> </ion-toolbar>
</ion-footer> </ion-footer>
@@ -247,17 +247,17 @@ export class ViewEventPage implements OnInit {
header: 'Eliminar evento?', header: 'Eliminar evento?',
message: '', message: '',
buttons: [ buttons: [
{
text: 'Não',
handler: () => {
// sconsole.log('Let me think');
}
},
{ {
text: 'Sim', text: 'Sim',
handler: () => { handler: () => {
this.deleteEvent(); this.deleteEvent();
} }
},
{
text: 'Não',
handler: () => {
// sconsole.log('Let me think');
}
} }
] ]
}).then(res => { }).then(res => {
+54 -14
View File
@@ -30,7 +30,7 @@ import { SessionStore } from 'src/app/store/session.service';
import { ChatDebuggingPage } from 'src/app/shared/popover/chat-debugging/chat-debugging.page'; import { ChatDebuggingPage } from 'src/app/shared/popover/chat-debugging/chat-debugging.page';
import { EventTrigger } from 'src/app/services/eventTrigger.service'; import { EventTrigger } from 'src/app/services/eventTrigger.service';
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service'; import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
import { RouteService } from 'src/app/services/route.service';
import { Plugins } from '@capacitor/core'; import { Plugins } from '@capacitor/core';
const { App } = Plugins; const { App } = Plugins;
@@ -108,6 +108,7 @@ export class ChatPage implements OnInit {
showEventEditOrOpen: "edit" | "add" | "" | "eventoToApprove" = "" showEventEditOrOpen: "edit" | "add" | "" | "eventoToApprove" = ""
socket: WebSocket; socket: WebSocket;
receivedData: any; receivedData: any;
routerSubscription
constructor( constructor(
private chatService: ChatService, private chatService: ChatService,
@@ -125,10 +126,11 @@ export class ChatPage implements OnInit {
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private eventTriger: EventTrigger, private eventTriger: EventTrigger,
private RochetChatConnectorService: RochetChatConnectorService, private RochetChatConnectorService: RochetChatConnectorService,
private zone: NgZone private zone: NgZone,
public RouteService: RouteService,
) { ) {
this.headers = new HttpHeaders(); this.headers = new HttpHeaders();;
window.onresize = (event) => { window.onresize = (event) => {
if (window.innerWidth > 701) { if (window.innerWidth > 701) {
this.modalController.dismiss(); this.modalController.dismiss();
@@ -167,13 +169,17 @@ export class ChatPage implements OnInit {
} }
}); });
this.router.events.forEach((event) => { this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationEnd && event.url.startsWith('/home/chat')) { if (event instanceof NavigationEnd && event.url.startsWith('/home/chat')) {
this.routeCheck() this.routeCheck()
} }
}); });
this.routeCheck() }
ngOnDestroy() {
// this.setStatus('offline');
this.routerSubscription?.unsubscribe();
} }
reopenWebSocketConnection() { reopenWebSocketConnection() {
@@ -183,14 +189,45 @@ export class ChatPage implements OnInit {
// Retry connecting or other reconnection logic can be added here. // Retry connecting or other reconnection logic can be added here.
} }
routeCheck() { firstEnter = true
routeCheck() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
const roomId = urlParams.get('roomId'); const roomId = urlParams.get('roomId');
if (roomId) { if (roomId) {
const room = this.ChatSystemService.getRoomById(roomId);
if (this.firstEnter) {
this.firstEnter = false
let delay = this.RouteService.liveHistory.find((item) => {
return ['/home/publications', '/home/agenda', '/home/gabinete', '/home/events'].filter(x => {
return item.includes(x)
}).length >= 1
})
if (!delay) {
console.log("delay")
setTimeout(() => {
this.openChat(roomId)
}, 2000)
} else {
console.log("no dalay")
this.openChat(roomId)
}
} else {
this.openChat(roomId)
}
}
}
openFailed = 0
openChat(roomId) {
const room = this.ChatSystemService.getRoomById(roomId);
if (room) {
this.openFailed = 0
if (room.isGroup) { if (room.isGroup) {
this.segment = 'Grupos' this.segment = 'Grupos'
this.openGroupMessagesPage(roomId) this.openGroupMessagesPage(roomId)
@@ -198,8 +235,17 @@ export class ChatPage implements OnInit {
this.segment = 'Contactos' this.segment = 'Contactos'
this.openMessagesPage(roomId) this.openMessagesPage(roomId)
} }
} } else {
if (this.openFailed <= 3) {
this.openFailed++
setTimeout(() => {
this.openChat(roomId)
}, 1000)
} else {
this.openFailed = 0
}
}
} }
@@ -218,11 +264,6 @@ export class ChatPage implements OnInit {
return Array(n); return Array(n);
} }
ngOnDestroy() {
this.setStatus('offline');
}
setStatus(status: string) { setStatus(status: string) {
let body = { let body = {
message: '', message: '',
@@ -750,7 +791,6 @@ export class ChatPage implements OnInit {
}); });
modal.onDidDismiss().then((Data) => { modal.onDidDismiss().then((Data) => {
// console.log(Data,'daatatatat');
// let data = Data.data // let data = Data.data
// let roomId = data.roomId // let roomId = data.roomId
@@ -1,4 +1,4 @@
<ion-header class="ion-no-border"> <ion-header class="ion-no-border">
<ion-toolbar class="header-toolbar"> <ion-toolbar class="header-toolbar">
<div class="main-header"> <div class="main-header">
<div class="header-top"> <div class="header-top">
@@ -19,7 +19,7 @@
</div> </div>
<div class="right"> <div class="right">
<button class="btn-no-color" (click)="openOptions()"> <button class="btn-no-color" (click)="openOptions()">
<!-- <ion-icon src="assets/images/icons-menu.svg"></ion-icon> --> <!-- <ion-icon src="assets/images/icons-menu.svg"></ion-icon> -->
<fa-icon icon="ellipsis-v" class="header-top-btn font-awesome-1"></fa-icon> <fa-icon icon="ellipsis-v" class="header-top-btn font-awesome-1"></fa-icon>
</button> </button>
</div> </div>
@@ -27,10 +27,11 @@
<div (click)="addContacts()" class="header-bottom"> <div (click)="addContacts()" class="header-bottom">
<div class="header-bottom-icon"> <div class="header-bottom-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
</div> </div>
<div class="header-bottom-contacts" *ngIf="ChatSystemService.getGroupRoom(roomId)"> <div class="header-bottom-contacts" *ngIf="ChatSystemService.getGroupRoom(roomId)">
<ion-label class="contacts-list" *ngFor="let member of ChatSystemService.getGroupRoom(roomId).membersExcludeMe" > <ion-label class="contacts-list"
*ngFor="let member of ChatSystemService.getGroupRoom(roomId).membersExcludeMe">
{{member.name}}, {{member.name}},
</ion-label> </ion-label>
</div> </div>
@@ -39,6 +40,7 @@
<i class="far fa-clock font-15"></i> <i class="far fa-clock font-15"></i>
<ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label> <ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label>
</div> </div>
{{ RouteService.history }}
</div> </div>
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
@@ -51,24 +53,31 @@
<ion-label>Esta conversa passou a grupo</ion-label><br /> <ion-label>Esta conversa passou a grupo</ion-label><br />
<ion-label>A conversa original mantêm-se como chat individual</ion-label> <ion-label>A conversa original mantêm-se como chat individual</ion-label>
</div> </div>
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of ChatSystemService.getGroupRoom(roomId).messages; let last = last" [class.messages-list-item-wrapper-active]="msg._id == selectedMsgId"> <div class="messages-list-item-wrapper container-width-100"
<div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.msg !=''" (press)="handlePress(msg._id)" [class.dateLabel]="msg.dateLabel"> *ngFor="let msg of ChatSystemService.getGroupRoom(roomId).messages; let last = last"
[class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
<div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}'
*ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.msg !=''"
(press)="handlePress(msg._id)" [class.dateLabel]="msg.dateLabel">
<div class="title" *ngIf="!msg.dateLabel"> <div class="title" *ngIf="!msg.dateLabel">
<ion-label>{{msg.u.name ?? ""}}</ion-label> <ion-label>{{msg.u.name ?? ""}}</ion-label>
<span class="time">{{msg.time}}</span> <span class="time">{{msg.time}}</span>
</div> </div>
<div class="message"> <div class="message">
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre> <pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem"
<pre *ngIf="msg.delate == true" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre> style="font-size: 0.8125rem !important;">{{msg.msg}}</pre>
<pre *ngIf="msg.delate == true" class="message-box text ma-0 font-13-rem"
style="font-size: 0.8125rem !important;">{{msg.msg}}</pre>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName"> <ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10"> Enviado</span> <span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10">
Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido pl-10" *ngIf="msg.viewed.length >= 1" > Lido</span> <span class="lido pl-10" *ngIf="msg.viewed.length >= 1"> Lido</span>
<div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div> <div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div>
</ion-label> </ion-label>
{{last ? scrollToBottom() : ''}} {{last ? scrollToBottom() : ''}}
@@ -77,78 +86,115 @@
<div *ngIf="msg.file && msg.delate == false"> <div *ngIf="msg.file && msg.delate == false">
<div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.file.type != 'application/meeting'" (press)="handlePress(msg._id)"> <div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}'
<div class="title"> class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}'
<ion-label>{{msg.u.name ?? ""}}</ion-label> *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.file.type != 'application/meeting'"
<span class="time">{{msg.time}}</span> (press)="handlePress(msg._id)">
</div> <div class="title">
<div class="message"> <ion-label>{{msg.u.name ?? ""}}</ion-label>
<div *ngIf="msg.attachments" class="message-attachments"> <span class="time">{{msg.time}}</span>
<div *ngFor="let file of msg.attachments"> </div>
<div *ngIf="msg.file.type == 'application/img' && !msg.attachments[0].image_url"> <div class="message">
NOT UPLOADED <div *ngIf="msg.attachments" class="message-attachments">
</div> <div *ngFor="let file of msg.attachments">
<div *ngIf="msg.file.type == 'application/img' && msg.attachments[0].image_url" (click)="openPreview(msg)"> <div *ngIf="msg.file.type == 'application/img' && !msg.attachments[0].image_url">
<div *ngIf="!msg.attachments[0].image_url"> NOT UPLOADED
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
<ion-icon name="image" class="file-icon"></ion-icon>
<ion-label>{{"Imagem"}}</ion-label>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.uploadingFile == false && msg.downloadAttachmentsTemp == 0" class="icon-download" src="assets/icon/theme/{{ThemeService.currentTheme}}/icons-download.svg" slot="end"></ion-icon>
<ion-icon *ngIf="msg.downloadLoader == true || msg.uploadingFile == true " class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg" slot="end"></ion-icon>
<ion-icon *ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false" src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
</ion-item>
</div> </div>
<img class="d-block width-100" *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image" > <div *ngIf="msg.file.type == 'application/img' && msg.attachments[0].image_url"
<ion-icon *ngIf="msg.attachments[0].image_url == null" name="download-outline"></ion-icon> (click)="openPreview(msg)">
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName"> <div *ngIf="!msg.attachments[0].image_url">
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10"> Enviado</span> <ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> --> <ion-icon name="image" class="file-icon"></ion-icon>
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> --> <ion-label>{{"Imagem"}}</ion-label>
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> --> <ion-icon
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> --> *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.uploadingFile == false && msg.downloadAttachmentsTemp == 0"
<span class="lido pl-10" *ngIf="msg.viewed.length >= 1" > Lido</span> class="icon-download" src="assets/icon/theme/{{ThemeService.currentTheme}}/icons-download.svg"
<div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div> slot="end"></ion-icon>
</ion-label> <ion-icon *ngIf="msg.downloadLoader == true || msg.uploadingFile == true " class="icon-download"
</div> src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg" slot="end"></ion-icon>
<div *ngIf="msg.file.type != 'application/img'"> <ion-icon
*ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false"
src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
</ion-item>
</div>
<img class="d-block width-100" *ngIf="msg.attachments[0].image_url"
src="{{msg.attachments[0].image_url}}" alt="image">
<ion-icon *ngIf="msg.attachments[0].image_url == null" name="download-outline"></ion-icon>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10">
Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido pl-10" *ngIf="msg.viewed.length >= 1"> Lido</span>
<div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
<div *ngIf="msg.file.type != 'application/img'">
<div class="file add-attachment-bg-color" *ngIf="msg.file.type != 'application/audio'"> <div class="file add-attachment-bg-color" *ngIf="msg.file.type != 'application/audio'">
<div (click)="openPreview(msg)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file"> <div (click)="openPreview(msg)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
<div *ngIf="!msg.attachments[0].image_url"> <div *ngIf="!msg.attachments[0].image_url">
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button"> <ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
<ion-icon *ngIf="msg.attachments[0].type != 'webtrix'" name="document" class="file-icon"></ion-icon> <ion-icon *ngIf="msg.attachments[0].type != 'webtrix'" name="document"
<ion-icon *ngIf="msg.attachments[0].type == 'webtrix'" src="assets/icon/webtrix.svg" class="file-icon"></ion-icon> class="file-icon"></ion-icon>
<ion-icon *ngIf="msg.attachments[0].type == 'webtrix'" src="assets/icon/webtrix.svg"
class="file-icon"></ion-icon>
<ion-label>{{ file.title}}</ion-label> <ion-label>{{ file.title}}</ion-label>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.attachments[0].type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon> <ion-icon
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.attachments[0].type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon> *ngIf="ThemeService.currentTheme == 'default' && msg.attachments[0].type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) "
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )" class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg" slot="end"></ion-icon> class="icon-download" src="assets/icon/theme/default/icons-download.svg"
slot="end"></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'gov' && msg.attachments[0].type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) "
class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )"
class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg"
slot="end"></ion-icon>
</ion-item> </ion-item>
</div> </div>
<div *ngIf="msg.attachments[0].image_url"> <div *ngIf="msg.attachments[0].image_url">
<span *ngIf="msg.file.type"> <span *ngIf="msg.file.type">
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon> <fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf"
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon> class="pdf-icon"></fa-icon>
<fa-icon *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'" icon="file-word" class="word-icon"></fa-icon> <fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word"
<fa-icon *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'" icon="file-word" class="excel-icon"></fa-icon> class="word-icon"></fa-icon>
<ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg"></ion-icon> <fa-icon
</span> *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'"
<ion-label class="file-title">{{file.title}}</ion-label> icon="file-word" class="word-icon"></fa-icon>
</div> <fa-icon
*ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
icon="file-word" class="excel-icon"></fa-icon>
<ion-icon *ngIf="msg.file.type == 'application/webtrix'"
src="assets/icon/webtrix.svg"></ion-icon>
</span>
<ion-label class="file-title">{{file.title}}</ion-label>
</div>
</div> </div>
</div> </div>
<div (click)="audioPreview(msg)" class="audio-contentainer" *ngIf="msg.file.type == 'application/audio' && !file.title_link"> <div (click)="audioPreview(msg)" class="audio-contentainer"
*ngIf="msg.file.type == 'application/audio' && !file.title_link">
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button"> <ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
<ion-icon name="mic-outline" class="file-icon"></ion-icon> <ion-icon name="mic-outline" class="file-icon"></ion-icon>
<ion-label>{{"Mensagem de voz"}}</ion-label> <ion-label>{{"Mensagem de voz"}}</ion-label>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.uploadingFile == false && msg.downloadAttachmentsTemp == 0" class="icon-download" src="assets/icon/theme/{{ThemeService.currentTheme}}/icons-download.svg" slot="end"></ion-icon> <ion-icon
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )" class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg" slot="end"></ion-icon> *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.uploadingFile == false && msg.downloadAttachmentsTemp == 0"
<ion-icon *ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false" src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon> class="icon-download" src="assets/icon/theme/{{ThemeService.currentTheme}}/icons-download.svg"
slot="end"></ion-icon>
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )"
class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg"
slot="end"></ion-icon>
<ion-icon
*ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false"
src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
</ion-item> </ion-item>
</div> </div>
<div class="audio-contentainer" *ngIf="msg.file.type == 'application/audio' && file.title_link"> <div class="audio-contentainer" *ngIf="msg.file.type == 'application/audio' && file.title_link">
<audio [src]="file.title_link|safehtml" preload="metadata" class="d-flex width-100" controls controlsList="nodownload noplaybackrate"></audio> <audio [src]="file.title_link|safehtml" preload="metadata" class="d-flex width-100" controls
controlsList="nodownload noplaybackrate"></audio>
</div> </div>
<div class="file-details-optional add-attachment-bg-color"> <div class="file-details-optional add-attachment-bg-color">
<ion-label *ngIf="msg.file && msg.file != ''"> <ion-label *ngIf="msg.file && msg.file != ''">
@@ -158,27 +204,31 @@
</ion-label> </ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName"> <ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10"> Enviado</span> <span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10">
Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido pl-10" *ngIf="msg.viewed.length >= 1" > Lido</span> <span class="lido pl-10" *ngIf="msg.viewed.length >= 1"> Lido</span>
<div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()"> Tentar</div> <div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()"> Tentar</div>
</ion-label> </ion-label>
</div> </div>
</div>
</div> </div>
</div> </div>
{{last ? scrollToBottom() : ''}}
</div> </div>
{{last ? scrollToBottom() : ''}}
</div> </div>
</div> <div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting"> <ion-label class="info-meeting-small">{{msg.u.name ?? ""}} criou esta reunião</ion-label><br />
<ion-label class="info-meeting-small">{{msg.u.name ?? ""}} criou esta reunião</ion-label><br /> <button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal"><ion-label
<button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br /> class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br />
<ion-label class="info-meeting-medium"><ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}</ion-label><br /> <ion-label class="info-meeting-medium"><ion-icon name="calendar-outline"></ion-icon> De
<ion-label class="info-meeting-medium"><ion-icon></ion-icon><ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}</ion-label><br /> {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}</ion-label><br />
</div> <ion-label class="info-meeting-medium"><ion-icon></ion-icon><ion-icon name="location-outline"></ion-icon>
{{msg.file.venue}}</ion-label><br />
</div>
</div> </div>
<div class="dateLabel" *ngIf="(msg.t == 'r' || msg.t == 'ul' || msg.t == 'au' || msg.t == 'ru') && msg.dateLabel"> <div class="dateLabel" *ngIf="(msg.t == 'r' || msg.t == 'ul' || msg.t == 'au' || msg.t == 'ru') && msg.dateLabel">
@@ -209,9 +259,9 @@
</div> </div>
{{last ? scrollToBottom() : ''}} {{last ? scrollToBottom() : ''}}
</div> </div>
<div *ngIf="msg.t == 'au' && msg.msg != sessionStore.user.UserName" > <div *ngIf="msg.t == 'au' && msg.msg != sessionStore.user.UserName">
<div *ngFor="let user of allUsers" > <div *ngFor="let user of allUsers">
<div *ngIf="msg.msg == user.username" class="info-text-leave"> <div *ngIf="msg.msg == user.username" class="info-text-leave">
<ion-label>Adicionou {{user.name}}</ion-label><br /> <ion-label>Adicionou {{user.name}}</ion-label><br />
</div> </div>
@@ -231,24 +281,24 @@
<ion-footer> <ion-footer>
<div class="typing" *ngIf="ChatSystemService.getGroupRoom(roomId).otherUserType == true"> <div class="typing" *ngIf="ChatSystemService.getGroupRoom(roomId).otherUserType == true">
<ngx-letters-avatar *ngIf="showAvatar" <ngx-letters-avatar *ngIf="showAvatar" [avatarName]="ChatSystemService.getGroupRoom(roomId).name" [width]="30"
[avatarName]= "ChatSystemService.getGroupRoom(roomId).name" [circular]="true" fontFamily="Roboto"></ngx-letters-avatar>
[width]="30"
[circular]="true"
fontFamily="Roboto"></ngx-letters-avatar>
{{ ChatSystemService.getGroupRoom(roomId).userThatIsTyping }} está a escrever... {{ ChatSystemService.getGroupRoom(roomId).userThatIsTyping }} está a escrever...
</div> </div>
<div class="width-100 pl-20 pr-20"> <div class="width-100 pl-20 pr-20">
<span *ngIf="!lastAudioRecorded">{{durationDisplay}}</span> <span *ngIf="!lastAudioRecorded">{{durationDisplay}}</span>
<audio [src]="audioRecorded" class="d-flex width-100 mt-10 mb-10" *ngIf="lastAudioRecorded" controls controlsList="nodownload noplaybackrate"></audio> <audio [src]="audioRecorded" class="d-flex width-100 mt-10 mb-10" *ngIf="lastAudioRecorded" controls
controlsList="nodownload noplaybackrate"></audio>
</div> </div>
<div class="container width-100 d-flex"> <div class="container width-100 d-flex">
<div> <div>
<button *ngIf="!recording && !lastAudioRecorded && allowTyping" class="btn-no-color" (click)="openChatOptions()"> <button *ngIf="!recording && !lastAudioRecorded && allowTyping" class="btn-no-color" (click)="openChatOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-options" src="assets/images/icons-add.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-options"
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-options" src="assets/images/theme/gov/icons-add.svg"></ion-icon> src="assets/images/icons-add.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-options"
src="assets/images/theme/gov/icons-add.svg"></ion-icon>
</button> </button>
<button *ngIf="recording || lastAudioRecorded || !allowTyping" class="btn-no-color" (click)="deleteRecording()"> <button *ngIf="recording || lastAudioRecorded || !allowTyping" class="btn-no-color" (click)="deleteRecording()">
<fa-icon class="icon-size-27" icon="trash"></fa-icon> <fa-icon class="icon-size-27" icon="trash"></fa-icon>
@@ -256,26 +306,37 @@
</div> </div>
<div class="message-box width-80"> <div class="message-box width-80">
<div *ngIf="!recording && !lastAudioRecorded" class="type-message"> <div *ngIf="!recording && !lastAudioRecorded" class="type-message">
<ion-textarea *ngIf="allowTyping" autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="ChatSystemService.getGroupRoom(roomId).message" (ionChange)="ChatSystemService.getGroupRoom(roomId).sendTyping()"></ion-textarea> <ion-textarea *ngIf="allowTyping" autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true"
placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1"
[(ngModel)]="ChatSystemService.getGroupRoom(roomId).message"
(ionChange)="ChatSystemService.getGroupRoom(roomId).sendTyping()"></ion-textarea>
</div> </div>
<div *ngIf="recording" class="d-flex align-items-center justify-content-center"> <div *ngIf="recording" class="d-flex align-items-center justify-content-center">
<button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center"> <button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center">
<ion-icon class="icon-size-45" name="stop-circle-outline" color="danger"></ion-icon> <ion-icon class="icon-size-45" name="stop-circle-outline" color="danger"></ion-icon>
</button> </button>
</div> </div>
</div> </div>
<div> <div>
<button #recordbtn *ngIf="!ChatSystemService.getGroupRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color"> <button #recordbtn *ngIf="!ChatSystemService.getGroupRoom(roomId).message && !lastAudioRecorded"
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon> (click)="startRecording()" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon>
</button> </button>
<button *ngIf="ChatSystemService.getGroupRoom(roomId).message" class="btn-no-color" (click)="sendMessage()"> <button *ngIf="ChatSystemService.getGroupRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> src="assets/icon/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button> </button>
<button *ngIf="!ChatSystemService.getGroupRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)"> <button *ngIf="!ChatSystemService.getGroupRoom(roomId).message && lastAudioRecorded" class="btn-no-color"
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> (click)="sendAudio(lastAudioRecorded)">
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button> </button>
</div> </div>
</div> </div>
@@ -31,6 +31,7 @@ import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page'; import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera';
import { RouteService } from 'src/app/services/route.service';
@Component({ @Component({
selector: 'app-group-messages', selector: 'app-group-messages',
templateUrl: './group-messages.page.html', templateUrl: './group-messages.page.html',
@@ -80,7 +81,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
durationDisplay = ''; durationDisplay = '';
duration = 0; duration = 0;
showAvatar = true; showAvatar = true;
audioPermissionStatus: 'granted'| 'denied' | 'prompt' | null = null audioPermissionStatus: 'granted' | 'denied' | 'prompt' | null = null
sessionStore = SessionStore sessionStore = SessionStore
isAdmin = false; isAdmin = false;
constructor( constructor(
@@ -102,6 +103,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
private sanitiser: DomSanitizer, private sanitiser: DomSanitizer,
private file: File, private file: File,
private fileOpener: FileOpener, private fileOpener: FileOpener,
public RouteService: RouteService,
) { ) {
this.ChatSystemService.getUser() this.ChatSystemService.getUser()
@@ -114,10 +116,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
}; };
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({}); this.open();
this.ChatSystemService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
this.ChatSystemService.openRoom(this.roomId)
this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
setTimeout(() => { setTimeout(() => {
this.scrollToBottomClicked() this.scrollToBottomClicked()
@@ -133,6 +132,20 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
open() {
try {
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
this.ChatSystemService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
this.ChatSystemService.openRoom(this.roomId)
this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
} catch (error) {
setTimeout(() => {
this.open()
}, 3000)
}
}
ngOnInit() { ngOnInit() {
this.loggedUser = this.loggedUserChat; this.loggedUser = this.loggedUserChat;
@@ -166,7 +179,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.scrollChangeCallback = () => this.onContentScrolled(event); this.scrollChangeCallback = () => this.onContentScrolled(event);
window.addEventListener('scroll', this.scrollChangeCallback, true); window.addEventListener('scroll', this.scrollChangeCallback, true);
if(this.room?.customFields?.countDownDate) { if (this.room?.customFields?.countDownDate) {
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id); this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
} }
} }
@@ -249,7 +262,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (recordData?.value?.recordDataBase64.includes('data:audio')) { if (recordData?.value?.recordDataBase64.includes('data:audio')) {
this.audioRecorded = this.sanitiser.bypassSecurityTrustResourceUrl(recordData?.value?.recordDataBase64); this.audioRecorded = this.sanitiser.bypassSecurityTrustResourceUrl(recordData?.value?.recordDataBase64);
} }
else if(recordData?.value?.mimeType && recordData?.value?.recordDataBase64) { else if (recordData?.value?.mimeType && recordData?.value?.recordDataBase64) {
this.audioRecorded = this.sanitiser.bypassSecurityTrustResourceUrl(`data:${recordData.value.mimeType};base64,${recordData?.value?.recordDataBase64}`); this.audioRecorded = this.sanitiser.bypassSecurityTrustResourceUrl(`data:${recordData.value.mimeType};base64,${recordData?.value?.recordDataBase64}`);
} }
}); });
@@ -290,22 +303,22 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
async startRecording() { async startRecording() {
VoiceRecorder.requestAudioRecordingPermission(); VoiceRecorder.requestAudioRecordingPermission();
if(await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) =>{return result.value})){ if (await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) => { return result.value })) {
if(await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => {return result.value})){ if (await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => { return result.value })) {
//if(await this.hasAudioRecordingPermission()){ //if(await this.hasAudioRecordingPermission()){
if (this.recording) { if (this.recording) {
return; return;
} }
this.recording = true; this.recording = true;
VoiceRecorder.startRecording(); VoiceRecorder.startRecording();
this.calculateDuration(); this.calculateDuration();
//} //}
} }
else{ else {
this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.'); this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.');
} }
} }
else{ else {
this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!'); this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!');
} }
} }
@@ -388,7 +401,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
if(SessionStore.user.ChatData.data.userId == this.room.u._id){ if (SessionStore.user.ChatData.data.userId == this.room.u._id) {
this.isAdmin = true this.isAdmin = true
} else { } else {
this.isAdmin = false this.isAdmin = false
@@ -534,7 +547,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
else if (res.data == 'edit') { else if (res.data == 'edit') {
this.editGroup(this.roomId); this.editGroup(this.roomId);
} else if (res.data == 'addUser') { } else if (res.data == 'addUser') {
this.addContacts(); this.addContacts();
} else if (res.data == 'delete') { } else if (res.data == 'delete') {
@@ -796,7 +809,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
_getBase64(file) { _getBase64(file) {
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject) => {
var reader = new FileReader(); var reader = new FileReader();
reader.readAsDataURL(file); reader.readAsDataURL(file);
reader.onload = function () { reader.onload = function () {
@@ -806,7 +819,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
console.log('Error: ', error); console.log('Error: ', error);
}; };
}) })
} }
async addFileToChat(types: typeof FileType[]) { async addFileToChat(types: typeof FileType[]) {
@@ -818,7 +831,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") { if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch ((error) => { const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch((error) => {
console.error(error); console.error(error);
}))); })));
const blob = this.fileService.base64toBlob(encodedData, file.type) const blob = this.fileService.base64toBlob(encodedData, file.type)
@@ -909,7 +922,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
async addContacts() { async addContacts() {
if(this.isAdmin) { if (this.isAdmin) {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: GroupContactsPage, component: GroupContactsPage,
@@ -1011,7 +1024,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} else { } else {
//Check if modal is opened //Check if modal is opened
if (document.querySelector('.isGroupChatOpened')) { if (document.querySelector('.isGroupChatOpened')) {
await new Promise(resolve => setTimeout(resolve, 5000)).catch ((error) => { await new Promise(resolve => setTimeout(resolve, 5000)).catch((error) => {
console.error(error); console.error(error);
}); });
await this.serverLongPull(); await this.serverLongPull();
@@ -1100,9 +1113,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}).then((dir) => { }).then((dir) => {
console.log('DIR ', dir) console.log('DIR ', dir)
this.fileOpener this.fileOpener
.open(dir.uri, type) .open(dir.uri, type)
.then(() => console.log()) .then(() => console.log())
.catch(e => console.error(e)) .catch(e => console.error(e))
}); });
} }
@@ -1120,7 +1133,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
async openPreview(msg: MessageService) { async openPreview(msg: MessageService) {
if(msg?.file?.type === "application/webtrix") { if (msg?.file?.type === "application/webtrix") {
this.viewDocument(msg.file, msg.attachments.image_url) this.viewDocument(msg.file, msg.attachments.image_url)
} else { } else {
if (!msg.attachments[0].image_url || msg.attachments[0].image_url === null || msg.attachments[0].image_url === '') { if (!msg.attachments[0].image_url || msg.attachments[0].image_url === null || msg.attachments[0].image_url === '') {
@@ -1197,11 +1210,11 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
// set the bytes of the buffer to the correct values // set the bytes of the buffer to the correct values
for (var i = 0; i < byteString.length; i++) { for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i); ia[i] = byteString.charCodeAt(i);
} }
// write the ArrayBuffer to a blob, and you're done // write the ArrayBuffer to a blob, and you're done
var blob = new Blob([ab], {type: mimeString}); var blob = new Blob([ab], { type: mimeString });
return blob; return blob;
} }
+114 -78
View File
@@ -1,4 +1,4 @@
<ion-header class="ion-no-border"> <ion-header class="ion-no-border" *ngIf="ChatSystemService.getDmRoom(roomId)">
<ion-toolbar class="header-toolbar"> <ion-toolbar class="header-toolbar">
<div class="main-header"> <div class="main-header">
<div class="header-top"> <div class="header-top">
@@ -11,7 +11,8 @@
<div class="middle-container" *ngIf="!showMessageOptions"> <div class="middle-container" *ngIf="!showMessageOptions">
<div class="middle"> <div class="middle">
<ion-label class="title">{{ChatSystemService.getDmRoom(roomId).name}}</ion-label> <ion-label class="title">{{ChatSystemService.getDmRoom(roomId).name}}</ion-label>
<span><ion-icon *ngIf="RochetChatConnectorService.isLogin" class="{{ ChatSystemService.getDmRoom(this.roomId).online }}" name="ellipse"></ion-icon></span> <span><ion-icon *ngIf="RochetChatConnectorService.isLogin"
class="{{ ChatSystemService.getDmRoom(this.roomId).online }}" name="ellipse"></ion-icon></span>
</div> </div>
</div> </div>
@@ -41,116 +42,150 @@
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
<ion-content> <ion-content *ngIf="ChatSystemService.getDmRoom(roomId)">
<div (click)="handleClick()" class="message-attachments messages" #scrollMe> <div (click)="handleClick()" class="message-attachments messages" #scrollMe>
<div class="messages-list-item-wrapper container-width-100 file" <div class="messages-list-item-wrapper container-width-100 file" (dragover)="onDragOver($event)"
(dragover)="onDragOver($event)"
(dragleave)="onDragLeave($event)" (dragleave)="onDragLeave($event)"
*ngFor="let msg of ChatSystemService.getDmRoom(this.roomId).messages; let last = last" *ngFor="let msg of ChatSystemService.getDmRoom(this.roomId).messages; let last = last"
[class.messages-list-item-wrapper-active]="msg._id == selectedMsgId"> [class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
<div (press)="handlePress(msg._id)" class='file message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' <div (press)="handlePress(msg._id)"
*ngIf="msg.msg !=''" [class.dateLabel]="msg.dateLabel"> class='file message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.msg !=''"
[class.dateLabel]="msg.dateLabel">
<div class="title file" *ngIf="!msg.dateLabel"> <div class="title file" *ngIf="!msg.dateLabel">
<ion-label >{{msg.u.name}}</ion-label> <ion-label>{{msg.u.name}}</ion-label>
<span class="time">{{msg.time}}</span> <span class="time">{{msg.time}}</span>
</div> </div>
<div> <div>
<div class="file"> <div class="file">
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre> <pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem"
<!-- <ion-label *ngIf="msg.delate == false" class="message-box">{{msg.msg}} </ion-label> --> style="font-size: 0.8125rem !important;">{{msg.msg}}</pre>
<ion-label *ngIf="msg.delate == true" class="flex-0">Apagou a mensagem</ion-label> <!-- <ion-label *ngIf="msg.delate == false" class="message-box">{{msg.msg}} </ion-label> -->
<ion-label *ngIf="msg.delate == true" class="flex-0">Apagou a mensagem</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName"> <ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10"> Enviado</span> <span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10">
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> --> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<span class="lido pl-10" *ngIf="msg.viewed.length >= 1" > Lido</span> <!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div> <span class="lido pl-10" *ngIf="msg.viewed.length >= 1"> Lido</span>
</ion-label> <div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div>
</div> </ion-label>
</div>
{{last ? scrollToBottom() : ''}} {{last ? scrollToBottom() : ''}}
</div> </div>
</div> </div>
<div *ngIf="msg.file && msg.delate == false"> <div *ngIf="msg.file && msg.delate == false">
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.file.type != 'application/meeting'"> <div (press)="handlePress(msg._id)"
<div class="title"> class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}'
<ion-label>{{msg.u.name}}</ion-label> *ngIf="msg.file.type != 'application/meeting'">
<span class="time">{{msg.time}}</span> <div class="title">
</div> <ion-label>{{msg.u.name}}</ion-label>
<div> <span class="time">{{msg.time}}</span>
<div *ngIf="msg.attachments" class="message-attachments"> </div>
<div *ngFor="let file of msg.attachments let i = index"> <div>
<div class="file" *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)"> <div *ngIf="msg.attachments" class="message-attachments">
<div *ngIf="!msg.attachments[0].image_url"> <div *ngFor="let file of msg.attachments let i = index">
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button"> <div class="file" *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)">
<ion-icon name="image" class="file-icon"></ion-icon> <div *ngIf="!msg.attachments[0].image_url">
<ion-label>{{"Imagem"}}</ion-label> <ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.uploadingFile == false && msg.downloadAttachmentsTemp == 0" class="icon-download" src="assets/icon/theme/{{ThemeService.currentTheme}}/icons-download.svg" slot="end"></ion-icon> <ion-icon name="image" class="file-icon"></ion-icon>
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )" class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg" slot="end"></ion-icon> <ion-label>{{"Imagem"}}</ion-label>
<ion-icon *ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false" src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon> <ion-icon
</ion-item> *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.uploadingFile == false && msg.downloadAttachmentsTemp == 0"
class="icon-download" src="assets/icon/theme/{{ThemeService.currentTheme}}/icons-download.svg"
slot="end"></ion-icon>
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )"
class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg"
slot="end"></ion-icon>
<ion-icon
*ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false"
src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
</ion-item>
</div>
<img class="d-block width-100" *ngIf="msg.attachments[0].image_url"
src="{{msg.attachments[0].image_url}}" alt="image">
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10">
Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido pl-10" *ngIf="msg.viewed.length >= 1"> Lido</span>
<div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div>
</ion-label>
</div> </div>
<img class="d-block width-100" *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image"> <div *ngIf="msg.file.type != 'application/img'">
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido pl-10" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
<div *ngIf="msg.file.type != 'application/img'">
<div class="file add-attachment-bg-color" *ngIf="msg.file.type != 'application/audio'"> <div class="file add-attachment-bg-color" *ngIf="msg.file.type != 'application/audio'">
<div (click)="docIndex(i); openPreview(msg)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file"> <div (click)="docIndex(i); openPreview(msg)" class="file-details add-ellipsis cursor-pointer"
*ngIf="msg.file">
<div *ngIf="!msg.attachments[0].image_url"> <div *ngIf="!msg.attachments[0].image_url">
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button"> <ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
<ion-icon *ngIf="msg.attachments[0].type != 'webtrix'" name="document" class="file-icon"></ion-icon> <ion-icon *ngIf="msg.attachments[0].type != 'webtrix'" name="document"
<ion-icon *ngIf="msg.attachments[0].type == 'webtrix'" src="assets/icon/webtrix.svg" class="file-icon"></ion-icon> class="file-icon"></ion-icon>
<ion-icon *ngIf="msg.attachments[0].type == 'webtrix'" src="assets/icon/webtrix.svg"
class="file-icon"></ion-icon>
<ion-label>{{ file.title}}</ion-label> <ion-label>{{ file.title}}</ion-label>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.attachments[0].type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon> <ion-icon
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.attachments[0].type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon> *ngIf="ThemeService.currentTheme == 'default' && msg.attachments[0].type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) "
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )" class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg" slot="end"></ion-icon> class="icon-download" src="assets/icon/theme/default/icons-download.svg"
slot="end"></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'gov' && msg.attachments[0].type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) "
class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )"
class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg"
slot="end"></ion-icon>
</ion-item> </ion-item>
</div> </div>
<div *ngIf="msg.attachments[0].image_url"> <div *ngIf="msg.attachments[0].image_url">
<span *ngIf="msg.file.type"> <span *ngIf="msg.file.type">
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon> <fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf"
<fa-icon *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'" icon="file-word" class="word-icon"></fa-icon> class="pdf-icon"></fa-icon>
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"> <fa-icon
</fa-icon> *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'"
<fa-icon icon="file-word" class="word-icon"></fa-icon>
*ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'" <fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon">
icon="file-word" class="excel-icon"></fa-icon> </fa-icon>
<ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg"> <fa-icon
</ion-icon> *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
</span> icon="file-word" class="excel-icon"></fa-icon>
<ion-label class="file-title">{{file.title}}</ion-label> <ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg">
</ion-icon>
</span>
<ion-label class="file-title">{{file.title}}</ion-label>
</div> </div>
<!-- <ion-progress-bar [type]="'indeterminate'" *ngIf="downloadLoader"></ion-progress-bar> --> <!-- <ion-progress-bar [type]="'indeterminate'" *ngIf="downloadLoader"></ion-progress-bar> -->
</div> </div>
</div> </div>
<div (click)="audioPreview(msg)" class="audio-contentainer" *ngIf="msg.file.type == 'application/audio' && !file.title_link"> <div (click)="audioPreview(msg)" class="audio-contentainer"
*ngIf="msg.file.type == 'application/audio' && !file.title_link">
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button"> <ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
<ion-icon name="mic-outline" class="file-icon"></ion-icon> <ion-icon name="mic-outline" class="file-icon"></ion-icon>
<ion-label>{{"Mensagem de voz"}}</ion-label> <ion-label>{{"Mensagem de voz"}}</ion-label>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.uploadingFile == false && msg.downloadAttachmentsTemp == 0" class="icon-download" src="assets/icon/theme/{{ThemeService.currentTheme}}/icons-download.svg" slot="end"></ion-icon> <ion-icon
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )" class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg" slot="end"></ion-icon> *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.uploadingFile == false && msg.downloadAttachmentsTemp == 0"
<ion-icon *ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false" src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon> class="icon-download" src="assets/icon/theme/{{ThemeService.currentTheme}}/icons-download.svg"
slot="end"></ion-icon>
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )"
class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg"
slot="end"></ion-icon>
<ion-icon
*ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false"
src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
</ion-item> </ion-item>
</div> </div>
<div class="file audio-contentainer" *ngIf="msg.file.type == 'application/audio' && file.title_link"> <div class="file audio-contentainer" *ngIf="msg.file.type == 'application/audio' && file.title_link">
@@ -166,12 +201,13 @@
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName"> <ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10"> Enviado</span> <span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado pl-10">
Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> --> <!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido pl-10" *ngIf="msg.viewed.length >= 1" > Lido</span> <span class="lido pl-10" *ngIf="msg.viewed.length >= 1"> Lido</span>
<div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div> <div *ngIf="msg.manualRetry" class="try pl-10" (click)="msg.send()">Tentar</div>
</ion-label> </ion-label>
@@ -213,7 +249,7 @@
</ion-content> </ion-content>
<ion-footer (click)="ChatSystemService.getDmRoom(roomId).sendReadMessage()"> <ion-footer *ngIf="ChatSystemService.getDmRoom(roomId)" (click)="ChatSystemService.getDmRoom(roomId).sendReadMessage()">
<div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true"> <div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true">
<ngx-letters-avatar [avatarName]="ChatSystemService.getGroupRoom(roomId).name" [width]="30" [circular]="true" <ngx-letters-avatar [avatarName]="ChatSystemService.getGroupRoom(roomId).name" [width]="30" [circular]="true"
+47 -36
View File
@@ -118,39 +118,50 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
private router: Router, private router: Router,
public RochetChatConnectorService: RochetChatConnectorService, public RochetChatConnectorService: RochetChatConnectorService,
) { ) {
this.loggedUser = SessionStore.user.ChatData['data'];
this.roomId = this.navParams.get('roomId'); try {
this.loggedUser = SessionStore.user.ChatData['data'];
this.roomId = this.navParams.get('roomId');
window.onresize = (event) => { window.onresize = (event) => {
if (window.innerWidth > 701) { if (window.innerWidth > 701) {
this.modalController.dismiss(); this.modalController.dismiss();
}
} }
this.ChatSystemService.getDmRoom(this.roomId).loadHistory({})
this.ChatSystemService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.ChatSystemService.openRoom(this.roomId)
setTimeout(() => {
this.scrollToBottomClicked()
}, 150)
} catch (error) {
//alert(error)
} }
this.ChatSystemService.getDmRoom(this.roomId).loadHistory({})
this.ChatSystemService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.ChatSystemService.openRoom(this.roomId)
setTimeout(() => {
this.scrollToBottomClicked()
}, 150)
} }
ngOnInit() { ngOnInit() {
console.log(this.router.url); try {
this.createDirectoryImage() console.log(this.router.url);
// this.chatService.refreshtoken(); this.createDirectoryImage()
this.ChatSystemService.getUserOfRoom(this.roomId).then((value) => { // this.chatService.refreshtoken();
this.ChatSystemService.getUserOfRoom(this.roomId).then((value) => {
}).catch((error) => { }).catch((error) => {
console.error(error) console.error(error)
}) })
this.getChatMembers();
} catch (error) {
//alert(error)
}
this.getChatMembers();
} }
@@ -175,8 +186,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
longpress.enable(); longpress.enable();
} }
onDragOver(e?) {} onDragOver(e?) { }
onDragLeave(e?) {} onDragLeave(e?) { }
calculateDuration() { calculateDuration() {
if (!this.recording) { if (!this.recording) {
@@ -668,7 +679,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
dataURItoBlob(dataURI) { dataURItoBlob(dataURI) {
// convert base64 to raw binary data held in a string // convert base64 to raw binary data held in a string
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
var byteString = atob(dataURI.split(',')[1]); var byteString = atob(dataURI.split(',')[1]);
@@ -684,11 +695,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
// set the bytes of the buffer to the correct values // set the bytes of the buffer to the correct values
for (var i = 0; i < byteString.length; i++) { for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i); ia[i] = byteString.charCodeAt(i);
} }
// write the ArrayBuffer to a blob, and you're done // write the ArrayBuffer to a blob, and you're done
var blob = new Blob([ab], {type: mimeString}); var blob = new Blob([ab], { type: mimeString });
return blob; return blob;
} }
@@ -810,7 +821,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
_getBase64(file) { _getBase64(file) {
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject) => {
var reader = new FileReader(); var reader = new FileReader();
reader.readAsDataURL(file); reader.readAsDataURL(file);
reader.onload = function () { reader.onload = function () {
@@ -820,7 +831,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
console.log('Error: ', error); console.log('Error: ', error);
}; };
}) })
} }
async addFileToChat(types: typeof FileType[]) { async addFileToChat(types: typeof FileType[]) {
console.log('add file') console.log('add file')
@@ -844,18 +855,18 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") { if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
console.log('TYPE',file.type) console.log('TYPE', file.type)
const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch ((error) => { const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch((error) => {
console.error(error); console.error(error);
}))); })));
console.log(encodedData) console.log(encodedData)
const blob = this.fileService.base64toBlob(encodedData, file.type) const blob = this.fileService.base64toBlob(encodedData, file.type)
console.log('BLOB BLOB',blob) console.log('BLOB BLOB', blob)
const formData = new FormData(); const formData = new FormData();
formData.append('blobFile', blob); formData.append('blobFile', blob);
/* console.log('add file', fileBase64) */ /* console.log('add file', fileBase64) */
this.ChatSystemService.getDmRoom(roomId).send({ this.ChatSystemService.getDmRoom(roomId).send({
file: { file: {
@@ -1065,9 +1076,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}).then((dir) => { }).then((dir) => {
console.log('DIR ', dir) console.log('DIR ', dir)
this.fileOpener this.fileOpener
.open(dir.uri, type) .open(dir.uri, type)
.then(() => console.log()) .then(() => console.log())
.catch(e => console.error(e)) .catch(e => console.error(e))
}); });
} }
+60 -60
View File
@@ -13,14 +13,14 @@ import { ToastService } from 'src/app/services/toast.service';
styleUrls: ['./new-group.page.scss'], styleUrls: ['./new-group.page.scss'],
}) })
export class NewGroupPage implements OnInit { export class NewGroupPage implements OnInit {
isGroupCreated:boolean; isGroupCreated: boolean;
showLoader: boolean; showLoader: boolean;
displayDuration: any; displayDuration: any;
showDuration: boolean; showDuration: boolean;
selectedDuration = ['','','']; selectedDuration = ['', '', ''];
thedate:any; thedate: any;
groupName:string; groupName: string;
documents:any; documents: any;
loggedUserChat: any; loggedUserChat: any;
constructor( constructor(
@@ -46,7 +46,7 @@ export class NewGroupPage implements OnInit {
_ionChange(event) { _ionChange(event) {
this.showDuration = event.detail.checked; this.showDuration = event.detail.checked;
if(event.detail.checked) { if (event.detail.checked) {
this.thedate = new Date(); this.thedate = new Date();
} }
else { else {
@@ -57,28 +57,28 @@ export class NewGroupPage implements OnInit {
this.modalController.dismiss(); this.modalController.dismiss();
} }
async createGroup(){ async createGroup() {
let name = this.groupName.split(' ').join('-'); let name = this.groupName.split(' ').join('-');
//Take out all special characters in string //Take out all special characters in string
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
let customFields = {} let customFields = {}
let res:any; let res: any;
if(this.thedate) { if (this.thedate) {
let customFields = { let customFields = {
"countDownDate": this.thedate "countDownDate": this.thedate
} }
res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields); res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
} }
else{ else {
res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields); res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
} }
this.isGroupCreated = true; this.isGroupCreated = true;
this.addContacts(res.result); this.addContacts(res.result);
this.ChatSystemService.getAllRooms(); this.ChatSystemService.getRoom([res.result]);
setTimeout(() => { setTimeout(() => {
this.ChatSystemService.subscribeToRoomUpdate(res.result.rid, res.result); this.ChatSystemService.subscribeToRoomUpdate(res.result.rid, res.result);
@@ -86,13 +86,13 @@ export class NewGroupPage implements OnInit {
if(res?.result?.rid) { if (res?.result?.rid) {
this.ChatSystemService.getAllRooms(() => { this.ChatSystemService.getAllRooms(() => {
if(!this.ChatSystemService.getGroupRoom(res.result.rid)) { if (!this.ChatSystemService.getGroupRoom(res.result.rid)) {
this.createGroupWithAttachmentsCath(res) this.createGroupWithAttachmentsCath(res)
} else { } else {
setTimeout(()=> { setTimeout(() => {
this.createGroupWithAttachments(res) this.createGroupWithAttachments(res)
@@ -112,8 +112,8 @@ export class NewGroupPage implements OnInit {
createGroupWithAttachmentsCath(res: any) { createGroupWithAttachmentsCath(res: any) {
if(!this.ChatSystemService.getGroupRoom(res.result.rid)) { if (!this.ChatSystemService.getGroupRoom(res.result.rid)) {
setTimeout(()=>{ setTimeout(() => {
this.createGroupWithAttachmentsCath(res) this.createGroupWithAttachmentsCath(res)
}, 1500) }, 1500)
} else { } else {
@@ -124,7 +124,7 @@ export class NewGroupPage implements OnInit {
createGroupWithAttachments(res: any) { createGroupWithAttachments(res: any) {
this.ChatSystemService.getGroupRoom(res.result.rid).hasLoadHistory = true; this.ChatSystemService.getGroupRoom(res.result.rid).hasLoadHistory = true;
if(this.documents) { if (this.documents) {
this.documents.forEach(element => { this.documents.forEach(element => {
this.ChatSystemService.getGroupRoom(res.result.rid).send({ this.ChatSystemService.getGroupRoom(res.result.rid).send({
file: { file: {
@@ -196,62 +196,62 @@ export class NewGroupPage implements OnInit {
const picker = await this.pickerController.create({ const picker = await this.pickerController.create({
cssClass: '', cssClass: '',
buttons: [ buttons: [
{ {
text: 'Cancelar', role: 'cancel', cssClass: 'btn-cancel' text: 'Cancelar', role: 'cancel', cssClass: 'btn-cancel'
}, },
{ {
text: 'Ok', text: 'Ok',
cssClass: 'btn-cancel', cssClass: 'btn-cancel',
handler:(value:any) => { handler: (value: any) => {
let now = new Date(); let now = new Date();
this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds()); this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds());
this.selectedDuration = [ this.selectedDuration = [
value.days.value, value.days.value,
value.hours.value, value.hours.value,
value.minutes.value, value.minutes.value,
] ]
if(value.days.value != null && value.hours.value != null && value.minutes.value != null){ if (value.days.value != null && value.hours.value != null && value.minutes.value != null) {
if(value.days.value > 0) { if (value.days.value > 0) {
if(value.days.value == 1) { if (value.days.value == 1) {
if(value.hours.value == 1) { if (value.hours.value == 1) {
this.displayDuration = value.days.value + " day " + this.displayDuration = value.days.value + " day " +
value.hours.value + " hora " + value.hours.value + " hora " +
value.minutes.value + " minutos"; value.minutes.value + " minutos";
}
else{
this.displayDuration = value.days.value + " days " +
value.hours.value + " horas " +
value.minutes.value + " minutos";
}
} }
else{ else {
if(value.hours.value == 1){ this.displayDuration = value.days.value + " days " +
this.displayDuration = value.days.value + " days " +
value.hours.value + " hora " +
value.minutes.value + " minutos";
}
else{
this.displayDuration = value.days.value + " days " +
value.hours.value + " horas " + value.hours.value + " horas " +
value.minutes.value + " minutos"; value.minutes.value + " minutos";
}
} }
} }
else{ else {
if(value.hours.value == 1){ if (value.hours.value == 1) {
this.displayDuration = value.hours.value + " hora " + this.displayDuration = value.days.value + " days " +
value.minutes.value + " minutos"; value.hours.value + " hora " +
value.minutes.value + " minutos";
} }
else{ else {
this.displayDuration = value.hours.value + " horas " + this.displayDuration = value.days.value + " days " +
value.minutes.value + " minutos"; value.hours.value + " horas " +
value.minutes.value + " minutos";
} }
} }
} }
}, else {
if (value.hours.value == 1) {
this.displayDuration = value.hours.value + " hora " +
value.minutes.value + " minutos";
}
else {
this.displayDuration = value.hours.value + " horas " +
value.minutes.value + " minutos";
}
}
}
},
}, },
], ],
columns: [ columns: [
@@ -301,7 +301,7 @@ export class NewGroupPage implements OnInit {
] ]
}); });
await picker.present(); await picker.present();
picker.onDidDismiss().then(async data =>{ picker.onDidDismiss().then(async data => {
let day = await picker.getColumn('days'); let day = await picker.getColumn('days');
let hour = await picker.getColumn('hours'); let hour = await picker.getColumn('hours');
let minutes = await picker.getColumn('minutes'); let minutes = await picker.getColumn('minutes');
@@ -84,14 +84,15 @@
<ion-footer class="ion-no-border"> <ion-footer class="ion-no-border">
<ion-toolbar class="d-flex"> <ion-toolbar class="d-flex">
<ion-buttons class="flex-grow-1" slot="start"> <ion-buttons class="flex-grow-1" slot="start">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
<ion-buttons class="flex-grow-1" slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()"> <button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Gravar</ion-label> <ion-label>Gravar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons class="flex-grow-1" slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
</ion-toolbar> </ion-toolbar>
</ion-footer> </ion-footer>
@@ -5,6 +5,7 @@ import { ContactsService } from 'src/app/services/contacts.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { LoginUserRespose } from 'src/app/models/user.model'; import { LoginUserRespose } from 'src/app/models/user.model';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { Router } from '@angular/router';
@Component({ @Component({
selector: 'app-attendees', selector: 'app-attendees',
@@ -25,6 +26,7 @@ export class AttendeesPageModal implements OnInit {
taskParticipantsCc:EventPerson[] = []; taskParticipantsCc:EventPerson[] = [];
loggeduser: LoginUserRespose; loggeduser: LoginUserRespose;
@Input() loggedAttendSon: boolean; @Input() loggedAttendSon: boolean;
taskType: any;
constructor( constructor(
@@ -32,16 +34,20 @@ export class AttendeesPageModal implements OnInit {
private contactsService: ContactsService, private contactsService: ContactsService,
private navParams: NavParams, private navParams: NavParams,
private modalController: ModalController, private modalController: ModalController,
public ThemeService: ThemeService) { public ThemeService: ThemeService,
private router: Router,) {
this.adding = this.navParams.get('adding'); this.adding = this.navParams.get('adding');
this.taskParticipants = this.navParams.get('taskParticipants'); this.taskParticipants = this.navParams.get('taskParticipants');
this.taskParticipantsCc = this.navParams.get('taskParticipantsCc'); this.taskParticipantsCc = this.navParams.get('taskParticipantsCc');
this.taskType = this.navParams.get('taskType');
this.loggeduser = SessionStore.user; this.loggeduser = SessionStore.user;
} }
ngOnInit() { ngOnInit() {
console.log('Pesquisa de contactos current path1',this.router.url)
this.fetchContacts(""); this.fetchContacts("");
if(this.taskParticipants == null || this.taskParticipants == undefined){ if(this.taskParticipants == null || this.taskParticipants == undefined){
@@ -149,8 +155,12 @@ export class AttendeesPageModal implements OnInit {
this.contacts = result; this.contacts = result;
console.log('Attendes Email',this.loggeduser.Email) console.log('Attendes Email',this.loggeduser.Email)
let filterLoggedUserEmail = this.contacts.filter(item => item.EmailAddress.toLocaleLowerCase() != this.loggeduser.Email.toLocaleLowerCase()) let filterLoggedUserEmail = this.contacts.filter(item => item.EmailAddress.toLocaleLowerCase() != this.loggeduser.Email.toLocaleLowerCase())
if(this.taskType == 0 || this.taskType == 1){
filterLoggedUserEmail = this.contacts.filter(item => item.IsPR == false)
}
console.log('Attendes Email', filterLoggedUserEmail) console.log('Attendes Email', filterLoggedUserEmail)
let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "") let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "")
this.contacts = filterEmptyEmail; this.contacts = filterEmptyEmail;
console.log('Attendes Email', this.contacts) console.log('Attendes Email', this.contacts)
this.showLoader = false; this.showLoader = false;
+315 -332
View File
@@ -1,313 +1,314 @@
@import '~src/function.scss'; @import "~src/function.scss";
:host { :host {
// mobile // mobile
background: var(--background-mobile); background: var(--background-mobile);
} }
// desktop // desktop
@media only screen and (min-width: 1365px) { @media only screen and (min-width: 1365px) {
// set color to body // set color to body
:host { :host {
// mobile // mobile
background: var(--background-desktop) !important ; background: var(--background-desktop) !important ;
} }
} }
/* HEADER */ /* HEADER */
.bg-blue{ .bg-blue {
--background:#0782c9; --background: #0782c9;
background:#0782c9; background: #0782c9;
--background-color:#0782c9; --background-color: #0782c9;
background-color:#0782c9; background-color: #0782c9;
color: #ffffff; color: #ffffff;
--color: #ffffff; --color: #ffffff;
} }
ion-toolbar{ ion-toolbar {
--background: white; --background: white;
} }
.ion-text-header-top{ .ion-text-header-top {
width: 100%; width: 100%;
--background: transparent; --background: transparent;
text-align: center; text-align: center;
padding-top: 15px; padding-top: 15px;
color: #ffffff; color: #ffffff;
/* border: 1px solid red; */ /* border: 1px solid red; */
} }
.div-top-header{ .div-top-header {
width: 400px; width: 400px;
margin: 0 auto; margin: 0 auto;
background-color: #0782c9; background-color: #0782c9;
overflow: auto; overflow: auto;
padding-top: 15px; padding-top: 15px;
border: 0!important; border: 0 !important;
.div-search{ .div-search {
font-size: rem(45); font-size: rem(45);
float: left; float: left;
margin: 0 0 0 10px margin: 0 0 0 10px;
}
.div-logo{
background: transparent;
width: 140px;
margin: 5px 0 0px 71px;
float: left;
}
.div-logo img{
width: 100%;
}
.div-profile{
font-size: rem(45);
float: right;
margin-right: 10px;
}
} }
.ion-text-header-top p{ .div-logo {
--background: transparent;
color: #ffffff;
}
.ion-text-right{
--background: transparent;
color: #ffffff;
}
.header-large{
font-family: Arial, Helvetica, sans-serif;
font-size: rem(17);
/* font-weight: 600; */
background: transparent; background: transparent;
color: #ffffff; width: 140px;
margin: 5px 0 0px 71px;
float: left;
} }
.header-xsmall{ .div-logo img {
font-family: Arial, Helvetica, sans-serif; width: 100%;
font-size: rem(13);
font-weight: bold;
padding-bottom: 3.5px;
margin-bottom: 3.5px;
border-bottom: 1px solid #ccc;
background: transparent;
} }
.header-medium{ .div-profile {
font-size: rem(16); font-size: rem(45);
text-align: left; float: right;
font-family: roboto; margin-right: 10px;
background: transparent;
margin-right: 5px;
line-height: rem(25);
} }
}
.p-small{ .ion-text-header-top p {
font-size: rem(17); --background: transparent;
margin-top: 13px; color: #ffffff;
color: var(--header-tab-text-white); }
margin-right: 25px !important; .ion-text-right {
text-align: right; --background: transparent;
/* color: #ffffff; */ color: #ffffff;
} }
.header-large {
/* CONTENT */ font-family: Arial, Helvetica, sans-serif;
.item-list-small{ font-size: rem(17);
font-size: rem(14); /* font-weight: 600; */
overflow: auto; background: transparent;
} color: #ffffff;
.ion-item-class{ }
padding: 0; .header-xsmall {
font-family: Arial, Helvetica, sans-serif;
} font-size: rem(13);
.label-text{ font-weight: bold;
width: 100%; padding-bottom: 3.5px;
padding: 0; margin-bottom: 3.5px;
margin: 0; border-bottom: 1px solid #ccc;
} background: transparent;
}
//DIV .header-medium {
.div-item-Oficial{ font-size: rem(16);
width: 100%; text-align: left;
overflow: auto; font-family: roboto;
/* border-bottom: 1px solid #ccc; */ background: transparent;
margin: 10px 0 5px 0; margin-right: 5px;
background: #cab0dc; line-height: rem(25);
border-radius: 20px;
padding: 10px;
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
}
.div-item-Pessoal{
width: 100%;
overflow: auto;
/* border-bottom: 1px solid #ccc; */
margin: 10px 0 5px 0;
background: #cbeecb;
border-radius: 20px;
padding: 10px;
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
}
.div-up{
width: 100%;
overflow: auto;
}
.div-up h3{
margin: 0;
padding: 0;
font-size: rem(17);
width: 100%;
}
.div-icon{
width: 10%;
font-size: rem(22);
float: left;
color: #808080;
}
.div-icon ion-icon{
display: block;
margin: 0 auto;
}
.div-content-Oficial{
width: 85%;
float: left;
border-left: 4px solid #cab0dc;
padding: 0 0 0 12px;
}
.div-content-Pessoal{
width: 85%;
float: left;
border-left: 4px solid #cbeecb;
padding: 0 0 0 12px;
}
.div-content-Oficial h3, .div-content-Pessoal h3{
font-size: rem(19);
/* border: 1px solid red; */
}
.div-content-Oficial p, .div-content-Pessoal p{
font-size: rem(16);
color: rgb(94, 92, 92);
padding: 0 !important;
margin: 0 !important;
}
.div-botton{
width: 100%;
overflow: auto;
margin: 10px 0 5px 0;
}
.div-botton-left{
width: 10%;
float: left;
}
.ion-icon-location{
text-align: center;
display: block;
color: var(--subtitle-text-color);
font-size: rem(16);
margin: 0 auto;
min-height: 19px;
}
.div-botton-middle{
width: 75%;
float: left;
margin-top: 0.5px;
}
.div-botton-middle p{
padding: 0;
margin: 0;
}
.div-botton-right{
width: 10%;
float: left;
margin: 0;
padding: 0;
}
.ion-icon-attach{
color: #666666;
font-size: rem(20);
}
/* NEW CSS FOR TOGGLE BUTTON */
.toggleBox{
margin:20px 20px 0 0;
}
input[type="checkbox"]{
position: relative;
width: 96px;
height: 34px;
background: #ffffff;
-webkit-appearance: none;
border-radius: 20px;
outline: none;
transition: .4s;
/* box-shadow: inset 0 0 5px rgba(0,0,0,0.2); */
cursor: pointer;
border:1px solid #e16817;
}
input:checked[type="checkbox"]{
background: #e16817;
}
input[type="checkbox"]::before{
z-index: 2;
position: absolute;
content: "";
left: 0;
width: rem(30);
height: 30px;
background: #fff;
border-radius: 50%;
/* transform: scale(1.1); */
box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
border:1px solid #e16817;
}
input:checked[type="checkbox"]::before{
left: 65px;
}
.toggle{
position: relative;
display: inline;
font-family: 'Montserrat', sans-serif;
display: grid;
text-align: center;
}
label{
position: absolute;
color: #fff;
font-weight: 600;
font-size: rem(12);
pointer-events: none;
}
.onbtn{
top:10px;
bottom: 15px;
left: 15px;
/* padding-top: 10px;
border: 1px solid red; */
}
.ofbtn{
top:10px;
bottom: 15px;
right: 14px;
color: #e16817;
}
// new
.main{
padding: 0px em(20px);
background: linear-gradient(270deg, var(--color2) 100%, var(--color3) 100%, var(--color4) 100%, var(--color5) 100%) !important;
} }
.event-number{ .p-small {
font-size: rem(17);
margin-top: 13px;
color: var(--header-tab-text-white);
margin-right: 25px !important;
text-align: right;
/* color: #ffffff; */
}
/* CONTENT */
.item-list-small {
font-size: rem(14);
overflow: auto;
}
.ion-item-class {
padding: 0;
}
.label-text {
width: 100%;
padding: 0;
margin: 0;
}
//DIV
.div-item-Oficial {
width: 100%;
overflow: auto;
/* border-bottom: 1px solid #ccc; */
margin: 10px 0 5px 0;
background: #cab0dc;
border-radius: 20px;
padding: 10px;
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
}
.div-item-Pessoal {
width: 100%;
overflow: auto;
/* border-bottom: 1px solid #ccc; */
margin: 10px 0 5px 0;
background: #cbeecb;
border-radius: 20px;
padding: 10px;
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
}
.div-up {
width: 100%;
overflow: auto;
}
.div-up h3 {
margin: 0;
padding: 0;
font-size: rem(17);
width: 100%;
}
.div-icon {
width: 10%;
font-size: rem(22);
float: left;
color: #808080;
}
.div-icon ion-icon {
display: block;
margin: 0 auto;
}
.div-content-Oficial {
width: 85%;
float: left;
border-left: 4px solid #cab0dc;
padding: 0 0 0 12px;
}
.div-content-Pessoal {
width: 85%;
float: left;
border-left: 4px solid #cbeecb;
padding: 0 0 0 12px;
}
.div-content-Oficial h3,
.div-content-Pessoal h3 {
font-size: rem(19);
/* border: 1px solid red; */
}
.div-content-Oficial p,
.div-content-Pessoal p {
font-size: rem(16);
color: rgb(94, 92, 92);
padding: 0 !important;
margin: 0 !important;
}
.div-botton {
width: 100%;
overflow: auto;
margin: 10px 0 5px 0;
}
.div-botton-left {
width: 10%;
float: left;
}
.ion-icon-location {
text-align: center;
display: block;
color: var(--subtitle-text-color);
font-size: rem(16);
margin: 0 auto;
min-height: 19px;
}
.div-botton-middle {
width: 75%;
float: left;
margin-top: 0.5px;
}
.div-botton-middle p {
padding: 0;
margin: 0;
}
.div-botton-right {
width: 10%;
float: left;
margin: 0;
padding: 0;
}
.ion-icon-attach {
color: #666666;
font-size: rem(20);
}
/* NEW CSS FOR TOGGLE BUTTON */
.toggleBox {
margin: 20px 20px 0 0;
}
input[type="checkbox"] {
position: relative;
width: 96px;
height: 34px;
background: #ffffff;
-webkit-appearance: none;
border-radius: 20px;
outline: none;
transition: 0.4s;
/* box-shadow: inset 0 0 5px rgba(0,0,0,0.2); */
cursor: pointer;
border: 1px solid #e16817;
}
input:checked[type="checkbox"] {
background: #e16817;
}
input[type="checkbox"]::before {
z-index: 2;
position: absolute;
content: "";
left: 0;
width: rem(30);
height: 30px;
background: #fff;
border-radius: 50%;
/* transform: scale(1.1); */
box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
border: 1px solid #e16817;
}
input:checked[type="checkbox"]::before {
left: 65px;
}
.toggle {
position: relative;
display: inline;
font-family: "Montserrat", sans-serif;
display: grid;
text-align: center;
}
label {
position: absolute;
color: #fff;
font-weight: 600;
font-size: rem(12);
pointer-events: none;
}
.onbtn {
top: 10px;
bottom: 15px;
left: 15px;
/* padding-top: 10px;
border: 1px solid red; */
}
.ofbtn {
top: 10px;
bottom: 15px;
right: 14px;
color: #e16817;
}
// new
.main {
padding: 0px em(20px);
background: linear-gradient(
270deg,
var(--color2) 100%,
var(--color3) 100%,
var(--color4) 100%,
var(--color5) 100%
) !important;
}
.event-number {
color: var(--header-tab-text-white); color: var(--header-tab-text-white);
font-family: Roboto; font-family: Roboto;
font-size: rem(15); font-size: rem(15);
bold{ bold {
font-family: Roboto; font-family: Roboto;
font-size: rem(25); font-size: rem(25);
text-align: right; text-align: right;
color: var(--white); color: var(--white);
} }
} }
.time{ .time {
font-family: Roboto; font-family: Roboto;
text-align: center; text-align: center;
color: var(--header-tab-text-white); color: var(--header-tab-text-white);
@@ -316,7 +317,7 @@ ion-toolbar{
width: 100%; width: 100%;
} }
.next-meeting{ .next-meeting {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin: 0px 20px; margin: 0px 20px;
@@ -361,7 +362,7 @@ ion-toolbar{
overflow: auto; overflow: auto;
padding-bottom: 25px; padding-bottom: 25px;
.schedule-header{ .schedule-header {
display: flex; display: flex;
margin-bottom: 20px; margin-bottom: 20px;
justify-content: space-between; justify-content: space-between;
@@ -371,13 +372,13 @@ ion-toolbar{
display: flex; display: flex;
align-items: center; align-items: center;
.icon{ .icon {
color: #e8e8e8; color: #e8e8e8;
height: rem(35); height: rem(35);
width: rem(35); width: rem(35);
margin-right: 10px; margin-right: 10px;
} }
.text{ .text {
font-family: Roboto; font-family: Roboto;
font-size: rem(20); font-size: rem(20);
color: black; color: black;
@@ -391,29 +392,28 @@ ion-toolbar{
color: #e8e8e8; color: #e8e8e8;
} }
} }
.content{ .content {
//padding: 0px 20px 20px 20px; //padding: 0px 20px 20px 20px;
overflow: auto; overflow: auto;
.item-exp{ .item-exp {
overflow: auto; overflow: auto;
//padding-top: 5px; //padding-top: 5px;
//padding-bottom: 5px; //padding-bottom: 5px;
padding: 5px 20px 5px 20px; padding: 5px 20px 5px 20px;
background-color: transparent !important; background-color: transparent !important;
} }
ion-list{ ion-list {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
background-color: transparent !important; background-color: transparent !important;
.d-flex{ .d-flex {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
ion-item{ ion-item {
padding-bottom: 5px; padding-bottom: 5px;
margin-top: 5px; margin-top: 5px;
border-bottom: 1px solid #ebebeb; border-bottom: 1px solid #ebebeb;
@@ -422,56 +422,57 @@ ion-toolbar{
align-items: center; align-items: center;
background-color: transparent; background-color: transparent;
--background: transparent; --background: transparent;
.schedule-time{ .schedule-time {
margin-right: 10px; margin-right: 10px;
.time-start{ .time-start {
color: #797979 !important; color: #797979 !important;
font-family: Roboto; font-family: Roboto;
font-size: rem(13); font-size: rem(13);
} }
.time-end{ .time-end {
color: #797979 !important; color: #797979 !important;
font-family: Roboto; font-family: Roboto;
font-size: rem(13); font-size: rem(13);
} }
} }
.schedule-date{ .schedule-date {
margin-right: 10px; margin-right: 10px;
color: #797979 !important; color: #797979 !important;
font-size: rem(13); font-size: rem(13);
} }
.schedule-details{ .schedule-details {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
width: 78%; width: 78%;
min-height: 39px; min-height: 39px;
align-items: baseline; align-items: baseline;
.location{ .location {
font-family: Roboto; font-family: Roboto;
font-size: rem(15); font-size: rem(15);
color: black; color: black;
min-height: 19px; min-height: 19px;
width: 100%; width: 100%;
} }
.description{ .description {
width: 100%;
font-family: Roboto; font-family: Roboto;
font-size: rem(13); font-size: rem(13);
font-weight: bold; font-weight: bold;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
//color: #0d89d1; //color: #0d89d1;
color: var(--title-text-color) color: var(--title-text-color);
} }
.description p{ .description p {
white-space: nowrap; white-space: nowrap;
overflow: hidden !important; overflow: hidden !important;
text-overflow: ellipsis !important; text-overflow: ellipsis !important;
} }
} }
.color{ .color {
width: 5px; width: 5px;
height: rem(40); height: rem(40);
border-top-right-radius: 5px; border-top-right-radius: 5px;
@@ -479,16 +480,15 @@ ion-toolbar{
background-color: #f05d5e; background-color: #f05d5e;
} }
} }
ion-item:last-child{ ion-item:last-child {
border-bottom: unset !important; border-bottom: unset !important;
padding-bottom: unset !important; padding-bottom: unset !important;
} }
} }
} }
.resume{ .resume {
.title{ .title {
font-family: Roboto; font-family: Roboto;
font-size: rem(15); font-size: rem(15);
font-weight: 500; font-weight: 500;
@@ -496,30 +496,27 @@ ion-toolbar{
margin-bottom: 5px; margin-bottom: 5px;
margin-top: 10px; margin-top: 10px;
} }
.event-num, .first-event-time{ .event-num,
.first-event-time {
font-family: Roboto; font-family: Roboto;
font-size: rem(15); font-size: rem(15);
display: block; display: block;
color: black; color: black;
} }
} }
} }
.d-flex { .d-flex {
display: flex; display: flex;
} }
.pointer{ .pointer {
cursor: pointer; cursor: pointer;
} }
@media only screen and (max-width: 856px) { @media only screen and (max-width: 856px) {
.content,
.content, .conteiner-box { .conteiner-box {
height: unset !important; height: unset !important;
max-height: unset !important; max-height: unset !important;
} }
@@ -535,7 +532,7 @@ ion-toolbar{
.schedule-1 { .schedule-1 {
display: none; display: none;
} }
.filters-box { .filters-box {
display: block !important; display: block !important;
width: 100%; width: 100%;
} }
@@ -558,36 +555,30 @@ ion-toolbar{
.box-container { .box-container {
height: unset !important; height: unset !important;
} }
} }
@media only screen and (min-width: 804px) { @media only screen and (min-width: 804px) {
.schedule:first-child { .schedule:first-child {
margin-right: 2%; margin-right: 2%;
} }
} }
@media only screen and (min-width: 478px) { @media only screen and (min-width: 478px) {
.schedule{ .schedule {
width: 400px; width: 400px;
} }
} }
@media only screen and (max-width: 478px) { @media only screen and (max-width: 478px) {
.schedule{ .schedule {
width: 360px; width: 360px;
} }
} }
ion-title{ ion-title {
border: 1px solid red; border: 1px solid red;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.box-container { .box-container {
background-color: white; background-color: white;
flex-direction: column; flex-direction: column;
@@ -606,7 +597,7 @@ ion-title{
background-color: #ffb81c2b; background-color: #ffb81c2b;
width: 150px; width: 150px;
height: 90px; height: 90px;
margin:5px; margin: 5px;
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
flex-direction: column; flex-direction: column;
@@ -618,7 +609,7 @@ ion-title{
-ms-border-radius: 10px; -ms-border-radius: 10px;
-o-border-radius: 10px; -o-border-radius: 10px;
padding: 10px; padding: 10px;
p{ p {
margin-bottom: 0px; margin-bottom: 0px;
line-height: 15px; line-height: 15px;
} }
@@ -638,8 +629,6 @@ ion-title{
width: 100%; width: 100%;
} }
.schedule-container { .schedule-container {
flex-grow: 1; flex-grow: 1;
overflow: auto; overflow: auto;
@@ -649,19 +638,15 @@ ion-title{
width: unset !important; width: unset !important;
max-width: unset !important; max-width: unset !important;
} }
ion-item{ ion-item {
border-bottom: unset !important; border-bottom: unset !important;
} }
} }
.conteiner-box-mobile { .conteiner-box-mobile {
display: none; display: none;
} }
@media screen and (max-width: 400px) { @media screen and (max-width: 400px) {
.box-container { .box-container {
width: 360px; width: 360px;
@@ -671,8 +656,6 @@ ion-title{
} }
} }
.item-exp { .item-exp {
justify-content: flex-start !important; justify-content: flex-start !important;
} }
@@ -681,20 +664,20 @@ ion-title{
justify-content: flex-start !important; justify-content: flex-start !important;
} }
@media only screen and (min-width: 100px) { @media only screen and (min-width: 100px) {
.container-filters,
.container-filters, .filters-box, .schedule-header, .Goto-agenda{ .filters-box,
.schedule-header,
.Goto-agenda {
font-size: 14px; font-size: 14px;
} }
} }
@media only screen and (min-width: 500px) { @media only screen and (min-width: 500px) {
.container-filters,
.container-filters, .filters-box, .schedule-header, .Goto-agenda { .filters-box,
.schedule-header,
.Goto-agenda {
font-size: 16px; font-size: 16px;
} }
} }
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ModalController, PopoverController, ToastController } from '@ionic/angular'; import { ModalController, PopoverController, ToastController } from '@ionic/angular';
import { ProcessesService } from 'src/app/services/processes.service'; import { ProcessesService } from 'src/app/services/processes.service';
import { momentG } from 'src/plugin/momentG'; import { momentG } from 'src/plugin/momentG';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { DiplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page'; import { DiplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
@@ -9,7 +9,7 @@ import { ToastService } from 'src/app/services/toast.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page'; import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service'; import { RouteService } from 'src/app/services/route.service';
import {HttpErrorHandle } from 'src/app/services/http-error-handle.service'; import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page'; import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { DespachoService } from 'src/app/Rules/despacho.service' import { DespachoService } from 'src/app/Rules/despacho.service'
import { AttachmentList } from 'src/app/models/Excludetask'; import { AttachmentList } from 'src/app/models/Excludetask';
@@ -35,12 +35,13 @@ export class DiplomaAssinarPage implements OnInit {
fulltask: any fulltask: any
intervenientes: any = [] intervenientes: any = []
cc: any = []; cc: any = [];
attachments:any; attachments: any;
customDate: any; customDate: any;
caller:string; caller: string;
mergedArray: any = []; mergedArray: any = [];
DraftIds = "" DraftIds = ""
DraftNames = "" DraftNames = ""
asDraft = true;
constructor( constructor(
private processes: ProcessesService, private processes: ProcessesService,
@@ -57,10 +58,10 @@ export class DiplomaAssinarPage implements OnInit {
public p: PermissionService, public p: PermissionService,
) { ) {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) { if (params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber; this.serialnumber = params["params"].SerialNumber;
} }
if(params["params"].caller) { if (params["params"].caller) {
this.caller = params["params"].caller; this.caller = params["params"].caller;
} }
}); });
@@ -91,7 +92,8 @@ export class DiplomaAssinarPage implements OnInit {
showEnviarPendentes: false, showEnviarPendentes: false,
fulltask: this.fulltask, fulltask: this.fulltask,
DraftNames: this.DraftNames, DraftNames: this.DraftNames,
DraftIds: this.DraftIds DraftIds: this.DraftIds,
asDraft: this.asDraft
}, },
translucent: true translucent: true
@@ -112,7 +114,7 @@ export class DiplomaAssinarPage implements OnInit {
"SerialNumber": res.serialNumber, "SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceDataFields.Subject, "Folio": res.workflowInstanceDataFields.Subject,
"Senders": res.originator.email, "Senders": res.originator.email,
"CreateDate": momentG(new Date(res.taskStartDate),'yyyy-MM-dd HH:mm:ss'), "CreateDate": momentG(new Date(res.taskStartDate), 'yyyy-MM-dd HH:mm:ss'),
"DocumentURL": res.workflowInstanceDataFields.ViewerRequest, "DocumentURL": res.workflowInstanceDataFields.ViewerRequest,
"Remetente": res.workflowInstanceDataFields.Sender, "Remetente": res.workflowInstanceDataFields.Sender,
"Note": res.workflowInstanceDataFields.TaskMessage || res.workflowInstanceDataFields.Note, "Note": res.workflowInstanceDataFields.TaskMessage || res.workflowInstanceDataFields.Note,
@@ -144,13 +146,13 @@ export class DiplomaAssinarPage implements OnInit {
this.getDocumentPdf(this.fulltask.Documents) this.getDocumentPdf(this.fulltask.Documents)
let thedate = new Date(this.task.CreateDate); let thedate = new Date(this.task.CreateDate);
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]); this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
this.processes.GetTaskParticipants(this.task.FolderId).subscribe(users=>{ this.processes.GetTaskParticipants(this.task.FolderId).subscribe(users => {
this.intervenientes = users.filter(user=>{ this.intervenientes = users.filter(user => {
return user.Type == 'I'; return user.Type == 'I';
}); });
this.cc = users.filter(user=>{ this.cc = users.filter(user => {
return user.Type == 'CC'; return user.Type == 'CC';
}); });
@@ -158,20 +160,20 @@ export class DiplomaAssinarPage implements OnInit {
}); });
this.getDocumentDetails(this.task.FolderId, '361'); this.getDocumentDetails(this.task.FolderId, '361');
}, (error)=>{ }, (error) => {
try { try {
this.httpErroHandle.httpStatusHandle(error) this.httpErroHandle.httpStatusHandle(error)
this.goBack() this.goBack()
} catch (e) { } catch (e) {
window.history.back(); window.history.back();
} finally { } finally {
this.httpErroHandle.httpStatusHandle(error) this.httpErroHandle.httpStatusHandle(error)
} }
}); });
} }
async viewDocument({Document, content}) { async viewDocument({ Document, content }) {
if (Document.content == "") { if (Document.content == "") {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
@@ -197,7 +199,12 @@ export class DiplomaAssinarPage implements OnInit {
component: TinyMCEPage, component: TinyMCEPage,
componentProps: { componentProps: {
Document, Document,
content content,
InstanceID: this.task.InstanceID,
FolderId: this.task.FolderID,
DraftIds: this.DraftIds,
OriginalFileName: this.DraftNames,
Serialnumber:this.serialnumber
}, },
cssClass: 'modal modal-desktop' cssClass: 'modal modal-desktop'
}); });
@@ -208,8 +215,8 @@ export class DiplomaAssinarPage implements OnInit {
} }
getDocumentDetails(forlderId:string, applicationId:string) { getDocumentDetails(forlderId: string, applicationId: string) {
this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{ this.processes.GetDocumentDetails(forlderId, applicationId).subscribe(res => {
this.attachments = res.Documents; this.attachments = res.Documents;
@@ -239,28 +246,28 @@ export class DiplomaAssinarPage implements OnInit {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.httpErroHandle.httpsSucessMessagge('Assinado') this.httpErroHandle.httpsSucessMessagge('Assinado')
} catch (error) { } catch (error) {
this.httpErroHandle.httpStatusHandle(error) this.httpErroHandle.httpStatusHandle(error)
} }
finally {} finally { }
} }
async AssinarDraft() { async AssinarDraft() {
if (this.asDraft) {
const modal = await this.modalController.create({
component: PopupQuestionPage,
componentProps: {
title: 'Deseja assinar este Diploma?',
/* message: 'Nota: Ao Efetuar esta operação, o tratamento deste diploma não poderá ser realizado a partir da caixa de correspondência' */
},
cssClass: "popup-question discart-expedient-modal",
backdropDismiss: true
});
const modal = await this.modalController.create({ modal.onDidDismiss().then(async (res) => {
component: PopupQuestionPage, const data = res.data
componentProps: { if (data == "Yes") {
title: 'Deseja assinar este Diploma?',
message: 'Nota: Ao Efetuar esta operação, o tratamento deste diploma não poderá ser realizado a partir da caixa de correspondência'
},
cssClass: "popup-question discart-expedient-modal",
backdropDismiss: true
});
modal.onDidDismiss().then(async (res) => {
const data = res.data
if(data == "Yes") {
let body = { let body = {
"InstanceId": this.task.InstanceID, "InstanceId": this.task.InstanceID,
"FolderId": this.task.FolderID, "FolderId": this.task.FolderID,
@@ -278,18 +285,22 @@ export class DiplomaAssinarPage implements OnInit {
this.TaskService.loadDiplomas(); this.TaskService.loadDiplomas();
this.goBack(); this.goBack();
} catch (error) { } catch (error) {
this.httpErroHandle.httpStatusHandle(error) this.httpErroHandle.httpStatusHandle(error)
} }
finally { finally {
loader.remove() loader.remove()
} }
} }
}, (error) => { }, (error) => {
console.log(error) console.log(error)
}); });
await modal.present();
} else {
this.httpErroHandle.validationMessagge("diplomaAsDraft");
}
await modal.present();
} }
async openAddNoteModal(actionName: string) { async openAddNoteModal(actionName: string) {
@@ -338,7 +349,7 @@ export class DiplomaAssinarPage implements OnInit {
else if (actionName == 'Reexecução') { else if (actionName == 'Reexecução') {
/* await this.reexecute(res.data.note, docs); /* await this.reexecute(res.data.note, docs);
this.goBack(); */ this.goBack(); */
} else if(actionName == 'Gerar Diploma') { } else if (actionName == 'Gerar Diploma') {
/* await this.generateDiploma(res.data.note, docs); /* await this.generateDiploma(res.data.note, docs);
this.goBack(); */ this.goBack(); */
} }
@@ -382,7 +393,8 @@ export class DiplomaAssinarPage implements OnInit {
taskAction: taskAction, taskAction: taskAction,
task: task, task: task,
profile: this.profile, profile: this.profile,
fulltask: this.fulltask fulltask: this.fulltask,
asDrat: this.asDraft
}, },
cssClass: classs, cssClass: classs,
}); });
@@ -458,34 +470,47 @@ export class DiplomaAssinarPage implements OnInit {
async getDraft(split_stringDraft: string[]) { async getDraft(split_stringDraft: string[]) {
this.DraftNames = "" this.DraftNames = "";
this.DraftIds = "";
for(const strg of split_stringDraft) { const draftPromises = split_stringDraft.map(async (strg) => {
console.log('List of ids', strg) console.log('List of ids', strg);
const resd = await this.processes.GetDraftByID(strg).toPromise() try {
const resd = await this.processes.GetDraftByID(strg).toPromise();
let object = { let object = {
"ApplicationId": "", "ApplicationId": "",
"Assunto": resd.data.description, "Assunto": resd.data.description,
"DocDate": "", "DocDate": "",
"DocId": resd.data.id, "DocId": resd.data.id,
"DocNumber": "", "DocNumber": "",
"FolderId": "", "FolderId": "",
"Sender": "", "Sender": "",
"SourceDocId": "", "SourceDocId": "",
"content": resd.data.content, "content": resd.data.content,
"path": resd.data.path, "path": resd.data.path,
"ownerId": resd.data.ownerId, "ownerId": resd.data.ownerId,
"status": resd.data.status, "status": resd.data.status,
};
this.mergedArray.push(object);
this.DraftNames += resd.data.description + ";";
this.DraftIds += resd.data.id + ";";
console.log('List of draft', resd);
} catch (error) {
console.log('Error getting draft', error);
} }
this.mergedArray.push(object) });
this.DraftNames = this.DraftNames + resd.data.description+";"
console.log('List of draff', resd) await Promise.all(draftPromises);
if (this.DraftNames) {
this.DraftNames = this.DraftNames.slice(0, -1);
this.DraftIds = this.DraftIds.slice(0, -1);
} else {
console.log('No draft found.');
this.asDraft = false
} }
this.DraftNames = this.DraftNames.slice(0, -1);
this.DraftIds = this.DraftIds.slice(0, -1);
} }
} }
@@ -121,7 +121,12 @@ ion-item-sliding{
color: var(--title-text-color) !important; color: var(--title-text-color) !important;
margin: 0; margin: 0;
padding: 0; padding: 0;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.test{ .test{
color: #000 !important; color: #000 !important;
border: 1px solid red !important; border: 1px solid red !important;
@@ -314,8 +314,8 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="buttons"> <div class="buttons">
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
<button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button> <button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
</div> </div>
</ion-footer> </ion-footer>
@@ -221,6 +221,7 @@
class="d-flex flex-column height-100 hide-footer" class="d-flex flex-column height-100 hide-footer"
[adding]="adding" [adding]="adding"
[footer]="false" [footer]="false"
[taskType]="taskType"
[taskParticipants]="taskParticipants" [taskParticipants]="taskParticipants"
[taskParticipantsCc]="taskParticipantsCc" [taskParticipantsCc]="taskParticipantsCc"
(closeComponent)="closeComponent()" (closeComponent)="closeComponent()"
@@ -235,7 +236,7 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="buttons"> <div class="buttons">
<button class="btn-cancel" shape="round" (click)="cancelTask()">Cancelar</button>
<button class="btn-ok" shape="round" (click)="saveTask()">Concluir</button> <button class="btn-ok" shape="round" (click)="saveTask()">Concluir</button>
<button class="btn-cancel" shape="round" (click)="cancelTask()">Cancelar</button>
</div> </div>
</ion-footer> </ion-footer>
@@ -533,7 +533,8 @@ export class ExpedientTaskModalPage implements OnInit {
componentProps: { componentProps: {
adding: this.adding, adding: this.adding,
taskParticipants: this.taskParticipants, taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc taskParticipantsCc: this.taskParticipantsCc,
taskType: this.taskType
}, },
cssClass: 'attendee modal modal-desktop', cssClass: 'attendee modal modal-desktop',
backdropDismiss: false backdropDismiss: false
+18 -18
View File
@@ -33,11 +33,11 @@ export class InactivityPage implements OnInit {
public alertController: AlertController, public alertController: AlertController,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public p: PermissionService, public p: PermissionService,
) {} ) { }
loop = false loop = false
ngOnInit() {} ngOnInit() { }
runloop() { runloop() {
@@ -71,7 +71,7 @@ export class InactivityPage implements OnInit {
async Login() { async Login() {
if (this.validateUsername()) { if (this.validateUsername()) {
if(this.validatePassword()) { if (this.validatePassword()) {
this.userattempt = { this.userattempt = {
username: this.username, username: this.username,
@@ -79,7 +79,7 @@ export class InactivityPage implements OnInit {
domainName: environment.domain, domainName: environment.domain,
BasicAuthKey: "" BasicAuthKey: ""
} }
let attempt = await this.authService.login(this.userattempt, {saveSession: false}) let attempt = await this.authService.login(this.userattempt, { saveSession: false })
if (attempt) { if (attempt) {
@@ -88,7 +88,7 @@ export class InactivityPage implements OnInit {
if (attempt.UserId == SessionStore.user.UserId) { if (attempt.UserId == SessionStore.user.UserId) {
await this.authService.SetSession(attempt, this.userattempt); await this.authService.SetSession(attempt, this.userattempt);
if(this.p.userPermission(this.p.permissionList.Chat.access)){ if (this.p.userPermission(this.p.permissionList.Chat.access)) {
// this.authService.loginChat(); // this.authService.loginChat();
} }
@@ -119,18 +119,18 @@ export class InactivityPage implements OnInit {
getToken() { getToken() {
this.notificatinsservice.requestPermissions(); this.notificatinsservice.requestPermissions();
this.notificatinsservice.registrationError(); this.notificatinsservice.registrationError();
this.notificatinsservice.getAndpostToken(this.username); // this.notificatinsservice.getAndpostToken(this.username);
} }
setCode(code: string) { setCode(code: string) {
if(this.code.length < 4) { if (this.code.length < 4) {
this.code.push(code) this.code.push(code)
} }
if(this.code.length == 4) { if (this.code.length == 4) {
if(!SessionStore.hasPin) { if (!SessionStore.hasPin) {
// //
this.storePin() this.storePin()
this.pinLogin() this.pinLogin()
@@ -141,14 +141,14 @@ export class InactivityPage implements OnInit {
} }
clearCode() { clearCode() {
this.code =[] this.code = []
} }
pinLogin() { pinLogin() {
const code = this.code.join('') const code = this.code.join('')
if( SessionStore.validatePin(code)) { if (SessionStore.validatePin(code)) {
SessionStore.setInativity(true) SessionStore.setInativity(true)
this.goback() this.goback()
@@ -166,26 +166,26 @@ export class InactivityPage implements OnInit {
goback() { goback() {
const pathName = this.SessionStore.user.UrlBeforeInactivity const pathName = this.SessionStore.user.UrlBeforeInactivity
if(pathName) { if (pathName) {
this.router.navigate([pathName],{replaceUrl: true}); this.router.navigate([pathName], { replaceUrl: true });
} else { } else {
setTimeout(() => { setTimeout(() => {
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ if (this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)) {
//When user has got access to Agenda but does not have their own calendar, goes to Agenda //When user has got access to Agenda but does not have their own calendar, goes to Agenda
if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){ if (this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0) {
this.router.navigate(['/home/agenda']); this.router.navigate(['/home/agenda']);
} }
else{ else {
this.router.navigate(['/home/events']); this.router.navigate(['/home/events']);
} }
} }
//If user has access permission to both Chat and Action, goes to Chat by default. //If user has access permission to both Chat and Action, goes to Chat by default.
else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ else if ((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)) {
this.router.navigate(['/home/chat']); this.router.navigate(['/home/chat']);
} }
else if(this.p.userPermission(this.p.permissionList.Actions.access)){ else if (this.p.userPermission(this.p.permissionList.Actions.access)) {
this.router.navigate(['/home/publications']); this.router.navigate(['/home/publications']);
} }
+23 -20
View File
@@ -15,6 +15,7 @@ import { MessageModel, DeleteMessageModel } from '../../models/beast-orm';
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service'; import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'; import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { ChatService } from 'src/app/services/chat.service'; import { ChatService } from 'src/app/services/chat.service';
import { NotificationHolderService } from 'src/app/store/notification-holder.service';
import { Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { FirstEnterService } from '../../services/first-enter.service'; import { FirstEnterService } from '../../services/first-enter.service';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
@@ -34,7 +35,7 @@ export class LoginPage implements OnInit {
userattempt: UserForm; userattempt: UserForm;
code = [] code = []
hasPin: boolean hasPin: boolean
loginPreference: string loginPreference: string
sessionStore = SessionStore; sessionStore = SessionStore;
@@ -56,16 +57,17 @@ export class LoginPage implements OnInit {
private ChatService: ChatService, private ChatService: ChatService,
private platform: Platform, private platform: Platform,
private FirstEnterService: FirstEnterService, private FirstEnterService: FirstEnterService,
private storage:Storage, private storage: Storage,
private storageService: StorageService, private storageService: StorageService,
) {} private NotificationHolderService: NotificationHolderService
) { }
ngOnInit() {} ngOnInit() { }
togglePassword() { togglePassword() {
this.showPassword = !this.showPassword; this.showPassword = !this.showPassword;
if(this.passwordIcon == "eye") { if (this.passwordIcon == "eye") {
this.passwordIcon = "eye-off"; this.passwordIcon = "eye-off";
} else { } else {
this.passwordIcon = "eye"; this.passwordIcon = "eye";
@@ -101,14 +103,14 @@ export class LoginPage implements OnInit {
getToken() { getToken() {
this.notificatinsservice.requestPermissions(); this.notificatinsservice.requestPermissions();
this.notificatinsservice.registrationError(); this.notificatinsservice.registrationError();
this.notificatinsservice.getAndpostToken(this.username); // this.notificatinsservice.getAndpostToken(this.username);
} }
async Login() { async Login() {
if (this.validateUsername()) { if (this.validateUsername()) {
if(this.validatePassword()) { if (this.validatePassword()) {
this.userattempt = { this.userattempt = {
username: this.username.trim(), username: this.username.trim(),
@@ -119,8 +121,8 @@ export class LoginPage implements OnInit {
const loader = this.toastService.loading() const loader = this.toastService.loading()
let attempt = await this.authService.login(this.userattempt, {saveSession: false}) let attempt = await this.authService.login(this.userattempt, { saveSession: false })
const data = await this.authService.loginContenteProduction(this.userattempt, {saveSession: true}) const data = await this.authService.loginContenteProduction(this.userattempt, { saveSession: true })
loader.remove() loader.remove()
@@ -132,7 +134,7 @@ export class LoginPage implements OnInit {
CPSession.save(data) CPSession.save(data)
this.changeProfileService.run(); this.changeProfileService.run();
if(attempt.ChatData) { if (attempt.ChatData) {
await this.authService.loginToChatWs(); await this.authService.loginToChatWs();
this.ChatService.setheader() this.ChatService.setheader()
@@ -154,6 +156,7 @@ export class LoginPage implements OnInit {
this.RochetChatConnectorService.logout(); this.RochetChatConnectorService.logout();
this.clearStoreService.clear(); this.clearStoreService.clear();
this.ChatSystemService.clearChat(); this.ChatSystemService.clearChat();
this.NotificationHolderService.clear()
SessionStore.delete(); SessionStore.delete();
window.localStorage.clear(); window.localStorage.clear();
await MessageModel.deleteAll(); await MessageModel.deleteAll();
@@ -167,16 +170,16 @@ export class LoginPage implements OnInit {
if(attempt.ChatData) { if (attempt.ChatData) {
await this.authService.loginToChatWs(); await this.authService.loginToChatWs();
this.ChatService.setheader(); this.ChatService.setheader();
this.ChatSystemService.loadChat(); this.ChatSystemService.loadChat();
} }
this.storageService.remove("Notifications") this.storageService.remove("Notifications")
this.getToken(); this.getToken();
if(!this.platform.is('desktop') && !this.platform.is('mobileweb')) { if (!this.platform.is('desktop') && !this.platform.is('mobileweb')) {
if(this.sessionStore.hasPin) { if (this.sessionStore.hasPin) {
this.router.navigateByUrl('/home/events'); this.router.navigateByUrl('/home/events');
} else { } else {
this.router.navigateByUrl('/pin', { replaceUrl: true }); this.router.navigateByUrl('/pin', { replaceUrl: true });
@@ -207,23 +210,23 @@ export class LoginPage implements OnInit {
goback() { goback() {
const pathName = SessionStore.user.UrlBeforeInactivity const pathName = SessionStore.user.UrlBeforeInactivity
if(pathName) { if (pathName) {
this.router.navigate([pathName]); this.router.navigate([pathName]);
} else { } else {
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ if (this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)) {
//When user has got access to Agenda but does not have their own calendar, goes to Agenda //When user has got access to Agenda but does not have their own calendar, goes to Agenda
if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){ if (this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0) {
this.router.navigate(['/home/agenda']); this.router.navigate(['/home/agenda']);
} }
else{ else {
this.router.navigate(['/home/events']); this.router.navigate(['/home/events']);
} }
} }
//If user has access permission to both Chat and Action, goes to Chat by default. //If user has access permission to both Chat and Action, goes to Chat by default.
else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ else if ((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)) {
this.router.navigate(['/home/chat']); this.router.navigate(['/home/chat']);
} }
else if(this.p.userPermission(this.p.permissionList.Actions.access)){ else if (this.p.userPermission(this.p.permissionList.Actions.access)) {
this.router.navigate(['/home/publications']); this.router.navigate(['/home/publications']);
} }
} }
@@ -88,15 +88,16 @@
<ion-footer class="ion-no-border"> <ion-footer class="ion-no-border">
<ion-toolbar class="footer-toolbar width-100 justify-space-between d-flex px-20"> <ion-toolbar class="footer-toolbar width-100 justify-space-between d-flex px-20">
<ion-buttons slot="start"> <ion-buttons slot="start">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
<ion-buttons slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()"> <button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Gravar</ion-label> <ion-label>Gravar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
</ion-toolbar> </ion-toolbar>
</ion-footer> </ion-footer>
@@ -100,14 +100,15 @@
<ion-footer class="ion-no-border"> <ion-footer class="ion-no-border">
<ion-toolbar class="footer-toolbar width-100"> <ion-toolbar class="footer-toolbar width-100">
<ion-buttons slot="start"> <ion-buttons slot="start">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
<ion-buttons slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()"> <button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Criar</ion-label> <ion-label>Criar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
</ion-toolbar> </ion-toolbar>
</ion-footer> </ion-footer>
@@ -94,14 +94,15 @@
<ion-footer class="ion-no-border"> <ion-footer class="ion-no-border">
<ion-toolbar class="footer-toolbar"> <ion-toolbar class="footer-toolbar">
<ion-buttons slot="start"> <ion-buttons slot="start">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
<ion-buttons slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()"> <button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Gravar</ion-label> <ion-label>Gravar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
</ion-toolbar> </ion-toolbar>
</ion-footer> </ion-footer>
+236 -234
View File
@@ -1,24 +1,24 @@
@import '~src/function.scss'; @import "~src/function.scss";
@media only screen and (min-width: 100px) { @media only screen and (min-width: 100px) {
:host{ :host {
font-size: 14px; font-size: 14px;
} }
} }
@media only screen and (min-width: 500px) { @media only screen and (min-width: 500px) {
:host{ :host {
font-size: rem(16); font-size: rem(16);
} }
} }
:host{ :host {
// background: #0782c9; // background: #0782c9;
} }
ion-content{ ion-content {
--background: transparent; --background: transparent;
} }
ion-toolbar{ ion-toolbar {
border-width: 0 !important; border-width: 0 !important;
--padding-top: 0px !important; --padding-top: 0px !important;
--padding-start: 0px !important; --padding-start: 0px !important;
@@ -26,249 +26,251 @@ ion-toolbar{
--padding-end: 0px !important; --padding-end: 0px !important;
} }
.div-top-header{ .div-top-header {
margin: 0 auto; margin: 0 auto;
background-color: #0782c9; background-color: #0782c9;
overflow: auto; overflow: auto;
padding-top: 15px; padding-top: 15px;
border: 0!important; border: 0 !important;
.div-search{ .div-search {
font-size: rem(45); font-size: rem(45);
float: left; float: left;
margin: 0 0 0 10px margin: 0 0 0 10px;
}
.div-logo{
background: transparent;
width: 140px;
margin: 5px 0 0px 71px;
float: left;
}
.div-logo img{
width: 100%;
}
.div-profile{
font-size: rem(45);
float: right;
margin-right: 10px;
}
} }
.div-logo {
ion-content{ background: transparent;
// --background:#0782c9; width: 140px;
--border: none; margin: 5px 0 0px 71px;
float: left;
} }
.main-header{ .div-logo img {
width: 100%; /* 400px */ width: 100%;
height: 100%;
font-family: Roboto;
background-color: #fff;
overflow:hidden;
color:#000;
transform: translate3d(0, 1px, 0);
.title-content{
margin: 0px auto;
padding: 0 !important;
background: #fff;
}
.div-title{
padding: 0!important;
}
.div-icon{
display: flex;
/* width: rem(45);
float: right; */
font-size: rem(35);
padding: 0 !important;
align-items: center;
justify-content: flex-end;
}
.div-icon ion-icon{
float: right;
padding-left: 10px;
}
} }
.main-content{ .div-profile {
font-family: Roboto; font-size: rem(45);
background-color: #fff; float: right;
overflow:auto; margin-right: 10px;
.aside-left{
border-right: 1px solid #d8d8d8;
margin: 0 !important;
padding: 0 !important;
.main-header{
overflow: inherit !important;
padding: 30px 20px 15px 20px !important;
}
.aside{
//padding: 0px 20px 0 20px !important;
}
}
.content{
//border: 1px solid red;
}
}
ion-item{
--background: transparent;
}
.item{
width: 100% !important;
padding: 0px 20px 0 20px !important;
border-bottom: 1px solid #ebebeb;
align-items: center;
justify-content: space-between;
flex-direction: row;
background-color: transparent;
overflow: auto;
.item-icon{
//margin-top: 28px;
width: rem(45);
float: left;
font-size: rem(40);
.item-icon ion-icon{
color: #061b52;
}
}
.item-icon2{
//margin-top: 23px;
float: left;
}
.item-content{
width: 100%;
padding: 15px 0 15px 10px;
overflow: auto;
margin-right: 5px;
p{
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.item-content-date{
color: #797979;
margin: 0 !important;
padding: 0 !important;
}
.item-content-title{
color: var(--title-text-color);
margin: 0 !important;
padding: 0 !important;
}
.item-content-detail{
color: #000000;
font-size: rem(15);
margin: 0 !important;
padding: 0 !important;
}
.item-options{
color: var(--box-hover-background-color);
width: rem(25);
font-size: rem(20);
}
.item-content-date-active, .item-content-title-active, .item-content-detail-active{
color: #fff;
}
}
.item-options-active{
display: none !important;
}
}
.item-active{
background-color: var(--gabinete-active-hove-background) !important;
color: #fff !important;
pointer-events: none;
}
.item:hover{
background-color: var(--box-hover-background-color);
}
ion-item-options{
border: 1px solid #fff;
overflow: auto;
}
ion-item-option{
display: flex;
background: #ffe0e0;
align-items: center;
align-content: center;
}
.delete-option{
display: flex;
background: #ffe0e0;
align-items: center;
align-content: center;
border: 1px solid #d30a0a67;
}
.edit-option{
display: flex;
background: #fff;
align-items: center;
align-content: center;
margin-right: 5px !important;
border: 1px solid #42b9feb9;
}
.edit{
padding: 6px;
font-size: rem(35);
color:#061b52;
border-radius: 20px;
margin: 7px;
}
.delete{
padding: 7px;
font-size: rem(21);
color:#d30a0a;
border-radius: 20px;
margin: 12px;
border: 1px solid #d30a0a;
}
@media only screen and (min-width: 701px) {
.content-right{
display: flex !important;
width: 65%;
}
.aside-left{
width: 35%;
}
.item-options{
display: block !important;
padding: 10px;
} }
} }
ion-content {
// --background:#0782c9;
--border: none;
}
.main-header {
width: 100%; /* 400px */
height: 100%;
font-family: Roboto;
background-color: #fff;
overflow: hidden;
color: #000;
transform: translate3d(0, 1px, 0);
.title-content {
margin: 0px auto;
padding: 0 !important;
background: #fff;
}
.div-title {
padding: 0 !important;
}
.div-icon {
display: flex;
/* width: rem(45);
float: right; */
font-size: rem(35);
padding: 0 !important;
align-items: center;
justify-content: flex-end;
}
.div-icon ion-icon {
float: right;
padding-left: 10px;
}
}
.main-content {
font-family: Roboto;
background-color: #fff;
overflow: auto;
.aside-left {
border-right: 1px solid #d8d8d8;
margin: 0 !important;
padding: 0 !important;
.main-header {
overflow: inherit !important;
padding: 30px 20px 15px 20px !important;
}
.aside {
//padding: 0px 20px 0 20px !important;
}
}
.content {
//border: 1px solid red;
}
}
ion-item {
--background: transparent;
}
.item {
width: 100% !important;
padding: 0px 20px 0 20px !important;
border-bottom: 1px solid #ebebeb;
align-items: center;
justify-content: space-between;
flex-direction: row;
background-color: transparent;
overflow: auto;
.item-icon {
//margin-top: 28px;
width: rem(45);
float: left;
font-size: rem(40);
.item-icon ion-icon {
color: #061b52;
}
}
.item-icon2 {
//margin-top: 23px;
float: left;
}
.item-content {
width: 100%;
padding: 15px 0 15px 10px;
overflow: auto;
margin-right: 5px;
p {
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.item-content-date {
color: #797979;
margin: 0 !important;
padding: 0 !important;
}
.item-content-title {
color: var(--title-text-color);
margin: 0 !important;
padding: 0 !important;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.item-content-detail {
color: #000000;
font-size: rem(15);
margin: 0 !important;
padding: 0 !important;
}
.item-options {
color: var(--box-hover-background-color);
width: rem(25);
font-size: rem(20);
}
.item-content-date-active,
.item-content-title-active,
.item-content-detail-active {
color: #fff;
}
}
.item-options-active {
display: none !important;
}
}
.item-active {
background-color: var(--gabinete-active-hove-background) !important;
color: #fff !important;
pointer-events: none;
}
.item:hover {
background-color: var(--box-hover-background-color);
}
ion-item-options {
border: 1px solid #fff;
overflow: auto;
}
ion-item-option {
display: flex;
background: #ffe0e0;
align-items: center;
align-content: center;
}
.delete-option {
display: flex;
background: #ffe0e0;
align-items: center;
align-content: center;
border: 1px solid #d30a0a67;
}
.edit-option {
display: flex;
background: #fff;
align-items: center;
align-content: center;
margin-right: 5px !important;
border: 1px solid #42b9feb9;
}
.edit {
padding: 6px;
font-size: rem(35);
color: #061b52;
border-radius: 20px;
margin: 7px;
}
.delete {
padding: 7px;
font-size: rem(21);
color: #d30a0a;
border-radius: 20px;
margin: 12px;
border: 1px solid #d30a0a;
}
@media only screen and (min-width: 701px) {
.content-right {
display: flex !important;
width: 65%;
}
.aside-left {
width: 35%;
}
.item-options {
display: block !important;
padding: 10px;
}
}
@media only screen and (min-width: 100px) { @media only screen and (min-width: 100px) {
.item-icon2,
.item-icon2, .title-content, .main-content, .item { .title-content,
.main-content,
.item {
font-size: 14px; font-size: 14px;
} }
} }
@media only screen and (min-width: 500px) { @media only screen and (min-width: 500px) {
.item-icon2,
.item-icon2, .title-content, .main-content, .item { .title-content,
.main-content,
.item {
font-size: 16px; font-size: 16px;
} }
} }
@@ -101,10 +101,10 @@ export class ViewPublicationsPage implements OnInit {
createPublicationList(folderId = this.folderId) { createPublicationList(folderId = this.folderId) {
console.log('create') console.log('create')
if(!this.publicationFolderService.publicationList[folderId]) { if (!this.publicationFolderService.publicationList[folderId]) {
this.publicationFolderService.publicationList[folderId] = [] this.publicationFolderService.publicationList[folderId] = []
} }
if(!this.publicationFolderService.FolderDetails[folderId]) { if (!this.publicationFolderService.FolderDetails[folderId]) {
this.publicationFolderService.FolderDetails[folderId] = new PublicationFolder(); this.publicationFolderService.FolderDetails[folderId] = new PublicationFolder();
} }
} }
@@ -116,7 +116,7 @@ export class ViewPublicationsPage implements OnInit {
this.getPublicationsIds(); this.getPublicationsIds();
try { try {
event?.target?.complete(); event?.target?.complete();
} catch(error) {} } catch (error) { }
//}, 3000); //}, 3000);
} }
@@ -132,9 +132,9 @@ export class ViewPublicationsPage implements OnInit {
getPublicationDetail() { getPublicationDetail() {
const folderId = this.folderId const folderId = this.folderId
this.publications.GetPresidentialAction(folderId).subscribe(res =>{ this.publications.GetPresidentialAction(folderId).subscribe(res => {
this.publicationFolderService.FolderDetails[folderId] = res this.publicationFolderService.FolderDetails[folderId] = res
this.storage.set(folderId+"name", res) this.storage.set(folderId + "name", res)
}, (error) => { }, (error) => {
this.showLoader = false; this.showLoader = false;
// this.httpErroHandle.httpStatusHandle(error) // this.httpErroHandle.httpStatusHandle(error)
@@ -158,7 +158,7 @@ export class ViewPublicationsPage implements OnInit {
let loadLater = [] let loadLater = []
for (let publicationId of publicationIds) { for (let publicationId of publicationIds) {
if(!this.publicationIsPresent(publicationId, folderId)) { if (!this.publicationIsPresent(publicationId, folderId)) {
await this.loadPublication(publicationId, folderId) await this.loadPublication(publicationId, folderId)
} else { } else {
@@ -166,14 +166,14 @@ export class ViewPublicationsPage implements OnInit {
} }
} }
for( let publicationId of loadLater) { for (let publicationId of loadLater) {
await this.loadPublication(publicationId, folderId) await this.loadPublication(publicationId, folderId)
} }
for(let localPublication of this.publicationFolderService.publicationList[folderId]) { for (let localPublication of this.publicationFolderService.publicationList[folderId]) {
const apiPublication = publicationIds.includes(localPublication.DocumentId) const apiPublication = publicationIds.includes(localPublication.DocumentId)
if(!apiPublication) { if (!apiPublication) {
this.publicationFolderService.deletePost(folderId, localPublication.DocumentId) this.publicationFolderService.deletePost(folderId, localPublication.DocumentId)
} }
} }
@@ -182,20 +182,20 @@ export class ViewPublicationsPage implements OnInit {
this.storage.set(folderId, this.publicationFolderService.publicationList[folderId]); this.storage.set(folderId, this.publicationFolderService.publicationList[folderId]);
this.getpublication = this.publicationFolderService.publicationList[folderId]; this.getpublication = this.publicationFolderService.publicationList[folderId];
} catch(error) { } catch (error) {
this.showLoader = false; this.showLoader = false;
} }
} }
publicationIsPresent(publicationId, folderId) { publicationIsPresent(publicationId, folderId) {
return this.publicationFolderService.publicationList[folderId].find( e => e.DocumentId == publicationId ) return this.publicationFolderService.publicationList[folderId].find(e => e.DocumentId == publicationId)
} }
publicationFind(publicationId, folderId) { publicationFind(publicationId, folderId) {
return this.publicationFolderService.publicationList[folderId].find( e => e.DocumentId == publicationId ) return this.publicationFolderService.publicationList[folderId].find(e => e.DocumentId == publicationId)
} }
publicationFindIndex(publicationId, folderId) { publicationFindIndex(publicationId, folderId) {
return this.publicationFolderService.publicationList[folderId].findIndex( e => e.DocumentId == publicationId ) return this.publicationFolderService.publicationList[folderId].findIndex(e => e.DocumentId == publicationId)
} }
async loadPublication(publicationId, folderId) { async loadPublication(publicationId, folderId) {
@@ -204,7 +204,7 @@ export class ViewPublicationsPage implements OnInit {
const findIndex = this.publicationFindIndex(publicationId, folderId) const findIndex = this.publicationFindIndex(publicationId, folderId)
const found = this.publicationIsPresent(publicationId, folderId) const found = this.publicationIsPresent(publicationId, folderId)
if(!found) { if (!found) {
this.publicationFolderService.publicationList[folderId].push(publicationDetails) this.publicationFolderService.publicationList[folderId].push(publicationDetails)
} else { } else {
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
@@ -229,13 +229,13 @@ export class ViewPublicationsPage implements OnInit {
await modal.present(); await modal.present();
} }
goToPublicationDetail(DocumentId:string, ProcessId: string) { goToPublicationDetail(DocumentId: string, ProcessId: string) {
this.router.navigate(['/home/publications/view-publications', this.folderId, DocumentId]); this.router.navigate(['/home/publications/view-publications', this.folderId, DocumentId]);
} }
async viewPublicationDetail(DocumentId: string) { async viewPublicationDetail(DocumentId: string) {
alert('nice'); // alert('nice');
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: PublicationDetailPage, component: PublicationDetailPage,
componentProps: { componentProps: {
+148 -76
View File
@@ -1,9 +1,10 @@
<!-- HEADER--> <!-- HEADER-->
<ion-header class="ion-no-border header-main d-md-flex"> <ion-header class="ion-no-border header-main d-md-flex">
<div *ngIf="select" class="btn-close d-none d-lg-flex cursor-pointer font-35-rem" (click)="close()"> <div *ngIf="select" class="btn-close d-none d-lg-flex cursor-pointer font-35-rem" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "class="icon" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon"
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon"
src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> </div>
<div class="d-md-flex flex-md-row-reverse flex-grow-1"> <div class="d-md-flex flex-md-row-reverse flex-grow-1">
@@ -12,14 +13,15 @@
<div class="top-box d-flex ion-justify-content-between pb-10"> <div class="top-box d-flex ion-justify-content-between pb-10">
<!-- search --> <!-- search -->
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open cursor-pointer" (click)="showHideAdvanceSearch(true)">
<!-- <div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open cursor-pointer" (click)="showHideAdvanceSearch(true)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda'" src="assets/images/theme/blue/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda'" src="assets/images/theme/blue/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme != 'default'&& type!='Agenda' " src="assets/images/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme != 'default'&& type!='Agenda' " src="assets/images/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
</div> </div>
<div *ngIf="showAdvanceSearch " class="icon-z icon-most-searched-word-open align-md-baseline pl-10 cursor-pointer" (click)="showHideAdvanceSearch(false)" > <div *ngIf="showAdvanceSearch " class="icon-z icon-most-searched-word-open align-md-baseline pl-10 cursor-pointer" (click)="showHideAdvanceSearch(false)" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda' "src="assets/images/advance-search-show-modal.svg" class="icon" slot="end"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda' "src="assets/images/advance-search-show-modal.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && type!='Agenda'" src="assets/images/theme/gov/advance-search-show-modal.svg" class="icon" slot="end"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && type!='Agenda'" src="assets/images/theme/gov/advance-search-show-modal.svg" class="icon" slot="end"></ion-icon>
</div> </div> -->
<div class="profile"> <div class="profile">
<ion-icon class="icon" src="assets/images/icons-profile.svg"></ion-icon> <ion-icon class="icon" src="assets/images/icons-profile.svg"></ion-icon>
@@ -30,37 +32,54 @@
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
background: transparent; background: transparent;
color: white;
"> ">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "class="icon font-40-rem" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon font-40-rem"
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon font-40-rem" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon font-40-rem"
src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</button> </button>
</div> </div>
</div> </div>
<!-- Search drop down --> <!-- Search drop down -->
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1" > <div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1">
<ion-form [class.d-none]="!showSearchInput"> <ion-form >
<div class="d-flex search-input-container ion-justify-content-between" > <div class="searchParent">
<!-- <div class="icon">
<button class="btn-no-color" (click)="basicSearch()">
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</button>
</div> -->
<div class="input-text d-flex ion-align-items-center pm-10">
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input" type="search" placeholder="Pesquisar assunto"></ion-input>
</div>
<!-- <div (click)="clearSearchInput()" class="d-flex align-center icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <div class="d-flex search-input-container ion-justify-content-between searchChild">
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <!-- <div class="icon">
<button class="btn-no-color" (click)="basicSearch()">
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</button>
</div> -->
<div class="input-text d-flex ion-align-items-center pm-10 pl-10">
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input" type="search"
placeholder="Assunto"></ion-input>
</div>
<!-- <div (click)="clearSearchInput()" class="d-flex align-center icon">
</div> --> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
<div (click)="basicSearch()" class="d-flex align-center icon"> </div> -->
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</div> </div>
<div (click)="basicSearch()" class="d-flex align-center searchChild pl-10">
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/icons-search.svg"></ion-icon>
</div>
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open pl-10 cursor-pointer" (click)="showHideAdvanceSearch(true)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda'" src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme != 'default'&& type!='Agenda' " src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
</div>
<div *ngIf="showAdvanceSearch " class="icon-z icon-most-searched-word-open align-md-baseline pl-10 cursor-pointer" (click)="showHideAdvanceSearch(false)" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda' "src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && type!='Agenda'" src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
</div>
</div> </div>
</ion-form> </ion-form>
<!-- --> <!-- -->
@@ -74,71 +93,104 @@
margin-top: -11px; margin-top: -11px;
margin-left: 10px; margin-left: 10px;
"> ">
<input matInput [ngxMatDatetimePicker]="picker1" <input matInput [ngxMatDatetimePicker]="picker1" placeholder="{{datePickerPlaceholder}}"
placeholder="Data Inicio*" [(ngModel)]="searchDocumentDate">
[(ngModel)]="searchDocumentDate" <mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"
> (click)="clickDate()"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="clickDate()" ></mat-datepicker-toggle> <ngx-mat-datetime-picker #picker1 (click)="clickDate()" [showSpinners]="showSpinners"
<ngx-mat-datetime-picker #picker1 (click)="clickDate()" [showSeconds]="showSeconds" [stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond"
[showSpinners]="showSpinners" [touchUi]="touchUi" [hideTime]="true">
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
[touchUi]="touchUi"
>
</ngx-mat-datetime-picker> </ngx-mat-datetime-picker>
</mat-form-field> </mat-form-field>
<div class="icon cursor-pointer" (click)="clearInputDocumentDate()"> <div class="icon cursor-pointer" (click)="clearInputDocumentDate()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " name="restaurant-outline"
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline"
src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div>
</div>
</li>
<li *ngIf="showAdvanceSearch" class="d-flex date-container ion-justify-content-between">
<div *ngIf="checkDateEnd" class="icon-mer icon">
<ion-icon name="restaurant-outline" src="assets/images/icons-advance-search-document.svg"></ion-icon>
</div>
<div *ngIf="checkDateEnd" class="input-container d-flex flex-grow-1 justify-center align-center materia-top">
<mat-form-field appearance="none" class="date-hour-picker" (click)="clickDate()" style="
margin-top: -11px;
margin-left: 10px;
">
<input matInput [ngxMatDatetimePicker]="picker2" placeholder="Data Fim*"
[(ngModel)]="searchDocumentDateEnd">
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker2"
(click)="clickDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker2 (click)="clickDate()" [showSpinners]="showSpinners"
[showSeconds]="showSeconds" [stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond"
[touchUi]="touchUi" [hideTime]="true">
</ngx-mat-datetime-picker>
</mat-form-field>
<div class="icon cursor-pointer" (click)="clearInputDocumentDate()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " name="restaurant-outline"
src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline"
src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> </div>
</div> </div>
</li> </li>
<!-- Sender --> <!-- Sender -->
<li *ngIf="showAdvanceSearch" class="d-flex date-container ion-justify-content-between"> <li *ngIf="showAdvanceSearch" class="d-flex date-container ion-justify-content-between">
<div class="icon-mer icon"> <div *ngIf="checkRoutPublication" class="icon-mer icon">
<ion-icon name="restaurant-outline" src="assets/images/icons-advance-search-sender.svg"></ion-icon> <ion-icon name="restaurant-outline" src="assets/images/icons-advance-search-sender.svg"></ion-icon>
</div> </div>
<div class="input-container d-flex ion-align-items-center"> <div *ngIf="checkRoutPublication" class="input-container d-flex ion-align-items-center">
<ion-input [(ngModel)]='searchSenderdescription' class="search-input cursor-pointer" (click)="openAdvanceSearchSelection()" type="search" placeholder="Remetentes"></ion-input> <ion-input [(ngModel)]='searchSenderdescription' class="search-input cursor-pointer"
<div class="icon cursor-pointer" (click)="clearInputRemetente()" > (click)="openAdvanceSearchSelection()" type="search" placeholder="Remetentes"></ion-input>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <div class="icon cursor-pointer" (click)="clearInputRemetente()">
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " name="restaurant-outline"
src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline"
src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> </div>
</div> </div>
</li> </li>
<!-- Organic entity --> <!-- Organic entity -->
<li *ngIf="showAdvanceSearch" class="d-flex date-container ion-justify-content-between"> <li *ngIf="showAdvanceSearch" class="d-flex date-container ion-justify-content-between">
<div class="icon-mer icon"> <div *ngIf="checkRoutPublication" class="icon-mer icon">
<ion-icon name="restaurant-outline" src="assets/images/icons-arrow-arrow-down-25-copy.svg"></ion-icon> <ion-icon name="restaurant-outline" src="assets/images/icons-arrow-arrow-down-25-copy.svg"></ion-icon>
</div> </div>
<div class="input-container d-flex ion-align-items-center"> <div *ngIf="checkRoutPublication" class="input-container d-flex ion-align-items-center">
<ion-input [(ngModel)]='searchOrganicEntiryDescription' class="search-input custom-checkbox" type="search" placeholder="Entidade Orgânica" (click)="openOrganicEntitySelection()"></ion-input> <ion-input [(ngModel)]='searchOrganicEntiryDescription' class="search-input custom-checkbox" type="search"
<div class="icon cursor-pointer" (click)="clearInputOrganicEntity()" > placeholder="Entidade Orgânica" (click)="openOrganicEntitySelection()"></ion-input>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <div class="icon cursor-pointer" (click)="clearInputOrganicEntity()">
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " name="restaurant-outline"
src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline"
src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> </div>
</div> </div>
</li> </li>
</div> </div>
<!-- search result categories--> <!-- search result categories-->
<div class="options flex-md-grow-1 " *ngIf="showDocuments" <div class="options flex-md-grow-1 " *ngIf="showDocuments" style="border-bottom: 1px solid #f3f3f3;width: unset">
style="border-bottom: 1px solid #f3f3f3;width: unset"
>
<div class="container "> <div class="container ">
<div class="d-flex overflow-x-auto"> <div class="d-flex overflow-x-auto">
<!-- SLIDE --> <!-- SLIDE -->
<div class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': TodosCategory}" class="button cursor-pointer" (click)="noFilter()"> <div class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': TodosCategory}"
class="button cursor-pointer" (click)="noFilter()">
<span>Todos</span> <span>Todos</span>
<ion-label class="label">{{ searchDocuments.length }}</ion-label> <ion-label class="label">{{ searchDocuments.length }}</ion-label>
</div> </div>
<div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': category.Active}" class="button cursor-pointer" (click)="activeCategoty(i); filterDocList(category.Name)"> <div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px"
[ngClass]="{'active-category': category.Active}" class="button cursor-pointer"
(click)="activeCategoty(i); filterDocList(category.Name)">
<span>{{ category.Name }}</span> <span>{{ category.Name }}</span>
<ion-label class="label">{{ category.Qtd }}</ion-label> <ion-label class="label">{{ category.Qtd }}</ion-label>
@@ -147,10 +199,12 @@
</div> </div>
<div class="pl-10" > <div class="pl-10">
<button class="icon-z icon-most-searched-word-open cursor-pointer" ion-button icon-only > <button class="icon-z icon-most-searched-word-open cursor-pointer" ion-button icon-only>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/theme/blue/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "
<ion-icon *ngIf="ThemeService.currentTheme != 'default' " src="assets/images/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon> src="assets/images/theme/blue/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme != 'default' "
src="assets/images/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
</button> </button>
</div> </div>
@@ -168,7 +222,7 @@
<div class="height-100"> <div class="height-100">
<div class="d-flex seach-wrapper height-100 flex-row justify-space-between"> <div class="d-flex seach-wrapper height-100 flex-row justify-space-between">
<div class="d-flex height-100 overflow-y-auto flex-1" *ngIf="!showDocuments || windowWidth >= 1024" <div class="d-flex height-100 overflow-y-auto flex-1" *ngIf="!showDocuments || windowWidth >= 1024"
style="border-right: 1px solid #ddd7d7;"> style="border-right: 1px solid #ddd7d7;">
<!-- most searched word--> <!-- most searched word-->
@@ -179,11 +233,11 @@
</div> </div>
</div> </div>
<div class=" height-100 overflow-y-auto flex-1" *ngIf="showDocuments"> <div class=" height-100 overflow-y-auto flex-1" *ngIf="showDocuments">
<div> <div>
<!-- search result document--> <!-- search result document-->
<div class="search-result" > <div class="search-result">
<div class="header"> <div class="header">
<div class="d-flex ion-justify-content-between ion-align-items-center"> <div class="d-flex ion-justify-content-between ion-align-items-center">
<div class="d-flex sort-by ion-justify-content-center"> <div class="d-flex sort-by ion-justify-content-center">
@@ -194,36 +248,54 @@
</p> </p>
</div> </div>
<div> <div>
<div *ngIf="ordinance == 'old'" (click)="reorderList('recent')"> <div *ngIf="ordinance == 'old'" (click)="reorderList('recent')">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-up.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-arrow-arrow-up.svg"></ion-icon> src="assets/images/icons-arrow-arrow-up.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' "
src="assets/images/theme/gov/icons-arrow-arrow-up.svg"></ion-icon>
</div> </div>
<div *ngIf="ordinance == 'recent'" (click)="reorderList('old')"> <div *ngIf="ordinance == 'recent'" (click)="reorderList('old')">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-down-25.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-arrow-arrow-down.svg"></ion-icon> src="assets/images/icons-arrow-arrow-down-25.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' "
src="assets/images/theme/gov/icons-arrow-arrow-down.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<ul> <ul>
<li *ngFor="let searchDocument of showSearchDocuments" (click)="viewDetail( searchDocument); selectItem(searchDocument)" class="d-flex cursor-pointer"> <li *ngFor="let searchDocument of showSearchDocuments"
(click)="viewDetail( searchDocument); selectItem(searchDocument)" class="d-flex cursor-pointer">
<div class="icon"> <div class="icon">
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' && ThemeService.currentTheme == 'default' " src="assets/images/icons-search-document.svg"></ion-icon> <ion-icon
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' && ThemeService.currentTheme == 'gov'" src="assets/images/theme/gov/icons-search-document.svg"></ion-icon> *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' && ThemeService.currentTheme == 'default' "
src="assets/images/icons-search-document.svg"></ion-icon>
<ion-icon
*ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' && ThemeService.currentTheme == 'gov'"
src="assets/images/theme/gov/icons-search-document.svg"></ion-icon>
<ion-icon *ngIf="itemIcons() == 'Agenda' " src="assets/images/icons-default-agenda.svg"></ion-icon> <ion-icon *ngIf="itemIcons() == 'Agenda' " src="assets/images/icons-default-agenda.svg"></ion-icon>
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais' && searchDocument.DocTypeDesc == 'Publicações'" src="assets/images/icons-viagem.svg"></ion-icon> <ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais' && searchDocument.DocTypeDesc == 'Publicações'"
src="assets/images/icons-viagem.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && itemIcons() == 'AccoesPresidenciais' && searchDocument.DocTypeDesc == 'Acções' " slot="end" src='assets/images/theme/gov/icons-nav-actions.svg'></ion-icon> <ion-icon
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' && itemIcons() == 'AccoesPresidenciais' && searchDocument.DocTypeDesc == 'Acções' " slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-nav-actions.svg'></ion-icon> *ngIf="ThemeService.currentTheme == 'gov' && itemIcons() == 'AccoesPresidenciais' && searchDocument.DocTypeDesc == 'Acções' "
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && itemIcons() == 'AccoesPresidenciais' && searchDocument.DocTypeDesc == 'Acções' " slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon> slot="end" src='assets/images/theme/gov/icons-nav-actions.svg'></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'doneIt' && itemIcons() == 'AccoesPresidenciais' && searchDocument.DocTypeDesc == 'Acções' "
slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-nav-actions.svg'></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'default' && itemIcons() == 'AccoesPresidenciais' && searchDocument.DocTypeDesc == 'Acções' "
slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
</div> </div>
<div class="content ion-align-items-center"> <div class="content ion-align-items-center">
<div class="d-flex ion-justify-content-between "> <div class="d-flex ion-justify-content-between ">
<span class="result-name">{{ searchDocument.Assunto}}</span> <span class="result-name">{{ searchDocument.Assunto}}</span>
<span class="app-name" *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' ">{{ searchDocument.appName}}</span> <span class="app-name"
*ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' ">{{
searchDocument.appName}}</span>
</div> </div>
<div class="d-flex ion-justify-content-between "> <div class="d-flex ion-justify-content-between ">
<span class="organic-entity">{{ searchDocument.EntidadeOrganicaNome }}</span> <span class="organic-entity">{{ searchDocument.EntidadeOrganicaNome }}</span>

Some files were not shown because too many files have changed in this diff Show More