diff --git a/angular.json b/angular.json index a44192b..c775040 100644 --- a/angular.json +++ b/angular.json @@ -23,7 +23,7 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "baseHref": "/validation/", + "baseHref": "/validation/", "deployUrl": "/validation/", "outputPath": "dist/template-validation-portal", "index": "src/index.html", @@ -32,9 +32,9 @@ "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", "assets": [ - "src/favicon.ico", - "src/assets" - ], + "src/favicon.ico", + "src/assets" +], "styles": [ "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "src/styles.scss", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index fb7b3fb..eee7553 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,8 +1,10 @@ import { NgModule } from '@angular/core'; +import { ToastrModule } from 'ngx-toastr'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterModule, Routes } from '@angular/router'; import { AuthGuard } from './modules/shared/guard/auth.guard'; -let routes: Routes = [ +const routes: Routes = [ { path: 'auth', loadChildren: () => import('./modules/auth/auth.module').then(m => m.AuthModule) @@ -25,7 +27,11 @@ let routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] + imports: [ + RouterModule.forRoot(routes), + BrowserAnimationsModule, + ToastrModule.forRoot() + ], + exports: [RouterModule], }) export class AppRoutingModule { } diff --git a/src/app/modules/shared/services/template.service.ts b/src/app/modules/shared/services/template.service.ts index 7956572..2a057e3 100644 --- a/src/app/modules/shared/services/template.service.ts +++ b/src/app/modules/shared/services/template.service.ts @@ -8,6 +8,7 @@ import { Observable } from 'rxjs'; }) export class TemplateService { private baseUrl: any = window['env' as any]['baseUrl' as any]; + private linkUrl: any = window['env' as any]['linkUrl' as any]; private apiBasePath: string = 'template/api/v1/'; // Global variable for API path templateFile: any; @@ -17,7 +18,7 @@ export class TemplateService { constructor(private dataService: DataService) {} getEnvironmentUrl(): string { - return this.baseUrl; + return this.linkUrl; } selectTemplates() { @@ -104,7 +105,7 @@ export class TemplateService { } getSolutionLink(solutionId: string): string { - const baseUrl = this.getEnvironmentUrl(); - return `${baseUrl}surveyml/${solutionId}`; + const linkUrl = this.getEnvironmentUrl(); + return `${this.linkUrl}surveyml/${solutionId}`; } } diff --git a/src/app/modules/template/template-selection/template-selection.component.ts b/src/app/modules/template/template-selection/template-selection.component.ts index 5c75b42..07cb14e 100644 --- a/src/app/modules/template/template-selection/template-selection.component.ts +++ b/src/app/modules/template/template-selection/template-selection.component.ts @@ -80,7 +80,7 @@ export class TemplateSelectionComponent implements OnInit { this.toaster.success('Downloaded successfully'); this.selectFile = ""; } else { - alert("Please select a file to download"); + this.toaster.error('No file found ', "Please select a file"); } } @@ -217,7 +217,7 @@ export class TemplateSelectionComponent implements OnInit { } ); } else { - alert(`Please select a file to ${action}`); + this.toaster.error('No file found ', "Please select a file"); } } diff --git a/src/app/modules/template/template-solution-list/template-solution-list.component.css b/src/app/modules/template/template-solution-list/template-solution-list.component.css index 3749236..8819e61 100644 --- a/src/app/modules/template/template-solution-list/template-solution-list.component.css +++ b/src/app/modules/template/template-solution-list/template-solution-list.component.css @@ -60,4 +60,8 @@ mat-icon-button:hover { mat-paginator { background-color: #fafafa; border-top: 1px solid #e0e0e0; +} +.back-button { + color: rgb(0, 116, 182, 1); + /* font-weight: bold; */ } \ No newline at end of file diff --git a/src/app/modules/template/template-solution-list/template-solution-list.component.html b/src/app/modules/template/template-solution-list/template-solution-list.component.html index 718ec7c..4704248 100644 --- a/src/app/modules/template/template-solution-list/template-solution-list.component.html +++ b/src/app/modules/template/template-solution-list/template-solution-list.component.html @@ -1,4 +1,9 @@