diff --git a/Mohem/src/app/eit/models/eit-address.request.ts b/Mohem/src/app/eit/models/eit-address.request.ts index 45730ca4..0c5c0c07 100644 --- a/Mohem/src/app/eit/models/eit-address.request.ts +++ b/Mohem/src/app/eit/models/eit-address.request.ts @@ -8,7 +8,7 @@ export class EitAddressRequest { public P_FUNCTION_NAME: string; public P_SELECTED_RESP_ID: Number; P_DESC_FLEX_CONTEXT_CODE: string; - P_TRANSACTION_VALUES_TBL: EitTransactionModel[]; + EITTransactionTBL: EitTransactionModel[]; P_COUNTRY_CODE: string; P_EFFECTIVE_DATE: string; P_ACTION: string; diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 0c61387d..c62a99f8 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1250,6 +1250,9 @@ export class CommonService { public openAddAddress() { this.nav.navigateForward(['/profile/add-address']); } + public openConfirmAddAddress() { + this.nav.navigateForward(['/profile/confirm-add-address']); + } public openPerformanceevaluation() { this.nav.navigateForward(['/profile/performanceevaluation']); } diff --git a/Mohem/src/app/itemforsale/home/home.component.html b/Mohem/src/app/itemforsale/home/home.component.html index f708914f..bc797af1 100644 --- a/Mohem/src/app/itemforsale/home/home.component.html +++ b/Mohem/src/app/itemforsale/home/home.component.html @@ -18,26 +18,30 @@
-
+
{{ts.trPK('itemforsale','select-category')}}
{{ts.trPK('itemforsale','completed')}}
-
+
-
-
+
+
+ + +
{{ts.trPK('itemforsale','add-details')}}
{{step >2 ? "Completed" : "Locked"}}
-
+
-
-
+
+
+
{{ts.trPK('itemforsale','review-sell')}}
{{step >3 ? "Completed" : "Locked"}}
-
+
@@ -52,7 +56,7 @@
- +

Mobile & Tablets

@@ -62,20 +66,20 @@
- +
-

Mobile & Tablets

+

Cars & Vehicles

- +
-

Mobile & Tablets

+

Electronic Applicance

@@ -85,30 +89,30 @@
- +
-

Mobile & Tablets

+

Furniture & Home Decor

- +
-

Mobile & Tablets

+

Fashion & beauty

- +
-

Mobile & Tablets

+

Books, Sports & Hobbies

@@ -174,7 +178,7 @@

Item Photos

- +
X
@@ -183,7 +187,7 @@
- +
X
@@ -192,7 +196,15 @@
+ +
+
+ + +
+
+
@@ -206,7 +218,7 @@
-

Furniture Table

+

Furniture Table

@@ -232,16 +244,25 @@
- + +
+ + cancel + + +
+
- + + cancel + {{ts.trPK('general','next')}} - - - {{ts.trPK('general','submit')}} + + + Confirm
diff --git a/Mohem/src/app/itemforsale/home/home.component.scss b/Mohem/src/app/itemforsale/home/home.component.scss index 83c2a038..515d9d64 100644 --- a/Mohem/src/app/itemforsale/home/home.component.scss +++ b/Mohem/src/app/itemforsale/home/home.component.scss @@ -12,7 +12,8 @@ .md-stepper-horizontal .md-step { display:table-cell; position:relative; - padding:24px; + padding:20px; + text-align: left; } .md-stepper-horizontal .md-step:hover, .md-stepper-horizontal .md-step:active { @@ -32,21 +33,21 @@ .md-stepper-horizontal .md-step:hover .md-step-circle { background-color:#757575; } -.md-stepper-horizontal .md-step:first-child .md-step-bar-left, -.md-stepper-horizontal .md-step:last-child .md-step-bar-right { +.md-stepper-horizontal .md-step:last-child .md-step-bar-left { display:none; } .md-stepper-horizontal .md-step .md-step-circle { - width:30px; - height:30px; - margin:0 auto; - background-color:#999999; - border-radius: 50%; - text-align: center; - line-height:30px; - font-size: 16px; - font-weight: 600; - color:#FFFFFF; + width: 30px; + height: 30px; + border-radius: 50%; + text-align: center; + line-height: 30px; + font-size: 16px; + font-weight: 600; + color: #FFFFFF; +} +.md-stepper-horizontal .md-step:last-child .md-step-circle { +margin-left:20px } .md-stepper-horizontal.green .md-step.active .md-step-circle { background-color:#00AE4D; @@ -78,8 +79,8 @@ content: "\f040"; } .md-stepper-horizontal .md-step .md-step-title { - margin-top: 10px; - font-size: 15px; + margin-top: 5px; + font-size: 10px; font-weight:bold; } .md-stepper-horizontal .md-step .md-step-title, @@ -87,35 +88,42 @@ text-align: center; color:rgba(0,0,0,.26); } -.md-stepper-horizontal .md-step.active .md-step-title { +.md-stepper-horizontal .md-step.orange .md-step-title, .md-stepper-horizontal .md-step.green .md-step-title { font-weight: 600; - color:rgba(0,0,0,.87); + color:black; } .md-stepper-horizontal .md-step.active.done .md-step-title, .md-stepper-horizontal .md-step.active.editable .md-step-title { font-weight:600; } .md-stepper-horizontal .md-step .md-step-optional { - font-size:12px; + font-size:10px; } .md-stepper-horizontal .md-step .md-step-bar-left, .md-stepper-horizontal .md-step .md-step-bar-right { - position:absolute; - top:36px; - height:1px; - border-top:1px solid #DDDDDD; + position: absolute; + top: 36px; + height: 2px; + background: #DDDDDD; + width: 80px; } .md-stepper-horizontal .md-step .md-step-bar-right { right:0; left:50%; margin-left:20px; } + .md-stepper-horizontal .md-step .md-step-bar-left { - left:0; - right:50%; - margin-right:20px; + margin-right: 0px; + left: 55px } +.orange .md-step-bar-left { +background:#CC9B14 !important; +} +.green .md-step-bar-left { + background:#1FA169 !important; + } .header{ height: 150px; width: 100%; @@ -153,7 +161,7 @@ font-size: 12px; background-color:#00AE4D; color: #ffffff !important; - padding: 2px; + padding: 3px 5px 3px 5px; border-radius: 5px; } .green .md-step-circle{ @@ -162,29 +170,40 @@ .orange .md-step-circle{ background: #CC9B14 !important; } +.grey .md-step-circle{ + background: #E3E3E3 !important; +} .content{ position: relative; +margin-bottom: 70px; } .offering{ font-weight: bold; - margin:20px; + margin: 20px 20px 0px; position: relative; } .offering h2{ font-weight: bold; + font-size: 20px; + margin-bottom: 0; } .sale-icon{ box-shadow: 1px 1px 5px 1px #cccc; padding: 10px; - margin: 5px; - border-radius: 10px; + margin: 1px; + border-radius: 15px; background: #fff; } + .sale-icon ion-icon{ font-size: 35px; } .sale-icon p{ margin-top:5px; + margin-top: 5px; + margin-bottom: 0; + font-size: 12px; + font-weight: bold; } .add-details{ background: #fff; @@ -215,7 +234,7 @@ position: relative; height: 70px; } .image-container .uploaded{ -position: absolute; +position: relative; } .image-container .uploaded .closed{ position: absolute; @@ -251,4 +270,45 @@ color:orange display: inline-block; font-weight: bolder; } -.flaot-button{float:right;margin:30px} \ No newline at end of file +.flaot-button{float:right;margin:30px} +.orange-border{ +border-top:2px solid #CC9B14; +} +.green-border{ + border-top:2px solid #00AE4D; +} +.md-step span{ + position: relative; +} +.red-button{ +--background:#CA3332; +} +ion-footer{ + bottom: 0; + position: fixed; +} +.small-btn{ + width: 40%; +} +.uploader-box{ + border-width: 2px; + border-color: #259CB8; + border-style: dotted; + border-radius: 10px; + left: 10px; + +} +.review-title{ + font-size: 16px; + font-weight: bold; +} +.camera-icon{ + font-size: 35px; + position: absolute; + margin: auto; + left: 0; + right: 0; + top: 60px; + bottom: 0; + color: #259CB8; +} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/home/home.component.ts b/Mohem/src/app/itemforsale/home/home.component.ts index 8e42704a..ace51a36 100644 --- a/Mohem/src/app/itemforsale/home/home.component.ts +++ b/Mohem/src/app/itemforsale/home/home.component.ts @@ -23,4 +23,5 @@ export class HomeComponent implements OnInit { openMyAds() { this.cs.navigateForward('/itemforsale/my-ads'); } + } diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.html b/Mohem/src/app/itemforsale/item-details/item-details.component.html index d52e0007..add7aca6 100644 --- a/Mohem/src/app/itemforsale/item-details/item-details.component.html +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.html @@ -12,7 +12,8 @@
- + + Furniture Table @@ -24,18 +25,16 @@

New

500 SAR

- - - +
- + -

Aslam Khan

-

Published on 22 April 2020

+

Mohammed Imran

+

Posted on 22 April 2020

View Profile

@@ -51,10 +50,13 @@
+ + {{ts.trPK('sms','title')}} - + + {{ts.trPK('vacation-rule','call')}}
diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.scss b/Mohem/src/app/itemforsale/item-details/item-details.component.scss index 60f81f96..8223f324 100644 --- a/Mohem/src/app/itemforsale/item-details/item-details.component.scss +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.scss @@ -18,19 +18,62 @@ } ion-card-header{ background-color: #fff; - padding: 15px !important; + padding: 10px 10px 5px !important; +} +ion-card-header img{ + height: 320px; +} +ion-card-title{ + margin: 15px 10px 0px; +} +ion-card-content{ + padding-top: 0px; + padding-bottom: 0px; } .content-bottom{ - padding: 15px; + padding-top: 15px; } .green{ - color:green; + color:#1FA169; font-weight: bold; + } .content-bottom h1{ - font-size: 24px; + font-size: 22px; + font-weight: bold; } .details-button ion-button{ --background: #565656; - width: 125px; + width: 150px; + border-radius: 8px; +} +.profile-title{ + color:#000; + font-weight: bold; +} +.profile-img{ + height: 50px; + width: 50px; + border-radius: 50%; +} +ion-avatar{ + height: 50px; + width: 50px; + text-align: center; +} +ion-avatar p{ + color:#000; +} +ion-avatar a{ + color:#259CB8; + text-decoration: underline; +} +ion-footer{ + position: fixed; + bottom: 0; +} +.icon-footer{ + margin: 6px; + position: absolute; + left: 35px; } \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/items/items.component.html b/Mohem/src/app/itemforsale/items/items.component.html index d93cba0e..a290d7a4 100644 --- a/Mohem/src/app/itemforsale/items/items.component.html +++ b/Mohem/src/app/itemforsale/items/items.component.html @@ -37,7 +37,7 @@

{{ts.trPK('itemforsale','browse-categories')}}

- + @@ -46,7 +46,7 @@
- +

Mobile & Tablets

@@ -56,52 +56,43 @@
- +
-

Mobile & Tablets

+

Cars & Vehicle

- +
-

Mobile & Tablets

+

Electronic Appliance

- +
-

Mobile & Tablets

-
-
-
-
-
-
- -
-
-

Mobile & Tablets

+

Fashion & Beauty

+
- + - Card Title + Furniture Table @@ -123,12 +114,12 @@ - + - + - Card Title + Furniture Table @@ -158,11 +149,15 @@ - + - + +

Furniture Table

-

good condition only 6th month used with bed and mattress

+

+ Posted on 24 April 2021 +

+

good condition only 6th month used

Pending Review

diff --git a/Mohem/src/app/itemforsale/items/items.component.scss b/Mohem/src/app/itemforsale/items/items.component.scss index 55e99bab..032c2d77 100644 --- a/Mohem/src/app/itemforsale/items/items.component.scss +++ b/Mohem/src/app/itemforsale/items/items.component.scss @@ -20,7 +20,7 @@ .SearchtextBox{ margin: 10px; - border-radius: 20px; + border-radius: 50px; } .filterText{ margin: 5px 15px 15px; @@ -51,7 +51,10 @@ font-size: 25px; } .sale-icon p{ - margin-top:5px; + margin-top: 5px; + margin-bottom: 5px; + margin-left: 5px; + font-size: 14px; } .bottom-icon{ text-overflow: clip; @@ -62,6 +65,8 @@ ion-card-header{ } ion-card-header img{ margin:15px auto; + border-radius: 6px; + height: 170px; } ion-card-title{ @@ -73,7 +78,8 @@ ion-card-title{ color: orange; } .green{ - color:#00AE4D; + color:#1FA169; + font-weight: bold; } ion-segment-button{ --background-checked: #000; @@ -82,7 +88,7 @@ ion-segment-button{ } ion-segment-button ion-label{ padding: 0; - font-size: 12px; + font-size: 16px; } .segment-button-checked ion-label{ color: #fff !important; @@ -102,14 +108,16 @@ ion-item h3{ font-size: 16px; } .yellow{ - color:#ffc107; + color:#CC9B14; + font-weight: bold; } ion-item .icon{ margin: 5px; } .edit{ - margin-left:20px !important; + position: absolute; + right: 0px; } .fab-button{ position: fixed; @@ -131,8 +139,42 @@ ion-footer .footer-button{ border-radius: 10px; } ion-segment{ - height:40px + height:55px } ion-card{ - margin:5px; + margin: 0px; + --background: #fff; + --border-radius: 53px; + border-radius: 10px; +} +.filter-icon{ + margin-left: 15px; +} +.top img{ + width: 25px; + height: 30px; + margin: 5px 5px 0px 5px; +} +.forward-arrow{ + color:#259CB8; + font-size: 26px; +} +ion-card-content{ + padding: 0 15px 10px 15px; +} +.label-thumb h2{ + font-size: 14px; + font-weight: bold; +} +.posted-on{ + color: #969696; + float: right; + position: absolute; + top: 0; + right: 0; + font-size: 10px; + margin: 5px; +} +.details-text{ + white-space: normal; } \ No newline at end of file diff --git a/Mohem/src/app/profile/add-address/add-address.component.ts b/Mohem/src/app/profile/add-address/add-address.component.ts index d320f7bb..1d64d6c9 100644 --- a/Mohem/src/app/profile/add-address/add-address.component.ts +++ b/Mohem/src/app/profile/add-address/add-address.component.ts @@ -125,7 +125,7 @@ export class AddAddressComponent implements OnInit { // this.functionName = this.getPassMnuEntryObj.FUNCTION_NAME; // this.menuType = this.selMenu.List_Menu.MENU_TYPE; // this.validateEitObj = this.addEITData.submitEITObjList; - this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT; + this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT; // this.eitSubmitAction = this.cs.sharedService.getSharedData( // EITTransactionsRequest.SUBMIT_EIT_ACTION // ); @@ -148,7 +148,8 @@ export class AddAddressComponent implements OnInit { P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME, P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, P_MENU_TYPE: this.menuType, - P_SELECTED_RESP_ID: this.respID + P_SELECTED_RESP_ID: this.respID, + P_COUNTRY_CODE: 'SA' // P_USER_NAME:this.userName }; this.profileService.getAddressDiffStructure(body).subscribe((result: any) => { @@ -1563,7 +1564,8 @@ export class AddAddressComponent implements OnInit { { isResubmit: false }, "confirmAddEITData" ); - this.cs.openConfirmEitPage(); + this.cs.openConfirmAddAddress(); + //this.cs.openConfirmEitPage(); // this.navCtrl.push("ConfirmAddEitPage", { isResubmit: false }); } } @@ -1584,16 +1586,17 @@ export class AddAddressComponent implements OnInit { P_SELECTED_RESP_ID: this.respID, //this.selMenu.List_Menu.RESP_ID,//-999, P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME, P_DESC_FLEX_CONTEXT_CODE: this.eitResponse[0].DESC_FLEX_CONTEXT_CODE, - P_TRANSACTION_VALUES_TBL: this.arrValues, + EITTransactionTBL: this.arrValues, P_COUNTRY_CODE: this.country, - P_EFFECTIVE_DATE: '28-June-2021', + P_EFFECTIVE_DATE: moment(this.effectiveDate).format('DD-MMM-YYYY'), P_ACTION: 'NEW' }; this.profileService .submitAddressTransaction(this.eitRequest) .subscribe((result: any) => { - this.handleEITValidateTr(result); + this.handleSubmitEitResult(result); + // this.handleEITValidateTr(result); }); } } @@ -1613,7 +1616,8 @@ export class AddAddressComponent implements OnInit { this.modalController.dismiss(data); // this.closemodal(); } else { - this.submitEit(); + this.cs.openConfirmAddAddress(); + //this.submitEit(); // this.navCtrl.push("ConfirmAddEitPage"); // data = { eitRequest: {}, updated: [] }; // data.eitRequest = this.eitRequest; diff --git a/Mohem/src/app/profile/confirm-address/confirm-address.component.html b/Mohem/src/app/profile/confirm-address/confirm-address.component.html index 5bb94ad6..a3a64748 100644 --- a/Mohem/src/app/profile/confirm-address/confirm-address.component.html +++ b/Mohem/src/app/profile/confirm-address/confirm-address.component.html @@ -1,3 +1,267 @@ -

- confirm-address works! -

+ + + + {{headerTitle}} + + + + + + + + + +
{{'general, addAttach' | translate}}
+
+ +
+ +
+
+
+ + + {{ '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}} + + + +
+
+
+
+
+ +
+ + + + + +
+ + +
+ + {{ (isDelete ? 'general, delete' : 'general, submit') | translate }} +
+
\ No newline at end of file diff --git a/Mohem/src/app/profile/confirm-address/confirm-address.component.scss b/Mohem/src/app/profile/confirm-address/confirm-address.component.scss index e69de29b..2ed98379 100644 --- a/Mohem/src/app/profile/confirm-address/confirm-address.component.scss +++ b/Mohem/src/app/profile/confirm-address/confirm-address.component.scss @@ -0,0 +1,263 @@ +.footer-button { + border-radius: 2px; + padding: 0 1.1em; + min-height: 45px; + min-width: 200px; + } + + .imgSize { + width: 22px; + height: 22px; + } + + .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: #f0efef; + 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: #269DB8; + } + .title{ + margin-top: -37px; + margin-left: 85px; + } + .title-ar{ + margin-top: -37px; + margin-right: 101px; + } + .confirmEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + background-color: #269DB8; + width: 80% !important; + color: white!important; + border-radius: 16px !important; + } + + .approvalTitle-ar{ + font-weight: bold; + font-size: 16px; + text-align: right; + + } + .approvalTitle{ + font-weight: bold; + font-size: 16px; + text-align: left; + } + \ No newline at end of file diff --git a/Mohem/src/app/profile/confirm-address/confirm-address.component.ts b/Mohem/src/app/profile/confirm-address/confirm-address.component.ts index 0af75309..20b0a474 100644 --- a/Mohem/src/app/profile/confirm-address/confirm-address.component.ts +++ b/Mohem/src/app/profile/confirm-address/confirm-address.component.ts @@ -1,4 +1,20 @@ import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { FileUploader } from 'ng2-file-upload'; +import { AddAttachComponent } from 'src/app/eit/add-attach/add-attach.component'; +import { AddEitResponse } from 'src/app/eit/models/add.eit.response'; +import { EitRequest } from 'src/app/eit/models/eit.request'; +import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes'; +import { EitService } from 'src/app/eit/services/eit.service'; +import { SubmitEitModalComponent } from 'src/app/eit/submit-eit-modal/submit-eit-modal.component'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { EITNotificatonBodyResponse } from 'src/app/notification/models/EITNotificationBodyRes'; +import { WorkListButtonRequest } from 'src/app/notification/models/NotificationButtonReq'; +import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; +import { ProfileService } from '../service/profile.service'; +import { SubmitAddressModalComponent } from '../submit-eit-modal/submit-address-modal.component'; @Component({ selector: 'app-confirm-address', @@ -7,8 +23,548 @@ import { Component, OnInit } from '@angular/core'; }) export class ConfirmAddressComponent implements OnInit { - constructor() { } + private P_TransactionID: number; + private eitRequest: EitRequest; + approversList = []; + addrespList: any;//EitRespModel; + eitComments: string = ""; + menuType: string = ""; + selEmp: string = ""; + respID: number; + selMenu: MenuResponse; + getAttachList: any; + attachListDisplay: any = []; + headerTitle: string = ""; + isTrue: any = 0; + attachItems: any; + public isResubmitEIT: boolean = false; + private itemKey: string = ""; + private pActionMode: string = "SUBMIT"; + attachReqObj: WorkListButtonRequest = new WorkListButtonRequest(); + attachmentRes: any; + objIndex1: any; + attachListOver: any = []; + index: any = 0; + getPassNotificationDetails: any; + 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']; + direction: string; + + + constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService, public profileService: ProfileService) { + this.direction = TranslatorService.getCurrentLanguageName() + this.isSubmitBtnClicked = false; + this.eitRequest = new EitRequest(); + } + + ngOnInit() { + // console.log('ionViewDidLoad ConfirmAddEitPage'); + // let selMenu:MenuResponse=new MenuResponse(); + this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); + this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false); + this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false); + this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false); + // this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit; + // if (this.isResubmitEIT) { + // this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING ** + // // console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails); + // this.P_TransactionID = this.cs.sharedService.getSharedData("TransactionIDResubmit", true); + // // let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true); + + // this.itemKey = this.getPassNotificationDetails.ITEM_KEY; + // this.pActionMode = "RESUBMIT"; + // this.menuType = "E"; + // this.respID = -999; + this.selEmp = this.eitRequest.P_SELECTED_EMPLOYEE_NUMBER; + // this.getApproversList(); + // this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + // let msg: string = ""; + // msg = this.ts.trPK("eit", "update-title"); + // this.headerTitle = msg; + // } else { + this.menuType = this.selMenu.List_Menu.MENU_TYPE; + this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT; + this.addrespList = this.cs.sharedService.getSharedData(AddEitResponse.SHARED_DATA, false); + this.itemKey = this.addrespList.SubmitAddressTransactionList.P_ITEM_KEY; + this.P_TransactionID = this.addrespList.SubmitAddressTransactionList.P_TRANSACTION_ID; + this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete; + + + this.getApproversList(); + // this.confirmAddEit.submitEit(this.eitRequest).subscribe((result: AddEitResponse) => { + // this.handleSubmitEitResult(result); + // }); + //} + } + + getApproversList() { + let body: any = { + P_TRANSACTION_ID: this.P_TransactionID, + P_AME_TRANSACTION_TYPE: "SSHRMS", + P_PAGE_NUM: 1, + P_PAGE_LIMIT: 1000 + } + this.eitService.getApproversList( + body). + subscribe((result: any) => { + this.handleApproversResult(result); + }); + } + + handleApproversResult(result) { + if (this.cs.validResponse(result)) { + this.approversList = result.GetApprovesList; + // console.log("approvers List" + this.approversList); + } + } + + startEitApproval() { + //first call add attach inside success call submit + // if(this.isResubmitEIT){ + // this.startEITApprovalProcess(); + // }else{ + // let listToAdd:any=[]; + if (this.attachListOver) { + // this.attachListOver.forEach(element => { + // if(element.toAdd==true) + // listToAdd.push(element); + // }); + + let request = { + AddAttachmentList: this.attachListOver + } + + this.eitService.addAttachment( + request). + subscribe((result: any) => { + this.handleAddAttachmentResults(result); + }); + } else { + this.startEITApprovalProcess(); + } + // } + } + + + handleAddAttachmentResults(result) { + + if (this.cs.validResponse(result)) { + //this.isUpload=true; + this.isTrue = 0; + for (let i = 0; i < result.AddAttSuccessList.length; i++) { + if (!result.AddAttSuccessList[i].AddSuccess) { + this.attachListOver[i].isSuccess = false; + //this.attachItems[i].isSuccess = false; + // if false display cancel button with waring icon or design + }// end if + else { + // if true remove cancel and set isSuccess = true + // this.attachItems[i].isSuccess = true; + this.attachListOver[i].isSuccess = true; + this.isTrue = this.isTrue + 1; //count flag of attach status + } // end else + } // end for + + if (this.isTrue == result.AddAttSuccessList.length) { + this.startEITApprovalProcess(); + } + else { + //stope + let filtered = this.attachListOver.filter(function (el) { return el.isSuccess == true; }); + this.attachListOver = filtered; + let msg: string = ""; + msg = this.ts.trPK("eit", "attach-errorMsg"); + this.cs.presentAlert(msg); + // this.cs.presentAlert("fail to upload some attach file"); + } + } + } + + startEITApprovalProcess() { + let request: any = {}; + request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; + request.P_MENU_TYPE = this.menuType; + request.P_SELECTED_RESP_ID = this.respID; + request.P_TRANSACTION_ID = this.P_TransactionID; + request.P_ITEM_KEY = this.itemKey; + request.P_ACTION_MODE = this.pActionMode; + request.P_COMMENTS = this.eitComments; + this.profileService.startEitApprovalProcess( + request). + subscribe((result: any) => { + this.handleResults(result); + }); + } + cancelEitProcess() { + let body: any = { + P_TRANSACTION_ID: this.P_TransactionID + } + this.eitService.cancelHRTransaction( + body). + subscribe((result: any) => { + this.handleCancelResults(result); + }); + + } + handleCancelResults(result) { + if (this.cs.validResponse(result)) { + this.isSubmitBtnClicked = false; + // this.navCtrl.popToRoot(); + } + } + handleResults(result) { + if (this.cs.validResponse(result)) { + this.isSubmitBtnClicked = true; + //if(this.isResubmitEIT==false){ + let msg: string = this.ts.trPK("eit", "approval-message-success"); + this.cs.presentAlert(msg); + // } + // this.navCtrl.popToRoot(); + + // this.cs.openHome(); + this.cs.openNotificationPage(); + } + } + + // addAttachment(){ + // this.navCtrl.push('AddAttachPage'); + + + // } + + async addAttachment(str: boolean, attachItems: any) { + // console.log("inside attach modal"); + //open the modal with return data + let attachDocID = attachItems.ATTACHED_DOCUMENT_ID; + + this.cs.sharedService.setSharedData(this.P_TransactionID, 'TransactionID'); + this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj'); + + const modal = await this.modalController.create({ + component: AddAttachComponent + }); + + modal.onDidDismiss() + .then((data) => { + if (data == "cancel" || data == "undefined") { + return; + } else { + if (!str) { + + // this.attachItems = data.map(function(el) { + // var o = Object.assign({}, el); + // o.isSuccess = false; + // return o; + // }) + // this.objIndex1 =this.attachmentRes.findIndex(item => item == attachItems); //to use it in remove attach + //.ATTACHED_DOCUMENT_ID + this.updateFile(data, attachDocID); + } else { + console.log(data); + this.attachListDisplay = data.data; + this.attachItems = this.attachListDisplay.map(function (el) { + var o = Object.assign({}, el); + o.isSuccess = false; + return o; + }); + + this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems; + // this.attachListOver = this.attachListDisplay; + } + // this.attachListDisplay=data; + + // this.attachItems = this.attachListDisplay.map(function(el) { + // var o = Object.assign({}, el); + // o.isSuccess = false; + // return o; + // }) + } + }); + + 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: SubmitAddressModalComponent, + 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) { + + + // if (this.attachItems) { + // let index1 = this.attachItems.findIndex(item => item == objectitem); + // if (index1 > -1) { + + // this.attachItems.splice(index1, 1); + // } + // this.attachListDisplay =this.attachListDisplay.filter(item => item.AttachmentID !== objectitem.AttachmentID); + // } + if (this.attachListOver) { + let index2 = this.attachListOver.findIndex(item => item == objectitem); + if (index2 > -1) { + this.attachListOver.splice(index2, 1); + } + //this.attachListOver =this.attachListOver.filter(item => item.AttachmentID !== objectitem.AttachmentID); + } + if (this.attachmentRes) { + + let index3 = this.attachmentRes.findIndex(item => item == objectitem); + if (index3 > -1) { + + this.attachmentRes.splice(index3, 1); + } + } + + } + + + getAttachment(NotificationID) { + + this.attachReqObj.P_NOTIFICATION_ID = NotificationID; + + this.eitService.getAttach(this.attachReqObj). + subscribe((result: NotificationGetAttachResponse) => { + this.handleWorkListAttachResult(result); + }); + } + + handleWorkListAttachResult(result) { + if (this.cs.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (result.GetAttachementList != null) { + this.attachmentRes = result.GetAttachementList; + } // if result == null + } // valid it + + } + + async OpenAttachFiles(value, Type) { + // let modal: Modal = this.modalCtrl.create('WorkListAttachViewPage', { displayData: value, TypeData: Type }); + // modal.present(); + + this.cs.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage'); + const modal = await this.modalController.create({ + component: WorkListAttachViewComponent + }); + + modal.onDidDismiss() + .then((data) => { + }); + + return await modal.present(); + } + + + delelteFile(attach) { + // let alert = this.cs.confirmAlertDialog(this.translate.translate('general.deletePerm')); + + this.cs.confirmAlertDialog((data) => { + if (data == true) { + this.continueDelete(attach); + } + }, this.ts.trPK('general', 'ok'), () => { + + }, this.ts.trPK('general', 'cancel'), this.ts.trPK('general', 'alert'), this.ts.trPK('eit', 'delete-perm')); + + // alert.onDidDismiss((data) => { + // if (data == true) { + // this.continueDelete(attach); + // } + // }); + + + } + continueDelete(attach) { + // console.log("trst" + attach.ATTACHED_DOCUMENT_ID); + let req = { + P_ATTACHED_DOCUMENT_ID: attach.ATTACHED_DOCUMENT_ID + } + this.eitService.deleteAttach(req). + subscribe((result: any) => { + if (this.cs.validResponse(result)) { + if (result.DeleteAttachmentList.P_RETURN_STATUS === "S") { + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + let msg: string = ""; + msg = this.ts.trPK("eit", "deleteAttach"); + this.cs.presentAlert(msg); + //this.cs.presentAlert("Success" ); + } + } + }); + } + + updateFile(attachList, attachDocID) { + //console.log("updateFile" + attachDocID.ATTACHED_DOCUMENT_ID); + let req = { + P_ATTACHED_DOCUMENT_ID: attachDocID, + P_FILE_DATA: attachList[0].P_FILE_DATA, + P_FILE_NAME: attachList[0].P_FILE_NAME, + P_FILE_CONTENT_TYPE: attachList[0].P_FILE_CONTENT_TYPE + } + this.eitService.updateAttach(req). + subscribe((result: any) => { + if (this.cs.validResponse(result)) { + if (result.MessageStatus == 1) { + let msg: string = ""; + msg = this.ts.trPK("eit", "attachUpdate"); + this.cs.presentAlert(msg); + // this.cs.presentAlert("updated attach successfully" ); + + //flag to disable update and enable remove + // this.removeFile(attachList); + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + } + } // val + }); + } + + + ionViewWillLeave() { + if (this.P_TransactionID && this.isSubmitBtnClicked == false) + 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() + }); + }); + } + }); + + + onFileSelectedclick(event) { + event.target.value = ''; + } + + + + 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.P_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); + + // } + - ngOnInit() {} } diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index adfd1d65..690190cc 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -193,8 +193,8 @@

{{ts.trPK('general','main-address')}}

- - + + diff --git a/Mohem/src/app/profile/profile.module.ts b/Mohem/src/app/profile/profile.module.ts index 46dc114d..6ff96fc7 100644 --- a/Mohem/src/app/profile/profile.module.ts +++ b/Mohem/src/app/profile/profile.module.ts @@ -19,6 +19,8 @@ import { from } from 'rxjs'; import { EditDetailProfileComponent } from './modal/edit-detail-profile/edit-detail-profile.component'; import { AddBasicDetailsComponent } from './add-basic-details/add-basic-details.component'; import { AddAddressComponent } from './add-address/add-address.component'; +import { ConfirmAddressComponent } from './confirm-address/confirm-address.component'; +import { SubmitAddressModalComponent } from './submit-eit-modal/submit-address-modal.component'; const routes: Routes = [ { @@ -32,6 +34,10 @@ const routes: Routes = [ { path: 'add-address', component: AddAddressComponent + }, + { + path: 'confirm-add-address', + component: ConfirmAddressComponent } ], }, @@ -74,8 +80,8 @@ const routes: Routes = [ component: ProfilePage, children: [ { - path: 'addBasicDetails', - component: AddBasicDetailsComponent + path: 'addBasicDetails', + component: AddBasicDetailsComponent } ], } @@ -99,8 +105,10 @@ const routes: Routes = [ ProfileImageComponent, EditProfileComponent, PerformanceEvaluationComponent, + ConfirmAddressComponent, + SubmitAddressModalComponent, AddBasicDetailsComponent], - entryComponents: [EditDetailProfileComponent], + entryComponents: [EditDetailProfileComponent, SubmitAddressModalComponent], providers: [DatePicker] }) export class ProfilePageModule { } diff --git a/Mohem/src/app/profile/service/profile.service.ts b/Mohem/src/app/profile/service/profile.service.ts index 67a8a787..3184be82 100644 --- a/Mohem/src/app/profile/service/profile.service.ts +++ b/Mohem/src/app/profile/service/profile.service.ts @@ -6,9 +6,9 @@ import { AuthenticationService } from "src/app/hmg-common/services/authenticatio providedIn: 'root' }) export class ProfileService { - public static updateEmpImage ="Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE"; - public static getEmployeeBasicDetails ="Services/ERP.svc/REST/GET_EMPLOYEE_BASIC_DETAILS"; - /* EIT Services URLs */ + public static updateEmpImage = "Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE"; + public static getEmployeeBasicDetails = "Services/ERP.svc/REST/GET_EMPLOYEE_BASIC_DETAILS"; + /* EIT Services URLs */ public static getMenuEntries = 'Services/ERP.svc/REST/GET_MENU_ENTRIES'; public static getEITTransctions = 'Services/ERP.svc/REST/GET_EIT_TRANSACTIONS'; public static getBASICDFFStrutre = 'Services/ERP.svc/REST/GET_BASIC_DET_DFF_STRUCTURE'; @@ -18,92 +18,97 @@ export class ProfileService { public static validateEITTransctions = 'Services/ERP.svc/REST/VALIDATE_EIT_TRANSACTION'; public static submitEit = 'Services/ERP.svc/REST/SUBMIT_EIT_TRANSACTION'; public static resubmitEit = 'Services/ERP.svc/REST/RESUBMIT_EIT_TRANSACTION'; - public static startEitProcess = 'Services/ERP.svc/REST/START_EIT_APPROVAL_PROCESS'; + public static startEitProcess = 'Services/ERP.svc/REST/START_ADDRESS_APPROVAL_PROCESS'; public static updateAttach = 'Services/ERP.svc/REST/UPDATE_ATTACHMENT'; public static deleteAttach = 'Services/ERP.svc/REST/DELETE_ATTACHMENT'; public static getApproversList = 'Services/ERP.svc/REST/GET_APPROVERS_LIST'; public static addAttachment = 'Services/ERP.svc/REST/ADD_ATTACHMENT'; public static cancelHRTransaction = 'Services/ERP.svc/REST/CANCEL_HR_TRANSACTION'; public static getAttach = 'Services/ERP.svc/REST/GET_ATTACHMENTS'; - + public static getEmployeeAddress = "Services/ERP.svc/REST/GET_EMPLOYEE_ADDRESS"; public static getCountries = "Services/ERP.svc/REST/GET_COUNTRIES"; public static getDiffStructure = "Services/ERP.svc/REST/GET_ADDRESS_DFF_STRUCTURE" public static submitAddressTransactions = "Services/ERP.svc/REST/SUBMIT_ADDRESS_TRANSACTION" - constructor( - public con: ConnectorService, - public authService: AuthenticationService - ) {} + constructor( + public con: ConnectorService, + public authService: AuthenticationService + ) { } - public updateImageProfile( updateImgRequest: any,onError?: any,errorLabel?: string - ): Observable { - const request = updateImgRequest; - this.authService.authenticateRequest(request); - return this.con.post( - ProfileService.updateEmpImage, - request, - onError, - errorLabel - ); - } + public updateImageProfile(updateImgRequest: any, onError?: any, errorLabel?: string + ): Observable { + const request = updateImgRequest; + this.authService.authenticateRequest(request); + return this.con.post( + ProfileService.updateEmpImage, + request, + onError, + errorLabel + ); + } - public getEmployeeAddress(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { - const request = basicEmployeeDetailsRequest; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.getEmployeeAddress, request, onError, errorLabel); - } + public getEmployeeAddress(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicEmployeeDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getEmployeeAddress, request, onError, errorLabel); + } - public getEmployeeBasicDetails(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { - const request = basicEmployeeDetailsRequest; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.getEmployeeBasicDetails, request, onError, errorLabel); - } + public getEmployeeBasicDetails(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicEmployeeDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getEmployeeBasicDetails, request, onError, errorLabel); + } - public getBasicDFFStrutre(BASICDFFStrutreReq: any, onError?: any, errorLabel?: string): Observable { - const request = BASICDFFStrutreReq; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.getBASICDFFStrutre, request, onError, errorLabel); - } + public getBasicDFFStrutre(BASICDFFStrutreReq: any, onError?: any, errorLabel?: string): Observable { + const request = BASICDFFStrutreReq; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getBASICDFFStrutre, request, onError, errorLabel); + } - public getColumnStructure(body: any, onError?: any, errorLabel?: string): Observable { - const request = body; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.getBASICCOLStructure, request, onError, errorLabel); - } + public getColumnStructure(body: any, onError?: any, errorLabel?: string): Observable { + const request = body; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getBASICCOLStructure, request, onError, errorLabel); + } - public getDefaultValue(DefaultValueReq: any, onError?: any, errorLabel?: string): Observable { - const request = DefaultValueReq; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.getDefaultValue, request, onError, errorLabel); - } + public getDefaultValue(DefaultValueReq: any, onError?: any, errorLabel?: string): Observable { + const request = DefaultValueReq; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getDefaultValue, request, onError, errorLabel); + } - public getSetValue(SetValueReq: any, onError?: any, errorLabel?: string): Observable { - const request = SetValueReq; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.getSetValue, request, onError, errorLabel); - } + public getSetValue(SetValueReq: any, onError?: any, errorLabel?: string): Observable { + const request = SetValueReq; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getSetValue, request, onError, errorLabel); + } - public submitEit(eit: any, onError?: any, errorLabel?: string): Observable { - const request = eit; - request.EITTransactionTBLModel = eit.EITTransactionTBL; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.submitEit, request, onError, errorLabel); - } + public submitEit(eit: any, onError?: any, errorLabel?: string): Observable { + const request = eit; + request.EITTransactionTBLModel = eit.EITTransactionTBL; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.submitEit, request, onError, errorLabel); + } - public getCountries(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { - const request = basicEmployeeDetailsRequest; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.getCountries, request, onError, errorLabel); - } - public getAddressDiffStructure(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { - const request = basicEmployeeDetailsRequest; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.getDiffStructure, request, onError, errorLabel); - } - public submitAddressTransaction(validateEITTransactionReq: any, onError?: any, errorLabel?: string): Observable { - const request = validateEITTransactionReq; - this.authService.authenticateRequest(request); - return this.con.post(ProfileService.submitAddressTransactions, request, onError, errorLabel); - } + public getCountries(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicEmployeeDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getCountries, request, onError, errorLabel); + } + public getAddressDiffStructure(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicEmployeeDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getDiffStructure, request, onError, errorLabel); + } + public submitAddressTransaction(validateEITTransactionReq: any, onError?: any, errorLabel?: string): Observable { + const request = validateEITTransactionReq; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.submitAddressTransactions, request, onError, errorLabel); + } + public startEitApprovalProcess(eitProcess: any, onError?: any, errorLabel?: string): Observable { + const request = eitProcess; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.startEitProcess, request, onError, errorLabel); + } } \ No newline at end of file diff --git a/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.html b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.html new file mode 100644 index 00000000..4bbf7b6b --- /dev/null +++ b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.html @@ -0,0 +1,39 @@ + + + + + +

{{'eit,confirmation' | translate}}

+ +
+
+ {{'eit,no-attachment' | translate}} +
+
+ {{'eit,no-note' | translate}} +
+
+ + + + + {{'eit,submit' | translate}} + {{ts.trPK('general','ok')}} + + + + + {{ts.trPK('general','cancel')}} + + + + +
+ \ No newline at end of file diff --git a/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.scss b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.scss new file mode 100644 index 00000000..5a81509a --- /dev/null +++ b/Mohem/src/app/profile/submit-eit-modal/submit-address-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:: #269DB8; + 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:: #269DB8; + width: 100% !important; + color: white!important; + border-radius: 16px !important; +} + + + diff --git a/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.spec.ts b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.spec.ts new file mode 100644 index 00000000..17bae3a8 --- /dev/null +++ b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SubmitAddressModalComponent } from './submit-address-modal.component'; + +describe('SubmitEitModalComponent', () => { + let component: SubmitAddressModalComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SubmitAddressModalComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SubmitAddressModalComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.ts b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.ts new file mode 100644 index 00000000..21b7f00f --- /dev/null +++ b/Mohem/src/app/profile/submit-eit-modal/submit-address-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-address-modal.component.html', + styleUrls: ['./submit-address-modal.component.scss'], +}) +export class SubmitAddressModalComponent implements OnInit { + submitAttachmentList: any = []; + eitComments: string; + constructor(public 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/assets/font/Poppins/Poppins-Bold.ttf b/Mohem/src/assets/font/Poppins/Poppins-Bold.ttf new file mode 100644 index 00000000..b94d47f3 Binary files /dev/null and b/Mohem/src/assets/font/Poppins/Poppins-Bold.ttf differ diff --git a/Mohem/src/assets/font/Poppins/Poppins-Medium.ttf b/Mohem/src/assets/font/Poppins/Poppins-Medium.ttf new file mode 100644 index 00000000..e90e87ed Binary files /dev/null and b/Mohem/src/assets/font/Poppins/Poppins-Medium.ttf differ diff --git a/Mohem/src/assets/font/Poppins/Poppins-Regular.ttf b/Mohem/src/assets/font/Poppins/Poppins-Regular.ttf new file mode 100644 index 00000000..be06e7fd Binary files /dev/null and b/Mohem/src/assets/font/Poppins/Poppins-Regular.ttf differ diff --git a/Mohem/src/assets/imgs/check-white.svg b/Mohem/src/assets/imgs/check-white.svg new file mode 100644 index 00000000..8abee1cc --- /dev/null +++ b/Mohem/src/assets/imgs/check-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/check.svg b/Mohem/src/assets/imgs/check.svg new file mode 100644 index 00000000..cdc86abe --- /dev/null +++ b/Mohem/src/assets/imgs/check.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/fashion .svg b/Mohem/src/assets/imgs/itemsforsale/fashion.svg similarity index 100% rename from Mohem/src/assets/imgs/itemsforsale/fashion .svg rename to Mohem/src/assets/imgs/itemsforsale/fashion.svg diff --git a/Mohem/src/theme/variables.scss b/Mohem/src/theme/variables.scss index 963c1e72..64c5b457 100644 --- a/Mohem/src/theme/variables.scss +++ b/Mohem/src/theme/variables.scss @@ -35,20 +35,32 @@ src: url('../assets/font/WorkSans-Bold.otf'); } +@font-face { + font-family: Poppins-Bold; + src: url('../assets/font/Poppins/Poppins-Bold.ttf'); +} +@font-face { + font-family: Poppins-Medium; + src: url('../assets/font/Poppins/Poppins-Medium.ttf'); +} +@font-face { + font-family: Poppins; + src: url('../assets/font/Poppins/Poppins-Regular.ttf'); +} :root { ---ion-font-family: 'WorkSans-Light'; +--ion-font-family: 'Poppins'; --break-small: 450px; --break-big:565px; //$break-large: 1200px; ---fontFamilyLightEN:'WorkSans-Light'; +--fontFamilyLightEN:'Poppins'; --ontFamilyLightAR:'GE_SS_Two_Light'; ---fontFamilyRegularEN:'WorkSans-Regular'; +--fontFamilyRegularEN:'Poppins'; --fontFamilyRegularAR:'GE_SS_TWO_MEDIUM'; ---fontFamilyMediumEN:'WorkSans-Regular'; +--fontFamilyMediumEN:'Poppins-Regular'; --fontFamilyMediumAR:'GE_SS_TWO_MEDIUM'; ---fontFamilyBoldEN:'WorkSans-Bold'; +--fontFamilyBoldEN:'Poppins-Bold'; --fontFamilyBoldAR:'GE_SS_Two_Bold'; ---fontFamilySemiBoldEN:'WorkSans-SemiBold'; +--fontFamilySemiBoldEN:'Poppins-Bold'; --fontFamilySemiBoldAR:'GE_SS_Two_Bold'; --fontFamilyIOSAR:-apple-system, "Helvetica Neue", "Roboto", sans-serif; --fontFamilyAndroidAR:"Roboto", "Helvetica Neue", sans-serif;