From 1ac6483d67bac178e560a2181174518180caadf5 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Fri, 14 Oct 2022 16:38:52 +0300 Subject: [PATCH] copied src from mohemm cs --- .../CordovaHMSGMSCheckPlugin/plugin.xml | 29 --- .../scripts/after_prepare.js | 37 ---- .../scripts/android/after_plugin_install.js | 9 - .../android/before_plugin_uninstall.js | 7 - .../scripts/android/helper.js | 131 ------------ .../scripts/lib/utilities.js | 93 --------- .../src/android/CordovaHMSGMSCheckPlugin.java | 88 --------- .../src/android/build.gradle | 29 --- .../CordovaHMSLocationPlugin/plugin.xml | 29 --- .../scripts/after_prepare.js | 38 ---- .../scripts/android/after_plugin_install.js | 9 - .../android/before_plugin_uninstall.js | 7 - .../scripts/android/helper.js | 117 ----------- .../scripts/lib/utilities.js | 88 --------- .../src/android/CordovaHMSLocationPlugin.java | 186 ------------------ .../src/android/build.gradle | 29 --- .../CordovaHMSPushPlugin/plugin.xml | 38 ---- .../scripts/after_prepare.js | 38 ---- .../scripts/android/after_plugin_install.js | 9 - .../android/before_plugin_uninstall.js | 7 - .../scripts/android/helper.js | 117 ----------- .../scripts/lib/utilities.js | 88 --------- .../src/android/CordovaHMSPushPlugin.java | 112 ----------- .../src/android/MessageService.java | 32 --- .../src/android/build.gradle | 29 --- Mohem/src/app/app-routing.module.ts | 5 +- .../sms-page/sms-page.page.scss | 28 +-- .../announcement/announcement.component.html | 16 +- .../announcement/announcement.component.scss | 38 ++-- .../announcement/announcement.component.ts | 57 +++--- Mohem/src/app/hmg-common/hmg_utils.ts | 108 +++++----- .../authentication/authentication.service.ts | 6 +- .../services/common/common.service.ts | 4 +- .../hmg-common/services/push/push.service.ts | 30 ++- .../hr-request-form.component.ts | 2 +- .../notification-center.module.ts | 29 +++ .../notification-center.page.html | 6 + .../notification-center.page.scss | 0 .../notification-center.page.spec.ts | 27 +++ .../notification-center.page.ts | 15 ++ .../notification-detail/detail.component.html | 21 ++ .../notification-detail/detail.component.scss | 84 ++++++++ .../detail.component.spec.ts | 25 +++ .../notification-detail/detail.component.ts | 42 ++++ .../worklist-main-ic.component.html | 9 +- .../worklist-main-ic.component.ts | 3 +- .../worklist-main-mr.component.html | 12 +- .../worklist-main-mr.component.ts | 2 + .../worklist-main-po.component.html | 10 +- .../worklist-main-po.component.ts | 4 +- .../worklist-main-pr.component.html | 10 +- .../worklist-main-pr.component.ts | 2 + .../worklist-main.component.html | 8 +- .../worklist-main/worklist-main.component.ts | 4 +- .../offersdiscount/home/home.component.html | 18 +- .../app/offersdiscount/home/home.component.ts | 5 +- .../offer-details.component.html | 32 +-- .../offer-details/offer-details.component.ts | 2 +- .../app/offersdiscount/services/service.ts | 2 +- .../src/assets/imgs/mohemm-action/Doable.png | Bin 1371 -> 1413 bytes .../PUSH NOTIFICATIONS/.DS_Store | Bin 6148 -> 0 bytes .../PUSH NOTIFICATIONS/AuthKey_67L2G322GR.p8 | 6 - 62 files changed, 490 insertions(+), 1578 deletions(-) delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/plugin.xml delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/after_prepare.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/after_plugin_install.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/before_plugin_uninstall.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/helper.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/lib/utilities.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/src/android/CordovaHMSGMSCheckPlugin.java delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/src/android/build.gradle delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/plugin.xml delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/after_prepare.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/after_plugin_install.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/before_plugin_uninstall.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/helper.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/lib/utilities.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/src/android/CordovaHMSLocationPlugin.java delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/src/android/build.gradle delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/plugin.xml delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/after_prepare.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/after_plugin_install.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/before_plugin_uninstall.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/helper.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/lib/utilities.js delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/CordovaHMSPushPlugin.java delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/MessageService.java delete mode 100644 Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/build.gradle create mode 100644 Mohem/src/app/notification-center/notification-center.module.ts create mode 100644 Mohem/src/app/notification-center/notification-center.page.html create mode 100644 Mohem/src/app/notification-center/notification-center.page.scss create mode 100644 Mohem/src/app/notification-center/notification-center.page.spec.ts create mode 100644 Mohem/src/app/notification-center/notification-center.page.ts create mode 100644 Mohem/src/app/notification-center/notification-detail/detail.component.html create mode 100644 Mohem/src/app/notification-center/notification-detail/detail.component.scss create mode 100644 Mohem/src/app/notification-center/notification-detail/detail.component.spec.ts create mode 100644 Mohem/src/app/notification-center/notification-detail/detail.component.ts delete mode 100644 app document/Mohemm Updated Documents Android IOS/CLOUD SOLUTIONS MOHEMM/CLOUD SOLUTIONS MOHEMM/CLOUD SOLUTIONS MOHEMM DEVELOPMENT SSL CERTIFICATE/PUSH NOTIFICATIONS/.DS_Store delete mode 100644 app document/Mohemm Updated Documents Android IOS/CLOUD SOLUTIONS MOHEMM/CLOUD SOLUTIONS MOHEMM/CLOUD SOLUTIONS MOHEMM DEVELOPMENT SSL CERTIFICATE/PUSH NOTIFICATIONS/AuthKey_67L2G322GR.p8 diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/plugin.xml b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/plugin.xml deleted file mode 100644 index 63d1d203..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/plugin.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - CordovaHMSGMSCheckPlugin - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/after_prepare.js b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/after_prepare.js deleted file mode 100644 index b3da28cf..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/after_prepare.js +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env node - -"use strict"; - -/** - * This hook makes sure projects using [cordova-plugin-firebase](https://github.com/arnesson/cordova-plugin-firebase) - * will build properly and have the required key files copied to the proper destinations when the app is build on Ionic Cloud using the package command. - * Credits: https://github.com/arnesson. - */ -var fs = require("fs"); -var path = require("path"); -var utilities = require("./lib/utilities"); - -var config = fs.readFileSync("config.xml").toString(); -var name = utilities.getValue(config, "name"); - -var ANDROID_DIR = "platforms/android"; - -var PLATFORM = { - ANDROID: { - dest: [ANDROID_DIR + "/app/agconnect-services.json"], - src: ["agconnect-services.json"], - }, -}; - -module.exports = function (context) { - //get platform from the context supplied by cordova - var platforms = context.opts.platforms; - // Copy key files to their platform specific folders - if ( - platforms.indexOf("android") !== -1 && - utilities.directoryExists(ANDROID_DIR) - ) { - console.log("Preparing HMS GMS Check Kit on Android"); - // utilities.copyKey(PLATFORM.ANDROID); - } -}; diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/after_plugin_install.js b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/after_plugin_install.js deleted file mode 100644 index 09e73419..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/after_plugin_install.js +++ /dev/null @@ -1,9 +0,0 @@ -var helper = require('./helper'); - -module.exports = function(context) { - - // Modify the Gradle build file to add a task that will upload the debug symbols - // at build time. - helper.restoreRootBuildGradle(); - helper.modifyRootBuildGradle(); -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/before_plugin_uninstall.js b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/before_plugin_uninstall.js deleted file mode 100644 index 9c32e552..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/before_plugin_uninstall.js +++ /dev/null @@ -1,7 +0,0 @@ -var helper = require('./helper'); - -module.exports = function(context) { - - // Remove the Gradle modifications that were added when the plugin was installed. - helper.restoreRootBuildGradle(); -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/helper.js b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/helper.js deleted file mode 100644 index cd4b8111..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/android/helper.js +++ /dev/null @@ -1,131 +0,0 @@ -var fs = require("fs"); -var path = require("path"); - -function rootBuildGradleExists() { - var target = path.join("platforms", "android", "build.gradle"); - return fs.existsSync(target); -} - -/* - * Helper function to read the build.gradle that sits at the root of the project - */ -function readRootBuildGradle() { - var target = path.join("platforms", "android", "build.gradle"); - return fs.readFileSync(target, "utf-8"); -} - -/* - * Added a dependency on 'com.google.gms' based on the position of the know 'com.android.tools.build' dependency in the build.gradle - */ -function addDependencies(buildGradle) { - // find the known line to match - var match = buildGradle.match( - /^(\s*)classpath 'com.android.tools.build(.*)/m - ); - var whitespace = match[1]; - - // modify the line to add the necessary dependencies - var agcDependency = - whitespace + "classpath 'com.huawei.agconnect:agcp:1.2.0.300'"; - - var modifiedLine = match[0] + "\n" + agcDependency; - - // modify the actual line - return buildGradle.replace( - /^(\s*)classpath 'com.android.tools.build(.*)/m, - modifiedLine - ); -} - -/* - * Add 'google()' and Crashlytics to the repository repo list - */ -function addRepos(buildGradle) { - // find the known line to match - var match = buildGradle.match(/^(\s*)jcenter\(\)/m); - var whitespace = match[1]; - - // modify the line to add the necessary repo - var huaweiMavenRepo = - whitespace + "maven { url 'http://developer.huawei.com/repo/' }"; - var modifiedLine = match[0] + "\n" + huaweiMavenRepo; - - // modify the actual line - buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - - // update the all projects grouping - var allProjectsIndex = buildGradle.indexOf("allprojects"); - if (allProjectsIndex > 0) { - // split the string on allprojects because jcenter is in both groups and we need to modify the 2nd instance - var firstHalfOfFile = buildGradle.substring(0, allProjectsIndex); - var secondHalfOfFile = buildGradle.substring(allProjectsIndex); - - // Add google() to the allprojects section of the string - match = secondHalfOfFile.match(/^(\s*)jcenter\(\)/m); - var huaweiMavenRepo = - whitespace + "maven { url 'http://developer.huawei.com/repo/' }"; - modifiedLine = match[0] + "\n" + huaweiMavenRepo; - // modify the part of the string that is after 'allprojects' - secondHalfOfFile = secondHalfOfFile.replace( - /^(\s*)jcenter\(\)/m, - modifiedLine - ); - - // recombine the modified line - buildGradle = firstHalfOfFile + secondHalfOfFile; - } else { - // this should not happen, but if it does, we should try to add the dependency to the buildscript - match = buildGradle.match(/^(\s*)jcenter\(\)/m); - var huaweiMavenRepo = - whitespace + "maven { url 'http://developer.huawei.com/repo/' }"; - modifiedLine = match[0] + "\n" + huaweiMavenRepo; - // modify the part of the string that is after 'allprojects' - buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - } - - return buildGradle; -} - -/* - * Helper function to write to the build.gradle that sits at the root of the project - */ -function writeRootBuildGradle(contents) { - var target = path.join("platforms", "android", "build.gradle"); - fs.writeFileSync(target, contents); -} - -module.exports = { - modifyRootBuildGradle: function () { - // be defensive and don't crash if the file doesn't exist - if (!rootBuildGradleExists) { - return; - } - - var buildGradle = readRootBuildGradle(); - - // Add Google Play Services Dependency - buildGradle = addDependencies(buildGradle); - - // Add Google's Maven Repo - buildGradle = addRepos(buildGradle); - - writeRootBuildGradle(buildGradle); - }, - - restoreRootBuildGradle: function () { - // be defensive and don't crash if the file doesn't exist - if (!rootBuildGradleExists) { - return; - } - - var buildGradle = readRootBuildGradle(); - - // remove any lines we added - buildGradle = buildGradle.replace( - /(?:^|\r?\n)(.*)com.huawei.cordovahmsgmscheckplugin*?(?=$|\r?\n)/g, - "" - ); - - writeRootBuildGradle(buildGradle); - }, -}; diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/lib/utilities.js b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/lib/utilities.js deleted file mode 100644 index 89ecc01f..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/scripts/lib/utilities.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Utilities and shared functionality for the build hooks. - */ -var fs = require("fs"); -var path = require("path"); - -fs.ensureDirSync = function (dir) { - if (!fs.existsSync(dir)) { - dir.split(path.sep).reduce(function (currentPath, folder) { - currentPath += folder + path.sep; - if (!fs.existsSync(currentPath)) { - fs.mkdirSync(currentPath); - } - return currentPath; - }, ""); - } -}; - -module.exports = { - /** - * Used to get the name of the application as defined in the config.xml. - * - * @param {object} context - The Cordova context. - * @returns {string} The value of the name element in config.xml. - */ - getAppName: function (context) { - var ConfigParser = context.requireCordovaModule("cordova-lib").configparser; - var config = new ConfigParser("config.xml"); - return config.name(); - }, - - /** - * The ID of the plugin; this should match the ID in plugin.xml. - */ - getPluginId: function () { - return "com.huawei.cordovahmsgmscheckplugin"; - }, - - copyKey: function (platform) { - for (var i = 0; i < platform.src.length; i++) { - var file = platform.src[i]; - if (this.fileExists(file)) { - try { - var contents = fs.readFileSync(file).toString(); - - try { - platform.dest.forEach(function (destinationPath) { - var folder = destinationPath.substring( - 0, - destinationPath.lastIndexOf("/") - ); - fs.ensureDirSync(folder); - fs.writeFileSync(destinationPath, contents); - }); - } catch (e) { - // skip - } - } catch (err) { - console.log(err); - } - - break; - } - } - }, - - getValue: function (config, name) { - var value = config.match( - new RegExp("<" + name + "(.*?)>(.*?)", "i") - ); - if (value && value[2]) { - return value[2]; - } else { - return null; - } - }, - - fileExists: function (path) { - try { - return fs.statSync(path).isFile(); - } catch (e) { - return false; - } - }, - - directoryExists: function (path) { - try { - return fs.statSync(path).isDirectory(); - } catch (e) { - return false; - } - }, -}; diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/src/android/CordovaHMSGMSCheckPlugin.java b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/src/android/CordovaHMSGMSCheckPlugin.java deleted file mode 100644 index 86307e6b..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/src/android/CordovaHMSGMSCheckPlugin.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.huawei.cordovahmsgmscheckplugin; - -import android.content.Context; -import android.content.Intent; -import android.util.Log; - -import com.huawei.hms.api.HuaweiApiAvailability; -// import com.google.android.gms.common.GoogleApiAvailability; - -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaInterfaceImpl; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CallbackContext; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -/** - * This class echoes a string called from JavaScript. - */ -public class CordovaHMSGMSCheckPlugin extends CordovaPlugin { - - private static final String TAG = CordovaHMSGMSCheckPlugin.class.getSimpleName(); - private CallbackContext mCallbackContext; - - @Override - public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { - switch (action) { - case "isHmsAvailable": - mCallbackContext = callbackContext; - cordova.getThreadPool().execute(this::isHmsAvailable); - return true; - case "isGmsAvailable": - // mCallbackContext = callbackContext; - // cordova.getThreadPool().execute(this::isGmsAvailable); - return false; - } - return false; - } - - private void isHmsAvailable() { - boolean isAvailable = false; - Context context = cordova.getContext(); - if (null != cordova.getContext()) { - int result = HuaweiApiAvailability.getInstance().isHuaweiMobileServicesAvailable(context); - isAvailable = (com.huawei.hms.api.ConnectionResult.SUCCESS == result); - } - Log.i("Cordova", "isHmsAvailable: " + isAvailable); - String msg = "false"; - if(isAvailable){ - msg = "true"; - } - outputCallbackContext(0, msg); - } - - // private void isGmsAvailable() { - // boolean isAvailable = false; - // Context context = cordova.getContext(); - // if (null != context) { - // int result = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context); - // isAvailable = (com.google.android.gms.common.ConnectionResult.SUCCESS == result); - // } - // Log.i("Cordova", "isGmsAvailable: " + isAvailable); - // String msg = "false"; - // if(isAvailable){ - // msg = "true"; - // } - // outputCallbackContext(0, msg); - // } - - /** - * @param type 0-success,1-error - * @param msg message - */ - private void outputCallbackContext(int type, String msg) { - if (mCallbackContext != null) { - switch (type) { - case 0: - mCallbackContext.success(msg); - break; - case 1: - mCallbackContext.error(msg); - break; - } - } - } -} diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/src/android/build.gradle b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/src/android/build.gradle deleted file mode 100644 index 30dda1bf..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/src/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - jcenter() - // huawei maven - maven { url 'http://developer.huawei.com/repo/' } - } - dependencies { - classpath 'com.android.tools.build:gradle:3.2.0' - // classpath 'com.huawei.agconnect:agcp:1.2.0.300' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - jcenter() - // huawei maven - maven { url 'http://developer.huawei.com/repo/' } - } -} - -cdvPluginPostBuildExtras.add({ - apply plugin: 'com.huawei.agconnect' -}) diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/plugin.xml b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/plugin.xml deleted file mode 100644 index 126ffbc8..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/plugin.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - CordovaHMSLocationPlugin - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/after_prepare.js b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/after_prepare.js deleted file mode 100644 index adc5a480..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/after_prepare.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -/** - * This hook makes sure projects using [cordova-plugin-firebase](https://github.com/arnesson/cordova-plugin-firebase) - * will build properly and have the required key files copied to the proper destinations when the app is build on Ionic Cloud using the package command. - * Credits: https://github.com/arnesson. - */ -var fs = require('fs'); -var path = require('path'); -var utilities = require("./lib/utilities"); - -var config = fs.readFileSync('config.xml').toString(); -var name = utilities.getValue(config, 'name'); - -var ANDROID_DIR = 'platforms/android'; - -var PLATFORM = { - ANDROID: { - dest: [ - ANDROID_DIR + '/app/agconnect-services.json' - ], - src: [ - 'agconnect-services.json' - ], - } -}; - -module.exports = function (context) { - //get platform from the context supplied by cordova - var platforms = context.opts.platforms; - // Copy key files to their platform specific folders - if (platforms.indexOf('android') !== -1 && utilities.directoryExists(ANDROID_DIR)) { - console.log('Preparing HMS Location Kit on Android'); - utilities.copyKey(PLATFORM.ANDROID); - } -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/after_plugin_install.js b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/after_plugin_install.js deleted file mode 100644 index 09e73419..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/after_plugin_install.js +++ /dev/null @@ -1,9 +0,0 @@ -var helper = require('./helper'); - -module.exports = function(context) { - - // Modify the Gradle build file to add a task that will upload the debug symbols - // at build time. - helper.restoreRootBuildGradle(); - helper.modifyRootBuildGradle(); -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/before_plugin_uninstall.js b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/before_plugin_uninstall.js deleted file mode 100644 index 9c32e552..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/before_plugin_uninstall.js +++ /dev/null @@ -1,7 +0,0 @@ -var helper = require('./helper'); - -module.exports = function(context) { - - // Remove the Gradle modifications that were added when the plugin was installed. - helper.restoreRootBuildGradle(); -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/helper.js b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/helper.js deleted file mode 100644 index da715c24..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/android/helper.js +++ /dev/null @@ -1,117 +0,0 @@ -var fs = require("fs"); -var path = require("path"); - -function rootBuildGradleExists() { - var target = path.join("platforms", "android", "build.gradle"); - return fs.existsSync(target); -} - -/* - * Helper function to read the build.gradle that sits at the root of the project - */ -function readRootBuildGradle() { - var target = path.join("platforms", "android", "build.gradle"); - return fs.readFileSync(target, "utf-8"); -} - -/* - * Added a dependency on 'com.google.gms' based on the position of the know 'com.android.tools.build' dependency in the build.gradle - */ -function addDependencies(buildGradle) { - // find the known line to match - var match = buildGradle.match(/^(\s*)classpath 'com.android.tools.build(.*)/m); - var whitespace = match[1]; - - // modify the line to add the necessary dependencies - var agcDependency = whitespace + 'classpath \'com.huawei.agconnect:agcp:1.2.0.300\'' - - var modifiedLine = match[0] + '\n' + agcDependency; - - // modify the actual line - return buildGradle.replace(/^(\s*)classpath 'com.android.tools.build(.*)/m, modifiedLine); -} - -/* - * Add 'google()' and Crashlytics to the repository repo list - */ -function addRepos(buildGradle) { - // find the known line to match - var match = buildGradle.match(/^(\s*)jcenter\(\)/m); - var whitespace = match[1]; - - // modify the line to add the necessary repo - var huaweiMavenRepo = whitespace + 'maven { url \'http://developer.huawei.com/repo/\' }' - var modifiedLine = match[0] + '\n' + huaweiMavenRepo; - - // modify the actual line - buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - - // update the all projects grouping - var allProjectsIndex = buildGradle.indexOf('allprojects'); - if (allProjectsIndex > 0) { - // split the string on allprojects because jcenter is in both groups and we need to modify the 2nd instance - var firstHalfOfFile = buildGradle.substring(0, allProjectsIndex); - var secondHalfOfFile = buildGradle.substring(allProjectsIndex); - - // Add google() to the allprojects section of the string - match = secondHalfOfFile.match(/^(\s*)jcenter\(\)/m); - var huaweiMavenRepo = whitespace + 'maven { url \'http://developer.huawei.com/repo/\' }' - modifiedLine = match[0] + '\n' + huaweiMavenRepo; - // modify the part of the string that is after 'allprojects' - secondHalfOfFile = secondHalfOfFile.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - - // recombine the modified line - buildGradle = firstHalfOfFile + secondHalfOfFile; - } else { - // this should not happen, but if it does, we should try to add the dependency to the buildscript - match = buildGradle.match(/^(\s*)jcenter\(\)/m); - var huaweiMavenRepo = whitespace + 'maven { url \'http://developer.huawei.com/repo/\' }' - modifiedLine = match[0] + '\n' + huaweiMavenRepo; - // modify the part of the string that is after 'allprojects' - buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - } - - return buildGradle; -} - -/* - * Helper function to write to the build.gradle that sits at the root of the project - */ -function writeRootBuildGradle(contents) { - var target = path.join("platforms", "android", "build.gradle"); - fs.writeFileSync(target, contents); -} - -module.exports = { - - modifyRootBuildGradle: function() { - // be defensive and don't crash if the file doesn't exist - if (!rootBuildGradleExists) { - return; - } - - var buildGradle = readRootBuildGradle(); - - // Add Google Play Services Dependency - buildGradle = addDependencies(buildGradle); - - // Add Google's Maven Repo - buildGradle = addRepos(buildGradle); - - writeRootBuildGradle(buildGradle); - }, - - restoreRootBuildGradle: function() { - // be defensive and don't crash if the file doesn't exist - if (!rootBuildGradleExists) { - return; - } - - var buildGradle = readRootBuildGradle(); - - // remove any lines we added - buildGradle = buildGradle.replace(/(?:^|\r?\n)(.*)com.huawei.cordovahmspushplugin*?(?=$|\r?\n)/g, ''); - - writeRootBuildGradle(buildGradle); - } -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/lib/utilities.js b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/lib/utilities.js deleted file mode 100644 index 015f6831..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/scripts/lib/utilities.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Utilities and shared functionality for the build hooks. - */ -var fs = require('fs'); -var path = require("path"); - -fs.ensureDirSync = function (dir) { - if (!fs.existsSync(dir)) { - dir.split(path.sep).reduce(function (currentPath, folder) { - currentPath += folder + path.sep; - if (!fs.existsSync(currentPath)) { - fs.mkdirSync(currentPath); - } - return currentPath; - }, ''); - } -}; - -module.exports = { - /** - * Used to get the name of the application as defined in the config.xml. - * - * @param {object} context - The Cordova context. - * @returns {string} The value of the name element in config.xml. - */ - getAppName: function (context) { - var ConfigParser = context.requireCordovaModule("cordova-lib").configparser; - var config = new ConfigParser("config.xml"); - return config.name(); - }, - - /** - * The ID of the plugin; this should match the ID in plugin.xml. - */ - getPluginId: function () { - return "com.huawei.cordovahmspushplugin"; - }, - - copyKey: function (platform) { - for (var i = 0; i < platform.src.length; i++) { - var file = platform.src[i]; - if (this.fileExists(file)) { - try { - var contents = fs.readFileSync(file).toString(); - - try { - platform.dest.forEach(function (destinationPath) { - var folder = destinationPath.substring(0, destinationPath.lastIndexOf('/')); - fs.ensureDirSync(folder); - fs.writeFileSync(destinationPath, contents); - }); - } catch (e) { - // skip - } - } catch (err) { - console.log(err); - } - - break; - } - } - }, - - getValue: function (config, name) { - var value = config.match(new RegExp('<' + name + '(.*?)>(.*?)', 'i')); - if (value && value[2]) { - return value[2] - } else { - return null - } - }, - - fileExists: function (path) { - try { - return fs.statSync(path).isFile(); - } catch (e) { - return false; - } - }, - - directoryExists: function (path) { - try { - return fs.statSync(path).isDirectory(); - } catch (e) { - return false; - } - } -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/src/android/CordovaHMSLocationPlugin.java b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/src/android/CordovaHMSLocationPlugin.java deleted file mode 100644 index 4b094ad5..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/src/android/CordovaHMSLocationPlugin.java +++ /dev/null @@ -1,186 +0,0 @@ -package com.huawei.cordovahmslocationplugin; - -import android.Manifest; -import android.content.IntentSender; -import android.location.Location; -import android.os.Build; -import android.os.Looper; -import android.util.Log; - -import com.huawei.hms.common.ApiException; -import com.huawei.hms.common.ResolvableApiException; -import com.huawei.hms.location.FusedLocationProviderClient; -import com.huawei.hms.location.LocationCallback; -import com.huawei.hms.location.LocationRequest; -import com.huawei.hms.location.LocationResult; -import com.huawei.hms.location.LocationServices; -import com.huawei.hms.location.LocationSettingsRequest; -import com.huawei.hms.location.LocationSettingsStatusCodes; -import com.huawei.hms.location.SettingsClient; - -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; - -/** - * - */ - // https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-References-V1/data-types-0000001056511617-V1#section2512153819346 -public class CordovaHMSLocationPlugin extends CordovaPlugin { - - private static final String TAG = CordovaHMSLocationPlugin.class.getSimpleName(); - - private FusedLocationProviderClient fusedLocationProviderClient; - private LocationRequest mLocationRequest; - private LocationCallback mLocationCallback; - private CallbackContext mCallbackContext; - - @Override - public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { - requestPermission(); - if (fusedLocationProviderClient == null) { - fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(cordova.getContext()); - } - switch (action) { - case "requestLocation": - this.setLocationRequest(); - this.setLocationCallback(); - this.checkLocationSetting(callbackContext); - return true; - case "removeLocation": - this.stopLocation(); - return true; - case "getLastlocation": - this.getLastlocation(callbackContext); - return true; - default: - return false; - } - } - - private void returnLocation(Location location) { - if (mCallbackContext != null) { - Log.d(TAG, "returnLocation"); - String message = location.getLatitude() + "," + location.getLongitude() + "," + location.isFromMockProvider(); - PluginResult result = new PluginResult(PluginResult.Status.OK, message); - result.setKeepCallback(true); - mCallbackContext.sendPluginResult(result); - } - } - - private void getLastlocation(CallbackContext callbackContext) { - fusedLocationProviderClient.getLastLocation().addOnSuccessListener(location -> { - Log.d(TAG, "getLastlocation success"); - if (location == null) { - return; - } - // Location对象的处理逻辑 - String message = location.getLatitude() + "," + location.getLongitude(); - callbackContext.success(message); - }).addOnFailureListener(e -> { - // 异常处理逻辑 - callbackContext.error("getLastlocation fail"); - }); - } - - private void stopLocation() { - if (fusedLocationProviderClient == null) { - Log.d(TAG, "fusedLocationProviderClient is null"); - return; - } - // 注意:停止位置更新时,mLocationCallback必须与requestLocationUpdates方法中的LocationCallback参数为同一对象。 - fusedLocationProviderClient.removeLocationUpdates(mLocationCallback) - .addOnSuccessListener(aVoid -> { - // 停止位置更新成功 - Log.d(TAG, "stop success"); - mCallbackContext = null; - }) - .addOnFailureListener(e -> { - // 停止位置更新失败 - Log.d(TAG, "stop fail"); - }); - } - - private void setLocationCallback() { - mLocationCallback = new LocationCallback() { - @Override - public void onLocationResult(LocationResult locationResult) { - if (locationResult != null) { - //处理位置回调结果 - if (mLocationCallback != null) { - Log.d(TAG, "onLocationResult"); - Location location = locationResult.getLocations().get(0); - returnLocation(location); - } - } - } - }; - } - - private void setLocationRequest() { - mLocationRequest = new LocationRequest(); - // 设置位置更新的间隔(毫秒为单位) - mLocationRequest.setInterval(10000); -// mLocationRequest.setNumUpdates(1); - // 设置权重 - mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); - } - - private void checkLocationSetting(CallbackContext callbackContext) { - SettingsClient settingsClient = LocationServices.getSettingsClient(cordova.getContext()); - LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder(); - builder.addLocationRequest(mLocationRequest); - LocationSettingsRequest locationSettingsRequest = builder.build(); - // 检查设备定位设置 - settingsClient.checkLocationSettings(locationSettingsRequest) - .addOnSuccessListener(locationSettingsResponse -> { - - // 设置满足定位条件,再发起位置请求 - fusedLocationProviderClient - .requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.getMainLooper()) - .addOnSuccessListener(aVoid -> { - // 接口调用成功的处理 - Log.d(TAG, "request success"); - mCallbackContext = callbackContext; - }); - }) - .addOnFailureListener(e -> { - // 设置不满足定位条件 - int statusCode = ((ApiException) e).getStatusCode(); - switch (statusCode) { - case LocationSettingsStatusCodes.RESOLUTION_REQUIRED: - try { - ResolvableApiException rae = (ResolvableApiException) e; - // 调用startResolutionForResult可以弹窗提示用户打开相应权限 - rae.startResolutionForResult(cordova.getActivity(), 0); - } catch (IntentSender.SendIntentException sie) { - Log.d(TAG, sie.getMessage()); - } - break; - } - }); - } - - private void requestPermission() { - if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) { - Log.i(TAG, "sdk < 29 Q"); - if (!cordova.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) - || !cordova.hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION)) { - String[] strings = - {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}; - cordova.requestPermissions(this, 1, strings); - } - } else { - if (!cordova.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) - || !cordova.hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION) - || !cordova.hasPermission("android.permission.ACCESS_BACKGROUND_LOCATION")) { - String[] strings = {android.Manifest.permission.ACCESS_FINE_LOCATION, - android.Manifest.permission.ACCESS_COARSE_LOCATION, - "android.permission.ACCESS_BACKGROUND_LOCATION"}; - cordova.requestPermissions(this, 2, strings); - } - } - } -} diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/src/android/build.gradle b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/src/android/build.gradle deleted file mode 100644 index 23296fb7..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/src/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - jcenter() - // huawei maven - maven { url 'http://developer.huawei.com/repo/' } - } - dependencies { - classpath 'com.android.tools.build:gradle:3.2.0' - classpath 'com.huawei.agconnect:agcp:1.2.0.300' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - jcenter() - // huawei maven - maven { url 'http://developer.huawei.com/repo/' } - } -} - -cdvPluginPostBuildExtras.add({ - apply plugin: 'com.huawei.agconnect' -}) diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/plugin.xml b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/plugin.xml deleted file mode 100644 index d7ccbfa7..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/plugin.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - CordovaHMSPushPlugin - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/after_prepare.js b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/after_prepare.js deleted file mode 100644 index ab6c7b7e..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/after_prepare.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -/** - * This hook makes sure projects using [cordova-plugin-firebase](https://github.com/arnesson/cordova-plugin-firebase) - * will build properly and have the required key files copied to the proper destinations when the app is build on Ionic Cloud using the package command. - * Credits: https://github.com/arnesson. - */ -var fs = require('fs'); -var path = require('path'); -var utilities = require("./lib/utilities"); - -var config = fs.readFileSync('config.xml').toString(); -var name = utilities.getValue(config, 'name'); - -var ANDROID_DIR = 'platforms/android'; - -var PLATFORM = { - ANDROID: { - dest: [ - ANDROID_DIR + '/app/agconnect-services.json' - ], - src: [ - 'agconnect-services.json' - ], - } -}; - -module.exports = function (context) { - //get platform from the context supplied by cordova - var platforms = context.opts.platforms; - // Copy key files to their platform specific folders - if (platforms.indexOf('android') !== -1 && utilities.directoryExists(ANDROID_DIR)) { - console.log('Preparing HMS Push Kit on Android'); - utilities.copyKey(PLATFORM.ANDROID); - } -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/after_plugin_install.js b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/after_plugin_install.js deleted file mode 100644 index 09e73419..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/after_plugin_install.js +++ /dev/null @@ -1,9 +0,0 @@ -var helper = require('./helper'); - -module.exports = function(context) { - - // Modify the Gradle build file to add a task that will upload the debug symbols - // at build time. - helper.restoreRootBuildGradle(); - helper.modifyRootBuildGradle(); -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/before_plugin_uninstall.js b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/before_plugin_uninstall.js deleted file mode 100644 index 9c32e552..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/before_plugin_uninstall.js +++ /dev/null @@ -1,7 +0,0 @@ -var helper = require('./helper'); - -module.exports = function(context) { - - // Remove the Gradle modifications that were added when the plugin was installed. - helper.restoreRootBuildGradle(); -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/helper.js b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/helper.js deleted file mode 100644 index da715c24..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/android/helper.js +++ /dev/null @@ -1,117 +0,0 @@ -var fs = require("fs"); -var path = require("path"); - -function rootBuildGradleExists() { - var target = path.join("platforms", "android", "build.gradle"); - return fs.existsSync(target); -} - -/* - * Helper function to read the build.gradle that sits at the root of the project - */ -function readRootBuildGradle() { - var target = path.join("platforms", "android", "build.gradle"); - return fs.readFileSync(target, "utf-8"); -} - -/* - * Added a dependency on 'com.google.gms' based on the position of the know 'com.android.tools.build' dependency in the build.gradle - */ -function addDependencies(buildGradle) { - // find the known line to match - var match = buildGradle.match(/^(\s*)classpath 'com.android.tools.build(.*)/m); - var whitespace = match[1]; - - // modify the line to add the necessary dependencies - var agcDependency = whitespace + 'classpath \'com.huawei.agconnect:agcp:1.2.0.300\'' - - var modifiedLine = match[0] + '\n' + agcDependency; - - // modify the actual line - return buildGradle.replace(/^(\s*)classpath 'com.android.tools.build(.*)/m, modifiedLine); -} - -/* - * Add 'google()' and Crashlytics to the repository repo list - */ -function addRepos(buildGradle) { - // find the known line to match - var match = buildGradle.match(/^(\s*)jcenter\(\)/m); - var whitespace = match[1]; - - // modify the line to add the necessary repo - var huaweiMavenRepo = whitespace + 'maven { url \'http://developer.huawei.com/repo/\' }' - var modifiedLine = match[0] + '\n' + huaweiMavenRepo; - - // modify the actual line - buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - - // update the all projects grouping - var allProjectsIndex = buildGradle.indexOf('allprojects'); - if (allProjectsIndex > 0) { - // split the string on allprojects because jcenter is in both groups and we need to modify the 2nd instance - var firstHalfOfFile = buildGradle.substring(0, allProjectsIndex); - var secondHalfOfFile = buildGradle.substring(allProjectsIndex); - - // Add google() to the allprojects section of the string - match = secondHalfOfFile.match(/^(\s*)jcenter\(\)/m); - var huaweiMavenRepo = whitespace + 'maven { url \'http://developer.huawei.com/repo/\' }' - modifiedLine = match[0] + '\n' + huaweiMavenRepo; - // modify the part of the string that is after 'allprojects' - secondHalfOfFile = secondHalfOfFile.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - - // recombine the modified line - buildGradle = firstHalfOfFile + secondHalfOfFile; - } else { - // this should not happen, but if it does, we should try to add the dependency to the buildscript - match = buildGradle.match(/^(\s*)jcenter\(\)/m); - var huaweiMavenRepo = whitespace + 'maven { url \'http://developer.huawei.com/repo/\' }' - modifiedLine = match[0] + '\n' + huaweiMavenRepo; - // modify the part of the string that is after 'allprojects' - buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - } - - return buildGradle; -} - -/* - * Helper function to write to the build.gradle that sits at the root of the project - */ -function writeRootBuildGradle(contents) { - var target = path.join("platforms", "android", "build.gradle"); - fs.writeFileSync(target, contents); -} - -module.exports = { - - modifyRootBuildGradle: function() { - // be defensive and don't crash if the file doesn't exist - if (!rootBuildGradleExists) { - return; - } - - var buildGradle = readRootBuildGradle(); - - // Add Google Play Services Dependency - buildGradle = addDependencies(buildGradle); - - // Add Google's Maven Repo - buildGradle = addRepos(buildGradle); - - writeRootBuildGradle(buildGradle); - }, - - restoreRootBuildGradle: function() { - // be defensive and don't crash if the file doesn't exist - if (!rootBuildGradleExists) { - return; - } - - var buildGradle = readRootBuildGradle(); - - // remove any lines we added - buildGradle = buildGradle.replace(/(?:^|\r?\n)(.*)com.huawei.cordovahmspushplugin*?(?=$|\r?\n)/g, ''); - - writeRootBuildGradle(buildGradle); - } -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/lib/utilities.js b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/lib/utilities.js deleted file mode 100644 index 015f6831..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/scripts/lib/utilities.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Utilities and shared functionality for the build hooks. - */ -var fs = require('fs'); -var path = require("path"); - -fs.ensureDirSync = function (dir) { - if (!fs.existsSync(dir)) { - dir.split(path.sep).reduce(function (currentPath, folder) { - currentPath += folder + path.sep; - if (!fs.existsSync(currentPath)) { - fs.mkdirSync(currentPath); - } - return currentPath; - }, ''); - } -}; - -module.exports = { - /** - * Used to get the name of the application as defined in the config.xml. - * - * @param {object} context - The Cordova context. - * @returns {string} The value of the name element in config.xml. - */ - getAppName: function (context) { - var ConfigParser = context.requireCordovaModule("cordova-lib").configparser; - var config = new ConfigParser("config.xml"); - return config.name(); - }, - - /** - * The ID of the plugin; this should match the ID in plugin.xml. - */ - getPluginId: function () { - return "com.huawei.cordovahmspushplugin"; - }, - - copyKey: function (platform) { - for (var i = 0; i < platform.src.length; i++) { - var file = platform.src[i]; - if (this.fileExists(file)) { - try { - var contents = fs.readFileSync(file).toString(); - - try { - platform.dest.forEach(function (destinationPath) { - var folder = destinationPath.substring(0, destinationPath.lastIndexOf('/')); - fs.ensureDirSync(folder); - fs.writeFileSync(destinationPath, contents); - }); - } catch (e) { - // skip - } - } catch (err) { - console.log(err); - } - - break; - } - } - }, - - getValue: function (config, name) { - var value = config.match(new RegExp('<' + name + '(.*?)>(.*?)', 'i')); - if (value && value[2]) { - return value[2] - } else { - return null - } - }, - - fileExists: function (path) { - try { - return fs.statSync(path).isFile(); - } catch (e) { - return false; - } - }, - - directoryExists: function (path) { - try { - return fs.statSync(path).isDirectory(); - } catch (e) { - return false; - } - } -}; \ No newline at end of file diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/CordovaHMSPushPlugin.java b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/CordovaHMSPushPlugin.java deleted file mode 100644 index d2ef10b4..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/CordovaHMSPushPlugin.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.huawei.cordovahmspushplugin; - -import android.text.TextUtils; -import android.util.Log; - -import com.huawei.agconnect.config.AGConnectServicesConfig; -import com.huawei.hms.aaid.HmsInstanceId; -import com.huawei.hms.push.HmsMessaging; -import com.huawei.hmf.tasks.OnCompleteListener; -import com.huawei.hmf.tasks.Task; - -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; - -/** - * This class echoes a string called from JavaScript. - */ -public class CordovaHMSPushPlugin extends CordovaPlugin { - - private static final String TAG = CordovaHMSPushPlugin.class.getSimpleName(); - - private static CallbackContext mCallbackContext; - private static CallbackContext mTokenCallback; - - @Override - public boolean execute(String action, JSONArray args, CallbackContext callbackContext) { - switch (action) { - case "getToken": - this.getToken(callbackContext); - return true; - case "getMessageCallback": - Log.d(TAG, "getMessageCallback"); - mCallbackContext = callbackContext; - return true; - case "subscribeTopic": - Log.d(TAG, "subscribeTopic"); - try { - String topic = args.getString(0); - this.subscribeTopic(topic, callbackContext); - } catch (JSONException e) { - return true; - } - return true; - default: - return false; - } - } - - public static void returnMessage(String message) { - if (mCallbackContext != null) { - Log.d(TAG, "returnMessage"); - PluginResult result = new PluginResult(PluginResult.Status.OK, message); - result.setKeepCallback(true); - mCallbackContext.sendPluginResult(result); - } - } - - public static void returnToken(String token) { - if (mTokenCallback != null) { - mTokenCallback.success(token); - mTokenCallback = null; - } - } - - /** - * get push token - */ - private void getToken(CallbackContext callbackContext) { - Log.i(TAG, "get token: begin"); - - try { - String appId = AGConnectServicesConfig.fromContext(cordova.getContext()).getString("client/app_id"); - String pushToken = HmsInstanceId.getInstance(cordova.getContext()).getToken(appId, "HCM"); - if (!TextUtils.isEmpty(pushToken)) { - Log.i(TAG, "get token:" + pushToken); - callbackContext.success(pushToken); - }else { - mTokenCallback = callbackContext; - } - } catch (Exception e) { - Log.e(TAG, "getToken Failed, " + e); - callbackContext.error("getToken Failed, error : " + e.getMessage()); - } - } - - public void subscribeTopic(String topic, final CallbackContext callBack) { - // callBack.success("user subscribe to topic named as: "+ topic); - if (topic == null || topic.toString().equals("")) { - callBack.error("topic is empty!"); - return; - } - try { - HmsMessaging.getInstance(cordova.getContext()).subscribe(topic). - addOnCompleteListener(new OnCompleteListener() { - @Override - public void onComplete(Task task) { - if (task.isSuccessful()) { - callBack.success("user subscribe to topic: "+ topic); - } else { - callBack.error("getToken Failed, error : " + task.getException().getMessage()); - } - } - }); - } catch (Exception e) { - callBack.error("getToken Failed, error : " + e.getMessage()); - } - } - -} diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/MessageService.java b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/MessageService.java deleted file mode 100644 index d32542ef..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/MessageService.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.huawei.cordovahmspushplugin; - -import com.huawei.cordovahmspushplugin.CordovaHMSPushPlugin; -import com.huawei.hms.push.HmsMessageService; -import com.huawei.hms.push.RemoteMessage; - -import android.util.Log; - -public class MessageService extends HmsMessageService { - - private static final String TAG = MessageService.class.getSimpleName(); - - @Override - public void onMessageReceived(RemoteMessage remoteMessage) { - super.onMessageReceived(remoteMessage); - Log.d(TAG, "onMessageReceived"); - if (remoteMessage != null) { - String message = remoteMessage.getData(); - Log.d(TAG, message); - CordovaHMSPushPlugin.returnMessage(message); - } - } - - @Override - public void onNewToken(String s) { - super.onNewToken(s); - if (s != null) { - Log.d(TAG, "token:" + s); - CordovaHMSPushPlugin.returnToken(s); - } - } -} diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/build.gradle b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/build.gradle deleted file mode 100644 index 23296fb7..00000000 --- a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/src/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - jcenter() - // huawei maven - maven { url 'http://developer.huawei.com/repo/' } - } - dependencies { - classpath 'com.android.tools.build:gradle:3.2.0' - classpath 'com.huawei.agconnect:agcp:1.2.0.300' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - jcenter() - // huawei maven - maven { url 'http://developer.huawei.com/repo/' } - } -} - -cdvPluginPostBuildExtras.add({ - apply plugin: 'com.huawei.agconnect' -}) diff --git a/Mohem/src/app/app-routing.module.ts b/Mohem/src/app/app-routing.module.ts index c6a651c9..94bc059c 100644 --- a/Mohem/src/app/app-routing.module.ts +++ b/Mohem/src/app/app-routing.module.ts @@ -8,6 +8,7 @@ const routes: Routes = [ path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule' }, { path: 'home', loadChildren: './home/home.module#HomePageModule' }, + { path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' }, { path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' }, { path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' }, @@ -29,7 +30,9 @@ const routes: Routes = [ { path: 'reports', loadChildren: './reports/reports.module#ReportsPageModule' }, { path: 'termination', loadChildren: './termination/termination.module#TerminationPageModule' }, - { path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' } + { path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' }, + { path: 'notification-center', loadChildren: './notification-center/notification-center.module#NotificationCenterPageModule' } + diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.scss b/Mohem/src/app/authentication/sms-page/sms-page.page.scss index 986beeb9..3aec3b30 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.scss +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.scss @@ -1,25 +1,26 @@ -.header-toolbar{ +.header-toolbar { --background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%); } -.btnBack{ +.btnBack { background: transparent; } -ion-img{ +ion-img { width: 180px; height: 180px; - background:transparent; + background: transparent; } -h1{ +h1 { font-size: 28px !important; } -span{ +span { font-weight: bold; } -.button-login{ + +.button-login { --background: var(--newgreen) !important; background: var(--newgreen) !important; @@ -39,7 +40,7 @@ span{ display: block; } -.sms_code{ +.sms_code { margin: 0px; text-align: center; } @@ -57,12 +58,13 @@ ion-input { transition: all .2s ease-in-out; border-radius: 3px; display: inline-block; + &:focus { - border-color:var(--ion-color-secondary) !important; - box-shadow: 0 0 5px var(--ion-color-secondary) !important inset; + border-color: var(--ion-color-secondary) !important; + box-shadow: 0 0 5px var(--ion-color-secondary) !important; } - + &::selection { - background: transparent; + background: transparent; } - } \ No newline at end of file +} \ No newline at end of file diff --git a/Mohem/src/app/backend-integrations/announcement/announcement.component.html b/Mohem/src/app/backend-integrations/announcement/announcement.component.html index 7402c007..8ee0f724 100644 --- a/Mohem/src/app/backend-integrations/announcement/announcement.component.html +++ b/Mohem/src/app/backend-integrations/announcement/announcement.component.html @@ -60,18 +60,18 @@ - {{detialData.title_EN}}
-

{{detialData.date}}

+ {{detailData.title_EN}}
+

{{detailData.date}}

- {{detialData.title_AR}}
-

{{detialData.date}}

+ {{detailData.title_AR}}
+

{{detailData.date}}

- -
+ +
-

-

+

+

diff --git a/Mohem/src/app/backend-integrations/announcement/announcement.component.scss b/Mohem/src/app/backend-integrations/announcement/announcement.component.scss index 6e104364..8a030fb1 100644 --- a/Mohem/src/app/backend-integrations/announcement/announcement.component.scss +++ b/Mohem/src/app/backend-integrations/announcement/announcement.component.scss @@ -5,6 +5,7 @@ margin-right: auto; height: 190px; } + .main-card-image { width: 100%; display: block; @@ -13,6 +14,7 @@ position: absolute; height: 100%; } + .text-style { margin: 5px; } @@ -21,19 +23,19 @@ // border: 1px solid lightgray; // border-radius: 30px; } -.class-dev-open { -} + +.class-dev-open {} .class-item-open { border: 1px solid lightgray; border-radius: 30px; height: 100px; } -.class-item-close { -} + +.class-item-close {} .image-item-en { - padding-left: 5px; + padding: 5px; width: 100px; min-height: 100px; border: 5px solid white; @@ -42,8 +44,9 @@ border-right: 0px; object-fit: cover; } + .image-item-ar { - padding-right: 5px; + padding: 5px; width: 100px; min-height: 100px; border: 5px solid white; @@ -66,11 +69,13 @@ opacity: 1; padding-bottom: 5px; } + .item-list-p-title { font: normal normal medium 11px/16px Poppins; letter-spacing: -0.44px; color: #535353; } + .item-list-date-title { font: normal normal 600 10px/16px Poppins; letter-spacing: -0.4px; @@ -83,11 +88,13 @@ color: #ffffff; white-space: break-spaces; } + .item-list-first-p { font: normal normal normal 12px/17px Poppins; letter-spacing: -0.12px; color: #ffffff; } + .item-list-first-date { text-align: left; font: normal normal bold 8px/23px Poppins; @@ -101,6 +108,7 @@ color: #2b353e; margin-bottom: -34px; } + .card-style-p { font: normal normal medium 13px/18px Poppins; letter-spacing: -0.52px; @@ -118,21 +126,23 @@ position: relative; min-height: 283px; } + .main-card-item-list-style { position: absolute; bottom: 0px; --background: transparent; } -.main-card-label-stle{ - margin: 0px; - padding: 0px; - width: 237px; + +.main-card-label-stle { + margin: 0px; + padding: 0px; + width: 237px; } -.main-card-label-style-all{ - padding: 0px; - margin: 0px; - width: 200px; +.main-card-label-style-all { + padding: 0px; + margin: 0px; + width: 200px; } .item-native { diff --git a/Mohem/src/app/backend-integrations/announcement/announcement.component.ts b/Mohem/src/app/backend-integrations/announcement/announcement.component.ts index 464b73af..8d0e6022 100644 --- a/Mohem/src/app/backend-integrations/announcement/announcement.component.ts +++ b/Mohem/src/app/backend-integrations/announcement/announcement.component.ts @@ -22,14 +22,15 @@ export class AnnouncementComponent implements OnInit { public pageSize = 1; public pageLength = 0; public lengthCounter = 5; - public detialData: { - id: number, - title_EN: string, - title_AR: string, - body_EN: string, - body_AR: string, - img?: string, - date: Date}; + public detailData: { + id: number, + title_EN: string, + title_AR: string, + body_EN: string, + body_AR: string, + img?: string, + date: Date + }; constructor( public announcementService: AnnouncementService, @@ -63,21 +64,21 @@ export class AnnouncementComponent implements OnInit { this.common.stopLoading(); if (this.common.validResponse(result)) { holdData = JSON.parse(result.Mohemm_ITG_ResponseItem); - data = JSON.parse(holdData.result.data)[0]; + data = holdData.result.data[0]; console.log(data); - this.detialData = { + this.detailData = { id: data.rowID, - title_EN: data.Title_EN, - title_AR: data.Title_AR, - body_EN: data.Body_EN, - body_AR: data.Body_AR, + title_EN: data.titleEn, + title_AR: data.titleAr, + body_EN: data.descriptionEn, + body_AR: data.descriptionAr, date: data.created, - img: data.Banner_Image + img: data.imageContent }; element.isOpen = !element.isOpen; // this.common.stopLoading(); } - console.log(this.detialData); + console.log(this.detailData); }); } else { element.isOpen = false; @@ -86,7 +87,7 @@ export class AnnouncementComponent implements OnInit { } - closeAnnouncement(item){ + closeAnnouncement(item) { item.isOpen = false; } @@ -97,24 +98,24 @@ export class AnnouncementComponent implements OnInit { this.common.stopLoading(); if (this.common.validResponse(result)) { holdData = JSON.parse(result.Mohemm_ITG_ResponseItem); - this.listOfAnnouncement = JSON.parse(holdData.result.data); + this.listOfAnnouncement = holdData.result.data; this.pageLength = this.listOfAnnouncement[0].TotalItems; for (let i = 0; i < this.listOfAnnouncement.length; i++) { - this.listOfAnnouncement[i].Title_EN = this.listOfAnnouncement[i].Title_EN; - this.listOfAnnouncement[i].Title_AR = this.listOfAnnouncement[i].Title_AR; - this.listOfAnnouncement[i].EmailBody_EN = this.listOfAnnouncement[i].EmailBody_EN; - this.listOfAnnouncement[i].EmailBody_AR = this.listOfAnnouncement[i].EmailBody_AR; + this.listOfAnnouncement[i].Title_EN = this.listOfAnnouncement[i].titleEn; + this.listOfAnnouncement[i].Title_AR = this.listOfAnnouncement[i].titleAr; + this.listOfAnnouncement[i].EmailBody_EN = this.listOfAnnouncement[i].descriptionEn; + this.listOfAnnouncement[i].EmailBody_AR = this.listOfAnnouncement[i].descriptionAr; this.arr[i] = { id: this.listOfAnnouncement[i].rowID, - title_EN: this.listOfAnnouncement[i].Title_EN, - title_AR: this.listOfAnnouncement[i].Title_AR, - body_EN: this.listOfAnnouncement[i].EmailBody_EN, - body_AR: this.listOfAnnouncement[i].EmailBody_AR, + title_EN: this.listOfAnnouncement[i].titleEn, + title_AR: this.listOfAnnouncement[i].titleAr, + body_EN: this.listOfAnnouncement[i].descriptionEn, + body_AR: this.listOfAnnouncement[i].descriptionAr, date: this.listOfAnnouncement[i].created, - img: this.listOfAnnouncement[i].Banner_Image, + img: this.listOfAnnouncement[i].imageContent, isopen: false }; - if ( i < this.numberOfListLength){ + if (i < this.numberOfListLength) { this.announcementList.push(this.arr[i]); } this.arrList.push(this.arr[i]); diff --git a/Mohem/src/app/hmg-common/hmg_utils.ts b/Mohem/src/app/hmg-common/hmg_utils.ts index d29b9946..dee6d53f 100644 --- a/Mohem/src/app/hmg-common/hmg_utils.ts +++ b/Mohem/src/app/hmg-common/hmg_utils.ts @@ -26,11 +26,11 @@ export class HMGUtils { this.devicePermissionsService.requestLocationAutherization().then( async granted => { if(granted == true) { if (this.platform.is('android')) { - if ((await this.isHuaweiDevice())) { - this.getHMSLocation(callBack); - } else { + // if ((await this.isHuaweiDevice())) { + // this.getHMSLocation(callBack); + // } else { this.getGMSLocation(callBack); - } + // } } else { this.getIOSLocation(callBack); } @@ -42,60 +42,60 @@ export class HMGUtils { } - async isHuaweiDevice(): Promise { - const result: any = await new Promise((resolve, reject) => { - cordova.plugins.CordovaHMSGMSCheckPlugin.isHmsAvailable( - "index.js", - (_res) => { - const hmsAvailable = _res === "true"; - resolve(hmsAvailable); - }, - (_err) => { - reject({ "status": false, "error": JSON.stringify(_err) }); - this.common.presentAlert(this.ts.trPK('general', 'huawei-hms-gms-error')); - } - ); - }); + // async isHuaweiDevice(): Promise { + // const result: any = await new Promise((resolve, reject) => { + // cordova.plugins.CordovaHMSGMSCheckPlugin.isHmsAvailable( + // "index.js", + // (_res) => { + // const hmsAvailable = _res === "true"; + // resolve(hmsAvailable); + // }, + // (_err) => { + // reject({ "status": false, "error": JSON.stringify(_err) }); + // this.common.presentAlert(this.ts.trPK('general', 'huawei-hms-gms-error')); + // } + // ); + // }); - return result; - } + // return result; + // } - private getHMSLocation(callBack: Function) { - try { - cordova.plugins.CordovaHMSLocationPlugin.requestLocation( - "index.js", - (_res) => { - console.log("Huawei Location Success: [Stop Getting]"); - cordova.plugins.CordovaHMSLocationPlugin.removeLocation("", (_res) => { }, (_err) => { }); - const location = _res.split(',') - console.log(location); - if (location.length == 3) { - let mock = false; - const lat = Number(_res.split(',')[0]); - const long = Number(_res.split(',')[1]); - const mockValue = _res.split(',')[2]; + // private getHMSLocation(callBack: Function) { + // try { + // cordova.plugins.CordovaHMSLocationPlugin.requestLocation( + // "index.js", + // (_res) => { + // console.log("Huawei Location Success: [Stop Getting]"); + // cordova.plugins.CordovaHMSLocationPlugin.removeLocation("", (_res) => { }, (_err) => { }); + // const location = _res.split(',') + // console.log(location); + // if (location.length == 3) { + // let mock = false; + // const lat = Number(_res.split(',')[0]); + // const long = Number(_res.split(',')[1]); + // const mockValue = _res.split(',')[2]; - // if (mockValue == 'true') { - // mock = true; - // } else { - // mock = false; - // } - callBack({"latitude":lat, "longitude":long, "isfake":mock}) - } else { - this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location')); - } - }, - (_err) => { - console.log("Huawei Location [Getting Error]: " + JSON.stringify(_err)); - this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location')); - } - ); + // // if (mockValue == 'true') { + // // mock = true; + // // } else { + // // mock = false; + // // } + // callBack({"latitude":lat, "longitude":long, "isfake":mock}) + // } else { + // this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location')); + // } + // }, + // (_err) => { + // console.log("Huawei Location [Getting Error]: " + JSON.stringify(_err)); + // this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location')); + // } + // ); - } catch (_err) { - console.log("Huawei Location Plugin [Error]: " + + JSON.stringify(_err)); - this.common.presentAlert(this.ts.trPK('general', 'huawei-plugin-issue')); - } - } + // } catch (_err) { + // console.log("Huawei Location Plugin [Error]: " + + JSON.stringify(_err)); + // this.common.presentAlert(this.ts.trPK('general', 'huawei-plugin-issue')); + // } + // } private getGMSLocation(callBack: Function) { this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { diff --git a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts index 6386e538..6d3d299e 100644 --- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts +++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts @@ -146,7 +146,7 @@ export class AuthenticationService { mobileType = 'android'; } request.VersionID = 3.7; - request.Channel = 33; + request.Channel = 31; request.LanguageID = TranslatorService.getCurrentLanguageCode(); request.MobileType = mobileType; @@ -228,7 +228,7 @@ export class AuthenticationService { public login(request: LoginRequest, onError: any, errorLabel: string): Observable { this.setPublicFields(request); - request.P_APP_VERSION = "HMG"; + request.P_APP_VERSION = "CS"; return this.con.post(AuthenticationService.login, request, onError, errorLabel); } @@ -485,7 +485,7 @@ export class AuthenticationService { public checkUserAuthentication(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string) : Observable { this.setPublicFields(request); - request.P_APP_VERSION = "HMG"; + request.P_APP_VERSION = "CS"; return this.con.post(AuthenticationService.userChecking, request, onError, errorLabel); } diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index b4fd54bf..337a83f6 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1430,7 +1430,9 @@ export class CommonService { public openLogin() { this.nav.navigateRoot(['/authentication/login']); } - + public openNotificationCenter() { + this.nav.navigateRoot(['/notification-center']); + } public openUserForgot() { this.nav.navigateForward(['/authentication/checkuser']); } diff --git a/Mohem/src/app/hmg-common/services/push/push.service.ts b/Mohem/src/app/hmg-common/services/push/push.service.ts index 4ed1f3ae..92682892 100644 --- a/Mohem/src/app/hmg-common/services/push/push.service.ts +++ b/Mohem/src/app/hmg-common/services/push/push.service.ts @@ -40,13 +40,13 @@ export class PushService { this.firebasex.grantPermission().then(hasPermission => { console.log("Permission was " + (hasPermission ? "granted" : "denied")); this.processStartReceivingWithFirebase(); - }); + }); } else { this.processStartReceivingWithFirebase(); } - }); - }​​ - + }); + } + private processNotification(data: any) { const notification = new NotificationModel(); @@ -67,7 +67,7 @@ export class PushService { this.sharedService.setSharedData(notification, NotificationModel.SHARED_DATA); } else if (type === NotificationModel.TYPE_CONFERENCE) { const session = data.additionalData.sessionId; - this.sharedService.setSharedData( new SessionModel(session) , SessionModel.SHARED_DATA); + this.sharedService.setSharedData(new SessionModel(session), SessionModel.SHARED_DATA); } else { if (type === NotificationModel.TYPE_VIDEO) { notification.MessageType = 'video'; @@ -87,7 +87,7 @@ export class PushService { } private registerInBackend(data: any) { - console.log('firebasex Token ID: ' + data); + console.log('firebasex Token ID: ' + data); if (data) { this.cs.sharedService.setSharedData(data, AuthenticationService.DEVICE_TOKEN); localStorage.setItem('deviceToken', data); @@ -101,11 +101,11 @@ export class PushService { request.DeviceToken = deviceToken; request.DeviceType = this.getDeviceType(); const user = this.authService.getAuthenticatedUser(); - // request.PatientMobileNumber = user.MobileNo; + // request.PatientMobileNumber = user.MobileNo; // request.NationalID = user.IdentificationNo; request.Gender = user.Gender; request.PatientID = user.PatientID; - // request.PatientOutSA = user.PatientOutSA ? 1 : 0; + // request.PatientOutSA = user.PatientOutSA ? 1 : 0; // request.LoginType = user.biometricEnabled ? 2 : 1; // 1 sms , 2 touch id request.MACAddress = '00:00:00:00:00:00'; return this.con.postNoLoad(PushService.loggedInUserURL, request @@ -138,12 +138,24 @@ export class PushService { private processStartReceivingWithFirebase() { console.log("processStartReceivingWithFirebase"); this.firebasex.getToken().then(token => { - // alert("token: "+ token); + // alert("token: "+ token); this.cs.sharedService.setSharedData(token, "new-device-token"); localStorage.setItem('deviceToken', token); this.cs.setDeviceToken(token); //last way to set the device Token to get it through getDeviceToken this.registerInBackend(token); }).catch(error => console.error('Error getting token', error)); + + this.firebasex.onMessageReceived().subscribe(data => { + console.log("onMessageReceived"); + console.log(data); + this.firebasex.clearAllNotifications(); + if (data.notification_type == 3) { + this.cs.sharedService.setSharedData(data, NotificationModel.SHARED_DATA); + this.cs.openNotificationCenter(); + } + + }); + } public onPushReceived(payload: any) { diff --git a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts index 6f4702f3..1ec8c7ed 100644 --- a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts +++ b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts @@ -35,7 +35,7 @@ export class HrRequestFormComponent implements OnInit { public searchKeySelect = 'Complaints'; myColor: string = 'secondary'; public showRequestDetails = false; - public proID = "HMG" + public proID = "CS" public inquiry: string; public HR: string; public complaints: string; diff --git a/Mohem/src/app/notification-center/notification-center.module.ts b/Mohem/src/app/notification-center/notification-center.module.ts new file mode 100644 index 00000000..cadf43b2 --- /dev/null +++ b/Mohem/src/app/notification-center/notification-center.module.ts @@ -0,0 +1,29 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { Routes, RouterModule } from '@angular/router'; + +import { IonicModule } from '@ionic/angular'; + +import { NotificationCenterPage } from './notification-center.page'; +import { DetailComponent } from './notification-detail/detail.component'; +import { HmgCommonModule } from '../hmg-common/hmg-common.module'; + +const routes: Routes = [ + { + path: '', + component: DetailComponent + } +]; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + HmgCommonModule, + RouterModule.forChild(routes) + ], + declarations: [NotificationCenterPage, DetailComponent] +}) +export class NotificationCenterPageModule { } diff --git a/Mohem/src/app/notification-center/notification-center.page.html b/Mohem/src/app/notification-center/notification-center.page.html new file mode 100644 index 00000000..7da442b0 --- /dev/null +++ b/Mohem/src/app/notification-center/notification-center.page.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Mohem/src/app/notification-center/notification-center.page.scss b/Mohem/src/app/notification-center/notification-center.page.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/notification-center/notification-center.page.spec.ts b/Mohem/src/app/notification-center/notification-center.page.spec.ts new file mode 100644 index 00000000..f21e182e --- /dev/null +++ b/Mohem/src/app/notification-center/notification-center.page.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NotificationCenterPage } from './notification-center.page'; + +describe('NotificationCenterPage', () => { + let component: NotificationCenterPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NotificationCenterPage ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NotificationCenterPage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/notification-center/notification-center.page.ts b/Mohem/src/app/notification-center/notification-center.page.ts new file mode 100644 index 00000000..9fb934cd --- /dev/null +++ b/Mohem/src/app/notification-center/notification-center.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-notification-center', + templateUrl: './notification-center.page.html', + styleUrls: ['./notification-center.page.scss'], +}) +export class NotificationCenterPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/Mohem/src/app/notification-center/notification-detail/detail.component.html b/Mohem/src/app/notification-center/notification-detail/detail.component.html new file mode 100644 index 00000000..649ad4ea --- /dev/null +++ b/Mohem/src/app/notification-center/notification-detail/detail.component.html @@ -0,0 +1,21 @@ + + + +
+ +
+ + + +

