removed footer unused bindings and added date
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-07-19 10:57:08 +02:00
parent 4ed31f5172
commit 724da74204
3 changed files with 5 additions and 23 deletions

View File

@ -179,8 +179,7 @@
<!-- Footer block -->
<report-footer
id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind:left-text="dated"
v-bind="$props">
</report-footer>
</td>

View File

@ -4,15 +4,11 @@ const reportFooter = new Component('report-footer');
const rptCreditRequest = {
name: 'credit-request',
async serverPrefetch() {
this.client = await this.fetchClient(this.recipientId);
computed: {
dated: function() {
const filters = this.$options.filters;
if (!this.client)
throw new Error('Something went wrong');
},
methods: {
fetchClient(clientId) {
return this.findOneFromDef('client', [clientId]);
return filters.date(new Date(), '%d-%m-%Y');
}
},
components: {

View File

@ -1,13 +0,0 @@
SELECT
c.id,
c.socialName,
c.street,
c.postcode,
c.city,
c.fi,
p.name AS province,
ct.country
FROM client c
JOIN country ct ON ct.id = c.countryFk
LEFT JOIN province p ON p.id = c.provinceFk
WHERE c.id = ?