diff --git a/Mohem/resources/android/icon/drawable-hdpi-icon.png b/Mohem/resources/android/icon/drawable-hdpi-icon.png index 92b60483..7c940227 100644 Binary files a/Mohem/resources/android/icon/drawable-hdpi-icon.png and b/Mohem/resources/android/icon/drawable-hdpi-icon.png differ diff --git a/Mohem/resources/android/icon/drawable-ldpi-icon.png b/Mohem/resources/android/icon/drawable-ldpi-icon.png index 61038ba2..068e3250 100644 Binary files a/Mohem/resources/android/icon/drawable-ldpi-icon.png and b/Mohem/resources/android/icon/drawable-ldpi-icon.png differ diff --git a/Mohem/resources/android/icon/drawable-mdpi-icon.png b/Mohem/resources/android/icon/drawable-mdpi-icon.png index 4029321c..07a0cbda 100644 Binary files a/Mohem/resources/android/icon/drawable-mdpi-icon.png and b/Mohem/resources/android/icon/drawable-mdpi-icon.png differ diff --git a/Mohem/resources/android/icon/drawable-xhdpi-icon.png b/Mohem/resources/android/icon/drawable-xhdpi-icon.png index 2fb31f3f..3f089549 100644 Binary files a/Mohem/resources/android/icon/drawable-xhdpi-icon.png and b/Mohem/resources/android/icon/drawable-xhdpi-icon.png differ diff --git a/Mohem/resources/android/icon/drawable-xxhdpi-icon.png b/Mohem/resources/android/icon/drawable-xxhdpi-icon.png index 169efb78..935dbf4e 100644 Binary files a/Mohem/resources/android/icon/drawable-xxhdpi-icon.png and b/Mohem/resources/android/icon/drawable-xxhdpi-icon.png differ diff --git a/Mohem/resources/android/icon/drawable-xxxhdpi-icon.png b/Mohem/resources/android/icon/drawable-xxxhdpi-icon.png index 672b0724..83185e55 100644 Binary files a/Mohem/resources/android/icon/drawable-xxxhdpi-icon.png and b/Mohem/resources/android/icon/drawable-xxxhdpi-icon.png differ diff --git a/Mohem/resources/android/splash/drawable-land-hdpi-screen.png b/Mohem/resources/android/splash/drawable-land-hdpi-screen.png index 287d0e7a..5f5de2d2 100644 Binary files a/Mohem/resources/android/splash/drawable-land-hdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-hdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-land-ldpi-screen.png b/Mohem/resources/android/splash/drawable-land-ldpi-screen.png index 94aba8dc..dade5b7b 100644 Binary files a/Mohem/resources/android/splash/drawable-land-ldpi-screen.png and b/Mohem/resources/android/splash/drawable-land-ldpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-land-mdpi-screen.png b/Mohem/resources/android/splash/drawable-land-mdpi-screen.png index 80138315..27fdcd49 100644 Binary files a/Mohem/resources/android/splash/drawable-land-mdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-mdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-land-xhdpi-screen.png b/Mohem/resources/android/splash/drawable-land-xhdpi-screen.png index 974142b5..36d268f6 100644 Binary files a/Mohem/resources/android/splash/drawable-land-xhdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-xhdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png b/Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png index 04a1786f..c30d7392 100644 Binary files a/Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png b/Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png index 26e47cf9..64081e5e 100644 Binary files a/Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-port-hdpi-screen.png b/Mohem/resources/android/splash/drawable-port-hdpi-screen.png index aac974e0..0191aafd 100644 Binary files a/Mohem/resources/android/splash/drawable-port-hdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-hdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-port-ldpi-screen.png b/Mohem/resources/android/splash/drawable-port-ldpi-screen.png index f1790177..8dfe11bb 100644 Binary files a/Mohem/resources/android/splash/drawable-port-ldpi-screen.png and b/Mohem/resources/android/splash/drawable-port-ldpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-port-mdpi-screen.png b/Mohem/resources/android/splash/drawable-port-mdpi-screen.png index 1ab11686..554ab333 100644 Binary files a/Mohem/resources/android/splash/drawable-port-mdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-mdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-port-xhdpi-screen.png b/Mohem/resources/android/splash/drawable-port-xhdpi-screen.png index eccccbbe..fba61dc8 100644 Binary files a/Mohem/resources/android/splash/drawable-port-xhdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-xhdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png b/Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png index 1b21b52c..5513fd18 100644 Binary files a/Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png differ diff --git a/Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png b/Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png index 667426f7..7b105aea 100644 Binary files a/Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png differ 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 62631565..93e47fec 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/itemforsale/home/home.component.html b/Mohem/src/app/itemforsale/home/home.component.html index 0a8a604c..bab5694f 100644 --- a/Mohem/src/app/itemforsale/home/home.component.html +++ b/Mohem/src/app/itemforsale/home/home.component.html @@ -144,14 +144,14 @@ - +
-
X
- +
X
+
@@ -190,14 +190,14 @@ - +
- +
diff --git a/Mohem/src/app/itemforsale/home/home.component.ts b/Mohem/src/app/itemforsale/home/home.component.ts index d53d5627..1806a353 100644 --- a/Mohem/src/app/itemforsale/home/home.component.ts +++ b/Mohem/src/app/itemforsale/home/home.component.ts @@ -17,7 +17,7 @@ export class HomeComponent implements OnInit { direction: string; uploaded: any = []; public selectedFile: any; - indexLastObj: any; + indexLastObj: any = 0; addAttachRequest: any = []; selectedCategory: any; filterAllowedType: any = [ @@ -122,9 +122,9 @@ export class HomeComponent implements OnInit { this.addAttachRequest.push({ AttachmentID: this.indexLastObj, - P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1], - P_FILE_DATA: fileData.split(",")[1], - P_FILE_NAME: name, //.split('.')[0], + ContentType: 'image/' + attachType, //type.split('/')[1], + Base64Data: fileData.split(",")[1], + FileName: name, //.split('.')[0], }); } catch (e) { } @@ -146,27 +146,38 @@ export class HomeComponent implements OnInit { var authUser = this.authService.getAuthenticatedRequest(); this.cs.startLoading(); - var request = new FormData(); - request.append('title', this.itemInfo); - request.append('title_Ar', this.itemInfo); - request.append('categoryID', this.selectedCategory.categoryID); - request.append('description', this.itemDescription); - request.append('description_Ar', this.itemDescription); - request.append('employeeNumber', authUser.P_USER_NAME); - request.append('quotePrice', this.itemPrice); - request.append('isActive', 'true'); - request.append('regionID', this.regionID); - request.append('status', this.itemCondition); - console.log(this.selectedFile); - if (this.selectedFile && this.selectedFile !== undefined) { - request.append('fileColl', this.addAttachRequest.toString()); + // var request = new FormData(); + // request.append('title', this.itemInfo); + // request.append('title_Ar', this.itemInfo); + // request.append('categoryID', this.selectedCategory.categoryID); + // request.append('description', this.itemDescription); + // request.append('description_Ar', this.itemDescription); + // request.append('employeeNumber', authUser.P_USER_NAME); + // request.append('quotePrice', this.itemPrice); + // request.append('isActive', 'true'); + // request.append('regionID', this.regionID); + // request.append('status', this.itemCondition); + // console.log(this.selectedFile); + // if (this.selectedFile && this.selectedFile !== undefined) { + // request.append('fileColl', this.addAttachRequest.toString()); + // } + // request.append('Channel', authUser.Channel.toString()); + // request.append('LogInToken', authUser.LogInTokenID); + // request.append('Token', authUser.TokenID); + // request.append('EmployeeNumber', authUser.P_USER_NAME); + // request.append('MobileNo', authUser.MobileNumber); + var request = { + "TokenID": authUser.LogInTokenID, "EmployeeNumber": authUser.P_USER_NAME, "ItgImageCollList": this.addAttachRequest, + "ItgTitle": this.itemInfo, + "ItgTitleAr": this.itemInfo, + "ItgCategoryID": this.selectedCategory.categoryID, + "ItgDescription": this.itemDescription, + "ItgDescriptionAr": this.itemDescription, + "ItgQuotePrice": this.itemPrice, + "RegionID": this.regionID, + "ItgIsActive": true, + "ItgStatus": this.itemCondition } - request.append('Channel', authUser.Channel.toString()); - request.append('LogInToken', authUser.LogInTokenID); - request.append('Token', authUser.TokenID); - request.append('EmployeeNumber', authUser.P_USER_NAME); - request.append('MobileNo', authUser.MobileNumber); - this.itemService.createItemForSale(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result: any) => { if (this.cs.validResponse(result)) { @@ -194,13 +205,28 @@ export class HomeComponent implements OnInit { this.itemPrice = this.editItem.quotePrice; this.regionID = this.editItem.regionID; this.itemCondition = this.editItem.status.toLowerCase(); + this.addAttachRequest = this.getAttachment(this.editItem.itemAttachments); + } + getAttachment(itemsArray) { + let item = []; + itemsArray.forEach(element => { + + item.push({ + attachmentId: element.attachmentId, + ContentType: element.contentType, + Base64Data: element.content, + FileName: element.fileName, + + }); + }); + return item; } updateItemForSale() { var authUser = this.authService.getAuthenticatedRequest(); this.cs.startLoading(); var request = new FormData(); - request.append('itmeSaleID', this.editItem.itemSaleID); + request.append('itemSaleID', this.editItem.itemSaleID); request.append('title', this.itemInfo); request.append('title_Ar', this.itemInfo); request.append('categoryID', this.selectedCategory.categoryID); @@ -211,10 +237,10 @@ export class HomeComponent implements OnInit { request.append('isActive', 'true'); request.append('regionID', this.regionID); request.append('status', this.itemCondition); - console.log(this.selectedFile); - if (this.selectedFile && this.selectedFile !== undefined) { - request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name); - } + // console.log(this.selectedFile); + // if (this.selectedFile && this.selectedFile !== undefined) { + // request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name); + // } request.append('Channel', authUser.Channel.toString()); request.append('LogInToken', authUser.LogInTokenID); request.append('Token', authUser.TokenID); diff --git a/Mohem/src/app/itemforsale/services/service.service.ts b/Mohem/src/app/itemforsale/services/service.service.ts index 54339928..62ce6e9b 100644 --- a/Mohem/src/app/itemforsale/services/service.service.ts +++ b/Mohem/src/app/itemforsale/services/service.service.ts @@ -11,7 +11,7 @@ export class ItemForSaleService { public static getItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemForSale'; public static getItemForSaleByEmployee = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemForSaleByEmployee'; public static getCategories = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemSaleCategory'; - public static createItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_AddItemForSale'; + public static createItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_AddItemForSaleMobile'; public static updateItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_UpdateItemForSale'; public static getRegion = 'Services/COCWS.svc/REST/Mohemm_ITG_GetRegion'; public static ITEMS_SELECTED = 'item-selected'; @@ -66,10 +66,10 @@ export class ItemForSaleService { const request = itemRequest; this.authService.authenticateRequest(request); request.employeeNumber = request.P_USER_NAME; - return this.http.post(ConnectorService.host + ItemForSaleService.createItemForSale, itemRequest, { - - } - ) + //return this.http.post(ConnectorService.host + ItemForSaleService.createItemForSale, itemRequest, { + return this.con.post(ItemForSaleService.createItemForSale, request, onError, errorLabel); + //} + //) } updateItemForSale(itemRequest: any, onError?: any, errorLabel?: string) { const request = itemRequest; diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index 4eb7d608..f47eb954 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -335,7 +335,7 @@ - +
@@ -347,7 +347,7 @@

{{data.CONTACT_NAME}}

- +

{{ts.trPK('userProfile','update')}}

@@ -359,7 +359,7 @@

{{data.RELATIONSHIP}}

-
+

{{ts.trPK('userProfile','remove')}}

diff --git a/Mohem/src/app/profile/home/home.component.scss b/Mohem/src/app/profile/home/home.component.scss index 0ec213f7..1f462eea 100644 --- a/Mohem/src/app/profile/home/home.component.scss +++ b/Mohem/src/app/profile/home/home.component.scss @@ -1403,4 +1403,8 @@ $actionBtnSize: 36px; margin-left: 20px; margin-top: 5px; font-size: 13px; -} \ No newline at end of file +} +.disabledButton{ + opacity:.5; +pointer-events: none; +} diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 1a82b12a..467a24dd 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -321,7 +321,7 @@ export class HomeComponent implements OnInit { case "contact": this.personalInfoSegment = false; this.basicDetailsSegment = false; - this.addressSegment = false; + this.addressSegment = true; this.editBasic = false; this.editAddress = false; this.familyMemberSegment = false;