{{data.image_Text}}

+
+
+ + + + + +
+ + +
\ No newline at end of file diff --git a/Mohem/src/app/notification-center/notification-detail/detail.component.scss b/Mohem/src/app/notification-center/notification-detail/detail.component.scss new file mode 100644 index 00000000..c8951127 --- /dev/null +++ b/Mohem/src/app/notification-center/notification-detail/detail.component.scss @@ -0,0 +1,84 @@ +.vertical_space { + height: 0.5cm; + width: 100%; +} + +.title { + font-size: 0.38cm; + font-weight: bold; +} + +.info-icon ion-icon { + font-size: 90px; + margin: 10px auto; + display: block; + margin-bottom: 0; + color: var(--ion-color-danger); +} + +.info-icon h1 { + margin: auto; + font-size: 22px; + text-align: center; + margin-top: 10%; +} + +.info-icon { + padding: 20px; + background: #fff; + margin: 20px; + margin-top: 15%; + border-radius: 15px; +} + +.info-icon .line { + width: 100%; + height: 1px; + background: #ccddcc; + margin: 15px auto; +} + +.info-icon .instruction p { + display: block; + margin: 0px; + margin-top: 7%; + color: #000; + text-align: center; +} + +.info-icon b { + bottom: 11px; + margin: 18px; + color: var(--ion-color-danger); +} + +.instruction b { + color: var(--ion-color-danger); + font-weight: bolder; +} + +.stop-icon { + display: flex; + margin: 10px auto; + width: 45%; + margin-top: 40px; +} + +p.otherwise { + font-size: 20px !important; +} + +.close-icon { + position: relative; + height: 60px; + padding: 10px; +} + +.close-icon img { + + height: 35px; + width: 35px; + right: 0; + position: absolute; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification-center/notification-detail/detail.component.spec.ts b/Mohem/src/app/notification-center/notification-detail/detail.component.spec.ts new file mode 100644 index 00000000..149b9be7 --- /dev/null +++ b/Mohem/src/app/notification-center/notification-detail/detail.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DetailComponent } from './detail.component'; + +describe('DetailComponent', () => { + let component: DetailComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ DetailComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/notification-center/notification-detail/detail.component.ts b/Mohem/src/app/notification-center/notification-detail/detail.component.ts new file mode 100644 index 00000000..37306ae2 --- /dev/null +++ b/Mohem/src/app/notification-center/notification-detail/detail.component.ts @@ -0,0 +1,42 @@ +import { Component, OnInit } from '@angular/core'; +import { NotificationModel } from 'src/app/hmg-common/services/push/models/notification.model'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +// import { NotificationsCenterService } from '../service/notifications-center.service'; +import { Route, Router, ActivatedRoute, ActivationEnd } from '@angular/router'; +import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser'; + +@Component({ + selector: 'app-detail', + templateUrl: './detail.component.html', + styleUrls: ['./detail.component.scss'] +}) +export class DetailComponent implements OnInit { + + public notification: NotificationModel; + public video_link: string; + public trustedVideoUrl: SafeResourceUrl; + public direction: any; + public data: any; + constructor( + public cs: CommonService, + public ts: TranslatorService, + public sharedData: SharedDataService, + // public notifyService: NotificationsCenterService, + public router: Router, + private domSanitizer: DomSanitizer, + public route: ActivatedRoute + ) { + + } + + ngOnInit() { + this.direction = TranslatorService.getCurrentDirection(); + + this.data = this.sharedData.getSharedData(NotificationModel.SHARED_DATA, true); + } + backLogin() { + this.cs.openLogin(); + } +} diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html index 0206f5a4..d3bb1ab1 100644 --- a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html @@ -202,13 +202,18 @@ + +

{{'worklist, loading'| translate}}

+
+ -
+

{{ 'general, empty' | translate}}

-
+
diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts index d4d94682..4e2a3bf4 100644 --- a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts @@ -129,8 +129,8 @@ export class WorklistMainIcComponent implements OnInit { reqInfo_label: any; closeDis: boolean = false; selectedFilter: string; - ; close_label: any; + public showActionHistoryLoading = true; constructor( public common: CommonService, @@ -875,6 +875,7 @@ export class WorklistMainIcComponent implements OnInit { } handleWorkListActionHistoryResult(result) { + this.showActionHistoryLoading = false; if (this.common.validResponse(result)) { if (this.common.hasData(result.GetActionHistoryList)) { this.actionHistoryRes = result.GetActionHistoryList; diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index de2dff5f..1ae21026 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -437,13 +437,19 @@ + +

{{'worklist, loading'| translate}}

+
+ - -
+ +

{{ 'general, empty' | translate}}

-
+ +
diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index bfdf25c6..4881b8c7 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -118,6 +118,7 @@ export class WorklistMainMRComponent implements OnInit { close_label: any; closeDis: boolean = false; selectedFilter: string; + public showActionHistoryLoading = true; constructor( @@ -809,6 +810,7 @@ export class WorklistMainMRComponent implements OnInit { } handleWorkListActionHistoryResult(result) { + this.showActionHistoryLoading = false; if (this.common.validResponse(result)) { if (this.common.hasData(result.GetActionHistoryList)) { this.actionHistoryRes = result.GetActionHistoryList; diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index bd933831..32757fe0 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -170,13 +170,19 @@ + +

{{'worklist, loading'| translate}}

+
+ -
+

{{ 'general, empty' | translate}}

-
+ +
diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts index f2e79a55..0d7e4247 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts @@ -129,8 +129,9 @@ export class WorklistMainPoComponent implements OnInit { reqInfo_label: any; closeDis: boolean = false; selectedFilter: string; - ; close_label: any; + public showActionHistoryLoading = true; + constructor( public common: CommonService, @@ -851,6 +852,7 @@ export class WorklistMainPoComponent implements OnInit { } handleWorkListActionHistoryResult(result) { + this.showActionHistoryLoading = false; if (this.common.validResponse(result)) { if (this.common.hasData(result.GetActionHistoryList)) { this.actionHistoryRes = result.GetActionHistoryList; diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html index 69de2e55..50db52b7 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html @@ -200,13 +200,17 @@ + +

{{'worklist, loading'| translate}}

+
+ - -
+

{{ 'general, empty' | translate}}

-
+
diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts index 74cc53ce..0335c9be 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts @@ -115,6 +115,7 @@ export class WorklistMainPRComponent implements OnInit { close_label: any; closeDis: boolean = false; selectedFilter: any; + public showActionHistoryLoading = true; constructor( @@ -836,6 +837,7 @@ export class WorklistMainPRComponent implements OnInit { } handleWorkListActionHistoryResult(result) { + this.showActionHistoryLoading = false; if (this.common.validResponse(result)) { if (this.common.hasData(result.GetActionHistoryList)) { this.actionHistoryRes = result.GetActionHistoryList; diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index 6400b618..09a9a2c1 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -624,14 +624,18 @@ + +

{{'worklist, loading'| translate}}

+
-
+

{{ 'general, empty' | translate}}

-
+
diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index 4b9560b3..f917efe3 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -111,6 +111,7 @@ export class WorklistMainComponent implements OnInit { public selectedFilter: string; public arr_hr_req_only = []; public showInformation = true; + public showActionHistoryLoading = true; constructor( @@ -1000,6 +1001,7 @@ export class WorklistMainComponent implements OnInit { } handleWorkListActionHistoryResult(result) { + this.showActionHistoryLoading = false; console.log("1" + this.IsReachEnd); if (this.common.validResponse(result)) { if (this.common.hasData(result.GetActionHistoryList)) { @@ -1290,7 +1292,7 @@ export class WorklistMainComponent implements OnInit { showLoading(notificationList) { if (notificationList.length < 0) { return true; - } else if (notificationList === []) { + } else if (notificationList.length == 0) { return false; } else { return true; } } diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html index b84354f8..cfab7d6d 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.html +++ b/Mohem/src/app/offersdiscount/home/home.component.html @@ -54,22 +54,22 @@ -
- {{item.Title}} - {{item.Title_AR}} +
+ {{item.titleEn}} + {{item.titleAr}}
-
-
+
+
- {{item.Discount}} + {{item.discountDescription}}
- - + +

{{ts.trPK('general','offer-valid')}}

- +

{{ts.trPK('general','expired')}}

diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts index 8ee773ac..ac88296a 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.ts +++ b/Mohem/src/app/offersdiscount/home/home.component.ts @@ -113,8 +113,7 @@ export class HomeComponent implements AfterViewInit { displayOffers(data) { if (data['data']) { - var parseJSON = data['data']; - var offers = JSON.parse(parseJSON); + var offers = data['data']; console.log(offers); this.offersData = this.filterActiveItems(offers); console.log(this.offersData); @@ -123,7 +122,7 @@ export class HomeComponent implements AfterViewInit { } filterActiveItems(offers) { return offers.filter((res) => { - return res['IsActive'] == 'True'; + return res.isActive == true; }); } filterOffers(key) { diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html index 1d9c3d44..831659ad 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html @@ -14,22 +14,22 @@ + [src]="details.banner_Image"> - {{details.Title}} - {{details.Title_AR}} + {{details.titleEn}} + {{details.titleAr}} -
-
+
+
- - + +

{{ts.trPK('general','offer-valid')}}

- +

{{ts.trPK('general','expired')}}

@@ -69,23 +69,25 @@ -
+
- {{item.Title}} + {{item.titleEn}} + {{item.titleAr}}
-
+
+
- {{item.Discount}} + {{item.discountDescription}}
- - + +

{{ts.trPK('general','offer-valid')}}

- +

{{ts.trPK('general','expired')}}

diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts index ee364abe..ac8ef5fb 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts @@ -25,7 +25,7 @@ export class OfferDetailsComponent implements OnInit { } getDotted(temp) { temp = this.stripHtml(temp); - return temp.substring(0, 100) + " ..."; + return temp.substring(0, 40) + " ..."; } stripHtml(html) { var temporalDivElement = document.createElement("div"); diff --git a/Mohem/src/app/offersdiscount/services/service.ts b/Mohem/src/app/offersdiscount/services/service.ts index 2a838807..17a39e77 100644 --- a/Mohem/src/app/offersdiscount/services/service.ts +++ b/Mohem/src/app/offersdiscount/services/service.ts @@ -32,7 +32,7 @@ export class OfferDiscountService { request['EmployeeNumber'] = request.UserName; request['ItgIsActive'] = true; request['ItgPageSize'] = 10; - request['ItgPageNo'] = pageNo; + request['ItgPageNo'] = pageNo ? pageNo : 1; if (catId) { request['ItgCategoryID'] = categoryId; } diff --git a/Mohem/src/assets/imgs/mohemm-action/Doable.png b/Mohem/src/assets/imgs/mohemm-action/Doable.png index 36d8fb2532bf3413e47d6e2bce6562d5ec9b6957..f0ca3153263dfb317ee744fdcb9d70dfeac05849 100644 GIT binary patch delta 1378 zcmV-o1)cia3WW=hG=DrvL_t(&L+x8{Y*SSfKj(HMlMhoCqm`}g=E6|?gMJWaRERNQ zMuX7^IwY>E!L@InTtdk310lwLi6rCGy3K^OC4mx&!5DNJ0=j@q;|CEl0fn?{nPLp! zOkjcbUC*t1^L4cA`_so>%kGyg={djq``vTypZD&02nL!bvVXCG^U9YIpoMd|1CZAs zhed!`WdLq=7tSX+!bRYC0TKS>oDZdBwrBkH-h|%1h_AM`cz4I`71wYB0$WcWk81O> z#)<-{z#m%L(KA^%DSY%d@<=URx?{wcSAPXpU< z&f9x9mrqWy?r@-+jNhU3aA@twE_Nh1jhuJK+xxfAx@r&DI~IPIy0 zkB$~IvVRI*oTZV;wOH;ctPG$?Wpsz75QWrh)u`G9m!jKGVgo~z!Yx*is;;~R?yada z4gJs6D=>O7X$ptLeu|!O;78hlmYYJ#;~Z`2g62Dy6b1U(&)zdBm>)+^C~%3^rdx}` zXa-2Et+!~ftzY)Q$oXH57X4#SS)|Gzi0T^g$i znNmy6LhyspP17)CEmo+kk95w9wZ+y`%rq{`$WC0lk~w5-U9k?t0;g_emBvD7>rhYT zoPWD)Q5{5|>BGzp{06BDfVI?{d~<^M%}agjJ}xD*!d}u#$S{1Dvb^~ z&4l3U1=&w8M({>2Bu#HGv-JCoxa*11UC%2<$d!^0y&T^w?s~fEuIK$yB5s5$)qg*B zVQu)0CI>i9mizteWM%5Eo9pIXq(r%=GF?}08T0mipstqrjdV8{nGd%1;XD?PIUA>| zWdzyst%Kt06TZHv(3n*;;tmCVLc|Ab9Vs2;D1CpX^qtm|CAM~#e|d$>h6%6qYZvJ@ zB`v3)Ncsj&DC1MMRjHJ-EmXI7P=B2Wx$BK1(wp>wgZ|rN9Vup|sW?E4wFP&~>?3cX zmpkNt8j*ccVkte50(?PNCAl&pi+4#&E7N>G6`0&(Wh9D(eJTa1=hgManj@w2t=jv zU(u6HG|?U$)C!?XtUB6hTu5Js$SXNw6V*XB(u2g^v;y9ywPVe894=Ax&eBvmLmxVv kmVpgB_~qe3QOt$^FBG_wxy+F}tN;K207*qoM6N<$f|g{wBme*a delta 1336 zcmV-81;_e@3)>2iG=CCFL_t(&L+x8#Y!p=#KKD*-Nlc^^#3J2oDgk`Z6k}p}kYa2? z6O0BmQ3;8L?FQvdd?4^fj7AfURbLd`ZH+Nf5;gTfBnE$|sE}X;s|li_-Cdzp(;tjU zTRQi6&W34bmffAdPIq?becQeFob!G6e0T1hnKJ@BwBfg)Wq(S@M?i>9fw&w28bH7j z0b-E{cV$fwa1s#41i&Z?F(MI@LqKTaaqk|nny+XMFl$mapXZBCrd?-(4EsP;A`;bXhFWyuoBjY`RG z%H|z*jw;82~d7QS6Ue!0xpptDgo-gSQ3tyEiGiT zy|9|r=qZx!4KCe>Za7JLLR0FlrX6t30B0eaNon8Get)?>bjZB}Iv(%RH(W)Qh(1O{ z4|?|-QcKhyj3=R=(d9FX`#@%z}z%cSK~#QO~&9z$-5 zJL6sI%`0TJ6NI+HN5DYm>m;q+^Ad2 zzWFn#YuxA$bFd*(CSgdoR7Q>TR-KGTze)gSmm3r2X54%ildf6EQy0IS z{VD6}$$nk_cc`}>GhqY09no?puuzj_;AX;pi1O0-`{+Y-oSY~(AGUqI?`Q1}6-=00 z;Z?U3GV_|XMelMz;ACCmv7C+F+S-j@Ab)E&L*{-v8N2btV*{13-=~Y!LN@<&k?JST z(wp|RZZlwv=Y6zs%XePQEp}cX%sB~8g;PKCn&n;G*OP1}ENknX#4I~zdi1pK?WIhB zWBjhCkKXk>>Kkd;9UvZJ8B-aMcp>aq{o*4T?-IEKutsU}Y}DV+)+x2(+IsWO@_&fB zlu5#So4eGD=4zQ=>1|$%-?b4odm{QrJgZjCR?9HJ=+;5O)_79yV~*Aex3v6${<=ME z+3}7Cf25M2Sw0rBxiqxuAO|8*y9juR%IoirZHGZ)vLaiRic)npC*Y`A6{YHppQh|~ zdzVjTE%^XJSKn6)QIst7%B7$~7k~1@YLYaOyrhBJ;;NF|n2|rzuyzJyKM}sQvbnO4 z&UZDMt{yPg7dy_ZG4S_ZSX86SBnsF~SL&F3*m)j-m_rFKDWMLuY=_Bm(OuOm4)w?# z0>#7RaML_fDi-cj+Bo~-3BA`T7FT4=+13=a)3*fe^x4lE`j}`H_1!{p_c4D{TY#M8 uIZl6_r;nC?6M*MHr~zHVfL#`gO~C&UwTmzRagA930000-s>NHizWQ0^BX@dv9YDX94XAPL>UMS)OX$7jR%0pi%uQXpHhXV>T1 z)lG3e1CYgGdj)g==5$58X=qKKt2cHM86nbn#ug8FrS}+`>f;IJp5q=nJmYr4-{Fxb zJ>dnH*l@MK?uX5~AJ$}a??3GL;h9YZQh`(;6-WhAfkpxCy|nq6W5!e<6-WiX6wvQO zp)1zF(a}B~3^oD~XH1)MZLs$<4fAQhM@aO&Gm`~Qmm%ltnj