Skip to content

Commit

Permalink
fixing website url error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mansurskTarento committed Jan 18, 2025
1 parent cfa8cc0 commit 16d820e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<mat-tab label="Transform Content">
<div class="w-full mt-4">
<mat-accordion class="flex gap-6 flex-col">
<mat-expansion-panel class="margin-0">
<mat-expansion-panel class="margin-0" (opened)="openedTab = 'trasformContentJson'"
(closed)="openedTab = ''">
<mat-expansion-panel-header>
<mat-panel-description class="accoridan-description"> Via CSV
</mat-panel-description>
Expand All @@ -33,7 +34,8 @@
</ws-app-transformations>
</mat-expansion-panel>

<mat-expansion-panel class="margin-0">
<mat-expansion-panel class="margin-0" (opened)="openedTab = 'transformContentViaApi'"
(closed)="openedTab = ''">
<mat-expansion-panel-header>
<mat-panel-description class="accoridan-description"> Via API
</mat-panel-description>
Expand All @@ -48,7 +50,8 @@
<mat-tab label="Transform Progress">
<div class="w-full mt-4">
<mat-accordion class="flex gap-6 flex-col">
<mat-expansion-panel class="margin-0">
<mat-expansion-panel class="margin-0" (opened)="openedTab = 'transformProgressJson'"
(closed)="openedTab = ''">
<mat-expansion-panel-header>
<mat-panel-description class="accoridan-description"> Via CSV
</mat-panel-description>
Expand All @@ -64,7 +67,8 @@
<mat-tab label="Transform Certificate">
<div class="w-full mt-4">
<mat-accordion class="flex gap-6 flex-col">
<mat-expansion-panel class="margin-0">
<mat-expansion-panel class="margin-0" (opened)="openedTab = 'certificateTemplateUrl'"
(closed)="openedTab = ''">
<mat-expansion-panel-header>
<mat-panel-description class="accoridan-description" class="accoridan-description"> Via CSV
</mat-panel-description>
Expand All @@ -84,7 +88,7 @@
</mat-card>

<ng-container *ngIf="!delayTabLoad">
<mat-tab-group [ngClass]="{'hideTabs': !(viaApiTabIndex === 0)}">
<mat-tab-group [ngClass]="{'hideTabs': openedTab !== 'trasformContentJson'}">
<mat-tab label="Upload Status">
<div class="w-full mt-3 flex flex-col">
<ng-container *ngIf="!showUploadedStatusLoader; else showLoader">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class ContentUploadComponent implements OnInit, OnChanges {

delayTabLoad = true
viaApiTabIndex = 0
openedTab = ''
//#endregion

//#region (constructor: contains Intialization of TransforamtionControls from routes data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ export class ProviderDetailsComponent implements OnInit, OnChanges {
},
error: (error: HttpErrorResponse) => {
this.loaderService.changeLoad.next(false)
const errmsg = _.get(error, 'error.params.errMsg', 'Something went worng, please try again later')
let errmsg = _.get(error, 'error.params.errMsg', 'Something went worng, please try again later')
if (errmsg.includes('Validation error(s): \n$.websiteUrl:')) {
errmsg = 'Please provide a valid URL for the website'
}
this.showSnackBar(errmsg)
},
})
Expand Down Expand Up @@ -376,7 +379,10 @@ export class ProviderDetailsComponent implements OnInit, OnChanges {
},
error: (error: HttpErrorResponse) => {
this.loaderService.changeLoad.next(false)
const errmsg = _.get(error, 'error.params.errMsg', 'Something went worng, please try again later')
let errmsg = _.get(error, 'error.params.errMsg', 'Something went worng, please try again later')
if (errmsg.includes('Validation error(s): \n$.websiteUrl:')) {
errmsg = 'Please provide a valid URL for the website'
}
this.showSnackBar(errmsg)
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@
<ng-container *ngIf="transformationType !== 'certificateTemplateUrl'">
<div class="flex w-full flex-col gap-1 h-full">
<div>
<span class="header">Transform {{transformationType === 'trasformContentJson' ? 'Content' : 'Progress'}}</span>
<span class="header">Transform {{transformationType === 'transformContentViaApi' ? 'Content' :
'Progress'}}</span>
</div>
<div class="flex flex-col gap-4 transformation-box"
[ngClass]="{'transformation-required': (!transformationsUpdated && executed)}">
Expand Down

0 comments on commit 16d820e

Please sign in to comment.