Merge pull request 'hotfix clientUnpaid' (!1381) from hotfix-clientUnpaid into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1381
This commit is contained in:
Joan Sanchez 2023-03-09 08:45:21 +00:00
commit 79428755db
4 changed files with 18 additions and 8 deletions

View File

@ -70,11 +70,12 @@
icon="icon-no036"
ng-if="$ctrl.client.isTaxDataChecked == false">
</vn-icon>
<vn-icon
<vn-icon-button
vn-tooltip="{{$ctrl.clientUnpaid()}}"
icon="icon-clientUnpaid"
ui-sref="client.card.unpaid"
ng-if="$ctrl.client.unpaid">
</vn-icon>
</vn-icon-button>
</div>
<div class="quicklinks">
<div ng-transclude="btnOne">

View File

@ -46,8 +46,9 @@ class Controller extends Descriptor {
}
clientUnpaid() {
return this.$t(`Unpaid Dated`, {dated: this.client.unpaid.dated}) +
'<br/>' + this.$t(`Unpaid Amount`, {amount: this.client.unpaid.amount});
return this.$t(`Unpaid`) + '<br/>'
+ this.$t(`Unpaid Dated`, {dated: this.client.unpaid.dated}) + '<br/>'
+ this.$t(`Unpaid Amount`, {amount: this.client.unpaid.amount});
}
}

View File

@ -9,7 +9,7 @@
</vn-watcher>
<form
name="form"
ng-submit="watcher.submit()"
ng-submit="$ctrl.onSubmit()"
class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-vertical>

View File

@ -6,9 +6,17 @@ export default class Controller extends Section {
if (hasData && !this.clientUnpaid.dated)
this.clientUnpaid.dated = Date.vnNew();
}
onSubmit() {
this.$.watcher.submit()
.then(() => this.card.reload());
}
}
ngModule.vnComponent('vnClientUnpaid', {
template: require('./index.html'),
controller: Controller
controller: Controller,
require: {
card: '^vnClientCard'
}
});