2018-08-30 06:50:03 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="TicketObservations"
|
2018-08-30 06:50:03 +00:00
|
|
|
fields="['id', 'ticketFk', 'observationTypeFk', 'description']"
|
2020-03-18 07:35:59 +00:00
|
|
|
link="{ticketFk: $ctrl.$params.id}"
|
2018-12-19 14:59:35 +00:00
|
|
|
data="observations"
|
|
|
|
auto-load="true">
|
2018-08-30 06:50:03 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-crud-model
|
2019-10-24 22:53:53 +00:00
|
|
|
url="ObservationTypes"
|
2018-12-19 14:59:35 +00:00
|
|
|
data="observationTypes"
|
|
|
|
auto-load="true">
|
2018-08-30 06:50:03 +00:00
|
|
|
</vn-crud-model>
|
2018-03-16 14:06:42 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2018-08-30 06:50:03 +00:00
|
|
|
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">
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-one class="vn-mt-md">
|
2018-08-30 06:50:03 +00:00
|
|
|
<vn-horizontal ng-repeat="observation in observations track by $index">
|
2018-03-16 14:06:42 +00:00
|
|
|
<vn-autocomplete
|
2018-08-30 06:50:03 +00:00
|
|
|
ng-attr-disabled="observation.id ? true : false"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="observation.observationTypeFk"
|
2018-08-30 06:50:03 +00:00
|
|
|
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
|
2019-10-04 22:16:57 +00:00
|
|
|
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>
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-auto class="vn-pt-md">
|
2019-03-06 11:27:56 +00:00
|
|
|
<vn-icon-button
|
2018-03-16 14:06:42 +00:00
|
|
|
pointer
|
|
|
|
vn-tooltip="Remove note"
|
2018-12-11 07:50:54 +00:00
|
|
|
icon="delete"
|
2018-08-30 06:50:03 +00:00
|
|
|
ng-click="model.remove($index)">
|
2019-03-06 11:27:56 +00:00
|
|
|
</vn-icon-button>
|
2018-03-16 14:06:42 +00:00
|
|
|
</vn-auto>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-one>
|
|
|
|
<vn-one>
|
2018-04-19 12:46:06 +00:00
|
|
|
<vn-icon-button
|
2019-02-10 21:52:35 +00:00
|
|
|
vn-tooltip="Add note"
|
2018-05-22 09:44:24 +00:00
|
|
|
icon="add_circle"
|
2018-04-23 09:17:30 +00:00
|
|
|
vn-bind="+"
|
2018-08-30 06:50:03 +00:00
|
|
|
ng-if="observationTypes.length > observations.length"
|
|
|
|
ng-click="model.insert()">
|
2018-04-19 12:46:06 +00:00
|
|
|
</vn-icon-button>
|
2018-03-16 14:06:42 +00:00
|
|
|
</vn-one>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2020-12-16 09:21:20 +00:00
|
|
|
<vn-submit
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
|
|
|
<!-- # #2680 Undo changes button bugs -->
|
|
|
|
<!-- <vn-button
|
|
|
|
class="cancel"
|
|
|
|
label="Undo changes"
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
ng-click="watcher.loadOriginalData()">
|
|
|
|
</vn-button> -->
|
2018-03-16 14:06:42 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|