54 lines
1.6 KiB
HTML
54 lines
1.6 KiB
HTML
<vn-card
|
|
ng-if="data.length"
|
|
style="max-width: 25em; margin: 0 auto;">
|
|
<vn-table>
|
|
<vn-tbody>
|
|
<vn-tr ng-repeat="row in data | orderBy:'day'">
|
|
<vn-td>{{::row.day | dateTime:'dd/MM/yyyy'}}</vn-td>
|
|
<vn-td style="width: 1px; text-align: center">
|
|
<vn-icon-button
|
|
icon="delete"
|
|
translate-attr="{title: 'Delete'}"
|
|
ng-click="$ctrl.onDelete($index)">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
</vn-tr>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-card>
|
|
<vn-bg-title ng-if="!data">
|
|
<vn-spinner enable="true"></vn-spinner>
|
|
</vn-bg-title>
|
|
<vn-bg-title ng-if="data.length == 0" translate>
|
|
No records found
|
|
</vn-bg-title>
|
|
<vn-float-button
|
|
icon="add"
|
|
translate-attr="{title: 'Add'}"
|
|
vn-bind="+"
|
|
ng-click="$ctrl.onCreate()"
|
|
fixed-bottom-right>
|
|
</vn-float-button>
|
|
<vn-dialog
|
|
vn-id="dialog"
|
|
on-response="$ctrl.onSave(response)">
|
|
<tpl-body>
|
|
<vn-vertical>
|
|
<vn-date-picker
|
|
label="Day"
|
|
model="$ctrl.selected.day">
|
|
</vn-date-picker>
|
|
</vn-vertical>
|
|
</tpl-body>
|
|
<tpl-buttons>
|
|
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
|
|
<button response="ACCEPT" translate>Save</button>
|
|
</tpl-buttons>
|
|
</vn-dialog>
|
|
<vn-confirm
|
|
vn-id="confirm"
|
|
message="This item will be deleted"
|
|
question="Are you sure you want to continue?"
|
|
on-response="$ctrl.delete(response)">
|
|
</vn-confirm>
|