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> <description>An app created by cloud Solutions</description>
<author email="eservicescs@cloudsolution-sa.com" href="http://cloudsolution-sa.com">Cloud Solutions</author> <author email="eservicescs@cloudsolution-sa.com" href="http://cloudsolution-sa.com">Cloud Solutions</author>
<content src="index.html" /> <content src="index.html" />
<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="http://*/*" /> <allow-intent href="http://*/*" />
<allow-intent href="https://*/*" /> <allow-intent href="https://*/*" />
<allow-intent href="tel:*" /> <allow-intent href="tel:*" />
@ -50,9 +48,6 @@
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" /> <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-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-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>
<platform name="ios"> <platform name="ios">
<allow-intent href="itms:*" /> <allow-intent href="itms:*" />
@ -112,29 +107,21 @@
<plugin name="cordova-plugin-whitelist" spec="1.3.3" /> <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" /> <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.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-datepicker" spec="~0.9.3" />
<plugin name="cordova-plugin-ionic-webview" spec="4.1.0"> <plugin name="cordova-plugin-ionic-webview" spec="4.1.0">
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" /> <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
</plugin> </plugin>
<plugin name="cordova-sqlite-storage" spec="^3.4.0" /> <plugin name="cordova-sqlite-storage" spec="^3.4.0" />
<plugin name="cordova-plugin-nativestorage" spec="^2.3.2" /> <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="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-globalization" spec="^1.11.0" />
<plugin name="cordova-plugin-android-permissions" spec="^1.0.2" /> <plugin name="cordova-plugin-android-permissions" spec="^1.0.2" />
<plugin name="cordova-plugin-device" spec="^2.0.3" /> <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-local-notification" spec="^0.9.0-beta.2" />
<plugin name="cordova-plugin-badge" spec="^0.8.8" /> <plugin name="cordova-plugin-badge" spec="^0.8.8" />
<plugin name="cordova.plugins.diagnostic" spec="^5.0.1" /> <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-camera" spec="^4.1.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.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-appavailability" spec="^0.4.2" />
<plugin name="cordova-plugin-apprate" spec="^1.4.0" /> <plugin name="cordova-plugin-apprate" spec="^1.4.0" />
<plugin name="cordova-plugin-file" spec="^6.0.2" /> <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/android-permissions": "^5.18.0",
"@ionic-native/app-availability": "^5.18.0", "@ionic-native/app-availability": "^5.18.0",
"@ionic-native/app-rate": "^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/badge": "^5.18.0",
"@ionic-native/barcode-scanner": "^5.18.0",
"@ionic-native/base64": "^5.18.0", "@ionic-native/base64": "^5.18.0",
"@ionic-native/ble": "^5.18.0",
"@ionic-native/camera": "^5.18.0", "@ionic-native/camera": "^5.18.0",
"@ionic-native/core": "^5.8.0", "@ionic-native/core": "^5.8.0",
"@ionic-native/date-picker": "^5.10.0", "@ionic-native/date-picker": "^5.10.0",
@ -41,24 +38,17 @@
"@ionic-native/file-picker": "^5.36.0", "@ionic-native/file-picker": "^5.36.0",
"@ionic-native/fingerprint-aio": "^5.18.0", "@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.34.0", "@ionic-native/firebase-x": "^5.34.0",
"@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.18.0", "@ionic-native/globalization": "^5.18.0",
"@ionic-native/health": "^5.4.0", "@ionic-native/health": "^5.4.0",
"@ionic-native/in-app-browser": "^5.17.0",
"@ionic-native/keyboard": "^5.17.0", "@ionic-native/keyboard": "^5.17.0",
"@ionic-native/launch-navigator": "^5.17.0", "@ionic-native/launch-navigator": "^5.17.0",
"@ionic-native/local-notifications": "^5.17.0", "@ionic-native/local-notifications": "^5.17.0",
"@ionic-native/native-storage": "^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/open-native-settings": "^5.14.0",
"@ionic-native/sms-retriever": "^5.36.0", "@ionic-native/sms-retriever": "^5.36.0",
"@ionic-native/social-sharing": "^5.34.0",
"@ionic-native/splash-screen": "^5.0.0", "@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/sqlite": "^5.18.0", "@ionic-native/sqlite": "^5.18.0",
"@ionic-native/status-bar": "^5.0.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", "@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.2", "@ng-bootstrap/ng-bootstrap": "^4.2.2",
"@swimlane/ngx-charts": "^10.1.0", "@swimlane/ngx-charts": "^10.1.0",
@ -69,7 +59,6 @@
"cordova-android": "^8.1.0", "cordova-android": "^8.1.0",
"cordova-android-support-gradle-release": "^3.0.1", "cordova-android-support-gradle-release": "^3.0.1",
"cordova-open-native-settings": "^1.5.2", "cordova-open-native-settings": "^1.5.2",
"cordova-opentok-android-permissions": "^1.0.1",
"cordova-plugin-actionsheet": "^2.3.3", "cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-add-swift-support": "^2.0.2", "cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-android-permissions": "^1.0.2", "cordova-plugin-android-permissions": "^1.0.2",
@ -78,7 +67,6 @@
"cordova-plugin-appavailability": "^0.4.2", "cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-apprate": "^1.4.0", "cordova-plugin-apprate": "^1.4.0",
"cordova-plugin-badge": "^0.8.8", "cordova-plugin-badge": "^0.8.8",
"cordova-plugin-ble-central": "^1.2.4",
"cordova-plugin-camera": "^4.1.0", "cordova-plugin-camera": "^4.1.0",
"cordova-plugin-datepicker": "^0.9.3", "cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^2.0.3", "cordova-plugin-device": "^2.0.3",
@ -90,9 +78,7 @@
"cordova-plugin-filepicker": "^1.1.6", "cordova-plugin-filepicker": "^1.1.6",
"cordova-plugin-fingerprint-aio": "^3.0.0", "cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^13.0.0", "cordova-plugin-firebasex": "^13.0.0",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0", "cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0",
"cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.0", "cordova-plugin-ionic-webview": "^4.1.0",
"cordova-plugin-local-notification": "^0.9.0-beta.2", "cordova-plugin-local-notification": "^0.9.0-beta.2",
@ -100,16 +86,12 @@
"cordova-plugin-sms-retriever-manager": "^1.0.3", "cordova-plugin-sms-retriever-manager": "^1.0.3",
"cordova-plugin-splashscreen": "^5.0.3", "cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-whitelist": "^1.3.4", "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-sqlite-storage": "^3.4.0",
"cordova-support-google-services": "^1.3.2", "cordova-support-google-services": "^1.3.2",
"cordova.plugins.diagnostic": "^5.0.1", "cordova.plugins.diagnostic": "^5.0.1",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"date-fns": "^1.30.1", "date-fns": "^1.30.1",
"es6-promise-plugin": "^4.1.0",
"ionic2-calendar": "^0.5.8", "ionic2-calendar": "^0.5.8",
"ionic4-rating": "^1.0.9", "ionic4-rating": "^1.0.9",
"ng-circle-progress": "^1.5.1", "ng-circle-progress": "^1.5.1",
@ -117,8 +99,6 @@
"ng2-pdf-viewer": "^5.3.2", "ng2-pdf-viewer": "^5.3.2",
"ngx-gauge": "^1.0.0-beta.10", "ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.14.11", "npm": "^6.14.11",
"phonegap-nfc": "^1.2.0",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0", "phonegap-plugin-multidex": "^1.0.0",
"primeicons": "^1.0.0", "primeicons": "^1.0.0",
"primeng": "^7.1.3", "primeng": "^7.1.3",
@ -144,11 +124,7 @@
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.0", "@types/node": "~10.12.0",
"codelyzer": "~4.5.0", "codelyzer": "~4.5.0",
"com.huawei.cordovahmsgmscheckplugin": "file:CordovaHMSPlugin/CordovaHMSGMSCheckPlugin",
"com.huawei.cordovahmslocationplugin": "file:CordovaHMSPlugin/CordovaHMSLocationPlugin",
"cordova-ios": "^6.2.0", "cordova-ios": "^6.2.0",
"cordova-plugin-wifiwizard2": "^3.1.1",
"es6-promise-plugin": "^4.1.0",
"jasmine-core": "~2.99.1", "jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "^4.0.1", "karma": "^4.0.1",
@ -175,10 +151,6 @@
"cordova-plugin-badge": {}, "cordova-plugin-badge": {},
"cordova-plugin-ionic-keyboard": {}, "cordova-plugin-ionic-keyboard": {},
"cordova-plugin-datepicker": {}, "cordova-plugin-datepicker": {},
"cordova-plugin-geolocation": {},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-ionic-webview": { "cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
}, },
@ -193,12 +165,8 @@
"cordova-plugin-filepath": {}, "cordova-plugin-filepath": {},
"com-badrit-base64": {}, "com-badrit-base64": {},
"cordova-sqlite-storage": {}, "cordova-sqlite-storage": {},
"cordova-plugin-ble-central": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {}, "uk.co.workingedge.phonegap.plugin.launchnavigator": {},
"cordova-plugin-themeablebrowser": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-local-notification": {}, "cordova-plugin-local-notification": {},
"cordova-opentok-android-permissions": {},
"cordova-plugin-appavailability": {}, "cordova-plugin-appavailability": {},
"cordova-plugin-apprate": {}, "cordova-plugin-apprate": {},
"cordova-plugin-fingerprint-aio": { "cordova-plugin-fingerprint-aio": {
@ -206,14 +174,6 @@
}, },
"cordova-plugin-androidx": {}, "cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {}, "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": { "cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true", "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true", "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
@ -250,8 +210,8 @@
"cordova-plugin-filechooser": {} "cordova-plugin-filechooser": {}
}, },
"platforms": [ "platforms": [
"android", "ios",
"ios" "android"
] ]
} }
} }

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<network-security-config> <network-security-config>
<domain-config cleartextTrafficPermitted="true"> <domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">localhost</domain> <domain includeSubdomains="true">localhost</domain>
<domain includeSubdomains="true">hmg.com</domain> <domain includeSubdomains="true">hrmsys.moenergy.gov.sa</domain>
</domain-config> </domain-config>
</network-security-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> <ion-footer>
<div class="centerDiv"> <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> {{'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> {{'general, cancel' | translate}}</ion-button>
</div> </div>
</ion-footer> </ion-footer>

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

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

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

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

@ -10,21 +10,21 @@ header
} }
.mohemmLogo { .mohemmLogo {
max-width: 46% !important; max-width: 46% !important;
border: 0 !important; border: 0 !important;
margin-left: 70px !important; margin-right: 70px !important;
margin-top: -24px !important; margin-top: -24px !important;
margin-bottom: 11px; margin-bottom: 5px;
margin: auto;
display: block;
} }
.mohemmLogo-ar { .mohemmLogo-ar {
max-width: 46% !important; max-width: 46% !important;
border: 0 !important; border: 0 !important;
margin-right: 70px !important; margin-right: 70px !important;
margin-top: -24px !important; margin-top: -24px !important;
margin-bottom: 11px; margin-bottom: 5px;
} }
.closeIcon { .closeIcon {
@ -38,6 +38,10 @@ header
top: 10px; top: 10px;
} }
hr {
border-width: 1px;
}
.menubutton { .menubutton {
white-space: normal; white-space: normal;
@ -79,26 +83,25 @@ header
.logout { .logout {
background-color: #c6903e; background-color: #c6903e;
border: none; border: none;
color: white; color: #004D71;
// padding: 20px;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
display: inline-block; display: inline-block;
font-size: 12px; font-size: 12px;
margin-left: 120px !important;
margin-top: 15px !important; margin-top: 15px !important;
margin-bottom: 20px !important; margin-bottom: 20px !important;
border-radius: 30px; border-radius: 30px;
// width: 40px; height: 35px;
height: 26px; margin: auto;
padding: 6px 24px; padding: 0px 24px;
display: block;
} }
.logout-ar { .logout-ar {
background-color: #c6903e; background-color: #c6903e;
border: none; border: none;
color: white; color: #004D71;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
display: inline-block; display: inline-block;
@ -107,8 +110,8 @@ header
margin-top: 15px !important; margin-top: 15px !important;
margin-bottom: 20px !important; margin-bottom: 20px !important;
border-radius: 30px; border-radius: 30px;
height: 26px; height: 35px;
padding: 6px 24px; padding: 0px 24px;
} }
.menuImg { .menuImg {
@ -289,22 +292,27 @@ button.menu-item.item.item-block.item-ios {
} }
.TxtPlace { .TxtPlace {
margin: 0; font-size: 20px;
padding: 0; color: #004D71;
text-align: center; font-weight: bold;
font-weight: bolder; text-overflow: ellipsis;
color: black; overflow: hidden;
font-size: 16px; white-space: nowrap;
width: 90%;
margin: 10px auto auto auto;
} }
.TxtPlaces {
margin: 0; .TxtPlaces {
padding: 0;
text-align: center;
font-weight: bolder;
font-size: 14px; 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 { .menuFooter {
@ -314,6 +322,7 @@ button.menu-item.item.item-block.item-ios {
margin: auto; margin: auto;
width: 100%; width: 100%;
position: absolute; position: absolute;
top: 40px
} }
@ -323,41 +332,30 @@ button.menu-item.item.item-block.item-ios {
margin: auto; margin: auto;
} }
// .menuFooter .CompanyImg {
// width: 100%;
// height: 100%;
// }
.menuFooter .CompanyImg { .menuFooter .CompanyImg {
width: 80%; width: 65%;
height: 80%; height: 60%;
margin-bottom: -21px; margin-bottom: -21px;
} }
// .logoImg{
// width: 120px;
// position: relative;
// }
.logoImgWithMyTeam { .logoImgWithMyTeam {
width: 77px;
// position: relative; width: 200px;
margin-top: -1px; margin: 20px auto;
margin-bottom: 70px;
} }
.logoImg { .logoImg {
width: 250px; width: 250px;
margin-top: 20px; margin-top: 20px;
margin-bottom: 180px; margin-bottom: 180px;
width: 225px;
} }
.companyTxt { .companyTxt {
font-size: 12px; font-size: 12px;
color: var(--customnavy); color: #004D71;
text-align: center; text-align: center;
font-family: 'Inter' !important;
} }
ion-thumbnail.menu-thumb { ion-thumbnail.menu-thumb {
@ -373,7 +371,7 @@ ion-thumbnail.menu-thumb {
} }
.profile { .profile {
color: black !important; color: #5C6F79 !important;
font-weight: bolder !important; font-weight: bolder !important;
} }
@ -396,8 +394,8 @@ ion-thumbnail.menu-thumb {
// } // }
.profileImg { .profileImg {
width: 140px; width: 100px;
height: 140px; height: 100px;
display: -webkit-inline-box; display: -webkit-inline-box;
display: inline-flex; display: inline-flex;
overflow: hidden; overflow: hidden;
@ -406,3 +404,31 @@ ion-thumbnail.menu-thumb {
position: relative; position: relative;
top: 3px; 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) { if (user) {
console.log(user); console.log(user);
this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info')); this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info'));
console.log('ENAD TEST')
console.log(this.userInfo) console.log(this.userInfo)
localStorage.setItem("digitalIDUser", JSON.stringify(user)); localStorage.setItem("digitalIDUser", JSON.stringify(user));
this.digitalIDUser = user//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_image = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : '../assets/imgs/profile.png';
} }
// this.User_Job_name = user.JOB_NAME; // this.User_Job_name = user.JOB_NAME;
let jobTitle = user.POSITION_NAME.split('.'); let jobTitle = user.POSITION_NAME;
if (jobTitle && jobTitle.length > 1) { // if (jobTitle && jobTitle.length > 1) {
this.User_Job_name = jobTitle[0] + " " + jobTitle[1]; this.User_Job_name = jobTitle;
} // }
//erm channel //erm channel
// if (!CommonService.SKIP) // if (!CommonService.SKIP)
// this.cs.navigateForward('/erm-channel/survey'); // this.cs.navigateForward('/erm-channel/survey');

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

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

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

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

@ -2,12 +2,8 @@
height: 25vh; height: 25vh;
} }
.rowOutside{
// margin-top: -37px;
} .button-digital-id {
.button-digital-id{
--background: white !important; --background: white !important;
background: white !important; background: white !important;
white-space: normal; white-space: normal;
@ -22,16 +18,21 @@
} }
.digital-id-en{ .digital-id-en {
color: black; color: black;
position: absolute; position: absolute;
right: 20px; right: 20px;
width: 10%; width: 10%;
} }
.digital-id-ar{ .digital-id-ar {
color: black; color: black;
position: absolute; position: absolute;
left: 20px; left: 20px;
width: 10%; 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 { LoginModel } from '../models/LoginModel';
import * as moment from 'moment'; import * as moment from 'moment';
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response'; 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 { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component'; import { AppUpdateComponent } from '../app-update/app-update.component';
import { Password } from '../models/password'; import { Password } from '../models/password';
@ -69,7 +69,7 @@ export class ConfirmLoginComponent implements OnInit {
public platform: Platform, public platform: Platform,
public modalController: ModalController, public modalController: ModalController,
public alertController: AlertController, public alertController: AlertController,
private nfc: NFC, // private nfc: NFC,
private smsRetriever: SmsRetriever private smsRetriever: SmsRetriever
) { ) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
@ -353,20 +353,20 @@ export class ConfirmLoginComponent implements OnInit {
} }
async checkNFCStatus() { 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;
} // }
} // }
} }
public checkSMS() { public checkSMS() {
@ -380,6 +380,7 @@ export class ConfirmLoginComponent implements OnInit {
this.authService.checkSMS(request, () => { }, this.ts.trPK('general', 'ok')) this.authService.checkSMS(request, () => { }, this.ts.trPK('general', 'ok'))
.subscribe((result: SMSCheckResponse) => { .subscribe((result: SMSCheckResponse) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
this.cs.sharedService.setSharedData(result.MemberLoginList.P_ORACLE_USER_NAME, 'oracle-user-name');
this.businessInfo = { this.businessInfo = {
show_business: result.BusinessCardPrivilege, show_business: result.BusinessCardPrivilege,
name_en: result.MemberInformationList[0].EMPLOYEE_NAME_En, name_en: result.MemberInformationList[0].EMPLOYEE_NAME_En,

@ -7,7 +7,9 @@
<div class="last-circle"></div> <div class="last-circle"></div>
</div> </div>
</ion-row> </ion-row>
</ion-grid>
<div class="login-container">
<ion-grid>
<ion-row> <ion-row>
<ion-col *ngIf="!user"> <ion-col *ngIf="!user">
<P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P> <P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P>
@ -16,13 +18,13 @@
</ion-grid> </ion-grid>
<div *ngIf="!user" [dir]="currentLang==1 ?'rtl': 'ltr'"> <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 /> <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 class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">
</ion-input> </ion-input>
</ion-item> </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 /> <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 class="login-input" required [type]="inputType" [(ngModel)]="password" placeholder="{{ts.trPK('login','password')}}">
</ion-input> </ion-input>
@ -34,20 +36,20 @@
<a>{{ts.trPK('login','signup')}}</a> <a>{{ts.trPK('login','signup')}}</a>
</div> </div>
<div ng class="gridDiv" aria-disabled="true"> <div ng class="gridDiv" aria-disabled="true">
<button class="gridBtn" ion-button (click)="changeLanguage('2')" [ngClass]="{'active':currentLang ==2}">English</button> <button class="gridBtn border-moe-right" 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 arTxt border-moe-left" ion-button (click)="changeLanguage('1')" [ngClass]="{'active':currentLang ==1}">عربي</button>
</div> </div>
</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"> --> <!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user"> <welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user">
</welcome-login> </welcome-login>
<!-- </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>
<!-- digital ID button --> <!-- digital ID button -->
<!-- <ion-button *ngIf="userInfo" class="button-digital-id" (click)="openDigitalId()"> <!-- <ion-button *ngIf="userInfo" class="button-digital-id" (click)="openDigitalId()">
@ -62,10 +64,20 @@
</div> </div>
</ion-content> </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-row>
<ion-col class="colPad"> <div class="footer-container">
<img class="centerDiv logoFotor" src="../assets/imgs/CSLogo.png" /> <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> </ion-col>
</div>
</ion-row> </ion-row>
<div class="menuFooter" >
<p class="companyTxt">{{companyDesc}}</p>
</div>
</ion-footer> </ion-footer>

@ -23,6 +23,7 @@
text-align: center; text-align: center;
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
font-weight: bold;
} }
.TxtPlace { .TxtPlace {
@ -97,10 +98,12 @@ img.centerDiv {
} }
button.arTxt { button.arTxt {
font-family: var(--fontFamilyIOSAR) !important;
:root[dir="rtl"] { :root[dir="rtl"] {
float: right; float: right;
color: var(--customnavy) !important; color: var(--customnavy) !important;
font-family: var(--fontFamilyIOSAR) !important;
font-weight: bold; font-weight: bold;
border-radius: 2px 0px 0px 2px !important; border-radius: 2px 0px 0px 2px !important;
} }
@ -118,10 +121,11 @@ img.centerDiv {
.login-input { .login-input {
border: none; border: none;
margin-right: 5px; margin-right: 5px;
font-family: 'Kufi';
} }
.item-input { .item-input {
--min-height: 1.0cm !important; --min-height: 1.5cm !important;
--border-radius: 12px; --border-radius: 12px;
--ion-color-base: white !important; --ion-color-base: white !important;
// --background: color: var(--darkgray) !important; // --background: color: var(--darkgray) !important;
@ -141,7 +145,7 @@ img.centerDiv {
white-space: normal; white-space: normal;
color: var(--light); color: var(--light);
text-transform: capitalize; text-transform: capitalize;
min-height: 1.0cm; min-height: 1.3cm;
--border-radius: 33px !important; --border-radius: 33px !important;
border-radius: 33px !important; border-radius: 33px !important;
--min-height: 1.6cm !important; --min-height: 1.6cm !important;
@ -170,10 +174,10 @@ img.centerDiv {
} }
.first-circle { .first-circle {
background: var(--newgreen) !important; background: #024D71 !important;
border-radius: 50%; border-radius: 50%;
height: 292px; height: 310px;
width: 288px; width: 310px;
float: left; float: left;
margin-left: -55px; margin-left: -55px;
margin-top: -140px; margin-top: -140px;
@ -185,7 +189,7 @@ img.centerDiv {
background: #c6903e !important; background: #c6903e !important;
border-radius: 50%; border-radius: 50%;
height: 160px; height: 160px;
width: 170px; width: 190px;
margin: -115px 0px 0px 179px; margin: -115px 0px 0px 179px;
} }
@ -198,11 +202,11 @@ img.centerDiv {
margin: -147px 0px 0px 274px; margin: -147px 0px 0px 274px;
} }
.logoFotor { // .logoFotor {
width: 45px !important; // width: 45px !important;
height: 45px !important; // height: 45px !important;
} // }
.welcomeText { .welcomeText {
justify-content: center; justify-content: center;
@ -272,3 +276,53 @@ img.centerDiv {
left: 20px; left: 20px;
width: 10%; 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 { Component, OnInit, NgZone, OnDestroy } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.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 { AlertController, Platform, Events } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; 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'; 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 { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component'; import { AppUpdateComponent } from '../app-update/app-update.component';
@Component({ @Component({
selector: 'login', selector: 'login',
templateUrl: './login.component.html', templateUrl: './login.component.html',
@ -30,6 +31,8 @@ import { AppUpdateComponent } from '../app-update/app-update.component';
export class LoginComponent implements OnInit, OnDestroy { export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any; deviceToken1: any;
userInfo: any; userInfo: any;
companyDesc = 'Powered By Cloud Solutions';
constructor( constructor(
public cs: CommonService, public cs: CommonService,
@ -47,7 +50,9 @@ export class LoginComponent implements OnInit, OnDestroy {
public plt: Platform, public plt: Platform,
public pushService: PushService, public pushService: PushService,
public keyboardService: KeyboardService, public keyboardService: KeyboardService,
public modalController: ModalController public modalController: ModalController,
public route:ActivatedRoute,
) { ) {
this.events.subscribe('logoutFlage', logoutFlage => { this.events.subscribe('logoutFlage', logoutFlage => {
console.log('login compont logoutFlage: ' + logoutFlage); console.log('login compont logoutFlage: ' + logoutFlage);
@ -68,6 +73,13 @@ export class LoginComponent implements OnInit, OnDestroy {
} else { } else {
this.user = false; this.user = false;
} }
// this.route
//.params.subscribe(val => {
console.log("login page called init...")
} }
appLang = 1; appLang = 1;
@ -103,18 +115,24 @@ export class LoginComponent implements OnInit, OnDestroy {
private checkUserResult: CheckUserAuthenticationResponse; private checkUserResult: CheckUserAuthenticationResponse;
public inputType = "password"; public inputType = "password";
ngOnInit() { ngOnInit() {
this.monitorKeyboardChange(); this.monitorKeyboardChange();
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser')); this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
this.currentLang = TranslatorService.getCurrentLanguageCode();
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) { console.log("login page called...");
this.language = "US";
this.changeLanguage('2') var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
} else { if(previousLanguage){
this.language = "AR"; this.currentLang = previousLanguage =='en' ? 2 : 1;
this.changeLanguage('1') }else{
} document.getElementById('lang').lang = 'en';
TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
this.currentLang =2;
};
this.events.subscribe('user', user => { this.user = user; }); this.events.subscribe('user', user => { this.user = user; });
this.deviceToken = this.cs.getDeviceToken(); this.deviceToken = this.cs.getDeviceToken();
@ -139,25 +157,31 @@ export class LoginComponent implements OnInit, OnDestroy {
this.backClicked(); this.backClicked();
} }
start() {
this.cs.startLoading();
}
ngAfterViewInit(){
}
public changeLanguage(langNumber) { public changeLanguage(langNumber) {
console.log("current lang: " + this.currentLang) console.log("current lang: " + this.currentLang)
console.log("click lang: " + langNumber) console.log("click lang: " + langNumber)
if (this.currentLang == langNumber) { if (this.currentLang == langNumber) {
this.currentLang = langNumber; this.currentLang = langNumber;
return; return;
} else { } else {
this.ts.switchLanguage(); this.ts.switchLanguage();
// tslint:disable-next-line: triple-equals
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) { if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
this.language = 'US'; this.language = 'US';
} else { } else {
this.language = 'AR'; this.language = 'AR';
} }
this.currentLang = TranslatorService.getCurrentLanguageCode(); this.currentLang = TranslatorService.getCurrentLanguageCode();
} }
this.currentLang = langNumber; this.currentLang = langNumber;
document.getElementById('lang').lang = this.currentLang == 1 ? 'ar' : 'en';
} }
public forgetPasswordPage() { public forgetPasswordPage() {
@ -340,6 +364,14 @@ export class LoginComponent implements OnInit, OnDestroy {
if (anotherUser) { if (anotherUser) {
this.username = ''; this.username = '';
this.password = ''; 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 emit');
console.log('login'); console.log('login');
@ -350,6 +382,14 @@ export class LoginComponent implements OnInit, OnDestroy {
loginWithUser() { loginWithUser() {
console.log('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(); this.cs.openConfirmLoginPage();
} }

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

@ -56,8 +56,9 @@ ion-input {
outline: none; outline: none;
width: 20%; width: 20%;
transition: all .2s ease-in-out; transition: all .2s ease-in-out;
border-radius: 3px; border-radius: 15px;
display: inline-block; display: inline-block;
--padding-start: 8px;
&:focus { &:focus {
border-color: var(--ion-color-secondary) !important; 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 * 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'; import { SmsRetriever } from '@ionic-native/sms-retriever/ngx';
@ -125,7 +125,7 @@ export class SmsPageComponent implements OnInit {
public platform: Platform, public platform: Platform,
private nfc: NFC, // private nfc: NFC,
private smsRetriever: SmsRetriever private smsRetriever: SmsRetriever
@ -367,33 +367,33 @@ export class SmsPageComponent implements OnInit {
async checkNFCStatus() { 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)) { if (this.common.validResponse(result)) {
this.common.sharedService.setSharedData(result.MemberLoginList.P_ORACLE_USER_NAME, 'oracle-user-name')
//save business card info //save business card info

@ -1,9 +1,43 @@
.footer-button { .footer-button {
border-radius: 2px; border-radius: 2px;
padding: 0 1.1em; padding: 0 1.1em;
min-height: 45px; min-height: 45px;
min-width: 200px; 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 { ion-label {
color: var(--customnavy) !important; color: var(--customnavy) !important;

@ -177,7 +177,8 @@ export class AddCeiComponent implements OnInit {
defaultValText, defaultValText,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, 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 // }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); // 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, containerId,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, 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"){ // }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); // 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].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.dateInput = new DateInput( this.dateInput = new DateInput(
@ -225,7 +228,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date // else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -251,7 +255,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.datetimeInput = new DateTimeInput( this.datetimeInput = new DateTimeInput(
@ -262,7 +267,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
const elem = document.getElementById( const elem = document.getElementById(
@ -297,7 +303,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.timeInput = new TimeInput( this.timeInput = new TimeInput(
@ -308,7 +315,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
} }
@ -322,7 +330,8 @@ export class AddCeiComponent implements OnInit {
defaultValText, defaultValText,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
// dropdown list missing open in differnt page // dropdown list missing open in differnt page
@ -335,7 +344,8 @@ export class AddCeiComponent implements OnInit {
containerId, containerId,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
); );
// }else{ // }else{
// this.selectInput = new SelectInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"",containerId,feildsList[i].MOBILE_ENABLED); // 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 { MenuEntry } from "src/app/hmg-common/services/menu/models/menu.entry";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response"; import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { EitRequest } from "../models/eit.request"; 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 { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { EITTransactionsRequest } from "../models/EITTransactionsReq"; import { EITTransactionsRequest } from "../models/EITTransactionsReq";
import { EitService } from "../services/eit.service"; import { EitService } from "../services/eit.service";
@ -73,7 +73,8 @@ export class AddEitComponent implements OnInit {
public cs: CommonService, public cs: CommonService,
private ts: TranslatorService, private ts: TranslatorService,
private eitService: EitService, private eitService: EitService,
public datePicker: DatePicker public datePicker: DatePicker,
public platform: Platform
) { ) {
this.direction = TranslatorService.getCurrentLanguageName(); this.direction = TranslatorService.getCurrentLanguageName();
this.selEmp = this.cs.sharedService.getSharedData( this.selEmp = this.cs.sharedService.getSharedData(
@ -122,6 +123,10 @@ export class AddEitComponent implements OnInit {
EITTransactionsRequest.SUBMIT_EIT_ACTION EITTransactionsRequest.SUBMIT_EIT_ACTION
); );
} }
// window.addEventListener('keyboardDidShow', () => {
// document.activeElement.scrollIntoView(false);
// });
} }
ngOnInit() {} ngOnInit() {}
@ -181,7 +186,8 @@ export class AddEitComponent implements OnInit {
defaultValText, defaultValText,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, 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 // }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); // 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, containerId,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, 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"){ // }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); // 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].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.dateInput = new DateInput( this.dateInput = new DateInput(
@ -229,7 +237,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP,
); );
} }
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date // else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -255,7 +264,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.datetimeInput = new DateTimeInput( this.datetimeInput = new DateTimeInput(
@ -266,7 +276,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
const elem = document.getElementById( const elem = document.getElementById(
@ -301,7 +312,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.timeInput = new TimeInput( this.timeInput = new TimeInput(
@ -312,7 +324,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
} }
@ -326,7 +339,8 @@ export class AddEitComponent implements OnInit {
defaultValText, defaultValText,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
// dropdown list missing open in differnt page // dropdown list missing open in differnt page
@ -339,7 +353,8 @@ export class AddEitComponent implements OnInit {
containerId, containerId,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
); );
// }else{ // }else{
// this.selectInput = new SelectInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"",containerId,feildsList[i].MOBILE_ENABLED); // 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) { if (this.validateEitObj && this.validateEitObj.length > 0) {
this.fillEITStructure(); this.fillEITStructure();
} }
this.bindToolTip();
} }
addFieldToDOM( 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) { bindHtmlElemEvents(id, obj) {
const isIOS = this.platform.is('ios');
const elem = document.getElementById(id); const elem = document.getElementById(id);
console.log(elem); console.log(elem);
console.log(obj); console.log(obj);
@ -540,6 +568,18 @@ export class AddEitComponent implements OnInit {
if (elemType == "SELECT") changeEvent = "change"; if (elemType == "SELECT") changeEvent = "change";
try { 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("change", (e) => {
elem.addEventListener(changeEvent, e => { elem.addEventListener(changeEvent, e => {
//console.log("elem change "+elem.id); //console.log("elem change "+elem.id);
@ -548,6 +588,13 @@ export class AddEitComponent implements OnInit {
// if(!x.value) // if(!x.value)
// isEmpty=true; // isEmpty=true;
//emptyChildElement //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"); elem.classList.remove("requiredClassElm");
if ( if (
obj.CHILD_SEGMENTS_VS_Splited && obj.CHILD_SEGMENTS_VS_Splited &&
@ -1231,6 +1278,7 @@ export class AddEitComponent implements OnInit {
} }
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !elemVal) { if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !elemVal) {
elem.classList.add("requiredClassElm"); elem.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg(); //this.common.showRequiredMsg();
return false; return false;
} else { } else {
@ -1269,6 +1317,7 @@ export class AddEitComponent implements OnInit {
} }
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !varcharValue) { if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !varcharValue) {
x.classList.add("requiredClassElm"); x.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg(); //this.common.showRequiredMsg();
return false; return false;
} else { } else {
@ -1300,6 +1349,7 @@ export class AddEitComponent implements OnInit {
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) { if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) {
x.classList.add("requiredClassElm"); x.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg(); //this.common.showRequiredMsg();
return false; return false;
} else { } else {

@ -1,9 +1,14 @@
<ion-header> <!-- <ion-header>
<ion-toolbar class="header-toolbar-new"> <ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons> <nav-buttons></nav-buttons>
<ion-title [ngClass]=" direction === 'en' ? 'title' : 'title-ar'" color="light">{{headerTitle}}</ion-title> <ion-title [ngClass]=" direction === 'en' ? 'title' : 'title-ar'" color="light">{{headerTitle}}</ion-title>
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header> -->
<app-generic-header
[showBack]="true"
[headerText]="headerTitle">
</app-generic-header>
<ion-content> <ion-content>
@ -11,10 +16,14 @@
<ion-grid> <ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;"> <ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col> <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>
<ion-col style="padding-left: 7%;" size="2"> <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" <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)" /> (change)="onFileSelected($event)" (click)="onFileSelectedclick($event)" />
<label end for="file" class="attachLable"> <label end for="file" class="attachLable">

@ -273,3 +273,12 @@
font-size: 16px; font-size: 16px;
text-align: left; text-align: left;
} }
.fileDiv-en {
// float: right;
}
.fileDiv-ar {
float: left;
}

@ -62,7 +62,8 @@ export class ConfirmAddEitComponent implements OnInit {
indexLastObj: any = 0; 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']; filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
direction: string; direction: string;
isAttachment: string; isAttachment: string = 'N';
isAttachmentGET_MENU: string = 'N';
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) { constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.direction = TranslatorService.getCurrentLanguageName() 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.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false); this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false);
this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit; 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) { if (this.isResubmitEIT) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING ** this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING **
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails); // console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
@ -102,7 +103,7 @@ export class ConfirmAddEitComponent implements OnInit {
this.itemKey = this.addrespList.SubmitEITTransactionList.P_ITEM_KEY; this.itemKey = this.addrespList.SubmitEITTransactionList.P_ITEM_KEY;
this.P_TransactionID = this.addrespList.SubmitEITTransactionList.P_TRANSACTION_ID; this.P_TransactionID = this.addrespList.SubmitEITTransactionList.P_TRANSACTION_ID;
this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete; this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete;
this.isAttachment = this.addrespList.SubmitEITTransactionList.P_ATTACHMENT_REQUIRED;
this.getApproversList(); this.getApproversList();
// this.confirmAddEit.submitEit(this.eitRequest).subscribe((result: AddEitResponse) => { // 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> </ion-row>
<h4> {{'general, noData' | translate}}</h4> <h4> {{'general, noData' | translate}}</h4>
</div> </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> --> <!-- <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 *ngIf="getResEITTransactionList && getResEITTransactionList[0]?.Collection_Transaction.length > 0 ">
<!-- <div> --> <!-- <div> -->
@ -200,17 +203,20 @@
<ion-grid> <ion-grid>
<div> <!-- <div>
<!-- <ion-row> <ion-row>
<ion-col class="colBold"> <ion-col class="colBold">
<label for="">status</label> <label for="">status</label>
</ion-col> </ion-col>
<ion-col> <ion-col>
<label for="">{{EITTransactionList.status}}</label> <label for="">{{EITTransactionList.status}}</label>
</ion-col> </ion-col>
</ion-row> --> </ion-row>
</div> </div> -->
<ion-grid class="grids"> <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"> <div *ngFor="let item of EITTransactionList.Collection_Transaction">
<!-- <ion-row *ngIf="item.DISPLAY_FLAG != 'N' "> <!-- <ion-row *ngIf="item.DISPLAY_FLAG != 'N' ">
<ion-col class="colBold"> <ion-col class="colBold">
@ -223,7 +229,7 @@
<ion-row *ngIf="item.DISPLAY_FLAG != 'N' " class=""> <ion-row *ngIf="item.DISPLAY_FLAG != 'N' " class="">
<ion-col class="" *ngIf="item.SEGMENT_PROMPT!=''"> <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> <br>
<label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label> <label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label>
<br> <br>
@ -246,7 +252,7 @@
</ion-infinite-scroll> </ion-infinite-scroll>
</div> </div>
</ion-content> </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> <!-- <ion-footer>
<div class="centerDiv"> --> <div class="centerDiv"> -->

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

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

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

@ -1,19 +1,25 @@
.addEitOkButton { .addEitOkButton{
white-space: normal !important; white-space: normal !important;
text-transform: capitalize !important; text-transform: capitalize !important;
min-height: 45px !important; min-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
background-color: #BE332F; background-color: #BE332F;
width: 80% !important; width: 80% !important;
color: white !important; color: white!important;
border-radius: 16px !important; border-radius: 16px !important;
--border-radius: 16px !important; }
--box-shadow: none;
} .editIconDiv{
right: 10px;
position: absolute;
top: 10px;
}
.editIconDiv-ar{
left: 10px;
position: absolute;
top: 10px;
}
.editIconDiv {
right: 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 { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes'; import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes';
import { EitService } from '../services/eit.service'; import { EitService } from '../services/eit.service';
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
@Component({ @Component({
selector: 'app-eit-update-list', selector: 'app-eit-update-list',
@ -23,8 +24,9 @@ export class EitUpdateListComponent implements OnInit {
private eitTransactionTbl: any = []; private eitTransactionTbl: any = [];
private eitRequest: EitRequest; private eitRequest: EitRequest;
private descFlex: string; 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); this.notificationBodyRes = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, false);
let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);
this.itemKey = notification.ITEM_KEY; this.itemKey = notification.ITEM_KEY;
@ -32,6 +34,7 @@ export class EitUpdateListComponent implements OnInit {
this.functionName = notification.FUNCTION_NAME; this.functionName = notification.FUNCTION_NAME;
this.selEmp = notification.SELECTED_EMPLOYEE_NUMBER; this.selEmp = notification.SELECTED_EMPLOYEE_NUMBER;
this.descFlex = notification.DESC_FLEX_CONTEXT_CODE; this.descFlex = notification.DESC_FLEX_CONTEXT_CODE;
this.direction = TranslatorService.getCurrentLanguageName();
this.fillEitTransactionTable(); this.fillEitTransactionTable();
} }
@ -67,12 +70,13 @@ export class EitUpdateListComponent implements OnInit {
} }
updateTransactionList(list) { updateTransactionList(list) {
list.forEach(element => { // list.forEach(element => {
const index = this.eitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER); // const index = this.eitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
if (index != -1) // if (index != -1)
this.eitTransactionTbl.splice(index, 1); // this.eitTransactionTbl.splice(index, 1);
}); // });
this.eitTransactionTbl = this.eitTransactionTbl ? this.eitTransactionTbl.concat(list) : list; // this.eitTransactionTbl = this.eitTransactionTbl ? this.eitTransactionTbl.concat(list) : list;
this.eitTransactionTbl = list;
} }
resubmitEit() { resubmitEit() {

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

@ -1,9 +1,9 @@
import { Injectable } from "@angular/core"; 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 { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.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 { 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"; import { Platform } from "@ionic/angular";
declare const cordova: any; declare const cordova: any;
@ -13,10 +13,10 @@ declare const cordova: any;
}) })
export class HMGUtils { export class HMGUtils {
constructor( constructor(
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public common: CommonService, public common: CommonService,
public ts: TranslatorService, public ts: TranslatorService,
private geolocation: Geolocation, // private geolocation: Geolocation,
public platform: Platform, public platform: Platform,
public devicePermissionsService:DevicePermissionsService, public devicePermissionsService:DevicePermissionsService,
) { } ) { }
@ -98,32 +98,32 @@ export class HMGUtils {
} }
private getGMSLocation(callBack: Function) { private getGMSLocation(callBack: Function) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { // this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) { // if (resp && (resp.latitude && resp.longitude)) {
const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled; // const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled;
const lat = resp.latitude; // const lat = resp.latitude;
const long = resp.longitude; // const long = resp.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation}) // callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation})
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}, (error) => { // }, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} }
private getIOSLocation(callBack: Function) { private getIOSLocation(callBack: Function) {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { // this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) { // if (resp && resp.coords.latitude && resp.coords.longitude) {
const lat = resp.coords.latitude; // const lat = resp.coords.latitude;
const long = resp.coords.longitude; // const long = resp.coords.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":false}) // callBack({"latitude":lat, "longitude":long, "isfake":false})
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}).catch(error => { // }).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-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 { DevicePermissionsService } from '../device-permissions/device-permissions.service';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
import { SharedDataService } from '../shared-data-service/shared-data.service'; 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 { AttendanceService } from 'src/app/home/services/attendance.services';
import { ZBar } from '@ionic-native/zbar/ngx'; // import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request'; import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
import { AuthenticatedUser } from '../authentication/models/authenticated-user'; import { AuthenticatedUser } from '../authentication/models/authenticated-user';
import { CommonService } from '../common/common.service'; 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 { Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service'; import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service';
import { Device } from '@ionic-native/device/ngx'; 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 { Platform } from '@ionic/angular';
import { ModalController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx';
@ -37,17 +37,17 @@ export class AttendScanService {
public collection = 'CS'; public collection = 'CS';
constructor(private device: Device, constructor(private device: Device,
private zbar: ZBar, // private zbar: ZBar,
private geolocation: Geolocation, // private geolocation: Geolocation,
private attendance_service: AttendanceService, private attendance_service: AttendanceService,
private barcodeScanner: BarcodeScanner, // private barcodeScanner: BarcodeScanner,
private cameraController: Camera, private cameraController: Camera,
public sharedData: SharedDataService, public sharedData: SharedDataService,
private sanitizer: DomSanitizer, private sanitizer: DomSanitizer,
private permissions: DevicePermissionsService, private permissions: DevicePermissionsService,
public common: CommonService, public common: CommonService,
public ts: TranslatorService, public ts: TranslatorService,
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public platform: Platform, public platform: Platform,
public modalController: ModalController, public modalController: ModalController,
public firebasex: FirebaseX, public firebasex: FirebaseX,
@ -135,22 +135,22 @@ export class AttendScanService {
} }
scanCode() { scanCode() {
this.barcodeScanner // this.barcodeScanner
.scan() // .scan()
.then(barcodeData => { // .then(barcodeData => {
if (!barcodeData.cancelled) { // if (!barcodeData.cancelled) {
this.scannedResult = barcodeData; // this.scannedResult = barcodeData;
this.deviceID = this.device.uuid; // this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) { // if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance(); // this.fakeSwipeAttendance();
} else { // } else {
this.swipeAttendance(); // this.swipeAttendance();
} // }
} // }
}) // })
.catch(err => { // .catch(err => {
console.log('Error', err); // console.log('Error', err);
}); // });
} }
fakeSwipeAttendance() { fakeSwipeAttendance() {

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

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

@ -13,7 +13,7 @@ import { AlertControllerService } from '../../ui/alert/alert-controller.service'
//import { Response } from "../models/response"; //import { Response } from "../models/response";
import { Response } from 'src/app/hmg-common/services/models/response'; import { Response } from 'src/app/hmg-common/services/models/response';
import { Location, DatePipe } from '@angular/common'; 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 { BrowserConfig } from './models/browser-config';
import { import {
LaunchNavigator, LaunchNavigator,
@ -26,7 +26,7 @@ import { SharedDataService } from '../shared-data-service/shared-data.service';
import { Badge } from '@ionic-native/badge/ngx'; import { Badge } from '@ionic-native/badge/ngx';
import { LifeCycleService } from '../life-cycle/life-cycle.service'; import { LifeCycleService } from '../life-cycle/life-cycle.service';
import { Diagnostic } from '@ionic-native/diagnostic/ngx'; 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({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -105,7 +105,7 @@ export class CommonService {
public toastController: ToastController, public toastController: ToastController,
public alertController: AlertControllerService, public alertController: AlertControllerService,
public alertControllerIonic: AlertController, public alertControllerIonic: AlertController,
public themeableBrowser: ThemeableBrowser, // public themeableBrowser: ThemeableBrowser,
public launchNavigation: LaunchNavigator, public launchNavigation: LaunchNavigator,
public platform: Platform, public platform: Platform,
public device: Device, public device: Device,
@ -113,7 +113,7 @@ export class CommonService {
public badge: Badge, public badge: Badge,
public lifeCycle: LifeCycleService, public lifeCycle: LifeCycleService,
public diagnostic: Diagnostic, public diagnostic: Diagnostic,
public iab: InAppBrowser, // public iab: InAppBrowser,
private menu: MenuController, private menu: MenuController,
) { } ) { }
@ -243,6 +243,19 @@ export class CommonService {
}); });
toast.present(); 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) { async greenToast(message: string) {
const toast = await this.toastController.create({ const toast = await this.toastController.create({
message: message, message: message,
@ -683,52 +696,52 @@ export class CommonService {
onSuccess?, onSuccess?,
successURLS?: string[] successURLS?: string[]
) { ) {
this.platform.ready().then(() => { // this.platform.ready().then(() => {
const browser = this.iab.create( // const browser = this.iab.create(
url, // url,
'_blank', // '_blank',
'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no' // 'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
); // );
// browser.executeScript(...); // // browser.executeScript(...);
// browser.insertCSS(...); // // browser.insertCSS(...);
browser.on('loaderror').subscribe(event => { // browser.on('loaderror').subscribe(event => {
if (onFaild) { // if (onFaild) {
onFaild(); // onFaild();
} // }
browser.close(); // browser.close();
}); // });
/* // /*
browser.on('loadstop').subscribe(event => { // browser.on('loadstop').subscribe(event => {
// browser.insertCSS({ code: 'body{color: white;}' }); // // browser.insertCSS({ code: 'body{color: white;}' });
if (onSuccess) { // if (onSuccess) {
onSuccess(); // onSuccess();
} // }
}); // });
*/ // */
browser.on('exit').subscribe(event => { // browser.on('exit').subscribe(event => {
if (onExit) { // if (onExit) {
onExit(); // onExit();
} // }
}); // });
browser.on('loadstart').subscribe(event => { // browser.on('loadstart').subscribe(event => {
if (successURLS) { // if (successURLS) {
successURLS.forEach((successURL, index) => { // successURLS.forEach((successURL, index) => {
if (event.url && event.url.indexOf(successURL) >= 0) { // if (event.url && event.url.indexOf(successURL) >= 0) {
// alert('load start found success url'); // // alert('load start found success url');
browser.close(); // browser.close();
if (onSuccess) { // if (onSuccess) {
onSuccess(); // onSuccess();
} // }
} // }
}); // });
} // }
}); // });
}); // });
} }
public imageFromBase64(base64: string) { public imageFromBase64(base64: string) {
@ -1192,7 +1205,6 @@ export class CommonService {
this.nav.navigateForward(['/eit/homepage']); this.nav.navigateForward(['/eit/homepage']);
} }
public openMyTeamPage() { public openMyTeamPage() {
console.log('someeeeeeee');
this.nav.navigateForward(['/my-team/home']); this.nav.navigateForward(['/my-team/home']);
} }
public openMyTeamDetailPage() { public openMyTeamDetailPage() {
@ -1350,9 +1362,13 @@ export class CommonService {
public openAnnouncement() { public openAnnouncement() {
this.nav.navigateForward(['/backend-integrations/announcement']); this.nav.navigateForward(['/backend-integrations/announcement']);
} }
public openConcurrentReport() { public openConcurrentReport(value: boolean) {
const navigationExtras: NavigationExtras = {
this.nav.navigateForward(['/reports/concurrent-report']); queryParams: {
fromHome: value
}
};
this.nav.navigateForward(['/reports/concurrent-report'], navigationExtras);
} }
public openConcurrentTransaction() { public openConcurrentTransaction() {
@ -1600,9 +1616,14 @@ export class CommonService {
} }
public setFilterValues(data) { public setFilterValues(data) {
for (const notification of data) { if (data.length > 0) {
this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER 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 { export class BrowserConfig {
public static OPTIONS: ThemeableBrowserOptions = { // public static OPTIONS: ThemeableBrowserOptions = {
statusbar: { // statusbar: {
color: '#ffffffff' // color: '#ffffffff'
}, // },
toolbar: { // toolbar: {
height: 44, // height: 44,
color: '#f0f0f0ff' // color: '#f0f0f0ff'
}, // },
title: { // title: {
color: '#003264ff', // color: '#003264ff',
showPageTitle: true // showPageTitle: true
}, // },
backButton: { // backButton: {
image: 'back', // image: 'back',
imagePressed: 'back_pressed', // imagePressed: 'back_pressed',
align: 'left', // align: 'left',
event: 'backPressed' // event: 'backPressed'
}, // },
forwardButton: { // forwardButton: {
image: 'forward', // image: 'forward',
imagePressed: 'forward_pressed', // imagePressed: 'forward_pressed',
align: 'left', // align: 'left',
event: 'forwardPressed' // event: 'forwardPressed'
}, // },
closeButton: { // closeButton: {
image: 'close', // image: 'close',
imagePressed: 'close_pressed', // imagePressed: 'close_pressed',
align: 'left', // align: 'left',
event: 'closePressed' // event: 'closePressed'
}, // },
customButtons: [ // customButtons: [
{ // {
image: 'share', // image: 'share',
imagePressed: 'share_pressed', // imagePressed: 'share_pressed',
align: 'right', // align: 'right',
event: 'sharePressed' // event: 'sharePressed'
} // }
], // ],
menu: { // menu: {
image: 'menu', // image: 'menu',
imagePressed: 'menu_pressed', // imagePressed: 'menu_pressed',
title: 'Test', // title: 'Test',
cancel: 'Cancel', // cancel: 'Cancel',
align: 'right', // align: 'right',
items: [ // items: [
{ // {
event: 'helloPressed', // event: 'helloPressed',
label: 'Hello World!' // label: 'Hello World!'
}, // },
{ // {
event: 'testPressed', // event: 'testPressed',
label: 'Test!' // label: 'Test!'
} // }
] // ]
}, // },
backButtonCanClose: true, // backButtonCanClose: true,
clearcache: true, // clearcache: true,
clearsessioncache: true, // clearsessioncache: true,
disallowoverscroll: 'yes' // disallowoverscroll: 'yes'
}; // };
} }

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

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

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

@ -1,7 +1,7 @@
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}"> <div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div> <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 *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> </div>

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

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

@ -12,6 +12,11 @@
<img [src]="userImage"/> <img [src]="userImage"/>
</div> </div>
</ion-col> </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" --> <!-- *ngIf="getPassdirfromNotifiPage == true" -->
<ion-col *ngIf="updateDirection" [size]="2" style="padding: 0;" (click)="closeModal()"> <ion-col *ngIf="updateDirection" [size]="2" style="padding: 0;" (click)="closeModal()">
@ -19,7 +24,8 @@
<img style=" <img style="
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-top: 5px;" position: absolute;
top: -30px;"
[src]="close" [src]="close"
/> />
</div> </div>

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

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

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

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

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

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

@ -25,7 +25,7 @@
</ion-slides> </ion-slides>
</ion-row> </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-col [size]="12">
<ion-label class="menu-label">{{menuItem.PROMPT}}</ion-label> <ion-label class="menu-label">{{menuItem.PROMPT}}</ion-label>
</ion-col> </ion-col>
@ -61,6 +61,94 @@
</ion-row> </ion-row>
</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-row *ngIf="showStaticServices">
<ion-col size="12"> <ion-col size="12">
<ion-label> {{'general,other-services' | translate}} </ion-label> <ion-label> {{'general,other-services' | translate}} </ion-label>

@ -43,14 +43,17 @@ ion-title {
ion-label { ion-label {
display: block; display: block;
color: black !important; color: #004D71 !important;
font-size: 14px; font-size: 16px;
font-weight: bold; font-weight: bold;
letter-spacing: 0.16px;
// margin: 0px 10px 10px 10px;
} }
.main-dashboard-container { .main-dashboard-container {
position: relative; position: relative;
width: 100%; width: 100%;
--background: #f5f5f5;
} }
.contentBg:before { .contentBg:before {
@ -80,6 +83,8 @@ ion-label {
width: 100%; width: 100%;
margin-top: 25px; margin-top: 25px;
margin-bottom: 0px; margin-bottom: 0px;
// margin-right: 10px !important;
margin-left: 5px !important;
h3 { h3 {
font-size: 18px; font-size: 18px;
@ -90,6 +95,7 @@ ion-label {
span { span {
font-size: 13px; font-size: 13px;
display: block; display: block;
margin-top: 5px;
} }
img { img {
@ -106,7 +112,7 @@ ion-label {
--box-shadow: none !important; --box-shadow: none !important;
height: auto; height: auto;
min-height: inherit; min-height: inherit;
margin-top: 10px; margin-top: 15px;
font-size: 12px; font-size: 12px;
} }
} }
@ -183,3 +189,18 @@ ion-label {
width: 25px; 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 { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; // import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx'; import { Device } from '@ionic-native/device/ngx';
import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'; import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request';
import { COCRequest } from 'src/app/notification/models/COCRequest'; 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 { WorklistMainService } from '../notification/service/work-list.main.service';
import { isThisISOWeek } from 'date-fns'; import { isThisISOWeek } from 'date-fns';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; // import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { NFC, Ndef } from "@ionic-native/nfc/ngx" // import { NFC, Ndef } from "@ionic-native/nfc/ngx"
import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component'; import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component"; import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
@ -54,7 +54,7 @@ export class HomePage implements OnInit {
userData: any = {}; userData: any = {};
userImage: any = '../assets/imgs/profile.png'; userImage: any = '../assets/imgs/profile.png';
menuList: any = []; menuList: any = [];
zbarOptions: any; // zbarOptions: any;
scannedResult: any; scannedResult: any;
notBadge: any; notBadge: any;
lat: any; lat: any;
@ -66,6 +66,7 @@ export class HomePage implements OnInit {
camera: boolean; camera: boolean;
ticketRequestObject: any; ticketRequestObject: any;
leaveRequestObject: any; leaveRequestObject: any;
businessLeaveRequestObject: any;
missingSwipeRequestObject: any; missingSwipeRequestObject: any;
public isShow = false; public isShow = false;
public showVcationRule = false; public showVcationRule = false;
@ -134,6 +135,7 @@ export class HomePage implements OnInit {
direction: string; direction: string;
public isPostNoLoad = true; public isPostNoLoad = true;
public showStaticServices = false; public showStaticServices = false;
public myRequestData: any;
constructor( constructor(
public ts: TranslatorService, public ts: TranslatorService,
@ -143,10 +145,10 @@ export class HomePage implements OnInit {
public common: CommonService, public common: CommonService,
public events: Events, public events: Events,
private device: Device, private device: Device,
private geolocation: Geolocation, // private geolocation: Geolocation,
private attendanceService: AttendanceService, private attendanceService: AttendanceService,
private eitService: EitService, private eitService: EitService,
private barcodeScanner: BarcodeScanner, // private barcodeScanner: BarcodeScanner,
public actionSheetCtrl: ActionSheetController, public actionSheetCtrl: ActionSheetController,
public sharedData: SharedDataService, public sharedData: SharedDataService,
private sanitizer: DomSanitizer, private sanitizer: DomSanitizer,
@ -158,9 +160,9 @@ export class HomePage implements OnInit {
public workListService: WorklistMainService, public workListService: WorklistMainService,
public router: Router, public router: Router,
private platform: Platform, private platform: Platform,
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public modalController: ModalController, public modalController: ModalController,
private nfc: NFC, // private nfc: NFC,
public firebasex: FirebaseX public firebasex: FirebaseX
) { ) {
this.events.subscribe('img-change', displayImg => { this.events.subscribe('img-change', displayImg => {
@ -196,7 +198,7 @@ export class HomePage implements OnInit {
spaceBetween: 10 spaceBetween: 10
}; };
this.slideOptsTwo = { this.slideOptsTwo = {
slidesPerView: width > 320 ? 3.2 : 2.5, slidesPerView: width > 320 ? 3.4 : 2.4,
spaceBetween: width > 320 ? 10 : 5 spaceBetween: width > 320 ? 10 : 5
}; };
this.showStaticServices = true; this.showStaticServices = true;
@ -271,32 +273,32 @@ export class HomePage implements OnInit {
this.location = granted as boolean; this.location = granted as boolean;
if (this.location) { if (this.location) {
if (this.platform.is('android')) { if (this.platform.is('android')) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { // this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) { // if (resp && (resp.latitude && resp.longitude)) {
if (resp.isFromMockProvider || resp.mockLocationsEnabled) { // if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.isFakeLocationUsed = true; // this.isFakeLocationUsed = true;
} // }
this.lat = resp.latitude; // this.lat = resp.latitude;
this.longt = resp.longitude; // this.longt = resp.longitude;
this.attendance(); // this.attendance();
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}, (error) => { // }, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} else { } else {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { // this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) { // if (resp && resp.coords.latitude && resp.coords.longitude) {
this.lat = resp.coords.latitude; // this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude; // this.longt = resp.coords.longitude;
this.attendance(); // this.attendance();
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}).catch(error => { // }).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} }
} else { } else {
return false; return false;
@ -309,7 +311,7 @@ export class HomePage implements OnInit {
if (servicePrivilage.Previlege === false) { if (servicePrivilage.Previlege === false) {
if (servicePrivilage.ServiceName === 'accrualBalance') { if (servicePrivilage.ServiceName === 'accrualBalance') {
this.statsButtons[3].show = false; this.statsButtons[3].show = false;
this.statsButtons[4].show = false; // this.statsButtons[4].show = false;
} }
if (servicePrivilage.ServiceName === 'vacationRule') { if (servicePrivilage.ServiceName === 'vacationRule') {
this.showVcationRule = false; this.showVcationRule = false;
@ -432,6 +434,10 @@ export class HomePage implements OnInit {
} else { } else {
this.events.publish('myTeamFlag', 'false'); this.events.publish('myTeamFlag', 'false');
} }
if (this.menuList[i].MENU_TYPE === 'E') {
this.myRequestData = this.menuList[i];
}
} }
// if (item.MENU_TYPE === 'M') { // if (item.MENU_TYPE === 'M') {
@ -517,6 +523,10 @@ export class HomePage implements OnInit {
// tslint:disable-next-line: triple-equals // tslint:disable-next-line: triple-equals
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') { } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') {
this.missingSwipeRequestObject = result.GetMenuEntriesList[i]; 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); this.sortMenuEntires(result.GetMenuEntriesList);
@ -546,22 +556,22 @@ export class HomePage implements OnInit {
} }
scanCode() { scanCode() {
this.barcodeScanner // this.barcodeScanner
.scan() // .scan()
.then(barcodeData => { // .then(barcodeData => {
if (!barcodeData.cancelled) { // if (!barcodeData.cancelled) {
this.scannedResult = barcodeData; // this.scannedResult = barcodeData;
this.deviceID = this.device.uuid; // this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) { // if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance(); // this.fakeSwipeAttendance();
} else { // } else {
this.swipeAttendance(); // this.swipeAttendance();
} // }
} // }
}) // })
.catch(err => { // .catch(err => {
console.log('Error', err); // console.log('Error', err);
}); // });
} }
fakeSwipeAttendance() { 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' && subMenu.FUNCTION_NAME === 'XXX_HR_EIT_LOA_CREATE_SS') {
if (subMenu.REQUEST_TYPE === 'EIT') { if (subMenu.REQUEST_TYPE === 'EIT') {
// this.common.openAbsencePage(); // this.common.openAbsencePage();
this.common.openEitListPage(); this.common.openEitListPage();
} else if (subMenu.REQUEST_TYPE === 'EIT') { } else if (subMenu.REQUEST_TYPE === 'EIT') {
this.common.openEitListPage(); this.common.openEitListPage();
} else if (subMenu.REQUEST_TYPE === 'PAYSLIP') { } else if (subMenu.REQUEST_TYPE === 'PAYSLIP') {
@ -803,6 +813,11 @@ export class HomePage implements OnInit {
this.common.openProfile('contact'); this.common.openProfile('contact');
} else if (subMenu.REQUEST_TYPE === 'CONTACT') { } else if (subMenu.REQUEST_TYPE === 'CONTACT') {
this.common.openProfile('family'); 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') { if (subMenu.REQUEST_TYPE === 'TIME_CARD') {
this.common.openTimeCardPage(); this.common.openTimeCardPage();
@ -825,11 +840,13 @@ export class HomePage implements OnInit {
let totalTicketsLeft = 0; let totalTicketsLeft = 0;
this.accrualBalancesList = result.GetAccrualBalancesList; this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of 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.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(accrualBalance, 'leaveAccrualBalance');
this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate'); this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate');
// this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance'); // 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 { // else {
// totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; // totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
@ -852,14 +869,10 @@ export class HomePage implements OnInit {
// tslint:disable-next-line: triple-equals // tslint:disable-next-line: triple-equals
if (link == '0') { if (link == '0') {
this.isFakeLocationUsed = false; this.isFakeLocationUsed = false;
// this.getDeviceLocation();
this.showAttendanceOptions(); this.showAttendanceOptions();
// tslint:disable-next-line: triple-equals
} else if (link == '1') { } else if (link == '1') {
// this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.common.startLoading(); this.common.startLoading();
this.common.openNotificationPage(); this.common.openNotificationPage();
// tslint:disable-next-line: triple-equals
} else if (link == '2') { } else if (link == '2') {
// this.openPage(this.missingSwipeRequestObject); // this.openPage(this.missingSwipeRequestObject);
// tslint:disable-next-line: triple-equals // tslint:disable-next-line: triple-equals
@ -897,4 +910,8 @@ export class HomePage implements OnInit {
openAnnouncement() { openAnnouncement() {
this.common.openAnnouncement(); this.common.openAnnouncement();
} }
public performanceEvaluation() {
this.common.openPerformanceevaluation();
}
} }

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

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

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

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

@ -245,10 +245,10 @@ export class DetailsComponent implements OnInit {
this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false); this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false);
console.log(this.employee); console.log(this.employee);
let jobTitle = this.employee.POSITION_NAME.split('.'); let jobTitle = this.employee.POSITION_NAME;
if (jobTitle && jobTitle.length > 1) { // if (jobTitle && jobTitle.length > 1) {
this.jobName = jobTitle[0] + " " + jobTitle[1]; this.jobName = jobTitle;
} // }
const request = { const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER

@ -1,6 +1,5 @@
<app-generic-header <app-generic-header
showBack="true" showBack="true"
subordinateLeave='true'
backLink="/home" backLink="/home"
[headerText]="'myTeam, myTeam-header' | translate"> [headerText]="'myTeam, myTeam-header' | translate">
</app-generic-header> </app-generic-header>
@ -40,11 +39,11 @@
<ion-row> <ion-row>
<ion-col > <ion-col >
<div (ionChange)="searchEmployee($event)" class="search-label"> <div (ionChange)="searchEmployee($event)" class="search-label">
<ion-input *ngIf="showEmailInput" placeholder="Search by Email" [(ngModel)]="searchEmail" pattern="email" ></ion-input> <ion-input *ngIf="showEmailInput" [placeholder]="'myTeam, search-email' | translate" [(ngModel)]="searchEmail" pattern="email" ></ion-input>
<ion-input *ngIf="showUserNameOrNameInput" placeholder ="Search by Name" [(ngModel)]="searchNameOrUserName" ></ion-input> <ion-input *ngIf="showUserNameOrNameInput" [placeholder]="'myTeam, search-name' | translate" [(ngModel)]="searchNameOrUserName" ></ion-input>
<ion-input *ngIf="showUserNameInput" placeholder ="Search by Username" [(ngModel)]="searchUserName" ></ion-input> <ion-input *ngIf="showUserNameInput" [placeholder]="'myTeam, search-username' | translate" [(ngModel)]="searchUserName" ></ion-input>
</div> </div>
<div *ngIf="isSearch" (click)="clearSearch()" class="search-container"> <div *ngIf="isSearch" (click)="clearSearch()" [class]="direction =='en' ? 'search-container' : 'search-container-ar'">
<ion-col style="float: right;" > <ion-col style="float: right;" >
<ion-icon name="close" ></ion-icon> <ion-icon name="close" ></ion-icon>
</ion-col> </ion-col>
@ -52,84 +51,12 @@
</ion-col> </ion-col>
</ion-row> </ion-row>
</div> </div>
<!-- <div class="result-text-container">
<h2>{{totalEmployees}}</h2>
<span>{{ts.trPK('myTeam','total')}} <br> {{ts.trPK('myTeam','team-members')}}</span>
</div> -->
</div> </div>
<div class="div"> <div class="div">
<div class="text" >{{ts.trPK('myTeam','my-team-members')}}</div> <div class="text" >{{ts.trPK('myTeam','my-team-members')}}</div>
<div [ngClass]="direction == 'en' ? 'numberEmp':'numberEmp-ar' ">{{EmployeeTotal}}</div> <div [ngClass]="direction == 'en' ? 'numberEmp':'numberEmp-ar' ">{{EmployeeTotal}}</div>
</div> </div>
<!-- <div>
<ion-row>
<ion-col><p class="text">{{ts.trPK('myTeam','my-team-members')}}</p></ion-col>
<ion-col> <div [ngClass]="direction == 'en' ? 'number':'number-ar' ">
<p class="numberEmp">{{EmployeeTotal}}</p></div></ion-col>
</ion-row>
</div> -->
<!-- <div class="result-graph">
<div class="request-heading">
<span>{{ts.trPK('myTeam','team-stats')}}</span>
</div>
<div class="result-text-container">
<h2>{{totalEmployees}}</h2>
<span>{{ts.trPK('myTeam','total')}} <br> {{ts.trPK('myTeam','team-members')}}</span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div> -->
<!-- <ion-row class="filters-row">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of filters; let i=index">
<app-card-filter
[value]="filter.value"
[text]="filter.name"
[color]="filter.color"
[active]="filter.active"
(click)="activeFilter(i)"
></app-card-filter>
</ion-slide>
</ion-slides>
</ion-row> -->
<!-- <div style="margin-top: 15px;background: white;border-radius: 100px;overflow: hidden;">
<ion-row no-padding>
<ion-col [size]="3" class="search-dropdown" no-padding>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="searchKeySelect" (ionChange)="showSelectedField($event)">
<ion-select-option value="Name" selected="true">{{ts.trPK('searchForReplacment','name')}}</ion-select-option>
<ion-select-option value="User Name">{{ts.trPK('searchForReplacment','userName')}} </ion-select-option>
<ion-select-option value="Email">{{ts.trPK('searchForReplacment','email')}} </ion-select-option>
</ion-select>
</ion-col>
<ion-col [size]="7" class="input-container" no-padding>
<ion-input *ngIf="showEmailInput" placeholder="Employee Email" [(ngModel)]="searchEmail" pattern="email"></ion-input>
<ion-input *ngIf="showUserNameOrNameInput" placeholder ="{{ts.trPK('general','search')}}" [(ngModel)]="searchNameOrUserName"></ion-input>
</ion-col>
<ion-col [size]="2" style="background: #ccc;text-align: center;" no-padding (click)="searchEmployee()">
<ion-icon style="margin-top: 10px;font-size: 20px;" class="search-icons" color="light" name="search"></ion-icon>
</ion-col>
</ion-row>
</div> -->
<!-- <div *ngIf="isSearch">
<ion-row class="search-container">
<ion-col style="float: left;" size=[6] (click)="clearSearch()">
<span style="margin-left: 5px;">{{ts.trPK('work-list','clear-search')}}</span>
<ion-icon name="close" ></ion-icon>
</ion-col>
</ion-row>
</div> -->
<ng-container *ngFor="let subordinate of empSubordinate;let i=index"> <ng-container *ngFor="let subordinate of empSubordinate;let i=index">
<app-employee-information <app-employee-information

@ -36,20 +36,14 @@ ion-content {
} }
.request-heading { .request-heading {
padding-left: 15px; padding-left: 20px;
margin-top: 10px; margin-top: 10px;
span { span {
// display: block;
// padding-top: 8px;
// padding-left: 15px;
// font-weight: bold;
// font-size: 12px;
// margin-top: 9px;
text-align: left; text-align: left;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 18px; line-height: 18px;
font-size: 12px; font-weight: bold;
letter-spacing: -0.48px; letter-spacing: -0.48px;
color: #2B353E; color: #2B353E;
opacity: 1; opacity: 1;
@ -57,13 +51,6 @@ ion-content {
} }
.search-label { .search-label {
// border: 1px solid #ccc;
// margin-left: 15px;
// margin-right: 15px;
// border-radius: 22px;
// margin-top: 24px;
// font-size: 11px;
// color: rgb(143, 141, 141);
border: 1px solid #ccc; border: 1px solid #ccc;
margin-left: 15px; margin-left: 15px;
margin-right: 15px; margin-right: 15px;
@ -73,6 +60,7 @@ ion-content {
color: #8f8d8d; color: #8f8d8d;
margin-right: 15px !important; margin-right: 15px !important;
padding: 10px; padding: 10px;
font-family: 'Inter' !important;
} }
.result-graph { .result-graph {
@ -201,6 +189,7 @@ ion-content {
// margin-top: 15px; // margin-top: 15px;
// margin-top: -35px; // margin-top: -35px;
// margin-left: 262px; // margin-left: 262px;
width: 30px; width: 30px;
height: 30px; height: 30px;
position: absolute; position: absolute;
@ -209,9 +198,6 @@ ion-content {
z-index: 999999; z-index: 999999;
ion-col { ion-col {
// background: white;
// border-radius: 12px;
// padding-right: 10px;
flex: none; flex: none;
ion-icon { ion-icon {
@ -228,12 +214,32 @@ ion-content {
} }
} }
// .myClass .toggle-icon { .search-container-ar {
// background-color: purple; // this changes the background, ie the grey stripe.
// .toggle-inner { width: 30px;
// background-color: yellow; // this changes the backgroundcolor of the toggle dot. height: 30px;
// } position: absolute;
// } top: 45px;
left: 38px;
z-index: 999999;
ion-col {
flex: none;
ion-icon {
margin-right: 3px;
font-size: 14px;
margin-left: 3px;
vertical-align: middle;
}
span {
font-size: 12px;
vertical-align: middle;
}
}
}
@media only screen and (max-width: 375px) { @media only screen and (max-width: 375px) {
.text-label { .text-label {
@ -249,34 +255,21 @@ ion-content {
.text-label { .text-label {
// --color: black !important;
// font-size: 13px;
// margin-left: 15px;
// margin-right: 18px;
text-align: left; text-align: left;
// font: normal normal 600 12px/18px Poppins;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 18px; line-height: 18px;
font-size: 12px; font-size: 12px;
letter-spacing: -0.48px; letter-spacing: -0.48px;
color: #575757 !important; color: #575757 !important;
opacity: 1; opacity: 1;
margin-left: 15px; margin-left: 5px;
margin-right: 18px; margin-right: 5px;
font-weight: bold;
} }
.radio-list { .radio-list {
background: white; background: white;
// margin-left: 18px;
/* margin-right: 10px; */
// margin-top: 12px;
} }
// .selected .radio-icon {
// border-color: #0064D9;
// color: red;
// }
.radio-icon { .radio-icon {
.custom-radio .radio-icon { .custom-radio .radio-icon {
@ -291,12 +284,7 @@ ion-content {
} }
.text { .text {
// font-size: 16px;
// font-weight: bolder;
// font-family: 'WorkSans-Bold';
// margin-top: 27px;
text-align: left; text-align: left;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 11px; line-height: 11px;
font-size: 20px; font-size: 20px;
letter-spacing: -0.8px; letter-spacing: -0.8px;
@ -304,26 +292,10 @@ ion-content {
opacity: 1; opacity: 1;
margin-top: 30px; margin-top: 30px;
margin-bottom: 28px; margin-bottom: 28px;
font-weight: bold;
} }
// .number{
// width: 21px;
// height: 21px;
// padding-right: -10px;
// border-radius: 100%;
// background-color: #BE332F;
// z-index: 9;
// margin-top: 26px;
// }
// .numberEmp{
// color: white;
// font-size: 12px;
// font-weight: bolder;
// margin-left: 3px;
// padding-top: 2px;
// }
.number { .number {
width: 22px; width: 22px;
height: 20px; height: 20px;
@ -351,33 +323,52 @@ ion-content {
/* padding-top: 5px; */ /* padding-top: 5px; */
/* padding-right: 20px; */ /* padding-right: 20px; */
margin-left: 13px; margin-left: 13px;
width: 23px; width: 25px;
height: 23px; height: 25px;
border-radius: 100%;
color: white;
font-size: 12px;
font-weight: bolder;
margin-left: 13px;
width: 25px;
height: 25px;
border-radius: 100%; border-radius: 100%;
background-color: #BE332F; background-color: #BE332F;
z-index: 9; z-index: 9;
margin-top: 25px; margin-top: 25px;
text-align: center;
padding-top: 5px;
z-index: 9;
margin-top: 25px;
/* padding-left: 4px; */ /* padding-left: 4px; */
text-align: center; text-align: center;
padding-top: 3px; padding-top: 5px;
} }
.numberEmp-ar { .numberEmp-ar {
color: white; color: white;
font-size: 12px; font-size: 11px;
font-weight: bolder; font-weight: bolder;
/* padding-top: 5px; */
/* padding-right: 20px; */
margin-right: 13px; margin-right: 13px;
width: 23px; width: 25px;
height: 23px; height: 25px;
border-radius: 100%;
color: white;
font-size: 12px;
font-weight: bolder;
margin-left: 13px;
width: 25px;
height: 25px;
border-radius: 100%; border-radius: 100%;
background-color: #BE332F; background-color: #BE332F;
z-index: 9; z-index: 9;
margin-top: 25px; margin-top: 25px;
/* padding-left: 4px; */
text-align: center; text-align: center;
padding-top: 3px; padding-top: 5px;
z-index: 9;
margin-top: 25px;
text-align: center;
padding-top: 5px;
} }
.div { .div {

@ -14,7 +14,7 @@
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col size='6'> <ion-col size='6'>
<ion-label position='floating' style="margin-left: 15px;" class="colBold">{{ts.trPK('general','from')}} </ion-label> <ion-label position='floating' style="margin: 15px;" class="colBold">{{ts.trPK('general','from')}} </ion-label>
<ion-item class='dynamicField' lines='none'> <ion-item class='dynamicField' lines='none'>
<ion-datetime style="padding: 0px" [(ngModel)]="startDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required <ion-datetime style="padding: 0px" [(ngModel)]="startDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required
@ -24,7 +24,7 @@
</ion-item> </ion-item>
</ion-col> </ion-col>
<ion-col size='6'> <ion-col size='6'>
<ion-label position='floating' style="margin-left: 15px;" class="colBold">{{ts.trPK('general','to')}} </ion-label> <ion-label position='floating' style="margin: 15px;" class="colBold">{{ts.trPK('general','to')}} </ion-label>
<ion-item class='dynamicField' lines='none'> <ion-item class='dynamicField' lines='none'>
<ion-datetime style="padding: 0px" [(ngModel)]="endDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required <ion-datetime style="padding: 0px" [(ngModel)]="endDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required
cancelText="{{ts.trPK('general','cancel')}}" cancelText="{{ts.trPK('general','cancel')}}"

@ -157,30 +157,30 @@
opacity: 1; opacity: 1;
} }
.title { .title{
// font-size: 13px; // font-size: 13px;
// color: #888; // color: #888;
// width: 100%; // width: 100%;
// text-overflow: ellipsis; // text-overflow: ellipsis;
// white-space: nowrap; // white-space: nowrap;
// overflow: hidden; // overflow: hidden;
// display: block; // display: block;
// margin-left: -10px; // margin-left: -10px;
// margin-top: -6px; // margin-top: -6px;
// color: black; // color: black;
font-family: var(--fontFamilyPoppins-SemiBold, inherit); font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 12px; line-height: 12px;
letter-spacing: -0.56px; letter-spacing: -0.56px;
color: #575757; color: #575757;
opacity: 1; opacity: 1;
font-size: 14px; font-size: 14px;
width: 100%; width: 100%;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; // overflow: hidden;
display: block; display: block;
margin-left: -10px; margin-left: -10px;
margin-top: -10px; margin-top: -10px;
} }
} }

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

Loading…
Cancel
Save