Merge branch 'MOE_MAIN-COLOR_CHANGES' into SRCA_DEV_NEW

# Conflicts:
#	Mohem/GoogleService-Info.plist
#	Mohem/config.xml
#	Mohem/google-services.json
#	Mohem/resources/android/icon/drawable-hdpi-icon.png
#	Mohem/resources/android/icon/drawable-ldpi-icon.png
#	Mohem/resources/android/icon/drawable-mdpi-icon.png
#	Mohem/resources/android/icon/drawable-xhdpi-icon.png
#	Mohem/resources/android/icon/drawable-xxhdpi-icon.png
#	Mohem/resources/android/icon/drawable-xxxhdpi-icon.png
#	Mohem/resources/android/splash/drawable-land-hdpi-screen.png
#	Mohem/resources/android/splash/drawable-land-ldpi-screen.png
#	Mohem/resources/android/splash/drawable-land-mdpi-screen.png
#	Mohem/resources/android/splash/drawable-land-xhdpi-screen.png
#	Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png
#	Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png
#	Mohem/resources/android/splash/drawable-port-hdpi-screen.png
#	Mohem/resources/android/splash/drawable-port-ldpi-screen.png
#	Mohem/resources/android/splash/drawable-port-mdpi-screen.png
#	Mohem/resources/android/splash/drawable-port-xhdpi-screen.png
#	Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png
#	Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png
#	Mohem/resources/icon.png
#	Mohem/resources/splash.png
#	Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss
#	Mohem/src/app/absence/home/home.component.html
#	Mohem/src/app/absence/home/home.component.scss
#	Mohem/src/app/absence/home/home.component.ts
#	Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.scss
#	Mohem/src/app/absence/submit-absence/submit-absence.component.scss
#	Mohem/src/app/absence/view-attachments/view-attachments.component.scss
#	Mohem/src/app/app.component.html
#	Mohem/src/app/app.component.scss
#	Mohem/src/app/attendance/monthly-attendance/monthly-attendance.component.html
#	Mohem/src/app/attendance/monthly-attendance/monthly-attendance.component.scss
#	Mohem/src/app/attendance/monthly-attendance/monthly-attendance.component.ts
#	Mohem/src/app/authentication/confirm-login/confirm-login.component.ts
#	Mohem/src/app/authentication/login/login.component.scss
#	Mohem/src/app/eit/add-cei/add-cei.component.scss
#	Mohem/src/app/eit/add-eit/add-eit.component.scss
#	Mohem/src/app/eit/cei-homepage/cei-homepage.component.html
#	Mohem/src/app/eit/cei-list/cei-list.component.html
#	Mohem/src/app/eit/cei-list/cei-list.component.scss
#	Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss
#	Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss
#	Mohem/src/app/eit/eit-list/eit-list.component.html
#	Mohem/src/app/eit/eit-list/eit-list.component.scss
#	Mohem/src/app/eit/eit-list/eit-list.component.ts
#	Mohem/src/app/eit/eit-update-list/eit-update-list.component.html
#	Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss
#	Mohem/src/app/eit/home/home.component.scss
#	Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.scss
#	Mohem/src/app/hmg-common/services/connector/connector.service.ts
#	Mohem/src/app/hmg-common/ui/card-calendar/card-calendar.component.html
#	Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.scss
#	Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss
#	Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts
#	Mohem/src/app/hmg-common/ui/file-uploder-profile/file-uploder-profile.component.scss
#	Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.scss
#	Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.scss
#	Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss
#	Mohem/src/app/home/home.page.scss
#	Mohem/src/app/home/home.page.ts
#	Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.scss
#	Mohem/src/app/mowadhafi/hr-request/hr-request.component.scss
#	Mohem/src/app/mowadhafi/request-details/request-details.component.scss
#	Mohem/src/app/my-team/details/details.component.scss
#	Mohem/src/app/my-team/details/details.component.ts
#	Mohem/src/app/my-team/home/home.component.scss
#	Mohem/src/app/my-team/home/home.component.ts
#	Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.scss
#	Mohem/src/app/notification/home/home.component.html
#	Mohem/src/app/notification/home/home.component.scss
#	Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.scss
#	Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html
#	Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss
#	Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html
#	Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss
#	Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.scss
#	Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss
#	Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss
#	Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss
#	Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss
#	Mohem/src/app/notification/worklist-main/worklist-main.component.html
#	Mohem/src/app/notification/worklist-main/worklist-main.component.scss
#	Mohem/src/app/notification/worklist-setting/worklist-setting.component.scss
#	Mohem/src/app/payslip/home/home.component.scss
#	Mohem/src/app/payslip/home/home.component.ts
#	Mohem/src/app/profile/add-address/add-address.component.scss
#	Mohem/src/app/profile/add-basic-details/add-basic-details.component.scss
#	Mohem/src/app/profile/confirm-address/confirm-address.component.scss
#	Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.scss
#	Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss
#	Mohem/src/app/profile/contact/contact.component.html
#	Mohem/src/app/profile/edit-profile/edit-profile.component.scss
#	Mohem/src/app/profile/home/home.component.html
#	Mohem/src/app/profile/home/home.component.scss
#	Mohem/src/app/profile/home/home.component.ts
#	Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html
#	Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts
#	Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.scss
#	Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts
#	Mohem/src/app/profile/profile-image/profile-image.component.scss
#	Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.scss
#	Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss
#	Mohem/src/app/time-card/time-card-details/time-card-details.component.scss
#	Mohem/src/app/time-card/time-card-details/time-card-details.component.ts
#	Mohem/src/assets/imgs/profile-icons/basic-detail@21.svg
#	Mohem/src/assets/imgs/profile-icons/info-a@2x.svg
#	Mohem/src/assets/imgs/profile-icons/main address-a@2x.svg
#	Mohem/src/assets/localization/i18n.json
#	Mohem/src/theme/styles.scss
#	Mohem/src/theme/variables.scss
SRCA_DEV_NEW
umasoodch 3 years ago
commit 7862926f11

@ -1,224 +0,0 @@
SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS
Commands marked with * may be preceded by a number, _N.
Notes in parentheses indicate the behavior if _N is given.
A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
h H Display this help.
q :q Q :Q ZZ Exit.
---------------------------------------------------------------------------
MMOOVVIINNGG
e ^E j ^N CR * Forward one line (or _N lines).
y ^Y k ^K ^P * Backward one line (or _N lines).
f ^F ^V SPACE * Forward one window (or _N lines).
b ^B ESC-v * Backward one window (or _N lines).
z * Forward one window (and set window to _N).
w * Backward one window (and set window to _N).
ESC-SPACE * Forward one window, but don't stop at end-of-file.
d ^D * Forward one half-window (and set half-window to _N).
u ^U * Backward one half-window (and set half-window to _N).
ESC-) RightArrow * Right one half screen width (or _N positions).
ESC-( LeftArrow * Left one half screen width (or _N positions).
ESC-} ^RightArrow Right to last column displayed.
ESC-{ ^LeftArrow Left to first column.
F Forward forever; like "tail -f".
ESC-F Like F but stop when search pattern is found.
r ^R ^L Repaint screen.
R Repaint screen, discarding buffered input.
---------------------------------------------------
Default "window" is the screen height.
Default "half-window" is half of the screen height.
---------------------------------------------------------------------------
SSEEAARRCCHHIINNGG
/_p_a_t_t_e_r_n * Search forward for (_N-th) matching line.
?_p_a_t_t_e_r_n * Search backward for (_N-th) matching line.
n * Repeat previous search (for _N-th occurrence).
N * Repeat previous search in reverse direction.
ESC-n * Repeat previous search, spanning files.
ESC-N * Repeat previous search, reverse dir. & spanning files.
ESC-u Undo (toggle) search highlighting.
&_p_a_t_t_e_r_n * Display only matching lines
---------------------------------------------------
A search pattern may begin with one or more of:
^N or ! Search for NON-matching lines.
^E or * Search multiple files (pass thru END OF FILE).
^F or @ Start search at FIRST file (for /) or last file (for ?).
^K Highlight matches, but don't move (KEEP position).
^R Don't use REGULAR EXPRESSIONS.
---------------------------------------------------------------------------
JJUUMMPPIINNGG
g < ESC-< * Go to first line in file (or line _N).
G > ESC-> * Go to last line in file (or line _N).
p % * Go to beginning of file (or _N percent into file).
t * Go to the (_N-th) next tag.
T * Go to the (_N-th) previous tag.
{ ( [ * Find close bracket } ) ].
} ) ] * Find open bracket { ( [.
ESC-^F _<_c_1_> _<_c_2_> * Find close bracket _<_c_2_>.
ESC-^B _<_c_1_> _<_c_2_> * Find open bracket _<_c_1_>
---------------------------------------------------
Each "find close bracket" command goes forward to the close bracket
matching the (_N-th) open bracket in the top line.
Each "find open bracket" command goes backward to the open bracket
matching the (_N-th) close bracket in the bottom line.
m_<_l_e_t_t_e_r_> Mark the current top line with <letter>.
M_<_l_e_t_t_e_r_> Mark the current bottom line with <letter>.
'_<_l_e_t_t_e_r_> Go to a previously marked position.
'' Go to the previous position.
^X^X Same as '.
ESC-M_<_l_e_t_t_e_r_> Clear a mark.
---------------------------------------------------
A mark is any upper-case or lower-case letter.
Certain marks are predefined:
^ means beginning of the file
$ means end of the file
---------------------------------------------------------------------------
CCHHAANNGGIINNGG FFIILLEESS
:e [_f_i_l_e] Examine a new file.
^X^V Same as :e.
:n * Examine the (_N-th) next file from the command line.
:p * Examine the (_N-th) previous file from the command line.
:x * Examine the first (or _N-th) file from the command line.
:d Delete the current file from the command line list.
= ^G :f Print current file name.
---------------------------------------------------------------------------
MMIISSCCEELLLLAANNEEOOUUSS CCOOMMMMAANNDDSS
-_<_f_l_a_g_> Toggle a command line option [see OPTIONS below].
--_<_n_a_m_e_> Toggle a command line option, by name.
__<_f_l_a_g_> Display the setting of a command line option.
___<_n_a_m_e_> Display the setting of an option, by name.
+_c_m_d Execute the less cmd each time a new file is examined.
!_c_o_m_m_a_n_d Execute the shell command with $SHELL.
|XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command.
s _f_i_l_e Save input to a file.
v Edit the current file with $VISUAL or $EDITOR.
V Print version number of "less".
---------------------------------------------------------------------------
OOPPTTIIOONNSS
Most options may be changed either on the command line,
or from within less by using the - or -- command.
Options may be given in one of two forms: either a single
character preceded by a -, or a name preceded by --.
-? ........ --help
Display help (from command line).
-a ........ --search-skip-screen
Search skips current screen.
-A ........ --SEARCH-SKIP-SCREEN
Search starts just after target line.
-b [_N] .... --buffers=[_N]
Number of buffers.
-B ........ --auto-buffers
Don't automatically allocate buffers for pipes.
-c ........ --clear-screen
Repaint by clearing rather than scrolling.
-d ........ --dumb
Dumb terminal.
-D [_x_n_._n] . --color=_x_n_._n
Set screen colors. (MS-DOS only)
-e -E .... --quit-at-eof --QUIT-AT-EOF
Quit at end of file.
-f ........ --force
Force open non-regular files.
-F ........ --quit-if-one-screen
Quit if entire file fits on first screen.
-g ........ --hilite-search
Highlight only last match for searches.
-G ........ --HILITE-SEARCH
Don't highlight any matches for searches.
-h [_N] .... --max-back-scroll=[_N]
Backward scroll limit.
-i ........ --ignore-case
Ignore case in searches that do not contain uppercase.
-I ........ --IGNORE-CASE
Ignore case in all searches.
-j [_N] .... --jump-target=[_N]
Screen position of target lines.
-J ........ --status-column
Display a status column at left edge of screen.
-k [_f_i_l_e] . --lesskey-file=[_f_i_l_e]
Use a lesskey file.
-K ........ --quit-on-intr
Exit less in response to ctrl-C.
-L ........ --no-lessopen
Ignore the LESSOPEN environment variable.
-m -M .... --long-prompt --LONG-PROMPT
Set prompt style.
-n -N .... --line-numbers --LINE-NUMBERS
Don't use line numbers.
-o [_f_i_l_e] . --log-file=[_f_i_l_e]
Copy to log file (standard input only).
-O [_f_i_l_e] . --LOG-FILE=[_f_i_l_e]
Copy to log file (unconditionally overwrite).
-p [_p_a_t_t_e_r_n] --pattern=[_p_a_t_t_e_r_n]
Start at pattern (from command line).
-P [_p_r_o_m_p_t] --prompt=[_p_r_o_m_p_t]
Define new prompt.
-q -Q .... --quiet --QUIET --silent --SILENT
Quiet the terminal bell.
-r -R .... --raw-control-chars --RAW-CONTROL-CHARS
Output "raw" control characters.
-s ........ --squeeze-blank-lines
Squeeze multiple blank lines.
-S ........ --chop-long-lines
Chop (truncate) long lines rather than wrapping.
-t [_t_a_g] .. --tag=[_t_a_g]
Find a tag.
-T [_t_a_g_s_f_i_l_e] --tag-file=[_t_a_g_s_f_i_l_e]
Use an alternate tags file.
-u -U .... --underline-special --UNDERLINE-SPECIAL
Change handling of backspaces.
-V ........ --version
Display the version number of "less".
-w ........ --hilite-unread
Highlight first new line after forward-screen.
-W ........ --HILITE-UNREAD
Highlight first new line after any forward movement.
-x [_N[,...]] --tabs=[_N[,...]]
Set tab stops.
-X ........ --no-init
Don't use termcap init/deinit strings.
-y [_N] .... --max-forw-scroll=[_N]
Forward scroll limit.
-z [_N] .... --window=[_N]
Set size of window.
-" [_c[_c]] . --quotes=[_c[_c]]
Set shell quote characters.
-~ ........ --tilde
Don't display tildes after end of file.
-# [_N] .... --shift=[_N]
Horizontal scroll amount (0 = one half screen width)
--follow-name
The F command changes files if the input file is renamed.
--mouse
Enable mouse input.
--no-keypad
Don't send termcap keypad init/deinit strings.
--no-histdups
Remove duplicates from command history.
--rscroll=C
Set the character used to mark truncated lines.
--save-marks
Retain marks across invocations of less.
--use-backslash
Subsequent options use backslash as escape char.
--wheel-lines=N
Each click of the mouse wheel moves N lines.
---------------------------------------------------------------------------

@ -1,17 +0,0 @@
{
"name": "com.huawei.cordovahmsgmscheckplugin",
"version": "1.0.0",
"description": "Account Check Kit 4.0",
"cordova": {
"id": "com.huawei.cordovahmsgmscheckplugin",
"platforms": [
"android"
]
},
"keywords": [
"ecosystem:cordova",
"cordova-android"
],
"author": "",
"license": "ISC"
}

@ -1,29 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="com.huawei.cordovahmsgmscheckplugin" version="1.0.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>CordovaHMSGMSCheckPlugin</name>
<js-module name="CordovaHMSGMSCheckPlugin" src="www/CordovaHMSGMSCheckPlugin.js">
<clobbers target="cordova.plugins.CordovaHMSGMSCheckPlugin" />
</js-module>
<platform name="android">
<!-- hook for add maven repositories and agc plugin-->
<hook src="scripts/android/after_plugin_install.js" type="after_plugin_install" />
<hook src="scripts/android/before_plugin_uninstall.js" type="before_plugin_uninstall" />
<framework custom="true" src="src/android/build.gradle" type="gradleReference" />
<!-- Account Kit dependency-->
<framework src="com.huawei.hms:base:5.0.4.301" />
<!-- <framework src="com.google.android.gms:play-services-base:17.2.1" /> -->
<config-file parent="/*" target="res/xml/config.xml">
<feature name="CordovaHMSGMSCheckPlugin">
<param name="android-package"
value="com.huawei.cordovahmsgmscheckplugin.CordovaHMSGMSCheckPlugin" />
</feature>
</config-file>
<config-file parent="/*" target="AndroidManifest.xml"></config-file>
<source-file src="src/android/CordovaHMSGMSCheckPlugin.java"
target-dir="src/com/huawei/cordovahmsgmscheckplugin" />
</platform>
<!-- Script help to copy agconnect-services.json to right places-->
<hook src="scripts/after_prepare.js" type="after_prepare" />
</plugin>

@ -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);
}
};

@ -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();
};

@ -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();
};

@ -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);
},
};

@ -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 + "(.*?)>(.*?)</" + 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;
}
},
};

@ -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;
}
}
}
}

@ -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'
})

@ -1,17 +0,0 @@
{
"name": "com.huawei.cordovahmslocationplugin",
"version": "1.0.0",
"description": "Location Service",
"cordova": {
"id": "com.huawei.cordovahmslocationplugin",
"platforms": [
"android"
]
},
"keywords": [
"ecosystem:cordova",
"cordova-android"
],
"author": "",
"license": "ISC"
}

