From 0e19eb555f9b68c1cab7569eb4642e57723b8a0c Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 7 Jul 2021 17:19:23 +0300 Subject: [PATCH 1/4] design fixes and change correct address --- .../app/itemforsale/home/home.component.html | 15 +++++++----- .../app/itemforsale/home/home.component.scss | 24 +++++++++++++------ .../item-details/item-details.component.scss | 6 ++--- .../itemforsale/items/items.component.html | 6 ++--- .../itemforsale/items/items.component.scss | 4 ++++ .../offersdiscount/home/home.component.html | 3 ++- .../offersdiscount/home/home.component.scss | 13 ++++++---- .../offer-details.component.scss | 3 +++ .../add-address/add-address.component.ts | 7 ++++-- Mohem/src/app/profile/home/home.component.ts | 2 ++ .../app/profile/service/profile.service.ts | 1 + 11 files changed, 58 insertions(+), 26 deletions(-) diff --git a/Mohem/src/app/itemforsale/home/home.component.html b/Mohem/src/app/itemforsale/home/home.component.html index fc694323..4086bfe6 100644 --- a/Mohem/src/app/itemforsale/home/home.component.html +++ b/Mohem/src/app/itemforsale/home/home.component.html @@ -17,6 +17,7 @@
+
{{ts.trPK('itemforsale','select-category')}}
@@ -25,6 +26,7 @@
+
@@ -44,6 +46,7 @@
+
@@ -77,7 +80,7 @@
- +

Electronic Applicance

@@ -183,7 +186,7 @@
X
- +
@@ -192,7 +195,7 @@
X
- +
@@ -229,15 +232,15 @@

Used

- - + +
Selling for

500 SAR

