Ga naar hoofdinhoud

CnCountTablesReport

CnCountTablesReport is an endpoint report about one record, drawn as name/count tables side by side: mail by sender, recipient and domain on a case; documents by author and type; any count of names. The reader names the record (prefilled with objectId) and chooses Show. The endpoint answers one list per table, each row a name and a count, plus the totals its sentence reads.

A refused or failed read shows the server's sentence and no counts, never the last answer. An answer whose emptyField is zero shows emptyText. With csvParam set, a Download CSV button asks the same endpoint for CSV.

Labels pass through the app's translate (cnTranslate), so they are written in the app's source language and translated there.

<template>
<CnCountTablesReport
url="/apps/dossiq/api/cases/{id}/reports/mail-parties"
title="Collected mail by sender, recipient and domain"
object-label="Case"
:lists="[
{ key: 'senders', label: 'Sender', nameField: 'address' },
{ key: 'recipients', label: 'Recipient', nameField: 'address' },
{ key: 'domains', label: 'Domain', nameField: 'domain' },
]"
totals="Mails collected: {mails}. Headers that could not be read: {unreadable}."
empty-field="mails"
empty-text="No mail collected on this case"
csv-param="format=csv"
note="A mail counts once for an address and once for a domain, also when it names them more than once." />
</template>

Props​

PropTypeDefaultMeaning
urlStringrequiredThe report endpoint, with {id} where the record goes
objectIdString''The record to prefill
listsArray[]{ key, label, nameField }: one table per list in the answer at key, rows named by nameField (default name)
totalsString''The sentence above the tables; {field} reads a field of the answer
emptyFieldString''The answer field whose zero means nothing to count; without it, all tables empty means nothing to count
csvParamString''The query that asks for CSV, such as format=csv; empty hides the download
emptyTextString''Shown when there is nothing to count
titleString''The heading
objectLabelString''The record field's label (default "Record")
countLabelString''The count column's heading (default "Count")
noteString''A closing sentence under the tables