@conduction/nextcloud-vue 2.149.0 → 2.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +7 -2
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +40 -41
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js +12 -0
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js +6 -3
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js +13 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js +5 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +46 -0
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +64 -64
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +15 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue.js +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue2.js.map +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue3.js +16 -5
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +25 -2
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +82 -68
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue.js +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue.js +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue2.js.map +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue3.js +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/calendar/eventStatus.js +43 -2
- package/dist/esm/integrations/builtin/calendar/eventStatus.js.map +1 -1
- package/dist/esm/l10n/en.json.js +4 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +5 -2
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +707 -438
- package/dist/esm/utils/fillTemplate.js +19 -2
- package/dist/esm/utils/fillTemplate.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +926 -723
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +707 -438
- package/l10n/en.json +4 -1
- package/l10n/nl.json +5 -2
- package/package.json +1 -1
- package/src/components/CnActionDialog/CnActionDialog.vue +17 -4
- package/src/components/CnChartWidget/CnChartWidget.md +1 -1
- package/src/components/CnChartWidget/CnChartWidget.vue +12 -0
- package/src/components/CnConversationThread/CnConversationThread.vue +16 -2
- package/src/components/CnConversationThread/CnConversationWidget.vue +5 -1
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +47 -2
- package/src/components/CnObjectDataWidget/CnObjectDataWidget.md +1 -1
- package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +15 -1
- package/src/components/CnPlanWidget/CnPlanWidgetRow.vue +17 -2
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +45 -2
- package/src/components/CnRetentionWidget/CnRetentionWidget.vue +8 -1
- package/src/components/CnTimelineWidget/CnTimelineManage.vue +1 -1
- package/src/css/board.css +2 -0
- package/src/css/dialog.css +6 -0
- package/src/css/look-board-detail.css +137 -0
- package/src/css/look-board-index.css +5 -1
- package/src/css/look-board.css +78 -2
- package/src/integrations/builtin/calendar/eventStatus.js +42 -1
- package/src/utils/fillTemplate.js +19 -2
|
@@ -2,7 +2,7 @@ import script from './CnRetentionWidget.vue2.js';
|
|
|
2
2
|
import { render } from './CnRetentionWidget.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-0746dcfd";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnRetentionWidget.vue2.js","sources":["../../../../src/components/CnRetentionWidget/CnRetentionWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-retention\" data-testid=\"cn-retention\">\n\t\t<header class=\"cn-retention__head\">\n\t\t\t<div class=\"cn-retention__head-text\">\n\t\t\t\t<h3 class=\"cn-retention__title\">\n\t\t\t\t\t{{ text(content.title) || t('nextcloud-vue', 'Archiving') }}\n\t\t\t\t</h3>\n\t\t\t\t<p class=\"cn-retention__muted\">\n\t\t\t\t\t{{ text(content.subtitle) || t('nextcloud-vue', 'What happens to this record once it is closed') }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Recompute starts in the header (board DqZaakArchivering); the\n\t\t\t dialog asks for the reason OpenRegister records with it. -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"content.recompute !== false && !loading && !error\"\n\t\t\t\t:disabled=\"!mayRecompute || busy\"\n\t\t\t\t:title=\"mayRecompute ? undefined : t('nextcloud-vue', 'Recomputing needs the archivist role')\"\n\t\t\t\t:aria-description=\"mayRecompute ? undefined : t('nextcloud-vue', 'Recomputing needs the archivist role')\"\n\t\t\t\t:data-testid=\"mayRecompute ? 'cn-retention-recompute-open' : 'cn-retention-recompute-denied'\"\n\t\t\t\t@click=\"recomputeOpen = true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Refresh :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Recompute nomination') }}\n\t\t\t</NcButton>\n\t\t</header>\n\t\t<CnRetentionRecomputeDialog\n\t\t\tv-if=\"recomputeOpen\"\n\t\t\t:user=\"currentUid\"\n\t\t\t:busy=\"busy\"\n\t\t\t@close=\"recomputeOpen = false\"\n\t\t\t@confirm=\"recompute\" />\n\n\t\t<NcLoadingIcon v-if=\"loading\" :size=\"24\" />\n\t\t<NcEmptyContent v-else-if=\"error\"\n\t\t\t:name=\"t('nextcloud-vue', 'The archival facts are unavailable')\"\n\t\t\t:description=\"error\"\n\t\t\tdata-testid=\"cn-retention-error\">\n\t\t\t<template #action>\n\t\t\t\t<NcButton data-testid=\"cn-retention-retry\" @click=\"load\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Try again') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\n\t\t<template v-else>\n\t\t\t<p v-if=\"archived\" class=\"cn-retention__archived\" data-testid=\"cn-retention-archived\">\n\t\t\t\t{{ t('nextcloud-vue', 'Archived on {at} by {by}. {reason}', { at: String(archived.at ?? ''), by: String(archived.by ?? ''), reason: String(archived.reason ?? '') }) }}\n\t\t\t</p>\n\t\t\t<NcNoteCard v-if=\"disagrees\" type=\"warning\" data-testid=\"cn-retention-disagreement\">\n\t\t\t\t{{ t('nextcloud-vue', 'This record and OpenRegister do not agree on whether it is archived.') }}\n\t\t\t</NcNoteCard>\n\n\t\t\t<NcNoteCard v-if=\"nomination && nomination.status === 'unnominatable'\" type=\"warning\" data-testid=\"cn-retention-unnominatable\">\n\t\t\t\t{{ t('nextcloud-vue', 'Nothing could decide what happens to this record.') }}\n\t\t\t\t{{ String(nomination.unnominatableReason ?? '') }}\n\t\t\t</NcNoteCard>\n\t\t\t<div v-else-if=\"!nomination\" data-testid=\"cn-retention-pending\">\n\t\t\t\t<dl class=\"cn-retention__facts\">\n\t\t\t\t\t<div v-for=\"fact in pendingFacts\" :key=\"fact.key\" class=\"cn-retention__fact\">\n\t\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t\t<dd>{{ fact.value }}</dd>\n\t\t\t\t\t</div>\n\t\t\t\t</dl>\n\t\t\t\t<NcNoteCard type=\"info\">\n\t\t\t\t\t{{ text(content.pendingNote) || t('nextcloud-vue', 'This record has not been closed yet. Its archival future is recorded when it closes.') }}\n\t\t\t\t</NcNoteCard>\n\t\t\t</div>\n\t\t\t<dl v-else class=\"cn-retention__facts\" data-testid=\"cn-retention-facts\">\n\t\t\t\t<div v-for=\"fact in facts\" :key=\"fact.key\" class=\"cn-retention__fact\">\n\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t<dd :data-testid=\"`cn-retention-${fact.key}`\">\n\t\t\t\t\t\t{{ fact.value }}\n\t\t\t\t\t</dd>\n\t\t\t\t</div>\n\t\t\t</dl>\n\n\t\t\t<section v-if=\"content.legalHold\" class=\"cn-retention__section\" data-testid=\"cn-retention-hold\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Kept for a procedure') }}\n\t\t\t\t</component>\n\t\t\t\t<ul class=\"cn-retention__rows\">\n\t\t\t\t\t<li v-for=\"hold in holds\" :key=\"hold.id\" class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark cn-retention__mark--hold\" aria-hidden=\"true\">LH</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ hold.reason || t('nextcloud-vue', 'Legal hold') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ t('nextcloud-vue', 'Placed on {date} by {by}', { date: hold.placedDate, by: hold.placedBy }) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"t('nextcloud-vue', 'Active')\" variant=\"warning\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li v-if=\"holds.length === 0\" class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark cn-retention__mark--hold\" aria-hidden=\"true\">LH</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ t('nextcloud-vue', 'No legal hold') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ t('nextcloud-vue', 'If an objection or appeal runs, destruction is suspended') }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"t('nextcloud-vue', 'None')\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<section v-if=\"content.transfer\" class=\"cn-retention__section\" data-testid=\"cn-retention-transfer\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Transfer to the e-Depot') }}\n\t\t\t\t</component>\n\t\t\t\t<ul class=\"cn-retention__rows\">\n\t\t\t\t\t<li class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark\" aria-hidden=\"true\">ED</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ transfers ? t('nextcloud-vue', 'Goes to the e-Depot') : t('nextcloud-vue', 'Not applicable') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ transfers ? t('nextcloud-vue', 'After the retention period the record is transferred') : t('nextcloud-vue', 'Only records appraised to keep go to the e-Depot') }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"transfers ? t('nextcloud-vue', 'Transfer') : t('nextcloud-vue', 'No transfer')\" :variant=\"transfers ? 'info' : 'default'\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<div v-if=\"outcome\" class=\"cn-retention__outcome\" data-testid=\"cn-retention-outcome\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Outcome') }}\n\t\t\t\t</component>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Handed over as {kind} on {at} by {by}.', { kind: String(outcome.kind ?? ''), at: String(outcome.at ?? ''), by: String(outcome.by ?? '') }) }}</p>\n\t\t\t\t<p v-if=\"outcome.transferListUuid\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Transfer list') }}: {{ outcome.transferListUuid }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton, NcEmptyContent, NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'\nimport Refresh from 'vue-material-design-icons/Refresh.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\nimport CnRetentionRecomputeDialog from './CnRetentionRecomputeDialog.vue'\nimport innerHeading from '../../mixins/innerHeading.js'\nimport { parseDuration } from '../../utils/isoDuration.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'\n\n/**\n * CnRetentionWidget — the `retention` detail widget: what happens to a\n * record when its business use ends, as OpenRegister decided it. Every value\n * is read off the record's `@self._retention` (appraisal, disposal date,\n * retention period, selection list row, the rule and when it was written)\n * and `@self.archived`; the widget derives nothing, so it can never disagree\n * with the stored decision. A failed read is an error with a retry, never an\n * empty block. A record nothing could nominate is drawn apart from one that\n * is not closed yet. An archivist (or an admin) may ask OpenRegister to\n * recompute the nomination, with a reason. Any app on OpenRegister uses it;\n * dossiq's case Archiving tab is the first.\n *\n * `content`:\n * - `title`, `subtitle`: texts, through the host translate.\n * - `statusField`, `archivedValues`: a record field and the values that mean\n * archived (`archiveStatus`, `[\"archived\", ...]`); when set, a mismatch with\n * `@self.archived` is said out loud.\n * - `archivistGroups`: groups that may recompute (default `[\"archivaris\"]`;\n * admins always may); `recompute: false` hides the control.\n * - `expected`: before the record closes, the outcome its type expects.\n * `source: { register, schema, filter }` lists the candidate rules (a case\n * type's result types, `filter` tokens such as `@object.caseType`\n * resolved against the record); `fields: { appraisal, period,\n * selectionListRow }` names their fields; `appraisalLabels` names the\n * appraisal values; `periodText` writes the period (`{period} after the\n * decision`); `decidedBy` says who decides. When the candidates agree the\n * facts show that outcome, otherwise \"Depends on the result\". A failed\n * read keeps the plain facts.\n * - `pendingNote`: the note under the facts of a record not closed yet.\n * - `legalHold: true`: a section with the record's active legal holds\n * (`@self._retention.legalHold.holds`), or that none applies.\n * - `transfer: { keepValues }`: a section saying whether the record goes to\n * the e-Depot, from the stored or expected appraisal.\n *\n * The record is read fresh from OpenRegister by `register`, `schema` and\n * `objectId` (props, else the bound record's `@self`).\n */\nexport default {\n\tname: 'CnRetentionWidget',\n\n\tcomponents: { CnRetentionRecomputeDialog, CnStatusBadge, NcButton, NcEmptyContent, NcLoadingIcon, NcNoteCard, Refresh },\n\n\tmixins: [innerHeading],\n\n\tinject: {\n\t\t/** The host app's translate (CnAppRoot `cnTranslate`). */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's configuration (see the component docs).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The bound record, on a detail page.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The record's register (else the bound record's `@self.register`). */\n\t\tregister: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The record's schema (else the bound record's `@self.schema`); a schema object gives its slug.\n\t\t *\n\t\t * @type {string|number|object}\n\t\t */\n\t\tschema: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's id (else the bound record's). */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: true,\n\t\t\terror: '',\n\t\t\trecord: null,\n\t\t\t/** Whether the recompute dialog is open. */\n\t\t\trecomputeOpen: false,\n\t\t\tbusy: false,\n\t\t\t/** The candidate rules `content.expected` reads, null until read or when unreadable. */\n\t\t\texpectedRows: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {object} The bound record's `@self`. */\n\t\tboundSelf() {\n\t\t\treturn (this.objectData && this.objectData['@self']) || {}\n\t\t},\n\n\t\t/** @return {string} The record id. */\n\t\tid() {\n\t\t\treturn String(this.objectId || (this.objectData && this.objectData.id) || this.boundSelf.id || '')\n\t\t},\n\n\t\t/** @return {string} The register. */\n\t\tregisterRef() {\n\t\t\treturn String(this.register || this.boundSelf.register || '')\n\t\t},\n\n\t\t/** @return {string} The schema. */\n\t\tschemaRef() {\n\t\t\tconst s = this.schema || this.boundSelf.schema || ''\n\t\t\treturn String(typeof s === 'object' ? (s.slug || s.id || '') : s)\n\t\t},\n\n\t\t/** @return {object} The record's `@self`. */\n\t\tself() {\n\t\t\treturn (this.record && this.record['@self']) || {}\n\t\t},\n\n\t\t/** @return {object|null} OpenRegister's stored retention decision. */\n\t\tretention() {\n\t\t\treturn this.self._retention || null\n\t\t},\n\n\t\t/** @return {object|null} The nomination. */\n\t\tnomination() {\n\t\t\treturn (this.retention && this.retention.nomination) || null\n\t\t},\n\n\t\t/** @return {object|null} The hand-over outcome. */\n\t\toutcome() {\n\t\t\treturn (this.retention && this.retention.outcome) || null\n\t\t},\n\n\t\t/** @return {object|null} OpenRegister's archived marker. */\n\t\tarchived() {\n\t\t\treturn this.self.archived || null\n\t\t},\n\n\t\t/**\n\t\t * Whether the record's own field and the platform marker disagree.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {boolean}\n\t\t */\n\t\tdisagrees() {\n\t\t\tconst field = this.content.statusField\n\t\t\tif (!field || !this.record) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst values = Array.isArray(this.content.archivedValues) ? this.content.archivedValues.map(String) : ['archived']\n\t\t\tconst saysArchived = values.includes(String(readPath(this.record, field) ?? ''))\n\t\t\treturn saysArchived !== Boolean(this.archived)\n\t\t},\n\n\t\t/**\n\t\t * The stored facts that have a value, in reading order.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {Array<{key: string, label: string, value: string}>}\n\t\t */\n\t\tfacts() {\n\t\t\tconst r = this.retention || {}\n\t\t\tconst n = this.nomination || {}\n\t\t\treturn [\n\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: r.appraisal },\n\t\t\t\t{ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: r.disposalDate },\n\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: r.retentionPeriod },\n\t\t\t\t{ key: 'selection-list-row', label: t('nextcloud-vue', 'Selection list row'), value: r.selectionListRow },\n\t\t\t\t{ key: 'rule', label: t('nextcloud-vue', 'Decided by'), value: n.rule },\n\t\t\t\t{ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: n.at },\n\t\t\t].filter((fact) => fact.value !== undefined && fact.value !== null && fact.value !== '').map((fact) => ({ ...fact, value: String(fact.value) }))\n\t\t},\n\n\t\t/**\n\t\t * The outcome the record's type expects before it closes: the agreed\n\t\t * appraisal, period and selection list row of the candidate rules, or\n\t\t * `mixed` when they disagree; null when nothing was read.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {{appraisal: string, period: string, selectionListRow: string, mixed: boolean}|null}\n\t\t */\n\t\texpectedOutcome() {\n\t\t\tconst rows = this.expectedRows\n\t\t\tif (!Array.isArray(rows) || rows.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst fields = { appraisal: 'appraisal', period: 'period', selectionListRow: 'selectionListRow', ...(this.content.expected?.fields || {}) }\n\t\t\tconst pick = (row, key) => String(readPath(row, fields[key]) ?? '')\n\t\t\tconst outcomes = rows.map((row) => ({ appraisal: pick(row, 'appraisal'), period: pick(row, 'period'), selectionListRow: pick(row, 'selectionListRow') }))\n\t\t\tconst first = outcomes[0]\n\t\t\tconst agree = outcomes.every((o) => o.appraisal === first.appraisal && o.period === first.period)\n\t\t\tif (first.appraisal === '' && first.period === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn agree\n\t\t\t\t? { ...first, selectionListRow: outcomes.every((o) => o.selectionListRow === first.selectionListRow) ? first.selectionListRow : '', mixed: false }\n\t\t\t\t: { appraisal: '', period: '', selectionListRow: '', mixed: true }\n\t\t},\n\n\t\t/**\n\t\t * The facts of a record not closed yet: the expected outcome where the\n\t\t * type gives one, \"decided when it closes\" otherwise.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {Array<{key: string, label: string, value: string}>}\n\t\t */\n\t\tpendingFacts() {\n\t\t\tconst atClosure = t('nextcloud-vue', 'Decided when it closes')\n\t\t\tconst expected = this.expectedOutcome\n\t\t\tif (!expected) {\n\t\t\t\treturn [\n\t\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: atClosure },\n\t\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: atClosure },\n\t\t\t\t\t{ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: atClosure },\n\t\t\t\t\t{ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: t('nextcloud-vue', 'Not yet') },\n\t\t\t\t]\n\t\t\t}\n\t\t\tconst depends = t('nextcloud-vue', 'Depends on the result')\n\t\t\tconst config = this.content.expected || {}\n\t\t\tconst facts = [\n\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: expected.mixed ? depends : this.appraisalLabel(expected.appraisal) },\n\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: expected.mixed ? depends : this.periodLabel(expected.period) },\n\t\t\t]\n\t\t\tif (expected.selectionListRow) {\n\t\t\t\tfacts.push({ key: 'selection-list-row', label: t('nextcloud-vue', 'Selection list row'), value: expected.selectionListRow })\n\t\t\t}\n\t\t\tfacts.push({ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: atClosure })\n\t\t\tif (config.decidedBy) {\n\t\t\t\tfacts.push({ key: 'rule', label: t('nextcloud-vue', 'Decided by'), value: this.text(config.decidedBy) })\n\t\t\t}\n\t\t\tfacts.push({ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: t('nextcloud-vue', 'Not yet') })\n\t\t\treturn facts.filter((fact) => fact.value !== '')\n\t\t},\n\n\t\t/** @return {Array<{id: string, reason: string, placedBy: string, placedDate: string}>} The active legal holds. */\n\t\tholds() {\n\t\t\tconst hold = (this.retention && this.retention.legalHold) || {}\n\t\t\tconst list = Array.isArray(hold.holds) ? hold.holds : []\n\t\t\treturn list.map((h, index) => ({ id: String(h.id ?? index), reason: String(h.reason ?? ''), placedBy: String(h.placedBy ?? ''), placedDate: String(h.placedDate ?? '') }))\n\t\t},\n\n\t\t/**\n\t\t * Whether the record goes to the e-Depot: its stored appraisal, else\n\t\t * the expected one, is one of `transfer.keepValues`.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\ttransfers() {\n\t\t\tconst keep = Array.isArray(this.content.transfer?.keepValues) ? this.content.transfer.keepValues.map(String) : ['bewaren', 'blijvend_bewaren', 'retain', 'keep']\n\t\t\tconst stored = this.retention && this.retention.appraisal\n\t\t\tconst appraisal = stored || (this.expectedOutcome && !this.expectedOutcome.mixed ? this.expectedOutcome.appraisal : '')\n\t\t\treturn keep.includes(String(appraisal || ''))\n\t\t},\n\n\t\t/** @return {string} The signed-in user's id. */\n\t\tcurrentUid() {\n\t\t\tconst user = getCurrentUser()\n\t\t\treturn String((user && user.uid) || '')\n\t\t},\n\n\t\t/**\n\t\t * Whether this user may recompute: an admin or an archivist group member.\n\t\t * Shown disabled otherwise, so the user learns which role it needs.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tmayRecompute() {\n\t\t\tconst user = getCurrentUser()\n\t\t\tif (user && user.isAdmin === true) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tconst groups = Array.isArray(user && user.groups) ? user.groups : []\n\t\t\tconst allowed = Array.isArray(this.content.archivistGroups) ? this.content.archivistGroups : ['archivaris']\n\t\t\treturn allowed.some((g) => groups.includes(g))\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.load()\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * A config text through the host translate.\n\t\t *\n\t\t * @param {unknown} value The text.\n\t\t * @return {string}\n\t\t */\n\t\ttext(value) {\n\t\t\treturn typeof value === 'string' && value !== '' ? this.cnTranslate(value) : ''\n\t\t},\n\n\t\t/**\n\t\t * An appraisal value in words, through `expected.appraisalLabels`.\n\t\t *\n\t\t * @param {string} value The stored value.\n\t\t * @return {string}\n\t\t */\n\t\tappraisalLabel(value) {\n\t\t\tconst labels = this.content.expected?.appraisalLabels || {}\n\t\t\treturn labels[value] ? this.text(labels[value]) : value\n\t\t},\n\n\t\t/**\n\t\t * An ISO period in words (\"5 years\"), placed in `expected.periodText`.\n\t\t *\n\t\t * @param {string} value The ISO 8601 duration.\n\t\t * @return {string}\n\t\t */\n\t\tperiodLabel(value) {\n\t\t\tconst parsed = parseDuration(value)\n\t\t\tconst words = parsed\n\t\t\t\t? {\n\t\t\t\t\t\tyears: () => n('nextcloud-vue', '%n year', '%n years', parsed.amount),\n\t\t\t\t\t\tmonths: () => n('nextcloud-vue', '%n month', '%n months', parsed.amount),\n\t\t\t\t\t\tweeks: () => n('nextcloud-vue', '%n week', '%n weeks', parsed.amount),\n\t\t\t\t\t\tdays: () => n('nextcloud-vue', '%n day', '%n days', parsed.amount),\n\t\t\t\t\t}[parsed.unit]\n\t\t\t\t: null\n\t\t\tconst period = words ? words() : value\n\t\t\tconst template = this.content.expected?.periodText\n\t\t\treturn template ? this.text(template).replace('{period}', period) : period\n\t\t},\n\n\t\t/**\n\t\t * Read the record fresh from OpenRegister; a failure is an error, never an empty block.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync load() {\n\t\t\tthis.loading = true\n\t\t\tthis.error = ''\n\t\t\ttry {\n\t\t\t\tif (!this.registerRef || !this.schemaRef || !this.id) {\n\t\t\t\t\tthrow new Error(t('nextcloud-vue', 'This widget has no record to read.'))\n\t\t\t\t}\n\t\t\t\tconst { data } = await axios.get(generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(this.registerRef)}/${encodeURIComponent(this.schemaRef)}/${encodeURIComponent(this.id)}`))\n\t\t\t\tthis.record = data && typeof data === 'object' ? data : null\n\t\t\t\tawait this.loadExpected()\n\t\t\t} catch (failure) {\n\t\t\t\tconst body = failure && failure.response && failure.response.data\n\t\t\t\tthis.error = String((body && (body.message || body.error)) || (failure && failure.message) || failure)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Read the candidate rules `content.expected` names, for a record that\n\t\t * is not nominated yet. A failure leaves the plain pending facts.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadExpected() {\n\t\t\tconst source = this.content.expected && this.content.expected.source\n\t\t\tthis.expectedRows = null\n\t\t\tif (!source || !source.register || !source.schema || this.nomination) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst filter = resolveFilterTokens(source.filter || {}, { objectId: this.id, object: this.record })\n\t\t\tif (hasUnresolvedTokens(filter)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.get(generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(source.register)}/${encodeURIComponent(source.schema)}`), { params: { ...filter, _limit: 100 } })\n\t\t\t\tthis.expectedRows = Array.isArray(data?.results) ? data.results : []\n\t\t\t} catch {\n\t\t\t\tthis.expectedRows = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Ask OpenRegister to derive the nomination again with the reason the\n\t\t * dialog asked for, then read it back.\n\t\t *\n\t\t * @spec openspec/changes/retention-recompute-header/specs/retention-recompute-header/spec.md#requirement-recomputing-the-nomination-starts-in-the-card-header-and-asks-for-a-reason\n\t\t * @param {string} reason Why it is recomputed.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync recompute(reason) {\n\t\t\tconst why = String(reason ?? '').trim()\n\t\t\tif (this.busy || why === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\ttry {\n\t\t\t\tawait axios.post(generateUrl(`/apps/openregister/api/archival/objects/${encodeURIComponent(this.id)}/nomination/recompute`), { reason: why })\n\t\t\t\tthis.recomputeOpen = false\n\t\t\t\tawait this.load()\n\t\t\t} catch (failure) {\n\t\t\t\tconst body = failure && failure.response && failure.response.data\n\t\t\t\tthis.error = String((body && (body.message || body.error)) || (failure && failure.message) || failure)\n\t\t\t} finally {\n\t\t\t\tthis.busy = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-retention {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-retention__head {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 10px 16px;\n}\n\n.cn-retention__head-text {\n\tdisplay: flex;\n\tflex: 1 1 260px;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n}\n\n.cn-retention__title {\n\tmargin: 0;\n\tfont-size: 18px;\n\tfont-weight: 700;\n}\n\n.cn-retention__muted {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-retention__facts {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\tgap: 12px 24px;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n/* The server draws every dt as a 130px right-aligned inline block and pads\n dt and dd 12px; a fact is a label over its value. */\n.cn-retention__fact dt,\n.cn-retention__fact dd {\n\tdisplay: block;\n\twidth: auto;\n\twhite-space: normal;\n\ttext-align: start;\n}\n\n.cn-retention__fact dt {\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tline-height: 1.2;\n}\n\n.cn-retention__fact dd {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-weight: 600;\n}\n\n.cn-retention__section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-retention__rows {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-retention__row {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 12px;\n\tpadding: 12px 0;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-retention__row-text {\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n}\n\n/* A round mark before a hold or transfer row: LH (legal hold) on the error\n tint, ED (e-Depot) on the chip ground (DqZaakArchivering). */\n.cn-retention__mark {\n\tdisplay: inline-flex;\n\tflex: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 16px;\n\tbackground: var(--color-background-dark);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 700;\n}\n\n.cn-retention__mark--hold {\n\tbackground: var(--color-error-light, #fcedec);\n\tcolor: var(--color-error-text, #a30000);\n}\n\n.cn-retention__row-title {\n\tfont-weight: 600;\n}\n\n</style>\n"],"names":["CnRetentionRecomputeDialog","CnStatusBadge","t","n","axios"],"mappings":";;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EAAE,EAAE;IAC5B,MAAK;AACN,IAAA;GACA,IAAI,CAAC,IAAK,GAAE,KAAG;AACf,GAAA,IAAI;AACH,IAAA,MAAMA,cAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,wCAAwC,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAqB,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAA;IAC5I,IAAI,CAAC,gBAAgB,MAAI;AACzB,IAAA,MAAM,IAAI,CAAC,IAAI,GAAC;AACjB,IAAA,CAAE,OAAO,OAAO,EAAE;IACjB,MAAM,IAAG,GAAI,OAAQ,IAAG,OAAO,CAAC,QAAO,IAAK,OAAO,CAAC,QAAQ,CAAC,KAAG;AAChE,IAAA,IAAI,CAAC,KAAI,GAAI,MAAM,CAAC,CAAC,IAAG,KAAM,IAAI,CAAC,OAAM,IAAK,IAAI,CAAC,KAAK,CAAC,MAAM,WAAW,OAAO,CAAC,OAAO,CAAE,IAAG,OAAO,EAAA;AACtG,IAAA,SAAU;AACT,IAAA,IAAI,CAAC,IAAG,GAAI,MAAI;AACjB,IAAA;GACA;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnRetentionWidget.vue2.js","sources":["../../../../src/components/CnRetentionWidget/CnRetentionWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-retention\" data-testid=\"cn-retention\">\n\t\t<header class=\"cn-retention__head\">\n\t\t\t<div class=\"cn-retention__head-text\">\n\t\t\t\t<h3 class=\"cn-retention__title\">\n\t\t\t\t\t{{ text(content.title) || t('nextcloud-vue', 'Archiving') }}\n\t\t\t\t</h3>\n\t\t\t\t<p class=\"cn-retention__muted\">\n\t\t\t\t\t{{ text(content.subtitle) || t('nextcloud-vue', 'What happens to this record once it is closed') }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Recompute starts in the header (board DqZaakArchivering); the\n\t\t\t dialog asks for the reason OpenRegister records with it. -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"content.recompute !== false && !loading && !error\"\n\t\t\t\t:disabled=\"!mayRecompute || busy\"\n\t\t\t\t:title=\"mayRecompute ? undefined : t('nextcloud-vue', 'Recomputing needs the archivist role')\"\n\t\t\t\t:aria-description=\"mayRecompute ? undefined : t('nextcloud-vue', 'Recomputing needs the archivist role')\"\n\t\t\t\t:data-testid=\"mayRecompute ? 'cn-retention-recompute-open' : 'cn-retention-recompute-denied'\"\n\t\t\t\t@click=\"recomputeOpen = true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Refresh :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Recompute nomination') }}\n\t\t\t</NcButton>\n\t\t</header>\n\t\t<CnRetentionRecomputeDialog\n\t\t\tv-if=\"recomputeOpen\"\n\t\t\t:user=\"currentUid\"\n\t\t\t:busy=\"busy\"\n\t\t\t@close=\"recomputeOpen = false\"\n\t\t\t@confirm=\"recompute\" />\n\n\t\t<NcLoadingIcon v-if=\"loading\" :size=\"24\" />\n\t\t<NcEmptyContent v-else-if=\"error\"\n\t\t\t:name=\"t('nextcloud-vue', 'The archival facts are unavailable')\"\n\t\t\t:description=\"error\"\n\t\t\tdata-testid=\"cn-retention-error\">\n\t\t\t<template #action>\n\t\t\t\t<NcButton data-testid=\"cn-retention-retry\" @click=\"load\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Try again') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\n\t\t<template v-else>\n\t\t\t<p v-if=\"archived\" class=\"cn-retention__archived\" data-testid=\"cn-retention-archived\">\n\t\t\t\t{{ t('nextcloud-vue', 'Archived on {at} by {by}. {reason}', { at: String(archived.at ?? ''), by: String(archived.by ?? ''), reason: String(archived.reason ?? '') }) }}\n\t\t\t</p>\n\t\t\t<NcNoteCard v-if=\"disagrees\" type=\"warning\" data-testid=\"cn-retention-disagreement\">\n\t\t\t\t{{ t('nextcloud-vue', 'This record and OpenRegister do not agree on whether it is archived.') }}\n\t\t\t</NcNoteCard>\n\n\t\t\t<NcNoteCard v-if=\"nomination && nomination.status === 'unnominatable'\" type=\"warning\" data-testid=\"cn-retention-unnominatable\">\n\t\t\t\t{{ t('nextcloud-vue', 'Nothing could decide what happens to this record.') }}\n\t\t\t\t{{ String(nomination.unnominatableReason ?? '') }}\n\t\t\t</NcNoteCard>\n\t\t\t<div v-else-if=\"!nomination\" data-testid=\"cn-retention-pending\">\n\t\t\t\t<dl class=\"cn-retention__facts\">\n\t\t\t\t\t<div v-for=\"fact in pendingFacts\" :key=\"fact.key\" class=\"cn-retention__fact\">\n\t\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t\t<dd>{{ fact.value }}</dd>\n\t\t\t\t\t</div>\n\t\t\t\t</dl>\n\t\t\t\t<NcNoteCard type=\"info\">\n\t\t\t\t\t{{ text(content.pendingNote) || t('nextcloud-vue', 'This record has not been closed yet. Its archival future is recorded when it closes.') }}\n\t\t\t\t</NcNoteCard>\n\t\t\t</div>\n\t\t\t<dl v-else class=\"cn-retention__facts\" data-testid=\"cn-retention-facts\">\n\t\t\t\t<div v-for=\"fact in facts\" :key=\"fact.key\" class=\"cn-retention__fact\">\n\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t<dd :data-testid=\"`cn-retention-${fact.key}`\">\n\t\t\t\t\t\t{{ fact.value }}\n\t\t\t\t\t</dd>\n\t\t\t\t</div>\n\t\t\t</dl>\n\n\t\t\t<section v-if=\"content.legalHold\" class=\"cn-retention__section\" data-testid=\"cn-retention-hold\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Kept for a procedure') }}\n\t\t\t\t</component>\n\t\t\t\t<ul class=\"cn-retention__rows\">\n\t\t\t\t\t<li v-for=\"hold in holds\" :key=\"hold.id\" class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark cn-retention__mark--hold\" aria-hidden=\"true\">LH</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ hold.reason || t('nextcloud-vue', 'Legal hold') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ t('nextcloud-vue', 'Placed on {date} by {by}', { date: hold.placedDate, by: hold.placedBy }) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"t('nextcloud-vue', 'Active')\" variant=\"warning\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li v-if=\"holds.length === 0\" class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark cn-retention__mark--hold\" aria-hidden=\"true\">LH</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ t('nextcloud-vue', 'No legal hold') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ t('nextcloud-vue', 'If an objection or appeal runs, destruction is suspended') }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"t('nextcloud-vue', 'None')\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<section v-if=\"content.transfer\" class=\"cn-retention__section\" data-testid=\"cn-retention-transfer\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Transfer to the e-Depot') }}\n\t\t\t\t</component>\n\t\t\t\t<ul class=\"cn-retention__rows\">\n\t\t\t\t\t<li class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark\" aria-hidden=\"true\">ED</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ transfers ? t('nextcloud-vue', 'Goes to the e-Depot') : t('nextcloud-vue', 'Not applicable') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ transfers ? t('nextcloud-vue', 'After the retention period the record is transferred') : t('nextcloud-vue', 'Only records appraised to keep go to the e-Depot') }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"transfers ? t('nextcloud-vue', 'Transfer') : t('nextcloud-vue', 'No transfer')\" :variant=\"transfers ? 'info' : 'default'\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<div v-if=\"outcome\" class=\"cn-retention__outcome\" data-testid=\"cn-retention-outcome\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Outcome') }}\n\t\t\t\t</component>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Handed over as {kind} on {at} by {by}.', { kind: String(outcome.kind ?? ''), at: String(outcome.at ?? ''), by: String(outcome.by ?? '') }) }}</p>\n\t\t\t\t<p v-if=\"outcome.transferListUuid\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Transfer list') }}: {{ outcome.transferListUuid }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton, NcEmptyContent, NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'\nimport Refresh from 'vue-material-design-icons/Refresh.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\nimport CnRetentionRecomputeDialog from './CnRetentionRecomputeDialog.vue'\nimport innerHeading from '../../mixins/innerHeading.js'\nimport { parseDuration } from '../../utils/isoDuration.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'\n\n/**\n * CnRetentionWidget — the `retention` detail widget: what happens to a\n * record when its business use ends, as OpenRegister decided it. Every value\n * is read off the record's `@self._retention` (appraisal, disposal date,\n * retention period, selection list row, the rule and when it was written)\n * and `@self.archived`; the widget derives nothing, so it can never disagree\n * with the stored decision. A failed read is an error with a retry, never an\n * empty block. A record nothing could nominate is drawn apart from one that\n * is not closed yet. An archivist (or an admin) may ask OpenRegister to\n * recompute the nomination, with a reason. Any app on OpenRegister uses it;\n * dossiq's case Archiving tab is the first.\n *\n * `content`:\n * - `title`, `subtitle`: texts, through the host translate.\n * - `statusField`, `archivedValues`: a record field and the values that mean\n * archived (`archiveStatus`, `[\"archived\", ...]`); when set, a mismatch with\n * `@self.archived` is said out loud.\n * - `archivistGroups`: groups that may recompute (default `[\"archivaris\"]`;\n * admins always may); `recompute: false` hides the control.\n * - `expected`: before the record closes, the outcome its type expects.\n * `source: { register, schema, filter }` lists the candidate rules (a case\n * type's result types, `filter` tokens such as `@object.caseType`\n * resolved against the record); `fields: { appraisal, period,\n * selectionListRow }` names their fields; `appraisalLabels` names the\n * appraisal values; `periodText` writes the period (`{period} after the\n * decision`); `decidedBy` says who decides. When the candidates agree the\n * facts show that outcome, otherwise \"Depends on the result\". A failed\n * read keeps the plain facts.\n * - `pendingNote`: the note under the facts of a record not closed yet.\n * - `legalHold: true`: a section with the record's active legal holds\n * (`@self._retention.legalHold.holds`), or that none applies.\n * - `transfer: { keepValues }`: a section saying whether the record goes to\n * the e-Depot, from the stored or expected appraisal.\n *\n * The record is read fresh from OpenRegister by `register`, `schema` and\n * `objectId` (props, else the bound record's `@self`).\n */\nexport default {\n\tname: 'CnRetentionWidget',\n\n\tcomponents: { CnRetentionRecomputeDialog, CnStatusBadge, NcButton, NcEmptyContent, NcLoadingIcon, NcNoteCard, Refresh },\n\n\tmixins: [innerHeading],\n\n\tinject: {\n\t\t/** The host app's translate (CnAppRoot `cnTranslate`). */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's configuration (see the component docs).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The bound record, on a detail page.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The record's register (else the bound record's `@self.register`). */\n\t\tregister: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The record's schema (else the bound record's `@self.schema`); a schema object gives its slug.\n\t\t *\n\t\t * @type {string|number|object}\n\t\t */\n\t\tschema: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's id (else the bound record's). */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: true,\n\t\t\terror: '',\n\t\t\trecord: null,\n\t\t\t/** Whether the recompute dialog is open. */\n\t\t\trecomputeOpen: false,\n\t\t\tbusy: false,\n\t\t\t/** The candidate rules `content.expected` reads, null until read or when unreadable. */\n\t\t\texpectedRows: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {object} The bound record's `@self`. */\n\t\tboundSelf() {\n\t\t\treturn (this.objectData && this.objectData['@self']) || {}\n\t\t},\n\n\t\t/** @return {string} The record id. */\n\t\tid() {\n\t\t\treturn String(this.objectId || (this.objectData && this.objectData.id) || this.boundSelf.id || '')\n\t\t},\n\n\t\t/** @return {string} The register. */\n\t\tregisterRef() {\n\t\t\treturn String(this.register || this.boundSelf.register || '')\n\t\t},\n\n\t\t/** @return {string} The schema. */\n\t\tschemaRef() {\n\t\t\tconst s = this.schema || this.boundSelf.schema || ''\n\t\t\treturn String(typeof s === 'object' ? (s.slug || s.id || '') : s)\n\t\t},\n\n\t\t/** @return {object} The record's `@self`. */\n\t\tself() {\n\t\t\treturn (this.record && this.record['@self']) || {}\n\t\t},\n\n\t\t/** @return {object|null} OpenRegister's stored retention decision. */\n\t\tretention() {\n\t\t\treturn this.self._retention || null\n\t\t},\n\n\t\t/** @return {object|null} The nomination. */\n\t\tnomination() {\n\t\t\treturn (this.retention && this.retention.nomination) || null\n\t\t},\n\n\t\t/** @return {object|null} The hand-over outcome. */\n\t\toutcome() {\n\t\t\treturn (this.retention && this.retention.outcome) || null\n\t\t},\n\n\t\t/** @return {object|null} OpenRegister's archived marker. */\n\t\tarchived() {\n\t\t\treturn this.self.archived || null\n\t\t},\n\n\t\t/**\n\t\t * Whether the record's own field and the platform marker disagree.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {boolean}\n\t\t */\n\t\tdisagrees() {\n\t\t\tconst field = this.content.statusField\n\t\t\tif (!field || !this.record) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst values = Array.isArray(this.content.archivedValues) ? this.content.archivedValues.map(String) : ['archived']\n\t\t\tconst saysArchived = values.includes(String(readPath(this.record, field) ?? ''))\n\t\t\treturn saysArchived !== Boolean(this.archived)\n\t\t},\n\n\t\t/**\n\t\t * The stored facts that have a value, in reading order.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {Array<{key: string, label: string, value: string}>}\n\t\t */\n\t\tfacts() {\n\t\t\tconst r = this.retention || {}\n\t\t\tconst n = this.nomination || {}\n\t\t\treturn [\n\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: r.appraisal },\n\t\t\t\t{ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: r.disposalDate },\n\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: r.retentionPeriod },\n\t\t\t\t{ key: 'selection-list-row', label: t('nextcloud-vue', 'Selection list row'), value: r.selectionListRow },\n\t\t\t\t{ key: 'rule', label: t('nextcloud-vue', 'Decided by'), value: n.rule },\n\t\t\t\t{ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: n.at },\n\t\t\t].filter((fact) => fact.value !== undefined && fact.value !== null && fact.value !== '').map((fact) => ({ ...fact, value: String(fact.value) }))\n\t\t},\n\n\t\t/**\n\t\t * The outcome the record's type expects before it closes: the agreed\n\t\t * appraisal, period and selection list row of the candidate rules, or\n\t\t * `mixed` when they disagree; null when nothing was read.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {{appraisal: string, period: string, selectionListRow: string, mixed: boolean}|null}\n\t\t */\n\t\texpectedOutcome() {\n\t\t\tconst rows = this.expectedRows\n\t\t\tif (!Array.isArray(rows) || rows.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst fields = { appraisal: 'appraisal', period: 'period', selectionListRow: 'selectionListRow', ...(this.content.expected?.fields || {}) }\n\t\t\tconst pick = (row, key) => String(readPath(row, fields[key]) ?? '')\n\t\t\tconst outcomes = rows.map((row) => ({ appraisal: pick(row, 'appraisal'), period: pick(row, 'period'), selectionListRow: pick(row, 'selectionListRow') }))\n\t\t\tconst first = outcomes[0]\n\t\t\tconst agree = outcomes.every((o) => o.appraisal === first.appraisal && o.period === first.period)\n\t\t\tif (first.appraisal === '' && first.period === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn agree\n\t\t\t\t? { ...first, selectionListRow: outcomes.every((o) => o.selectionListRow === first.selectionListRow) ? first.selectionListRow : '', mixed: false }\n\t\t\t\t: { appraisal: '', period: '', selectionListRow: '', mixed: true }\n\t\t},\n\n\t\t/**\n\t\t * The facts of a record not closed yet: the expected outcome where the\n\t\t * type gives one, \"decided when it closes\" otherwise.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {Array<{key: string, label: string, value: string}>}\n\t\t */\n\t\tpendingFacts() {\n\t\t\tconst atClosure = t('nextcloud-vue', 'Decided when it closes')\n\t\t\tconst expected = this.expectedOutcome\n\t\t\tif (!expected) {\n\t\t\t\treturn [\n\t\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: atClosure },\n\t\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: atClosure },\n\t\t\t\t\t{ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: atClosure },\n\t\t\t\t\t{ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: t('nextcloud-vue', 'Not yet') },\n\t\t\t\t]\n\t\t\t}\n\t\t\tconst depends = t('nextcloud-vue', 'Depends on the result')\n\t\t\tconst config = this.content.expected || {}\n\t\t\tconst facts = [\n\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: expected.mixed ? depends : this.appraisalLabel(expected.appraisal) },\n\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: expected.mixed ? depends : this.periodLabel(expected.period) },\n\t\t\t]\n\t\t\tif (expected.selectionListRow) {\n\t\t\t\tfacts.push({ key: 'selection-list-row', label: t('nextcloud-vue', 'Selection list row'), value: expected.selectionListRow })\n\t\t\t}\n\t\t\tfacts.push({ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: atClosure })\n\t\t\tif (config.decidedBy) {\n\t\t\t\tfacts.push({ key: 'rule', label: t('nextcloud-vue', 'Decided by'), value: this.text(config.decidedBy) })\n\t\t\t}\n\t\t\tfacts.push({ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: t('nextcloud-vue', 'Not yet') })\n\t\t\treturn facts.filter((fact) => fact.value !== '')\n\t\t},\n\n\t\t/** @return {Array<{id: string, reason: string, placedBy: string, placedDate: string}>} The active legal holds. */\n\t\tholds() {\n\t\t\tconst hold = (this.retention && this.retention.legalHold) || {}\n\t\t\tconst list = Array.isArray(hold.holds) ? hold.holds : []\n\t\t\treturn list.map((h, index) => ({ id: String(h.id ?? index), reason: String(h.reason ?? ''), placedBy: String(h.placedBy ?? ''), placedDate: String(h.placedDate ?? '') }))\n\t\t},\n\n\t\t/**\n\t\t * Whether the record goes to the e-Depot: its stored appraisal, else\n\t\t * the expected one, is one of `transfer.keepValues`.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\ttransfers() {\n\t\t\tconst keep = Array.isArray(this.content.transfer?.keepValues) ? this.content.transfer.keepValues.map(String) : ['bewaren', 'blijvend_bewaren', 'retain', 'keep']\n\t\t\tconst stored = this.retention && this.retention.appraisal\n\t\t\tconst appraisal = stored || (this.expectedOutcome && !this.expectedOutcome.mixed ? this.expectedOutcome.appraisal : '')\n\t\t\treturn keep.includes(String(appraisal || ''))\n\t\t},\n\n\t\t/** @return {string} The signed-in user's id. */\n\t\tcurrentUid() {\n\t\t\tconst user = getCurrentUser()\n\t\t\treturn String((user && user.uid) || '')\n\t\t},\n\n\t\t/**\n\t\t * Whether this user may recompute: an admin or an archivist group member.\n\t\t * Shown disabled otherwise, so the user learns which role it needs.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tmayRecompute() {\n\t\t\tconst user = getCurrentUser()\n\t\t\tif (user && user.isAdmin === true) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tconst groups = Array.isArray(user && user.groups) ? user.groups : []\n\t\t\tconst allowed = Array.isArray(this.content.archivistGroups) ? this.content.archivistGroups : ['archivaris']\n\t\t\treturn allowed.some((g) => groups.includes(g))\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.load()\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * A config text through the host translate.\n\t\t *\n\t\t * @param {unknown} value The text.\n\t\t * @return {string}\n\t\t */\n\t\ttext(value) {\n\t\t\treturn typeof value === 'string' && value !== '' ? this.cnTranslate(value) : ''\n\t\t},\n\n\t\t/**\n\t\t * An appraisal value in words, through `expected.appraisalLabels`.\n\t\t *\n\t\t * @param {string} value The stored value.\n\t\t * @return {string}\n\t\t */\n\t\tappraisalLabel(value) {\n\t\t\tconst labels = this.content.expected?.appraisalLabels || {}\n\t\t\treturn labels[value] ? this.text(labels[value]) : value\n\t\t},\n\n\t\t/**\n\t\t * An ISO period in words (\"5 years\"), placed in `expected.periodText`.\n\t\t *\n\t\t * @param {string} value The ISO 8601 duration.\n\t\t * @return {string}\n\t\t */\n\t\tperiodLabel(value) {\n\t\t\tconst parsed = parseDuration(value)\n\t\t\tconst words = parsed\n\t\t\t\t? {\n\t\t\t\t\t\tyears: () => n('nextcloud-vue', '%n year', '%n years', parsed.amount),\n\t\t\t\t\t\tmonths: () => n('nextcloud-vue', '%n month', '%n months', parsed.amount),\n\t\t\t\t\t\tweeks: () => n('nextcloud-vue', '%n week', '%n weeks', parsed.amount),\n\t\t\t\t\t\tdays: () => n('nextcloud-vue', '%n day', '%n days', parsed.amount),\n\t\t\t\t\t}[parsed.unit]\n\t\t\t\t: null\n\t\t\tconst period = words ? words() : value\n\t\t\tconst template = this.content.expected?.periodText\n\t\t\treturn template ? this.text(template).replace('{period}', period) : period\n\t\t},\n\n\t\t/**\n\t\t * Read the record fresh from OpenRegister; a failure is an error, never an empty block.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync load() {\n\t\t\tthis.loading = true\n\t\t\tthis.error = ''\n\t\t\ttry {\n\t\t\t\tif (!this.registerRef || !this.schemaRef || !this.id) {\n\t\t\t\t\tthrow new Error(t('nextcloud-vue', 'This widget has no record to read.'))\n\t\t\t\t}\n\t\t\t\tconst { data } = await axios.get(generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(this.registerRef)}/${encodeURIComponent(this.schemaRef)}/${encodeURIComponent(this.id)}`))\n\t\t\t\tthis.record = data && typeof data === 'object' ? data : null\n\t\t\t\tawait this.loadExpected()\n\t\t\t} catch (failure) {\n\t\t\t\tconst body = failure && failure.response && failure.response.data\n\t\t\t\tthis.error = String((body && (body.message || body.error)) || (failure && failure.message) || failure)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Read the candidate rules `content.expected` names, for a record that\n\t\t * is not nominated yet. A failure leaves the plain pending facts.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadExpected() {\n\t\t\tconst source = this.content.expected && this.content.expected.source\n\t\t\tthis.expectedRows = null\n\t\t\tif (!source || !source.register || !source.schema || this.nomination) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst filter = resolveFilterTokens(source.filter || {}, { objectId: this.id, object: this.record })\n\t\t\tif (hasUnresolvedTokens(filter)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.get(generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(source.register)}/${encodeURIComponent(source.schema)}`), { params: { ...filter, _limit: 100 } })\n\t\t\t\tthis.expectedRows = Array.isArray(data?.results) ? data.results : []\n\t\t\t} catch {\n\t\t\t\tthis.expectedRows = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Ask OpenRegister to derive the nomination again with the reason the\n\t\t * dialog asked for, then read it back.\n\t\t *\n\t\t * @spec openspec/changes/retention-recompute-header/specs/retention-recompute-header/spec.md#requirement-recomputing-the-nomination-starts-in-the-card-header-and-asks-for-a-reason\n\t\t * @param {string} reason Why it is recomputed.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync recompute(reason) {\n\t\t\tconst why = String(reason ?? '').trim()\n\t\t\tif (this.busy || why === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\ttry {\n\t\t\t\tawait axios.post(generateUrl(`/apps/openregister/api/archival/objects/${encodeURIComponent(this.id)}/nomination/recompute`), { reason: why })\n\t\t\t\tthis.recomputeOpen = false\n\t\t\t\tawait this.load()\n\t\t\t} catch (failure) {\n\t\t\t\tconst body = failure && failure.response && failure.response.data\n\t\t\t\tthis.error = String((body && (body.message || body.error)) || (failure && failure.message) || failure)\n\t\t\t} finally {\n\t\t\t\tthis.busy = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-retention {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-retention__head {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 10px 16px;\n}\n\n.cn-retention__head-text {\n\tdisplay: flex;\n\tflex: 1 1 260px;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n}\n\n.cn-retention__title {\n\tmargin: 0;\n\tfont-size: 18px;\n\tfont-weight: 700;\n}\n\n.cn-retention__muted {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-retention__facts {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\tgap: 12px 24px;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n/* The server draws every dt as a 130px right-aligned inline block and pads\n dt and dd 12px; a fact is a label over its value. */\n.cn-retention__fact dt,\n.cn-retention__fact dd {\n\tdisplay: block;\n\twidth: auto;\n\twhite-space: normal;\n\ttext-align: start;\n}\n\n.cn-retention__fact dt {\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tline-height: 1.2;\n}\n\n.cn-retention__fact dd {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-weight: 600;\n}\n\n.cn-retention__section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-retention__rows {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-retention__row {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 12px;\n\tpadding: 12px 0;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-retention__row-text {\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n\tline-height: normal;\n}\n\n/* A row's second line is 13px, as the boards draw it (DqZaakArchivering). */\n.cn-retention__row-text .cn-retention__muted {\n\tfont-size: 13px;\n}\n\n/* A round mark before a hold or transfer row: LH (legal hold) on the error\n tint, ED (e-Depot) on the chip ground (DqZaakArchivering). */\n.cn-retention__mark {\n\tdisplay: inline-flex;\n\tflex: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 16px;\n\tbackground: var(--color-background-dark);\n\tcolor: var(--cn-board-text-soft, var(--color-text-maxcontrast));\n\tfont-size: 12px;\n\tfont-weight: 700;\n}\n\n.cn-retention__mark--hold {\n\tbackground: var(--color-error-light, #fcedec);\n\tcolor: var(--color-error-text, #a30000);\n}\n\n.cn-retention__row-title {\n\tfont-size: 15px;\n\tfont-weight: 600;\n}\n\n</style>\n"],"names":["CnRetentionRecomputeDialog","CnStatusBadge","t","n","axios"],"mappings":";;;;;;;;;;;;;AAoJA;;AAEC;AACA;;AAEA;;;;AAIA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AAQA;;;;;;;AAOA;AACA;;;;AAID,aAAe;CACd,IAAI,EAAE,mBAAmB;;CAEzB,UAAU,EAAE,8BAAEA,UAA0B,iBAAEC,YAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,OAAM,EAAG;;AAEvH,CAAA,MAAM,EAAE,CAAC,YAAY,CAAC;;AAEtB,CAAA,M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,GAAC;AACjB,IAAA,CAAE,OAAO,OAAO,EAAE;IACjB,MAAM,IAAG,GAAI,OAAQ,IAAG,OAAO,CAAC,QAAO,IAAK,OAAO,CAAC,QAAQ,CAAC,KAAG;AAChE,IAAA,IAAI,CAAC,KAAI,GAAI,MAAM,CAAC,CAAC,IAAG,KAAM,IAAI,CAAC,OAAM,IAAK,IAAI,CAAC,KAAK,CAAC,MAAM,WAAW,OAAO,CAAC,OAAO,CAAE,IAAG,OAAO,EAAA;AACtG,IAAA,SAAU;AACT,IAAA,IAAI,CAAC,IAAG,GAAI,MAAI;AACjB,IAAA;GACA;EACD;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnRetentionWidget.vue3.js","sources":["../../../../src/components/CnRetentionWidget/CnRetentionWidget.vue?vue&type=template&id=7d819271&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-retention\" data-testid=\"cn-retention\">\n\t\t<header class=\"cn-retention__head\">\n\t\t\t<div class=\"cn-retention__head-text\">\n\t\t\t\t<h3 class=\"cn-retention__title\">\n\t\t\t\t\t{{ text(content.title) || t('nextcloud-vue', 'Archiving') }}\n\t\t\t\t</h3>\n\t\t\t\t<p class=\"cn-retention__muted\">\n\t\t\t\t\t{{ text(content.subtitle) || t('nextcloud-vue', 'What happens to this record once it is closed') }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Recompute starts in the header (board DqZaakArchivering); the\n\t\t\t dialog asks for the reason OpenRegister records with it. -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"content.recompute !== false && !loading && !error\"\n\t\t\t\t:disabled=\"!mayRecompute || busy\"\n\t\t\t\t:title=\"mayRecompute ? undefined : t('nextcloud-vue', 'Recomputing needs the archivist role')\"\n\t\t\t\t:aria-description=\"mayRecompute ? undefined : t('nextcloud-vue', 'Recomputing needs the archivist role')\"\n\t\t\t\t:data-testid=\"mayRecompute ? 'cn-retention-recompute-open' : 'cn-retention-recompute-denied'\"\n\t\t\t\t@click=\"recomputeOpen = true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Refresh :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Recompute nomination') }}\n\t\t\t</NcButton>\n\t\t</header>\n\t\t<CnRetentionRecomputeDialog\n\t\t\tv-if=\"recomputeOpen\"\n\t\t\t:user=\"currentUid\"\n\t\t\t:busy=\"busy\"\n\t\t\t@close=\"recomputeOpen = false\"\n\t\t\t@confirm=\"recompute\" />\n\n\t\t<NcLoadingIcon v-if=\"loading\" :size=\"24\" />\n\t\t<NcEmptyContent v-else-if=\"error\"\n\t\t\t:name=\"t('nextcloud-vue', 'The archival facts are unavailable')\"\n\t\t\t:description=\"error\"\n\t\t\tdata-testid=\"cn-retention-error\">\n\t\t\t<template #action>\n\t\t\t\t<NcButton data-testid=\"cn-retention-retry\" @click=\"load\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Try again') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\n\t\t<template v-else>\n\t\t\t<p v-if=\"archived\" class=\"cn-retention__archived\" data-testid=\"cn-retention-archived\">\n\t\t\t\t{{ t('nextcloud-vue', 'Archived on {at} by {by}. {reason}', { at: String(archived.at ?? ''), by: String(archived.by ?? ''), reason: String(archived.reason ?? '') }) }}\n\t\t\t</p>\n\t\t\t<NcNoteCard v-if=\"disagrees\" type=\"warning\" data-testid=\"cn-retention-disagreement\">\n\t\t\t\t{{ t('nextcloud-vue', 'This record and OpenRegister do not agree on whether it is archived.') }}\n\t\t\t</NcNoteCard>\n\n\t\t\t<NcNoteCard v-if=\"nomination && nomination.status === 'unnominatable'\" type=\"warning\" data-testid=\"cn-retention-unnominatable\">\n\t\t\t\t{{ t('nextcloud-vue', 'Nothing could decide what happens to this record.') }}\n\t\t\t\t{{ String(nomination.unnominatableReason ?? '') }}\n\t\t\t</NcNoteCard>\n\t\t\t<div v-else-if=\"!nomination\" data-testid=\"cn-retention-pending\">\n\t\t\t\t<dl class=\"cn-retention__facts\">\n\t\t\t\t\t<div v-for=\"fact in pendingFacts\" :key=\"fact.key\" class=\"cn-retention__fact\">\n\t\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t\t<dd>{{ fact.value }}</dd>\n\t\t\t\t\t</div>\n\t\t\t\t</dl>\n\t\t\t\t<NcNoteCard type=\"info\">\n\t\t\t\t\t{{ text(content.pendingNote) || t('nextcloud-vue', 'This record has not been closed yet. Its archival future is recorded when it closes.') }}\n\t\t\t\t</NcNoteCard>\n\t\t\t</div>\n\t\t\t<dl v-else class=\"cn-retention__facts\" data-testid=\"cn-retention-facts\">\n\t\t\t\t<div v-for=\"fact in facts\" :key=\"fact.key\" class=\"cn-retention__fact\">\n\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t<dd :data-testid=\"`cn-retention-${fact.key}`\">\n\t\t\t\t\t\t{{ fact.value }}\n\t\t\t\t\t</dd>\n\t\t\t\t</div>\n\t\t\t</dl>\n\n\t\t\t<section v-if=\"content.legalHold\" class=\"cn-retention__section\" data-testid=\"cn-retention-hold\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Kept for a procedure') }}\n\t\t\t\t</component>\n\t\t\t\t<ul class=\"cn-retention__rows\">\n\t\t\t\t\t<li v-for=\"hold in holds\" :key=\"hold.id\" class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark cn-retention__mark--hold\" aria-hidden=\"true\">LH</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ hold.reason || t('nextcloud-vue', 'Legal hold') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ t('nextcloud-vue', 'Placed on {date} by {by}', { date: hold.placedDate, by: hold.placedBy }) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"t('nextcloud-vue', 'Active')\" variant=\"warning\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li v-if=\"holds.length === 0\" class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark cn-retention__mark--hold\" aria-hidden=\"true\">LH</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ t('nextcloud-vue', 'No legal hold') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ t('nextcloud-vue', 'If an objection or appeal runs, destruction is suspended') }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"t('nextcloud-vue', 'None')\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<section v-if=\"content.transfer\" class=\"cn-retention__section\" data-testid=\"cn-retention-transfer\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Transfer to the e-Depot') }}\n\t\t\t\t</component>\n\t\t\t\t<ul class=\"cn-retention__rows\">\n\t\t\t\t\t<li class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark\" aria-hidden=\"true\">ED</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ transfers ? t('nextcloud-vue', 'Goes to the e-Depot') : t('nextcloud-vue', 'Not applicable') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ transfers ? t('nextcloud-vue', 'After the retention period the record is transferred') : t('nextcloud-vue', 'Only records appraised to keep go to the e-Depot') }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"transfers ? t('nextcloud-vue', 'Transfer') : t('nextcloud-vue', 'No transfer')\" :variant=\"transfers ? 'info' : 'default'\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<div v-if=\"outcome\" class=\"cn-retention__outcome\" data-testid=\"cn-retention-outcome\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Outcome') }}\n\t\t\t\t</component>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Handed over as {kind} on {at} by {by}.', { kind: String(outcome.kind ?? ''), at: String(outcome.at ?? ''), by: String(outcome.by ?? '') }) }}</p>\n\t\t\t\t<p v-if=\"outcome.transferListUuid\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Transfer list') }}: {{ outcome.transferListUuid }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton, NcEmptyContent, NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'\nimport Refresh from 'vue-material-design-icons/Refresh.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\nimport CnRetentionRecomputeDialog from './CnRetentionRecomputeDialog.vue'\nimport innerHeading from '../../mixins/innerHeading.js'\nimport { parseDuration } from '../../utils/isoDuration.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'\n\n/**\n * CnRetentionWidget — the `retention` detail widget: what happens to a\n * record when its business use ends, as OpenRegister decided it. Every value\n * is read off the record's `@self._retention` (appraisal, disposal date,\n * retention period, selection list row, the rule and when it was written)\n * and `@self.archived`; the widget derives nothing, so it can never disagree\n * with the stored decision. A failed read is an error with a retry, never an\n * empty block. A record nothing could nominate is drawn apart from one that\n * is not closed yet. An archivist (or an admin) may ask OpenRegister to\n * recompute the nomination, with a reason. Any app on OpenRegister uses it;\n * dossiq's case Archiving tab is the first.\n *\n * `content`:\n * - `title`, `subtitle`: texts, through the host translate.\n * - `statusField`, `archivedValues`: a record field and the values that mean\n * archived (`archiveStatus`, `[\"archived\", ...]`); when set, a mismatch with\n * `@self.archived` is said out loud.\n * - `archivistGroups`: groups that may recompute (default `[\"archivaris\"]`;\n * admins always may); `recompute: false` hides the control.\n * - `expected`: before the record closes, the outcome its type expects.\n * `source: { register, schema, filter }` lists the candidate rules (a case\n * type's result types, `filter` tokens such as `@object.caseType`\n * resolved against the record); `fields: { appraisal, period,\n * selectionListRow }` names their fields; `appraisalLabels` names the\n * appraisal values; `periodText` writes the period (`{period} after the\n * decision`); `decidedBy` says who decides. When the candidates agree the\n * facts show that outcome, otherwise \"Depends on the result\". A failed\n * read keeps the plain facts.\n * - `pendingNote`: the note under the facts of a record not closed yet.\n * - `legalHold: true`: a section with the record's active legal holds\n * (`@self._retention.legalHold.holds`), or that none applies.\n * - `transfer: { keepValues }`: a section saying whether the record goes to\n * the e-Depot, from the stored or expected appraisal.\n *\n * The record is read fresh from OpenRegister by `register`, `schema` and\n * `objectId` (props, else the bound record's `@self`).\n */\nexport default {\n\tname: 'CnRetentionWidget',\n\n\tcomponents: { CnRetentionRecomputeDialog, CnStatusBadge, NcButton, NcEmptyContent, NcLoadingIcon, NcNoteCard, Refresh },\n\n\tmixins: [innerHeading],\n\n\tinject: {\n\t\t/** The host app's translate (CnAppRoot `cnTranslate`). */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's configuration (see the component docs).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The bound record, on a detail page.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The record's register (else the bound record's `@self.register`). */\n\t\tregister: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The record's schema (else the bound record's `@self.schema`); a schema object gives its slug.\n\t\t *\n\t\t * @type {string|number|object}\n\t\t */\n\t\tschema: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's id (else the bound record's). */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: true,\n\t\t\terror: '',\n\t\t\trecord: null,\n\t\t\t/** Whether the recompute dialog is open. */\n\t\t\trecomputeOpen: false,\n\t\t\tbusy: false,\n\t\t\t/** The candidate rules `content.expected` reads, null until read or when unreadable. */\n\t\t\texpectedRows: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {object} The bound record's `@self`. */\n\t\tboundSelf() {\n\t\t\treturn (this.objectData && this.objectData['@self']) || {}\n\t\t},\n\n\t\t/** @return {string} The record id. */\n\t\tid() {\n\t\t\treturn String(this.objectId || (this.objectData && this.objectData.id) || this.boundSelf.id || '')\n\t\t},\n\n\t\t/** @return {string} The register. */\n\t\tregisterRef() {\n\t\t\treturn String(this.register || this.boundSelf.register || '')\n\t\t},\n\n\t\t/** @return {string} The schema. */\n\t\tschemaRef() {\n\t\t\tconst s = this.schema || this.boundSelf.schema || ''\n\t\t\treturn String(typeof s === 'object' ? (s.slug || s.id || '') : s)\n\t\t},\n\n\t\t/** @return {object} The record's `@self`. */\n\t\tself() {\n\t\t\treturn (this.record && this.record['@self']) || {}\n\t\t},\n\n\t\t/** @return {object|null} OpenRegister's stored retention decision. */\n\t\tretention() {\n\t\t\treturn this.self._retention || null\n\t\t},\n\n\t\t/** @return {object|null} The nomination. */\n\t\tnomination() {\n\t\t\treturn (this.retention && this.retention.nomination) || null\n\t\t},\n\n\t\t/** @return {object|null} The hand-over outcome. */\n\t\toutcome() {\n\t\t\treturn (this.retention && this.retention.outcome) || null\n\t\t},\n\n\t\t/** @return {object|null} OpenRegister's archived marker. */\n\t\tarchived() {\n\t\t\treturn this.self.archived || null\n\t\t},\n\n\t\t/**\n\t\t * Whether the record's own field and the platform marker disagree.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {boolean}\n\t\t */\n\t\tdisagrees() {\n\t\t\tconst field = this.content.statusField\n\t\t\tif (!field || !this.record) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst values = Array.isArray(this.content.archivedValues) ? this.content.archivedValues.map(String) : ['archived']\n\t\t\tconst saysArchived = values.includes(String(readPath(this.record, field) ?? ''))\n\t\t\treturn saysArchived !== Boolean(this.archived)\n\t\t},\n\n\t\t/**\n\t\t * The stored facts that have a value, in reading order.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {Array<{key: string, label: string, value: string}>}\n\t\t */\n\t\tfacts() {\n\t\t\tconst r = this.retention || {}\n\t\t\tconst n = this.nomination || {}\n\t\t\treturn [\n\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: r.appraisal },\n\t\t\t\t{ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: r.disposalDate },\n\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: r.retentionPeriod },\n\t\t\t\t{ key: 'selection-list-row', label: t('nextcloud-vue', 'Selection list row'), value: r.selectionListRow },\n\t\t\t\t{ key: 'rule', label: t('nextcloud-vue', 'Decided by'), value: n.rule },\n\t\t\t\t{ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: n.at },\n\t\t\t].filter((fact) => fact.value !== undefined && fact.value !== null && fact.value !== '').map((fact) => ({ ...fact, value: String(fact.value) }))\n\t\t},\n\n\t\t/**\n\t\t * The outcome the record's type expects before it closes: the agreed\n\t\t * appraisal, period and selection list row of the candidate rules, or\n\t\t * `mixed` when they disagree; null when nothing was read.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {{appraisal: string, period: string, selectionListRow: string, mixed: boolean}|null}\n\t\t */\n\t\texpectedOutcome() {\n\t\t\tconst rows = this.expectedRows\n\t\t\tif (!Array.isArray(rows) || rows.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst fields = { appraisal: 'appraisal', period: 'period', selectionListRow: 'selectionListRow', ...(this.content.expected?.fields || {}) }\n\t\t\tconst pick = (row, key) => String(readPath(row, fields[key]) ?? '')\n\t\t\tconst outcomes = rows.map((row) => ({ appraisal: pick(row, 'appraisal'), period: pick(row, 'period'), selectionListRow: pick(row, 'selectionListRow') }))\n\t\t\tconst first = outcomes[0]\n\t\t\tconst agree = outcomes.every((o) => o.appraisal === first.appraisal && o.period === first.period)\n\t\t\tif (first.appraisal === '' && first.period === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn agree\n\t\t\t\t? { ...first, selectionListRow: outcomes.every((o) => o.selectionListRow === first.selectionListRow) ? first.selectionListRow : '', mixed: false }\n\t\t\t\t: { appraisal: '', period: '', selectionListRow: '', mixed: true }\n\t\t},\n\n\t\t/**\n\t\t * The facts of a record not closed yet: the expected outcome where the\n\t\t * type gives one, \"decided when it closes\" otherwise.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {Array<{key: string, label: string, value: string}>}\n\t\t */\n\t\tpendingFacts() {\n\t\t\tconst atClosure = t('nextcloud-vue', 'Decided when it closes')\n\t\t\tconst expected = this.expectedOutcome\n\t\t\tif (!expected) {\n\t\t\t\treturn [\n\t\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: atClosure },\n\t\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: atClosure },\n\t\t\t\t\t{ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: atClosure },\n\t\t\t\t\t{ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: t('nextcloud-vue', 'Not yet') },\n\t\t\t\t]\n\t\t\t}\n\t\t\tconst depends = t('nextcloud-vue', 'Depends on the result')\n\t\t\tconst config = this.content.expected || {}\n\t\t\tconst facts = [\n\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: expected.mixed ? depends : this.appraisalLabel(expected.appraisal) },\n\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: expected.mixed ? depends : this.periodLabel(expected.period) },\n\t\t\t]\n\t\t\tif (expected.selectionListRow) {\n\t\t\t\tfacts.push({ key: 'selection-list-row', label: t('nextcloud-vue', 'Selection list row'), value: expected.selectionListRow })\n\t\t\t}\n\t\t\tfacts.push({ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: atClosure })\n\t\t\tif (config.decidedBy) {\n\t\t\t\tfacts.push({ key: 'rule', label: t('nextcloud-vue', 'Decided by'), value: this.text(config.decidedBy) })\n\t\t\t}\n\t\t\tfacts.push({ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: t('nextcloud-vue', 'Not yet') })\n\t\t\treturn facts.filter((fact) => fact.value !== '')\n\t\t},\n\n\t\t/** @return {Array<{id: string, reason: string, placedBy: string, placedDate: string}>} The active legal holds. */\n\t\tholds() {\n\t\t\tconst hold = (this.retention && this.retention.legalHold) || {}\n\t\t\tconst list = Array.isArray(hold.holds) ? hold.holds : []\n\t\t\treturn list.map((h, index) => ({ id: String(h.id ?? index), reason: String(h.reason ?? ''), placedBy: String(h.placedBy ?? ''), placedDate: String(h.placedDate ?? '') }))\n\t\t},\n\n\t\t/**\n\t\t * Whether the record goes to the e-Depot: its stored appraisal, else\n\t\t * the expected one, is one of `transfer.keepValues`.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\ttransfers() {\n\t\t\tconst keep = Array.isArray(this.content.transfer?.keepValues) ? this.content.transfer.keepValues.map(String) : ['bewaren', 'blijvend_bewaren', 'retain', 'keep']\n\t\t\tconst stored = this.retention && this.retention.appraisal\n\t\t\tconst appraisal = stored || (this.expectedOutcome && !this.expectedOutcome.mixed ? this.expectedOutcome.appraisal : '')\n\t\t\treturn keep.includes(String(appraisal || ''))\n\t\t},\n\n\t\t/** @return {string} The signed-in user's id. */\n\t\tcurrentUid() {\n\t\t\tconst user = getCurrentUser()\n\t\t\treturn String((user && user.uid) || '')\n\t\t},\n\n\t\t/**\n\t\t * Whether this user may recompute: an admin or an archivist group member.\n\t\t * Shown disabled otherwise, so the user learns which role it needs.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tmayRecompute() {\n\t\t\tconst user = getCurrentUser()\n\t\t\tif (user && user.isAdmin === true) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tconst groups = Array.isArray(user && user.groups) ? user.groups : []\n\t\t\tconst allowed = Array.isArray(this.content.archivistGroups) ? this.content.archivistGroups : ['archivaris']\n\t\t\treturn allowed.some((g) => groups.includes(g))\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.load()\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * A config text through the host translate.\n\t\t *\n\t\t * @param {unknown} value The text.\n\t\t * @return {string}\n\t\t */\n\t\ttext(value) {\n\t\t\treturn typeof value === 'string' && value !== '' ? this.cnTranslate(value) : ''\n\t\t},\n\n\t\t/**\n\t\t * An appraisal value in words, through `expected.appraisalLabels`.\n\t\t *\n\t\t * @param {string} value The stored value.\n\t\t * @return {string}\n\t\t */\n\t\tappraisalLabel(value) {\n\t\t\tconst labels = this.content.expected?.appraisalLabels || {}\n\t\t\treturn labels[value] ? this.text(labels[value]) : value\n\t\t},\n\n\t\t/**\n\t\t * An ISO period in words (\"5 years\"), placed in `expected.periodText`.\n\t\t *\n\t\t * @param {string} value The ISO 8601 duration.\n\t\t * @return {string}\n\t\t */\n\t\tperiodLabel(value) {\n\t\t\tconst parsed = parseDuration(value)\n\t\t\tconst words = parsed\n\t\t\t\t? {\n\t\t\t\t\t\tyears: () => n('nextcloud-vue', '%n year', '%n years', parsed.amount),\n\t\t\t\t\t\tmonths: () => n('nextcloud-vue', '%n month', '%n months', parsed.amount),\n\t\t\t\t\t\tweeks: () => n('nextcloud-vue', '%n week', '%n weeks', parsed.amount),\n\t\t\t\t\t\tdays: () => n('nextcloud-vue', '%n day', '%n days', parsed.amount),\n\t\t\t\t\t}[parsed.unit]\n\t\t\t\t: null\n\t\t\tconst period = words ? words() : value\n\t\t\tconst template = this.content.expected?.periodText\n\t\t\treturn template ? this.text(template).replace('{period}', period) : period\n\t\t},\n\n\t\t/**\n\t\t * Read the record fresh from OpenRegister; a failure is an error, never an empty block.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync load() {\n\t\t\tthis.loading = true\n\t\t\tthis.error = ''\n\t\t\ttry {\n\t\t\t\tif (!this.registerRef || !this.schemaRef || !this.id) {\n\t\t\t\t\tthrow new Error(t('nextcloud-vue', 'This widget has no record to read.'))\n\t\t\t\t}\n\t\t\t\tconst { data } = await axios.get(generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(this.registerRef)}/${encodeURIComponent(this.schemaRef)}/${encodeURIComponent(this.id)}`))\n\t\t\t\tthis.record = data && typeof data === 'object' ? data : null\n\t\t\t\tawait this.loadExpected()\n\t\t\t} catch (failure) {\n\t\t\t\tconst body = failure && failure.response && failure.response.data\n\t\t\t\tthis.error = String((body && (body.message || body.error)) || (failure && failure.message) || failure)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Read the candidate rules `content.expected` names, for a record that\n\t\t * is not nominated yet. A failure leaves the plain pending facts.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadExpected() {\n\t\t\tconst source = this.content.expected && this.content.expected.source\n\t\t\tthis.expectedRows = null\n\t\t\tif (!source || !source.register || !source.schema || this.nomination) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst filter = resolveFilterTokens(source.filter || {}, { objectId: this.id, object: this.record })\n\t\t\tif (hasUnresolvedTokens(filter)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.get(generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(source.register)}/${encodeURIComponent(source.schema)}`), { params: { ...filter, _limit: 100 } })\n\t\t\t\tthis.expectedRows = Array.isArray(data?.results) ? data.results : []\n\t\t\t} catch {\n\t\t\t\tthis.expectedRows = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Ask OpenRegister to derive the nomination again with the reason the\n\t\t * dialog asked for, then read it back.\n\t\t *\n\t\t * @spec openspec/changes/retention-recompute-header/specs/retention-recompute-header/spec.md#requirement-recomputing-the-nomination-starts-in-the-card-header-and-asks-for-a-reason\n\t\t * @param {string} reason Why it is recomputed.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync recompute(reason) {\n\t\t\tconst why = String(reason ?? '').trim()\n\t\t\tif (this.busy || why === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\ttry {\n\t\t\t\tawait axios.post(generateUrl(`/apps/openregister/api/archival/objects/${encodeURIComponent(this.id)}/nomination/recompute`), { reason: why })\n\t\t\t\tthis.recomputeOpen = false\n\t\t\t\tawait this.load()\n\t\t\t} catch (failure) {\n\t\t\t\tconst body = failure && failure.response && failure.response.data\n\t\t\t\tthis.error = String((body && (body.message || body.error)) || (failure && failure.message) || failure)\n\t\t\t} finally {\n\t\t\t\tthis.busy = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-retention {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-retention__head {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 10px 16px;\n}\n\n.cn-retention__head-text {\n\tdisplay: flex;\n\tflex: 1 1 260px;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n}\n\n.cn-retention__title {\n\tmargin: 0;\n\tfont-size: 18px;\n\tfont-weight: 700;\n}\n\n.cn-retention__muted {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-retention__facts {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\tgap: 12px 24px;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n/* The server draws every dt as a 130px right-aligned inline block and pads\n dt and dd 12px; a fact is a label over its value. */\n.cn-retention__fact dt,\n.cn-retention__fact dd {\n\tdisplay: block;\n\twidth: auto;\n\twhite-space: normal;\n\ttext-align: start;\n}\n\n.cn-retention__fact dt {\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tline-height: 1.2;\n}\n\n.cn-retention__fact dd {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-weight: 600;\n}\n\n.cn-retention__section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-retention__rows {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-retention__row {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 12px;\n\tpadding: 12px 0;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-retention__row-text {\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n}\n\n/* A round mark before a hold or transfer row: LH (legal hold) on the error\n tint, ED (e-Depot) on the chip ground (DqZaakArchivering). */\n.cn-retention__mark {\n\tdisplay: inline-flex;\n\tflex: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 16px;\n\tbackground: var(--color-background-dark);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 700;\n}\n\n.cn-retention__mark--hold {\n\tbackground: var(--color-error-light, #fcedec);\n\tcolor: var(--color-error-text, #a30000);\n}\n\n.cn-retention__row-title {\n\tfont-weight: 600;\n}\n\n</style>\n"],"names":["_createElementVNode","_toDisplayString","_createVNode","_createTextVNode","_createBlock","_createElementBlock","_Fragment","_renderList","_resolveDynamicComponent","_openBlock"],"mappings":";;;AASM,EAAA,KAAK,EAAC,cAAc;eAAY,EAAC,cAAc;;AAC7C,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,oBAAA,GAAA;AACA,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,yBAAoB,GAAA;AAC1B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,qBAAqB,GAAA;AAG7B,MAAA,UAAA,GAAA,EAAA,KAAM,EAAC,qBAAqB,GAAA;;;AAuCZ,EAAA,KAAK,EAAC,wBAAwB;AAAC,EAAA,aAAW,EAAC,uBAAuB;;;;AAW1D,EAAA,aAAA,EAAA,sBAAA;;AACtB,MAAA,UAAA,GAAA,EAAA,KAAE,EAAA,qBAAA,GAAA;;;AAUI,EAAA,KAAI,EAAE,qBAAC;AAAA,EAAA,aAAA,EAAA,oBAAA;;;;;AASa,EAAA,KAAA,EAAA,uBAAA;AAAA,EAAA,aAAA,EAAA,mBAAA;;AAI1B,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,oBAAoB,GAAA;AAGtB,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,wBAAwB,GAAA;AACjC,MAAA,WA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,CAAA,eAAe,CAAE,EAAA,EAAA,KAAC,EAAA,kBAAA,EAAA,EAAA;qCACjC,MAAmC;sDAAhC,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,SAAA,CAAA,CAAA,EAAA,CAAA,YAAA;;;;AAEL,kBAAAR,kBAAA,CAAI,2BAAA,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,wCAAA,EAAA,EAAA,IAAA,EAAA,MAAA,CAAA,QAAA,CAAA,OAAA,CAAA,IAAA,IAAA,EAAA,CAAA,EAAA,EAAA,EAAA,MAAA,CAAA,QAAA,CAAA,OAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,EAAA,EAAA,MAAA,CAAA,QAAA,CAAA,OAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,YAAA;AACI,kBAAA,CAAA,QAAA,CAAA,OAAA,CAAA,gBAAA;AAAR,uBAAAS,SAAA,EAAA,EAAAJ,kBAAA,mCACE,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,eAAA,CAAA,CAAA,GAAA,IAAA,GAAAJ,eAAA,CAAA,QAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CnRetentionWidget.vue3.js","sources":["../../../../src/components/CnRetentionWidget/CnRetentionWidget.vue?vue&type=template&id=0746dcfd&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-retention\" data-testid=\"cn-retention\">\n\t\t<header class=\"cn-retention__head\">\n\t\t\t<div class=\"cn-retention__head-text\">\n\t\t\t\t<h3 class=\"cn-retention__title\">\n\t\t\t\t\t{{ text(content.title) || t('nextcloud-vue', 'Archiving') }}\n\t\t\t\t</h3>\n\t\t\t\t<p class=\"cn-retention__muted\">\n\t\t\t\t\t{{ text(content.subtitle) || t('nextcloud-vue', 'What happens to this record once it is closed') }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Recompute starts in the header (board DqZaakArchivering); the\n\t\t\t dialog asks for the reason OpenRegister records with it. -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"content.recompute !== false && !loading && !error\"\n\t\t\t\t:disabled=\"!mayRecompute || busy\"\n\t\t\t\t:title=\"mayRecompute ? undefined : t('nextcloud-vue', 'Recomputing needs the archivist role')\"\n\t\t\t\t:aria-description=\"mayRecompute ? undefined : t('nextcloud-vue', 'Recomputing needs the archivist role')\"\n\t\t\t\t:data-testid=\"mayRecompute ? 'cn-retention-recompute-open' : 'cn-retention-recompute-denied'\"\n\t\t\t\t@click=\"recomputeOpen = true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Refresh :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Recompute nomination') }}\n\t\t\t</NcButton>\n\t\t</header>\n\t\t<CnRetentionRecomputeDialog\n\t\t\tv-if=\"recomputeOpen\"\n\t\t\t:user=\"currentUid\"\n\t\t\t:busy=\"busy\"\n\t\t\t@close=\"recomputeOpen = false\"\n\t\t\t@confirm=\"recompute\" />\n\n\t\t<NcLoadingIcon v-if=\"loading\" :size=\"24\" />\n\t\t<NcEmptyContent v-else-if=\"error\"\n\t\t\t:name=\"t('nextcloud-vue', 'The archival facts are unavailable')\"\n\t\t\t:description=\"error\"\n\t\t\tdata-testid=\"cn-retention-error\">\n\t\t\t<template #action>\n\t\t\t\t<NcButton data-testid=\"cn-retention-retry\" @click=\"load\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Try again') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\n\t\t<template v-else>\n\t\t\t<p v-if=\"archived\" class=\"cn-retention__archived\" data-testid=\"cn-retention-archived\">\n\t\t\t\t{{ t('nextcloud-vue', 'Archived on {at} by {by}. {reason}', { at: String(archived.at ?? ''), by: String(archived.by ?? ''), reason: String(archived.reason ?? '') }) }}\n\t\t\t</p>\n\t\t\t<NcNoteCard v-if=\"disagrees\" type=\"warning\" data-testid=\"cn-retention-disagreement\">\n\t\t\t\t{{ t('nextcloud-vue', 'This record and OpenRegister do not agree on whether it is archived.') }}\n\t\t\t</NcNoteCard>\n\n\t\t\t<NcNoteCard v-if=\"nomination && nomination.status === 'unnominatable'\" type=\"warning\" data-testid=\"cn-retention-unnominatable\">\n\t\t\t\t{{ t('nextcloud-vue', 'Nothing could decide what happens to this record.') }}\n\t\t\t\t{{ String(nomination.unnominatableReason ?? '') }}\n\t\t\t</NcNoteCard>\n\t\t\t<div v-else-if=\"!nomination\" data-testid=\"cn-retention-pending\">\n\t\t\t\t<dl class=\"cn-retention__facts\">\n\t\t\t\t\t<div v-for=\"fact in pendingFacts\" :key=\"fact.key\" class=\"cn-retention__fact\">\n\t\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t\t<dd>{{ fact.value }}</dd>\n\t\t\t\t\t</div>\n\t\t\t\t</dl>\n\t\t\t\t<NcNoteCard type=\"info\">\n\t\t\t\t\t{{ text(content.pendingNote) || t('nextcloud-vue', 'This record has not been closed yet. Its archival future is recorded when it closes.') }}\n\t\t\t\t</NcNoteCard>\n\t\t\t</div>\n\t\t\t<dl v-else class=\"cn-retention__facts\" data-testid=\"cn-retention-facts\">\n\t\t\t\t<div v-for=\"fact in facts\" :key=\"fact.key\" class=\"cn-retention__fact\">\n\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t<dd :data-testid=\"`cn-retention-${fact.key}`\">\n\t\t\t\t\t\t{{ fact.value }}\n\t\t\t\t\t</dd>\n\t\t\t\t</div>\n\t\t\t</dl>\n\n\t\t\t<section v-if=\"content.legalHold\" class=\"cn-retention__section\" data-testid=\"cn-retention-hold\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Kept for a procedure') }}\n\t\t\t\t</component>\n\t\t\t\t<ul class=\"cn-retention__rows\">\n\t\t\t\t\t<li v-for=\"hold in holds\" :key=\"hold.id\" class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark cn-retention__mark--hold\" aria-hidden=\"true\">LH</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ hold.reason || t('nextcloud-vue', 'Legal hold') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ t('nextcloud-vue', 'Placed on {date} by {by}', { date: hold.placedDate, by: hold.placedBy }) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"t('nextcloud-vue', 'Active')\" variant=\"warning\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li v-if=\"holds.length === 0\" class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark cn-retention__mark--hold\" aria-hidden=\"true\">LH</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ t('nextcloud-vue', 'No legal hold') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ t('nextcloud-vue', 'If an objection or appeal runs, destruction is suspended') }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"t('nextcloud-vue', 'None')\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<section v-if=\"content.transfer\" class=\"cn-retention__section\" data-testid=\"cn-retention-transfer\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Transfer to the e-Depot') }}\n\t\t\t\t</component>\n\t\t\t\t<ul class=\"cn-retention__rows\">\n\t\t\t\t\t<li class=\"cn-retention__row\">\n\t\t\t\t\t\t<span class=\"cn-retention__mark\" aria-hidden=\"true\">ED</span>\n\t\t\t\t\t\t<span class=\"cn-retention__row-text\">\n\t\t\t\t\t\t\t<span class=\"cn-retention__row-title\">{{ transfers ? t('nextcloud-vue', 'Goes to the e-Depot') : t('nextcloud-vue', 'Not applicable') }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-retention__muted\">{{ transfers ? t('nextcloud-vue', 'After the retention period the record is transferred') : t('nextcloud-vue', 'Only records appraised to keep go to the e-Depot') }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnStatusBadge :label=\"transfers ? t('nextcloud-vue', 'Transfer') : t('nextcloud-vue', 'No transfer')\" :variant=\"transfers ? 'info' : 'default'\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<div v-if=\"outcome\" class=\"cn-retention__outcome\" data-testid=\"cn-retention-outcome\">\n\t\t\t\t<component :is=\"innerHeadingTag\" class=\"cn-inner-heading\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Outcome') }}\n\t\t\t\t</component>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Handed over as {kind} on {at} by {by}.', { kind: String(outcome.kind ?? ''), at: String(outcome.at ?? ''), by: String(outcome.by ?? '') }) }}</p>\n\t\t\t\t<p v-if=\"outcome.transferListUuid\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Transfer list') }}: {{ outcome.transferListUuid }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton, NcEmptyContent, NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'\nimport Refresh from 'vue-material-design-icons/Refresh.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\nimport CnRetentionRecomputeDialog from './CnRetentionRecomputeDialog.vue'\nimport innerHeading from '../../mixins/innerHeading.js'\nimport { parseDuration } from '../../utils/isoDuration.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'\n\n/**\n * CnRetentionWidget — the `retention` detail widget: what happens to a\n * record when its business use ends, as OpenRegister decided it. Every value\n * is read off the record's `@self._retention` (appraisal, disposal date,\n * retention period, selection list row, the rule and when it was written)\n * and `@self.archived`; the widget derives nothing, so it can never disagree\n * with the stored decision. A failed read is an error with a retry, never an\n * empty block. A record nothing could nominate is drawn apart from one that\n * is not closed yet. An archivist (or an admin) may ask OpenRegister to\n * recompute the nomination, with a reason. Any app on OpenRegister uses it;\n * dossiq's case Archiving tab is the first.\n *\n * `content`:\n * - `title`, `subtitle`: texts, through the host translate.\n * - `statusField`, `archivedValues`: a record field and the values that mean\n * archived (`archiveStatus`, `[\"archived\", ...]`); when set, a mismatch with\n * `@self.archived` is said out loud.\n * - `archivistGroups`: groups that may recompute (default `[\"archivaris\"]`;\n * admins always may); `recompute: false` hides the control.\n * - `expected`: before the record closes, the outcome its type expects.\n * `source: { register, schema, filter }` lists the candidate rules (a case\n * type's result types, `filter` tokens such as `@object.caseType`\n * resolved against the record); `fields: { appraisal, period,\n * selectionListRow }` names their fields; `appraisalLabels` names the\n * appraisal values; `periodText` writes the period (`{period} after the\n * decision`); `decidedBy` says who decides. When the candidates agree the\n * facts show that outcome, otherwise \"Depends on the result\". A failed\n * read keeps the plain facts.\n * - `pendingNote`: the note under the facts of a record not closed yet.\n * - `legalHold: true`: a section with the record's active legal holds\n * (`@self._retention.legalHold.holds`), or that none applies.\n * - `transfer: { keepValues }`: a section saying whether the record goes to\n * the e-Depot, from the stored or expected appraisal.\n *\n * The record is read fresh from OpenRegister by `register`, `schema` and\n * `objectId` (props, else the bound record's `@self`).\n */\nexport default {\n\tname: 'CnRetentionWidget',\n\n\tcomponents: { CnRetentionRecomputeDialog, CnStatusBadge, NcButton, NcEmptyContent, NcLoadingIcon, NcNoteCard, Refresh },\n\n\tmixins: [innerHeading],\n\n\tinject: {\n\t\t/** The host app's translate (CnAppRoot `cnTranslate`). */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's configuration (see the component docs).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The bound record, on a detail page.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The record's register (else the bound record's `@self.register`). */\n\t\tregister: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The record's schema (else the bound record's `@self.schema`); a schema object gives its slug.\n\t\t *\n\t\t * @type {string|number|object}\n\t\t */\n\t\tschema: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's id (else the bound record's). */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: true,\n\t\t\terror: '',\n\t\t\trecord: null,\n\t\t\t/** Whether the recompute dialog is open. */\n\t\t\trecomputeOpen: false,\n\t\t\tbusy: false,\n\t\t\t/** The candidate rules `content.expected` reads, null until read or when unreadable. */\n\t\t\texpectedRows: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {object} The bound record's `@self`. */\n\t\tboundSelf() {\n\t\t\treturn (this.objectData && this.objectData['@self']) || {}\n\t\t},\n\n\t\t/** @return {string} The record id. */\n\t\tid() {\n\t\t\treturn String(this.objectId || (this.objectData && this.objectData.id) || this.boundSelf.id || '')\n\t\t},\n\n\t\t/** @return {string} The register. */\n\t\tregisterRef() {\n\t\t\treturn String(this.register || this.boundSelf.register || '')\n\t\t},\n\n\t\t/** @return {string} The schema. */\n\t\tschemaRef() {\n\t\t\tconst s = this.schema || this.boundSelf.schema || ''\n\t\t\treturn String(typeof s === 'object' ? (s.slug || s.id || '') : s)\n\t\t},\n\n\t\t/** @return {object} The record's `@self`. */\n\t\tself() {\n\t\t\treturn (this.record && this.record['@self']) || {}\n\t\t},\n\n\t\t/** @return {object|null} OpenRegister's stored retention decision. */\n\t\tretention() {\n\t\t\treturn this.self._retention || null\n\t\t},\n\n\t\t/** @return {object|null} The nomination. */\n\t\tnomination() {\n\t\t\treturn (this.retention && this.retention.nomination) || null\n\t\t},\n\n\t\t/** @return {object|null} The hand-over outcome. */\n\t\toutcome() {\n\t\t\treturn (this.retention && this.retention.outcome) || null\n\t\t},\n\n\t\t/** @return {object|null} OpenRegister's archived marker. */\n\t\tarchived() {\n\t\t\treturn this.self.archived || null\n\t\t},\n\n\t\t/**\n\t\t * Whether the record's own field and the platform marker disagree.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {boolean}\n\t\t */\n\t\tdisagrees() {\n\t\t\tconst field = this.content.statusField\n\t\t\tif (!field || !this.record) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst values = Array.isArray(this.content.archivedValues) ? this.content.archivedValues.map(String) : ['archived']\n\t\t\tconst saysArchived = values.includes(String(readPath(this.record, field) ?? ''))\n\t\t\treturn saysArchived !== Boolean(this.archived)\n\t\t},\n\n\t\t/**\n\t\t * The stored facts that have a value, in reading order.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {Array<{key: string, label: string, value: string}>}\n\t\t */\n\t\tfacts() {\n\t\t\tconst r = this.retention || {}\n\t\t\tconst n = this.nomination || {}\n\t\t\treturn [\n\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: r.appraisal },\n\t\t\t\t{ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: r.disposalDate },\n\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: r.retentionPeriod },\n\t\t\t\t{ key: 'selection-list-row', label: t('nextcloud-vue', 'Selection list row'), value: r.selectionListRow },\n\t\t\t\t{ key: 'rule', label: t('nextcloud-vue', 'Decided by'), value: n.rule },\n\t\t\t\t{ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: n.at },\n\t\t\t].filter((fact) => fact.value !== undefined && fact.value !== null && fact.value !== '').map((fact) => ({ ...fact, value: String(fact.value) }))\n\t\t},\n\n\t\t/**\n\t\t * The outcome the record's type expects before it closes: the agreed\n\t\t * appraisal, period and selection list row of the candidate rules, or\n\t\t * `mixed` when they disagree; null when nothing was read.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {{appraisal: string, period: string, selectionListRow: string, mixed: boolean}|null}\n\t\t */\n\t\texpectedOutcome() {\n\t\t\tconst rows = this.expectedRows\n\t\t\tif (!Array.isArray(rows) || rows.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst fields = { appraisal: 'appraisal', period: 'period', selectionListRow: 'selectionListRow', ...(this.content.expected?.fields || {}) }\n\t\t\tconst pick = (row, key) => String(readPath(row, fields[key]) ?? '')\n\t\t\tconst outcomes = rows.map((row) => ({ appraisal: pick(row, 'appraisal'), period: pick(row, 'period'), selectionListRow: pick(row, 'selectionListRow') }))\n\t\t\tconst first = outcomes[0]\n\t\t\tconst agree = outcomes.every((o) => o.appraisal === first.appraisal && o.period === first.period)\n\t\t\tif (first.appraisal === '' && first.period === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn agree\n\t\t\t\t? { ...first, selectionListRow: outcomes.every((o) => o.selectionListRow === first.selectionListRow) ? first.selectionListRow : '', mixed: false }\n\t\t\t\t: { appraisal: '', period: '', selectionListRow: '', mixed: true }\n\t\t},\n\n\t\t/**\n\t\t * The facts of a record not closed yet: the expected outcome where the\n\t\t * type gives one, \"decided when it closes\" otherwise.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {Array<{key: string, label: string, value: string}>}\n\t\t */\n\t\tpendingFacts() {\n\t\t\tconst atClosure = t('nextcloud-vue', 'Decided when it closes')\n\t\t\tconst expected = this.expectedOutcome\n\t\t\tif (!expected) {\n\t\t\t\treturn [\n\t\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: atClosure },\n\t\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: atClosure },\n\t\t\t\t\t{ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: atClosure },\n\t\t\t\t\t{ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: t('nextcloud-vue', 'Not yet') },\n\t\t\t\t]\n\t\t\t}\n\t\t\tconst depends = t('nextcloud-vue', 'Depends on the result')\n\t\t\tconst config = this.content.expected || {}\n\t\t\tconst facts = [\n\t\t\t\t{ key: 'appraisal', label: t('nextcloud-vue', 'Appraisal'), value: expected.mixed ? depends : this.appraisalLabel(expected.appraisal) },\n\t\t\t\t{ key: 'retention-period', label: t('nextcloud-vue', 'Retention period'), value: expected.mixed ? depends : this.periodLabel(expected.period) },\n\t\t\t]\n\t\t\tif (expected.selectionListRow) {\n\t\t\t\tfacts.push({ key: 'selection-list-row', label: t('nextcloud-vue', 'Selection list row'), value: expected.selectionListRow })\n\t\t\t}\n\t\t\tfacts.push({ key: 'disposal-date', label: t('nextcloud-vue', 'Disposal date'), value: atClosure })\n\t\t\tif (config.decidedBy) {\n\t\t\t\tfacts.push({ key: 'rule', label: t('nextcloud-vue', 'Decided by'), value: this.text(config.decidedBy) })\n\t\t\t}\n\t\t\tfacts.push({ key: 'decided-at', label: t('nextcloud-vue', 'Written on'), value: t('nextcloud-vue', 'Not yet') })\n\t\t\treturn facts.filter((fact) => fact.value !== '')\n\t\t},\n\n\t\t/** @return {Array<{id: string, reason: string, placedBy: string, placedDate: string}>} The active legal holds. */\n\t\tholds() {\n\t\t\tconst hold = (this.retention && this.retention.legalHold) || {}\n\t\t\tconst list = Array.isArray(hold.holds) ? hold.holds : []\n\t\t\treturn list.map((h, index) => ({ id: String(h.id ?? index), reason: String(h.reason ?? ''), placedBy: String(h.placedBy ?? ''), placedDate: String(h.placedDate ?? '') }))\n\t\t},\n\n\t\t/**\n\t\t * Whether the record goes to the e-Depot: its stored appraisal, else\n\t\t * the expected one, is one of `transfer.keepValues`.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\ttransfers() {\n\t\t\tconst keep = Array.isArray(this.content.transfer?.keepValues) ? this.content.transfer.keepValues.map(String) : ['bewaren', 'blijvend_bewaren', 'retain', 'keep']\n\t\t\tconst stored = this.retention && this.retention.appraisal\n\t\t\tconst appraisal = stored || (this.expectedOutcome && !this.expectedOutcome.mixed ? this.expectedOutcome.appraisal : '')\n\t\t\treturn keep.includes(String(appraisal || ''))\n\t\t},\n\n\t\t/** @return {string} The signed-in user's id. */\n\t\tcurrentUid() {\n\t\t\tconst user = getCurrentUser()\n\t\t\treturn String((user && user.uid) || '')\n\t\t},\n\n\t\t/**\n\t\t * Whether this user may recompute: an admin or an archivist group member.\n\t\t * Shown disabled otherwise, so the user learns which role it needs.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tmayRecompute() {\n\t\t\tconst user = getCurrentUser()\n\t\t\tif (user && user.isAdmin === true) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tconst groups = Array.isArray(user && user.groups) ? user.groups : []\n\t\t\tconst allowed = Array.isArray(this.content.archivistGroups) ? this.content.archivistGroups : ['archivaris']\n\t\t\treturn allowed.some((g) => groups.includes(g))\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.load()\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * A config text through the host translate.\n\t\t *\n\t\t * @param {unknown} value The text.\n\t\t * @return {string}\n\t\t */\n\t\ttext(value) {\n\t\t\treturn typeof value === 'string' && value !== '' ? this.cnTranslate(value) : ''\n\t\t},\n\n\t\t/**\n\t\t * An appraisal value in words, through `expected.appraisalLabels`.\n\t\t *\n\t\t * @param {string} value The stored value.\n\t\t * @return {string}\n\t\t */\n\t\tappraisalLabel(value) {\n\t\t\tconst labels = this.content.expected?.appraisalLabels || {}\n\t\t\treturn labels[value] ? this.text(labels[value]) : value\n\t\t},\n\n\t\t/**\n\t\t * An ISO period in words (\"5 years\"), placed in `expected.periodText`.\n\t\t *\n\t\t * @param {string} value The ISO 8601 duration.\n\t\t * @return {string}\n\t\t */\n\t\tperiodLabel(value) {\n\t\t\tconst parsed = parseDuration(value)\n\t\t\tconst words = parsed\n\t\t\t\t? {\n\t\t\t\t\t\tyears: () => n('nextcloud-vue', '%n year', '%n years', parsed.amount),\n\t\t\t\t\t\tmonths: () => n('nextcloud-vue', '%n month', '%n months', parsed.amount),\n\t\t\t\t\t\tweeks: () => n('nextcloud-vue', '%n week', '%n weeks', parsed.amount),\n\t\t\t\t\t\tdays: () => n('nextcloud-vue', '%n day', '%n days', parsed.amount),\n\t\t\t\t\t}[parsed.unit]\n\t\t\t\t: null\n\t\t\tconst period = words ? words() : value\n\t\t\tconst template = this.content.expected?.periodText\n\t\t\treturn template ? this.text(template).replace('{period}', period) : period\n\t\t},\n\n\t\t/**\n\t\t * Read the record fresh from OpenRegister; a failure is an error, never an empty block.\n\t\t *\n\t\t * @spec openspec/changes/retention-widget/specs/retention-widget/spec.md#requirement-a-record-shows-its-stored-retention\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync load() {\n\t\t\tthis.loading = true\n\t\t\tthis.error = ''\n\t\t\ttry {\n\t\t\t\tif (!this.registerRef || !this.schemaRef || !this.id) {\n\t\t\t\t\tthrow new Error(t('nextcloud-vue', 'This widget has no record to read.'))\n\t\t\t\t}\n\t\t\t\tconst { data } = await axios.get(generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(this.registerRef)}/${encodeURIComponent(this.schemaRef)}/${encodeURIComponent(this.id)}`))\n\t\t\t\tthis.record = data && typeof data === 'object' ? data : null\n\t\t\t\tawait this.loadExpected()\n\t\t\t} catch (failure) {\n\t\t\t\tconst body = failure && failure.response && failure.response.data\n\t\t\t\tthis.error = String((body && (body.message || body.error)) || (failure && failure.message) || failure)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Read the candidate rules `content.expected` names, for a record that\n\t\t * is not nominated yet. A failure leaves the plain pending facts.\n\t\t *\n\t\t * @spec openspec/changes/retention-expected-outcome/specs/retention-widget/spec.md#requirement-an-open-record-shows-the-outcome-its-type-expects\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadExpected() {\n\t\t\tconst source = this.content.expected && this.content.expected.source\n\t\t\tthis.expectedRows = null\n\t\t\tif (!source || !source.register || !source.schema || this.nomination) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst filter = resolveFilterTokens(source.filter || {}, { objectId: this.id, object: this.record })\n\t\t\tif (hasUnresolvedTokens(filter)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.get(generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(source.register)}/${encodeURIComponent(source.schema)}`), { params: { ...filter, _limit: 100 } })\n\t\t\t\tthis.expectedRows = Array.isArray(data?.results) ? data.results : []\n\t\t\t} catch {\n\t\t\t\tthis.expectedRows = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Ask OpenRegister to derive the nomination again with the reason the\n\t\t * dialog asked for, then read it back.\n\t\t *\n\t\t * @spec openspec/changes/retention-recompute-header/specs/retention-recompute-header/spec.md#requirement-recomputing-the-nomination-starts-in-the-card-header-and-asks-for-a-reason\n\t\t * @param {string} reason Why it is recomputed.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync recompute(reason) {\n\t\t\tconst why = String(reason ?? '').trim()\n\t\t\tif (this.busy || why === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\ttry {\n\t\t\t\tawait axios.post(generateUrl(`/apps/openregister/api/archival/objects/${encodeURIComponent(this.id)}/nomination/recompute`), { reason: why })\n\t\t\t\tthis.recomputeOpen = false\n\t\t\t\tawait this.load()\n\t\t\t} catch (failure) {\n\t\t\t\tconst body = failure && failure.response && failure.response.data\n\t\t\t\tthis.error = String((body && (body.message || body.error)) || (failure && failure.message) || failure)\n\t\t\t} finally {\n\t\t\t\tthis.busy = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-retention {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-retention__head {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 10px 16px;\n}\n\n.cn-retention__head-text {\n\tdisplay: flex;\n\tflex: 1 1 260px;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n}\n\n.cn-retention__title {\n\tmargin: 0;\n\tfont-size: 18px;\n\tfont-weight: 700;\n}\n\n.cn-retention__muted {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-retention__facts {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\tgap: 12px 24px;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n/* The server draws every dt as a 130px right-aligned inline block and pads\n dt and dd 12px; a fact is a label over its value. */\n.cn-retention__fact dt,\n.cn-retention__fact dd {\n\tdisplay: block;\n\twidth: auto;\n\twhite-space: normal;\n\ttext-align: start;\n}\n\n.cn-retention__fact dt {\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tline-height: 1.2;\n}\n\n.cn-retention__fact dd {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-weight: 600;\n}\n\n.cn-retention__section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-retention__rows {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-retention__row {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 12px;\n\tpadding: 12px 0;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-retention__row-text {\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n\tline-height: normal;\n}\n\n/* A row's second line is 13px, as the boards draw it (DqZaakArchivering). */\n.cn-retention__row-text .cn-retention__muted {\n\tfont-size: 13px;\n}\n\n/* A round mark before a hold or transfer row: LH (legal hold) on the error\n tint, ED (e-Depot) on the chip ground (DqZaakArchivering). */\n.cn-retention__mark {\n\tdisplay: inline-flex;\n\tflex: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 16px;\n\tbackground: var(--color-background-dark);\n\tcolor: var(--cn-board-text-soft, var(--color-text-maxcontrast));\n\tfont-size: 12px;\n\tfont-weight: 700;\n}\n\n.cn-retention__mark--hold {\n\tbackground: var(--color-error-light, #fcedec);\n\tcolor: var(--color-error-text, #a30000);\n}\n\n.cn-retention__row-title {\n\tfont-size: 15px;\n\tfont-weight: 600;\n}\n\n</style>\n"],"names":["_createElementVNode","_toDisplayString","_createVNode","_createTextVNode","_createBlock","_createElementBlock","_Fragment","_renderList","_resolveDynamicComponent","_openBlock"],"mappings":";;;AASM,EAAA,KAAK,EAAC,cAAc;eAAY,EAAC,cAAc;;AAC7C,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,oBAAA,GAAA;AACA,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,yBAAoB,GAAA;AAC1B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,qBAAqB,GA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AA,YAAA;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import script from './CnTimelineManage.vue2.js';
|
|
|
2
2
|
import { render } from './CnTimelineManage.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-0cd291df";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|