salix/modules/claim/front/development/index.html

120 lines
4.3 KiB
HTML

<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"
auto-load="true">
</vn-crud-model>
<vn-crud-model
url="claim/api/ClaimReasons"
data="claimReasons"
order="description"
auto-load="true">
</vn-crud-model>
<vn-crud-model
url="claim/api/ClaimResults"
data="claimResults"
order="description"
auto-load="true">
</vn-crud-model>
<vn-crud-model
url="claim/api/ClaimResponsibles"
data="claimResponsibles"
order="description"
auto-load="true">
</vn-crud-model>
<vn-crud-model
url="claim/api/ClaimRedeliveries"
data="claimRedeliveries"
order="description"
auto-load="true">
</vn-crud-model>
<vn-watcher
vn-id="watcher"
data="claimDevelopments"
form="form">
</vn-watcher>
<vn-vertical compact>
<vn-card pad-large>
<vn-vertical>
<form name="form" ng-submit="$ctrl.onSubmit()">
<vn-horizontal ng-repeat="claimDevelopment in claimDevelopments">
<vn-autocomplete
vn-one
vn-focus
label="Reason"
field="claimDevelopment.claimReasonFk"
data="claimReasons"
fields="['id', 'description']"
show-field="description"
vn-acl="salesAssistant">
</vn-autocomplete>
<vn-autocomplete
vn-one
label="Result"
field="claimDevelopment.claimResultFk"
data="claimResults"
fields="['id', 'description']"
show-field="description"
vn-acl="salesAssistant">
</vn-autocomplete>
<vn-autocomplete
vn-one
label="Responsible"
field="claimDevelopment.claimResponsibleFk"
data="claimResponsibles"
fields="['id', 'description']"
show-field="description"
vn-acl="salesAssistant">
</vn-autocomplete>
<vn-autocomplete
vn-one
field="claimDevelopment.workerFk"
url="/api/Clients/activeWorkersWithRole"
show-field="nickname"
search-function="{firstName: $search}"
value-field="id"
where="{role: 'employee'}"
label="Worker"
vn-acl="salesAssistant">
</vn-autocomplete>
<vn-autocomplete
vn-one
label="Redelivery"
field="claimDevelopment.claimRedeliveryFk"
data="claimRedeliveries"
fields="['id', 'description']"
show-field="description"
vn-acl="salesAssistant">
</vn-autocomplete>
<vn-icon-button
margin-medium-v
vn-tooltip="Remove sale"
icon="delete"
ng-click="model.remove($index)"
tabindex="-1"
vn-acl="salesAssistant">
</vn-icon-button>
</vn-horizontal>
</form>
<vn-one pad-medium-top>
<vn-icon-button
vn-bind="+"
vn-tooltip="Add sale"
icon="add_circle"
ng-click="model.insert()"
vn-acl="salesAssistant">
</vn-icon-button>
</vn-one>
</vn-vertical>
</vn-card>
<vn-button-bar>
<vn-submit
label="Save"
ng-click="$ctrl.onSubmit()"
vn-acl="salesAssistant">
</vn-submit>
</vn-button-bar>
</vn-vertical>