Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
2b55289bab
|
@ -77,7 +77,7 @@ declare var copy;
|
|||
<div *ngIf="form" class="uk-grid" uk-grid>
|
||||
<div class="uk-width-1-2@m uk-width-1-1" input placeholder="Service Name"
|
||||
[formInput]="form.get('name')"></div>
|
||||
<div class="uk-width-1-2@m uk-width-1-1" input type="logoURL" placeholder="Service URL"
|
||||
<div class="uk-width-1-2@m uk-width-1-1" input type="URL" placeholder="Service URL"
|
||||
[formInput]="form.get('url')"></div>
|
||||
<div class="uk-width-1-1" input type="textarea" placeholder="Service Description"
|
||||
[formInput]="form.get('description')">
|
||||
|
@ -373,8 +373,9 @@ export class ApisComponent implements OnInit, OnDestroy {
|
|||
this.loading = true;
|
||||
if(this.index === -1) {
|
||||
this.subscriptions.push(this.apisService.create(this.form.getRawValue()).subscribe(api => {
|
||||
this.apis.push(api)
|
||||
let index = this.apis.push(api) - 1;
|
||||
NotificationHandler.rise('Your service has been created successfully.');
|
||||
this.openInfoModal(index);
|
||||
this.loading = false;
|
||||
}, error => {
|
||||
console.error(error);
|
||||
|
@ -385,6 +386,7 @@ export class ApisComponent implements OnInit, OnDestroy {
|
|||
this.subscriptions.push(this.apisService.save(this.apis[this.index].service.id, this.form.getRawValue()).subscribe(api => {
|
||||
this.apis[this.index] = api;
|
||||
NotificationHandler.rise('Your service has been saved successfully.');
|
||||
this.openInfoModal(this.index);
|
||||
this.loading = false;
|
||||
}, error => {
|
||||
console.error(error);
|
||||
|
|
|
@ -43,11 +43,11 @@ const routes: Routes = [
|
|||
canActivateChild: [AdminLoginGuard]
|
||||
},
|
||||
{
|
||||
path: 'error',
|
||||
path: '**',
|
||||
pathMatch: 'full',
|
||||
component: ErrorPageComponent,
|
||||
data: {hasSidebar: false}
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
@ -35,7 +35,7 @@ import {NavigationEnd, Router} from "@angular/router";
|
|||
<div class="uk-width-1-2@m uk-width-1-1" input [formInput]="form.get('position')"
|
||||
[placeholder]="'Position'"></div>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-right uk-margin-medium-top">
|
||||
<div class="uk-flex uk-flex-right@l uk-flex-center uk-margin-medium-top">
|
||||
<a class="uk-button uk-button-default uk-margin-small-right" routerLink="/">Cancel</a>
|
||||
<button class="uk-button uk-button-primary" [disabled]="form.pristine || form.invalid || form.disabled"
|
||||
[class.uk-disabled]="form.pristine || form.invalid || form.disabled" (click)="save()">Save
|
||||
|
|
Loading…
Reference in New Issue