@ -1,29 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin xmlns:android="http://schemas.android.com/apk/res/android" id="com.huawei.cordovahmslocationplugin"
version="1.0.0"
xmlns="http://apache.org/cordova/ns/plugins/1.0">
<name>CordovaHMSLocationPlugin</name>
<js-module name="CordovaHMSLocationPlugin" src="www/CordovaHMSLocationPlugin.js">
<clobbers target="cordova.plugins.CordovaHMSLocationPlugin" />
</js-module>
<platform name="android">
<!-- hook for add maven repositories and agc plugin-->
<hook src="scripts/android/after_plugin_install.js" type="after_plugin_install" />
<hook src="scripts/android/before_plugin_uninstall.js" type="before_plugin_uninstall" />
<framework custom="true" src="src/android/build.gradle" type="gradleReference" />
<!-- Location Kit dependency-->
<framework src="com.huawei.hms:location:4.0.0.300" />
<config-file parent="/*" target="res/xml/config.xml">
<feature name="CordovaHMSLocationPlugin">
<param name="android-package"
value="com.huawei.cordovahmslocationplugin.CordovaHMSLocationPlugin" />
</feature>
</config-file>
<config-file parent="/*" target="AndroidManifest.xml"></config-file>
<source-file src="src/android/CordovaHMSLocationPlugin.java"
target-dir="src/com/huawei/cordovahmslocationplugin" />
</platform>
<!-- Script help to copy agconnect-services.json to right places-->
<hook src="scripts/after_prepare.js" type="after_prepare" />
</plugin>

@ -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);
}
};

@ -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();
};

@ -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();
};

@ -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);
}
};

@ -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 + '(.*?)>(.*?)</' + 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;
}
}
};

@ -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);
}
}
}
}

@ -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'
})

@ -1,21 +0,0 @@
{
"name": "cordovahmspushplugin",
"version": "1.0.0",
"description": "For Hms Push",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "test",
"license": "ISC",
"cordova": {
"id": "com.huawei.cordovahmspushplugin",
"platforms": [
"android"
]
},
"keywords": [
"ecosystem:cordova",
"cordova-android"
]
}

@ -1,38 +0,0 @@
<?xml version='1.0' encoding='utf-8'?><!-- Plugin Id and Version-->
<plugin xmlns:android="http://schemas.android.com/apk/res/android"
id="com.huawei.cordovahmspushplugin" version="1.0.0"
xmlns="http://apache.org/cordova/ns/plugins/1.0">
<js-module name="CordovaHMSPushPlugin" src="www/CordovaHMSPushPlugin.js">
<clobbers target="cordova.plugins.CordovaHMSPushPlugin" />
</js-module>
<!-- Plugin Name -->
<name>CordovaHMSPushPlugin</name>
<platform name="android">
<!-- hook for add maven repositories and agc plugin-->
<hook src="scripts/android/after_plugin_install.js" type="after_plugin_install" />
<hook src="scripts/android/before_plugin_uninstall.js" type="before_plugin_uninstall" />
<framework custom="true" src="src/android/build.gradle" type="gradleReference" />
<!-- Push Kit dependency-->
<framework src="com.huawei.hms:push:4.0.0.300" />
<config-file parent="/*" target="res/xml/config.xml">
<feature name="CordovaHMSPushPlugin">
<param name="android-package"
value="com.huawei.cordovahmspushplugin.CordovaHMSPushPlugin" />
</feature>
</config-file>
<config-file parent="/manifest/application" target="AndroidManifest.xml">
<service android:exported="false" android:name="com.huawei.cordovahmspushplugin.MessageService">
<intent-filter>
<action android:name="com.huawei.push.action.MESSAGING_EVENT" />
</intent-filter>
</service>
</config-file>
<source-file src="src/android/CordovaHMSPushPlugin.java"
target-dir="src/com/huawei/cordovahmspushplugin" />
<source-file src="src/android/MessageService.java"
target-dir="src/com/huawei/cordovahmspushplugin" />
</platform>
<!-- Script help to copy agconnect-services.json to right places-->
<hook src="scripts/after_prepare.js" type="after_prepare" />
</plugin>

@ -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);
}
};

@ -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();
};

@ -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();
};

@ -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);
}
};

@ -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 + '(.*?)>(.*?)</' + 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;
}
}
};

@ -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<Void>() {
@Override
public void onComplete(Task<Void> 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());
}
}
}

@ -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);
}
}
}

@ -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'
})

@ -4,8 +4,6 @@
<description>An app created by cloud Solutions</description>
<author email="eservicescs@cloudsolution-sa.com" href="http://cloudsolution-sa.com">Cloud Solutions</author>
<content src="index.html" />
<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
@ -50,9 +48,6 @@
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<feature name="SocialSharing">
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
</feature>
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
@ -112,29 +107,21 @@
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-geolocation" spec="~4.0.1" />
<plugin name="cordova-plugin-datepicker" spec="~0.9.3" />
<plugin name="cordova-plugin-ionic-webview" spec="4.1.0">
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-sqlite-storage" spec="^3.4.0" />
<plugin name="cordova-plugin-nativestorage" spec="^2.3.2" />
<plugin name="cordova-plugin-ble-central" spec="^1.2.4" />
<plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^3.2.2" />
<plugin name="cordova-plugin-themeablebrowser" spec="^0.2.18" />
<plugin name="cordova-plugin-inappbrowser" spec="^3.1.0" />
<plugin name="cordova-plugin-globalization" spec="^1.11.0" />
<plugin name="cordova-plugin-android-permissions" spec="^1.0.2" />
<plugin name="cordova-plugin-device" spec="^2.0.3" />
<plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.2" />
<plugin name="cordova-plugin-badge" spec="^0.8.8" />
<plugin name="cordova.plugins.diagnostic" spec="^5.0.1" />
<plugin name="phonegap-plugin-barcodescanner" spec="^8.1.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-camera" spec="^4.1.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
<plugin name="cordova-opentok-android-permissions" spec="^1.0.1" />
<plugin name="cordova-plugin-appavailability" spec="^0.4.2" />
<plugin name="cordova-plugin-apprate" spec="^1.4.0" />
<plugin name="cordova-plugin-file" spec="^6.0.2" />

Binary file not shown.

@ -24,11 +24,8 @@
"@ionic-native/android-permissions": "^5.18.0",
"@ionic-native/app-availability": "^5.18.0",
"@ionic-native/app-rate": "^5.18.0",
"@ionic-native/background-geolocation": "^5.30.0",
"@ionic-native/badge": "^5.18.0",
"@ionic-native/barcode-scanner": "^5.18.0",
"@ionic-native/base64": "^5.18.0",
"@ionic-native/ble": "^5.18.0",
"@ionic-native/camera": "^5.18.0",
"@ionic-native/core": "^5.8.0",
"@ionic-native/date-picker": "^5.10.0",
@ -41,24 +38,17 @@
"@ionic-native/file-picker": "^5.36.0",
"@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.34.0",
"@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.18.0",
"@ionic-native/health": "^5.4.0",
"@ionic-native/in-app-browser": "^5.17.0",
"@ionic-native/keyboard": "^5.17.0",
"@ionic-native/launch-navigator": "^5.17.0",
"@ionic-native/local-notifications": "^5.17.0",
"@ionic-native/native-storage": "^5.17.0",
"@ionic-native/nfc": "^5.30.0",
"@ionic-native/open-native-settings": "^5.14.0",
"@ionic-native/sms-retriever": "^5.36.0",
"@ionic-native/social-sharing": "^5.34.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/sqlite": "^5.18.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/themeable-browser": "^5.18.0",
"@ionic-native/wifi-wizard-2": "^5.31.1",
"@ionic-native/zbar": "^5.10.0",
"@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.2",
"@swimlane/ngx-charts": "^10.1.0",
@ -69,7 +59,6 @@
"cordova-android": "^8.1.0",
"cordova-android-support-gradle-release": "^3.0.1",
"cordova-open-native-settings": "^1.5.2",
"cordova-opentok-android-permissions": "^1.0.1",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-android-permissions": "^1.0.2",
@ -78,7 +67,6 @@
"cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-apprate": "^1.4.0",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-ble-central": "^1.2.4",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^2.0.3",
@ -90,9 +78,7 @@
"cordova-plugin-filepicker": "^1.1.6",
"cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^13.0.0",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.0",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
@ -100,16 +86,12 @@
"cordova-plugin-sms-retriever-manager": "^1.0.3",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-plugin-wifiwizard2": "^3.1.1",
"cordova-plugin-x-socialsharing": "^6.0.3",
"cordova-sqlite-storage": "^3.4.0",
"cordova-support-google-services": "^1.3.2",
"cordova.plugins.diagnostic": "^5.0.1",
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"es6-promise-plugin": "^4.1.0",
"ionic2-calendar": "^0.5.8",
"ionic4-rating": "^1.0.9",
"ng-circle-progress": "^1.5.1",
@ -117,8 +99,6 @@
"ng2-pdf-viewer": "^5.3.2",
"ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.14.11",
"phonegap-nfc": "^1.2.0",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
"primeicons": "^1.0.0",
"primeng": "^7.1.3",
@ -144,11 +124,7 @@
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.0",
"codelyzer": "~4.5.0",
"com.huawei.cordovahmsgmscheckplugin": "file:CordovaHMSPlugin/CordovaHMSGMSCheckPlugin",
"com.huawei.cordovahmslocationplugin": "file:CordovaHMSPlugin/CordovaHMSLocationPlugin",
"cordova-ios": "^6.2.0",
"cordova-plugin-wifiwizard2": "^3.1.1",
"es6-promise-plugin": "^4.1.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.0.1",
@ -175,10 +151,6 @@
"cordova-plugin-badge": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-datepicker": {},
"cordova-plugin-geolocation": {},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
@ -193,12 +165,8 @@
"cordova-plugin-filepath": {},
"com-badrit-base64": {},
"cordova-sqlite-storage": {},
"cordova-plugin-ble-central": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {},
"cordova-plugin-themeablebrowser": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-local-notification": {},
"cordova-opentok-android-permissions": {},
"cordova-plugin-appavailability": {},
"cordova-plugin-apprate": {},
"cordova-plugin-fingerprint-aio": {
@ -206,14 +174,6 @@
},
"cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "+"
},
"phonegap-nfc": {},
"wifiwizard2": {},
"com.huawei.cordovahmsgmscheckplugin": {},
"com.huawei.cordovahmslocationplugin": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
@ -250,8 +210,8 @@
"cordova-plugin-filechooser": {}
},
"platforms": [
"android",
"ios"
"ios",
"android"
]
}
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">localhost</domain>
<domain includeSubdomains="true">hmg.com</domain>
<domain includeSubdomains="true">hrmsys.moenergy.gov.sa</domain>
</domain-config>
</network-security-config>

@ -139,8 +139,147 @@ ion-card-content.confirm-details {
// }
}
}
.timeline {
position: relative;
margin: 15px 0 0 0;
// border-bottom: solid 1px var(--cusgray);
}
.timeline:before {
content: '';
position: inherit !important;
top: 0;
bottom: 0;
width: 4px;
// background: #e4e4e4;
z-index: 1;
left: 35px;
/* margin-left: -10px; */
/* z-index: 1; */
}
.timeline .timeline-thumb {
border-radius: 500px;
width: 70px !important;
z-index: 2;
position: absolute;
left: 0px;
// :root[dir="ltr"]{
// left: 37px;
// }
// :root[dir="rtl"]{
// right: 37px;
// }
float: right;
top: 9px;
}
.timeline .timeline-thumb.timeline-icon {
height: 70px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
// transform: scale(0.2);
}
.timeline .timeline-item {
// width: 40px;
}
.timeline .timeline-stats {
position: relative;
font-size: 12px;
color: var(--darkgray);
}
.empImge{
border-radius: 50%;
width:60px;
height: 60px;
border: #dedede solid 1px;
}
.empImgeRep {
border-radius: 50% !important;
width: 80px;
height: 80px;
border: #dedede solid 1px;
}
.line{
padding-bottom:87px;
}
.attachLable{
position: absolute;
top: 0px;
z-index: 0;
background: #44A7A1;
color: #fff;
border-radius: 50%;
border: 0px;
width: 24px;
height: 24px;
text-align: center;
font-size: 5px;
}
.removeLable{
top: 0px;
z-index: 0;
background: #d8252d;
color: #fff;
border-radius: 50%;
border: 0px;
width: 20px;
height: 20px;
text-align: center;
font-size: 5px;
}
.note-modal {
// width: 90%;
// height: 50%;
// top: 20%;
// left: 5%;
// right: 5%;
// bottom: 5%;
background: rgba(0, 0, 0, 0.5) !important;
padding: 30% 10% !important;
--height: 12cm !important;
// --width: 80% !important;
--border-radius:20px;
}
.header-toolbar-new{
--background: #024d71;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #0ca2de;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}
}

@ -123,10 +123,10 @@
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; --border-radius: 10px; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; " ion-button (click)="closeModal()">
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; --border-radius: 10px; " ion-button (click)="closeModal()">
{{'general, cancel' | translate}}</ion-button>
</div>
</ion-footer>

@ -230,6 +230,7 @@
position: absolute;
content: "";
// background: #BE332F;
// background: #024d71;
height: 140px;
width: 100%;
left: 0;
@ -275,6 +276,7 @@
// color: black;
// background-color: #CB3232;
// // background-color: #BE332F;
// // background-color: #024d71;
// width: 11%;
// height: 6px;
// }

