Skip to content

Commit

Permalink
chore: display notifications
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <vitor@php.rio>
  • Loading branch information
vitormattos authored and backportbot-libresign[bot] committed Dec 29, 2024
1 parent 0440990 commit 0d1f8d8
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions src/views/Validation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<h1>{{ t('libresign', 'Signatories:') }}</h1>
</div>
<ul>
<span v-for="(signer, index) in document.signers"
:key="index">
<span v-for="(signer, signerIndex) in document.signers"
:key="signerIndex">
<NcListItem :name="getName(signer)"
:active="signer.opened"
@click="toggleDetail(signer)">
Expand Down Expand Up @@ -87,7 +87,7 @@
:name="t('libresign', 'Requested on:')">
<template #name>
<strong>{{ t('libresign', 'Requested on:')}}</strong>

Check warning on line 89 in src/views/Validation.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Expected 1 space before '}}', but not found
{{ formatDate(signer.request_sign_date) }}
{{ dateFromSqlAnsi(signer.request_sign_date) }}
</template>
</NcListItem>
<NcListItem v-if="signer.opened && signer.remote_address"
Expand All @@ -108,6 +108,22 @@
{{ signer.user_agent }}
</template>
</NcListItem>
<NcListItem v-if="signer.opened && signer.notify"
class="extra"
compact
:name="t('libresign', 'Notifications:')">
<template #name>
<strong>{{ t('libresign', 'Notifications:')}}</strong>

Check warning on line 116 in src/views/Validation.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Expected 1 space before '}}', but not found
</template>
<template #subname>
<ul>
<li v-for="(notify, notifyIndex) in signer.notify"
:key="notifyIndex">
<strong>{{ notify.method }}</strong>: {{ dateFromUnixTimestamp(notify.date) }}
</li>
</ul>
</template>
</NcListItem>
</span>
</ul>
</div>
Expand Down Expand Up @@ -203,9 +219,12 @@ export default {
}
},
methods: {
formatDate(date) {
dateFromSqlAnsi(date) {
return Moment(Date.parse(date)).format('LL LTS')
},
dateFromUnixTimestamp(date) {
return Moment(date * 1000).format('LL LTS')
},
toggleDetail(signer) {
this.$set(signer, 'opened', !signer.opened)
},
Expand Down

0 comments on commit 0d1f8d8

Please sign in to comment.