diff --git a/client/order/src/catalog/index.js b/client/order/src/catalog/index.js index 8d2a36227..a6b6e302b 100644 --- a/client/order/src/catalog/index.js +++ b/client/order/src/catalog/index.js @@ -2,9 +2,9 @@ import ngModule from '../module'; import './style.scss'; class Controller { - constructor($scope, $stateParams, $translate) { + constructor($scope, $state, $translate) { this.$scope = $scope; - this.$stateParams = $stateParams; + this.$state = $state; this.orderList = [ { order: 'relevancy DESC, name', @@ -54,9 +54,15 @@ class Controller { onDescriptorLoad() { this.$scope.popover.relocate(); } + + $onChanges() { + if (this.order && this.order.isConfirmed) { + this.$state.go('order.card.line'); + } + } } -Controller.$inject = ['$scope', '$stateParams', '$translate']; +Controller.$inject = ['$scope', '$state', '$translate']; ngModule.component('vnOrderCatalog', { template: require('./index.html'), diff --git a/client/order/src/catalog/style.scss b/client/order/src/catalog/style.scss index c100796fb..3849ff78b 100644 --- a/client/order/src/catalog/style.scss +++ b/client/order/src/catalog/style.scss @@ -1,18 +1,20 @@ @import "colors"; -.catalog-header { - border-color: $lines; - border-bottom: 1px solid rgba($lines, 0.5); - - vn-one:first-child { - padding-top: 2em; - } - - vn-one:nth-child(2) { - padding-top: 0.5em; - } - - span { - color: $secondary-font-color +vn-order-catalog { + .catalog-header { + border-color: $lines; + border-bottom: 1px solid rgba($lines, 0.5); + + vn-one:first-child { + padding-top: 2em; + } + + vn-one:nth-child(2) { + padding-top: 0.5em; + } + + span { + color: $secondary-font-color + } } } \ No newline at end of file