Merge branch 'test' into footnotesSolve
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-05-11 12:16:17 +00:00
commit 5924a557e9
5 changed files with 14 additions and 12 deletions

View File

@ -139,7 +139,7 @@ export default class CrudModel extends ModelProxy {
filter.limit = this.page * this.limit;
}
return this.sendRequest(filter, append, true);
return this.sendRequest(filter, append);
}
clear() {
@ -231,12 +231,12 @@ export default class CrudModel extends ModelProxy {
return params;
}
sendRequest(filter, append, loadMore) {
sendRequest(filter, append) {
this.cancelRequest();
this.canceler = this.$q.defer();
this.isPaging = append;
if (!loadMore)
if (!append && this.status != 'ready')
this.status = 'loading';
let params = Object.assign(

View File

@ -150,7 +150,7 @@ describe('Component vnCrudModel', () => {
controller.loadMore(true);
expect(controller.sendRequest).toHaveBeenCalledWith({'skip': 2}, true, true);
expect(controller.sendRequest).toHaveBeenCalledWith({'skip': 2}, true);
});
});

View File

@ -7,11 +7,10 @@ export default class DataViewer {
}
get status() {
if (this.model)
return this.model.status;
if (this.isLoading)
return 'loading';
if (this.model)
return this.model.status;
if (!this.data)
return 'clear';
if (this.data.length)

View File

@ -14,9 +14,12 @@
order="changedModel"
auto-load="true">
</vn-crud-model>
<vn-data-viewer model="model" class="vn-w-md vn-px-sm">
<vn-data-viewer
model="model"
is-loading="model.isLoading"
class="vn-w-md vn-px-sm">
<div class="change vn-mb-sm" ng-repeat="log in $ctrl.logs">
<div class="user-wrapper">
<div class="left">
<vn-avatar class="vn-mt-xs"
ng-class="::{system: !log.user}"
val="{{::log.user ? log.user.nickname : 'System'}}"
@ -33,7 +36,7 @@
<div class="header vn-mb-sm">
<div
class="date text-secondary text-caption"
title="{{::log.creationDate | date:'dd/MM/yyyy HH:mm'}}">
title="{{::log.creationDate | date:'dd/MM/yyyy HH:mm:ss'}}">
{{::$ctrl.relativeDate(log.creationDate)}}
</div>
<span class="chip" ng-class="::$ctrl.actionsClass[log.action]" translate>

View File

@ -4,7 +4,7 @@ vn-log {
.change {
display: flex;
& > .user-wrapper {
& > .left {
position: relative;
padding-right: 10px;
@ -34,7 +34,7 @@ vn-log {
bottom: -8px;
}
}
&:last-child > .user-wrapper > .line {
&:last-child > .left > .line {
display: none;
}
.detail {