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/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}}