salix/modules/ticket/front/note/index.html

60 lines
2.0 KiB
HTML
Raw Normal View History

<vn-crud-model
vn-id="model"
url="/ticket/api/TicketObservations"
fields="['id', 'ticketFk', 'observationTypeFk', 'description']"
link="{ticketFk: $ctrl.$stateParams.id}"
data="observations"
auto-load="true">
</vn-crud-model>
<vn-crud-model
url="/ticket/api/ObservationTypes"
data="observationTypes"
auto-load="true">
</vn-crud-model>
2018-03-16 14:06:42 +00:00
<vn-watcher
vn-id="watcher"
data="observations"
2018-03-16 14:06:42 +00:00
form="form">
</vn-watcher>
2018-12-14 11:56:21 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
2018-03-16 14:06:42 +00:00
<vn-card pad-large>
<vn-one margin-medium-top>
<vn-horizontal ng-repeat="observation in observations track by $index">
2018-03-16 14:06:42 +00:00
<vn-autocomplete
ng-attr-disabled="observation.id ? true : false"
field="observation.observationTypeFk"
data="observationTypes"
2018-03-16 14:06:42 +00:00
show-field="description"
label="Observation type" vn-one vn-focus>
2018-03-16 14:06:42 +00:00
</vn-autocomplete>
<vn-textfield
vn-two
margin-large-right
label="Description"
model="observation.description"
rule="ticketObservation.description">
2018-03-16 14:06:42 +00:00
</vn-textfield>
<vn-auto pad-medium-top>
<vn-icon-button
2018-03-16 14:06:42 +00:00
pointer
vn-tooltip="Remove note"
icon="delete"
ng-click="model.remove($index)">
</vn-icon-button>
2018-03-16 14:06:42 +00:00
</vn-auto>
</vn-horizontal>
</vn-one>
<vn-one>
<vn-icon-button
2019-02-10 21:52:35 +00:00
vn-tooltip="Add note"
icon="add_circle"
vn-bind="+"
ng-if="observationTypes.length > observations.length"
ng-click="model.insert()">
</vn-icon-button>
2018-03-16 14:06:42 +00:00
</vn-one>
</vn-card>
<vn-button-bar>
<vn-submit label="Save"></vn-submit>
</vn-button-bar>
</form>