Skip to content
Snippets Groups Projects
Commit 1f581359 authored by ncastejon's avatar ncastejon
Browse files
parents 85c22430 7d4a6cba
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -9,4 +9,5 @@ services: ...@@ -9,4 +9,5 @@ services:
- ./nginx.conf.template:/etc/nginx/conf.d/default.conf - ./nginx.conf.template:/etc/nginx/conf.d/default.conf
ports: ports:
- ${DEV_APP_PORT}:80 - ${DEV_APP_PORT}:80
restart: unless-stopped
\ No newline at end of file
This diff is collapsed.
...@@ -13,42 +13,41 @@ ...@@ -13,42 +13,41 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^6.1.10", "@angular/animations": "^7.2.4",
"@angular/cdk": "^6.4.7", "@angular/cdk": "^7.3.1",
"@angular/common": "^6.0.3", "@angular/common": "^7.2.4",
"@angular/compiler": "^6.0.3", "@angular/compiler": "^7.2.4",
"@angular/core": "^6.0.3", "@angular/core": "^7.2.4",
"@angular/forms": "^6.0.3", "@angular/forms": "^7.2.4",
"@angular/http": "^6.0.3", "@angular/http": "^7.2.4",
"@angular/platform-browser": "^6.0.3", "@angular/platform-browser": "^7.2.4",
"@angular/platform-browser-dynamic": "^6.0.3", "@angular/platform-browser-dynamic": "^7.2.4",
"@angular/router": "^6.0.3", "@angular/router": "^7.2.4",
"bulma": "^0.7.2", "bulma": "^0.7.4",
"core-js": "^2.5.4", "core-js": "^2.6.4",
"rxjs": "^6.0.0", "rxjs": "^6.4.0",
"rxjs-compat": "^6.3.3",
"sass-recursive-map-merge": "^1.0.1", "sass-recursive-map-merge": "^1.0.1",
"zone.js": "^0.8.26" "zone.js": "^0.8.29"
}, },
"devDependencies": { "devDependencies": {
"@angular/compiler-cli": "^6.0.3", "@angular-devkit/build-angular": "^0.13.1",
"@angular-devkit/build-angular": "~0.6.8", "@angular/cli": "~7.3.1",
"typescript": "~2.7.2", "@angular/compiler-cli": "^7.2.4",
"@angular/cli": "~6.0.8", "@angular/language-service": "^7.2.4",
"@angular/language-service": "^6.0.3", "@types/jasmine": "^2.8.16",
"@types/jasmine": "~2.8.6", "@types/jasminewd2": "^2.0.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4", "@types/node": "~8.9.4",
"codelyzer": "~4.2.1", "codelyzer": "^4.5.0",
"jasmine-core": "~2.99.1", "jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1", "karma": "^4.0.0",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0", "karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1", "karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0", "protractor": "^5.4.2",
"ts-node": "~5.0.1", "ts-node": "~5.0.1",
"tslint": "~5.9.1" "tslint": "~5.9.1",
"typescript": "~3.2.4"
} }
} }
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/mergeMap';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
......
import { switchMap } from 'rxjs/operators';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, ParamMap } from '@angular/router'; import { ActivatedRoute, ParamMap } from '@angular/router';
import 'rxjs/add/operator/switchMap';
import { Organization } from 'src/app/models/organization.model'; import { Organization } from 'src/app/models/organization.model';
import { OrganizationService } from 'src/app/services/organization.service'; import { OrganizationService } from 'src/app/services/organization.service';
...@@ -20,8 +22,8 @@ export class OrganizationDetailComponent implements OnInit { ...@@ -20,8 +22,8 @@ export class OrganizationDetailComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.route.paramMap this.route.paramMap.pipe(
.switchMap((params: ParamMap) => this.organizationService.findById(params.get('id'))) switchMap((params: ParamMap) => this.organizationService.findById(params.get('id'))))
.subscribe((organization: Organization) => this.organization = organization); .subscribe((organization: Organization) => this.organization = organization);
} }
} }
...@@ -3,7 +3,7 @@ import { ActivatedRoute, ParamMap, Router } from '@angular/router'; ...@@ -3,7 +3,7 @@ import { ActivatedRoute, ParamMap, Router } from '@angular/router';
import { Organization } from 'src/app/models/organization.model'; import { Organization } from 'src/app/models/organization.model';
import { OrganizationService } from 'src/app/services/organization.service'; import { OrganizationService } from 'src/app/services/organization.service';
import { FormBuilder, FormGroup, Validators, FormArray } from '@angular/forms'; import { FormBuilder, FormGroup, Validators, FormArray } from '@angular/forms';
import { tap } from 'rxjs/operators'; import { tap, filter, switchMap } from 'rxjs/operators';
@Component({ @Component({
selector: 'app-organization-form', selector: 'app-organization-form',
...@@ -28,9 +28,9 @@ export class OrganizationFormComponent implements OnInit { ...@@ -28,9 +28,9 @@ export class OrganizationFormComponent implements OnInit {
this.title = this.route.snapshot.data.title; this.title = this.route.snapshot.data.title;
this.initForm(); this.initForm();
this.route.paramMap this.route.paramMap.pipe(
.filter((paramMap: ParamMap) => (paramMap.get('id') !== null)) filter((paramMap: ParamMap) => (paramMap.get('id') !== null)),
.switchMap((paramMap: ParamMap) => this.organizationService.findById(paramMap.get('id'))) switchMap((paramMap: ParamMap) => this.organizationService.findById(paramMap.get('id'))))
.subscribe((organization: Organization) => { .subscribe((organization: Organization) => {
this.organization = organization; this.organization = organization;
......
import { switchMap } from 'rxjs/operators';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, ParamMap } from '@angular/router'; import { ActivatedRoute, ParamMap } from '@angular/router';
import 'rxjs/add/operator/switchMap';
import { Resource } from 'src/app/models/resource.model'; import { Resource } from 'src/app/models/resource.model';
import { ResourceService } from 'src/app/services/resource.service'; import { ResourceService } from 'src/app/services/resource.service';
...@@ -20,8 +22,8 @@ export class ResourceDetailComponent implements OnInit { ...@@ -20,8 +22,8 @@ export class ResourceDetailComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.route.paramMap this.route.paramMap.pipe(
.switchMap((params: ParamMap) => this.resourceService.findById(params.get('id'))) switchMap((params: ParamMap) => this.resourceService.findById(params.get('id'))))
.subscribe((resource: Resource) => this.resource = resource); .subscribe((resource: Resource) => this.resource = resource);
} }
} }
...@@ -3,6 +3,7 @@ import { ActivatedRoute, ParamMap, Router } from '@angular/router'; ...@@ -3,6 +3,7 @@ import { ActivatedRoute, ParamMap, Router } from '@angular/router';
import { Resource } from 'src/app/models/resource.model'; import { Resource } from 'src/app/models/resource.model';
import { ResourceService } from 'src/app/services/resource.service'; import { ResourceService } from 'src/app/services/resource.service';
import { FormBuilder, FormGroup, Validators, FormArray } from '@angular/forms'; import { FormBuilder, FormGroup, Validators, FormArray } from '@angular/forms';
import { filter, switchMap } from 'rxjs/operators';
@Component({ @Component({
selector: 'app-resource-form', selector: 'app-resource-form',
...@@ -27,9 +28,9 @@ export class ResourceFormComponent implements OnInit { ...@@ -27,9 +28,9 @@ export class ResourceFormComponent implements OnInit {
this.title = this.route.snapshot.data.title; this.title = this.route.snapshot.data.title;
this.initForm(); this.initForm();
this.route.paramMap this.route.paramMap.pipe(
.filter((paramMap: ParamMap) => (paramMap.get('id') !== null)) filter((paramMap: ParamMap) => (paramMap.get('id') !== null)),
.switchMap((paramMap: ParamMap) => this.resourceService.findById(paramMap.get('id'))) switchMap((paramMap: ParamMap) => this.resourceService.findById(paramMap.get('id'))))
.subscribe((resource: Resource) => { .subscribe((resource: Resource) => {
this.resource = resource; this.resource = resource;
......
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable'; import { Observable , Subject } from 'rxjs';
import { Subject } from 'rxjs/Subject';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Organization, IOrganization, OrganizationRO } from '../models/organization.model'; import { Organization, IOrganization, OrganizationRO } from '../models/organization.model';
......
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable'; import { Observable , Subject } from 'rxjs';
import { Subject } from 'rxjs/Subject';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Resource, IResource, ResourceRO } from '../models/resource.model'; import { Resource, IResource, ResourceRO } from '../models/resource.model';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment