diff --git a/modules/entry/front/buy/index.html b/modules/entry/front/buy/index.html new file mode 100644 index 000000000..af9eae30c --- /dev/null +++ b/modules/entry/front/buy/index.html @@ -0,0 +1,68 @@ + +
Entry #{{$ctrl.entryData.id}} - {{$ctrl.entryData.supplier.nickname}}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/modules/entry/front/buy/index.js b/modules/entry/front/buy/index.js new file mode 100644 index 000000000..36e353229 --- /dev/null +++ b/modules/entry/front/buy/index.js @@ -0,0 +1,35 @@ +import ngModule from '../module'; +import Component from 'core/lib/component'; + +class Controller extends Component { + constructor($element, $) { + super($element, $); + } + + get entry() { + return this._entry; + } + + set entry(value) { + this._entry = value; + + if (value && value.id) + this.getEntryData(); + } + + getEntryData() { + return this.$http.get(`/api/Entries/${this.entry.id}/getEntry`).then(response => { + this.entryData = response.data; + }); + } +} + +Controller.$inject = ['$element', '$scope']; + +ngModule.component('vnEntryBuy', { + template: require('./index.html'), + controller: Controller, + bindings: { + entry: '<' + } +}); diff --git a/modules/entry/front/buy/locale/es.yml b/modules/entry/front/buy/locale/es.yml new file mode 100644 index 000000000..8f2be1e44 --- /dev/null +++ b/modules/entry/front/buy/locale/es.yml @@ -0,0 +1 @@ +Buy: Lineas de entrada \ No newline at end of file diff --git a/modules/entry/front/index.js b/modules/entry/front/index.js index 0679b946b..f0c845b14 100644 --- a/modules/entry/front/index.js +++ b/modules/entry/front/index.js @@ -7,3 +7,4 @@ import './descriptor'; import './card'; import './summary'; import './log'; +import './buy'; diff --git a/modules/entry/front/routes.json b/modules/entry/front/routes.json index 92d893044..3dff61641 100644 --- a/modules/entry/front/routes.json +++ b/modules/entry/front/routes.json @@ -9,7 +9,8 @@ {"state": "entry.index", "icon": "icon-entry"} ], "card": [ - {"state": "entry.card.log", "icon": "history"} + {"state": "entry.card.log", "icon": "history"}, + {"state": "entry.card.buy", "icon": "icon-lines"} ] }, "routes": [ @@ -42,6 +43,14 @@ "state": "entry.card.log", "component": "vn-entry-log", "description": "Log" + }, { + "url" : "/buy", + "state": "entry.card.buy", + "component": "vn-entry-buy", + "description": "Buy", + "params": { + "entry": "$ctrl.entry" + } } ] } \ No newline at end of file