- 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 0b7a3c96..da69d29b 100644 --- a/Mohem/src/app/itemforsale/home/home.component.scss +++ b/Mohem/src/app/itemforsale/home/home.component.scss @@ -10,9 +10,9 @@ border-radius: 25px; } .md-stepper-horizontal .md-step { - display:table-cell; - position:relative; - padding:20px 15px; + display: table-cell; + position: relative; + padding: 20px 10px; text-align: left; } .md-stepper-horizontal .md-step:hover, @@ -48,7 +48,7 @@ z-index: 3; } .md-stepper-horizontal .md-step:last-child .md-step-circle { -margin-left:20px +margin-left:0px } .md-stepper-horizontal.green .md-step.active .md-step-circle { background-color:#00AE4D; @@ -88,6 +88,7 @@ margin-left:20px .md-stepper-horizontal .md-step .md-step-optional { text-align: center; color:rgba(0,0,0,.26); + margin-left:0 ; } .md-stepper-horizontal .md-step.orange .md-step-title, .md-stepper-horizontal .md-step.green .md-step-title { font-weight: 600; @@ -107,13 +108,14 @@ margin-left:20px top: 36px; height: 2px; background: #DDDDDD; - width: 95%; + width: 120px; z-index: 0; + left: 25px; } .md-stepper-horizontal .md-step .md-step-bar-left { margin-right: 0px; - left: 58%; + left: 40%; } .orange .md-step-bar-left { background:#CC9B14 !important; @@ -154,6 +156,7 @@ font-weight: bold; color: #ffffff !important; padding:2px 5px 2px 5px; border-radius: 5px; + margin-left:0 ; } .green .md-step-optional{ font-size: 12px; @@ -273,8 +276,15 @@ position: relative; font-size: 10px; } +.waring label{ + font-size: 11px; + padding: 0px 10px; + display: inline-block; + position: relative; + position: absolute; +} .waring img{ - margin: 0 10px; + margin: 0px; } .selling h2{ display: inline-block; 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 8223f324..bcd3e47a 100644 --- a/Mohem/src/app/itemforsale/item-details/item-details.component.scss +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.scss @@ -73,7 +73,7 @@ ion-footer{ bottom: 0; } .icon-footer{ - margin: 6px; - position: absolute; - left: 35px; + margin: 0px; + position: relative; + left: -10px; } \ 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 9c37e34f..bab28e0c 100644 --- a/Mohem/src/app/itemforsale/items/items.component.html +++ b/Mohem/src/app/itemforsale/items/items.component.html @@ -85,8 +85,8 @@
- - +
+ @@ -142,7 +142,7 @@ - +
diff --git a/Mohem/src/app/itemforsale/items/items.component.scss b/Mohem/src/app/itemforsale/items/items.component.scss index de1762e7..bcba7e10 100644 --- a/Mohem/src/app/itemforsale/items/items.component.scss +++ b/Mohem/src/app/itemforsale/items/items.component.scss @@ -100,6 +100,7 @@ ion-card-content p{ } .my-ads .details-text{ font-size: 11px; + margin: 0; } .my-ads .yellow, .my-ads .green{ font-size: 11px; @@ -215,4 +216,7 @@ ion-card-content strong{ ion-fab-button{ height: 60px; width: 60px; +} +.grid-row{ + margin:10px; } \ 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 58be2771..89431ee4 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.html +++ b/Mohem/src/app/offersdiscount/home/home.component.html @@ -47,7 +47,7 @@
- +
@@ -79,6 +79,7 @@ +
diff --git a/Mohem/src/app/offersdiscount/home/home.component.scss b/Mohem/src/app/offersdiscount/home/home.component.scss index efa9ee4a..10d5a0a1 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.scss +++ b/Mohem/src/app/offersdiscount/home/home.component.scss @@ -23,15 +23,17 @@ --border-radius: 25px; } .filterText{ - margin: 5px 15px 5px; + padding: 0 4px 10px 5px; font-size: 16px; font-weight: bold; + margin: 0px 10px; } .container-icon{ - padding: 0 10px 10px; + padding: 0 5px 10px; position: relative; white-space: nowrap; overflow-x: auto; + margin: 0 10px; } .box-icon{ @@ -111,13 +113,16 @@ ion-item{ --background: #fff; margin: 10px; border-radius: 25px; - padding: 5px; + padding: 0px; } ion-item h3{ color: #000; font-weight: bold; font-size: 16px; } +.grid-container{ + margin: 10px; +} .yellow{ color:#ffc107; } @@ -179,7 +184,7 @@ ion-card-content{ padding: 0 15px 0px 15px; } ion-card{ - margin: 0px; + margin: 3px; --background: #fff; --border-radius: 53px; border-radius: 10px; 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 c6769b96..afe94ce8 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss @@ -130,6 +130,9 @@ ion-card{ background-repeat: no-repeat; margin-top: 5px; } +.related-offers-container{ + margin: 10px; +} .header-img-main{ height: 170px; width: 100%; 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 230bcede..cf8a0365 100644 --- a/Mohem/src/app/profile/add-address/add-address.component.ts +++ b/Mohem/src/app/profile/add-address/add-address.component.ts @@ -77,7 +77,7 @@ export class AddAddressComponent implements OnInit { selectedCountryName: any; public effectiveDate: any; public submitAbsObjList: any = []; - + public selectedStatus: any = {}; public isUpdate: boolean; constructor( public modalController: ModalController, @@ -141,12 +141,15 @@ export class AddAddressComponent implements OnInit { ngAfterViewInit() { console.log("ngAfterViewInit"); // console.log(this.containerDiv.nativeElement); + this.selectedStatus = this.cs.sharedService.getSharedData(ProfileService.SELECTED_STATUS); 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; + } else { + this.isUpdate = false; } this.getEitDffStructure(); // this.addFieldToDOM(this.buttonInput, 'btnSubmit', this.cs.presentAlert('Clicked!'), true) @@ -1606,7 +1609,7 @@ export class AddAddressComponent implements OnInit { EITTransactionTBL: this.arrValues, P_COUNTRY_CODE: this.country, P_EFFECTIVE_DATE: moment(this.effectiveDate).format('DD-MMM-YYYY'), - P_ACTION: 'NEW' + P_ACTION: this.selectedStatus.data == '1' ? 'CHANGE' : this.selectedStatus.data == '2' ? 'CORRECT' : 'NEW' }; this.profileService diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 8ab7bfba..68ca831a 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -306,10 +306,12 @@ export class HomeComponent implements OnInit { modal.onDidDismiss() .then((data) => { console.log(data); + this.cs.sharedService.setSharedData(data.data, ProfileService.SELECTED_STATUS); 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(); diff --git a/Mohem/src/app/profile/service/profile.service.ts b/Mohem/src/app/profile/service/profile.service.ts index c1c1c1ee..470bef1d 100644 --- a/Mohem/src/app/profile/service/profile.service.ts +++ b/Mohem/src/app/profile/service/profile.service.ts @@ -34,6 +34,7 @@ export class ProfileService { public static ADRESS_ENTRIES = 'address-entries'; public static EMP_ADDRESS = 'emp-address'; public static COUNTRY = 'country'; + public static SELECTED_STATUS = 'selected-status'; constructor( public con: ConnectorService, public authService: AuthenticationService From 9a8176fe7bf722c59bbd274b1ba423ff01024659 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 7 Jul 2021 17:35:14 +0300 Subject: [PATCH 2/4] offers and discount fixes --- .../offersdiscount/offer-details/offer-details.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 afe94ce8..b487cc9b 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss @@ -1,5 +1,5 @@ .header{ - height: 150px; + height: 20%; width: 100%; position: absolute; From 72756d812d221b8a81b057141976232cb266a3f1 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Thu, 8 Jul 2021 12:44:37 +0300 Subject: [PATCH 3/4] fixes --- Mohem/package.json | 2 +- .../app/offersdiscount/filter/filter.component.html | 2 +- .../app/offersdiscount/filter/filter.component.scss | 7 ++++++- Mohem/src/app/offersdiscount/home/home.component.scss | 2 +- .../offer-details/offer-details.component.html | 2 +- .../offer-details/offer-details.component.ts | 10 +++++++++- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Mohem/package.json b/Mohem/package.json index 8d76c7a1..3c30b679 100644 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -225,4 +225,4 @@ "ios" ] } -} +} \ No newline at end of file diff --git a/Mohem/src/app/offersdiscount/filter/filter.component.html b/Mohem/src/app/offersdiscount/filter/filter.component.html index b3381b50..9a97fb8c 100644 --- a/Mohem/src/app/offersdiscount/filter/filter.component.html +++ b/Mohem/src/app/offersdiscount/filter/filter.component.html @@ -10,7 +10,7 @@
- + {{key.name}} diff --git a/Mohem/src/app/offersdiscount/filter/filter.component.scss b/Mohem/src/app/offersdiscount/filter/filter.component.scss index 39bebf2a..e8e8a3bc 100644 --- a/Mohem/src/app/offersdiscount/filter/filter.component.scss +++ b/Mohem/src/app/offersdiscount/filter/filter.component.scss @@ -12,7 +12,7 @@ ion-thumbnail img{ top: 15px; padding: 0px; background: #3cc353; - padding: 3px 2px 2px 3px; + padding: 3px 2px 0px 3px; border-radius: 60%; font-size: 12px; color: #fff; @@ -22,6 +22,11 @@ ion-thumbnail img{ text-align: center; z-index: 2; } +ion-item{ + border-bottom: 1px solid #ccc; + --padding-start: 0px; + margin: 0 20px 4px 20px; +} .footer-button{ background: var(--newgreen)!important;border-radius: 10px; --background: transparent; diff --git a/Mohem/src/app/offersdiscount/home/home.component.scss b/Mohem/src/app/offersdiscount/home/home.component.scss index 10d5a0a1..050cdf8a 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.scss +++ b/Mohem/src/app/offersdiscount/home/home.component.scss @@ -172,7 +172,7 @@ ion-content{ position: relative; } .top img{ - + width: 35px; height: 35px; margin: 5px 5px 0px 5px; } 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 bfbcfcf9..f3a127c8 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html @@ -58,7 +58,7 @@

- +
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 1ae6f38d..781d2472 100644 --- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts @@ -35,8 +35,16 @@ export class OfferDetailsComponent implements OnInit { return temporalDivElement.textContent || temporalDivElement.innerText || ""; } share() { - this.socialSharing.share(this.details.Description, this.details.Title, this.details.Banner_Image).then((result) => { + this.socialSharing.share(this.stripHtml(this.details.Description), this.stripHtml(this.details.Title), this.details.Banner_Image).then((result) => { console.log(result); }) } + openRelated(item) { + this.cs.sharedService.setSharedData(item, OfferDiscountService.selected_offers); + this.cs.back(); + setTimeout(() => { + this.cs.navigateForward('/offersdiscount/offer-details'); + }, 200); + + } } From 7ae9bb1b5b90f6422a7f27610c4b28ce5de411f7 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 8 Jul 2021 12:48:06 +0300 Subject: [PATCH 4/4] fixed dependencies issues and updated firebase plugin --- Mohem/config.xml | 1 - Mohem/package.json | 51 +++++++++++-------- Mohem/src/app/home/home.page.ts | 25 ++++++++- .../add-basic-details.component.ts | 12 +++-- 4 files changed, 61 insertions(+), 28 deletions(-) diff --git a/Mohem/config.xml b/Mohem/config.xml index 20f4924f..f23adff8 100644 --- a/Mohem/config.xml +++ b/Mohem/config.xml @@ -114,7 +114,6 @@ - diff --git a/Mohem/package.json b/Mohem/package.json index 8d76c7a1..94d82c02 100644 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -37,7 +37,7 @@ "@ionic-native/file": "^5.18.0", "@ionic-native/file-path": "^5.18.0", "@ionic-native/fingerprint-aio": "^5.18.0", - "@ionic-native/firebase-x": "^5.21.5", + "@ionic-native/firebase-x": "^5.34.0", "@ionic-native/geolocation": "^5.10.0", "@ionic-native/globalization": "^5.18.0", "@ionic-native/health": "^5.4.0", @@ -82,7 +82,7 @@ "cordova-plugin-file": "^6.0.2", "cordova-plugin-filepath": "^1.5.6", "cordova-plugin-fingerprint-aio": "^3.0.0", - "cordova-plugin-firebasex": "^7.0.2", + "cordova-plugin-firebasex": "^13.0.0", "cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-globalization": "^1.11.0", "cordova-plugin-inappbrowser": "^3.1.0", @@ -172,9 +172,6 @@ "cordova-plugin-ionic-webview": { "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" }, - "cordova-android-support-gradle-release": { - "ANDROID_SUPPORT_VERSION": "27.+" - }, "cordova.plugins.diagnostic": { "ANDROID_SUPPORT_VERSION": "28.+" }, @@ -197,20 +194,6 @@ "cordova-plugin-fingerprint-aio": { "FACEID_USAGE_DESCRIPTION": "User Authentication" }, - "cordova-plugin-firebasex": { - "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true", - "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true", - "FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true", - "ANDROID_ICON_ACCENT": "#FF00FFFF", - "ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0", - "ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1", - "ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0", - "ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3", - "ANDROID_FIREBASE_PERF_VERSION": "19.0.1", - "ANDROID_FIREBASE_AUTH_VERSION": "19.1.0", - "ANDROID_CRASHLYTICS_VERSION": "2.10.1", - "ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1" - }, "cordova-plugin-androidx": {}, "cordova-plugin-androidx-adapter": {}, "cordova-plugin-background-geolocation": { @@ -218,11 +201,37 @@ }, "phonegap-nfc": {}, "wifiwizard2": {}, - "cordova-plugin-x-socialsharing": {} + "cordova-plugin-x-socialsharing": {}, + "cordova-plugin-firebasex": { + "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true", + "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true", + "FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true", + "ANDROID_ICON_ACCENT": "#FF00FFFF", + "ANDROID_FIREBASE_PERFORMANCE_MONITORING": "false", + "ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0", + "ANDROID_PLAY_SERVICES_AUTH_VERSION": "19.0.0", + "ANDROID_FIREBASE_ANALYTICS_VERSION": "19.0.0", + "ANDROID_FIREBASE_MESSAGING_VERSION": "22.0.0", + "ANDROID_FIREBASE_CONFIG_VERSION": "21.0.0", + "ANDROID_FIREBASE_PERF_VERSION": "20.0.1", + "ANDROID_FIREBASE_AUTH_VERSION": "21.0.1", + "ANDROID_FIREBASE_INAPPMESSAGING_VERSION": "20.0.0", + "ANDROID_FIREBASE_FIRESTORE_VERSION": "23.0.1", + "ANDROID_FIREBASE_FUNCTIONS_VERSION": "20.0.0", + "ANDROID_FIREBASE_IID_VERSION": "21.1.0", + "ANDROID_FIREBASE_INSTALLATIONS_VERSION": "17.0.0", + "ANDROID_FIREBASE_CRASHLYTICS_VERSION": "18.0.1", + "ANDROID_FIREBASE_CRASHLYTICS_NDK_VERSION": "18.0.1", + "ANDROID_GSON_VERSION": "2.8.7", + "ANDROID_FIREBASE_PERF_GRADLE_PLUGIN_VERSION": "1.4.0" + }, + "cordova-android-support-gradle-release": { + "ANDROID_SUPPORT_VERSION": "27.+" + } }, "platforms": [ "android", "ios" ] } -} +} \ No newline at end of file diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 18a71a22..0ea34a0a 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -39,6 +39,7 @@ import { Router } from '@angular/router'; import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; import { NFC, Ndef } from "@ionic-native/nfc/ngx" import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component'; +import { FirebaseX } from '@ionic-native/firebase-x/ngx'; @Component({ selector: 'app-home', @@ -158,7 +159,8 @@ export class HomePage implements OnInit { private platform: Platform, public backgroundGeolocation: BackgroundGeolocation, public modalController: ModalController, - private nfc: NFC + private nfc: NFC, + public firebasex: FirebaseX ) { this.events.subscribe('img-change', displayImg => { this.userImage = this.sanitizer.bypassSecurityTrustUrl( @@ -188,6 +190,27 @@ export class HomePage implements OnInit { } } + testy() { + // var logMessage = 'testing'; + // var stackTrace = null; + // this.firebasex.logError(logMessage, stackTrace).then( result => { + // console.log('posted successfully;'); + // }); + var document = { + "a_string": "foo", + "a_list": [1, 2, 3], + "an_object": { + "an_integer": 1, + } + }; + var collection = "test"; + this.firebasex.addDocumentToFirestoreCollection(document, collection, function(documentId){ + console.log("Successfully added document with id="+documentId); + }, function(error){ + console.error("Error adding document: "+error); + }); + } + ionViewWillEnter() { this.common.startLoading(); this.common.sharedService.setSharedData(true, 'loadWorkList'); diff --git a/Mohem/src/app/profile/add-basic-details/add-basic-details.component.ts b/Mohem/src/app/profile/add-basic-details/add-basic-details.component.ts index 3d8b9608..5592e376 100644 --- a/Mohem/src/app/profile/add-basic-details/add-basic-details.component.ts +++ b/Mohem/src/app/profile/add-basic-details/add-basic-details.component.ts @@ -122,8 +122,9 @@ export class AddBasicDetailsComponent implements OnInit { ngOnInit() {} ngAfterViewInit() { - this.getEitDffStructure(); - // this.getColumnStructure(); + // this.getEitDffStructure(); + this.getColumnStructure(); + } public getColumnStructure() { @@ -156,10 +157,11 @@ export class AddBasicDetailsComponent implements OnInit { this.drawEitFields(result.GetBasicDetColsStructureList); } } + public handleBasicDffStructureResult(result) { - if (result.GetEITDFFStructureList != null) { - this.eitResponse = result.GetEITDFFStructureList; - this.drawEitFields(result.GetEITDFFStructureList); + if (result.GetBasicDetDffStructureList != null) { + this.eitResponse = result.GetBasicDetDffStructureList; + this.drawEitFields(result.GetBasicDetDffStructureList); } }