@ -4,23 +4,22 @@
color: #7F8C8D;
}
.header-toolbar-new {
.header-toolbar-new{
--background: #BE332F;
}
.confirmEitOkButton {
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #BE332F;
width: 80% !important;
color: white !important;
border-radius: 16px !important;
--border-radius: 16px !important;
--box-shadow: none;
}
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #BE332F;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
--border-radius: 16px !important;
}
.label-Select {

@ -322,7 +322,8 @@ export class SubmitAbsenceComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else if (feildsList[i].FORMAT_TYPE == "N") {
// number
@ -333,7 +334,8 @@ export class SubmitAbsenceComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else if (feildsList[i].FORMAT_TYPE == "X") {
// standard date
@ -352,7 +354,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.dateInput = new DateInput(
@ -363,7 +366,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
} else if (feildsList[i].FORMAT_TYPE == "Y") {
@ -382,7 +386,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.datetimeInput = new DateTimeInput(
@ -393,7 +398,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
const elem = document.getElementById(
@ -423,7 +429,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.timeInput = new TimeInput(
@ -434,7 +441,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
}
@ -448,7 +456,8 @@ export class SubmitAbsenceComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else {
this.selectInput = new SelectInput(
@ -458,7 +467,8 @@ export class SubmitAbsenceComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
this.fillDropdownList(

@ -1,3 +1,3 @@
.header-toolbar-new {
--background: #BE332F;
}
}

@ -1,12 +1,12 @@
<ion-app [dir]="direction">
<ion-app [dir]="direction" id="lang">
<ion-split-pane>
<ion-menu [swipeGesture]="false" side='start' *ngIf="direction ==='ltr'">
<ion-content class="sidebar-menu">
<div class="header-div">
<div>
<div class="header-div" style="visibility: hidden;">
<!-- <div>
<img class="closeIcon" (click)="closeMenu()" style= "height: 18px !important;" src="../assets/imgs/close_menu_icon.png ">
</div>
</div> -->
<div >
<img class="mohemmLogo" src="../assets/imgs/menu_mohemm_logo.png" >
</div>
@ -21,15 +21,15 @@
</div>
</div>
<div style="border-bottom: rgb(190, 187, 187) solid 1px;" >
<div class="border" >
<button class="logout" ion-button (click)="logout();" > {{ts.trPK('home','logout')}}</button>
</div>
<br>
<ion-list class="list-en" >
<ion-item (click)="profile()">
<ion-item (click)="profile()" lines="none">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/imgs/profile_icon.png" item-left>
<img style= "height: 18px !important; width:16px" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('userProfile','title')}}
@ -43,7 +43,7 @@
{{ts.trPK('userProfile','performance-evaluation')}}
</ion-label>
</ion-item> -->
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-item lines="none" [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
@ -113,22 +113,38 @@
</ion-list>
<div class="" style="text-align:center">
<img src="{{companyUrl}}" class="CompanyImg logoImg">
</div>
<!-- <div class="" style="text-align:center">
<img src="../assets/icon/new-design/moe-logo.png" class="CompanyImg logoImg">
</div> -->
</ion-content>
<ion-footer style="padding: 0px;">
<ion-row>
<div class="footer-container">
<ion-col class="colPad" size="9" style="visibility: hidden">
<img class="logoFotor" src="../assets/imgs/menu_mohemm_logo.png" />
</ion-col>
<ion-col class="colPad" size="3">
<img class="moe-logo" src="../assets/icon/moe-logo.png" />
</ion-col>
</div>
</ion-row>
<div class="menuFooter" >
<div> <img src="../assets/imgs/CSLogo.png" class="CompanyImg" ></div>
<p class="companyTxt">{{companyDesc}}</p>
</div>
</ion-content>
</ion-footer>
</ion-menu>
<ion-menu [swipeGesture]="false" side='end' *ngIf="direction ==='rtl'">
<ion-content class="sidebar-menu">
<div class="header-div">
<div>
<div class="header-div" style="visibility: hidden;">
<!-- <div>
<img class="closeIcon" (click)="closeMenu()" style= "height: 18px !important; margin-right: 15px;" src="../assets/imgs/close_menu_icon.png ">
</div>
</div> -->
<div>
<img class="mohemmLogo-ar" src="../assets/imgs/menu_mohemm_logo.png" >
</div>
@ -142,15 +158,15 @@
</div>
</div>
<div style="border-bottom: rgb(190, 187, 187) solid 1px;" >
<div class="border" >
<button class="logout-ar" ion-button (click)="logout();" > {{ts.trPK('home','logout')}}</button>
</div>
<br>
<ion-list class="list-ar" >
<ion-item (click)="profile()">
<ion-item (click)="profile()" lines="none">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/imgs/profile_icon.png" item-left>
<img style= "height: 18px !important; width:16px" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('userProfile','title')}}
@ -164,7 +180,7 @@
{{ts.trPK('userProfile','performance-evaluation')}}
</ion-label>
</ion-item> -->
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-item lines="none" [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
@ -256,14 +272,31 @@
</ion-item> -->
</ion-list>
<div class="" style="text-align:center">
<img src="{{companyUrl}}" class="CompanyImg" [ngClass]="TeamFlag!='true'? 'logoImg':'logoImgWithMyTeam'">
</div>
<div class="menuFooter">
<div> <img src="../assets/imgs/CSLogo.png" class="CompanyImg" ></div>
<!-- <div class="" style="text-align:center"> -->
<!-- <img src="{{companyUrl}}" class="CompanyImg" [ngClass]="TeamFlag!='true'? 'logoImg':'logoImgWithMyTeam'"> -->
<!-- <img src="../assets/icon/new-design/moe-logo.png" class="CompanyImg" [ngClass]="TeamFlag!='true'? 'logoImg':'logoImgWithMyTeam'"> -->
<!-- <p class="companyTxt">{{companyDesc}}</p> -->
<!-- </div> -->
</ion-content>
<ion-footer style="padding: 0px;" dir="ltr">
<ion-row>
<div class="footer-container">
<ion-col class="colPad" size="9" style="visibility: hidden">
<img class="logoFotor" src="../assets/imgs/menu_mohemm_logo.png" />
</ion-col>
<ion-col class="colPad" size="3">
<img class="moe-logo" src="../assets/icon/moe-logo.png" />
</ion-col>
</div>
</ion-row>
<div class="menuFooter" >
<p class="companyTxt">{{companyDesc}}</p>
</div>
</ion-content>
</ion-footer>
</ion-menu>
<ion-router-outlet main></ion-router-outlet>
</ion-split-pane>

@ -10,21 +10,21 @@ header
}
.mohemmLogo {
max-width: 46% !important;
border: 0 !important;
margin-left: 70px !important;
margin-right: 70px !important;
margin-top: -24px !important;
margin-bottom: 11px;
margin-bottom: 5px;
margin: auto;
display: block;
}
.mohemmLogo-ar {
max-width: 46% !important;
border: 0 !important;
margin-right: 70px !important;
margin-top: -24px !important;
margin-bottom: 11px;
margin-bottom: 5px;
}
.closeIcon {
@ -38,6 +38,10 @@ header
top: 10px;
}
hr {
border-width: 1px;
}
.menubutton {
white-space: normal;
@ -79,26 +83,25 @@ header
.logout {
background-color: #c6903e;
border: none;
color: white;
// padding: 20px;
color: #004D71;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
margin-left: 120px !important;
margin-top: 15px !important;
margin-bottom: 20px !important;
border-radius: 30px;
// width: 40px;
height: 26px;
padding: 6px 24px;
height: 35px;
margin: auto;
padding: 0px 24px;
display: block;
}
.logout-ar {
background-color: #c6903e;
border: none;
color: white;
color: #004D71;
text-align: center;
text-decoration: none;
display: inline-block;
@ -107,8 +110,8 @@ header
margin-top: 15px !important;
margin-bottom: 20px !important;
border-radius: 30px;
height: 26px;
padding: 6px 24px;
height: 35px;
padding: 0px 24px;
}
.menuImg {
@ -289,22 +292,27 @@ button.menu-item.item.item-block.item-ios {
}
.TxtPlace {
margin: 0;
padding: 0;
text-align: center;
font-weight: bolder;
color: black;
font-size: 16px;
font-size: 20px;
color: #004D71;
font-weight: bold;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 90%;
margin: 10px auto auto auto;
}
.TxtPlaces {
margin: 0;
padding: 0;
text-align: center;
font-weight: bolder;
.TxtPlaces {
font-size: 14px;
color: darkgray;
color: #004D71;
font-weight: bold;
// font-family: 'Inter' !important;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 90%;
margin: 5px auto;
}
.menuFooter {
@ -314,6 +322,7 @@ button.menu-item.item.item-block.item-ios {
margin: auto;
width: 100%;
position: absolute;
top: 40px
}
@ -323,41 +332,30 @@ button.menu-item.item.item-block.item-ios {
margin: auto;
}
// .menuFooter .CompanyImg {
// width: 100%;
// height: 100%;
// }
.menuFooter .CompanyImg {
width: 80%;
height: 80%;
width: 65%;
height: 60%;
margin-bottom: -21px;
}
// .logoImg{
// width: 120px;
// position: relative;
// }
.logoImgWithMyTeam {
width: 77px;
// position: relative;
margin-top: -1px;
margin-bottom: 70px;
width: 200px;
margin: 20px auto;
}
.logoImg {
width: 250px;
margin-top: 20px;
margin-bottom: 180px;
width: 225px;
}
.companyTxt {
font-size: 12px;
color: var(--customnavy);
color: #004D71;
text-align: center;
font-family: 'Inter' !important;
}
ion-thumbnail.menu-thumb {
@ -373,7 +371,7 @@ ion-thumbnail.menu-thumb {
}
.profile {
color: black !important;
color: #5C6F79 !important;
font-weight: bolder !important;
}
@ -396,8 +394,8 @@ ion-thumbnail.menu-thumb {
// }
.profileImg {
width: 140px;
height: 140px;
width: 100px;
height: 100px;
display: -webkit-inline-box;
display: inline-flex;
overflow: hidden;
@ -405,4 +403,32 @@ ion-thumbnail.menu-thumb {
border-radius: 70% !important;
position: relative;
top: 3px;
}
ion-item,
.border {
border-bottom: #c7c7c7 solid 1px
}
.footer-container {
width: 100%;
display: -webkit-box;
display: flex;
-webkit-box-align: stretch;
align-items: stretch;
}
.footer-container .logoFotor {
margin: 20px;
float: left;
width: 100px !important;
height: 30px !important;
}
.footer-container .moe-logo {
width: 45px;
float: right;
margin-right: 16px;
margin-top: 15px;
}

@ -152,7 +152,6 @@ export class AppComponent implements OnInit {
if (user) {
console.log(user);
this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info'));
console.log('ENAD TEST')
console.log(this.userInfo)
localStorage.setItem("digitalIDUser", JSON.stringify(user));
this.digitalIDUser = user//JSON.stringify(user);
@ -206,10 +205,10 @@ export class AppComponent implements OnInit {
this.user_image = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : '../assets/imgs/profile.png';
}
// this.User_Job_name = user.JOB_NAME;
let jobTitle = user.POSITION_NAME.split('.');
if (jobTitle && jobTitle.length > 1) {
this.User_Job_name = jobTitle[0] + " " + jobTitle[1];
}
let jobTitle = user.POSITION_NAME;
// if (jobTitle && jobTitle.length > 1) {
this.User_Job_name = jobTitle;
// }
//erm channel
// if (!CommonService.SKIP)
// this.cs.navigateForward('/erm-channel/survey');

@ -8,16 +8,16 @@ import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { ZBar } from '@ionic-native/zbar/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { FilePath } from '@ionic-native/file-path/ngx';
import { File } from '@ionic-native/file/ngx';
import { Base64 } from '@ionic-native/base64/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { NgCalendarModule } from 'ionic2-calendar';
import { NFC, Ndef} from "@ionic-native/nfc/ngx"
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
// import { NFC, Ndef} from "@ionic-native/nfc/ngx"
// import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { DigitalIdComponent } from './authentication/digital-id/digital-id.component';
import { BusinessCardComponent } from './authentication/business-card/business-card.component';
import { AppUpdateComponent } from './authentication/app-update/app-update.component';
@ -38,17 +38,17 @@ import { AppUpdateComponent } from './authentication/app-update/app-update.compo
providers: [
StatusBar,
SplashScreen,
ZBar,
Geolocation,
// ZBar,
// Geolocation,
Camera,
File,
FilePath,
Base64,
FirebaseX,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
NFC,
Ndef,
WifiWizard2
// NFC,
// Ndef,
// WifiWizard2
],
bootstrap: [AppComponent]
})

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@ -11,28 +11,28 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
})
export class HomeComponent implements OnInit {
zbarOptions: any;
// zbarOptions: any;
scannedResult: any;
lat: any;
longt: any;
constructor(public ts: TranslatorService, private zbar: ZBar, private geolocation: Geolocation) {
constructor(public ts: TranslatorService) {
this.zbarOptions = {
flash: 'off',
drawSight: false
};
// this.zbarOptions = {
// flash: 'off',
// drawSight: false
// };
console.log('your currnt location is');
this.geolocation.getCurrentPosition().then((resp) => {
// resp.coords.latitude
// resp.coords.longitude
// console.log("Loc 2");
console.log(resp.coords.latitude);
console.log(resp.coords.longitude);
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
}).catch((error) => {
console.log('Error getting location', error);
});
// this.geolocation.getCurrentPosition().then((resp) => {
// // resp.coords.latitude
// // resp.coords.longitude
// // console.log("Loc 2");
// console.log(resp.coords.latitude);
// console.log(resp.coords.longitude);
// this.lat = resp.coords.latitude;
// this.longt = resp.coords.longitude;
// }).catch((error) => {
// console.log('Error getting location', error);
// });
this.scanCode();
}
@ -43,13 +43,13 @@ export class HomeComponent implements OnInit {
}
scanCode() {
this.zbar.scan(this.zbarOptions)
.then(result => {
console.log(result); // Scanned code
this.scannedResult = result;
})
.catch(error => {
alert(error); // Error message
});
// this.zbar.scan(this.zbarOptions)
// .then(result => {
// console.log(result); // Scanned code
// this.scannedResult = result;
// })
// .catch(error => {
// alert(error); // Error message
// });
}
}

@ -3,7 +3,7 @@
<img src="assets/icon/update_rocket_image.png" style="width: 100%;" />
</div>
<div style="text-align: center;">
<img src="assets/imgs/CSLogo.png" />
<img style="height: 75px" src="assets/icon/moe-logo.png" />
</div>
<h1 style="text-align: center; font-weight: bold"> {{ 'general,app-update' | translate }}</h1>
@ -15,7 +15,7 @@
<ion-grid>
<ion-row class="ion-justify-content-center">
<ion-col [size]="11" [sizeLg]="8" [sizeXl]="6" no-padding>
<ion-button style="font-size: 16px !important; width:100%; --background: #259CB8; background: white;" expand="block"
<ion-button style="font-size: 16px !important; width:100%; --background: #44a7a1; background: white;" expand="block"
(click)='dismiss()'>
{{ 'general,update-now' | translate }}
</ion-button>

@ -1,6 +1,7 @@
<app-generic-header
*ngIf="!accessFromOutSide"
showBack="true"
[moeImage]="false"
[headerText]="'login,verify-login' | translate">
</app-generic-header>
@ -31,9 +32,9 @@
-->
</ion-col>
</ion-row>
<div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 2"><p>{{ts.trPK('login','verify-fingerprint')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 3"><p>{{ts.trPK('login','verify-faceId')}}</p></div>
<div *ngIf="onlySMSBox"><p class="p-color">{{ts.trPK('login','verify-login-with')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 2"><p class="p-color">{{ts.trPK('login','verify-fingerprint')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 3"><p class="p-color">{{ts.trPK('login','verify-faceId')}}</p></div>
</ion-col>
</ion-row>

@ -2,12 +2,8 @@
height: 25vh;
}
.rowOutside{
// margin-top: -37px;
}
.button-digital-id{
.button-digital-id {
--background: white !important;
background: white !important;
white-space: normal;
@ -22,16 +18,21 @@
}
.digital-id-en{
.digital-id-en {
color: black;
position: absolute;
right: 20px;
width: 10%;
}
}
.digital-id-ar{
.digital-id-ar {
color: black;
position: absolute;
left: 20px;
width: 10%;
}
}
.p-color {
color: #004D71;
font-weight: bold;
}

@ -17,7 +17,7 @@ import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/aut
import { LoginModel } from '../models/LoginModel';
import * as moment from 'moment';
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response';
import { NFC } from "@ionic-native/nfc/ngx";
// import { NFC } from "@ionic-native/nfc/ngx";
import { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component';
import { Password } from '../models/password';
@ -69,7 +69,7 @@ export class ConfirmLoginComponent implements OnInit {
public platform: Platform,
public modalController: ModalController,
public alertController: AlertController,
private nfc: NFC,
// private nfc: NFC,
private smsRetriever: SmsRetriever
) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
@ -353,20 +353,20 @@ export class ConfirmLoginComponent implements OnInit {
}
async checkNFCStatus() {
try {
let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus);
this.isNFCAvailable = true;
} catch (err) {
console.log("Error reading tag", err);
if (err === "NO_NFC") {
this.isNFCAvailable = false;
} else if (err === "NFC_DISABLED") {
this.isNFCAvailable = true;
} else {
this.isNFCAvailable = false;
}
}
// try {
// let nfcStatus = await this.nfc.enabled();
// console.log("nfc status >>>>>>>>>>" + nfcStatus);
// this.isNFCAvailable = true;
// } catch (err) {
// console.log("Error reading tag", err);
// if (err === "NO_NFC") {
// this.isNFCAvailable = false;
// } else if (err === "NFC_DISABLED") {
// this.isNFCAvailable = true;
// } else {
// this.isNFCAvailable = false;
// }
// }
}
public checkSMS() {
@ -380,6 +380,7 @@ export class ConfirmLoginComponent implements OnInit {
this.authService.checkSMS(request, () => { }, this.ts.trPK('general', 'ok'))
.subscribe((result: SMSCheckResponse) => {
if (this.cs.validResponse(result)) {
this.cs.sharedService.setSharedData(result.MemberLoginList.P_ORACLE_USER_NAME, 'oracle-user-name');
this.businessInfo = {
show_business: result.BusinessCardPrivilege,
name_en: result.MemberInformationList[0].EMPLOYEE_NAME_En,

@ -7,7 +7,9 @@
<div class="last-circle"></div>
</div>
</ion-row>
</ion-grid>
<div class="login-container">
<ion-grid>
<ion-row>
<ion-col *ngIf="!user">
<P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P>
@ -16,13 +18,13 @@
</ion-grid>
<div *ngIf="!user" [dir]="currentLang==1 ?'rtl': 'ltr'">
<ion-item class="item-input-login">
<ion-item class="item-input-login" lines="none">
<img style="margin: 9px 8px 9px 0 !important;" class="item-icon" src="assets/imgs/username.png" item-start />
<ion-input class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">
</ion-input>
</ion-item>
<ion-item class="item-input-login">
<ion-item class="item-input-login" lines="none">
<img style="margin: 9px 8px 9px 0 !important;" class="item-icon" src="assets/imgs/password.png" item-start />
<ion-input class="login-input" required [type]="inputType" [(ngModel)]="password" placeholder="{{ts.trPK('login','password')}}">
</ion-input>
@ -34,21 +36,21 @@
<a>{{ts.trPK('login','signup')}}</a>
</div>
<div ng class="gridDiv" aria-disabled="true">
<button class="gridBtn" ion-button (click)="changeLanguage('2')" [ngClass]="{'active':currentLang ==2}">English</button>
<button class="gridBtn arTxt" ion-button (click)="changeLanguage('1')" [ngClass]="{'active':currentLang ==1}">عربي</button>
<button class="gridBtn border-moe-right" ion-button (click)="changeLanguage('2')" [ngClass]="{'active':currentLang ==2}">English</button>
<button class="gridBtn arTxt border-moe-left" ion-button (click)="changeLanguage('1')" [ngClass]="{'active':currentLang ==1}">عربي</button>
</div>
</div>
<div *ngIf="!user" class="centerDiv" style="margin: 25px 15px !important;">
<ion-button [ngClass]="{'disable-button-opacity': isValidForm()}" class="button-login" (click)="onLogin()" [disabled]="isValidForm()" style="width: 100% !important;">{{ts.trPK('login','login')}}</ion-button>
</div>
<!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user">
</welcome-login>
<!-- </div> -->
<div *ngIf="!user" class="centerDiv" style="margin: 25px 15px !important;">
<ion-button [ngClass]="{'disable-button-opacity': isValidForm()}" class="button-login" (click)="onLogin()" [disabled]="isValidForm()" style="width: 100% !important;">{{ts.trPK('login','login')}}</ion-button>
<!-- digital ID button -->
<!-- <ion-button *ngIf="userInfo" class="button-digital-id" (click)="openDigitalId()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p>
@ -62,10 +64,20 @@
</div>
</ion-content>
<ion-footer *ngIf="!user" [ngStyle]="keyboardOpened === true ? {'display': 'none'} : {}" style="padding: 0px;">
<ion-footer *ngIf="!user" [ngStyle]="keyboardOpened === true ? {'display': 'none'} : {}" style="padding: 0px;" dir="ltr">
<ion-row>
<ion-col class="colPad">
<img class="centerDiv logoFotor" src="../assets/imgs/CSLogo.png" />
<div class="footer-container">
<ion-col class="colPad" size="9" style="visibility: hidden">
<img class="logoFotor" src="../assets/imgs/menu_mohemm_logo.png" />
</ion-col>
<ion-col class="colPad" size="3">
<img class="moe-logo" src="../assets/icon/moe-logo.png" />
</ion-col>
</div>
</ion-row>
<div class="menuFooter" >
<p class="companyTxt">{{companyDesc}}</p>
</div>
</ion-footer>

@ -23,6 +23,7 @@
text-align: center;
padding: 0px;
margin: 0px;
font-weight: bold;
}
.TxtPlace {
@ -97,10 +98,12 @@ img.centerDiv {
}
button.arTxt {
font-family: var(--fontFamilyIOSAR) !important;
:root[dir="rtl"] {
float: right;
color: var(--customnavy) !important;
font-family: var(--fontFamilyIOSAR) !important;
font-weight: bold;
border-radius: 2px 0px 0px 2px !important;
}
@ -118,10 +121,11 @@ img.centerDiv {
.login-input {
border: none;
margin-right: 5px;
font-family: 'Kufi';
}
.item-input {
--min-height: 1.0cm !important;
--min-height: 1.5cm !important;
--border-radius: 12px;
--ion-color-base: white !important;
// --background: color: var(--darkgray) !important;
@ -141,7 +145,7 @@ img.centerDiv {
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
min-height: 1.3cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
@ -170,10 +174,10 @@ img.centerDiv {
}
.first-circle {
background: var(--newgreen) !important;
background: #024D71 !important;
border-radius: 50%;
height: 292px;
width: 288px;
height: 310px;
width: 310px;
float: left;
margin-left: -55px;
margin-top: -140px;
@ -185,7 +189,7 @@ img.centerDiv {
background: #c6903e !important;
border-radius: 50%;
height: 160px;
width: 170px;
width: 190px;
margin: -115px 0px 0px 179px;
}
@ -198,11 +202,11 @@ img.centerDiv {
margin: -147px 0px 0px 274px;
}
.logoFotor {
width: 45px !important;
height: 45px !important;
// .logoFotor {
// width: 45px !important;
// height: 45px !important;
}
// }
.welcomeText {
justify-content: center;
@ -271,4 +275,54 @@ img.centerDiv {
position: absolute;
left: 20px;
width: 10%;
}
}
.footer-container {
width: 100%;
display: -webkit-box;
display: flex;
-webkit-box-align: stretch;
align-items: stretch;
}
.footer-container .logoFotor {
margin: 20px;
float: left;
width: 100px !important;
height: 30px !important;
}
.footer-container .moe-logo {
width: 45px;
float: right;
margin-right: 16px;
margin-top: 15px;
}
.border-moe-right {
border-top-right-radius: 16px;
border-bottom-right-radius: 16px;
}
.border-moe-left {
border-top-left-radius: 16px;
border-bottom-left-radius: 16px;
}
.menuFooter {
// position: fixed;
bottom: 0px;
text-align: center;
margin: auto;
width: 100%;
position: absolute;
top: 40px
}
.companyTxt {
font-size: 12px;
color: #004D71;
text-align: center;
font-family: 'Inter' !important;
}

@ -1,7 +1,7 @@
import { Component, OnInit, NgZone, OnDestroy } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { Router } from '@angular/router';
import { ActivatedRoute, Router } from '@angular/router';
import { AlertController, Platform, Events } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
@ -22,6 +22,7 @@ import { ModalController } from '@ionic/angular';
import { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component';
@Component({
selector: 'login',
templateUrl: './login.component.html',
@ -30,6 +31,8 @@ import { AppUpdateComponent } from '../app-update/app-update.component';
export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any;
userInfo: any;
companyDesc = 'Powered By Cloud Solutions';
constructor(
public cs: CommonService,
@ -47,7 +50,9 @@ export class LoginComponent implements OnInit, OnDestroy {
public plt: Platform,
public pushService: PushService,
public keyboardService: KeyboardService,
public modalController: ModalController
public modalController: ModalController,
public route:ActivatedRoute,
) {
this.events.subscribe('logoutFlage', logoutFlage => {
console.log('login compont logoutFlage: ' + logoutFlage);
@ -68,6 +73,13 @@ export class LoginComponent implements OnInit, OnDestroy {
} else {
this.user = false;
}
// this.route
//.params.subscribe(val => {
console.log("login page called init...")
}
appLang = 1;
@ -103,19 +115,25 @@ export class LoginComponent implements OnInit, OnDestroy {
private checkUserResult: CheckUserAuthenticationResponse;
public inputType = "password";
ngOnInit() {
this.monitorKeyboardChange();
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
this.currentLang = TranslatorService.getCurrentLanguageCode();
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
this.language = "US";
this.changeLanguage('2')
} else {
this.language = "AR";
this.changeLanguage('1')
}
console.log("login page called...");
var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
if(previousLanguage){
this.currentLang = previousLanguage =='en' ? 2 : 1;
}else{
document.getElementById('lang').lang = 'en';
TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
this.currentLang =2;
};
this.events.subscribe('user', user => { this.user = user; });
this.deviceToken = this.cs.getDeviceToken();
if (this.deviceToken) {
@ -139,25 +157,31 @@ export class LoginComponent implements OnInit, OnDestroy {
this.backClicked();
}
start() {
this.cs.startLoading();
}
ngAfterViewInit(){
}
public changeLanguage(langNumber) {
console.log("current lang: " + this.currentLang)
console.log("click lang: " + langNumber)
if (this.currentLang == langNumber) {
this.currentLang = langNumber;
return;
} else {
this.ts.switchLanguage();
// tslint:disable-next-line: triple-equals
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
this.language = 'US';
} else {
this.language = 'AR';
}
this.currentLang = TranslatorService.getCurrentLanguageCode();
}
this.currentLang = langNumber;
document.getElementById('lang').lang = this.currentLang == 1 ? 'ar' : 'en';
}
public forgetPasswordPage() {
@ -340,6 +364,14 @@ export class LoginComponent implements OnInit, OnDestroy {
if (anotherUser) {
this.username = '';
this.password = '';
var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
if(previousLanguage){
this.currentLang = previousLanguage =='en' ? 2 : 1;
}else{
document.getElementById('lang').lang = 'en';
TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
this.currentLang =2;
};
}
console.log('login emit');
console.log('login');
@ -350,6 +382,14 @@ export class LoginComponent implements OnInit, OnDestroy {
loginWithUser() {
console.log('loginWithUser');
var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
if(previousLanguage){
this.currentLang = previousLanguage =='en' ? 2 : 1;
}else{
document.getElementById('lang').lang = 'en';
TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
this.currentLang =2;
};
this.cs.openConfirmLoginPage();
}

@ -5,7 +5,7 @@
<app-generic-header
showBack="true"
[moeImage]="false"
[headerText]="'verificationcode,verificationcode' | translate">
</app-generic-header>

@ -56,8 +56,9 @@ ion-input {
outline: none;
width: 20%;
transition: all .2s ease-in-out;
border-radius: 3px;
border-radius: 15px;
display: inline-block;
--padding-start: 8px;
&:focus {
border-color: var(--ion-color-secondary) !important;

@ -24,7 +24,7 @@ import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/
import * as moment from 'moment';
import { NFC } from "@ionic-native/nfc/ngx";
// import { NFC } from "@ionic-native/nfc/ngx";
import { SmsRetriever } from '@ionic-native/sms-retriever/ngx';
@ -125,7 +125,7 @@ export class SmsPageComponent implements OnInit {
public platform: Platform,
private nfc: NFC,
// private nfc: NFC,
private smsRetriever: SmsRetriever
@ -367,33 +367,33 @@ export class SmsPageComponent implements OnInit {
async checkNFCStatus() {
try {
// try {
let nfcStatus = await this.nfc.enabled();
// let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus);
// console.log("nfc status >>>>>>>>>>" + nfcStatus);
this.isNFCAvailable = true;
// this.isNFCAvailable = true;
} catch (err) {
// } catch (err) {
console.log("Error reading tag", err);
// console.log("Error reading tag", err);
if (err === "NO_NFC") {
// if (err === "NO_NFC") {
this.isNFCAvailable = false;
// this.isNFCAvailable = false;
} else if (err === "NFC_DISABLED") {
// } else if (err === "NFC_DISABLED") {
this.isNFCAvailable = true;
// this.isNFCAvailable = true;
} else {
// } else {
this.isNFCAvailable = false;
// this.isNFCAvailable = false;
}
// }
}
// }
}
@ -421,7 +421,7 @@ export class SmsPageComponent implements OnInit {
if (this.common.validResponse(result)) {
this.common.sharedService.setSharedData(result.MemberLoginList.P_ORACLE_USER_NAME, 'oracle-user-name')
//save business card info

@ -1,9 +1,43 @@
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
ion-label {
color: var(--customnavy) !important;
}
.daynamicForm-Label {
font-size: 16px;
color: #a2a5a6 !important;
display: block;
overflow: hidden;
-webkit-flex: 1;
flex: 1;
font-size: inherit;
white-space: normal;
padding: 5px 0px;
margin: 10px auto;
padding-left: 10px;
}
.header-toolbar-new{
--background: #BE332F;
}
.addEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #BE332F;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}
ion-label {
color: var(--customnavy) !important;

@ -177,7 +177,8 @@ export class AddCeiComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){// profile/ sql
// this.textInput = new TextInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
@ -192,7 +193,8 @@ export class AddCeiComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){
// this.numberInput = new NumberInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
@ -214,7 +216,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.dateInput = new DateInput(
@ -225,7 +228,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -251,7 +255,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.datetimeInput = new DateTimeInput(
@ -262,7 +267,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
const elem = document.getElementById(
@ -297,7 +303,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.timeInput = new TimeInput(
@ -308,7 +315,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
}
@ -322,7 +330,8 @@ export class AddCeiComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else {
// dropdown list missing open in differnt page
@ -335,7 +344,8 @@ export class AddCeiComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else{
// this.selectInput = new SelectInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"",containerId,feildsList[i].MOBILE_ENABLED);

@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild, ElementRef } from "@angular/core";
import { MenuEntry } from "src/app/hmg-common/services/menu/models/menu.entry";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { EitRequest } from "../models/eit.request";
import { ModalController } from "@ionic/angular";
import { ModalController, Platform } from "@ionic/angular";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { EITTransactionsRequest } from "../models/EITTransactionsReq";
import { EitService } from "../services/eit.service";
@ -73,7 +73,8 @@ export class AddEitComponent implements OnInit {
public cs: CommonService,
private ts: TranslatorService,
private eitService: EitService,
public datePicker: DatePicker
public datePicker: DatePicker,
public platform: Platform
) {
this.direction = TranslatorService.getCurrentLanguageName();
this.selEmp = this.cs.sharedService.getSharedData(
@ -122,6 +123,10 @@ export class AddEitComponent implements OnInit {
EITTransactionsRequest.SUBMIT_EIT_ACTION
);
}
// window.addEventListener('keyboardDidShow', () => {
// document.activeElement.scrollIntoView(false);
// });
}
ngOnInit() {}
@ -181,7 +186,8 @@ export class AddEitComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){// profile/ sql
// this.textInput = new TextInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
@ -196,7 +202,8 @@ export class AddEitComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){
// this.numberInput = new NumberInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
@ -218,7 +225,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.dateInput = new DateInput(
@ -229,7 +237,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP,
);
}
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -255,7 +264,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.datetimeInput = new DateTimeInput(
@ -266,7 +276,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
const elem = document.getElementById(
@ -301,7 +312,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.timeInput = new TimeInput(
@ -312,7 +324,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
}
@ -326,7 +339,8 @@ export class AddEitComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else {
// dropdown list missing open in differnt page
@ -339,7 +353,8 @@ export class AddEitComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else{
// this.selectInput = new SelectInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"",containerId,feildsList[i].MOBILE_ENABLED);
@ -391,6 +406,8 @@ export class AddEitComponent implements OnInit {
if (this.validateEitObj && this.validateEitObj.length > 0) {
this.fillEITStructure();
}
this.bindToolTip();
}
addFieldToDOM(
@ -530,7 +547,18 @@ export class AddEitComponent implements OnInit {
}
}
bindToolTip () {
const toolTips = Array.from(document.getElementsByClassName('toolTip'));
toolTips.forEach(toolTip => {
toolTip.addEventListener('click', e => {
const toolTipData = toolTip.getAttribute("data-tooltip");
this.cs.yellowToast(toolTipData);
});
});
}
bindHtmlElemEvents(id, obj) {
const isIOS = this.platform.is('ios');
const elem = document.getElementById(id);
console.log(elem);
console.log(obj);
@ -540,6 +568,18 @@ export class AddEitComponent implements OnInit {
if (elemType == "SELECT") changeEvent = "change";
try {
if (isIOS && (obj.FORMAT_TYPE == "N" || obj.FORMAT_TYPE == "C")) {
elem.addEventListener("ionFocus", event => {
setTimeout(()=>{
console.log(event.target as Element);
var e = event.target as Element;
e.scrollIntoView(true);
},1000)
})
}
// elem.addEventListener("change", (e) => {
elem.addEventListener(changeEvent, e => {
//console.log("elem change "+elem.id);
@ -548,6 +588,13 @@ export class AddEitComponent implements OnInit {
// if(!x.value)
// isEmpty=true;
//emptyChildElement
if (obj.FORMAT_TYPE == "N") {
const maxSize = obj.MAXIMUM_SIZE;
const value = (document.getElementById(obj.APPLICATION_COLUMN_NAME) as HTMLInputElement).value;
(document.getElementById(obj.APPLICATION_COLUMN_NAME) as HTMLInputElement).value = value.length > maxSize ? value.substring(0, maxSize) : value;
}
elem.classList.remove("requiredClassElm");
if (
obj.CHILD_SEGMENTS_VS_Splited &&
@ -1231,6 +1278,7 @@ export class AddEitComponent implements OnInit {
}
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !elemVal) {
elem.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg();
return false;
} else {
@ -1269,6 +1317,7 @@ export class AddEitComponent implements OnInit {
}
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !varcharValue) {
x.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg();
return false;
} else {
@ -1300,6 +1349,7 @@ export class AddEitComponent implements OnInit {
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) {
x.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg();
return false;
} else {

@ -347,4 +347,4 @@ h4 {
border-radius: 16px !important;
--border-radius: 16px !important;
--box-shadow: none;
}
}

@ -272,4 +272,4 @@
font-weight: bold;
font-size: 16px;
text-align: left;
}
}

@ -1,9 +1,14 @@
<ion-header>
<!-- <ion-header>
<ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons>
<ion-title [ngClass]=" direction === 'en' ? 'title' : 'title-ar'" color="light">{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
</ion-header> -->
<app-generic-header
[showBack]="true"
[headerText]="headerTitle">
</app-generic-header>
<ion-content>
@ -11,10 +16,14 @@
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" [ngClass]=" direction === 'en' ? 'approvalTitle' : 'approvalTitle-ar'" >{{'general, addAttach' | translate}} <span *ngIf="isAttachment ==='Y'">*</span></div>
<div style="position: relative" size="10" [ngClass]=" direction === 'en' ? 'approvalTitle' : 'approvalTitle-ar'" >
{{'general, addAttach' | translate}}
<span *ngIf="isAttachment =='Y' || isAttachmentGET_MENU === 'Y'">*</span>
<div *ngIf="selMenu.GetMenuEntriesList.REQ_ATTACHMENT_TIP" (click)="showToolTip(selMenu.GetMenuEntriesList.REQ_ATTACHMENT_TIP)" class='toolTip-inside'><ion-icon style='font-size: 20px' name='information-circle-outline'></ion-icon> </div>
</div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
<div [ngClass]=" direction === 'en' ? 'fileDiv-en' : 'fileDiv-ar'">
<input end class="inputfile" style="margin-top: 10px;z-index: 99999;position: absolute;opacity: 0;" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" (click)="onFileSelectedclick($event)" />
<label end for="file" class="attachLable">

@ -272,4 +272,13 @@
font-weight: bold;
font-size: 16px;
text-align: left;
}
}
.fileDiv-en {
// float: right;
}
.fileDiv-ar {
float: left;
}

@ -62,7 +62,8 @@ export class ConfirmAddEitComponent implements OnInit {
indexLastObj: any = 0;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
direction: string;
isAttachment: string;
isAttachment: string = 'N';
isAttachmentGET_MENU: string = 'N';
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.direction = TranslatorService.getCurrentLanguageName()
@ -78,7 +79,7 @@ export class ConfirmAddEitComponent implements OnInit {
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false);
this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit;
this.isAttachment = this.selMenu.GetMenuEntriesList.ATTACHMENT_REQUIRED;
this.isAttachmentGET_MENU = this.selMenu.GetMenuEntriesList.ATTACHMENT_REQUIRED;
if (this.isResubmitEIT) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING **
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
@ -102,7 +103,7 @@ export class ConfirmAddEitComponent implements OnInit {
this.itemKey = this.addrespList.SubmitEITTransactionList.P_ITEM_KEY;
this.P_TransactionID = this.addrespList.SubmitEITTransactionList.P_TRANSACTION_ID;
this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete;
this.isAttachment = this.addrespList.SubmitEITTransactionList.P_ATTACHMENT_REQUIRED;
this.getApproversList();
// this.confirmAddEit.submitEit(this.eitRequest).subscribe((result: AddEitResponse) => {
@ -569,5 +570,9 @@ export class ConfirmAddEitComponent implements OnInit {
// }
showToolTip(toolTip: any) {
this.cs.yellowToast(toolTip);
}
}

@ -181,6 +181,9 @@
</ion-row>
<h4> {{'general, noData' | translate}}</h4>
</div>
<div class="terms" *ngIf="getPassMnuEntryObj.REQ_TIP && getResEITTransactionList[0]?.Collection_Transaction">
<p>{{getPassMnuEntryObj.REQ_TIP}}</p>
</div>
<!-- <no-data *ngIf="!getResEITTransactionList || getResEITTransactionList[0]?.Collection_Transaction.length <= 0" txt="{{'general.noData' | translate}}"></no-data> -->
<div *ngIf="getResEITTransactionList && getResEITTransactionList[0]?.Collection_Transaction.length > 0 ">
<!-- <div> -->
@ -200,17 +203,20 @@
<ion-grid>
<div>
<!-- <ion-row>
<!-- <div>
<ion-row>
<ion-col class="colBold">
<label for="">status</label>
</ion-col>
<ion-col>
<label for="">{{EITTransactionList.status}}</label>
</ion-col>
</ion-row> -->
</div>
</ion-row>
</div> -->
<ion-grid class="grids">
<ion-col size="2" *ngIf="getPassMnuEntryObj.UPDATE_BUTTON == 'Y'" (click)="updateEITRrq(i)" >
<img [ngClass]="direction == 'en' ? 'icon-img':'icon-img-ar' " src="../assets/imgs/profile-icons/editing@2x.png" >
</ion-col>
<div *ngFor="let item of EITTransactionList.Collection_Transaction">
<!-- <ion-row *ngIf="item.DISPLAY_FLAG != 'N' ">
<ion-col class="colBold">
@ -223,7 +229,7 @@
<ion-row *ngIf="item.DISPLAY_FLAG != 'N' " class="">
<ion-col class="" *ngIf="item.SEGMENT_PROMPT!=''">
<label style="color:#BE332F;font-weight: bold;" class="label" for="">{{item.SEGMENT_PROMPT}} </label>
<label style="color:#024d71;font-weight: bold;" class="label" for="">{{item.SEGMENT_PROMPT}} </label>
<br>
<label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label>
<br>
@ -246,7 +252,7 @@
</ion-infinite-scroll>
</div>
</ion-content>
<ion-icon class="addClass" name="add" (click)="addEITRrq()"></ion-icon>
<ion-icon *ngIf="addButton == 'Y'" class="addClass" name="add" (click)="addEITRrq()"></ion-icon>
<!-- <ion-footer>
<div class="centerDiv"> -->

@ -81,34 +81,34 @@ h4 {
margin-bottom: -28px;
}
.header-toolbar-new {
.header-toolbar-new{
--background: #BE332F;
}
.addClass {
.addClass{
background-color: #BE332F;
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 5%;
border-radius: 50%;
z-index: 999;
-webkit-box-shadow: 2px -1px 13px 0px rgba(0, 0, 0, 0.59);
-moz-box-shadow: 2px -1px 13px 0px rgba(0, 0, 0, 0.59);
box-shadow: 2px -1px 13px 0px rgba(0, 0, 0, 0.59);
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 5%;
border-radius: 50%;
z-index: 999;
-webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
-moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
}
.contentEit:before {
position: absolute;
content: "";
// background: #BE332F;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
content: "";
// background: #024d71;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.hrClass {
@ -122,13 +122,13 @@ h4 {
////////////////////////////////
.content:before {
position: absolute;
content: "";
background: #BE332F;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
content: "";
background: #BE332F;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
@ -349,4 +349,4 @@ h4 {
display: inline-block;
margin-right: 1px;
margin-left: 5px;
}
}

@ -49,6 +49,7 @@ export class EitListComponent implements OnInit {
accrualNetInfants: any;
accrualUNetChild: any;
accrualNetAdult: any;
addButton: string = 'Y';
public options = {
cutoutPercentage: 80,
@ -81,6 +82,7 @@ export class EitListComponent implements OnInit {
ngOnInit() {
/////////////
this.addButton = this.selMenu.GetMenuEntriesList.ADD_BUTTON;
this.Sdate = new Date().toISOString();
this.getUserDetails();
////////////////up
@ -229,9 +231,6 @@ export class EitListComponent implements OnInit {
this.pAction = EIT_ACTION.UPDATE;
this.cs.sharedService.setSharedData(this.getResEITTransactionList[i].Collection_Transaction, EITTransactionsRequest.SHARED_DATA);
this.cs.sharedService.setSharedData(this.pAction, EITTransactionsRequest.SUBMIT_EIT_ACTION);
// this.fillEitTransactionTable(i);
// this.navCtrl.push("AddEitPage");
// this.openEit(i);
this.openEitNew(i);
}
deleteEIT(i) {

@ -1,25 +1,25 @@
<ion-header>
<ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons>
<ion-title color="light">{{'eit, update-title' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<app-generic-header
showBack="true"
[headerText]="'eit, update-title' | translate">
</app-generic-header>
<ion-content padding>
<!-- <button ion-button (click)="resubmitEit()">next</button> -->
<div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes; let i=index ">
<ion-card-header class="hrTitle">
<ion-card-header class="hrTitle" style="background: #024d71;">
<div class="hrTitle">{{'worklistMain, notfDetails' | translate}} </div>
<!-- <button ion-button icon-only *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<ion-icon name="create"></ion-icon>
</button> -->
<div class="editIconDiv"><button ion-button *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<img class="imgSize" src="../assets/imgs/edit.png"></button>
<div [ngClass]=" direction === 'en' ? 'editIconDiv' : 'editIconDiv-ar'"><button style="background: #024d71;" ion-button *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<img class="imgSize" src="../assets/imgs/profile-icons/editingWhite.png"></button>
</div>
</ion-card-header>

@ -1,19 +1,25 @@
.addEitOkButton {
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #BE332F;
width: 80% !important;
color: white !important;
border-radius: 16px !important;
--border-radius: 16px !important;
--box-shadow: none;
}
.addEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #BE332F;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}
.editIconDiv {
right: 10px;
position: absolute;
top: 10px;
}
.editIconDiv{
right: 10px;
position: absolute;
top: 10px;
}
.editIconDiv-ar{
left: 10px;
position: absolute;
top: 10px;
}

@ -5,6 +5,7 @@ import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes';
import { EitService } from '../services/eit.service';
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
@Component({
selector: 'app-eit-update-list',
@ -23,8 +24,9 @@ export class EitUpdateListComponent implements OnInit {
private eitTransactionTbl: any = [];
private eitRequest: EitRequest;
private descFlex: string;
direction: string;
constructor(public cs: CommonService, public eitService: EitService, public modalController: ModalController) {
constructor(public cs: CommonService, public eitService: EitService, public modalController: ModalController, private ts: TranslatorService) {
this.notificationBodyRes = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, false);
let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);
this.itemKey = notification.ITEM_KEY;
@ -32,6 +34,7 @@ export class EitUpdateListComponent implements OnInit {
this.functionName = notification.FUNCTION_NAME;
this.selEmp = notification.SELECTED_EMPLOYEE_NUMBER;
this.descFlex = notification.DESC_FLEX_CONTEXT_CODE;
this.direction = TranslatorService.getCurrentLanguageName();
this.fillEitTransactionTable();
}
@ -67,12 +70,13 @@ export class EitUpdateListComponent implements OnInit {
}
updateTransactionList(list) {
list.forEach(element => {
const index = this.eitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
if (index != -1)
this.eitTransactionTbl.splice(index, 1);
});
this.eitTransactionTbl = this.eitTransactionTbl ? this.eitTransactionTbl.concat(list) : list;
// list.forEach(element => {
// const index = this.eitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
// if (index != -1)
// this.eitTransactionTbl.splice(index, 1);
// });
// this.eitTransactionTbl = this.eitTransactionTbl ? this.eitTransactionTbl.concat(list) : list;
this.eitTransactionTbl = list;
}
resubmitEit() {

@ -21,7 +21,7 @@ import { TranslatePipe } from './pipes/translate/translate.pipe';
import { DatePipeTransform } from './pipes/date/date.pipe';
import { AlertControllerService } from './ui/alert/alert-controller.service';
import { DateTimePipe } from './pipes/date-time/date-time.pipe';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
// import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { LaunchNavigator } from '@ionic-native/launch-navigator/ngx';
import { SafeHtmlPipe } from './pipes/safe-html/safe-html.pipe';
import { BackButtonComponent } from './ui/back-button/back-button.component';
@ -78,7 +78,7 @@ import { RouterModule } from '@angular/router';
import { HeaderButtonComponent } from './ui/header-button/header-button.component';
import { AppRate } from '@ionic-native/app-rate/ngx';
import { RatingService } from './services/rating/rating.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
// import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service';
import { MenuService } from './services/menu/menuservice.service';
import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component';
@ -99,7 +99,7 @@ import { ConfirmLoginComponent } from '../authentication/confirm-login/confirm-l
import { WelcomeComponent } from './ui/welcome-login/welcome.component'
import { FabButtonComponent } from './ui/fab-button/fab-button.component'
import { AttendScanService } from './services/attend-services/attend-scan.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { NgCircleProgressModule } from 'ng-circle-progress';
import { CardFilterComponent } from './ui/card-filter/card-filter.component';
import { EmployeeInformationComponent } from './ui/employee-information/employee-information.component';
@ -108,7 +108,7 @@ import { NgCalendarModule } from 'ionic2-calendar';
import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component';
import { ChartModule } from 'primeng/chart';
import { GenericHeaderComponent } from './ui/generic-header/generic-header.component';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { AttendanceOptionsComponent } from '../home/attendance-options/attendance-options.component';
import { CardCalendarComponent } from './ui/card-calendar/card-calendar.component';
import { WorklistSettingComponent } from '../notification/worklist-setting/worklist-setting.component';
@ -287,7 +287,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
Globalization,
SharedDataService,
AlertControllerService,
ThemeableBrowser,
// ThemeableBrowser,
LaunchNavigator,
ProjectsService,
NationalityService,
@ -309,14 +309,14 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
Diagnostic,
AppRate,
RatingService,
InAppBrowser,
// InAppBrowser,
RateService,
Camera,
File,
MenuService,
OpenNativeSettings,
BarcodeScanner,
BackgroundGeolocation,
// BarcodeScanner,
// BackgroundGeolocation,
FileOpener,
FilePath,
FileChooser,

@ -1,9 +1,9 @@
import { Injectable } from "@angular/core";
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service';
import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
import { Platform } from "@ionic/angular";
declare const cordova: any;
@ -13,10 +13,10 @@ declare const cordova: any;
})
export class HMGUtils {
constructor(
public backgroundGeolocation: BackgroundGeolocation,
// public backgroundGeolocation: BackgroundGeolocation,
public common: CommonService,
public ts: TranslatorService,
private geolocation: Geolocation,
// private geolocation: Geolocation,
public platform: Platform,
public devicePermissionsService:DevicePermissionsService,
) { }
@ -98,32 +98,32 @@ export class HMGUtils {
}
private getGMSLocation(callBack: Function) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) {
const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled;
const lat = resp.latitude;
const long = resp.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation})
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
// this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
// if (resp && (resp.latitude && resp.longitude)) {
// const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled;
// const lat = resp.latitude;
// const long = resp.longitude;
// callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation})
// } else {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// }
// }, (error) => {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// });
}
private getIOSLocation(callBack: Function) {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) {
const lat = resp.coords.latitude;
const long = resp.coords.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":false})
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
// this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
// if (resp && resp.coords.latitude && resp.coords.longitude) {
// const lat = resp.coords.latitude;
// const long = resp.coords.longitude;
// callBack({"latitude":lat, "longitude":long, "isfake":false})
// } else {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// }
// }).catch(error => {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// });
}

@ -2,10 +2,10 @@ import { Injectable } from '@angular/core';
// import { DevicePermissionsService } from '../device-permissions/device-permissions.service';
import { DomSanitizer } from '@angular/platform-browser';
import { SharedDataService } from '../shared-data-service/shared-data.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { AttendanceService } from 'src/app/home/services/attendance.services';
import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { ZBar } from '@ionic-native/zbar/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
import { AuthenticatedUser } from '../authentication/models/authenticated-user';
import { CommonService } from '../common/common.service';
@ -14,7 +14,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service';
import { Device } from '@ionic-native/device/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { Platform } from '@ionic/angular';
import { ModalController } from '@ionic/angular';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
@ -37,17 +37,17 @@ export class AttendScanService {
public collection = 'CS';
constructor(private device: Device,
private zbar: ZBar,
private geolocation: Geolocation,
// private zbar: ZBar,
// private geolocation: Geolocation,
private attendance_service: AttendanceService,
private barcodeScanner: BarcodeScanner,
// private barcodeScanner: BarcodeScanner,
private cameraController: Camera,
public sharedData: SharedDataService,
private sanitizer: DomSanitizer,
private permissions: DevicePermissionsService,
public common: CommonService,
public ts: TranslatorService,
public backgroundGeolocation: BackgroundGeolocation,
// public backgroundGeolocation: BackgroundGeolocation,
public platform: Platform,
public modalController: ModalController,
public firebasex: FirebaseX,
@ -135,22 +135,22 @@ export class AttendScanService {
}
scanCode() {
this.barcodeScanner
.scan()
.then(barcodeData => {
if (!barcodeData.cancelled) {
this.scannedResult = barcodeData;
this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance();
} else {
this.swipeAttendance();
}
}
})
.catch(err => {
console.log('Error', err);
});
// this.barcodeScanner
// .scan()
// .then(barcodeData => {
// if (!barcodeData.cancelled) {
// this.scannedResult = barcodeData;
// this.deviceID = this.device.uuid;
// if (this.isFakeLocationUsed) {
// this.fakeSwipeAttendance();
// } else {
// this.swipeAttendance();
// }
// }
// })
// .catch(err => {
// console.log('Error', err);
// });
}
fakeSwipeAttendance() {

@ -107,14 +107,15 @@ export class AuthenticationService {
this.setPublicFields(request);
const user = this.getAuthenticatedUser();
if (user) {
const oracleUserName = this.cs.sharedService.getSharedData('oracle-user-name', false);
if (user && oracleUserName) {
const userName = this.cs.sharedService.getSharedData(LoginRequest.SHARED_DATA, false);
request.P_SESSION_ID = user.P_SESSION_ID;
request.MobileNumber = user.EMPLOYEE_MOBILE_NUMBER;
request.LogInTokenID = user.LogInTokenID;
request.TokenID = user.TokenID;
request.P_USER_NAME = userName; // '1100313582' ALWAYS USER NAME
request.UserName = userName; // '1100313582'
request.P_USER_NAME = oracleUserName; // '1100313582' ALWAYS USER NAME
request.UserName = oracleUserName; // '1100313582'
request.P_EMAIL_ADDRESS = user.EMPLOYEE_EMAIL_ADDRESS;
if (AuthenticationService.requireRelogin) {
this.sessionTimeOutDialog();
@ -146,7 +147,7 @@ export class AuthenticationService {
} else {
mobileType = 'android';
}
request.VersionID = 3.7;
request.VersionID = 1.0;
request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType;
@ -586,6 +587,7 @@ export class AuthenticationService {
// tslint:disable-next-line: max-line-length
public insertMobileLoginInfo(request: GetLoginInfoRequest, onError: any, errorLabel: string, isPostNoLoad = false): Observable<GetLoginInfoResponse> {
this.authenticateRequest(request);
request.UserName = localStorage.getItem("user");
if (isPostNoLoad) {
return this.con.postNoLoad(AuthenticationService.insertMobileLoginInfo, request, onError, errorLabel);
} else {

@ -3,6 +3,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { AuthenticatedUser } from './authenticated-user';
import { PrivilageModel } from './privilage-model';
export class SMSCheckResponse extends Response {
MemberLoginList: any = {};
BasicMemberInformation: any = {};
AuthenticationTokenID: string;
MemberInformationList:AuthenticatedUser[];

@ -13,7 +13,7 @@ import { AlertControllerService } from '../../ui/alert/alert-controller.service'
//import { Response } from "../models/response";
import { Response } from 'src/app/hmg-common/services/models/response';
import { Location, DatePipe } from '@angular/common';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
// import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { BrowserConfig } from './models/browser-config';
import {
LaunchNavigator,
@ -26,7 +26,7 @@ import { SharedDataService } from '../shared-data-service/shared-data.service';
import { Badge } from '@ionic-native/badge/ngx';
import { LifeCycleService } from '../life-cycle/life-cycle.service';
import { Diagnostic } from '@ionic-native/diagnostic/ngx';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
// import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
@Injectable({
providedIn: 'root'
@ -105,7 +105,7 @@ export class CommonService {
public toastController: ToastController,
public alertController: AlertControllerService,
public alertControllerIonic: AlertController,
public themeableBrowser: ThemeableBrowser,
// public themeableBrowser: ThemeableBrowser,
public launchNavigation: LaunchNavigator,
public platform: Platform,
public device: Device,
@ -113,7 +113,7 @@ export class CommonService {
public badge: Badge,
public lifeCycle: LifeCycleService,
public diagnostic: Diagnostic,
public iab: InAppBrowser,
// public iab: InAppBrowser,
private menu: MenuController,
) { }
@ -243,6 +243,19 @@ export class CommonService {
});
toast.present();
}
async yellowToast(message: string) {
const toast = await this.toastController.create({
message: message,
showCloseButton: true,
position: 'top',
duration: 3000,
color: 'warning',
closeButtonText: this.ts.trPK('general', 'close')
});
toast.present();
}
async greenToast(message: string) {
const toast = await this.toastController.create({
message: message,
@ -683,52 +696,52 @@ export class CommonService {
onSuccess?,
successURLS?: string[]
) {
this.platform.ready().then(() => {
const browser = this.iab.create(
url,
'_blank',
'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
);
// browser.executeScript(...);
// browser.insertCSS(...);
browser.on('loaderror').subscribe(event => {
if (onFaild) {
onFaild();
}
browser.close();
});
/*
browser.on('loadstop').subscribe(event => {
// browser.insertCSS({ code: 'body{color: white;}' });
if (onSuccess) {
onSuccess();
}
});
*/
browser.on('exit').subscribe(event => {
if (onExit) {
onExit();
}
});
browser.on('loadstart').subscribe(event => {
if (successURLS) {
successURLS.forEach((successURL, index) => {
if (event.url && event.url.indexOf(successURL) >= 0) {
// alert('load start found success url');
browser.close();
if (onSuccess) {
onSuccess();
}
}
});
}
});
});
// this.platform.ready().then(() => {
// const browser = this.iab.create(
// url,
// '_blank',
// 'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
// );
// // browser.executeScript(...);
// // browser.insertCSS(...);
// browser.on('loaderror').subscribe(event => {
// if (onFaild) {
// onFaild();
// }
// browser.close();
// });
// /*
// browser.on('loadstop').subscribe(event => {
// // browser.insertCSS({ code: 'body{color: white;}' });
// if (onSuccess) {
// onSuccess();
// }
// });
// */
// browser.on('exit').subscribe(event => {
// if (onExit) {
// onExit();
// }
// });
// browser.on('loadstart').subscribe(event => {
// if (successURLS) {
// successURLS.forEach((successURL, index) => {
// if (event.url && event.url.indexOf(successURL) >= 0) {
// // alert('load start found success url');
// browser.close();
// if (onSuccess) {
// onSuccess();
// }
// }
// });
// }
// });
// });
}
public imageFromBase64(base64: string) {
@ -1192,7 +1205,6 @@ export class CommonService {
this.nav.navigateForward(['/eit/homepage']);
}
public openMyTeamPage() {
console.log('someeeeeeee');
this.nav.navigateForward(['/my-team/home']);
}
public openMyTeamDetailPage() {
@ -1350,9 +1362,13 @@ export class CommonService {
public openAnnouncement() {
this.nav.navigateForward(['/backend-integrations/announcement']);
}
public openConcurrentReport() {
this.nav.navigateForward(['/reports/concurrent-report']);
public openConcurrentReport(value: boolean) {
const navigationExtras: NavigationExtras = {
queryParams: {
fromHome: value
}
};
this.nav.navigateForward(['/reports/concurrent-report'], navigationExtras);
}
public openConcurrentTransaction() {
@ -1600,9 +1616,14 @@ export class CommonService {
}
public setFilterValues(data) {
for (const notification of data) {
this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER
if (data.length > 0) {
for (const notification of data) {
this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER
}
} else {
this.filterKeys['HRSSA'] = 0;
}
}

@ -1,64 +1,64 @@
import { ThemeableBrowserOptions } from '@ionic-native/themeable-browser/ngx';
// import { ThemeableBrowserOptions } from '@ionic-native/themeable-browser/ngx';
export class BrowserConfig {
public static OPTIONS: ThemeableBrowserOptions = {
statusbar: {
color: '#ffffffff'
},
toolbar: {
height: 44,
color: '#f0f0f0ff'
},
title: {
color: '#003264ff',
showPageTitle: true
},
backButton: {
image: 'back',
imagePressed: 'back_pressed',
align: 'left',
event: 'backPressed'
},
forwardButton: {
image: 'forward',
imagePressed: 'forward_pressed',
align: 'left',
event: 'forwardPressed'
},
closeButton: {
image: 'close',
imagePressed: 'close_pressed',
align: 'left',
event: 'closePressed'
},
customButtons: [
{
image: 'share',
imagePressed: 'share_pressed',
align: 'right',
event: 'sharePressed'
}
],
menu: {
image: 'menu',
imagePressed: 'menu_pressed',
title: 'Test',
cancel: 'Cancel',
align: 'right',
items: [
{
event: 'helloPressed',
label: 'Hello World!'
},
{
event: 'testPressed',
label: 'Test!'
}
]
},
backButtonCanClose: true,
clearcache: true,
clearsessioncache: true,
disallowoverscroll: 'yes'
};
// public static OPTIONS: ThemeableBrowserOptions = {
// statusbar: {
// color: '#ffffffff'
// },
// toolbar: {
// height: 44,
// color: '#f0f0f0ff'
// },
// title: {
// color: '#003264ff',
// showPageTitle: true
// },
// backButton: {
// image: 'back',
// imagePressed: 'back_pressed',
// align: 'left',
// event: 'backPressed'
// },
// forwardButton: {
// image: 'forward',
// imagePressed: 'forward_pressed',
// align: 'left',
// event: 'forwardPressed'
// },
// closeButton: {
// image: 'close',
// imagePressed: 'close_pressed',
// align: 'left',
// event: 'closePressed'
// },
// customButtons: [
// {
// image: 'share',
// imagePressed: 'share_pressed',
// align: 'right',
// event: 'sharePressed'
// }
// ],
// menu: {
// image: 'menu',
// imagePressed: 'menu_pressed',
// title: 'Test',
// cancel: 'Cancel',
// align: 'right',
// items: [
// {
// event: 'helloPressed',
// label: 'Hello World!'
// },
// {
// event: 'testPressed',
// label: 'Test!'
// }
// ]
// },
// backButtonCanClose: true,
// clearcache: true,
// clearsessioncache: true,
// disallowoverscroll: 'yes'
// };
}

@ -1,74 +1,74 @@
import { Injectable } from '@angular/core';
import { ThemeableBrowser, ThemeableBrowserOptions, ThemeableBrowserObject } from '@ionic-native/themeable-browser/ngx';
// import { ThemeableBrowser, ThemeableBrowserOptions, ThemeableBrowserObject } from '@ionic-native/themeable-browser/ngx';
import { Platform } from '@ionic/angular';
@Injectable({
providedIn: 'root'
})
export class HmgBrowserService {
static options: ThemeableBrowserOptions = {
statusbar: {
color: '#ffffffff'
},
toolbar: {
height: 44,
color: '#f0f0f0ff'
},
title: {
color: '#60686b',
showPageTitle: true
},
backButton: {
image: 'back',
imagePressed: 'back_pressed',
align: 'left',
event: 'backPressed'
},
forwardButton: {
image: 'forward',
imagePressed: 'forward_pressed',
align: 'left',
event: 'forwardPressed'
},
closeButton: {
image: 'close',
imagePressed: 'close_pressed',
align: 'left',
event: 'closePressed'
},
/*
customButtons: [
{
image: 'share',
imagePressed: 'share_pressed',
align: 'right',
event: 'sharePressed'
}
],
menu: {
image: 'menu',
imagePressed: 'menu_pressed',
title: 'Test',
cancel: 'Cancel',
align: 'right',
items: [
{
event: 'helloPressed',
label: 'Hello World!'
},
{
event: 'testPressed',
label: 'Test!'
}
]
},
*/
backButtonCanClose: true
};
// static options: ThemeableBrowserOptions = {
// statusbar: {
// color: '#ffffffff'
// },
// toolbar: {
// height: 44,
// color: '#f0f0f0ff'
// },
// title: {
// color: '#60686b',
// showPageTitle: true
// },
// backButton: {
// image: 'back',
// imagePressed: 'back_pressed',
// align: 'left',
// event: 'backPressed'
// },
// forwardButton: {
// image: 'forward',
// imagePressed: 'forward_pressed',
// align: 'left',
// event: 'forwardPressed'
// },
// closeButton: {
// image: 'close',
// imagePressed: 'close_pressed',
// align: 'left',
// event: 'closePressed'
// },
// /*
// customButtons: [
// {
// image: 'share',
// imagePressed: 'share_pressed',
// align: 'right',
// event: 'sharePressed'
// }
// ],
// menu: {
// image: 'menu',
// imagePressed: 'menu_pressed',
// title: 'Test',
// cancel: 'Cancel',
// align: 'right',
// items: [
// {
// event: 'helloPressed',
// label: 'Hello World!'
// },
// {
// event: 'testPressed',
// label: 'Test!'
// }
// ]
// },
// */
// backButtonCanClose: true
// };
private browser: ThemeableBrowserObject;
// private browser: ThemeableBrowserObject;
constructor(
private themeableBrowser: ThemeableBrowser,
// private themeableBrowser: ThemeableBrowser,
private platform: Platform
) { }
@ -81,18 +81,18 @@ export class HmgBrowserService {
}
private registerEvent(eventName: string, event: any) {
if (this.browser) {
this.browser.on(eventName).subscribe((data: any) => {
if (event) {
event();
}
});
}
// if (this.browser) {
// this.browser.on(eventName).subscribe((data: any) => {
// if (event) {
// event();
// }
// });
// }
}
public openURLThemable(url: string) {
this.platform.ready().then(() => {
this.browser = this.themeableBrowser.create(url, '_blank', HmgBrowserService.options);
// this.browser = this.themeableBrowser.create(url, '_blank', HmgBrowserService.options);
});
}

@ -11,4 +11,5 @@ export class MenuEntry {
public PROMPT: string;
public REQUEST_TYPE: string;
public ATTACHMENT_REQUIRED: string;
public REQ_ATTACHMENT_TIP: string;
}

@ -115,14 +115,18 @@ export class TranslatorService {
public loadResources(onSuccess: any) {
this.platform.ready().then(() => {
this.nativeStorage.getItem(TranslatorService.LNG_KEY).then((previousLanguage: string) => {
var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
if(previousLanguage){
// .then((previousLanguage: string) => {
TranslatorService.CURRENT_LANGUAGE = previousLanguage;
document.getElementById('lang').lang = previousLanguage;
this.loadTranslationAsset(onSuccess);
}, () => {
}else{
document.getElementById('lang').lang = 'en';
this.setCurrentLanguageToDefault();
this.loadTranslationAsset(onSuccess);
});
};
});
}
@ -179,18 +183,24 @@ export class TranslatorService {
public setCurrentLanguage(language: string) {
TranslatorService.CURRENT_LANGUAGE = language;
this.events.publish(TranslatorService.CHANGE_EVENT);
this.nativeStorage.setItem(TranslatorService.LNG_KEY, language).then(() => {
}, () => { });
localStorage.setItem(TranslatorService.LNG_KEY, language);
}
public switchLanguage() {
this.nativeStorage.getItem(TranslatorService.LNG_KEY).then((previousLanguage: string) => {
this.setCurrentLanguage(this.getNextLanguage(previousLanguage));
}, () => {
this.setCurrentLanguage(this.getNextLanguage(TranslatorService.CURRENT_LANGUAGE));
});
// this.nativeStorage.getItem(TranslatorService.LNG_KEY).then((previousLanguage: string) => {
var lang = localStorage.getItem(TranslatorService.LNG_KEY)
if(lang){
this.setCurrentLanguage(this.getNextLanguage(lang));
}else{
this.setCurrentLanguage(this.getNextLanguage(TranslatorService.CURRENT_LANGUAGE));
}
//}, () => {
// });
}
private getNextLanguage(currentLanguage: string) {

@ -3,12 +3,10 @@
margin-left: 2%;
margin-right: 2%;
height: 4cm;
box-shadow: 0px 0px 8px 2px #d5d5d5ab;
background: white;
margin-bottom: 0.3cm;
// border-color: #ececec;
border-style: solid;
border-width: 0.02cm;
border-radius: 30px !important;
border: 1.3px solid #8b8b8b;
}
// .custom-button:hover {
@ -19,7 +17,7 @@
.icon{
.icon {
margin-top: 0.7cm;
margin-left: 27%;
margin-right: 27%;

@ -1,7 +1,7 @@
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div>
<span *ngIf="text != 'All'" class="number-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{value}}</span>
<span class="text-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
<span class="text-span text-span-moe" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
</div>

@ -1,4 +1,5 @@
import { Component, OnInit, Input } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-card-filter',
@ -11,8 +12,16 @@ export class CardFilterComponent implements OnInit {
@Input() active: boolean;
@Input() color: string;
direction: string;
constructor() { }
ngOnInit() {}
ngOnInit() {
this.direction = TranslatorService.getCurrentLanguageName();
console.log(this.direction);
if (this.direction == 'ar') {
this.text = 'الموارد البشرية';
}
}
}

@ -111,4 +111,4 @@
--height: 12cm !important;
--width: 80% !important;
--border-radius: 0.4cm;
}
}

@ -1,186 +1,122 @@
.team-member-container{
// background: white;
// border-radius: 100px 20px 20px 100px;
// margin-top: 15px;
// font-family: WorkSans-Regular;
// border: 1px solid #ccc;
// border-radius: 15px;
// padding-bottom: 8px;
.team-member-container {
background: white;
/* margin-top: 2px; */
font-family: WorkSans-Regular;
border: 1px solid #ccc;
border-radius: 15px;
padding-bottom: 8px;
margin-bottom: 7px;
padding-bottom: 5px;
margin-bottom: 15px;
box-shadow: 0px 1px 5px #cdcdcd;
}
// .user-image-container{
// position: relative;
// width: 70px;
// height: 70px;
// display: block;
// margin: 0 auto;
// &:before{
// position: absolute;
// content: "";
// width: 20px;
// height: 20px;
// border-radius: 20px;
// border: 1px solid white;
// top: 0;
// right: 0;
// background-color: red;
// z-index: 9;
// }
// &.present:before{
// background-color: green !important;
// }
// }
.user-image{
// overflow: hidden;
// position: relative;
// display: block;
// width: 100%;
// height: 100%;
// border-radius: 80px;
// border: 1px solid #ccc;
// margin: 0px auto 6px;
.user-image {
img {
// width: 100%;
// max-height: 100%;
width: 74%;
max-height: 74%;
margin-top: 4px;
margin-left: 6px;
width: 60px;
height: 60px;
border-radius: 30px;
margin: 5px;
}
}
.employee-name{
.employee-name {
display: inline-block;
width: 80%;
.name{
// font-size: 16px;
// color: black;
// // margin: 0;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// margin-left: -10px;
// margin-top: -5px;
// font-family: 'WorkSans-Bold';
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: left;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
.name {
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: left;
font-weight: bold;
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
font-family: 'Inter' !important;
}
.title{
// font-size: 13px;
// color: #888;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// display: block;
// margin-left: -10px;
// margin-top: -6px;
// color: black;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
.title {
font-family: 'Inter' !important;
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
// overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
}
}
.employee-name-ar{
.employee-name-ar {
display: inline-block;
width: 80%;
.name{
// font-size: 16px;
// color: black;
// // margin: 0;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// margin-left: -10px;
// margin-top: -5px;
// font-family: 'WorkSans-Bold';
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: right;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
.name {
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: right;
font-family: 'Inter' !important;
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
font-weight: bold;
}
.title{
// font-size: 13px;
// color: #888;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// display: block;
// margin-left: -10px;
// margin-top: -6px;
// color: black;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
.title {
font-family: 'Inter' !important;
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
// overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
}
}
.image-container{
.image-container {
width: 20%;
display: inline-block;
text-align: center;
vertical-align: top;
margin-top: 5px;
position: relative;
top: 12px;
}
.swipe-information{
.swipe-information {
color: #888;
font-size: 12px;
border-top: 1px solid #ccc;
padding-top: 6px;
margin-top: 6px;
.check-in {
font-size: 12px;
margin-right: 15px;
margin-right: 15px;
}
}

@ -30,4 +30,4 @@
color: white !important;
width: 80px;
height: 71px;
}
}

@ -12,6 +12,11 @@
<img [src]="userImage"/>
</div>
</ion-col>
<ion-col *ngIf="!showImage && moeImage" [size]="2" style="padding: 0;">
<div class="profile-image-container">
<img src="../assets/icon/moe-logo.png"/>
</div>
</ion-col>
<!-- *ngIf="getPassdirfromNotifiPage == true" -->
<ion-col *ngIf="updateDirection" [size]="2" style="padding: 0;" (click)="closeModal()">
@ -19,7 +24,8 @@
<img style="
width: 20px;
height: 20px;
margin-top: 5px;"
position: absolute;
top: -30px;"
[src]="close"
/>
</div>

@ -13,6 +13,7 @@ import { TranslatorService } from '../../services/translator/translator.service'
styleUrls: ['./generic-header.component.scss'],
})
export class GenericHeaderComponent implements OnInit {
@Input() moeImage = true;
@Input() userImage = '';
@Input() showImage = false;
@Input() showMenu = false;

@ -1,24 +1,28 @@
.custom-button {
background: white;
margin-bottom: 0px;
border: 1px solid #ccc;
border-radius: 20px;
width: 100%;
max-width: 105px;
height: 100px;
padding: 10px;
min-width: 96px;
min-width: 100px;
margin-bottom: 5px;
box-shadow: 0px 0px 5px #00000029;
margin-top: 2px;
}
.iconBox {
display: block;
width: 100%;
position: static;
height: 40px;
}
.iconBox img{
margin: 0px auto 10px;
.iconBox img {
margin: 0px auto 10px !important;
display: block;
width: 35px;
height: 33px;
// max-width: 35%;
}
@ -26,10 +30,12 @@
display: block;
}
.pClass {
font-size: 9px;
font-size: 8px;
text-align: center;
margin-top: 10px;
color: black;
color: #004D71;
font-weight: bold;
letter-spacing: 0px;
}

@ -6,7 +6,7 @@
<ion-icon class="iconFab" name="finger-print"></ion-icon>
</div>
<div class="titleBox" [ngStyle]="link === '0' ? {'margin-left': '5px'} : {}">
<span>{{statsValue}}</span>
<span [ngStyle]="link === '4' ? {'visibility': 'hidden'} : {}">{{statsValue}}</span>
<p class="pClass" [ngStyle]="link === '0' ? {'width': '105%', 'margin-top': '12px'} : {}">{{returnTitle(title)}}</p>
</div>
</div>

@ -1,12 +1,15 @@
.custom-button {
box-shadow: 0px 0px 5px #00000029;
background: white;
margin-bottom: 0px;
border: 1px solid #ccc;
margin-bottom: 5px;
border-radius: 20px;
width: 200px;
max-width: 105px;
height: 160px;
padding: 10px;
@media screen and (min-width: 200px) and (max-width:300px) {
width: 80px;
}
}
.iconBox {
@ -19,7 +22,7 @@
// max-width: 45%;
// padding-bottom: 5px;
// padding-top: 5px;
display: block;
display: inline-block;
max-width: 67%;
padding-bottom: 9px;
padding-top: 5px;
@ -33,8 +36,8 @@
span {
font-size: 25px;
font-weight: bold;
color: black;
text-align: -webkit-auto;
color: #004D71;
text-align: center;
display: block;
}
}
@ -44,13 +47,23 @@ ion-app[dir="rtl"] .titleBox {
}
.pClass {
color: black;
width: 85%;
// color: #004D71;
// width: 85%;
// margin-top: 5px;
// font-weight: bold;
// text-align: -webkit-auto;
// display: block;
// font-size: 15px !important;
color: #004D71;
width: 100%;
margin-top: 5px;
font-weight: bold;
text-align: -webkit-auto;
text-align: center;
display: block;
font-size: 15px !important;
font-size: 14px !important;
letter-spacing: 0px;
}
.iconFab {

@ -1,4 +1,4 @@
<ion-content has-bouncing="false" class="ion-no-padding" >
<ion-content has-bouncing="false" class="ion-no-padding" style="position: inherit !important;">
<ion-grid padding>
<!-- <ion-row>
<ion-col [size]="12">
@ -13,7 +13,7 @@
<ion-row>
<ion-row style="margin-top: 50px;">
<ion-col [size]="12">
<h1 class="heading1">{{welcome}} </h1>
<p *ngIf="!user" class="text1">{{welcome_txt}} </p>

@ -67,6 +67,10 @@
line-height: 1.5;
}
.heading1{
font-size: 26px !important;
}
.button-digital-id{
--background: white !important;
background: white !important;

@ -1,5 +1,5 @@
import { Component, OnInit, NgZone, VERSION } from "@angular/core";
import { NFC } from "@ionic-native/nfc/ngx";
// import { NFC } from "@ionic-native/nfc/ngx";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { Platform } from "@ionic/angular";
import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service";
@ -13,11 +13,11 @@ import { attendanceSwipeScannerRequest } from "src/app/home/models/attendanceSwi
import { Device } from "@ionic-native/device/ngx";
import { AttendanceService } from "src/app/home/services/attendance.services";
import { Response } from "src/app/hmg-common/services/models/response";
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
// import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { HMGUtils } from 'src/app/hmg-common/hmg_utils';
@ -53,7 +53,7 @@ export class AttendanceOptionsComponent implements OnInit {
constructor(
private nfc: NFC,
// private nfc: NFC,
public common: CommonService,
public platform: Platform,
public attendScanService: AttendScanService,
@ -62,11 +62,11 @@ export class AttendanceOptionsComponent implements OnInit {
private device: Device,
private attendance_service: AttendanceService,
public ngZone: NgZone,
private wifiWizard2: WifiWizard2,
// private wifiWizard2: WifiWizard2,
private openNativeSettings: OpenNativeSettings,
private devicePermissionsService:DevicePermissionsService,
private geolocation: Geolocation,
public backgroundGeolocation: BackgroundGeolocation,
// private geolocation: Geolocation,
// public backgroundGeolocation: BackgroundGeolocation,
public hmgUtils: HMGUtils
) {}
@ -88,31 +88,31 @@ export class AttendanceOptionsComponent implements OnInit {
}
async checkNFCStatus(checkValue: string) {
try {
let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus);
if (nfcStatus === "NFC_OK") {
this.deviceNFC = true;
if (checkValue === "two") {
this.startNFC();
}
}
if (nfcStatus === null && checkValue === "two") {
this.startNFC();
}
} catch (err) {
console.log("Error reading tag", err);
if (err === "NO_NFC") {
this.deviceNFC = false;
} else if (err === "NFC_DISABLED") {
this.deviceNFC = true;
if (checkValue === "two") {
this.common.presentAlert(this.ts.trPK("general", "nfc-settings"));
}
} else if (checkValue === "two") {
this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
}
}
// try {
// let nfcStatus = await this.nfc.enabled();
// console.log("nfc status >>>>>>>>>>" + nfcStatus);
// if (nfcStatus === "NFC_OK") {
// this.deviceNFC = true;
// if (checkValue === "two") {
// this.startNFC();
// }
// }
// if (nfcStatus === null && checkValue === "two") {
// this.startNFC();
// }
// } catch (err) {
// console.log("Error reading tag", err);
// if (err === "NO_NFC") {
// this.deviceNFC = false;
// } else if (err === "NFC_DISABLED") {
// this.deviceNFC = true;
// if (checkValue === "two") {
// this.common.presentAlert(this.ts.trPK("general", "nfc-settings"));
// }
// } else if (checkValue === "two") {
// this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
// }
// }
}
public setServicesPrivilage() {
@ -154,15 +154,15 @@ export class AttendanceOptionsComponent implements OnInit {
}
async startIOSNfc() {
try {
let tag = await this.nfc.scanTag();
console.log(JSON.stringify(tag));
const serialNumber = this.nfc.bytesToHexString(tag.id);
this.swipeAttendanceNFC(serialNumber);
} catch (err) {
this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
console.log("Error reading tag", err);
}
// try {
// let tag = await this.nfc.scanTag();
// console.log(JSON.stringify(tag));
// const serialNumber = this.nfc.bytesToHexString(tag.id);
// this.swipeAttendanceNFC(serialNumber);
// } catch (err) {
// this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
// console.log("Error reading tag", err);
// }
}
public async nfcModal() {
@ -243,38 +243,38 @@ export class AttendanceOptionsComponent implements OnInit {
public async startWifi() {
const isAndroid = this.platform.is("android");
const isIOS = this.platform.is("ios");
const isWifiEnabled = await this.wifiWizard2.isWifiEnabled();
// const isWifiEnabled = await this.wifiWizard2.isWifiEnabled();
const versionType = this.device.version;
const versionTypeInt = parseInt(versionType);
console.log('version type: ' + versionType);
console.log('version Type: ' + versionTypeInt);
if(isAndroid && versionTypeInt > 10) {
if(!isWifiEnabled){
this.showWifiNotEnabled();
return;
}
// if(!isWifiEnabled){
// this.showWifiNotEnabled();
// return;
// }
}
if (isIOS) {
if(!isWifiEnabled){
this.showWifiNotEnabled();
return;
}
// if(!isWifiEnabled){
// this.showWifiNotEnabled();
// return;
// }
} else if(isAndroid) {
let locationPermission = await this.devicePermissionsService.requestLocationAutherization();
if (!locationPermission) {
return;
}
if(!isWifiEnabled){
this.wifiWizard2.setWifiEnabled(true).then(()=>{
this.startWifi();
}).catch((err) => {
console.debug(err);
});
return;
}
// if(!isWifiEnabled){
// this.wifiWizard2.setWifiEnabled(true).then(()=>{
// this.startWifi();
// }).catch((err) => {
// console.debug(err);
// });
// return;
// }
}
// opening wifi dailog if all above conditions are passed (isWifiEnabled == true)
let modal = await this.modalController.create({

@ -5,7 +5,7 @@ import { Routes, RouterModule } from '@angular/router';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { IonicModule } from '@ionic/angular';
import { HomePage } from './home.page';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { WorklistMainService } from '../notification/service/work-list.main.service';
import { AttendanceOptionsComponent } from './attendance-options/attendance-options.component';
import { NfcModalComponent } from './nfc-modal/nfc-modal.component';
@ -36,7 +36,7 @@ const routes: Routes = [
WifiModalComponent
],
providers: [
BarcodeScanner,
// BarcodeScanner,
WorklistMainService
],
entryComponents: [

@ -25,7 +25,7 @@
</ion-slides>
</ion-row>
<ion-row *ngFor="let menuItem of menuEntries; let i=index">
<ion-row *ngFor="let menuItem of menuEntries; let i=index" class="dynamic-form">
<ion-col [size]="12">
<ion-label class="menu-label">{{menuItem.PROMPT}}</ion-label>
</ion-col>
@ -61,6 +61,94 @@
</ion-row>
</ion-row>
<div *ngIf="!menuEntries">
<ion-list style="background: transparent; margin-bottom: 10px;">
<ion-list-header>
<ion-skeleton-text [animated]="true" style="width: 90px"></ion-skeleton-text>
</ion-list-header>
<ion-item lines="none" style="--background: transparent">
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
</ion-item>
</ion-list>
<div class="empty-div">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</div>
<ion-list style="background: transparent">
<ion-list-header>
<ion-skeleton-text [animated]="true" style="width: 90px"></ion-skeleton-text>
</ion-list-header>
<ion-item lines="none" style="--background: transparent">
<ion-thumbnail slot="start" style="height: 100px; width: 100px;">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
</ion-item>
</ion-list>
<ion-list style="background: transparent">
<ion-list-header>
<ion-skeleton-text [animated]="true" style="width: 90px"></ion-skeleton-text>
</ion-list-header>
<ion-item lines="none" style="--background: transparent">
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
</ion-item>
</ion-list>
<ion-list style="background: transparent">
<ion-list-header>
<ion-skeleton-text [animated]="true" style="width: 90px"></ion-skeleton-text>
</ion-list-header>
<ion-item lines="none" style="--background: transparent">
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
</ion-item>
</ion-list>
</div>
<!-- <ion-row *ngIf="showStaticServices">
<ion-col size="12">
<ion-label> {{'general,other-services' | translate}} </ion-label>

@ -43,14 +43,17 @@ ion-title {
ion-label {
display: block;
color: black !important;
font-size: 14px;
color: #004D71 !important;
font-size: 16px;
font-weight: bold;
letter-spacing: 0.16px;
// margin: 0px 10px 10px 10px;
}
.main-dashboard-container {
position: relative;
width: 100%;
--background: #f5f5f5;
}
.contentBg:before {
@ -80,6 +83,8 @@ ion-label {
width: 100%;
margin-top: 25px;
margin-bottom: 0px;
// margin-right: 10px !important;
margin-left: 5px !important;
h3 {
font-size: 18px;
@ -90,6 +95,7 @@ ion-label {
span {
font-size: 13px;
display: block;
margin-top: 5px;
}
img {
@ -106,7 +112,7 @@ ion-label {
--box-shadow: none !important;
height: auto;
min-height: inherit;
margin-top: 10px;
margin-top: 15px;
font-size: 12px;
}
}
@ -182,4 +188,19 @@ ion-label {
img {
width: 25px;
}
}
ion-skeleton-text {
--border-radius: 15px;
--background: rgba(188, 0, 255, 0.065);
--background-rgb: 2, 77, 113;
}
.empty-div {
border-radius: 20px;
padding: 10px;
width: 100%;
margin-bottom: 20px;
margin-left: 5px !important;
height: 140px;
}

@ -7,8 +7,8 @@ import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/mo
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx';
import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request';
import { COCRequest } from 'src/app/notification/models/COCRequest';
@ -37,8 +37,8 @@ import { TimeCardService } from '../time-card/service/time-card.service';
import { WorklistMainService } from '../notification/service/work-list.main.service';
import { isThisISOWeek } from 'date-fns';
import { Router } from '@angular/router';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { NFC, Ndef } from "@ionic-native/nfc/ngx"
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { NFC, Ndef } from "@ionic-native/nfc/ngx"
import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
@ -54,7 +54,7 @@ export class HomePage implements OnInit {
userData: any = {};
userImage: any = '../assets/imgs/profile.png';
menuList: any = [];
zbarOptions: any;
// zbarOptions: any;
scannedResult: any;
notBadge: any;
lat: any;
@ -66,6 +66,7 @@ export class HomePage implements OnInit {
camera: boolean;
ticketRequestObject: any;
leaveRequestObject: any;
businessLeaveRequestObject: any;
missingSwipeRequestObject: any;
public isShow = false;
public showVcationRule = false;
@ -134,6 +135,7 @@ export class HomePage implements OnInit {
direction: string;
public isPostNoLoad = true;
public showStaticServices = false;
public myRequestData: any;
constructor(
public ts: TranslatorService,
@ -143,10 +145,10 @@ export class HomePage implements OnInit {
public common: CommonService,
public events: Events,
private device: Device,
private geolocation: Geolocation,
// private geolocation: Geolocation,
private attendanceService: AttendanceService,
private eitService: EitService,
private barcodeScanner: BarcodeScanner,
// private barcodeScanner: BarcodeScanner,
public actionSheetCtrl: ActionSheetController,
public sharedData: SharedDataService,
private sanitizer: DomSanitizer,
@ -158,9 +160,9 @@ export class HomePage implements OnInit {
public workListService: WorklistMainService,
public router: Router,
private platform: Platform,
public backgroundGeolocation: BackgroundGeolocation,
// public backgroundGeolocation: BackgroundGeolocation,
public modalController: ModalController,
private nfc: NFC,
// private nfc: NFC,
public firebasex: FirebaseX
) {
this.events.subscribe('img-change', displayImg => {
@ -196,7 +198,7 @@ export class HomePage implements OnInit {
spaceBetween: 10
};
this.slideOptsTwo = {
slidesPerView: width > 320 ? 3.2 : 2.5,
slidesPerView: width > 320 ? 3.4 : 2.4,
spaceBetween: width > 320 ? 10 : 5
};
this.showStaticServices = true;
@ -271,32 +273,32 @@ export class HomePage implements OnInit {
this.location = granted as boolean;
if (this.location) {
if (this.platform.is('android')) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) {
if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.isFakeLocationUsed = true;
}
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
// this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
// if (resp && (resp.latitude && resp.longitude)) {
// if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
// this.isFakeLocationUsed = true;
// }
// this.lat = resp.latitude;
// this.longt = resp.longitude;
// this.attendance();
// } else {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// }
// }, (error) => {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// });
} else {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) {
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
this.attendance();
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
// this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
// if (resp && resp.coords.latitude && resp.coords.longitude) {
// this.lat = resp.coords.latitude;
// this.longt = resp.coords.longitude;
// this.attendance();
// } else {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// }
// }).catch(error => {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// });
}
} else {
return false;
@ -309,7 +311,7 @@ export class HomePage implements OnInit {
if (servicePrivilage.Previlege === false) {
if (servicePrivilage.ServiceName === 'accrualBalance') {
this.statsButtons[3].show = false;
this.statsButtons[4].show = false;
// this.statsButtons[4].show = false;
}
if (servicePrivilage.ServiceName === 'vacationRule') {
this.showVcationRule = false;
@ -432,6 +434,10 @@ export class HomePage implements OnInit {
} else {
this.events.publish('myTeamFlag', 'false');
}
if (this.menuList[i].MENU_TYPE === 'E') {
this.myRequestData = this.menuList[i];
}
}
// if (item.MENU_TYPE === 'M') {
@ -517,6 +523,10 @@ export class HomePage implements OnInit {
// tslint:disable-next-line: triple-equals
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') {
this.missingSwipeRequestObject = result.GetMenuEntriesList[i];
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'XXX_HR_EIT_BUSINESS_MISSION_SS') {
this.businessLeaveRequestObject = result.GetMenuEntriesList[i];
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'MBL_PERFORMANCE_MANAGEMENT' && result.GetMenuEntriesList[i].REQUEST_TYPE == 'PMS') {
result.GetMenuEntriesList.splice(i, 1);
}
}
this.sortMenuEntires(result.GetMenuEntriesList);
@ -546,22 +556,22 @@ export class HomePage implements OnInit {
}
scanCode() {
this.barcodeScanner
.scan()
.then(barcodeData => {
if (!barcodeData.cancelled) {
this.scannedResult = barcodeData;
this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance();
} else {
this.swipeAttendance();
}
}
})
.catch(err => {
console.log('Error', err);
});
// this.barcodeScanner
// .scan()
// .then(barcodeData => {
// if (!barcodeData.cancelled) {
// this.scannedResult = barcodeData;
// this.deviceID = this.device.uuid;
// if (this.isFakeLocationUsed) {
// this.fakeSwipeAttendance();
// } else {
// this.swipeAttendance();
// }
// }
// })
// .catch(err => {
// console.log('Error', err);
// });
}
fakeSwipeAttendance() {
@ -786,7 +796,7 @@ export class HomePage implements OnInit {
// if (subMenu.REQUEST_TYPE === 'EIT' && subMenu.FUNCTION_NAME === 'XXX_HR_EIT_LOA_CREATE_SS') {
if (subMenu.REQUEST_TYPE === 'EIT') {
// this.common.openAbsencePage();
this.common.openEitListPage();
this.common.openEitListPage();
} else if (subMenu.REQUEST_TYPE === 'EIT') {
this.common.openEitListPage();
} else if (subMenu.REQUEST_TYPE === 'PAYSLIP') {
@ -803,6 +813,11 @@ export class HomePage implements OnInit {
this.common.openProfile('contact');
} else if (subMenu.REQUEST_TYPE === 'CONTACT') {
this.common.openProfile('family');
} else if (subMenu.REQUEST_TYPE === 'PAR') {
this.performanceEvaluation();
} else if (subMenu.REQUEST_TYPE === 'CCP') {
this.common.sharedService.setSharedData(subMenu, MenuResponse.SELECTED_MENU);
this.common.openConcurrentReport(true);
}
if (subMenu.REQUEST_TYPE === 'TIME_CARD') {
this.common.openTimeCardPage();
@ -825,11 +840,13 @@ export class HomePage implements OnInit {
let totalTicketsLeft = 0;
this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of result.GetAccrualBalancesList) {
if (accrualBalance.ACCURAL_PLAN_NAME === 'Annual Vacation Accrual') {
if (accrualBalance.ACCURAL_PLAN_NAME === 'Annual Vacation Accrual' || accrualBalance.ACCURAL_PLAN_NAME == " خطة استحقاق الاجازة الاعتيادية") {
this.statsButtons[1].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance');
this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate');
// this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance');
} else if (accrualBalance.ACCURAL_PLAN_NAME === 'Business Trip Accrual' || accrualBalance.ACCURAL_PLAN_NAME == "خطة استحقاق الإنتدابات") {
this.statsButtons[2].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
}
// else {
// totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
@ -852,14 +869,10 @@ export class HomePage implements OnInit {
// tslint:disable-next-line: triple-equals
if (link == '0') {
this.isFakeLocationUsed = false;
// this.getDeviceLocation();
this.showAttendanceOptions();
// tslint:disable-next-line: triple-equals
} else if (link == '1') {
// this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.common.startLoading();
this.common.openNotificationPage();
// tslint:disable-next-line: triple-equals
} else if (link == '2') {
// this.openPage(this.missingSwipeRequestObject);
// tslint:disable-next-line: triple-equals
@ -897,4 +910,8 @@ export class HomePage implements OnInit {
openAnnouncement() {
this.common.openAnnouncement();
}
public performanceEvaluation() {
this.common.openPerformanceevaluation();
}
}

@ -1,5 +1,5 @@
import { Component, OnInit, NgZone } from '@angular/core';
import { NFC } from "@ionic-native/nfc/ngx"
// import { NFC } from "@ionic-native/nfc/ngx"
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import {AttendScanService} from '../../hmg-common/services/attend-services/attend-scan.service';
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
@ -24,7 +24,7 @@ export class NfcModalComponent implements OnInit {
public longt: number;
constructor(
private nfc: NFC,
// private nfc: NFC,
public common: CommonService,
public attendScanService: AttendScanService,
private device: Device,
@ -45,15 +45,15 @@ export class NfcModalComponent implements OnInit {
}
async startAndroidNfc() {
let flags = this.nfc.FLAG_READER_NFC_A | this.nfc.FLAG_READER_NFC_V;
this.nfcReader = this.nfc.readerMode(flags).subscribe((tag) => {
const serialNumber = this.nfc.bytesToHexString(tag.id);
this.swipeAttendanceNFC(serialNumber);
}, (error) => {
this.modalController.dismiss();
this.common.presentAlert(this.ts.trPK('general', 'nfc-error'));
console.log('error =====>>>>>> + + + =' + error);
});
// let flags = this.nfc.FLAG_READER_NFC_A | this.nfc.FLAG_READER_NFC_V;
// this.nfcReader = this.nfc.readerMode(flags).subscribe((tag) => {
// const serialNumber = this.nfc.bytesToHexString(tag.id);
// this.swipeAttendanceNFC(serialNumber);
// }, (error) => {
// this.modalController.dismiss();
// this.common.presentAlert(this.ts.trPK('general', 'nfc-error'));
// console.log('error =====>>>>>> + + + =' + error);
// });
}
public swipeAttendanceNFC (nfcSerialCode: any) {

@ -8,7 +8,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { Platform } from "@ionic/angular";
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
// import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service";
@ -42,7 +42,7 @@ export class WifiModalComponent implements OnInit {
public modalController: ModalController,
public ts: TranslatorService,
public ngZone: NgZone,
private wifiWizard2: WifiWizard2,
// private wifiWizard2: WifiWizard2,
private openNativeSettings: OpenNativeSettings,
private platform: Platform,
public attendScanService: AttendScanService
@ -58,8 +58,8 @@ export class WifiModalComponent implements OnInit {
async getConnectedBSSID(ssid:string){
let avaialbleSSID = await this.wifiWizard2.getConnectedBSSID();
console.log(avaialbleSSID);
// let avaialbleSSID = await this.wifiWizard2.getConnectedBSSID();
// console.log(avaialbleSSID);
}
async startWifiConnection() {
@ -67,49 +67,49 @@ export class WifiModalComponent implements OnInit {
const isIOS = this.platform.is("ios");
if (isAndroid) {
let isWifiAvailable = await this.isWifiAvailable(this.ssid);
console.debug("isWifiAvailable: " + isWifiAvailable);
if(isWifiAvailable){
console.debug("Wifi Credientials: " + this.ssid + " | " + this.password);
this.wifiWizard2.connect(this.ssid, true, this.password, this.algo).then(async (value) =>{
let ssid_ = await this.wifiWizard2.getConnectedSSID();
if(ssid_ == this.ssid){
console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
setTimeout(() => {
this.swipeAttendanceWifi(ssid_);
},2000);
}else{
this.showErrorInvalidWorkspace();
}
})
.catch((err) => {
console.debug(err);
this.showErrorForgetWifiConfiguration();
});
}else{
console.debug("Wifi is not available considered your device is not in range");
this.showErrorInvalidWorkspace();
}
// let isWifiAvailable = await this.isWifiAvailable(this.ssid);
// console.debug("isWifiAvailable: " + isWifiAvailable);
// if(isWifiAvailable){
// console.debug("Wifi Credientials: " + this.ssid + " | " + this.password);
// this.wifiWizard2.connect(this.ssid, true, this.password, this.algo).then(async (value) =>{
// let ssid_ = await this.wifiWizard2.getConnectedSSID();
// if(ssid_ == this.ssid){
// console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
// setTimeout(() => {
// this.swipeAttendanceWifi(ssid_);
// },2000);
// }else{
// this.showErrorInvalidWorkspace();
// }
// })
// .catch((err) => {
// console.debug(err);
// this.showErrorForgetWifiConfiguration();
// });
// }else{
// console.debug("Wifi is not available considered your device is not in range");
// this.showErrorInvalidWorkspace();
// }
} else if (isIOS) {
this.wifiWizard2.iOSConnectNetwork(this.ssid,this.password).then(async (value) => {
let ssid_ = await this.wifiWizard2.getConnectedSSID();
if(ssid_ == this.ssid){
console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
setTimeout(() => {
this.swipeAttendanceWifi(ssid_);
},6000);
}else{
this.showErrorInvalidWorkspace();
}
})
.catch((err) => {
console.debug(err);
this.showErrorInvalidWorkspace();
});
if(this.wifiWizard2.isWifiEnabled){
} else{
this.showWifiNotEnabled();
}
// this.wifiWizard2.iOSConnectNetwork(this.ssid,this.password).then(async (value) => {
// let ssid_ = await this.wifiWizard2.getConnectedSSID();
// if(ssid_ == this.ssid){
// console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
// setTimeout(() => {
// this.swipeAttendanceWifi(ssid_);
// },6000);
// }else{
// this.showErrorInvalidWorkspace();
// }
// })
// .catch((err) => {
// console.debug(err);
// this.showErrorInvalidWorkspace();
// });
// if(this.wifiWizard2.isWifiEnabled){
// } else{
// this.showWifiNotEnabled();
// }
}
}
@ -142,13 +142,13 @@ export class WifiModalComponent implements OnInit {
async disconnectWifi() {
const isAndroid = this.platform.is("android");
const isIOS = this.platform.is("ios");
if(isAndroid){
await this.wifiWizard2.disconnect(this.ssid).catch((error)=>{ console.error(error) });
await this.wifiWizard2.remove(this.ssid).catch((error)=>{ console.error(error) });
console.debug("Wifi Removed");
}else if(isIOS){
await this.wifiWizard2.iOSDisconnectNetwork(this.ssid);
}
// if(isAndroid){
// await this.wifiWizard2.disconnect(this.ssid).catch((error)=>{ console.error(error) });
// await this.wifiWizard2.remove(this.ssid).catch((error)=>{ console.error(error) });
// console.debug("Wifi Removed");
// }else if(isIOS){
// await this.wifiWizard2.iOSDisconnectNetwork(this.ssid);
// }
}
async swipeAttendanceWifi(code:any) {
@ -211,15 +211,15 @@ export class WifiModalComponent implements OnInit {
}
async isWifiAvailable(ssid:string){
let avaialble_wifi = await this.wifiWizard2.scan();
let find = avaialble_wifi.find(element => {
return element.SSID == ssid;
});
// let avaialble_wifi = await this.wifiWizard2.scan();
// let find = avaialble_wifi.find(element => {
// return element.SSID == ssid;
// });
if (find === undefined) {
return false;
} else {
return find.SSID == ssid;
}
// if (find === undefined) {
// return false;
// } else {
// return find.SSID == ssid;
// }
}
}

@ -36,7 +36,7 @@
<ion-row style="margin-top: 11px;">
<ion-col [size]="6">
<p class="subTitle">{{ts.trPK('userProfile','role')}}</p>
<span class="Boldtext">{{jobName}}</span>
<span class="Boldtext">{{employee.POSITION_NAME}}</span>
</ion-col>
<ion-col [size]="6" style="border-left: 1px solid rgb(221 221 221);">
<p class="subTitle" style="line-height: 12px !important;">{{ts.trPK('userProfile','empNo')}}</p>
@ -61,7 +61,7 @@
</ion-segment-button>
</ion-col>
<ion-col>
<span class="btnTitle">{{ts.trPK('myTeam','profile-details')}}</span>
<span [ngClass]="direction == 'en' ? 'btnTitle' : 'btnTitle_ar'">{{ts.trPK('myTeam','profile-details')}}</span>
</ion-col>
</ion-col>
<ion-col [size]="4" (click)="getMenuEntries(employee)">
@ -72,7 +72,7 @@
<img class="imgSize" src="../assets/imgs/create-req.svg">
</ion-segment-button>
</ion-col>
<ion-col > <span class="btnTitle">{{ts.trPK('vacation-rule','create-request')}}</span></ion-col>
<ion-col > <span [ngClass]="direction == 'en' ? 'btnTitle' : 'btnTitle_ar'">{{ts.trPK('vacation-rule','create-request')}}</span></ion-col>
</ion-col>
<!-- <ion-col [size]="3">
<ion-col>
@ -93,7 +93,7 @@
<img class="imgSize" src="../assets/imgs/team-members.svg">
</ion-segment-button>
</ion-col>
<ion-col><span class="btnTitle">{{ts.trPK('myTeam','team-members')}}</span></ion-col>
<ion-col><span [ngClass]="direction == 'en' ? 'btnTitle' : 'btnTitle_ar'">{{ts.trPK('myTeam','team-members')}}</span></ion-col>
</ion-col>
</ion-segment>
@ -502,7 +502,7 @@
</ion-col>
<ion-col [size]="12">
<h2 [ngClass]="direction == 'en' ? 'label1':'label1-ar' ">{{ts.trPK('userProfile','job')}}</h2>
<p [ngClass]="direction == 'en' ? 'label2':'label2-ar' ">{{jobName}}</p>
<p [ngClass]="direction == 'en' ? 'label2':'label2-ar' ">{{employee.POSITION_NAME}}</p>
</ion-col>
<ion-col [size]="12">
<h2 [ngClass]="direction == 'en' ? 'label1':'label1-ar' ">{{ts.trPK('userProfile','payrol')}}</h2>
@ -514,7 +514,7 @@
</ion-col> -->
<ion-col [size]="12">
<h2 [ngClass]="direction == 'en' ? 'label1':'label1-ar' ">{{ts.trPK('userProfile','position')}}</h2>
<p [ngClass]="direction == 'en' ? 'label2':'label2-ar' ">{{jobName}}</p>
<p [ngClass]="direction == 'en' ? 'label2':'label2-ar' ">{{employee.POSITION_NAME}}</p>
</ion-col>
<ion-col [size]="12" style="border-bottom: none;">
<h2 [ngClass]="direction == 'en' ? 'label1':'label1-ar' ">{{ts.trPK('userProfile','grade')}}</h2>

@ -195,7 +195,8 @@ $actionBtnSize : 36px;
border-radius: 50% !important;
// margin-right: 22px;
// margin-left: 22px;
margin-left: 19px;
margin-left: 30px;
margin-right: 30px;
background-color: #BE332F;
display: flex;
}
@ -234,10 +235,10 @@ $actionBtnSize : 36px;
border-radius: 50% !important;
// margin-right: 22px;
// margin-left: 22px;
margin-left: 15px;
margin-left: 30px;
background: #414040 !important;
display: flex;
margin-right: 30px;
}
}
@ -825,14 +826,17 @@ $actionBtnSize : 36px;
}
.Boldtext {
// font-size: 13px;
// font-family: WorkSans-Bold;
// color: black !important;
// display: block !important;
text-align: center;
letter-spacing: -0.64px;
color: #2B353E;
letter-spacing: -0.52px;
color: #5C6F79;
font-weight: bold;
opacity: 1;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
font-size: 16px;
@ -938,16 +942,17 @@ $actionBtnSize : 36px;
.name {
text-align: center;
letter-spacing: -0.84px;
color: #2B353E;
color: #004D71;
font-weight: bold;
opacity: 1;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
font-family: 'Inter' !important;
line-height: 21px;
font-size: 21px;
}
.email {
text-align: center;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
font-family: 'Inter' !important;
font-size: 13px;
line-height: 6px;
letter-spacing: -0.52px;
@ -958,8 +963,9 @@ $actionBtnSize : 36px;
.subTitle {
text-align: center;
letter-spacing: -0.52px;
color: #A2A2A2;
letter-spacing: -0.56px;
color: #004D71;
font-weight: bold;
opacity: 1;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
font-size: 13px;
@ -972,7 +978,8 @@ $actionBtnSize : 36px;
line-height: 20px;
font-size: 20px;
letter-spacing: -0.8px;
color: #2B353E;
color: #004D71;
font-weight: bold;
opacity: 1;
margin-top: 20px;
margin-bottom: 2px;
@ -982,9 +989,10 @@ $actionBtnSize : 36px;
text-align: left;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 0px;
font-size: 13px;
letter-spacing: -0.52px;
color: #A2A2A2;
font-size: 14px;
letter-spacing: -0.56px;
color: #5C6F79;
font-weight: bold;
opacity: 1;
}
@ -994,7 +1002,8 @@ $actionBtnSize : 36px;
line-height: 5px;
font-size: 16px;
letter-spacing: -0.64px;
color: #2B353E;
color: #004D71;
font-weight: bold;
opacity: 1;
}
@ -1004,30 +1013,37 @@ $actionBtnSize : 36px;
line-height: 20px;
font-size: 20px;
letter-spacing: -0.8px;
color: #2B353E;
color: #004D71;
font-weight: bold;
opacity: 1;
margin-top: 20px;
margin-bottom: 2px;
padding: 5px;
font-weight: bold;
}
.label1-ar {
text-align: right;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 0px;
font-size: 13px;
letter-spacing: -0.52px;
color: #A2A2A2;
font-size: 18px;
letter-spacing: -0.56px;
color: #5C6F79;
font-weight: bold;
opacity: 1;
padding: 1px 5px 1px 5px;
}
.label2-ar {
text-align: right;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 5px;
font-size: 16px;
font-size: 18px;
letter-spacing: -0.64px;
color: #2B353E;
color: #004D71;
font-weight: bold;
opacity: 1;
padding: 1px 5px 1px 5px;
}
@media screen and (min-width: 768px) and (max-width:1024px) {

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

Loading…
Cancel
Save