[develop | DONE]: Add 404 page. On save of a service open info modal. Fix service URL warning in service form.
This commit is contained in:
parent
b982905535
commit
6c57257b55
|
@ -77,7 +77,7 @@ declare var copy;
|
||||||
<div *ngIf="form" class="uk-grid" uk-grid>
|
<div *ngIf="form" class="uk-grid" uk-grid>
|
||||||
<div class="uk-width-1-2@m uk-width-1-1" input placeholder="Service Name"
|
<div class="uk-width-1-2@m uk-width-1-1" input placeholder="Service Name"
|
||||||
[formInput]="form.get('name')"></div>
|
[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>
|
[formInput]="form.get('url')"></div>
|
||||||
<div class="uk-width-1-1" input type="textarea" placeholder="Service Description"
|
<div class="uk-width-1-1" input type="textarea" placeholder="Service Description"
|
||||||
[formInput]="form.get('description')">
|
[formInput]="form.get('description')">
|
||||||
|
@ -373,8 +373,9 @@ export class ApisComponent implements OnInit, OnDestroy {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if(this.index === -1) {
|
if(this.index === -1) {
|
||||||
this.subscriptions.push(this.apisService.create(this.form.getRawValue()).subscribe(api => {
|
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.');
|
NotificationHandler.rise('Your service has been created successfully.');
|
||||||
|
this.openInfoModal(index);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}, error => {
|
}, error => {
|
||||||
console.error(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.subscriptions.push(this.apisService.save(this.apis[this.index].service.id, this.form.getRawValue()).subscribe(api => {
|
||||||
this.apis[this.index] = api;
|
this.apis[this.index] = api;
|
||||||
NotificationHandler.rise('Your service has been saved successfully.');
|
NotificationHandler.rise('Your service has been saved successfully.');
|
||||||
|
this.openInfoModal(this.index);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}, error => {
|
}, error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
|
@ -43,11 +43,11 @@ const routes: Routes = [
|
||||||
canActivateChild: [AdminLoginGuard]
|
canActivateChild: [AdminLoginGuard]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'error',
|
path: '**',
|
||||||
pathMatch: 'full',
|
pathMatch: 'full',
|
||||||
component: ErrorPageComponent,
|
component: ErrorPageComponent,
|
||||||
data: {hasSidebar: false}
|
data: {hasSidebar: false}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 68c352d3d275209d52bc3198dad7482ee21d193d
|
Subproject commit fa61b8bef431b03eca1092fe05ab16611e3233ae
|
|
@ -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')"
|
<div class="uk-width-1-2@m uk-width-1-1" input [formInput]="form.get('position')"
|
||||||
[placeholder]="'Position'"></div>
|
[placeholder]="'Position'"></div>
|
||||||
</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>
|
<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"
|
<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
|
[class.uk-disabled]="form.pristine || form.invalid || form.disabled" (click)="save()">Save
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6bb1e61b059bef1bff3bfb0611b0df46f7840426
|
Subproject commit b68f375714b679743e586bb2fb4721e633e43fc1
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5e8c1addb1ebfa508aac8cb9540a755940c95b79
|
Subproject commit 7aa9e577193e3a77415434fd5e6e856a21d5efeb
|
Loading…
Reference in New Issue