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

62 lines
2.0 KiB
HTML
Raw Normal View History

<vn-crud-model
vn-id="model"
url="TicketObservations"
fields="['id', 'ticketFk', 'observationTypeFk', 'description']"
link="{ticketFk: $ctrl.$stateParams.id}"
data="observations"
auto-load="true">
</vn-crud-model>
<vn-crud-model
url="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>
2019-11-10 10:08:44 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-one class="vn-mt-md">
<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"
2019-10-09 22:47:29 +00:00
ng-model="observation.observationTypeFk"
data="observationTypes"
2018-03-16 14:06:42 +00:00
show-field="description"
2019-10-11 15:38:04 +00:00
label="Observation type"
vn-one
vn-focus>
2018-03-16 14:06:42 +00:00
</vn-autocomplete>
<vn-textfield
vn-two
class="vn-mr-lg"
2018-03-16 14:06:42 +00:00
label="Description"
2019-10-09 22:47:29 +00:00
ng-model="observation.description"
2019-10-11 15:38:04 +00:00
rule="TicketObservation">
2018-03-16 14:06:42 +00:00
</vn-textfield>
<vn-auto class="vn-pt-md">
<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>