correcting the indentation

pull/8742/head
bsatarnejad 4 years ago
parent df996ccf54
commit e62c9d4ac2
  1. 20
      frontend/src/app/modules/common/back-routing/back-routing.service.ts

@ -49,35 +49,31 @@ export class BackRoutingService {
} }
private goToOtherState(route:string, params:{}):Promise<any> { private goToOtherState(route:string, params:{}):Promise<any> {
return this.$state.go(route, params); return this.$state.go(route, params);
} }
private goBackToDetailsState(preferListOverSplit:boolean, baseRoute:string):void { private goBackToDetailsState(preferListOverSplit:boolean, baseRoute:string):void {
if (preferListOverSplit) { if (preferListOverSplit) {
this.goToOtherState(baseRoute, this.backRoute.params); this.goToOtherState(baseRoute, this.backRoute.params);
} else { } else {
this.goToOtherState(baseRoute + this.keepTab.currentDetailsSubState, this.backRoute.params); this.goToOtherState(baseRoute + this.keepTab.currentDetailsSubState, this.backRoute.params);
} }
} }
private goBackNotToDetailsState():void { private goBackNotToDetailsState():void {
if (this.backRoute.parent) { if (this.backRoute.parent) {
this.goToOtherState(this.backRoute.name, this.backRoute.params).then(() => { this.$state.reload(); }); this.goToOtherState(this.backRoute.name, this.backRoute.params).then(() => { this.$state.reload(); });
} }
else { else {
this.goToOtherState(this.backRoute.name, this.backRoute.params); this.goToOtherState(this.backRoute.name, this.backRoute.params);
} }
} }
private goBackToPreviousState(preferListOverSplit:boolean, baseRoute:string):void { private goBackToPreviousState(preferListOverSplit:boolean, baseRoute:string):void {
if (this.keepTab.isDetailsState(this.backRoute.parent)) { if (this.keepTab.isDetailsState(this.backRoute.parent)) {
this.goBackToDetailsState(preferListOverSplit, baseRoute); this.goBackToDetailsState(preferListOverSplit, baseRoute);
} else { } else {
this.goBackNotToDetailsState(); this.goBackNotToDetailsState();
} }
} }
@ -89,9 +85,9 @@ export class BackRoutingService {
if (!this.backRoute && baseRoute.includes('show')) { this.$state.reload(); } if (!this.backRoute && baseRoute.includes('show')) { this.$state.reload(); }
else { else {
if (!this.backRoute || this.backRoute.name.includes('new')) { if (!this.backRoute || this.backRoute.name.includes('new')) {
this.$state.go(baseRoute, this.$state.params); this.$state.go(baseRoute, this.$state.params);
} else { } else {
this.goBackToPreviousState(preferListOverSplit, baseRoute); this.goBackToPreviousState(preferListOverSplit, baseRoute);
} }
} }
} }

Loading…
Cancel
Save