refs #5691 feat: cambiado url por data en los crudModel
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-06-13 08:16:37 +02:00
parent 983081a08e
commit fa9719de78
1 changed files with 35 additions and 20 deletions

View File

@ -1,11 +1,26 @@
<vn-auto-search
model="model">
</vn-auto-search>
<vn-crud-model
auto-load="true"
url="AgencyModes"
data="agencyModes">
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="Vehicles"
data="vehicles">
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="Workers/activeWithInheritedRole"
data="activeWithInheritedRole">
</vn-crud-model>
<div class="vn-w-xl">
<vn-card>
<smart-table
<smart-table
model="model"
options="$ctrl.smartTableOptions"
options="$ctrl.smartTableOptions"
expr-builder="$ctrl.exprBuilder(param, value)">
<slot-actions>
<section class="header">
@ -35,7 +50,7 @@
<thead>
<tr>
<th shrink>
<vn-multi-check
<vn-multi-check
model="model">
</vn-multi-check>
</th>
@ -52,19 +67,19 @@
<span translate>Vehicle</span>
</th>
<th field="created" shrink-date>
<span translate>Date</span>
<span translate>Date</span>
</th>
<th field="m3" number>
<span translate></span>
<span translate></span>
</th>
<th field="description">
<span translate>Description</span>
<span translate>Description</span>
</th>
<th field="started">
<span translate>Hour started</span>
<span translate>Hour started</span>
</th>
<th field="finished">
<span translate>Hour finished</span>
<span translate>Hour finished</span>
</th>
<th shrink></th>
</tr>
@ -74,7 +89,7 @@
class="clickable vn-tr search-result"
ng-attr-id="{{::route.id}}" vn-droppable="$ctrl.onDrop($event)">
<td shrink>
<vn-check
<vn-check
ng-model="route.checked"
vn-click-stop>
</vn-check>
@ -83,7 +98,7 @@
<td>
<vn-autocomplete
ng-model="route.workerFk"
url="Workers/activeWithInheritedRole"
data="activeWithInheritedRole"
show-field="nickname"
search-function="{firstName: $search}"
value-field="id"
@ -98,25 +113,25 @@
<td expand>
<vn-autocomplete
ng-model="route.agencyModeFk"
url="AgencyModes"
data="agencyModes"
show-field="name"
value-field="id"
on-change="$ctrl.updateAttributes(route)"
vn-click-stop>
</vn-autocomplete>
</td>
</td>
<td expand>
<vn-autocomplete
<vn-autocomplete
ng-model="route.vehicleFk"
url="Vehicles"
data="vehicles"
show-field="numberPlate"
value-field="id"
on-change="$ctrl.updateAttributes(route)"
vn-click-stop>
</vn-autocomplete>
</td >
<td>
<vn-date-picker
<td>
<vn-date-picker
ng-model="route.created"
on-change="$ctrl.updateAttributes(route)">
</vn-horizontal>
@ -156,7 +171,7 @@
</tbody>
</table>
</slot-table>
</smart-table>
</smart-table>
</vn-card>
</div>
@ -171,7 +186,7 @@
route="$ctrl.routeSelected">
</vn-route-ticket-popup>
<vn-worker-descriptor-popover
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
<vn-ticket-descriptor-popover
@ -194,7 +209,7 @@
</div>
<!-- Clonation dialog -->
<vn-dialog class="edit"
<vn-dialog class="edit"
vn-id="clonationDialog"
on-accept="$ctrl.cloneSelectedRoutes()"
message="Select the starting date">
@ -210,4 +225,4 @@
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Clone</button>
</tpl-buttons>
</vn-dialog>
</vn-dialog>