vnDataViewer
This commit is contained in:
parent
ac5d9b909b
commit
87add6cd33
|
@ -0,0 +1,25 @@
|
|||
<div ng-if="$ctrl.hasData">
|
||||
<div ng-transclude></div>
|
||||
<vn-pagination
|
||||
model="$ctrl.model">
|
||||
</vn-pagination>
|
||||
</div>
|
||||
<div
|
||||
class="empty-rows"
|
||||
ng-if="!$ctrl.hasData"
|
||||
ng-switch="$ctrl.status">
|
||||
<vn-spinner
|
||||
ng-switch-when="loading"
|
||||
enable="true">
|
||||
</vn-spinner>
|
||||
<span
|
||||
ng-switch-when="clear"
|
||||
translate>
|
||||
Enter a new search
|
||||
</span>
|
||||
<span
|
||||
ng-switch-when="empty"
|
||||
translate>
|
||||
No results
|
||||
</span>
|
||||
</div>
|
|
@ -0,0 +1,39 @@
|
|||
import ngModule from '../../module';
|
||||
import './style.scss';
|
||||
|
||||
export default class DataViewer {
|
||||
get computedData() {
|
||||
return this.data || (this.model && this.model.data);
|
||||
}
|
||||
|
||||
get computedLoading() {
|
||||
return this.isLoading || (this.model && this.model.isRefreshing);
|
||||
}
|
||||
|
||||
get hasData() {
|
||||
let data = this.computedData;
|
||||
return data && data.length;
|
||||
}
|
||||
|
||||
get status() {
|
||||
if (this.hasData)
|
||||
return null;
|
||||
if (this.computedLoading)
|
||||
return 'loading';
|
||||
if (this.computedData)
|
||||
return 'empty';
|
||||
else
|
||||
return 'clear';
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.component('vnDataViewer', {
|
||||
template: require('./index.html'),
|
||||
transclude: true,
|
||||
controller: DataViewer,
|
||||
bindings: {
|
||||
model: '<?',
|
||||
data: '<?',
|
||||
isLoading: '<?'
|
||||
}
|
||||
});
|
|
@ -0,0 +1,14 @@
|
|||
@import "variables";
|
||||
|
||||
vn-data-viewer {
|
||||
display: block;
|
||||
|
||||
& > .empty-rows {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 1.5em;
|
||||
box-sizing: border-box;
|
||||
color: $color-font-secondary;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
}
|
|
@ -37,6 +37,7 @@ import './calendar';
|
|||
import './check';
|
||||
import './chip';
|
||||
import './color-legend';
|
||||
import './data-viewer';
|
||||
import './input-number';
|
||||
import './input-time';
|
||||
import './input-file';
|
||||
|
|
|
@ -1,11 +1,2 @@
|
|||
<div class="table">
|
||||
<vn-empty-rows ng-if="$ctrl.isRefreshing">
|
||||
<vn-spinner enable="$ctrl.isRefreshing"></vn-spinner>
|
||||
</vn-empty-rows>
|
||||
<vn-empty-rows ng-if="$ctrl.model && !$ctrl.isRefreshing && !$ctrl.model.data">
|
||||
<span translate>Enter a new search</span>
|
||||
</vn-empty-rows>
|
||||
<vn-empty-rows ng-if="$ctrl.model && !$ctrl.isRefreshing && $ctrl.model.data.length == 0">
|
||||
<span translate>No results</span>
|
||||
</vn-empty-rows>
|
||||
<div class="table" ng-transclude>
|
||||
</div>
|
|
@ -8,18 +8,6 @@ export default class Table {
|
|||
this.field = null;
|
||||
this.order = null;
|
||||
this.autoLoad = true;
|
||||
|
||||
$transclude($scope.$parent, clone => {
|
||||
angular.element($element[0].querySelector('.table')).append(clone);
|
||||
});
|
||||
}
|
||||
|
||||
get isRefreshing() {
|
||||
return (this.model && this.model.isRefreshing);
|
||||
}
|
||||
|
||||
get isPaging() {
|
||||
return (this.model && this.model.isPaging);
|
||||
}
|
||||
|
||||
setOrder(field, order) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@import "./effects";
|
||||
|
||||
.vn-list {
|
||||
max-width: 36em;
|
||||
max-width: $width-sm;
|
||||
margin: 0 auto;
|
||||
|
||||
a.vn-list-item {
|
||||
|
|
|
@ -6,7 +6,7 @@ $mobile-width: 800px;
|
|||
// Width
|
||||
|
||||
$width-xs: 25em;
|
||||
$width-sm: 32em;
|
||||
$width-sm: 34em;
|
||||
$width-md: 50em;
|
||||
$width-lg: 80em;
|
||||
$width-xl: 100em;
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
form="form"
|
||||
save="patch">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<form
|
||||
name="form"
|
||||
ng-submit="$ctrl.onSubmit()"
|
||||
class="vn-w-md">
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
@ -73,7 +76,14 @@
|
|||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
<vn-submit label="Save" vn-acl="deliveryBoss"></vn-submit>
|
||||
<vn-button label="Undo changes" ng-if="watcher.dataChanged()" ng-click="watcher.loadOriginalData()"></vn-button>
|
||||
<vn-submit
|
||||
label="Save"
|
||||
vn-acl="deliveryBoss">
|
||||
</vn-submit>
|
||||
<vn-button
|
||||
label="Undo changes"
|
||||
ng-if="watcher.dataChanged()"
|
||||
ng-click="watcher.loadOriginalData()">
|
||||
</vn-button>
|
||||
</vn-button-bar>
|
||||
</form>
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<div class="main-with-right-menu">
|
||||
<div class="vn-list vn-w-sm">
|
||||
<vn-card ng-if="data.length">
|
||||
<vn-data-viewer
|
||||
data="data"
|
||||
is-loading="!data"
|
||||
class="vn-w-sm">
|
||||
<vn-card>
|
||||
<div class="vn-list">
|
||||
<a
|
||||
ng-repeat="row in data"
|
||||
translate-attr="{title: 'Edit'}"
|
||||
|
@ -52,14 +56,9 @@
|
|||
</vn-horizontal>
|
||||
</vn-horizontal>
|
||||
</a>
|
||||
</div>
|
||||
</vn-card>
|
||||
</div>
|
||||
<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-data-viewer>
|
||||
</div>
|
||||
<vn-side-menu side="right">
|
||||
<vn-zone-calendar
|
||||
|
|
|
@ -1,26 +1,25 @@
|
|||
<div class="main-with-right-menu">
|
||||
<vn-card ng-if="data.length" class="vn-w-xs">
|
||||
<vn-table>
|
||||
<vn-data-viewer
|
||||
data="data"
|
||||
is-loading="!data"
|
||||
class="vn-w-xs">
|
||||
<vn-card>
|
||||
<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(row.id)">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
<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(row.id)">
|
||||
</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-table>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
</div>
|
||||
<vn-side-menu side="right">
|
||||
<vn-zone-calendar
|
||||
|
|
|
@ -4,21 +4,24 @@
|
|||
filter="::$ctrl.filter"
|
||||
limit="20"
|
||||
data="zones"
|
||||
auto-load="false">
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div>
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar
|
||||
panel="vn-zone-search-panel"
|
||||
model="model"
|
||||
expr-builder="$ctrl.exprBuilder(param, value)"
|
||||
info="Search zone by id or name"
|
||||
vn-focus>
|
||||
</vn-searchbar>
|
||||
</vn-card>
|
||||
</div>
|
||||
<vn-card margin-medium-v margin-huge-bottom compact>
|
||||
<vn-card class="vn-w-sm pad-medium-h">
|
||||
<vn-searchbar
|
||||
panel="vn-zone-search-panel"
|
||||
model="model"
|
||||
expr-builder="$ctrl.exprBuilder(param, value)"
|
||||
info="Search zone by id or name"
|
||||
vn-focus>
|
||||
</vn-searchbar>
|
||||
</vn-card>
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md"
|
||||
margin-medium-top
|
||||
margin-huge-bottom>
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
|
@ -59,8 +62,8 @@
|
|||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
</div>
|
||||
<vn-dialog
|
||||
vn-id="summary"
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<vn-card ng-if="data.length" class="vn-w-xs">
|
||||
<vn-data-viewer
|
||||
data="data"
|
||||
is-loading="!data"
|
||||
class="vn-w-xs">
|
||||
<vn-card>
|
||||
<vn-table>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="row in data | orderBy:'warehouse.name'">
|
||||
|
@ -13,13 +17,8 @@
|
|||
</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-card>
|
||||
</vn-data-viewer>
|
||||
<vn-float-button
|
||||
icon="add"
|
||||
translate-attr="{title: 'Add'}"
|
||||
|
|
|
@ -6,69 +6,70 @@
|
|||
data="$ctrl.addresses"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div compact>
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card pad-medium>
|
||||
<div
|
||||
ng-repeat="address in $ctrl.addresses"
|
||||
class="address">
|
||||
<a
|
||||
ui-sref="client.card.address.edit({addressId: {{::address.id}}})"
|
||||
class="pad-small border-solid"
|
||||
ng-class="{'item-disabled': !address.isActive}"
|
||||
translate-attr="{title: 'Edit address'}"
|
||||
border-radius>
|
||||
<vn-none
|
||||
pad-small-right
|
||||
ng-click="$ctrl.onStarClick($event)">
|
||||
<vn-icon-button
|
||||
ng-if="$ctrl.isDefaultAddress(address)"
|
||||
icon="star"
|
||||
translate-attr="{title: 'Default address'}">
|
||||
</vn-icon-button>
|
||||
<vn-icon-button
|
||||
ng-if="!$ctrl.isDefaultAddress(address)"
|
||||
icon="star_border"
|
||||
ng-click="$ctrl.setDefault(address)"
|
||||
translate-attr="{title: 'Set as default'}">
|
||||
</vn-icon-button>
|
||||
</vn-none>
|
||||
<vn-one
|
||||
style="overflow: hidden; min-width: 14em;">
|
||||
<div class="ellipsize"><b>{{::address.nickname}}</b></div>
|
||||
<div class="ellipsize" name="street">{{::address.street}}</div>
|
||||
<div class="ellipsize">{{::address.city}}, {{::address.province.name}}</div>
|
||||
<div class="ellipsize">
|
||||
{{::address.phone}}<span ng-if="::address.mobile">, </span>
|
||||
{{::address.mobile}}
|
||||
</div>
|
||||
<vn-check
|
||||
vn-one label="Is equalizated"
|
||||
field="address.isEqualizated"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
<div
|
||||
ng-repeat="address in $ctrl.addresses"
|
||||
class="address">
|
||||
<a
|
||||
ui-sref="client.card.address.edit({addressId: {{::address.id}}})"
|
||||
class="pad-small border-solid"
|
||||
ng-class="{'item-disabled': !address.isActive}"
|
||||
translate-attr="{title: 'Edit address'}"
|
||||
border-radius>
|
||||
<vn-none
|
||||
pad-small-right
|
||||
ng-click="$ctrl.onStarClick($event)">
|
||||
<vn-icon-button
|
||||
ng-if="$ctrl.isDefaultAddress(address)"
|
||||
icon="star"
|
||||
translate-attr="{title: 'Default address'}">
|
||||
</vn-icon-button>
|
||||
<vn-icon-button
|
||||
ng-if="!$ctrl.isDefaultAddress(address)"
|
||||
icon="star_border"
|
||||
ng-click="$ctrl.setDefault(address)"
|
||||
translate-attr="{title: 'Set as default'}">
|
||||
</vn-icon-button>
|
||||
</vn-none>
|
||||
<vn-one
|
||||
style="overflow: hidden; min-width: 14em;">
|
||||
<div class="ellipsize"><b>{{::address.nickname}}</b></div>
|
||||
<div class="ellipsize" name="street">{{::address.street}}</div>
|
||||
<div class="ellipsize">{{::address.city}}, {{::address.province.name}}</div>
|
||||
<div class="ellipsize">
|
||||
{{::address.phone}}<span ng-if="::address.mobile">, </span>
|
||||
{{::address.mobile}}
|
||||
</div>
|
||||
<vn-check
|
||||
vn-one label="Is equalizated"
|
||||
field="address.isEqualizated"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
</vn-one>
|
||||
<vn-vertical
|
||||
vn-one
|
||||
ng-if="address.observations.length"
|
||||
border-solid-left
|
||||
pad-medium-h
|
||||
class="vn-hide-narrow"
|
||||
style="height: 6em; overflow: auto;">
|
||||
<vn-one ng-repeat="observation in address.observations track by $index" ng-class="{'pad-small-top': $index}">
|
||||
<b>{{::observation.observationType.description}}:</b>
|
||||
<span>{{::observation.description}}</span>
|
||||
</vn-one>
|
||||
<vn-vertical
|
||||
vn-one
|
||||
ng-if="address.observations.length"
|
||||
border-solid-left
|
||||
pad-medium-h
|
||||
class="vn-hide-narrow"
|
||||
style="height: 6em; overflow: auto;">
|
||||
<vn-one ng-repeat="observation in address.observations track by $index" ng-class="{'pad-small-top': $index}">
|
||||
<b>{{::observation.observationType.description}}:</b>
|
||||
<span>{{::observation.description}}</span>
|
||||
</vn-one>
|
||||
</vn-vertical>
|
||||
</a>
|
||||
</div>
|
||||
</vn-card>
|
||||
<vn-float-button
|
||||
vn-bind="+"
|
||||
fixed-bottom-right
|
||||
vn-tooltip="New address"
|
||||
ui-sref="client.card.address.create"
|
||||
icon="add"
|
||||
label="Add">
|
||||
</vn-float-button>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</div>
|
||||
</vn-vertical>
|
||||
</a>
|
||||
</div>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
<vn-float-button
|
||||
vn-bind="+"
|
||||
fixed-bottom-right
|
||||
vn-tooltip="New address"
|
||||
ui-sref="client.card.address.create"
|
||||
icon="add"
|
||||
label="Add">
|
||||
</vn-float-button>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
url="/client/api/receipts/filter"
|
||||
params="$ctrl.params"
|
||||
limit="20"
|
||||
data="$ctrl.balances">
|
||||
data="$ctrl.balances"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<vn-crud-model
|
||||
vn-id="riskModel"
|
||||
|
@ -11,7 +12,7 @@
|
|||
filter="$ctrl.filter"
|
||||
data="$ctrl.clientRisks">
|
||||
</vn-crud-model>
|
||||
<div>
|
||||
<div class="vn-w-lg">
|
||||
<vn-card class="pad-medium margin-medium-bottom">
|
||||
<vn-horizontal
|
||||
style="align-items: center;">
|
||||
|
@ -40,11 +41,12 @@
|
|||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-card>
|
||||
<vn-data-viewer model="model">
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th default-order>Date</vn-th>
|
||||
<vn-th>Date</vn-th>
|
||||
<vn-th>Creation date</vn-th>
|
||||
<vn-th>Employee</vn-th>
|
||||
<vn-th>Reference</vn-th>
|
||||
|
@ -97,8 +99,8 @@
|
|||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
</div>
|
||||
<vn-float-button
|
||||
vn-acl="administrative"
|
||||
|
|
|
@ -1,58 +1,55 @@
|
|||
<div class="vn-w-md">
|
||||
<vn-data-viewer
|
||||
data="$ctrl.classifications"
|
||||
class="vn-w-md">
|
||||
<vn-card pad-medium>
|
||||
<vn-horizontal
|
||||
ng-repeat="classification in $ctrl.classifications track by classification.id"
|
||||
class="pad-medium-bottom insurance"
|
||||
style="align-items: center;">
|
||||
<vn-one
|
||||
border-radius
|
||||
class="pad-small border-solid"
|
||||
ng-class="{'item-hightlight': !classification.finished,'item-disabled': classification.finished}">
|
||||
<vn-horizontal style="align-items: center;">
|
||||
<vn-none pad-medium-h>
|
||||
<vn-icon-button
|
||||
ng-if="!classification.finished"
|
||||
icon="lock"
|
||||
vn-tooltip="Close contract"
|
||||
ng-click="$ctrl.closeContract(classification)">
|
||||
</vn-icon-button>
|
||||
</vn-none>
|
||||
<vn-one border-solid-right>
|
||||
<div><vn-label translate>Since</vn-label> {{::classification.started | dateTime:'dd/MM/yyyy'}}</div>
|
||||
<div><vn-label translate>To</vn-label> {{classification.finished | dateTime:'dd/MM/yyyy'}}</div>
|
||||
</vn-one>
|
||||
<vn-vertical vn-one pad-medium-h>
|
||||
<vn-horizontal ng-repeat="insurance in classification.insurances track by insurance.id">
|
||||
<vn-one>
|
||||
<vn-label-value label="Credit"
|
||||
value="{{::insurance.credit}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-label-value label="Grade"
|
||||
value="{{::insurance.grade}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-label-value label="Date"
|
||||
value="{{::insurance.created | dateTime:'dd/MM/yyyy' }}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
<a vn-auto ui-sref="client.card.creditInsurance.insurance.index({classificationId: {{classification.id}}})">
|
||||
<vn-icon-button icon="desktop_windows" vn-tooltip="View credits"></vn-icon-button>
|
||||
</a>
|
||||
</vn-horizontal>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal ng-if="model.data.length == 0">
|
||||
<vn-one ad-small translate>
|
||||
No results
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal
|
||||
ng-repeat="classification in $ctrl.classifications track by classification.id"
|
||||
class="pad-medium-bottom insurance"
|
||||
style="align-items: center;">
|
||||
<vn-one
|
||||
border-radius
|
||||
class="pad-small border-solid"
|
||||
ng-class="{'item-hightlight': !classification.finished,'item-disabled': classification.finished}">
|
||||
<vn-horizontal style="align-items: center;">
|
||||
<vn-none pad-medium-h>
|
||||
<vn-icon-button
|
||||
ng-if="!classification.finished"
|
||||
icon="lock"
|
||||
vn-tooltip="Close contract"
|
||||
ng-click="$ctrl.closeContract(classification)">
|
||||
</vn-icon-button>
|
||||
</vn-none>
|
||||
<vn-one border-solid-right>
|
||||
<div><vn-label translate>Since</vn-label> {{::classification.started | dateTime:'dd/MM/yyyy'}}</div>
|
||||
<div><vn-label translate>To</vn-label> {{classification.finished | dateTime:'dd/MM/yyyy'}}</div>
|
||||
</vn-one>
|
||||
<vn-vertical vn-one pad-medium-h>
|
||||
<vn-horizontal ng-repeat="insurance in classification.insurances track by insurance.id">
|
||||
<vn-one>
|
||||
<vn-label-value label="Credit"
|
||||
value="{{::insurance.credit}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-label-value label="Grade"
|
||||
value="{{::insurance.grade}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-label-value label="Date"
|
||||
value="{{::insurance.created | dateTime:'dd/MM/yyyy' }}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
<a vn-auto ui-sref="client.card.creditInsurance.insurance.index({classificationId: {{classification.id}}})">
|
||||
<vn-icon-button icon="desktop_windows" vn-tooltip="View credits"></vn-icon-button>
|
||||
</a>
|
||||
</vn-horizontal>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
</div>
|
||||
</vn-data-viewer>
|
||||
<vn-float-button
|
||||
ng-if="$ctrl.canCreateNew()"
|
||||
vn-tooltip="New contract"
|
||||
|
|
|
@ -4,29 +4,32 @@
|
|||
filter="::$ctrl.filter"
|
||||
link="{clientFk: $ctrl.$stateParams.id}"
|
||||
limit="20"
|
||||
data="credits" auto-load="false">
|
||||
data="credits"
|
||||
order="created DESC"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div class="vn-w-md">
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="created" default-order="DESC">Since</vn-th>
|
||||
<vn-th>Employee</vn-th>
|
||||
<vn-th field="amount" number>Credit</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="credit in credits track by credit.id">
|
||||
<vn-td>{{::credit.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
|
||||
<vn-td>{{::credit.worker.user.nickname}}</vn-td>
|
||||
<vn-td number>{{::credit.amount | currency:'EUR':2}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="created">Since</vn-th>
|
||||
<vn-th field="workerFk">Employee</vn-th>
|
||||
<vn-th field="amount" number>Credit</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="credit in credits track by credit.id">
|
||||
<vn-td>{{::credit.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
|
||||
<vn-td>{{::credit.worker.user.nickname}}</vn-td>
|
||||
<vn-td number>{{::credit.amount | currency:'EUR':2}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</div>
|
||||
</vn-data-viewer>
|
||||
<vn-float-button
|
||||
icon="add"
|
||||
ui-sref="client.card.credit.create"
|
||||
|
|
|
@ -4,99 +4,102 @@
|
|||
link="{clientFk: $ctrl.$stateParams.id}"
|
||||
filter="::$ctrl.filter"
|
||||
limit="20"
|
||||
data="$ctrl.clientDms">
|
||||
data="$ctrl.clientDms"
|
||||
order="dmsFk DESC"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div class="vn-w-lg">
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-lg">
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="dmsFk" default-order="DESC" shrink>Id</vn-th>
|
||||
<vn-th field="dmsTypeFk" shrink>Type</vn-th>
|
||||
<vn-th field="hardCopyNumber" shrink number>Order</vn-th>
|
||||
<vn-th field="reference" shrink>Reference</vn-th>
|
||||
<vn-th expand>Description</vn-th>
|
||||
<vn-th field="hasFile" shrink>Original</vn-th>
|
||||
<vn-th shrink>File</vn-th>
|
||||
<vn-th shrink>Employee</vn-th>
|
||||
<vn-th field="created">Created</vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="document in $ctrl.clientDms">
|
||||
<vn-td number shrink>{{::document.dmsFk}}</vn-td>
|
||||
<vn-td shrink>
|
||||
<span title="{{::document.dms.dmsType.name}}">
|
||||
{{::document.dms.dmsType.name}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td shrink number>
|
||||
<span class="chip" title="{{::document.dms.hardCopyNumber}}"
|
||||
ng-class="{'message': document.dms.hardCopyNumber}">
|
||||
{{::document.dms.hardCopyNumber}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<span title="{{::document.dms.reference}}">
|
||||
{{::document.dms.reference}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td expand>
|
||||
<span title="{{::document.dms.description}}">
|
||||
{{::document.dms.description}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-check disabled="true"
|
||||
field="document.dms.hasFile">
|
||||
</vn-check>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<a target="_blank"
|
||||
title="{{'Download file' | translate}}"
|
||||
href="api/dms/{{::document.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}">{{::document.dms.file}}
|
||||
</a>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<span class="link"
|
||||
ng-click="$ctrl.showWorkerDescriptor($event, document.dms.workerFk)">
|
||||
{{::document.dms.worker.user.nickname | dashIfEmpty}}
|
||||
</span></vn-td>
|
||||
<vn-td>
|
||||
{{::document.dms.created | dateTime:'dd/MM/yyyy HH:mm'}}
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<a target="_blank"
|
||||
href="api/dms/{{::document.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}">
|
||||
<vn-icon-button
|
||||
icon="cloud_download"
|
||||
title="{{'Download file' | translate}}">
|
||||
</vn-icon-button>
|
||||
</a>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-icon-button ui-sref="client.card.dms.edit({dmsId: {{::document.dmsFk}}})"
|
||||
icon="edit"
|
||||
title="{{'Edit file' | translate}}">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="dmsFk" shrink>Id</vn-th>
|
||||
<vn-th field="dmsTypeFk" shrink>Type</vn-th>
|
||||
<vn-th field="hardCopyNumber" shrink number>Order</vn-th>
|
||||
<vn-th field="reference" shrink>Reference</vn-th>
|
||||
<vn-th expand>Description</vn-th>
|
||||
<vn-th field="hasFile" shrink>Original</vn-th>
|
||||
<vn-th shrink>File</vn-th>
|
||||
<vn-th shrink>Employee</vn-th>
|
||||
<vn-th field="created">Created</vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="document in $ctrl.clientDms">
|
||||
<vn-td number shrink>{{::document.dmsFk}}</vn-td>
|
||||
<vn-td shrink>
|
||||
<span title="{{::document.dms.dmsType.name}}">
|
||||
{{::document.dms.dmsType.name}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td shrink number>
|
||||
<span class="chip" title="{{::document.dms.hardCopyNumber}}"
|
||||
ng-class="{'message': document.dms.hardCopyNumber}">
|
||||
{{::document.dms.hardCopyNumber}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<span title="{{::document.dms.reference}}">
|
||||
{{::document.dms.reference}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td expand>
|
||||
<span title="{{::document.dms.description}}">
|
||||
{{::document.dms.description}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-check disabled="true"
|
||||
field="document.dms.hasFile">
|
||||
</vn-check>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<a target="_blank"
|
||||
title="{{'Download file' | translate}}"
|
||||
href="api/dms/{{::document.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}">{{::document.dms.file}}
|
||||
</a>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<span class="link"
|
||||
ng-click="$ctrl.showWorkerDescriptor($event, document.dms.workerFk)">
|
||||
{{::document.dms.worker.user.nickname | dashIfEmpty}}
|
||||
</span></vn-td>
|
||||
<vn-td>
|
||||
{{::document.dms.created | dateTime:'dd/MM/yyyy HH:mm'}}
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<a target="_blank"
|
||||
href="api/dms/{{::document.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}">
|
||||
<vn-icon-button
|
||||
icon="delete"
|
||||
ng-click="$ctrl.showDeleteConfirm($index)"
|
||||
title="{{'Remove file' | translate}}"
|
||||
tabindex="-1">
|
||||
icon="cloud_download"
|
||||
title="{{'Download file' | translate}}">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</a>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-icon-button ui-sref="client.card.dms.edit({dmsId: {{::document.dmsFk}}})"
|
||||
icon="edit"
|
||||
title="{{'Edit file' | translate}}">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-icon-button
|
||||
icon="delete"
|
||||
ng-click="$ctrl.showDeleteConfirm($index)"
|
||||
title="{{'Remove file' | translate}}"
|
||||
tabindex="-1">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
</div>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</vn-data-viewer>
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor">
|
||||
</vn-worker-descriptor-popover>
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
path="/client/api/greuges/{{$ctrl.$stateParams.id}}/sumAmount"
|
||||
options="mgEdit">
|
||||
</mg-ajax>
|
||||
<div class="vn-w-md">
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card
|
||||
ng-if="model.data.length > 0"
|
||||
style="text-align: right;"
|
||||
|
@ -43,8 +45,7 @@
|
|||
</vn-table>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</div>
|
||||
</vn-data-viewer>
|
||||
<vn-float-button
|
||||
icon="add"
|
||||
ui-sref="client.card.greuge.create"
|
||||
|
|
|
@ -17,50 +17,45 @@
|
|||
vn-focus>
|
||||
</vn-searchbar>
|
||||
</vn-card>
|
||||
<vn-card margin-medium-v>
|
||||
<a
|
||||
ng-repeat="client in clients track by client.id"
|
||||
ui-sref="client.card.summary({ id: {{::client.id}} })"
|
||||
translate-attr="{title: 'View client'}"
|
||||
class="vn-list-item searchResult">
|
||||
<vn-horizontal ng-click="$ctrl.onClick($event)">
|
||||
<vn-one>
|
||||
<h6>{{::client.name}}</h6>
|
||||
<vn-label-value label="Id"
|
||||
value="{{::client.id}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Phone"
|
||||
value="{{::client.phone | phone}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Town/City"
|
||||
value="{{::client.city}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Email"
|
||||
value="{{::client.email}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-horizontal class="buttons">
|
||||
<vn-icon-button
|
||||
ng-click="$ctrl.filterTickets(client, $event)"
|
||||
vn-tooltip="Client tickets"
|
||||
icon="icon-ticket">
|
||||
</vn-icon-button>
|
||||
<vn-icon-button
|
||||
ng-click="$ctrl.openSummary(client, $event)"
|
||||
vn-tooltip="Preview"
|
||||
icon="desktop_windows">
|
||||
</vn-icon-button>
|
||||
<vn-data-viewer model="model">
|
||||
<vn-card margin-medium-v>
|
||||
<a
|
||||
ng-repeat="client in clients track by client.id"
|
||||
ui-sref="client.card.summary({ id: {{::client.id}} })"
|
||||
translate-attr="{title: 'View client'}"
|
||||
class="vn-list-item searchResult">
|
||||
<vn-horizontal ng-click="$ctrl.onClick($event)">
|
||||
<vn-one>
|
||||
<h6>{{::client.name}}</h6>
|
||||
<vn-label-value label="Id"
|
||||
value="{{::client.id}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Phone"
|
||||
value="{{::client.phone | phone}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Town/City"
|
||||
value="{{::client.city}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Email"
|
||||
value="{{::client.email}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-horizontal class="buttons">
|
||||
<vn-icon-button
|
||||
ng-click="$ctrl.filterTickets(client, $event)"
|
||||
vn-tooltip="Client tickets"
|
||||
icon="icon-ticket">
|
||||
</vn-icon-button>
|
||||
<vn-icon-button
|
||||
ng-click="$ctrl.openSummary(client, $event)"
|
||||
vn-tooltip="Preview"
|
||||
icon="desktop_windows">
|
||||
</vn-icon-button>
|
||||
</vn-horizontal>
|
||||
</vn-horizontal>
|
||||
</vn-horizontal>
|
||||
</a>
|
||||
<vn-empty-rows translate ng-if="model.data.length === 0">
|
||||
No results
|
||||
</vn-empty-rows>
|
||||
<vn-empty-rows translate ng-if="model.data === null">
|
||||
Enter a new search
|
||||
</vn-empty-rows>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</a>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
</div>
|
||||
</div>
|
||||
<a ui-sref="client.create" vn-tooltip="New client" vn-bind="+" fixed-bottom-right>
|
||||
|
|
|
@ -5,30 +5,32 @@
|
|||
link="{clientFk: $ctrl.$stateParams.id}"
|
||||
limit="20"
|
||||
data="mandates"
|
||||
auto-load="false">
|
||||
order="created DESC"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div class="vn-w-md">
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="id" number>Id</vn-th>
|
||||
<vn-th field="companyFk">Company</vn-th>
|
||||
<vn-th field="mandateTypeFk">Type</vn-th>
|
||||
<vn-th field="created" default-order="DESC">Register date</vn-th>
|
||||
<vn-th field="finished">End date</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="mandate in mandates">
|
||||
<vn-td number>{{::mandate.id}}</vn-td>
|
||||
<vn-td>{{::mandate.company.code}}</vn-td>
|
||||
<vn-td>{{::mandate.mandateType.name}}</vn-td>
|
||||
<vn-td>{{::mandate.created | dateTime:'dd/MM/yyyy HH:mm' }}</vn-td>
|
||||
<vn-td>{{::mandate.finished | dateTime:'dd/MM/yyyy HH:mm' || '-'}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="id" number>Id</vn-th>
|
||||
<vn-th field="companyFk">Company</vn-th>
|
||||
<vn-th field="mandateTypeFk">Type</vn-th>
|
||||
<vn-th field="created">Register date</vn-th>
|
||||
<vn-th field="finished">End date</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="mandate in mandates">
|
||||
<vn-td number>{{::mandate.id}}</vn-td>
|
||||
<vn-td>{{::mandate.company.code}}</vn-td>
|
||||
<vn-td>{{::mandate.mandateType.name}}</vn-td>
|
||||
<vn-td>{{::mandate.created | dateTime:'dd/MM/yyyy HH:mm' }}</vn-td>
|
||||
<vn-td>{{::mandate.finished | dateTime:'dd/MM/yyyy HH:mm' || '-'}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</vn-vertical>
|
||||
</vn-data-viewer>
|
|
@ -6,7 +6,9 @@
|
|||
data="notes"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div class="vn-w-md">
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card pad-medium>
|
||||
<div class="note"
|
||||
ng-repeat="note in notes"
|
||||
|
@ -22,12 +24,8 @@
|
|||
{{::note.text}}
|
||||
</vn-horizontal>
|
||||
</div>
|
||||
<div ng-if="model.data.length == 0" ad-small translate>
|
||||
No results
|
||||
</div>
|
||||
</vn-card>
|
||||
</div>
|
||||
|
||||
</vn-data-viewer>
|
||||
<a vn-tooltip="New note"
|
||||
ui-sref="client.card.note.create({id: $ctrl.$stateParams.id})"
|
||||
vn-bind="+"
|
||||
|
|
|
@ -4,42 +4,44 @@
|
|||
link="{clientFk: $ctrl.$stateParams.id}"
|
||||
limit="20"
|
||||
data="recoveries"
|
||||
auto-load="false">
|
||||
order="started DESC"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div class="vn-w-md">
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th></vn-th>
|
||||
<vn-th field="started" default-order="DESC">Since</vn-th>
|
||||
<vn-th field="finished">To</vn-th>
|
||||
<vn-th field="amount" number>Amount</vn-th>
|
||||
<vn-th field="period" number>Period</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="recovery in recoveries">
|
||||
<vn-td>
|
||||
<vn-icon-button
|
||||
icon="lock"
|
||||
vn-acl="administrative"
|
||||
vn-acl-action="remove"
|
||||
vn-tooltip="Finish that recovery period"
|
||||
ng-if="!recovery.finished"
|
||||
ng-click="$ctrl.setFinished(recovery)">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
<vn-td>{{::recovery.started | dateTime:'dd/MM/yyyy' }}</vn-td>
|
||||
<vn-td>{{recovery.finished | dateTime:'dd/MM/yyyy' }}</vn-td>
|
||||
<vn-td number>{{::recovery.amount | currency: 'EUR': 0}}</vn-td>
|
||||
<vn-td number>{{::recovery.period}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th></vn-th>
|
||||
<vn-th field="started">Since</vn-th>
|
||||
<vn-th field="finished">To</vn-th>
|
||||
<vn-th field="amount" number>Amount</vn-th>
|
||||
<vn-th field="period" number>Period</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="recovery in recoveries">
|
||||
<vn-td>
|
||||
<vn-icon-button
|
||||
icon="lock"
|
||||
vn-acl="administrative"
|
||||
vn-acl-action="remove"
|
||||
vn-tooltip="Finish that recovery period"
|
||||
ng-if="!recovery.finished"
|
||||
ng-click="$ctrl.setFinished(recovery)">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
<vn-td>{{::recovery.started | dateTime:'dd/MM/yyyy' }}</vn-td>
|
||||
<vn-td>{{recovery.finished | dateTime:'dd/MM/yyyy' }}</vn-td>
|
||||
<vn-td number>{{::recovery.amount | currency: 'EUR': 0}}</vn-td>
|
||||
<vn-td number>{{::recovery.period}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</div>
|
||||
</vn-data-viewer>
|
||||
<vn-float-button
|
||||
icon="add"
|
||||
fixed-bottom-right
|
||||
|
|
|
@ -5,14 +5,17 @@
|
|||
link="{clientFk: $ctrl.$stateParams.id}"
|
||||
limit="20"
|
||||
data="samples"
|
||||
auto-load="false">
|
||||
order="created DESC"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div class="vn-w-md">
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="created" default-order="DESC">Sent</vn-th>
|
||||
<vn-th field="created">Sent</vn-th>
|
||||
<vn-th>Description</vn-th>
|
||||
<vn-th field="workerFk">Worker</vn-th>
|
||||
<vn-th field="companyFk">Company</vn-th>
|
||||
|
@ -36,14 +39,16 @@
|
|||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</div>
|
||||
</vn-data-viewer>
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor"
|
||||
worker-fk="$ctrl.selectedWorker">
|
||||
</vn-worker-descriptor-popover>
|
||||
<a ui-sref="client.card.sample.create" vn-tooltip="Send sample"
|
||||
vn-bind="+" fixed-bottom-right>
|
||||
<a
|
||||
ui-sref="client.card.sample.create"
|
||||
vn-tooltip="Send sample"
|
||||
vn-bind="+"
|
||||
fixed-bottom-right>
|
||||
<vn-float-button icon="add"></vn-float-button>
|
||||
</a>
|
||||
|
|
@ -3,50 +3,53 @@
|
|||
url="/client/api/clients/getTransactions"
|
||||
link="{clientFk: $ctrl.$stateParams.id}"
|
||||
limit="20"
|
||||
data="transactions" auto-load="false">
|
||||
data="transactions"
|
||||
order="created DESC"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div class="vn-w-md">
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th>State</vn-th>
|
||||
<vn-th field="id"number>Id</vn-th>
|
||||
<vn-th field="amount" number>Amount</vn-th>
|
||||
<vn-th field="created" default-order="DESC">Payed</vn-th>
|
||||
<vn-th>Confirm</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="transaction in transactions">
|
||||
<vn-td style="width: 3em; text-align: center">
|
||||
<vn-icon
|
||||
vn-tooltip="{{$ctrl.getFormattedMessage(transaction)}}"
|
||||
ng-show="::((transaction.errorMessage || transaction.responseMessage) && !transaction.isConfirmed)"
|
||||
icon="clear">
|
||||
</vn-icon>
|
||||
<vn-icon
|
||||
vn-tooltip="Confirmed"
|
||||
ng-show="::(transaction.isConfirmed)"
|
||||
icon="check">
|
||||
</vn-icon>
|
||||
</vn-td>
|
||||
<vn-td number>{{::transaction.id}}</vn-td>
|
||||
<vn-td number>{{::transaction.amount | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td>{{::transaction.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
|
||||
<vn-td style="width: 3em; text-align: center">
|
||||
<vn-icon-button
|
||||
icon="done_all"
|
||||
vn-acl="administrative"
|
||||
vn-acl-action="remove"
|
||||
vn-tooltip="Confirm transaction"
|
||||
ng-show="::!transaction.isConfirmed"
|
||||
ng-click="$ctrl.confirm(transaction)">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th shrink>State</vn-th>
|
||||
<vn-th field="id" number>Id</vn-th>
|
||||
<vn-th field="created">Date</vn-th>
|
||||
<vn-th field="amount" number>Amount</vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="transaction in transactions">
|
||||
<vn-td shrink>
|
||||
<vn-icon
|
||||
vn-tooltip="{{$ctrl.getFormattedMessage(transaction)}}"
|
||||
ng-show="::((transaction.errorMessage || transaction.responseMessage) && !transaction.isConfirmed)"
|
||||
icon="clear">
|
||||
</vn-icon>
|
||||
<vn-icon
|
||||
vn-tooltip="Confirmed"
|
||||
ng-show="::(transaction.isConfirmed)"
|
||||
icon="check">
|
||||
</vn-icon>
|
||||
</vn-td>
|
||||
<vn-td number>{{::transaction.id}}</vn-td>
|
||||
<vn-td>{{::transaction.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
|
||||
<vn-td number>{{::transaction.amount | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-icon-button
|
||||
icon="done_all"
|
||||
vn-acl="administrative"
|
||||
vn-acl-action="remove"
|
||||
translate-attr="{title: 'Confirm transaction'}"
|
||||
ng-show="::!transaction.isConfirmed"
|
||||
ng-click="$ctrl.confirm(transaction)">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</div>
|
||||
</vn-data-viewer>
|
|
@ -1,6 +1,5 @@
|
|||
Web Payment: Pago Web
|
||||
Confirmed: Confirmado
|
||||
Payed: Pagado
|
||||
Confirm transaction: Confirmar transacción
|
||||
Confirm: Confirmar
|
||||
State: Estado
|
|
@ -7,7 +7,9 @@
|
|||
limit="20"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<div>
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-lg">
|
||||
<vn-card>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
|
@ -95,7 +97,7 @@
|
|||
</vn-table>
|
||||
<vn-pagination model="model"></vn-pagination>
|
||||
</vn-card>
|
||||
</div>
|
||||
</vn-data-viewer>
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor"
|
||||
worker-fk="$ctrl.selectedWorker">
|
||||
|
|
Loading…
Reference in New Issue