Tarea #446 claim.development
This commit is contained in:
parent
0333ba96b0
commit
b5448aaa5a
|
@ -0,0 +1,114 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="claim/api/ClaimDevelopments"
|
||||
fields="['id', 'claimFk', 'claimReasonFk', 'claimResultFk', 'claimResponsibleFk', 'workerFk', 'claimRedeliveryFk']"
|
||||
link="{claimFk: $ctrl.$state.params.id}"
|
||||
filter="$ctrl.filter"
|
||||
data="claimDevelopments" on-data-change="$ctrl.onDataChange()">
|
||||
</vn-crud-model>
|
||||
<vn-crud-model
|
||||
url="claim/api/ClaimReasons"
|
||||
data="claimReasons"
|
||||
order="description">
|
||||
</vn-crud-model>
|
||||
<vn-crud-model
|
||||
url="claim/api/ClaimResults"
|
||||
data="claimResults"
|
||||
order="description">
|
||||
</vn-crud-model>
|
||||
<vn-crud-model
|
||||
url="claim/api/ClaimResponsibles"
|
||||
data="claimResponsibles"
|
||||
order="description">
|
||||
</vn-crud-model>
|
||||
<vn-crud-model
|
||||
url="/client/api/Clients/activeSalesPerson"
|
||||
data="activeSalesPersons"
|
||||
order="firstName">
|
||||
</vn-crud-model>
|
||||
<vn-crud-model
|
||||
url="claim/api/ClaimRedeliveries"
|
||||
data="claimRedeliveries"
|
||||
order="description">
|
||||
</vn-crud-model>
|
||||
<vn-watcher
|
||||
vn-id="watcher"
|
||||
data="claimDevelopments"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<vn-vertical>
|
||||
<vn-card pad-large>
|
||||
<vn-vertical>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()">
|
||||
<vn-title vn-two>Development</vn-title>
|
||||
<vn-horizontal ng-repeat="claimDevelopment in claimDevelopments">
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
vn-focus
|
||||
label="Reason"
|
||||
id="claimReason"
|
||||
field="claimDevelopment.claimReasonFk"
|
||||
data="claimReasons"
|
||||
select-fields="['id','description']"
|
||||
show-field="description">
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Result"
|
||||
id="claimResult"
|
||||
field="claimDevelopment.claimResultFk"
|
||||
data="claimResults"
|
||||
select-fields="['id','description']"
|
||||
show-field="description">
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Responsible"
|
||||
id="Responsible"
|
||||
field="claimDevelopment.claimResponsibleFk"
|
||||
data="claimResponsibles"
|
||||
select-fields="['id','description']"
|
||||
show-field="description">
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Worker"
|
||||
field="claimDevelopment.workerFk"
|
||||
data="activeSalesPersons"
|
||||
show-field="firstName"
|
||||
vn-acl="salesAssistant">
|
||||
<tpl-item>{{firstName}} {{name}}</tpl-item>
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Redelivery"
|
||||
id="redelivery"
|
||||
field="claimDevelopment.claimRedeliveryFk"
|
||||
data="claimResponsibles"
|
||||
select-fields="['id','description']"
|
||||
show-field="description">
|
||||
</vn-autocomplete>
|
||||
<vn-icon-button
|
||||
medium-grey
|
||||
margin-medium-v
|
||||
vn-tooltip="Remove tag"
|
||||
icon="remove_circle_outline"
|
||||
ng-click="model.remove($index)"
|
||||
tabindex="-1">
|
||||
</vn-icon-button>
|
||||
</vn-horizontal>
|
||||
</form>
|
||||
<vn-one pad-medium-top>
|
||||
<vn-icon-button
|
||||
vn-bind="+"
|
||||
vn-tooltip="Add tag"
|
||||
icon="add_circle"
|
||||
ng-click="model.insert()">
|
||||
</vn-icon-button>
|
||||
</vn-one>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
<vn-submit label="Save" ng-click="$ctrl.onSubmit()"></vn-submit>
|
||||
</vn-button-bar>
|
||||
</vn-vertical>
|
|
@ -0,0 +1,30 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
|
||||
class Controller {
|
||||
constructor($state, $scope, $http, $translate, vnApp) {
|
||||
this.$state = $state;
|
||||
this.$ = $scope;
|
||||
this.$http = $http;
|
||||
this.$translate = $translate;
|
||||
this.vnApp = vnApp;
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
this.$.watcher.check();
|
||||
this.$.model.save().then(() => {
|
||||
this.$.watcher.notifySaved();
|
||||
this.$.model.refresh();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$state', '$scope', '$http', '$translate', 'vnApp'];
|
||||
|
||||
ngModule.component('vnClaimDevelopment', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
claim: '<'
|
||||
}
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
Destination: Destino
|
||||
Development: Trazabilidad
|
||||
Reason: Motivo
|
||||
Result: Consecuencia
|
||||
Responsible: Responsable
|
||||
Worker: Trabajador
|
||||
Redelivery: Devolución
|
|
@ -5,7 +5,7 @@ import './basic-data';
|
|||
import './card';
|
||||
import './detail';
|
||||
import './descriptor';
|
||||
// import './development';
|
||||
import './development';
|
||||
import './index/';
|
||||
import './search-panel';
|
||||
// import './summary';
|
||||
|
|
Loading…
Reference in New Issue