salix/client/ticket/src/note/ticket-observation.html

62 lines
2.4 KiB
HTML
Raw Normal View History

2018-03-16 14:06:42 +00:00
<vn-watcher
vn-id="watcher"
url="/ticket/api/Observation"
2018-03-16 14:06:42 +00:00
id-field="id"
data="$ctrl.address"
form="form">
</vn-watcher>
<form name="form" ng-submit="$ctrl.submit()">
<vn-card pad-large>
<vn-one margin-medium-top>
<vn-title>Notes</vn-title>
<mg-ajax path="/ticket/api/ObservationTypes" options="mgIndex as observationTypes"></mg-ajax>
<vn-horizontal ng-repeat="ticketObservation in $ctrl.ticketObservations track by $index">
<vn-autocomplete
ng-if="!ticketObservation.id"
vn-one
vn-focus
2018-03-16 14:06:42 +00:00
initial-data="ticketObservation.observationType"
field="ticketObservation.observationTypeFk"
data="observationTypes.model"
show-field="description"
label="Observation type">
</vn-autocomplete>
<vn-textfield
ng-if="ticketObservation.id"
vn-one
label="Observation type"
model="ticketObservation.observationType.description"
disabled="true">
</vn-textfield>
<vn-textfield
vn-two
margin-large-right
label="Description"
model="ticketObservation.description"
rule="ticketObservation.description">
2018-03-16 14:06:42 +00:00
</vn-textfield>
<vn-auto pad-medium-top>
<vn-icon
pointer
medium-grey
vn-tooltip="Remove note"
tooltip-position="left"
icon="remove_circle_outline"
ng-click="$ctrl.removeObservation($index)">
</vn-icon>
</vn-auto>
</vn-horizontal>
</vn-one>
<vn-one>
<vn-icon-button
pointer vn-tooltip="Add note"
tooltip-position="right" icon="add_circle"
2018-03-16 14:06:42 +00:00
ng-if="observationTypes.model.length > $ctrl.ticketObservations.length"
ng-click="$ctrl.addObservation()">
</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>