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

123 lines
4.2 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-title vn-two>Development</vn-title>
<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
label="Worker"
field="claimDevelopment.workerFk"
url="/client/api/Clients/activeWorkersWithRole"
search-function="{firstName: $search}"
where="{role: 'employee'}"
show-field="firstName"
value-field="id"
vn-acl="salesAssistant">
<tpl-item>{{firstName}} {{name}}</tpl-item>
</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
medium-grey
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>