diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index dae990dc..97a29e98 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -28,7 +28,7 @@ export class ConnectorService { public static timeOut = 120 * 1000; public static host = 'https://uat.hmgwebservices.com/'; - // public static host = 'https://hmgwebservices.com/'; + //public static host = 'https://hmgwebservices.com/'; constructor(public httpClient: HttpClient, public cs: CommonService, diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html index 3e705489..b59d38d9 100644 --- a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html @@ -1,11 +1,11 @@
- + - + diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 9f614c6a..2c746a9d 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -63,8 +63,8 @@ {{'general,other-services' | translate}} - - + + diff --git a/Mohem/src/app/itemforsale/home/home.component.html b/Mohem/src/app/itemforsale/home/home.component.html index bc797af1..fc694323 100644 --- a/Mohem/src/app/itemforsale/home/home.component.html +++ b/Mohem/src/app/itemforsale/home/home.component.html @@ -17,14 +17,15 @@
-
+
{{ts.trPK('itemforsale','select-category')}}
{{ts.trPK('itemforsale','completed')}}
-
+ +
@@ -34,15 +35,15 @@
{{step >2 ? "Completed" : "Locked"}}
-
-
+
+
{{ts.trPK('itemforsale','review-sell')}}
{{step >3 ? "Completed" : "Locked"}}
-
+
@@ -236,7 +237,7 @@ Selling for

500 SAR

- This ad will be valid for 2 week after approval + This ad will be valid for 2 week after approval
diff --git a/Mohem/src/app/itemforsale/home/home.component.scss b/Mohem/src/app/itemforsale/home/home.component.scss index bcfeb828..0b7a3c96 100644 --- a/Mohem/src/app/itemforsale/home/home.component.scss +++ b/Mohem/src/app/itemforsale/home/home.component.scss @@ -12,7 +12,7 @@ .md-stepper-horizontal .md-step { display:table-cell; position:relative; - padding:20px; + padding:20px 15px; text-align: left; } .md-stepper-horizontal .md-step:hover, @@ -33,11 +33,11 @@ .md-stepper-horizontal .md-step:hover .md-step-circle { background-color:#757575; } -.md-stepper-horizontal .md-step:last-child .md-step-bar-left { +.md-stepper-horizontal ion-col:last-child .md-step-bar-left { display:none; } .md-stepper-horizontal .md-step .md-step-circle { - width: 30px; + width: 30px; height: 30px; border-radius: 50%; text-align: center; @@ -45,6 +45,7 @@ font-size: 16px; font-weight: 600; color: #FFFFFF; + z-index: 3; } .md-stepper-horizontal .md-step:last-child .md-step-circle { margin-left:20px @@ -106,28 +107,25 @@ margin-left:20px top: 36px; height: 2px; background: #DDDDDD; - width: 80px; -} -.md-stepper-horizontal .md-step .md-step-bar-right { - right:0; - left:50%; - margin-left:20px; + width: 95%; + z-index: 0; } .md-stepper-horizontal .md-step .md-step-bar-left { - margin-right: 0px; - left: 55px + margin-right: 0px; + left: 58%; } .orange .md-step-bar-left { background:#CC9B14 !important; +font-weight: bold; } .green .md-step-bar-left { background:#1FA169 !important; + font-weight: bold; } .header{ - height: 150px; + height: 15%; width: 100%; - position: absolute; background: #259CB8; top: 0; @@ -136,17 +134,17 @@ background:#CC9B14 !important; --background: #259CB8 !important; } .bottom{ - height: 88%; + height: 85%; width: 100%; position: absolute; background: #F5F5F5; - top: 20%; + top: 15%; } .md-step-optional{ font-size: 12px; background: #cccccc; color: #ffffff !important; - padding: 2px; + padding: 2px 5px 2px 5px; border-radius: 5px; margin: 5px; } @@ -154,14 +152,14 @@ background:#CC9B14 !important; font-size: 12px; background: #CC9B14; color: #ffffff !important; - padding: 2px; + padding:2px 5px 2px 5px; border-radius: 5px; } .green .md-step-optional{ font-size: 12px; background-color:#00AE4D; color: #ffffff !important; - padding: 3px 5px 3px 5px; + padding: 2px 5px 2px 5px; border-radius: 5px; } .green .md-step-circle{ @@ -190,21 +188,24 @@ margin-bottom: 70px; .sale-icon{ box-shadow: 1px 1px 5px 1px #cccc; padding: 10px; - margin: 1px; + margin: 2px; border-radius: 15px; background: #fff; height: 115px; + position: relative; } .sale-icon ion-icon{ font-size: 35px; } .sale-icon p{ - margin-top:5px; - margin-top: 5px; margin-bottom: 0; - font-size: 14px; + font-size: 12px; font-weight: bold; + position: absolute; + bottom: 10px; + text-align: left; + padding: 5px; } .add-details{ background: #fff; @@ -219,8 +220,8 @@ margin-bottom: 70px; padding: 5px; } .add-details p{ - font-weight: bold; - font-size: 18px; + font-weight: normal; + font-size: 12px; } .add-details ion-label{ margin: 10px; @@ -259,17 +260,29 @@ position: relative; width: 80%; } .description-details .orange{ -color:orange + color: #CC9B14; + font-weight: bold; + font-size: 14px; } .description-details img{ margin:10px; } -.waring{color: red; +.waring{ + color: #CA3332; padding: 10px; - font-size: 14px;} + font-size: 10px; + +} +.waring img{ + margin: 0 10px; +} .selling h2{ display: inline-block; font-weight: bolder; + font-size: 25px; +} +.selling strong{ + font-size: 14px; } .flaot-button{float:right;margin:30px} .orange-border{ @@ -280,6 +293,7 @@ border-top:2px solid #CC9B14; } .md-step span{ position: relative; + z-index: 2; } .red-button{ --background:#CA3332; @@ -300,7 +314,7 @@ ion-footer{ } .review-title{ - font-size: 16px; + font-size: 14px; font-weight: bold; } .camera-icon{ @@ -312,4 +326,8 @@ ion-footer{ top: 60px; bottom: 0; color: #259CB8; -} \ No newline at end of file +} +.top img{ + position: absolute; + top: 15px; +} diff --git a/Mohem/src/app/itemforsale/items/items.component.html b/Mohem/src/app/itemforsale/items/items.component.html index 447131e1..9c37e34f 100644 --- a/Mohem/src/app/itemforsale/items/items.component.html +++ b/Mohem/src/app/itemforsale/items/items.component.html @@ -21,7 +21,7 @@
- +
@@ -107,7 +107,7 @@ - + @@ -134,7 +134,7 @@ - + @@ -147,7 +147,7 @@
- + diff --git a/Mohem/src/app/itemforsale/items/items.component.scss b/Mohem/src/app/itemforsale/items/items.component.scss index bb7b0dd6..de1762e7 100644 --- a/Mohem/src/app/itemforsale/items/items.component.scss +++ b/Mohem/src/app/itemforsale/items/items.component.scss @@ -18,10 +18,7 @@ } -.SearchtextBox{ - margin: 10px; - border-radius: 50px; -} + .filterText{ margin: 5px 15px 15px; font-size: 18px; @@ -71,16 +68,42 @@ ion-card-header img{ ion-card-title{ font-weight: bold; - font-size: 18px; - padding: 5px; + font-size: 14px; + padding: 5px } .orange{ - color: orange; + color: #CC9B14; + font-weight: bold; } .green{ color:#1FA169; font-weight: bold; } +ion-card-content p{ + margin-left: 0; + margin-right: 0; + margin-top: 15px; + margin-bottom: 0px; + font-size: 12px; + font-weight: bold; +} +.my-ads ion-item{ + margin: 10px; + --border-radius: 10px; + padding: 15px 10px 0px 10px; + width: 100%; +} +.my-ads ion-thumbnail img{ + position: relative; + top: -10px; + border-radius: 6px; +} +.my-ads .details-text{ + font-size: 11px; +} +.my-ads .yellow, .my-ads .green{ + font-size: 11px; +} ion-segment-button{ --background-checked: #000; --indicator-color : transparent!important; @@ -89,6 +112,8 @@ ion-segment-button{ ion-segment-button ion-label{ padding: 0; font-size: 16px; + white-space: normal; + font-weight: bold; } .segment-button-checked ion-label{ color: #fff !important; @@ -96,16 +121,16 @@ color: #fff !important; .segment-button-checked{ background: rgb(46, 46, 46); } -ion-item{ +ion-item.SearchtextBox{ --background: #fff; margin: 10px; - border-radius: 25px; + --border-radius: 100px; padding: 5px; } ion-item h3{ color: #000; font-weight: bold; - font-size: 16px; + font-size: 14px; } .yellow{ color:#CC9B14; @@ -113,7 +138,7 @@ ion-item h3{ } ion-item .icon{ -margin: 5px; + margin: 5px 0px; } .edit{ position: absolute; @@ -161,6 +186,7 @@ ion-card{ } ion-card-content{ padding: 0 15px 10px 15px; + font-size: 11px; } .label-thumb h2{ font-size: 14px; @@ -174,6 +200,7 @@ ion-card-content{ right: 0; font-size: 10px; margin: 5px; + padding: 0px 5px; } .details-text{ white-space: normal; @@ -181,3 +208,11 @@ ion-card-content{ ion-card-content ion-icon{ font-size: 25px; } +ion-card-content strong{ + margin-left: -5px; + font-size: 16px; +} +ion-fab-button{ + height: 60px; + width: 60px; +} \ No newline at end of file diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html index c73ad025..58be2771 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.html +++ b/Mohem/src/app/offersdiscount/home/home.component.html @@ -50,18 +50,18 @@ - + - - + +
{{item.Title}}
- - {{item.Discount}} {{ts.trPK('general','discount')}} - +
+ {{item.Discount}} +

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

@@ -69,8 +69,8 @@

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

- - + +
diff --git a/Mohem/src/app/offersdiscount/home/home.component.scss b/Mohem/src/app/offersdiscount/home/home.component.scss index fe0564ea..efa9ee4a 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.scss +++ b/Mohem/src/app/offersdiscount/home/home.component.scss @@ -54,9 +54,8 @@ margin-top: 0px; margin-bottom: 5px; text-transform: capitalize; - font-size: 17px; - text-align: center; - font-size: 14px; + + font-size: 10px; text-align: left; } .bottom-icon{ @@ -69,16 +68,27 @@ ion-card-header{ background: #fff; } -ion-card-header img{ - margin: 15px auto; - border-radius: 6px; - height: 150px; +// ion-card-header img{ +// margin: 15px auto; +// border-radius: 6px; +// max-height: 80px; +// min-height: 50px; +// } + +.header-img{ + height: 120px; + width: 100%; + background-position: center; + background-size: contain; + background-repeat: no-repeat; + margin-top: 5px; } ion-card-title{ - - font-weight: bold; - font-size: 18px; - padding: 5px; + font-size: 14px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin: 5px; } .orange{ color: orange; @@ -119,9 +129,19 @@ margin: 5px; margin-left:20px !important; } .offer-valid{ + margin: 2px 0px 5px -3px; + font-size: 14px; font-weight: bold; - margin:2px; +} +.offers-title{ font-size: 14px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin-top: 20px; + font-weight: bold; + + font-size: 14px !important; } .active .top::before{ position: absolute; diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts index 511a7e32..a1a413f6 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.ts +++ b/Mohem/src/app/offersdiscount/home/home.component.ts @@ -97,7 +97,15 @@ export class HomeComponent implements AfterViewInit { return new Date(date) >= new Date() } getDotted(temp) { - return temp.substring(0, 60) + " ..."; + temp = this.stripHtml(temp); + return temp.substring(0, 70) + " ..."; + } + stripHtml(html) { + var temporalDivElement = document.createElement("div"); + + temporalDivElement.innerHTML = html; + + return temporalDivElement.textContent || temporalDivElement.innerText || ""; } search(t) { diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html index 29e80cec..bfbcfcf9 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html @@ -11,7 +11,8 @@
- +
+ {{details.Title}} @@ -26,18 +27,16 @@

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

- +

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

- - - + -

{{details.Discount}} {{ts.trPK('general','discount')}}

+

{{details.Discount}}

@@ -62,16 +61,17 @@ - +
+ {{item.Title}}
- - {{item.Discount}} {{ts.trPK('general','discount')}} - +
+ {{item.Discount}} +
@@ -80,8 +80,8 @@

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

- - + +
diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss index 70e06772..c6769b96 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss @@ -25,7 +25,10 @@ ion-card-header{ height: 170px; } .related-offers-container ion-card-header img{ - height: 150px; + margin: 15px auto; + border-radius: 6px; + max-height: 80px; + min-height: 50px; } .content-bottom{ padding: 0px 0px 10px; @@ -66,7 +69,11 @@ ion-card-content p{ margin:5px; } .related-card ion-card-title{ - font-size: 16px; + font-size: 14px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin: 5px; } .related-offers{ position: relative; @@ -74,8 +81,9 @@ ion-card-content p{ font-size: 18px; } .description{ - height: 55px; + height: 30px; overflow: hidden; + font-size: 11px; } ion-card{ margin: 20px; @@ -89,6 +97,16 @@ ion-card{ --border-radius: 53px; border-radius: 10px; } +.offers-title{ + font-size: 14px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin-top: 20px; + font-weight: bold; + + font-size: 14px !important; +} .red{ color: #de1717; font-weight: bold; @@ -103,4 +121,24 @@ ion-card{ font-size: 25px; position: absolute; bottom: 6px; +} +.header-img{ + height: 120px; + width: 100%; + background-position: center; + background-size: contain; + background-repeat: no-repeat; + margin-top: 5px; +} +.header-img-main{ + height: 170px; + width: 100%; + background-position: center; + background-size: contain; + background-repeat: no-repeat; +} +.offer-valid{ + margin: 2px 0px 5px -3px; + font-size: 14px; + font-weight: bold; } \ No newline at end of file diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts index b9b9c110..3e620d69 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts @@ -24,7 +24,15 @@ export class OfferDetailsComponent implements OnInit { return new Date(date) >= new Date() } getDotted(temp) { - return temp.substring(0, 75) + " ..."; + temp = this.stripHtml(temp); + return temp.substring(0, 100) + " ..."; + } + stripHtml(html) { + var temporalDivElement = document.createElement("div"); + + temporalDivElement.innerHTML = html; + + return temporalDivElement.textContent || temporalDivElement.innerText || ""; } share() { this.socialSharing.share(this.details.Description, this.details.Title, this.details.Banner_Image) diff --git a/Mohem/src/app/profile/add-address/add-address.component.html b/Mohem/src/app/profile/add-address/add-address.component.html index 1db8fcc7..b66eab09 100644 --- a/Mohem/src/app/profile/add-address/add-address.component.html +++ b/Mohem/src/app/profile/add-address/add-address.component.html @@ -9,15 +9,18 @@ - + {{ts.trPK('general','country')}} {{country.COUNTRY_NAME}} - - + + {{selectedCountryName}} + + + Effective Date 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 0b88a65a..230bcede 100644 --- a/Mohem/src/app/profile/add-address/add-address.component.ts +++ b/Mohem/src/app/profile/add-address/add-address.component.ts @@ -74,7 +74,11 @@ export class AddAddressComponent implements OnInit { addEITData: any; direction: string; country: any = 'SA'; + selectedCountryName: any; public effectiveDate: any; + public submitAbsObjList: any = []; + + public isUpdate: boolean; constructor( public modalController: ModalController, public cs: CommonService, @@ -137,8 +141,17 @@ export class AddAddressComponent implements OnInit { ngAfterViewInit() { console.log("ngAfterViewInit"); // console.log(this.containerDiv.nativeElement); + var addressEntries = this.cs.sharedService.getSharedData(ProfileService.ADRESS_ENTRIES); + if (addressEntries && addressEntries.UPDATE_BUTTON === 'Y') { + this.isUpdate = true; + let countryDetail = this.cs.sharedService.getSharedData(ProfileService.COUNTRY); + this.selectedCountryName = countryDetail.name; + this.country = countryDetail.code; + } this.getEitDffStructure(); // this.addFieldToDOM(this.buttonInput, 'btnSubmit', this.cs.presentAlert('Clicked!'), true) + + this.getCountires(); this.effectiveDate = new Date(); } @@ -161,6 +174,10 @@ export class AddAddressComponent implements OnInit { if (result.GetAddressDffStructureList != null) { this.eitResponse = result.GetAddressDffStructureList; this.drawEitFields(result.GetAddressDffStructureList); + if (this.isUpdate) { + this.submitAbsObjList = this.cs.sharedService.getSharedData(ProfileService.EMP_ADDRESS); + this.fillAbsStructure(); + } } } @@ -1636,5 +1653,69 @@ export class AddAddressComponent implements OnInit { this.countries = result['GetCountriesList']; }) } + fillAbsStructure() { + for (let i = 0; i < this.submitAbsObjList.length; i++) { + let val: any; + if (this.submitAbsObjList[i].VARCHAR2_VALUE) + val = this.submitAbsObjList[i].VARCHAR2_VALUE; + else if (this.submitAbsObjList[i].DATE_VALUE) + val = this.submitAbsObjList[i].DATE_VALUE; + else if (this.submitAbsObjList[i].NUMBER_VALUE) + val = this.submitAbsObjList[i].NUMBER_VALUE; + const elem = document.getElementById( + this.submitAbsObjList[i].APPLICATION_COLUMN_NAME + ) as HTMLInputElement; + //obj.transactionNo=this.submitAbsObjList[i].TRANSACTION_NUMBER; + if (elem) { + if (val) { + let feldDetails = this.eitResponse.find( + x => + x.APPLICATION_COLUMN_NAME == + this.submitAbsObjList[i].APPLICATION_COLUMN_NAME + ); + if (feldDetails) { + let isStandardDate = this.isStandardDateVal(feldDetails); + let isStandardDateTime = this.isStandardDateTimeVal(feldDetails); + let isStandardTime = this.isStandardTimeVal(feldDetails); + if (isStandardDate) { + //elem.value = this.common.reverseFormatDate(val); + } else if (isStandardDateTime) { + // elem.innerHTML = this.common.reverseFormatStandardDate(val); + // elem.dataset.dtvalue = this.common.reverseFormatStandardDate(val); + } else if (isStandardTime) { + elem.innerHTML = val; + elem.dataset.dtvalue = val; + } else { + elem.value = val; + elem.setAttribute("value", elem.value); + } + if ( + feldDetails.DISPLAY_FLAG == "N" || + (feldDetails.VALIDATION_TYPE != "N" && + feldDetails.READ_ONLY == "Y") + ) { + elem.dataset.colmText = val; + elem.value = this.submitAbsObjList[i].SEGMENT_VALUE_DSP; + elem.setAttribute("value", elem.value); + } + } + elem.dataset.hiddenval = val; //hide the value to set it after calling get value set + if ( + feldDetails.CHILD_SEGMENTS_VS_Splited && + feldDetails.CHILD_SEGMENTS_VS_Splited.length > 0 + ) { + let listArray: any = feldDetails.CHILD_SEGMENTS_VS_Splited; + listArray.forEach(element => { + this.getValueSet(element); + }); + } + //var event = new Event('change'); + //elem.dispatchEvent(event); + } + } else { + } + } + //this.ExtraObj=obj; + } } diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index adfd1d65..49418495 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -196,7 +196,7 @@ + > diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 3694d942..8ab7bfba 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -48,7 +48,7 @@ export class HomeComponent implements OnInit { public poBox: any; public city: any; public postalCode: any; - + public country: any; public employeeAdress: any = []; constructor( public ts: TranslatorService, @@ -91,7 +91,7 @@ export class HomeComponent implements OnInit { ngOnInit() { this.getProfile(); - this.menuEntries = this.cs.sharedService.getSharedData('menuEntries', false); + this.menuEntries = this.cs.sharedService.getSharedData('menuEntries', false); if (this.menuEntries) { this.setMenuEntries(); } @@ -101,14 +101,14 @@ export class HomeComponent implements OnInit { let personalInformationChildren: any; let personalInfoNestedChildren: any; - if (this.targetValue === 'sideMenu') { - for( let i = 0; i < this.menuEntries.length; i++ ) { + if (this.targetValue === 'sideMenu') { + for (let i = 0; i < this.menuEntries.length; i++) { if (this.menuEntries[i].MENU_NAME === 'MBL_E_PROFESSIONALS_01') { personalInformationChildren = this.menuEntries[i].children; - for( let j = 0; j < personalInformationChildren.length; j++ ) { + for (let j = 0; j < personalInformationChildren.length; j++) { if (personalInformationChildren[j].MENU_NAME = 'MBL_PERINFO_SS' && personalInformationChildren[j].ENTRY_SEQUENCE === 15) { personalInfoNestedChildren = personalInformationChildren[j].children; - for( let k = 0; k < personalInfoNestedChildren.length; k++ ) { + for (let k = 0; k < personalInfoNestedChildren.length; k++) { if (personalInfoNestedChildren[k].REQUEST_TYPE === 'BASIC_DETAILS') { this.basicDetailsSubMenu = personalInfoNestedChildren[k]; } @@ -122,7 +122,7 @@ export class HomeComponent implements OnInit { } } else { const menuEntriesLocalArray: any = this.menuEntries.children; - for( let i = 0; i < menuEntriesLocalArray.length; i++ ) { + for (let i = 0; i < menuEntriesLocalArray.length; i++) { if (menuEntriesLocalArray[i].REQUEST_TYPE === 'BASIC_DETAILS') { this.basicDetailsSubMenu = menuEntriesLocalArray[i]; } @@ -190,6 +190,7 @@ export class HomeComponent implements OnInit { this.profileService.getEmployeeAddress(body).subscribe((result) => { console.log(result); this.employeeAdress = result.GetEmployeeAddressList; + this.country = { name: result.P_COUNTRY_NAME, code: result.P_COUNTRY_CODE } for (let i = 0; i < this.employeeAdress.length; i++) { if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'ADDRESS_LINE1') { this.address = this.employeeAdress[i].SEGMENT_VALUE_DSP; @@ -199,9 +200,9 @@ export class HomeComponent implements OnInit { this.area = this.employeeAdress[i].SEGMENT_VALUE_DSP; } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'REGION_3') { this.poBox = this.employeeAdress[i].SEGMENT_VALUE_DSP; - } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'TOWN_OR_CITY') { + } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'TOWN_OR_CITY') { this.city = this.employeeAdress[i].SEGMENT_VALUE_DSP; - } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'POSTAL_CODE') { + } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'POSTAL_CODE') { this.postalCode = this.employeeAdress[i].SEGMENT_VALUE_DSP; } } @@ -268,7 +269,7 @@ export class HomeComponent implements OnInit { } } - public allowEdit(allowVal: string){ + public allowEdit(allowVal: string) { let selMenu: MenuResponse = new MenuResponse(); selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); @@ -281,7 +282,7 @@ export class HomeComponent implements OnInit { this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: undefined, transNo: this.transactionNo }, 'AddEITData'); this.cs.openAddBasicDetails(); } else { - this.cs.openAddAddress(); + this.openAddAddress(); } } @@ -301,6 +302,21 @@ export class HomeComponent implements OnInit { component: EditDetailProfileComponent, cssClass: 'my-custom-modal-css' }); + + modal.onDidDismiss() + .then((data) => { + console.log(data); + if (data.data && data.data.data == 1) { + this.cs.sharedService.setSharedData(this.addressSubMenu, ProfileService.ADRESS_ENTRIES); + this.cs.sharedService.setSharedData(this.employeeAdress, ProfileService.EMP_ADDRESS); + this.cs.sharedService.setSharedData(this.country, ProfileService.COUNTRY); + this.cs.openAddAddress(); + } else if (data.data && data.data.data == 2) { + this.cs.openAddAddress(); + } + + + }) return await modal.present(); } @@ -309,7 +325,14 @@ export class HomeComponent implements OnInit { } public openAddAddress() { - this.cs.openAddAddress(); + + if (this.addressSubMenu && this.addressSubMenu.UPDATE_BUTTON === 'Y') { + + this.presentModal(); + } else { + this.cs.openAddAddress(); + } + } } diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html index ade67c87..940f3bc6 100644 --- a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html @@ -5,7 +5,7 @@ - + @@ -27,11 +27,11 @@ - {{ts.trPK('eit','cancel-text')}} + {{ts.trPK('eit','cancel-text')}} - {{ts.trPK('general','next')}} + {{ts.trPK('general','next')}} diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts index 13dc6ec2..e7769477 100644 --- a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts @@ -8,22 +8,23 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl styleUrls: ['./edit-detail-profile.component.scss'], }) export class EditDetailProfileComponent implements OnInit { - + public isChange: any; constructor( public modalController: ModalController, public ts: TranslatorService, - ) { } + ) { } colorRadio = "#269db8" - ngOnInit() {} + ngOnInit() { } dismiss() { // using the injected ModalController this page // can "dismiss" itself and optionally pass back data this.modalController.dismiss({ - 'dismissed': true + 'dismissed': true, + data: this.isChange }); } diff --git a/Mohem/src/app/profile/service/profile.service.ts b/Mohem/src/app/profile/service/profile.service.ts index 3184be82..c1c1c1ee 100644 --- a/Mohem/src/app/profile/service/profile.service.ts +++ b/Mohem/src/app/profile/service/profile.service.ts @@ -31,6 +31,9 @@ export class ProfileService { public static getDiffStructure = "Services/ERP.svc/REST/GET_ADDRESS_DFF_STRUCTURE" public static submitAddressTransactions = "Services/ERP.svc/REST/SUBMIT_ADDRESS_TRANSACTION" + public static ADRESS_ENTRIES = 'address-entries'; + public static EMP_ADDRESS = 'emp-address'; + public static COUNTRY = 'country'; constructor( public con: ConnectorService, public authService: AuthenticationService diff --git a/Mohem/src/assets/imgs/itemsforsale/alert.svg b/Mohem/src/assets/imgs/itemsforsale/alert.svg new file mode 100644 index 00000000..efd65f37 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/alert.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 5a6310be..566375b0 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -218,7 +218,7 @@ "ar": "خدمات أخرى" }, "items-sales": { - "en": "Items for sale", + "en": "Items For Sale", "ar": "بضاعه للبع" }, "offers-discount": { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 41164060..edd44962 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1588,4 +1588,7 @@ ion-segment-button { } .filter-modal .modal-wrapper{ border-radius: 0px !important; + } + .offers-discount-card ion-card-content div{ + font-size: 11px !important; } \ No newline at end of file