create greuge with intial data
This commit is contained in:
parent
b56ec520cf
commit
da3fd1672d
|
@ -11,7 +11,7 @@
|
||||||
<vn-title vn-one margin-large-bottom>Add Greuge</vn-title>
|
<vn-title vn-one margin-large-bottom>Add Greuge</vn-title>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-textfield vn-one margin-medium-right label="Importe" field="$ctrl.greuge.amount" type="number" vn-focus></vn-textfield>
|
<vn-textfield vn-one margin-medium-right label="Importe" field="$ctrl.greuge.amount" type="number" vn-focus></vn-textfield>
|
||||||
<vn-date-picker vn-one label="Date" model="$ctrl.greuge.shipped" today></vn-date-picker>
|
<vn-date-picker vn-one label="Date" model="$ctrl.greuge.shipped"></vn-date-picker>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-textfield vn-one margin-medium-right label="Comment" field="$ctrl.greuge.description"></vn-textfield>
|
<vn-textfield vn-one margin-medium-right label="Comment" field="$ctrl.greuge.description"></vn-textfield>
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../module';
|
||||||
|
|
||||||
class ClientGreugeCreate {
|
class ClientGreugeCreate {
|
||||||
constructor($scope, $state) {
|
constructor($scope, $state, $filter) {
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
this.$state = $state;
|
this.$state = $state;
|
||||||
this.greuge = {};
|
this.greuge = {
|
||||||
|
shipped: $filter('date')(new Date(), 'yyyy-MM-dd')
|
||||||
|
};
|
||||||
}
|
}
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.greuge.clientFk = this.$state.params.id;
|
this.greuge.clientFk = this.$state.params.id;
|
||||||
|
@ -15,7 +17,7 @@ class ClientGreugeCreate {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientGreugeCreate.$inject = ['$scope', '$state'];
|
ClientGreugeCreate.$inject = ['$scope', '$state', '$filter'];
|
||||||
|
|
||||||
ngModule.component('vnClientGreugeCreate', {
|
ngModule.component('vnClientGreugeCreate', {
|
||||||
template: require('./greuge-create.html'),
|
template: require('./greuge-create.html'),
|
||||||
|
|
Loading…
Reference in New Issue