From 2b5265243e0f9079418b3f1543e6d9e6080c0ab6 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Tue, 18 Feb 2020 13:44:26 +0300 Subject: [PATCH 1/9] add history&RequestPage --- .../app/eit/eit-list/eit-list.component.html | 56 ++++--- .../app/eit/eit-list/eit-list.component.scss | 74 +++++++++ .../performance-evaluation.component.html | 2 +- Mohem/src/app/uI-elements/date-time.input.ts | 4 +- Mohem/src/app/uI-elements/date.input.ts | 4 +- Mohem/src/app/uI-elements/number.input.ts | 4 +- Mohem/src/app/uI-elements/text-area.input.ts | 4 +- Mohem/src/app/uI-elements/text.input.ts | 6 +- Mohem/src/app/uI-elements/time.input.ts | 2 +- Mohem/src/imgs/addicon.png | Bin 0 -> 259 bytes Mohem/src/theme/styles.scss | 155 ++++++++++++++++++ Mohem/src/theme/worklist.scss | 2 +- 12 files changed, 277 insertions(+), 36 deletions(-) create mode 100644 Mohem/src/imgs/addicon.png diff --git a/Mohem/src/app/eit/eit-list/eit-list.component.html b/Mohem/src/app/eit/eit-list/eit-list.component.html index 51a4ac97..5e2769c7 100644 --- a/Mohem/src/app/eit/eit-list/eit-list.component.html +++ b/Mohem/src/app/eit/eit-list/eit-list.component.html @@ -1,15 +1,12 @@ - - - - - - {{headerTitle}} - + + + {{headerTitle}} + - +
@@ -63,9 +60,9 @@
- +
- + +
- +
+
- + + + + + +
+ +
+
+
+
+
-
- - - +
+ +
+
+ +
+ @@ -115,7 +127,7 @@
- - {{'general, add' | translate}} +
\ No newline at end of file diff --git a/Mohem/src/app/eit/eit-list/eit-list.component.scss b/Mohem/src/app/eit/eit-list/eit-list.component.scss index e10a250d..81a31342 100644 --- a/Mohem/src/app/eit/eit-list/eit-list.component.scss +++ b/Mohem/src/app/eit/eit-list/eit-list.component.scss @@ -9,3 +9,77 @@ h4 { text-align: center; color: #000000; } +.grids{ + border-radius: 20px !important; + background: white; + padding-left: 1px; + padding-right: 1px; + margin: 13px; + padding-top: 0px; + padding-bottom: 3px; + padding-left: 13px; + padding-right: 13px; + border: 1px solid #cac8c8; + } + + .bgcolor { + + color: white; + border-top-right-radius: 19px; + border-top-left-radius: 15px; + padding-top: 1; + padding-bottom: 0; + margin-top: 0; + margin-bottom: 0; + /* border-radius: 12px !important; */ + background: #094875; + border-bottom: 1px solid #a7a4a4; + border-top: 1px solid #cac8c8; + margin-left: -13px; + margin-right: -13px; +} +.colEit{ + border-right: 1px solid #cac8c8; + border-bottom-left-radius: -10px !important; + padding-top: 8px; + padding-bottom: 8px; + margin-left: 18px; + font-size: 12px !important; +} + +.header-div { + + background-color: #22C6B3; + text-transform: capitalize; + height: 160px; + position: relative; + display: block; + margin-bottom: -28px; +} + +.header-toolbar-new{ + --background: #22c6b3; +} + +.addClass{ + background-color: #094875; + width: 80px; + height: 80px; + right: 8%; + position: fixed; + color: white; + bottom: 20%; + border-radius: 50%; + z-index: 999; + -webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59); + -moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59); + box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59); +} + +.hrClass{ + border-width: 0; + box-sizing: content-box; + border-bottom: 1px solid #e6e6e6; + background: #fff !important; + height: 1px; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html index 6bb094f2..3d11570b 100644 --- a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html @@ -5,7 +5,7 @@

{{ts.trPK('userProfile','performance')}}

-
+
diff --git a/Mohem/src/app/uI-elements/date-time.input.ts b/Mohem/src/app/uI-elements/date-time.input.ts index aa5c15d8..9225c9fc 100644 --- a/Mohem/src/app/uI-elements/date-time.input.ts +++ b/Mohem/src/app/uI-elements/date-time.input.ts @@ -42,8 +42,8 @@ export class DateTimeInput extends UiElement { // timeValue=arrayDate[1]; // } const template = - "" + - " " + this.label + "" + + "" + + " " + this.label + "" + // "
" + this.value + "
" + "" + // " "+ diff --git a/Mohem/src/app/uI-elements/date.input.ts b/Mohem/src/app/uI-elements/date.input.ts index 9e486e9e..a813416e 100644 --- a/Mohem/src/app/uI-elements/date.input.ts +++ b/Mohem/src/app/uI-elements/date.input.ts @@ -41,8 +41,8 @@ export class DateInput extends UiElement { // " "+ // "
"; - "" + - " " + this.label + "" + + "" + + " " + this.label + "" + // "
" + this.value + "
" + "" + // " "+ diff --git a/Mohem/src/app/uI-elements/number.input.ts b/Mohem/src/app/uI-elements/number.input.ts index da23b7c8..e8b68ee9 100644 --- a/Mohem/src/app/uI-elements/number.input.ts +++ b/Mohem/src/app/uI-elements/number.input.ts @@ -26,8 +26,8 @@ export class NumberInput extends UiElement { // " " + // "
"; - "" + - "" + this.label + "" + + " " + + "" + this.label + "" + " " + " "; diff --git a/Mohem/src/app/uI-elements/text-area.input.ts b/Mohem/src/app/uI-elements/text-area.input.ts index 6f724b74..b16fa4f6 100644 --- a/Mohem/src/app/uI-elements/text-area.input.ts +++ b/Mohem/src/app/uI-elements/text-area.input.ts @@ -26,8 +26,8 @@ export class TextAreaInput extends UiElement { // "" + // " "; - "" + - "" + this.label + "" + + "" + + "" + this.label + "" + "" + this.value + "" + ""; diff --git a/Mohem/src/app/uI-elements/text.input.ts b/Mohem/src/app/uI-elements/text.input.ts index 5a31a96c..9a8632fe 100644 --- a/Mohem/src/app/uI-elements/text.input.ts +++ b/Mohem/src/app/uI-elements/text.input.ts @@ -24,9 +24,9 @@ export class TextInput extends UiElement { if (this.hidden === "N") { this.hidden = "display:none;" } else { this.hidden = "" } const template = // "
" + - "" + - " " + this.label + "" + - " " + + "" + + " " + this.label + "" + + " " + " "; return template; diff --git a/Mohem/src/app/uI-elements/time.input.ts b/Mohem/src/app/uI-elements/time.input.ts index 8f20eb5d..001589f0 100644 --- a/Mohem/src/app/uI-elements/time.input.ts +++ b/Mohem/src/app/uI-elements/time.input.ts @@ -32,7 +32,7 @@ export class TimeInput extends UiElement { } const template = "
" + - " " + + " " + // " "+ "
"+this.value+"
"+ "
"; diff --git a/Mohem/src/imgs/addicon.png b/Mohem/src/imgs/addicon.png new file mode 100644 index 0000000000000000000000000000000000000000..040c628f08dd942f130625beb23a1a2dde649d8b GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~i_{3uG+$o^ zEg+kNfw4W4fd!-lh^2s-fq`iO6I?`O0W*RPlAI`d={S(8^mK6yu@Fp7IKcex|Ns4r z9TN{$+nhQW#=eftcz`%{I#e~1tK;;Sdq$lnRrblwH1TY1} eH8x0zWHRh~U}_=w`TIGLV?15`T-G@yGywn#Ek~OG literal 0 HcmV?d00001 diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index f4c224f2..1c82e109 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -95,6 +95,8 @@ ion-label{ .btnBack{ background: transparent !important; } + + /***************/ .attachImg{ max-width: 30px; @@ -393,7 +395,160 @@ ion-col.colBold,ion-col.colBold>label{ // padding:0px; // } + + + +.floating-form { + width:320px; +} + +// /**** floating-Lable style start ****/ +// .floating-label { +// position:relative; +// margin-bottom:20px; +// } +// .floating-input , .floating-select { +// font-size:14px; +// padding:4px 4px; +// display:block; +// width:100%; +// height:30px; +// background-color: transparent; +// border:none; +// border-bottom:1px solid #757575; +// } + +// .floating-input:focus , .floating-select:focus { +// outline:none; +// border-bottom:2px solid #5264AE; +// } + +// label { +// color:#999; +// font-size:14px; +// font-weight:normal; +// position:absolute; +// pointer-events:none; +// left:5px; +// top:5px; +// transition:0.2s ease all; +// -moz-transition:0.2s ease all; +// -webkit-transition:0.2s ease all; +// } + +// .floating-input:focus ~ label, .floating-input:not(:placeholder-shown) ~ label { +// top:-18px; +// font-size:14px; +// color:#5264AE; +// } + +// .floating-select:focus ~ label , .floating-select:not([value=""]):valid ~ label { +// top:-18px; +// font-size:14px; +// color:#5264AE; +// } + +// /* active state */ +// .floating-input:focus ~ .bar:before, .floating-input:focus ~ .bar:after, .floating-select:focus ~ .bar:before, .floating-select:focus ~ .bar:after { +// width:50%; +// } + +// *, *:before, *:after { +// -webkit-box-sizing: border-box; +// -moz-box-sizing: border-box; +// box-sizing: border-box; +// } + +// .floating-textarea { +// min-height: 30px; +// max-height: 260px; +// overflow:hidden; +// overflow-x: hidden; +// } + +// /* highlighter */ +// .highlight { +// position:absolute; +// height:50%; +// width:100%; +// top:15%; +// left:0; +// pointer-events:none; +// opacity:0.5; +// } + +// /* active state */ +// .floating-input:focus ~ .highlight , .floating-select:focus ~ .highlight { +// -webkit-animation:inputHighlighter 0.3s ease; +// -moz-animation:inputHighlighter 0.3s ease; +// animation:inputHighlighter 0.3s ease; +// } + +// /* animation */ +// @-webkit-keyframes inputHighlighter { +// from { background:#5264AE; } +// to { width:0; background:transparent; } +// } +// @-moz-keyframes inputHighlighter { +// from { background:#5264AE; } +// to { width:0; background:transparent; } +// } +// @keyframes inputHighlighter { +// from { background:#5264AE; } +// to { width:0; background:transparent; } +// } + +// /**** floating-Lable style end ****/ + + + + + + + + + + + + + + + + + + + + +/*** Body style start ***/ + +// html { +// font-family: "Helvetica Neue", Helvetica, "Noto Sans", sans-serif, Arial, sans-serif; +// font-size: 12px; +// line-height: 1.42857143; +// color: #949494; +// background-color: #ffffff; +// } +/*** Body style end ***/ + + +/*** daniel - Fork me friend - style ***/ +// .floating-credit { position:fixed; bottom:10px;right:10px; color:#aaa; font-size:13px;font-family:arial,sans-serif; } +// .floating-credit a { text-decoration:none; color:#000000; font-weight:bold; } +// .floating-credit a:hover { border-bottom:1px dotted #f8f8f8; } +// .floating-heading { position:fixed; color:#aaa; font-size:20px; font-family:arial,sans-serif; } +/*** daniel - Fork me friend - style ***/ + +/**************************TEST********************888/ + + /*****************dynamic form*******************/ +.dynamicField{ + border-radius: 30px; + border: 1px solid grey!important; + margin-bottom: 20px; +} + + .daynamicForm-Label{ font-size: 16px; // margin-left: 15px; diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index ff4399e6..17f43754 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -340,7 +340,7 @@ ion-item{ --flex:none; } ion-input ,ion-datetime{ -border-bottom: #dedede 1px solid; +// border-bottom: #dedede 1px solid; } .left { .timeline:before{ From c85a5ef82a98b05dbbc8d915c1cd163f74a154f2 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Tue, 18 Feb 2020 16:28:07 +0300 Subject: [PATCH 2/9] design confirmation page --- .../confirm-add-eit.component.html | 58 +++++++++++++++++- .../confirm-add-eit.component.scss | 39 ++++++++++++ Mohem/src/assets/imgs/attach-icon.png | Bin 0 -> 537 bytes Mohem/src/imgs/addicon.png | Bin 259 -> 0 bytes Mohem/src/imgs/attach-icon.png | Bin 0 -> 537 bytes 5 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 Mohem/src/assets/imgs/attach-icon.png delete mode 100644 Mohem/src/imgs/addicon.png create mode 100644 Mohem/src/imgs/attach-icon.png diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html index 531ceafe..b8cc8a57 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html @@ -6,7 +6,63 @@ - + + + + + + + + + + +

{{ 'general, notAttch' | translate}}

+
+
+
+
+ + + + {{'confirmAddEit, comment' | translate}} + + + + + +
{{'confirmAddEit, approverList' | translate}}
+ +
+ +
+ + +
+
+ +
+
+ + + {{employee.APPROVER}} + + + {{employee.APPROVER_TYPE}} + + + +
+
+
+
+
+ +
+
{{'confirmAddEit, approverList' | translate}}
diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss index 94ace281..86b81e89 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss @@ -24,3 +24,42 @@ background: transparent; float: right; } + +.attachmentDiv{ + background: #ffffff; + height: 80px; + text-align: center; + padding-top: 1px; + margin: 10px; + border-radius: 34px; + border: 1px solid grey; +} + +.noDataDiv{ + background: #ffffff; + height: 11%; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + border-radius: 5px; +} +.submitNote{ + background: #ffffff; + height: 80px; + text-align: center; + padding-top: 1px; + margin: 10px; + border-radius: 34px; + border: 1px solid grey; +} + +.approvalList{ + background: #ffffff; + height: auto; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + border-radius: 5px; +} diff --git a/Mohem/src/assets/imgs/attach-icon.png b/Mohem/src/assets/imgs/attach-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6af9188ab4e98893bb32832d5e9044c006a4c5bf GIT binary patch literal 537 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|EK(yp(|mmy zw18|52FCVG1{RPKAeI7R1_q`DOmGp21JKf5a_rRVJJD3x@BFVI@YqrI&6x3d=0;m%n*)@_Z{pPM#0p4B=i3 zH|O4Zq2SrgP@s8(U&Mg1eKPfyPk;1?p-Oj>S4Cf^M7_JlXt7gl|S8L^}@^M%71^3H816> zRHBy8VD4dm_jh*&uiWB;l20rDJv0z!?(t>}k!85Q|A|9ii`t13PtTmme%0iw`aZd5 zb4mDSN%QY}IqxXXnyJC~{QmxB&gV)GH~23-y+~u-#@~FGZD#CRw|>uosI(0(Wqv18 zCdB>8C{{I&V9>h%Cq9^ePv7lNY5 M)78&qol`;+0H;9Mk^lez literal 0 HcmV?d00001 diff --git a/Mohem/src/imgs/addicon.png b/Mohem/src/imgs/addicon.png deleted file mode 100644 index 040c628f08dd942f130625beb23a1a2dde649d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~i_{3uG+$o^ zEg+kNfw4W4fd!-lh^2s-fq`iO6I?`O0W*RPlAI`d={S(8^mK6yu@Fp7IKcex|Ns4r z9TN{$+nhQW#=eftcz`%{I#e~1tK;;Sdq$lnRrblwH1TY1} eH8x0zWHRh~U}_=w`TIGLV?15`T-G@yGywn#Ek~OG diff --git a/Mohem/src/imgs/attach-icon.png b/Mohem/src/imgs/attach-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6af9188ab4e98893bb32832d5e9044c006a4c5bf GIT binary patch literal 537 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|EK(yp(|mmy zw18|52FCVG1{RPKAeI7R1_q`DOmGp21JKf5a_rRVJJD3x@BFVI@YqrI&6x3d=0;m%n*)@_Z{pPM#0p4B=i3 zH|O4Zq2SrgP@s8(U&Mg1eKPfyPk;1?p-Oj>S4Cf^M7_JlXt7gl|S8L^}@^M%71^3H816> zRHBy8VD4dm_jh*&uiWB;l20rDJv0z!?(t>}k!85Q|A|9ii`t13PtTmme%0iw`aZd5 zb4mDSN%QY}IqxXXnyJC~{QmxB&gV)GH~23-y+~u-#@~FGZD#CRw|>uosI(0(Wqv18 zCdB>8C{{I&V9>h%Cq9^ePv7lNY5 M)78&qol`;+0H;9Mk^lez literal 0 HcmV?d00001 From 4d6167d6e83abc4c2bc5ff3d6ec5d80e4c1c5caa Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Wed, 19 Feb 2020 12:25:18 +0300 Subject: [PATCH 3/9] finish confirmation page --- .../confirm-add-eit.component.html | 166 ++++++++++-------- .../confirm-add-eit.component.scss | 156 +++++++++++++++- .../confirm-add-eit.component.ts | 111 ++++++++++++ .../work-list-attach.component.ts | 1 + Mohem/src/theme/worklist.scss | 5 + 5 files changed, 361 insertions(+), 78 deletions(-) diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html index b8cc8a57..af315623 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html @@ -8,36 +8,100 @@ - - - - - - - - -

{{ 'general, notAttch' | translate}}

+ + +
{{'general, addAttach' | translate}}
+
+ +
+ +
+
+
+ + + {{ 'general, notAttch' | translate}} + +
+ + +
+ + + + {{attachList.AttachmentID +1 }} . + + + + {{attachList.P_FILE_NAME }} + + + + + + + - +
+
+ +
+ + +
+
+ + {{attachRes.FILE_NAME }} + +
+ + + + + + + +
+
+ +
+ - - {{'confirmAddEit, comment' | translate}} +
{{'confirmAddEit, comment' | translate}}
+ +
-
{{'confirmAddEit, approverList' | translate}}
- -
+
+
- +
@@ -47,10 +111,10 @@ src="../assets/imgs/profile.png">
- + {{employee.APPROVER}} - + {{employee.APPROVER_TYPE}} @@ -63,13 +127,13 @@ - + + @@ -88,14 +152,10 @@ {{'confirmAddEit, status' | translate}} - - + - - + {{item.APPROVER_ORDER_NUMBER}} @@ -114,9 +174,7 @@ - + @@ -125,44 +183,7 @@
- - - - - +
@@ -225,18 +246,15 @@ - +
- + --> + -
diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss index 86b81e89..c78deefc 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss @@ -27,11 +27,11 @@ .attachmentDiv{ background: #ffffff; - height: 80px; + height: auto; text-align: center; padding-top: 1px; margin: 10px; - border-radius: 34px; + border-radius: 15px; border: 1px solid grey; } @@ -47,10 +47,9 @@ .submitNote{ background: #ffffff; height: 80px; - text-align: center; padding-top: 1px; margin: 10px; - border-radius: 34px; + border-radius: 15px; border: 1px solid grey; } @@ -63,3 +62,152 @@ margin: 10px; border-radius: 5px; } + +/************************New Design**********************************/ +.notification-list{ + background: none; + background: none; + border-radius: 32px; + ion-item{ + // margin-top: 5px; + // margin-bottom: 5px; + + background-color: transparent; + .item-date{ + width: 100%; + font-size: 16px; + font-weight: bold; + + text-align: start; + padding: 0; + margin: 0; + + position: absolute; + left: 0; + top: 12%; + } + ion-label , [item-end]{ + + white-space: normal; + font-size: 14px; + padding-top: 15%; + // :root[dir="ltr"]{ + // margin-left: 10px; + // } + // :root[dir="rtl"]{ + // margin-right: 10px; + // } + + } + + } +} + + + + + + +.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:100%; + height: 100%; + 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: #30b8c6; + 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; +} \ No newline at end of file diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts index 4171b53f..f8168390 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts @@ -12,6 +12,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { EitService } from '../services/eit.service'; import { AddEitResponse } from '../models/add.eit.response'; +import { FileUploader } from 'ng2-file-upload'; @Component({ selector: 'app-confirm-add-eit', @@ -46,6 +47,20 @@ export class ConfirmAddEitComponent implements OnInit { isSubmitBtnClicked: boolean; isDelete: boolean = false; + /***Add Attchment Vars */ + isUpload: boolean = false; + inQueue: boolean = false; + addAttachmentListReq: any; + attachmentID: number = 0; + addAttachRequest: any = []; + fileData: any; + fileType: any; + dirPage: any; + TransactionID: any; + 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']; + + constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) { this.isSubmitBtnClicked = false; this.eitRequest = new EitRequest(); @@ -413,4 +428,100 @@ export class ConfirmAddEitComponent implements OnInit { this.cancelEitProcess(); } + /*******************Add attchement Functions*************/ + + public uploader: FileUploader = new FileUploader({ + allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], + maxFileSize: 10 * 1024 * 1024, + formatDataFunctionIsAsync: true, + formatDataFunction: async (item) => { + return new Promise((resolve, reject) => { + resolve({ + name: item._file.name, + length: item._file.size, + contentType: item._file.type, + date: new Date() + }); + }); + } + }); + + + onFileSelected(input) { + + // this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){ + + if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { + let msg: string = ""; + msg = this.ts.trPK("general", "notSupport"); + this.cs.presentAlert(msg); + return + } // todo: show alert that you tried uploading wrong files + + else { + + const file = input.target.files[0]; + + // console.log(file); + + //var encoded = Base64.encode(file); + this.getBase64(file).then( + data => this.pushObject(data, file.name, file.type) + ); + + // } + // }; + + } + } + + + getBase64(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); + } + + + pushObject(fileData, name, type) { + + console.log("before push: "+ this.index); + //this.attachListOver.length++; + try { + let array = name.split('.'); + let attachType: string = array[array.length - 1]; + + this.attachListOver.push( + { + AttachmentID: this.attachListOver.length, + P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1], + P_FILE_DATA: fileData.split(',')[1], + P_FILE_NAME: name,//.split('.')[0], + P_TRANSACTION_ID: this.TransactionID + }) + + } catch (e) { + + } + + + //console.log("after push: "+ this.index); + // return this.addAttachRequest + } + + + // removeFile(objectitem) { + + // let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem); + // this.uploader.queue.splice(objIndex1, 1); + // let objIndex = this.addAttachRequest.findIndex(item => item.AttachmentID == objectitem.AttachmentID); + // this.addAttachRequest.splice(objIndex, 1); + // // this.addAttachRequest =this.addAttachRequest.filter(item => item.AttachmentID !== objectitem.AttachmentID); + + // } + + } diff --git a/Mohem/src/app/notification/work-list-attach/work-list-attach.component.ts b/Mohem/src/app/notification/work-list-attach/work-list-attach.component.ts index c73997b3..5a43d43c 100644 --- a/Mohem/src/app/notification/work-list-attach/work-list-attach.component.ts +++ b/Mohem/src/app/notification/work-list-attach/work-list-attach.component.ts @@ -32,6 +32,7 @@ export class WorkListAttachComponent implements OnInit { // modal.present(); this.cs.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage') + const modal = await this.modalCtrl.create({ component: WorkListAttachViewComponent }); diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index 17f43754..be2127bc 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -366,3 +366,8 @@ left: 66px; } +.approvalTitle{ + font-weight: bold; + font-size: 16px; + text-align: left; +} \ No newline at end of file From 2ee9d51f7e80d3d4d4d7c27a6c34d8de9081ba3e Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Wed, 19 Feb 2020 19:51:34 +0300 Subject: [PATCH 4/9] finish Eit new design --- .../app/eit/add-eit/add-eit.component.html | 4 +- .../app/eit/add-eit/add-eit.component.scss | 18 ++++++- .../confirm-add-eit.component.html | 6 +-- .../confirm-add-eit.component.scss | 30 +++++++++++ .../confirm-add-eit.component.ts | 34 +++++++++++- .../app/eit/eit-list/eit-list.component.ts | 2 +- Mohem/src/app/eit/eit.module.ts | 8 ++- .../submit-eit-modal.component.html | 39 ++++++++++++++ .../submit-eit-modal.component.scss | 53 +++++++++++++++++++ .../submit-eit-modal.component.spec.ts | 27 ++++++++++ .../submit-eit-modal.component.ts | 36 +++++++++++++ Mohem/src/app/uI-elements/select.input.ts | 2 +- Mohem/src/theme/styles.scss | 13 +++-- 13 files changed, 259 insertions(+), 13 deletions(-) create mode 100644 Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.html create mode 100644 Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.scss create mode 100644 Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.spec.ts create mode 100644 Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.ts diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.html b/Mohem/src/app/eit/add-eit/add-eit.component.html index a83c748d..91fde23b 100644 --- a/Mohem/src/app/eit/add-eit/add-eit.component.html +++ b/Mohem/src/app/eit/add-eit/add-eit.component.html @@ -1,5 +1,5 @@ - + @@ -22,7 +22,7 @@
- + {{'vacation-rule, next-label' | translate}}
\ No newline at end of file diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.scss b/Mohem/src/app/eit/add-eit/add-eit.component.scss index c8182a3b..08f5fd5c 100644 --- a/Mohem/src/app/eit/add-eit/add-eit.component.scss +++ b/Mohem/src/app/eit/add-eit/add-eit.component.scss @@ -11,7 +11,7 @@ ion-label { .daynamicForm-Label { font-size: 16px; - color: var(--customnavy) !important; + color: #a2a5a6 !important; display: block; overflow: hidden; -webkit-flex: 1; @@ -20,4 +20,20 @@ ion-label { white-space: normal; padding: 5px 0px; margin: 10px auto; + padding-left: 10px; +} + +.header-toolbar-new{ + --background: #22c6b3; } +.addEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + background-color: #22c6b3; + width: 80% !important; + color: white!important; + border-radius: 16px !important; +} \ No newline at end of file diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html index af315623..aa9cf636 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.html @@ -1,5 +1,5 @@ - + {{headerTitle}} @@ -115,7 +115,7 @@ {{employee.APPROVER}} - {{employee.APPROVER_TYPE}} + {{employee.POSITION_TITLE}} @@ -260,7 +260,7 @@
- + {{ (isDelete ? 'general, delete' : 'general, submit') | translate }}
\ No newline at end of file diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss index c78deefc..7e35df19 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss @@ -210,4 +210,34 @@ 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: #22c6b3; +} + +.confirmEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + background-color: #22c6b3; + width: 80% !important; + color: white!important; + border-radius: 16px !important; } \ No newline at end of file diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts index f8168390..608e2308 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts @@ -13,6 +13,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl import { EitService } from '../services/eit.service'; import { AddEitResponse } from '../models/add.eit.response'; import { FileUploader } from 'ng2-file-upload'; +import { SubmitEitModalComponent } from '../submit-eit-modal/submit-eit-modal.component'; @Component({ selector: 'app-confirm-add-eit', @@ -292,6 +293,37 @@ export class ConfirmAddEitComponent implements OnInit { return await modal.present(); } + /*****submit modal********/ + async openSubmitModal() { + this.cs.sharedService.setSharedData( this.attachListOver, 'submitAttachmentList'); + this.cs.sharedService.setSharedData(this.eitComments, 'eitComments'); + const modal = await this.modalController.create({ + component: SubmitEitModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + this.startEitApproval(); + } + }); + + return await modal.present(); + + + + + } + + + removeFile(objectitem) { @@ -500,7 +532,7 @@ export class ConfirmAddEitComponent implements OnInit { P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1], P_FILE_DATA: fileData.split(',')[1], P_FILE_NAME: name,//.split('.')[0], - P_TRANSACTION_ID: this.TransactionID + P_TRANSACTION_ID: this.P_TransactionID }) } catch (e) { diff --git a/Mohem/src/app/eit/eit-list/eit-list.component.ts b/Mohem/src/app/eit/eit-list/eit-list.component.ts index 20b7eb2a..9e92fdd6 100644 --- a/Mohem/src/app/eit/eit-list/eit-list.component.ts +++ b/Mohem/src/app/eit/eit-list/eit-list.component.ts @@ -334,7 +334,7 @@ export class EitListComponent implements OnInit { // this.P_TransactionID=result.SubmitEITTransactionList.P_TRANSACTION_ID; // this.sharedData.setSharedData(result,AddEitResponse.SHARED_DATA); - // // this.sharedData.setSharedData(result.SubmitEITTransactionList.P_TRANSACTION_ID,"TransactionIDResubmit"); + // //this.cs.sharedService.setSharedData(result.SubmitEITTransactionList.P_TRANSACTION_ID,"TransactionIDResubmit"); // // this.sharedData.setSharedData(this.eitRequest,EitRequest.SHARED_DATA); this.cs.sharedService.setSharedData({ isResubmit: false, isDelete: this.isDelete }, 'confirmAddEITData') this.cs.openConfirmEitPage(); diff --git a/Mohem/src/app/eit/eit.module.ts b/Mohem/src/app/eit/eit.module.ts index 0e823e56..98d5bde0 100644 --- a/Mohem/src/app/eit/eit.module.ts +++ b/Mohem/src/app/eit/eit.module.ts @@ -13,6 +13,7 @@ import { EitListComponent } from './eit-list/eit-list.component'; import { DatePicker } from '@ionic-native/date-picker/ngx'; import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component'; import { EitUpdateListComponent } from './eit-update-list/eit-update-list.component'; +import { SubmitEitModalComponent } from './submit-eit-modal/submit-eit-modal.component'; const routes: Routes = [ @@ -43,6 +44,10 @@ const routes: Routes = [ { path: 'eit-update-list', component: EitUpdateListComponent + }, + { + path: 'eit-submit-modal', + component: SubmitEitModalComponent } ] } @@ -63,7 +68,8 @@ const routes: Routes = [ AddEitComponent, ConfirmAddEitComponent, AddAttachComponent, - EitUpdateListComponent + EitUpdateListComponent, + SubmitEitModalComponent ], entryComponents: [ WorkListAttachViewComponent diff --git a/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.html b/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.html new file mode 100644 index 00000000..2a19db89 --- /dev/null +++ b/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.html @@ -0,0 +1,39 @@ + + + + + +

Confirmation

+ +
+
+ No Attachment +
+
+ No Note +
+
+ + + + + Are you sure you want to submit + {{ts.trPK('general','ok')}} + + + + + {{ts.trPK('general','cancel')}} + + + + +
+ \ No newline at end of file diff --git a/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.scss b/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.scss new file mode 100644 index 00000000..5803e3f2 --- /dev/null +++ b/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.scss @@ -0,0 +1,53 @@ +.rowBtn{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.Header{ + color: black !important; + font-size: 25px !important; + font-weight: bold !important;; + margin: 0; + text-align: center; + margin-bottom: 20px; +} + +.labelRadio{ + color: black !important; + font-weight: bold !important; + padding-bottom: 20px; +} + +.labelcheck{ + color: red !important; + font-weight: bold !important; + margin-bottom: 10px; +} + +.submitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background:: #22c6b3; + width: 100% !important; + color: white!important; + border-radius: 16px !important; +} +.submitCancelButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background:: #094875; + width: 100% !important; + color: white!important; + border-radius: 16px !important; +} + + + diff --git a/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.spec.ts b/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.spec.ts new file mode 100644 index 00000000..7171d957 --- /dev/null +++ b/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SubmitEitModalComponent } from './submit-eit-modal.component'; + +describe('SubmitEitModalComponent', () => { + let component: SubmitEitModalComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SubmitEitModalComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SubmitEitModalComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.ts b/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.ts new file mode 100644 index 00000000..81ff9ffc --- /dev/null +++ b/Mohem/src/app/eit/submit-eit-modal/submit-eit-modal.component.ts @@ -0,0 +1,36 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { ModalController } from '@ionic/angular'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-submit-eit-modal', + templateUrl: './submit-eit-modal.component.html', + styleUrls: ['./submit-eit-modal.component.scss'], +}) +export class SubmitEitModalComponent implements OnInit { + submitAttachmentList :any =[]; + eitComments: string; + constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){ + this.submitAttachmentList = this.cs.sharedService.getSharedData('submitAttachmentList', false); + this.eitComments = this.cs.sharedService.getSharedData('eitComments', false); + } + + ngOnInit() { + console.log("modal"); + //this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false); + console.log("modal"); + + } + closeModal() { + this.modalCtrl.dismiss(); + } + + + OkBtnModal() { + let data = "ok"; + this.modalCtrl.dismiss(data); + } + +} + diff --git a/Mohem/src/app/uI-elements/select.input.ts b/Mohem/src/app/uI-elements/select.input.ts index ea1346c7..f2797d44 100644 --- a/Mohem/src/app/uI-elements/select.input.ts +++ b/Mohem/src/app/uI-elements/select.input.ts @@ -23,7 +23,7 @@ export class SelectInput extends UiElement { if (this.disabled == "N") { this.disabled = "disabled" } else { this.disabled = "" } if (this.hidden == "N") { this.hidden = "display:none;" } else { this.hidden = "" } const template = - "
" + + "
" + " " + " +
+ + + + + {{ 'general, notAttch' | translate}} + + + + +
+ + + + {{attachList.AttachmentID +1 }} . + + + + + {{attachList.P_FILE_NAME }} + + + + + + + + +
+ +
+ +
+ + +
+
+ + {{attachRes.FILE_NAME }} + +
+ + + + + + + +
+
+ +
+ + + +
{{'confirmAddEit, comment' | translate}}
+ + + + +
+ + +
{{'confirmAddEit, approverList' | translate}}
+
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{employee.APPROVER}} + + + {{employee.POSITION_TITLE}} + + + +
+
+
+
+
+ +
+ + + + + + + + + + + -
+
- {{ts.trPK('confirmAddEit','start')}} + {{ts.trPK('confirmAddEit','start')}}
\ No newline at end of file diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss index b4dba631..aad79b10 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss @@ -28,4 +28,246 @@ ion-card-content.confirm-details{ } .confirm-details label{ font-size: 13px; -} \ No newline at end of file +} + +/****************** NEW Design ***************************************/ +.footer-button { + border-radius: 2px; + padding: 0 1.1em; + min-height: 45px; + min-width: 200px; + } + + + + .Header { + font-weight: bold; + color: #1a586d !important; + font-size: 10px; + } + + .tbData { + font-size: 10px; + } + + .btnBack { + background: transparent; + float: right; + } + + .attachmentDiv{ + background: #ffffff; + height: auto; + text-align: center; + padding-top: 1px; + margin: 10px; + border-radius: 15px; + border: 1px solid grey; + } + + .noDataDiv{ + background: #ffffff; + height: 11%; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + border-radius: 5px; + } + .submitNote{ + background: #ffffff; + height: 80px; + padding-top: 1px; + margin: 10px; + border-radius: 15px; + border: 1px solid grey; + } + + .approvalList{ + background: #ffffff; + height: auto; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + border-radius: 5px; + } + + /************************New Design**********************************/ + .notification-list{ + background: none; + background: none; + border-radius: 32px; + ion-item{ + // margin-top: 5px; + // margin-bottom: 5px; + + background-color: transparent; + .item-date{ + width: 100%; + font-size: 16px; + font-weight: bold; + + text-align: start; + padding: 0; + margin: 0; + + position: absolute; + left: 0; + top: 12%; + } + ion-label , [item-end]{ + + white-space: normal; + font-size: 14px; + padding-top: 15%; + // :root[dir="ltr"]{ + // margin-left: 10px; + // } + // :root[dir="rtl"]{ + // margin-right: 10px; + // } + + } + + } + } + + + + + + + .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:100%; + height: 100%; + 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: #30b8c6; + 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: #22c6b3; + } + + .confirmEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background: #22c6b3; + width: 80% !important; + color: white!important; + border-radius: 16px !important; + } \ No newline at end of file diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts index 06b73416..a68cbad8 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts @@ -13,7 +13,8 @@ import { ConfirmAddEitService } from '../service/confirm-add-eit-service'; import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes'; import { AbsenceAttachmentComponent } from '../absence-attachment/absence-attachment.component'; import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; - +import { FileUploader } from 'ng2-file-upload'; +import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component'; @Component({ selector: "app-absence-confirm", templateUrl: "./absence-confirm.component.html", @@ -38,6 +39,9 @@ export class AbsenceConfirmComponent implements OnInit { attachReqObj: WorkListButtonRequest = new WorkListButtonRequest(); private isResubmitAbs: boolean = false; private isSubmitBtnClicked: boolean; + filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']; + + constructor( public common: CommonService, public ts: TranslatorService, @@ -225,6 +229,41 @@ export class AbsenceConfirmComponent implements OnInit { } + +/*****submit modal********/ +async openSubmitModal() { + this.common.sharedService.setSharedData( this.attachListOver, 'submitAbsAttachmentList'); + this.common.sharedService.setSharedData(this.absComments, 'absComments'); + const modal = await this.modalCtrl.create({ + component: SubmitAbsenceModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + this.startAbApproval(); + } + }); + + return await modal.present(); + + + + +} + + + + + + removeFile(objectitem) { if (this.attachListOver) { @@ -324,4 +363,96 @@ export class AbsenceConfirmComponent implements OnInit { if (this.P_TransactionID && this.isSubmitBtnClicked == false) this.cancelAbProcess(); } + + + + /*******************Add attchement Functions*************/ + + public uploader: FileUploader = new FileUploader({ + allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], + maxFileSize: 10 * 1024 * 1024, + formatDataFunctionIsAsync: true, + formatDataFunction: async (item) => { + return new Promise((resolve, reject) => { + resolve({ + name: item._file.name, + length: item._file.size, + contentType: item._file.type, + date: new Date() + }); + }); + } + }); + + + onFileSelected(input) { + + // this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){ + + if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { + let msg: string = ""; + msg = this.ts.trPK("general", "notSupport"); + this.common.presentAlert(msg); + return + } // todo: show alert that you tried uploading wrong files + + else { + + const file = input.target.files[0]; + + // console.log(file); + + //var encoded = Base64.encode(file); + this.getBase64(file).then( + data => this.pushObject(data, file.name, file.type) + ); + + // } + // }; + + } + } + + + getBase64(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); + } + + + pushObject(fileData, name, type) { + + console.log("before push: "+ this.index); + //this.attachListOver.length++; + try { + let array = name.split('.'); + let attachType: string = array[array.length - 1]; + + this.attachListOver.push( + { + AttachmentID: this.attachListOver.length, + P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1], + P_FILE_DATA: fileData.split(',')[1], + P_FILE_NAME: name,//.split('.')[0], + P_TRANSACTION_ID: this.P_TransactionID + }) + + } catch (e) { + + } + + + //console.log("after push: "+ this.index); + // return this.addAttachRequest + } + + + + + + } diff --git a/Mohem/src/app/absence/absence.module.ts b/Mohem/src/app/absence/absence.module.ts index 2a2c609b..e98a0b8d 100644 --- a/Mohem/src/app/absence/absence.module.ts +++ b/Mohem/src/app/absence/absence.module.ts @@ -20,6 +20,7 @@ import { AbsenceAttachmentComponent } from "./absence-attachment/absence-attachm import { AddAttachService } from "./service/add-attach-service"; import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component"; import { ViewAttachmentsComponent } from './view-attachments/view-attachments.component'; +import { SubmitAbsenceModalComponent } from './submit-absence-modal/submit-absence-modal.component'; const routes: Routes = [ { path: "", @@ -52,6 +53,10 @@ const routes: Routes = [ { path:'view-attachements', component:ViewAttachmentsComponent + }, + { + path:'absence-submit-modal', + component:SubmitAbsenceModalComponent } ] } @@ -81,7 +86,8 @@ const routes: Routes = [ SubmitAbsenceComponent, AbsenceConfirmComponent, AbsenceAttachmentComponent, - ViewAttachmentsComponent + ViewAttachmentsComponent, + SubmitAbsenceModalComponent ] }) export class AbsencePageModule {} diff --git a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.html b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.html new file mode 100644 index 00000000..9eb85a34 --- /dev/null +++ b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.html @@ -0,0 +1,39 @@ + + + + + +

Confirmation

+ +
+
+ No Attachment +
+
+ No Note +
+
+ + + + + Are you sure you want to submit + {{ts.trPK('general','ok')}} + + + + + {{ts.trPK('general','cancel')}} + + + + +
+ \ No newline at end of file diff --git a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.scss b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.scss new file mode 100644 index 00000000..5803e3f2 --- /dev/null +++ b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.scss @@ -0,0 +1,53 @@ +.rowBtn{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.Header{ + color: black !important; + font-size: 25px !important; + font-weight: bold !important;; + margin: 0; + text-align: center; + margin-bottom: 20px; +} + +.labelRadio{ + color: black !important; + font-weight: bold !important; + padding-bottom: 20px; +} + +.labelcheck{ + color: red !important; + font-weight: bold !important; + margin-bottom: 10px; +} + +.submitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background:: #22c6b3; + width: 100% !important; + color: white!important; + border-radius: 16px !important; +} +.submitCancelButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background:: #094875; + width: 100% !important; + color: white!important; + border-radius: 16px !important; +} + + + diff --git a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.spec.ts b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.spec.ts new file mode 100644 index 00000000..b1caf2ba --- /dev/null +++ b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SubmitAbsenceModalComponent } from './submit-absence-modal.component'; + +describe('SubmitAbsenceModalComponent', () => { + let component: SubmitAbsenceModalComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SubmitAbsenceModalComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SubmitAbsenceModalComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts new file mode 100644 index 00000000..53dc2393 --- /dev/null +++ b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts @@ -0,0 +1,36 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { ModalController } from '@ionic/angular'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-submit-absence-modal', + templateUrl: './submit-absence-modal.component.html', + styleUrls: ['./submit-absence-modal.component.scss'], +}) +export class SubmitAbsenceModalComponent implements OnInit { + submitAbsAttachmentList :any =[]; + absComments: string; + constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){ + this.submitAbsAttachmentList = this.cs.sharedService.getSharedData('submitAbsAttachmentList', false); + this.absComments = this.cs.sharedService.getSharedData('absComments', false); + } + + ngOnInit() { + console.log("modal"); + //this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false); + console.log("modal"); + + } + closeModal() { + this.modalCtrl.dismiss(); + } + + + OkBtnModal() { + let data = "ok"; + this.modalCtrl.dismiss(data); + } + +} + From 721066c8594d17147f258ca28e128b00a47b84bd Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Wed, 19 Feb 2020 21:41:39 +0300 Subject: [PATCH 6/9] finish absence history page --- .../src/app/absence/home/home.component.html | 98 +++++++++++-------- .../src/app/absence/home/home.component.scss | 70 +++++++++++++ 2 files changed, 125 insertions(+), 43 deletions(-) diff --git a/Mohem/src/app/absence/home/home.component.html b/Mohem/src/app/absence/home/home.component.html index 73c20ece..1fe0d412 100644 --- a/Mohem/src/app/absence/home/home.component.html +++ b/Mohem/src/app/absence/home/home.component.html @@ -1,5 +1,5 @@ - + {{ts.trPK('absenceList','absenceList')}} @@ -25,92 +25,104 @@
- +
- + + +
- - - - + +
+ +
+
- - - - - + +
+ +
+
+
- - - - + +
+ +
+
- - - - + +
+ +
+
- - - - + +
+ +
+
- - - - + +
+ +
+
- - - - + +
+ +
+
- - - - + +
+ +
+
- - + +
+ + + +
- + \ No newline at end of file diff --git a/Mohem/src/app/absence/home/home.component.scss b/Mohem/src/app/absence/home/home.component.scss index 36a672b9..41a72312 100644 --- a/Mohem/src/app/absence/home/home.component.scss +++ b/Mohem/src/app/absence/home/home.component.scss @@ -7,3 +7,73 @@ height:20px; width:20px; } + +.addClass{ + background-color: #094875; + width: 80px; + height: 80px; + right: 8%; + position: fixed; + color: white; + bottom: 20%; + border-radius: 50%; + z-index: 999; + -webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59); + -moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59); + box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59); + } + + .grids{ + border-radius: 20px !important; + background: white; + padding-left: 1px; + padding-right: 1px; + margin: 13px; + padding-top: 0px; + padding-bottom: 3px; + padding-left: 13px; + padding-right: 13px; + border: 1px solid #cac8c8; + margin-bottom: 10% !important; + } + + .bgcolor { + + color: white; + border-top-right-radius: 19px; + border-top-left-radius: 15px; + padding-top: 1; + padding-bottom: 0; + margin-top: 0; + margin-bottom: 0; + /* border-radius: 12px !important; */ + background: #094875; + border-bottom: 1px solid #a7a4a4; + border-top: 1px solid #cac8c8; + margin-left: -13px; + margin-right: -13px; + } + + + .header-div { + + background-color: #22C6B3; + text-transform: capitalize; + height: 160px; + position: relative; + display: block; + margin-bottom: -28px; + } + + .header-toolbar-new{ + --background: #22c6b3; + } + + + .hrClass{ + border-width: 0; + box-sizing: content-box; + border-bottom: 1px solid #e6e6e6; + background: #fff !important; + height: 1px; + } From e3cdfa31ebf5cffe653ecb8a7caf2289e35995d0 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 20 Feb 2020 09:47:03 +0300 Subject: [PATCH 7/9] finish submit absence request --- .../submit-absence-modal.component.html | 2 +- .../submit-absence.component.html | 33 +++++++++---------- .../submit-absence.component.scss | 16 +++++++++ .../view-attachments.component.html | 2 +- .../view-attachments.component.scss | 3 ++ .../work-list-attach-view.component.html | 2 +- .../work-list-attach-view.component.scss | 3 ++ 7 files changed, 41 insertions(+), 20 deletions(-) diff --git a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.html b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.html index 9eb85a34..917ed98c 100644 --- a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.html +++ b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.html @@ -22,7 +22,7 @@
- + Are you sure you want to submit {{ts.trPK('general','ok')}} diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.html b/Mohem/src/app/absence/submit-absence/submit-absence.component.html index 19fd2200..e1a10ef5 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.html +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.html @@ -1,5 +1,5 @@ - + {{ts.trPK('submitAbsence','submitAbsence')}} @@ -8,37 +8,36 @@ - - {{ts.trPK('submitAbsence','absenceType')}} + + {{ts.trPK('submitAbsence','absenceType')}} {{item.ABSENCE_ATTENDANCE_TYPE_NAME}} - - {{ts.trPK('submitAbsence','startDate')}} + + {{ts.trPK('submitAbsence','startDate')}} - - {{ts.trPK('submitAbsence','startTime')}} + + {{ts.trPK('submitAbsence','startTime')}} - - {{ts.trPK('submitAbsence','endDate')}} + + {{ts.trPK('submitAbsence','endDate')}} - - {{ts.trPK('submitAbsence','endTime')}} + + {{ts.trPK('submitAbsence','endTime')}} - + {{ts.trPK('submitAbsence','totalDays')}} {{totalDays}} - - + - - {{ts.trPK('submitAbsence','comments')}} + + {{ts.trPK('submitAbsence','comments')}}
@@ -55,6 +54,6 @@
- {{ts.trPK('general','next')}} + {{ts.trPK('general','next')}}
diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.scss b/Mohem/src/app/absence/submit-absence/submit-absence.component.scss index 8783b654..5725eec4 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.scss +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.scss @@ -3,3 +3,19 @@ font-size: 25px; color: #7F8C8D; } + +.header-toolbar-new{ + --background: #22c6b3; + } + + .confirmEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background: #22c6b3; + width: 80% !important; + color: white!important; + border-radius: 16px !important; + } diff --git a/Mohem/src/app/absence/view-attachments/view-attachments.component.html b/Mohem/src/app/absence/view-attachments/view-attachments.component.html index 921c5ac8..2e17a7bd 100644 --- a/Mohem/src/app/absence/view-attachments/view-attachments.component.html +++ b/Mohem/src/app/absence/view-attachments/view-attachments.component.html @@ -1,6 +1,6 @@ - + {{ts.trPK('absenceList','attach')}} diff --git a/Mohem/src/app/absence/view-attachments/view-attachments.component.scss b/Mohem/src/app/absence/view-attachments/view-attachments.component.scss index e69de29b..d98a85be 100644 --- a/Mohem/src/app/absence/view-attachments/view-attachments.component.scss +++ b/Mohem/src/app/absence/view-attachments/view-attachments.component.scss @@ -0,0 +1,3 @@ +.header-toolbar-new{ + --background: #22c6b3; + } \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.html b/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.html index 635bbcb9..f38acc02 100644 --- a/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.html +++ b/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.html @@ -1,5 +1,5 @@ - + {{'workListMain, suppDoc' | translate}} diff --git a/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.scss b/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.scss index e69de29b..d98a85be 100644 --- a/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.scss +++ b/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.scss @@ -0,0 +1,3 @@ +.header-toolbar-new{ + --background: #22c6b3; + } \ No newline at end of file From 6385c93e56cef6dd7cd281187585a0b8fed69067 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 20 Feb 2020 10:51:06 +0300 Subject: [PATCH 8/9] edit background color --- .../app/absence/absence-confirm/absence-confirm.component.scss | 2 +- .../src/app/eit/confirm-add-eit/confirm-add-eit.component.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss index aad79b10..96965e58 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss @@ -84,7 +84,7 @@ ion-card-content.confirm-details{ } .approvalList{ - background: #ffffff; + --background: #f0efef; height: auto; text-align: center; padding-top: 1px; diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss index 7e35df19..908f7d32 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss @@ -54,7 +54,7 @@ } .approvalList{ - background: #ffffff; + --background: #f0efef; height: auto; text-align: center; padding-top: 1px; From d1d3a307b7e1801e7f888b1de45ab3f1c6f19477 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 20 Feb 2020 15:53:01 +0300 Subject: [PATCH 9/9] finish replacement modal --- .../absence-replacement-list.component.html | 132 +++++++ .../absence-replacement-list.component.scss | 121 +++++++ ...absence-replacement-list.component.spec.ts | 27 ++ .../absence-replacement-list.component.ts | 342 ++++++++++++++++++ Mohem/src/app/absence/absence.module.ts | 14 +- .../submit-absence.component.scss | 2 + .../submit-absence.component.ts | 8 +- Mohem/src/assets/localization/i18n.json | 2 +- Mohem/src/theme/styles.scss | 9 + 9 files changed, 651 insertions(+), 6 deletions(-) create mode 100644 Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.html create mode 100644 Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.scss create mode 100644 Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.spec.ts create mode 100644 Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.ts diff --git a/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.html b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.html new file mode 100644 index 00000000..5ecc61f1 --- /dev/null +++ b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.html @@ -0,0 +1,132 @@ + + + + {{ 'replacementRoll, title' | translate}} + + + + + + + + {{'replacementRoll, searchBy' | translate}} + + {{'addAttach, name' | translate}} + {{'login, username' | translate}} + {{'general, email' | translate}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+ + + +
+ +
+ +
+ + + {{employee.EMPLOYEE_DISPLAY_NAME}} +
{{employee.USER_NAME}}
+ {{employee.EMAIL_ADDRESS}} +
+
+
+ +
+ + +
+ + + +
+ + +
+ + {{'general, submit' | translate}} + + + {{'general, cancel' | translate}} +
+
\ No newline at end of file diff --git a/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.scss b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.scss new file mode 100644 index 00000000..7da0d5c7 --- /dev/null +++ b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.scss @@ -0,0 +1,121 @@ +button.item-button.button.button-md.button-clear.button-clear-md { + background-color: transparent; + } + + .footer-button { + border-radius: 3px; + padding: 0 1.1em; + min-height: 45px; + min-width: 200px; + } + + // ion-item { + // margin-top: 5%; + // margin-right: 7%; + // width: 100%; + // } + .ionItem{ + border: #e4e4e4 solid; + /* margin: 6px; */ + /* padding: 11px; */ + height: 85px; + width: 164px; + border-radius: 5px; + text-align: center; + + } + + + .profileImageDiv{ + text-align: center; + margin-bottom: -27px; + z-index: 3; + position: relative; + top: 0; + + } + .profileImage{ + width:60px !important; + // margin-left: -25px; + // margin-right: 22px; + } + + .activated{ + border: #209a83 0.02cm solid ; + } + .deactivated{ border: #e4e4e4 0.02cm solid; + } + .repContentDiv{ + text-align: center; + width: 85%; + font-size: 14px; + border: #e4e4e4 solid; + border-radius: 5px; + padding: 20px 8px 8px 8px; + margin-top: -9px; + margin-right: -35px + + } + .selIEmpDiv{ + text-align: right; + margin-bottom: -26px; + margin-right: 0px; + z-index: 3; + position: relative; + top: 0; + } + + .selIEmpImage{ + width:22px !important + + } + + .noteInput{ + border: solid var(--gray) 1px; + border-radius: 15px; + margin: 8px 17px 0px 17px; + padding: 10px 2px 10px 2px; + } + .filterInput{ + border: solid var(--gray) 1px; + border-radius: 21px; + padding-left: 10px !important; + } + .filterBtn{ + background: var(--newgreen); + --background: var (--newgreen); + border-radius: 50%; + height: 60px; + width: 60px; + } + + + + *{ + box-sizing: border-box; + } + + .square-container{ + // padding: 8px; + width:100%; + } + .square{ + // width:calc(100% / 2); + width:50%; + float:left; + position: relative; + // padding-bottom: calc(100% / 2); + } + + .square .content{ + width: calc(100% - 16px) !important; + height: calc(100% - 16px) !important; + margin: 8px; + padding: 16px; + // position: absolute; + color: white; + border-radius: 9px; + text-align: center; + // background-color: #0095ff; + // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); + } \ No newline at end of file diff --git a/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.spec.ts b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.spec.ts new file mode 100644 index 00000000..4dbb31b1 --- /dev/null +++ b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AbsenceReplacementListComponent } from './absence-replacement-list.component'; + +describe('AbsenceReplacementListComponent', () => { + let component: AbsenceReplacementListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AbsenceReplacementListComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AbsenceReplacementListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.ts b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.ts new file mode 100644 index 00000000..c14a88e6 --- /dev/null +++ b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.ts @@ -0,0 +1,342 @@ +import { ModalController } from '@ionic/angular'; +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { WorKListReplacmentEmployeeResponse } from 'src/app/notification/models/ReplacmentEmployeeRes'; +import { WorkListReplacmentEmployeeRequest } from 'src/app/notification/models/ReplacmentEmployeeReq'; +import { WorkListActionRequest } from 'src/app/notification/models/NotificationActionReq'; +import { WorklistMainService } from 'src/app/notification/service/work-list.main.service'; +import { ViewReplacementModalComponent } from 'src/app/notification/view-replacement-modal/view-replacement-modal.component'; +import { WorklistService } from 'src/app/notification/service/worklist.service'; + +@Component({ + selector: 'app-absence-replacement-list', + templateUrl: './absence-replacement-list.component.html', + styleUrls: ['./absence-replacement-list.component.scss'], +}) +export class AbsenceReplacementListComponent implements OnInit { + + P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = ""; + P_SEARCH_EMAIL_ADDRESS: string = ""; + getPassActionMode: any; + selectedValue: any; + inputSearch: any; + selEmpName: any; + selectedUserInf: any; + userNote: any; + getPassNotificationDetails: any; + isAnswer: boolean = false; + pQuestion: string = ""; + selEmp: any; + P_PAGE_NUM: number; + P_PAGE_LIMIT: number; + ReplacementList: any = []; + searchBy: string = ""; + IsReachEnd: boolean = false; + ReplacmentListRes: WorKListReplacmentEmployeeResponse; + private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest(); + private WorkListActionObj: WorkListActionRequest; + getpassResAttr: any = []; + active: any; + demoeAttach:any=[]; + + constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { + this.P_PAGE_NUM = 1; + this.P_PAGE_LIMIT = 50; + // this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false); + // this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false); + // this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false); + // this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false); + // if (this.getPassActionMode == "ANSWER_INFO") { + // this.isAnswer = true; + // } + this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + + // this.WorkListActionObj = new WorkListActionRequest(); + // this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;//26919060; + // this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + // this.WorkListActionObj.P_ACTION_MODE = ""; + // this.WorkListActionObj.P_COMMENTS = ""; + // this.WorkListActionObj.RespondAttributeList =[];// this.getpassResAttr; + // this.WorkListActionObj.P_APPROVER_INDEX = null; + } + + ngOnInit() { + + this.demoeAttach = [{ + USER_NAME: '18888', + EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ", + EMAIL_ADDRESS: "test@yuyuu.hjj", + + + + }, + { + + USER_NAME: '18888', + EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ", + EMAIL_ADDRESS: "test@yuyuu.hjj" + + }, + { + USER_NAME: '18888', + EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ", + EMAIL_ADDRESS: "test@yuyuu.hjj" + + }, + { + USER_NAME: '18888', + EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ", + EMAIL_ADDRESS: "test@yuyuu.hjj" + + } + ]; + } + + getreplacmentemployee() { + this.ReplacementList = []; + this.IsReachEnd = false; + this.P_PAGE_NUM = 1; + if (this.inputSearch) { + switch (this.searchBy) { + case '1': { + + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.inputSearch; + this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = ""; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = ""; + + break; + } + case '2': { + this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = this.inputSearch; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = ""; + break; + } + case '3': { + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = this.inputSearch; + this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = ""; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + break; + } + default: { + this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = ""; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = ""; + break; + } + } + } else { + this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = ""; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = ""; + } + // if(this.selectedValue =="1"){ + // this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.inputSearch; + // this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=""; + // this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS=""; + // } + // else if(this.selectedValue =="2"){ + // this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=""; + // this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.inputSearch; + // this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS=""; + // } + // else if(this.selectedValue =="3"){ + // this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=""; + // this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=""; + // this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS=this.inputSearch; + // } + + this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj). + subscribe((result: WorKListReplacmentEmployeeResponse) => { + this.handleWorkListReplacmentEmployeeResult(result); + }); + + }//End replacment Employee + + handleWorkListReplacmentEmployeeResult(result) { + + if (this.cs.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (this.cs.hasData(result.ReplacementList)) { + //this.ReplacmentListRes =result.ReplacementList; + this.ReplacementList = result.ReplacementList; + this.P_PAGE_NUM++; + let lastItemIndex = this.ReplacementList.length - 1; + if (result.ReplacementList[lastItemIndex]) { + let lastitem = result.ReplacementList[lastItemIndex]; + if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + } + } else { + let msg: string = this.ts.trPK('general', 'noResult'); + this.cs.presentAlert(msg); + } + // if(result.ReplacementList.length == 0){ + + // } + + // else if(result.ReplacementList != null) + // { + // this.ReplacmentListRes =result.ReplacementList; + // //open modal + // this.openModale(this.ReplacmentListRes); + + + // } // if result == null + + } // valid it + } + + getValueSelected(Value) { + + this.selectedValue = Value; + } + + + select(selectEmp,index){ + console.log(selectEmp.EMPLOYEE_DISPLAY_NAME); + this.selEmp=selectEmp + this.active=index; + } + clear() { + this.selEmpName = ""; + this.selectedUserInf = null; + + } + async openModale(ReplacmentListRes) { + const modal = await this.modalCtrl.create({ + component: ViewReplacementModalComponent + }); + + modal.onDidDismiss() + .then((data) => { + if (data == "cancel" || data == "undefined") { + //this.selEmpName=""; + return; + } else { + this.selectedUserInf = data; + this.selEmpName = this.selectedUserInf.EMPLOYEE_DISPLAY_NAME; + } + }); + + return await modal.present(); + } + + submitAction() { + this.selEmp + if( this.selEmp){ + let data = this.selEmp; + this.modalCtrl.dismiss(data); + }else{ + let msg: string = this.ts.trPK("replacementRoll", "msg"); + this.cs.showErrorMessageDialog(() => { + }, this.ts.trPK('general', 'ok'), msg); + return false; + } + + // if (this.selEmp && this.isAnswer == false) { + // // this.selectedUserInf = this.ReplacementList[this.selEmp]; + // this.selectedUserInf = this.selEmp; + // console.log("selEmp "+ this.selEmp.USER_NAME); + + // if (this.selectedUserInf && this.selectedUserInf.USER_NAME) { + // console.log("userInfo "+this.selectedUserInf.USER_NAME); + // if (this.userNote) { + // this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME; + // this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; + // this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr + + // this.workListMainService.actionButton(this.WorkListActionObj). + // subscribe((result: any) => { + // this.handleApplayActionResult(result); + // }); + // } else { + // let msg: string = this.ts.trPK("replacementRoll", "enterNote"); + // this.cs.showErrorMessageDialog(() => { + // }, this.ts.trPK('general', 'ok'), msg); + + // } + // } else { + // let msg: string = this.ts.trPK("replacementRoll", "msg"); + // this.cs.showErrorMessageDialog(() => { + // }, this.ts.trPK('general', 'ok'), msg); + // } + // } else if (this.isAnswer == true) { + // if (this.userNote) { + // this.WorkListActionObj.P_FORWARD_TO_USER_NAME = null; + // this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; + // this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr + + // this.workListMainService.actionButton(this.WorkListActionObj). + // subscribe((result: any) => { + // this.handleApplayActionResult(result); + // }); + // } else { + // let msg: string = this.ts.trPK("replacementRoll", "enterNote"); + // this.cs.showErrorMessageDialog(() => { + // }, this.ts.trPK('general', 'ok'), msg); + // } + // } else { + // let msg: string = this.ts.trPK("replacementRoll", "msg"); + // this.cs.showErrorMessageDialog(() => { + // }, this.ts.trPK('general', 'ok'), msg); + // } + } + + + + + doInfinite(infiniteScroll) { + if (!this.IsReachEnd) { + //const request =new WorkListActionRequest(); + // request.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.P_SEARCH_USER_NAME; + // request.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.P_SEARCH_EMPLOYEE_DISPLAY_NAME; + // request.P_SEARCH_EMAIL_ADDRESS=this.P_SEARCH_EMAIL_ADDRESS; + this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + // request.P_SELECTED_EMPLOYEE_NUMBER=this.selEmp; + + this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj). + subscribe((result: any) => { + if (this.cs.validResponse(result)) { + if (this.cs.hasData(result.ReplacementList)) { + this.P_PAGE_NUM++; + result.ReplacementList.forEach(vr => { + if (vr.ROW_NUM == vr.NO_OF_ROWS) { + this.IsReachEnd = true; + } + else { + this.IsReachEnd = false; + } + this.ReplacementList.push(vr); + // this.pro.GetVacationRulesList.push(vr); + }); + } else { + this.IsReachEnd = true; + } + } + //this.P_PAGE_NUM++; + if (infiniteScroll) + infiniteScroll.target.complete(); + + + // console.log(resFlag); + }, (Error) => console.log(Error), () => infiniteScroll.target.complete()); + } else { + if (infiniteScroll) + infiniteScroll.target.complete(); + } + } + + + closeModal() { + this.modalCtrl.dismiss(); + } + +} + diff --git a/Mohem/src/app/absence/absence.module.ts b/Mohem/src/app/absence/absence.module.ts index e98a0b8d..1b8d9bc5 100644 --- a/Mohem/src/app/absence/absence.module.ts +++ b/Mohem/src/app/absence/absence.module.ts @@ -21,6 +21,9 @@ import { AddAttachService } from "./service/add-attach-service"; import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component"; import { ViewAttachmentsComponent } from './view-attachments/view-attachments.component'; import { SubmitAbsenceModalComponent } from './submit-absence-modal/submit-absence-modal.component'; +import { AbsenceReplacementListComponent } from './absence-replacement-list/absence-replacement-list.component'; +import { WorklistService } from 'src/app/notification/service/worklist.service'; +import { WorklistMainService } from 'src/app/notification/service/work-list.main.service'; const routes: Routes = [ { path: "", @@ -57,6 +60,10 @@ const routes: Routes = [ { path:'absence-submit-modal', component:SubmitAbsenceModalComponent + }, + { + path:'absence-replacment-modal', + component:AbsenceReplacementListComponent } ] } @@ -78,7 +85,9 @@ const routes: Routes = [ SubmitAbConfirmService, DatePicker, ConfirmAddEitService, - AddAttachService + AddAttachService, + WorklistService, + WorklistMainService ], declarations: [ AbsencePage, @@ -87,7 +96,8 @@ const routes: Routes = [ AbsenceConfirmComponent, AbsenceAttachmentComponent, ViewAttachmentsComponent, - SubmitAbsenceModalComponent + SubmitAbsenceModalComponent, + AbsenceReplacementListComponent ] }) export class AbsencePageModule {} diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.scss b/Mohem/src/app/absence/submit-absence/submit-absence.component.scss index 5725eec4..477ee720 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.scss +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.scss @@ -19,3 +19,5 @@ color: white!important; border-radius: 16px !important; } + + diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts index 81d1bc98..cd019974 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts @@ -26,6 +26,7 @@ import * as moment from "moment"; import {ReplacementListComponent} from "../../vacation-rule/replacement-list/replacement-list.component"; import {ReplacmentResponse} from "../models/replacment-response"; import { AbsenceResponse } from '../models/absence.response'; +import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component'; @Component({ selector: "app-submit-absence", templateUrl: "./submit-absence.component.html", @@ -230,12 +231,13 @@ export class SubmitAbsenceComponent implements OnInit { async SearchReplacment() { const modal = await this.modalCtrl.create({ - component: ReplacementListComponent + component: AbsenceReplacementListComponent, + backdropDismiss: false }); - + modal.cssClass = 'replaceRoll-modal'; modal.onDidDismiss() .then((data) => { - const user = data.data.empData; + const user = data.data; console.log(data) console.log(user); if (data) { diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 6a42895d..433eb926 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -1587,7 +1587,7 @@ }, "msg":{ "en": "Select a replacement", - "ar":"اختيار بديل" + "ar":"اختر بديل" }, "title":{ "en": "Replacement Roll", diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index fe19cdc7..208a5fac 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1154,3 +1154,12 @@ border:0px .modal-wrapper{ border-radius: 20px !important; } + +.replaceRoll-modal { + + padding: 30% 1% !important; + --height: 15cm !important; + --width: 100% !important; + --border-radius: 0.4cm; + +} \ No newline at end of file