diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/package.json b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/package.json
new file mode 100644
index 00000000..36d3264c
--- /dev/null
+++ b/Mohem/CordovaHMSPlugin/CordovaHMSGMSCheckPlugin/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "com.huawei.cordovahmsgmscheckplugin",
+ "version": "1.0.0",
+ "description": "Account Check Kit 4.0",
+ "cordova": {
+ "id": "com.huawei.cordovahmsgmscheckplugin",
+ "platforms": [
+ "android"
+ ]
+ },
+ "keywords": [
+ "ecosystem:cordova",
+ "cordova-android"
+ ],
+ "author": "",
+ "license": "ISC"
+}
diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/package.json b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/package.json
new file mode 100644
index 00000000..8b3323cf
--- /dev/null
+++ b/Mohem/CordovaHMSPlugin/CordovaHMSLocationPlugin/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "com.huawei.cordovahmslocationplugin",
+ "version": "1.0.0",
+ "description": "Location Service",
+ "cordova": {
+ "id": "com.huawei.cordovahmslocationplugin",
+ "platforms": [
+ "android"
+ ]
+ },
+ "keywords": [
+ "ecosystem:cordova",
+ "cordova-android"
+ ],
+ "author": "",
+ "license": "ISC"
+}
diff --git a/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/package.json b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/package.json
new file mode 100644
index 00000000..9be71e48
--- /dev/null
+++ b/Mohem/CordovaHMSPlugin/CordovaHMSPushPlugin/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "cordovahmspushplugin",
+ "version": "1.0.0",
+ "description": "For Hms Push",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "test",
+ "license": "ISC",
+ "cordova": {
+ "id": "com.huawei.cordovahmspushplugin",
+ "platforms": [
+ "android"
+ ]
+ },
+ "keywords": [
+ "ecosystem:cordova",
+ "cordova-android"
+ ]
+}
diff --git a/Mohem/config.xml b/Mohem/config.xml
new file mode 100644
index 00000000..5ad4f1b7
--- /dev/null
+++ b/Mohem/config.xml
@@ -0,0 +1,147 @@
+
+
+ MOHEMM
+ an app created by cloud Solutions
+ Cloud Solutions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Mohem/package.json b/Mohem/package.json
new file mode 100644
index 00000000..aab0bf8d
--- /dev/null
+++ b/Mohem/package.json
@@ -0,0 +1,257 @@
+{
+ "name": "MOHEM",
+ "version": "0.0.1",
+ "author": "Cloud Solutions",
+ "homepage": "http://www.cloudsolution-sa.com/",
+ "private": true,
+ "scripts": {
+ "ng": "ng",
+ "start": "ng serve",
+ "build": "ng build",
+ "test": "ng test",
+ "lint": "ng lint",
+ "e2e": "ng e2e"
+ },
+ "dependencies": {
+ "@angular/animations": "^7.2.15",
+ "@angular/common": "^7.2.2",
+ "@angular/core": "^7.2.2",
+ "@angular/forms": "^7.2.2",
+ "@angular/http": "^7.2.2",
+ "@angular/platform-browser": "^7.2.2",
+ "@angular/platform-browser-dynamic": "^7.2.2",
+ "@angular/router": "^7.2.2",
+ "@ionic-native/android-permissions": "^5.18.0",
+ "@ionic-native/app-availability": "^5.18.0",
+ "@ionic-native/app-rate": "^5.18.0",
+ "@ionic-native/background-geolocation": "^5.30.0",
+ "@ionic-native/badge": "^5.18.0",
+ "@ionic-native/barcode-scanner": "^5.18.0",
+ "@ionic-native/base64": "^5.18.0",
+ "@ionic-native/ble": "^5.18.0",
+ "@ionic-native/camera": "^5.18.0",
+ "@ionic-native/core": "^5.8.0",
+ "@ionic-native/date-picker": "^5.10.0",
+ "@ionic-native/device": "^5.18.0",
+ "@ionic-native/diagnostic": "^5.18.0",
+ "@ionic-native/file": "^5.18.0",
+ "@ionic-native/file-chooser": "^5.36.0",
+ "@ionic-native/file-opener": "^5.36.0",
+ "@ionic-native/file-path": "^5.18.0",
+ "@ionic-native/file-picker": "^5.36.0",
+ "@ionic-native/fingerprint-aio": "^5.18.0",
+ "@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",
+ "@ionic-native/in-app-browser": "^5.17.0",
+ "@ionic-native/keyboard": "^5.17.0",
+ "@ionic-native/launch-navigator": "^5.17.0",
+ "@ionic-native/local-notifications": "^5.17.0",
+ "@ionic-native/native-storage": "^5.17.0",
+ "@ionic-native/nfc": "^5.30.0",
+ "@ionic-native/open-native-settings": "^5.14.0",
+ "@ionic-native/sms-retriever": "^5.36.0",
+ "@ionic-native/social-sharing": "^5.34.0",
+ "@ionic-native/splash-screen": "^5.0.0",
+ "@ionic-native/sqlite": "^5.18.0",
+ "@ionic-native/status-bar": "^5.0.0",
+ "@ionic-native/themeable-browser": "^5.18.0",
+ "@ionic-native/wifi-wizard-2": "^5.31.1",
+ "@ionic-native/zbar": "^5.10.0",
+ "@ionic/angular": "^4.1.0",
+ "@ng-bootstrap/ng-bootstrap": "^4.2.2",
+ "@swimlane/ngx-charts": "^10.1.0",
+ "angular-calendar": "^0.26.11",
+ "app": "0.1.0",
+ "chart.js": "^2.9.3",
+ "com-badrit-base64": "^0.2.0",
+ "cordova-android": "^8.1.0",
+ "cordova-android-support-gradle-release": "^3.0.1",
+ "cordova-open-native-settings": "^1.5.2",
+ "cordova-opentok-android-permissions": "^1.0.1",
+ "cordova-plugin-actionsheet": "^2.3.3",
+ "cordova-plugin-add-swift-support": "^2.0.2",
+ "cordova-plugin-android-permissions": "^1.0.2",
+ "cordova-plugin-androidx": "^1.0.2",
+ "cordova-plugin-androidx-adapter": "^1.1.0",
+ "cordova-plugin-appavailability": "^0.4.2",
+ "cordova-plugin-apprate": "^1.4.0",
+ "cordova-plugin-badge": "^0.8.8",
+ "cordova-plugin-ble-central": "^1.2.4",
+ "cordova-plugin-camera": "^4.1.0",
+ "cordova-plugin-datepicker": "^0.9.3",
+ "cordova-plugin-device": "^2.0.3",
+ "cordova-plugin-dialogs": "^2.0.2",
+ "cordova-plugin-file": "^6.0.2",
+ "cordova-plugin-file-opener2": "^3.0.5",
+ "cordova-plugin-filechooser": "^1.2.0",
+ "cordova-plugin-filepath": "^1.5.6",
+ "cordova-plugin-filepicker": "^1.1.6",
+ "cordova-plugin-fingerprint-aio": "^3.0.0",
+ "cordova-plugin-firebasex": "^13.0.0",
+ "cordova-plugin-geolocation": "^4.0.2",
+ "cordova-plugin-globalization": "^1.11.0",
+ "cordova-plugin-inappbrowser": "^3.1.0",
+ "cordova-plugin-ionic-keyboard": "^2.2.0",
+ "cordova-plugin-ionic-webview": "^4.1.0",
+ "cordova-plugin-local-notification": "^0.9.0-beta.2",
+ "cordova-plugin-nativestorage": "^2.3.2",
+ "cordova-plugin-sms-retriever-manager": "^1.0.3",
+ "cordova-plugin-splashscreen": "^5.0.3",
+ "cordova-plugin-statusbar": "^2.4.3",
+ "cordova-plugin-themeablebrowser": "^0.2.18",
+ "cordova-plugin-whitelist": "^1.3.4",
+ "cordova-plugin-wifiwizard2": "^3.1.1",
+ "cordova-plugin-x-socialsharing": "^6.0.3",
+ "cordova-sqlite-storage": "^3.4.0",
+ "cordova-support-google-services": "^1.3.2",
+ "cordova.plugins.diagnostic": "^5.0.1",
+ "core-js": "^2.5.4",
+ "date-fns": "^1.30.1",
+ "es6-promise-plugin": "^4.1.0",
+ "ionic2-calendar": "^0.5.8",
+ "ionic4-rating": "^1.0.9",
+ "ng-circle-progress": "^1.5.1",
+ "ng2-file-upload": "^1.3.0",
+ "ng2-pdf-viewer": "^5.3.2",
+ "ngx-gauge": "^1.0.0-beta.10",
+ "npm": "^6.14.11",
+ "phonegap-nfc": "^1.2.0",
+ "phonegap-plugin-barcodescanner": "^8.1.0",
+ "phonegap-plugin-multidex": "^1.0.0",
+ "primeicons": "^1.0.0",
+ "primeng": "^7.1.3",
+ "run": "1.4.0",
+ "rxjs": "~6.3.3",
+ "tslib": "^1.10.0",
+ "uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
+ "xlsx": "^0.14.3",
+ "zone.js": "~0.8.29"
+ },
+ "devDependencies": {
+ "@angular-devkit/architect": "~0.12.3",
+ "@angular-devkit/build-angular": "^0.13.9",
+ "@angular-devkit/core": "~7.2.3",
+ "@angular-devkit/schematics": "~7.2.3",
+ "@angular/cli": "^7.3.6",
+ "@angular/compiler": "~7.2.2",
+ "@angular/compiler-cli": "~7.2.2",
+ "@angular/language-service": "~7.2.2",
+ "@ionic/angular-toolkit": "~1.4.0",
+ "@ionic/lab": "3.1.2",
+ "@types/jasmine": "~2.8.8",
+ "@types/jasminewd2": "~2.0.3",
+ "@types/node": "~10.12.0",
+ "codelyzer": "~4.5.0",
+ "com.huawei.cordovahmsgmscheckplugin": "file:CordovaHMSPlugin/CordovaHMSGMSCheckPlugin",
+ "com.huawei.cordovahmslocationplugin": "file:CordovaHMSPlugin/CordovaHMSLocationPlugin",
+ "cordova-ios": "^6.2.0",
+ "cordova-plugin-wifiwizard2": "^3.1.1",
+ "es6-promise-plugin": "^4.1.0",
+ "jasmine-core": "~2.99.1",
+ "jasmine-spec-reporter": "~4.2.1",
+ "karma": "^4.0.1",
+ "karma-chrome-launcher": "~2.2.0",
+ "karma-coverage-istanbul-reporter": "~2.0.1",
+ "karma-jasmine": "~1.1.2",
+ "karma-jasmine-html-reporter": "^0.2.2",
+ "node-sass": "^4.13.1",
+ "protractor": "^5.4.3",
+ "ts-node": "~8.0.0",
+ "tslint": "~5.12.0",
+ "typescript": "3.1.6"
+ },
+ "description": "An Ionic project",
+ "cordova": {
+ "plugins": {
+ "cordova-plugin-whitelist": {},
+ "cordova-plugin-statusbar": {},
+ "cordova-plugin-device": {},
+ "cordova-plugin-splashscreen": {},
+ "cordova-plugin-nativestorage": {},
+ "cordova-plugin-globalization": {},
+ "cordova-plugin-android-permissions": {},
+ "cordova-plugin-badge": {},
+ "cordova-plugin-ionic-keyboard": {},
+ "cordova-plugin-datepicker": {},
+ "cordova-plugin-geolocation": {},
+ "phonegap-plugin-barcodescanner": {
+ "ANDROID_SUPPORT_V4_VERSION": "27.+"
+ },
+ "cordova-plugin-ionic-webview": {
+ "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
+ },
+ "cordova.plugins.diagnostic": {
+ "ANDROID_SUPPORT_VERSION": "28.+"
+ },
+ "cordova-open-native-settings": {},
+ "cordova-plugin-camera": {
+ "ANDROID_SUPPORT_V4_VERSION": "27.+"
+ },
+ "cordova-plugin-file": {},
+ "cordova-plugin-filepath": {},
+ "com-badrit-base64": {},
+ "cordova-sqlite-storage": {},
+ "cordova-plugin-ble-central": {},
+ "uk.co.workingedge.phonegap.plugin.launchnavigator": {},
+ "cordova-plugin-themeablebrowser": {},
+ "cordova-plugin-inappbrowser": {},
+ "cordova-plugin-local-notification": {},
+ "cordova-opentok-android-permissions": {},
+ "cordova-plugin-appavailability": {},
+ "cordova-plugin-apprate": {},
+ "cordova-plugin-fingerprint-aio": {
+ "FACEID_USAGE_DESCRIPTION": "User Authentication"
+ },
+ "cordova-plugin-androidx": {},
+ "cordova-plugin-androidx-adapter": {},
+ "cordova-plugin-background-geolocation": {
+ "GOOGLE_PLAY_SERVICES_VERSION": "+"
+ },
+ "phonegap-nfc": {},
+ "wifiwizard2": {},
+ "com.huawei.cordovahmsgmscheckplugin": {},
+ "com.huawei.cordovahmslocationplugin": {},
+ "cordova-plugin-x-socialsharing": {},
+ "cordova-plugin-firebasex": {
+ "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.+"
+ },
+ "cordova-plugin-sms-retriever-manager": {
+ "PLAY_SERVICES_VERSION": "15.0.1"
+ },
+ "cordova-plugin-file-opener2": {
+ "ANDROID_SUPPORT_V4_VERSION": "27.+"
+ },
+ "cordova-plugin-filepicker": {},
+ "cordova-plugin-filechooser": {}
+ },
+ "platforms": [
+ "android",
+ "ios"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts
index 3928d676..a8948b72 100644
--- a/Mohem/src/app/hmg-common/hmg-common.module.ts
+++ b/Mohem/src/app/hmg-common/hmg-common.module.ts
@@ -117,6 +117,8 @@ import { FileOpener } from '@ionic-native/file-opener/ngx';
import { FilePath } from '@ionic-native/file-path/ngx';
import { FileChooser } from "@ionic-native/file-chooser/ngx";
import { IOSFilePicker } from '@ionic-native/file-picker/ngx';
+import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
+
@NgModule({
imports: [
CommonModule,
@@ -135,6 +137,7 @@ import { IOSFilePicker } from '@ionic-native/file-picker/ngx';
],
declarations: [
FabButtonComponent,
+ SanitizeHtmlPipe,
WelcomeComponent,
NumberRangeComponent,
SSpacerComponent,
@@ -273,7 +276,8 @@ import { IOSFilePicker } from '@ionic-native/file-picker/ngx';
GenericHeaderComponent,
AttendanceOptionsComponent,
CardCalendarComponent,
- SubmitAddressModalComponent
+ SubmitAddressModalComponent,
+ SanitizeHtmlPipe
],
providers: [
AttendScanService,
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 f472cb49..5a1959c6 100644
--- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts
+++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts
@@ -27,8 +27,8 @@ export class ConnectorService {
public static retryTimes = 0;
public static timeOut = 180 * 1000;
- public static host = 'https://uat.hmgwebservices.com/';
- // public static host = 'https://hmgwebservices.com/';
+ // public static host = 'https://uat.hmgwebservices.com/';
+ public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient,
public cs: CommonService,
diff --git a/Mohem/src/app/itemforsale/home/home.component.ts b/Mohem/src/app/itemforsale/home/home.component.ts
index cb4b10fe..bdff62ff 100644
--- a/Mohem/src/app/itemforsale/home/home.component.ts
+++ b/Mohem/src/app/itemforsale/home/home.component.ts
@@ -273,7 +273,7 @@ export class HomeComponent implements OnInit {
}
validate() {
- if (!this.validateChar(this.itemInfo) || !this.itemDescription || !this.itemPrice || !this.itemCondition) {
+ if (!this.validateChar(this.itemInfo) || !this.itemDescription || !this.itemPrice || !this.itemCondition || this.addAttachRequest.length == 0) {
return false;
} else {
return true;
diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.ts b/Mohem/src/app/itemforsale/item-details/item-details.component.ts
index bcbec8e3..c5257bfb 100644
--- a/Mohem/src/app/itemforsale/item-details/item-details.component.ts
+++ b/Mohem/src/app/itemforsale/item-details/item-details.component.ts
@@ -14,7 +14,7 @@ export class ItemDetailsComponent implements OnInit {
itemDetails: any;
direction: any;
- constructor(public ts: TranslatorService, public route: ActivatedRoute, public cs: CommonService, private sanitizer: DomSanitizer,) {
+ constructor(public ts: TranslatorService, public itemService: ItemForSaleService, public route: ActivatedRoute, public cs: CommonService, private sanitizer: DomSanitizer,) {
this.route
.params.subscribe(val => {
setTimeout(() => {
@@ -37,4 +37,5 @@ export class ItemDetailsComponent implements OnInit {
getImgContent(imgFile): SafeUrl {
return this.sanitizer.bypassSecurityTrustUrl(imgFile);
}
+
}
diff --git a/Mohem/src/app/itemforsale/itemforsale.module.ts b/Mohem/src/app/itemforsale/itemforsale.module.ts
index cba071d8..7a868eb0 100644
--- a/Mohem/src/app/itemforsale/itemforsale.module.ts
+++ b/Mohem/src/app/itemforsale/itemforsale.module.ts
@@ -12,7 +12,6 @@ import { ItemDetailsComponent } from './item-details/item-details.component';
import { MyAdsComponent } from './my-ads/my-ads.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { ItemForSaleService } from './services/service.service';
-import { SanitizeHtmlPipe } from './services/domsafe';
import { FilterComponent } from './filter/filter.component';
const routes: Routes = [
@@ -52,8 +51,8 @@ const routes: Routes = [
HmgCommonModule,
RouterModule.forChild(routes)
],
- declarations: [ItemforsalePage, HomeComponent, ItemsComponent, ItemDetailsComponent, MyAdsComponent, SanitizeHtmlPipe, FilterComponent],
+ declarations: [ItemforsalePage, HomeComponent, ItemsComponent, ItemDetailsComponent, MyAdsComponent, FilterComponent],
providers: [ItemForSaleService],
- exports: [SanitizeHtmlPipe]
+
})
export class ItemforsalePageModule { }
diff --git a/Mohem/src/app/itemforsale/services/service.service.ts b/Mohem/src/app/itemforsale/services/service.service.ts
index 80f4c644..222e776c 100644
--- a/Mohem/src/app/itemforsale/services/service.service.ts
+++ b/Mohem/src/app/itemforsale/services/service.service.ts
@@ -38,6 +38,9 @@ export class ItemForSaleService {
return this.con.postNoLoad(ItemForSaleService.getCategories, request, onError, errorLabel);
}
+
+
+
parser(response: any) {
try {
var result = JSON.parse(response.Mohemm_ITG_ResponseItem);
diff --git a/Mohem/src/app/offersdiscount/filter/filter.component.html b/Mohem/src/app/offersdiscount/filter/filter.component.html
index f8391b3b..ed6856df 100644
--- a/Mohem/src/app/offersdiscount/filter/filter.component.html
+++ b/Mohem/src/app/offersdiscount/filter/filter.component.html
@@ -18,7 +18,7 @@
{{key.categoryName_ar}}
-
+
diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html
index 9c5cadcf..b84354f8 100644
--- a/Mohem/src/app/offersdiscount/home/home.component.html
+++ b/Mohem/src/app/offersdiscount/home/home.component.html
@@ -33,7 +33,7 @@
0">
-
+
diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts
index b73c910c..8eadda68 100644
--- a/Mohem/src/app/offersdiscount/home/home.component.ts
+++ b/Mohem/src/app/offersdiscount/home/home.component.ts
@@ -5,7 +5,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { OfferDiscountService } from '../services/service';
import { IonInfiniteScroll } from '@ionic/angular';
-import { DomSanitizer} from '@angular/platform-browser';
+import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
@@ -26,14 +26,20 @@ export class HomeComponent implements AfterViewInit {
itemCounter = 1;
itemType: any;
isData = true;
- // categories:any = [];
+ allCategory: any = {
+ categoryID: 0,
+ content: '
',
+ isActive: true,
+ categoryName_en: "All",
+ categoryName_ar: "الجميع",
+ }
constructor(
- public ts: TranslatorService,
- public modalController: ModalController,
- public cs: CommonService,
- public offersService: OfferDiscountService,
+ public ts: TranslatorService,
+ public modalController: ModalController,
+ public cs: CommonService,
+ public offersService: OfferDiscountService,
public route: ActivatedRoute,
- private sanitizer: DomSanitizer) {
+ ) {
this.route
.params.subscribe(val => {
@@ -62,9 +68,11 @@ export class HomeComponent implements AfterViewInit {
getCategories() {
this.offersService.getCategories({}).subscribe((result) => {
this.categories = JSON.parse(result.Mohemm_ITG_ResponseItem).result.data; //result.result.data;
- for (let i = 0; i < this.categories.length; i++) {
- this.categories[i].content = this.sanitizer.bypassSecurityTrustHtml(this.categories[i].content);
- }
+ //this.allCategory.content = this.sanitizer.bypassSecurityTrustHtml();
+ this.categories.unshift(this.allCategory);
+ // for (let i = 0; i < this.categories.length; i++) {
+ // this.categories[i].content = this.sanitizer.bypassSecurityTrustHtml(this.categories[i].content);
+ // }
this.cs.sharedService.setSharedData(this.categories, OfferDiscountService.categories);
});
}
@@ -80,13 +88,13 @@ export class HomeComponent implements AfterViewInit {
getOfferDiscount(pageNo?, categoryId?) {
this.cs.startLoading();
if (categoryId) {
- this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'),pageNo, categoryId).subscribe((res) => {
+ this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'), pageNo, categoryId).subscribe((res) => {
var data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
this.cs.stopLoading();
if (data['result']) {
this.displayOffers(data['result']);
this.isData = true;
- }else{
+ } else {
this.isData = false;
}
});
@@ -94,10 +102,10 @@ export class HomeComponent implements AfterViewInit {
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((res) => {
var data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
this.cs.stopLoading();
- if (data['result']){
+ if (data['result']) {
this.displayOffers(data['result']);
this.isData = true;
- } else{this.isData = false;}
+ } else { this.isData = false; }
});
}
@@ -113,13 +121,13 @@ export class HomeComponent implements AfterViewInit {
}
filterOffers(key) {
- if(this.direction === 'ltr') {
+ if (this.direction === 'ltr') {
this.activeClass = key.categoryName_en;
- }else {
+ } else {
this.activeClass = key.categoryName_ar
}
this.itemType = key.id;
- this.getOfferDiscount(1,this.itemType)
+ this.getOfferDiscount(1, this.itemType)
}
checkDate(date) {
@@ -142,9 +150,9 @@ export class HomeComponent implements AfterViewInit {
search(t) {
console.log(this.tempSearch);
- if(t === ''){
+ if (t === '') {
this.offersData = this.tempSearch;
- } else{
+ } else {
this.offersData = this.tempSearch.filter((post) => {
return (post.Title.toLowerCase().indexOf(t.toLowerCase()) > -1);
});
@@ -172,7 +180,7 @@ export class HomeComponent implements AfterViewInit {
console.log(this.itemCounter);
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'), this.itemCounter, this.itemType).subscribe((res) => {
const data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
- if (data['result']){
+ if (data['result']) {
const allItem = JSON.parse(data.result['data']);
if (allItem) {
allItem.forEach(element => {
@@ -189,7 +197,7 @@ export class HomeComponent implements AfterViewInit {
console.log(this.itemCounter);
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'), this.itemCounter).subscribe((res) => {
const data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
- if (data['result']){
+ if (data['result']) {
const allItem = JSON.parse(data.result['data']);
if (allItem) {
allItem.forEach(element => {
diff --git a/Mohem/src/app/offersdiscount/location/location.component.html b/Mohem/src/app/offersdiscount/location/location.component.html
new file mode 100644
index 00000000..c7fb1856
--- /dev/null
+++ b/Mohem/src/app/offersdiscount/location/location.component.html
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/offersdiscount/location/location.component.scss b/Mohem/src/app/offersdiscount/location/location.component.scss
new file mode 100644
index 00000000..70d9ad57
--- /dev/null
+++ b/Mohem/src/app/offersdiscount/location/location.component.scss
@@ -0,0 +1,4 @@
+#map {
+ width: 100%;
+ height: 100%;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/offersdiscount/location/location.component.spec.ts b/Mohem/src/app/offersdiscount/location/location.component.spec.ts
new file mode 100644
index 00000000..26caad16
--- /dev/null
+++ b/Mohem/src/app/offersdiscount/location/location.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LocationComponent } from './location.component';
+
+describe('LocationComponent', () => {
+ let component: LocationComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ LocationComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(LocationComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/offersdiscount/location/location.component.ts b/Mohem/src/app/offersdiscount/location/location.component.ts
new file mode 100644
index 00000000..7c899f54
--- /dev/null
+++ b/Mohem/src/app/offersdiscount/location/location.component.ts
@@ -0,0 +1,79 @@
+import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
+import { HMGUtils } from 'src/app/hmg-common/hmg_utils';
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+import { OfferDiscountService } from '../services/service';
+declare var google;
+@Component({
+ selector: 'app-location',
+ templateUrl: './location.component.html',
+ styleUrls: ['./location.component.scss'],
+})
+
+export class LocationComponent implements OnInit {
+ @ViewChild('map') mapContainer: ElementRef;
+ locations: any = [];
+ map: any;
+ offerDetails: any;
+ constructor(public hmgUtils: HMGUtils, public route: ActivatedRoute, public cs: CommonService) {
+ this.route
+ .params.subscribe(val => {
+ setTimeout(() => {
+ this.ionEnter();
+ }, 100);
+ });
+ }
+ ionEnter() {
+ this.locations = this.cs.sharedService.getSharedData(OfferDiscountService.selected_offers, false);
+ this.offerDetails = this.cs.sharedService.getSharedData(OfferDiscountService.selected_offers, false);
+ this.displayMap();
+ }
+ ngOnInit() {
+
+ }
+ displayMap() {
+
+ const map = new google.maps.Map(
+ document.getElementById("map") as HTMLElement,
+ {
+ zoom: 10,
+ center: { lat: 24.7136, lng: 46.6753 },
+ }
+ );
+
+ this.setMarkers(map);
+
+ }
+ setMarkers(map) {
+
+ for (let i = 0; i < this.locations.length; i++) {
+ const loc = this.locations[i];
+ const infoWindow = new google.maps.InfoWindow();
+ var marker = new google.maps.Marker({
+ position: { lat: loc.latitude, lng: loc.longitude },
+ map,
+ // icon: image,
+ // shape: shape,
+ title: this.offerDetails.Title,
+
+ });
+ marker.addListener("click", () => {
+ this.cs.openLocation(loc.latitude, loc.longitude)
+ });
+ }
+ this.hmgUtils.getCurrentLocation((resp) => {
+ console.log(resp);
+ if (resp) {
+ const latLng = new google.maps.LatLng(resp.latitude, resp.longitude);
+ const mapOptions = {
+ center: latLng,
+ zoom: 17,
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
+ myLocation: true
+ };
+
+ this.map = new google.maps.Map(this.mapContainer.nativeElement, mapOptions);
+ };
+ })
+ }
+}
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 f3a127c8..e089da6a 100644
--- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html
+++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html
@@ -44,6 +44,12 @@
+
+
+
+
+ {{ts.trPK('itemforsale','location')}}
+
@@ -84,7 +90,7 @@

-
+
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 b487cc9b..5ea4054b 100644
--- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss
+++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss
@@ -144,4 +144,9 @@ ion-card{
margin: 2px 0px 5px -3px;
font-size: 14px;
font-weight: bold;
+}
+.location-text{
+ font-weight: bold;
+ font-size: 14px;
+ text-decoration: underline;
}
\ 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 20a253b7..ee364abe 100644
--- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts
+++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts
@@ -38,9 +38,9 @@ export class OfferDetailsComponent implements OnInit {
console.log(this.details);
const offerMessage = this.direction === 'ltr' ? this.details.Description : this.details.Description_AR;
const offerSubject = this.direction === 'ltr' ? this.details.Title : this.details.Title_AR;
-
+
const options = {
- message: this.stripHtml(offerMessage),
+ message: this.stripHtml(offerMessage),
subject: this.stripHtml(offerSubject),
files: [this.details.Banner_Image]
}
@@ -56,4 +56,16 @@ export class OfferDetailsComponent implements OnInit {
}, 200);
}
+ openLocation() {
+ this.cs.navigateForward('/offersdiscount/location');
+ }
+ getLocation() {
+ this.cs.startLoading();
+ this.offersService.getOfferLocation({ OfferId: this.details.rowID }, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
+ this.cs.stopLoading();
+ result = JSON.parse(result.Mohemm_ITG_ResponseItem).result.data;
+ this.cs.sharedService.setSharedData(result, OfferDiscountService.selected_offers);
+ this.openLocation();
+ })
+ }
}
diff --git a/Mohem/src/app/offersdiscount/offersdiscount.module.ts b/Mohem/src/app/offersdiscount/offersdiscount.module.ts
index c64e20bb..b4062b63 100644
--- a/Mohem/src/app/offersdiscount/offersdiscount.module.ts
+++ b/Mohem/src/app/offersdiscount/offersdiscount.module.ts
@@ -11,6 +11,8 @@ import { OfferDetailsComponent } from './offer-details/offer-details.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { OfferDiscountService } from './services/service';
import { FilterComponent } from './filter/filter.component';
+import { LocationComponent } from './location/location.component';
+
const routes: Routes = [
@@ -30,6 +32,10 @@ const routes: Routes = [
path: 'filter-page',
component: FilterComponent
},
+ {
+ path: 'location',
+ component: LocationComponent
+ },
],
}
];
@@ -44,8 +50,9 @@ const routes: Routes = [
HmgCommonModule,
RouterModule.forChild(routes)
],
- declarations: [OffersdiscountPage, HomeComponent, OfferDetailsComponent, FilterComponent],
+ declarations: [OffersdiscountPage, HomeComponent, OfferDetailsComponent, FilterComponent, LocationComponent],
entryComponents: [FilterComponent],
- providers: [OfferDiscountService, SocialSharing]
+ providers: [OfferDiscountService, SocialSharing],
+
})
export class OffersdiscountPageModule { }
diff --git a/Mohem/src/app/offersdiscount/services/service.ts b/Mohem/src/app/offersdiscount/services/service.ts
index b3bd357f..2a838807 100644
--- a/Mohem/src/app/offersdiscount/services/service.ts
+++ b/Mohem/src/app/offersdiscount/services/service.ts
@@ -15,8 +15,9 @@ export class OfferDiscountService {
public static related_offers = 'related-offers';
public static selected_filters = 'selected-filters';
public static categories = 'categories';
+ public static offer_location = 'offer_location';
public static getCategories = 'Services/COCWS.svc/REST/Mohemm_ITG_GetCategories';
-
+ public static offerLocation = 'Services/COCWS.svc/REST/Mohemm_ITG_OffersLocation';
constructor(
public con: ConnectorService,
private authService: AuthenticationService,
@@ -39,7 +40,7 @@ export class OfferDiscountService {
return this.con.postNoLoad(OfferDiscountService.offersDiscountData, request, onError, errorLabel);
}
- getCategories(request: any, onError?: any, errorLabel?: string): Observable
{
+ getCategories(request: any, onError?: any, errorLabel?: string): Observable {
this.authService.authenticateRequest(request);
request['EmployeeNumber'] = request.UserName;
request['ItgChannelId'] = 3;
@@ -56,4 +57,10 @@ export class OfferDiscountService {
errorLabel
);
}
+ public getOfferLocation(request: any, onError?: any, errorLabel?: string) {
+ this.authService.authenticateRequest(request);
+ request.EmployeeNumber = request.UserName;
+
+ return this.con.postNoLoad(OfferDiscountService.offerLocation, request, onError, errorLabel);
+ }
}
\ No newline at end of file
diff --git a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.html b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.html
index 297be474..75fc66f0 100644
--- a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.html
+++ b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.html
@@ -10,10 +10,10 @@
{{ 'worklist,template-name' | translate}}
-
+
- {{ program.CONCURRENT_PROGRAM_NAME}}
+ {{ program.USER_CONCURRENT_PROGRAM_NAME}}
diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.html b/Mohem/src/app/reports/transaction-list/transaction-list.component.html
index e77ffca3..cfffd088 100644
--- a/Mohem/src/app/reports/transaction-list/transaction-list.component.html
+++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.html
@@ -11,7 +11,7 @@
0" class="transaction-list">
- {{getDate(transaction.REQUEST_DATE)}}
+ {{getDate(transaction.REQUEST_DATE)}}
diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.scss b/Mohem/src/app/reports/transaction-list/transaction-list.component.scss
index 0f29d1fd..8e18b14f 100644
--- a/Mohem/src/app/reports/transaction-list/transaction-list.component.scss
+++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.scss
@@ -1,6 +1,6 @@
.display-created{
display: inline-block;
-
+ margin:2px;
color:#000;
}
#containerDiv{
@@ -25,6 +25,14 @@
width: 100px;
color:#969696;
}
+.date_ar{
+ position: absolute;
+ font-size: 14px;
+ padding: 10px;
+ left:0;
+ width: 100px;
+ color:#969696;
+}
.transaction-list{
margin-top:20px;
}
diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.ts b/Mohem/src/app/reports/transaction-list/transaction-list.component.ts
index 66985159..53449f9d 100644
--- a/Mohem/src/app/reports/transaction-list/transaction-list.component.ts
+++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.ts
@@ -15,6 +15,7 @@ export class TransactionListComponent implements OnInit {
transactionList: any = [];
selectedMenu: any;
template: any;
+ direction: any;
constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, private platform: Platform, private file: File, private opener: FileOpener,
) { }
@@ -22,6 +23,7 @@ export class TransactionListComponent implements OnInit {
this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false);
this.transactionList = this.cs.sharedService.getSharedData(ReportServiceService.TRANSACTION_LIST, false);
this.template = this.cs.sharedService.getSharedData(ReportServiceService.TEMPLATE, false);
+ this.direction = TranslatorService.getCurrentDirection();
}
getDate(date) {
return this.cs.evaluteDate(date);
diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json
index 25b14c31..b87951c4 100644
--- a/Mohem/src/assets/localization/i18n.json
+++ b/Mohem/src/assets/localization/i18n.json
@@ -3360,6 +3360,10 @@
"offersdiscount": {
"en": "Offers & Discount",
"ar": "العروض والخصومات"
+ },
+ "location": {
+ "en": "Offer Location",
+ "ar": "عرض الموقع"
}
},
"attendance-tracking": {
@@ -3499,16 +3503,17 @@
"en": "Please give us a comments",
"ar": "من فضلك اعطنا تعليقات"
},
- "survey-success":{
- "en":"Your survey has been submitted successfully",
- "ar":"تم تقديم الاستبيان الخاص بك بنجاح"
+ "survey-success": {
+ "en": "Your survey has been submitted successfully",
+ "ar": "تم تقديم الاستبيان الخاص بك بنجاح"
+ },
+ "erm-failed": {
+ "en": "Something went wrong please try again",
+ "ar": "حدث خطأ ما. أعد المحاولة من فضلك"
},
- "erm-failed":{
- "en":"Something went wrong please try again",
- "ar":"حدث خطأ ما. أعد المحاولة من فضلك"
- },"viedo-success":{
- "en":"Thank you for watching this video",
- "ar":"شكرا لك على مشاهدة هذا الفيديو"
+ "viedo-success": {
+ "en": "Thank you for watching this video",
+ "ar": "شكرا لك على مشاهدة هذا الفيديو"
}
},
"transaction": {
diff --git a/Mohem/src/index.html b/Mohem/src/index.html
index 2150180d..3d607717 100644
--- a/Mohem/src/index.html
+++ b/Mohem/src/index.html
@@ -11,6 +11,8 @@
+
diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss
index e24bafc5..9c564382 100644
--- a/Mohem/src/theme/styles.scss
+++ b/Mohem/src/theme/styles.scss
@@ -1635,4 +1635,8 @@ ion-segment-button {
.filterClass input{
box-shadow: none !important;
-webkit-box-shadow: none !important;
+ }
+ .select-alert .alert-radio-label{
+
+ font-size: 12px !important;
}
\ No newline at end of file