diff --git a/openspec/changes/zaaktype-configuratie/.openspec.yaml b/openspec/changes/zaaktype-configuratie/.openspec.yaml index 07c123a..d8b0ed0 100644 --- a/openspec/changes/zaaktype-configuratie/.openspec.yaml +++ b/openspec/changes/zaaktype-configuratie/.openspec.yaml @@ -1,2 +1,2 @@ -status: proposed -created: "2026-03-20" +schema: spec-driven +created: 2026-03-20 diff --git a/openspec/changes/zaaktype-configuratie/design.md b/openspec/changes/zaaktype-configuratie/design.md new file mode 100644 index 0000000..8259f29 --- /dev/null +++ b/openspec/changes/zaaktype-configuratie/design.md @@ -0,0 +1,6 @@ +# Zaaktype Configuratie Design + +## Components +1. **DurationPicker.vue** - User-friendly ISO 8601 duration picker with presets +2. **CaseTypeDetail.vue** - Enhanced with publish validation, active case warnings +3. **GeneralTab.vue** - Enhanced with DurationPicker for deadline fields diff --git a/openspec/changes/zaaktype-configuratie/proposal.md b/openspec/changes/zaaktype-configuratie/proposal.md index 08e9cba..76238ea 100644 --- a/openspec/changes/zaaktype-configuratie/proposal.md +++ b/openspec/changes/zaaktype-configuratie/proposal.md @@ -1,15 +1,10 @@ -## Why +# Zaaktype Configuratie Implementation -Zaaktype Configuratie Specification is not yet implemented in Procest. This change proposes adding this capability based on the detailed spec in `specs/zaaktype-configuratie/spec.md`. +## Summary +Implement V1 configuration UI improvements: duration picker component, publish validation with Dutch error messages, active case count warnings, and inline validation feedback. -**Feature tier**: V1 (basic CRUD UI, status diagram editor, document type config, property definition config, role type config, result type config), V2 (visual flow designer, import/export, ZTC sync, versioning, test mode) - -## What Changes - -See `specs/zaaktype-configuratie/spec.md` for full requirements and scenarios. - -## Impact - -- **Code**: New frontend views and/or backend services -- **Dependencies**: OpenRegister (data storage), Nextcloud platform APIs -- **Testing**: Unit tests for new services, integration tests for API endpoints +## Scope +- REQ-ZTC-01: Publish validation with Dutch error messages +- REQ-ZTC-02: Status diagram visual enhancement (color indicators) +- REQ-ZTC-11: Tab item counts, inline validation +- REQ-ZTC-12: Duration picker component for processing deadline diff --git a/openspec/changes/zaaktype-configuratie/tasks.md b/openspec/changes/zaaktype-configuratie/tasks.md new file mode 100644 index 0000000..3428159 --- /dev/null +++ b/openspec/changes/zaaktype-configuratie/tasks.md @@ -0,0 +1,6 @@ +# Tasks + +- [x] TASK-ZC-01: Create DurationPicker.vue component +- [x] TASK-ZC-02: Integrate DurationPicker into GeneralTab.vue +- [x] TASK-ZC-03: Add active case count warning to CaseTypeDetail.vue +- [x] TASK-ZC-04: Improve publish validation with Dutch error messages diff --git a/src/views/settings/CaseTypeDetail.vue b/src/views/settings/CaseTypeDetail.vue index ca7f3a4..b871172 100644 --- a/src/views/settings/CaseTypeDetail.vue +++ b/src/views/settings/CaseTypeDetail.vue @@ -37,22 +37,27 @@ + +
+

{{ t('procest', 'There are {count} active cases of this type. Changes will only apply to new cases.', { count: activeCaseCount }) }}

+
+

{{ t('procest', 'Cannot publish:') }}

-

- {{ saveError }} +

+ {{ saveError }}

-

- {{ t('procest', 'Saved successfully') }} +

+ {{ t('procest', 'Saved successfully') }}

@@ -151,6 +156,7 @@ export default { validationErrors: {}, publishErrors: [], statusTypes: [], + activeCaseCount: 0, } }, computed: { @@ -182,6 +188,16 @@ export default { if (data) { this.form = { ...EMPTY_FORM, ...data } } + // Count active cases of this type + try { + const cases = await this.objectStore.fetchCollection('case', { + '_filters[caseType]': this.caseTypeId, + _limit: 1, + }) + this.activeCaseCount = cases?.length || 0 + } catch (e) { + this.activeCaseCount = 0 + } this.loadingDetail = false }, @@ -280,6 +296,15 @@ export default { gap: 8px; } +.case-type-detail__warning { + background: var(--color-warning-light, rgba(var(--color-warning-rgb), 0.1)); + border: 1px solid var(--color-warning); + border-radius: var(--border-radius); + padding: 12px; + margin-bottom: 16px; + color: var(--color-warning-text); +} + .case-type-detail__publish-errors { background: var(--color-error-light, rgba(var(--color-error-rgb), 0.1)); border: 1px solid var(--color-error); diff --git a/src/views/settings/components/DurationPicker.vue b/src/views/settings/components/DurationPicker.vue new file mode 100644 index 0000000..73ad544 --- /dev/null +++ b/src/views/settings/components/DurationPicker.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/src/views/settings/tabs/GeneralTab.vue b/src/views/settings/tabs/GeneralTab.vue index 9dcede0..7a5ab14 100644 --- a/src/views/settings/tabs/GeneralTab.vue +++ b/src/views/settings/tabs/GeneralTab.vue @@ -78,23 +78,21 @@
- + preset-type="deadline" + @input="v => $emit('update', 'processingDeadline', v)" /> + {{ errors.processingDeadline }}
- + preset-type="deadline" + @input="v => $emit('update', 'serviceTarget', v)" /> + {{ errors.serviceTarget }}
@@ -109,12 +107,11 @@
- + preset-type="extension" + @input="v => $emit('update', 'extensionPeriod', v)" /> + {{ errors.extensionPeriod }}
@@ -199,6 +196,7 @@ import { NcTextField, NcSelect, NcCheckboxRadioSwitch } from '@nextcloud/vue' import { formatDuration } from '../../../utils/durationHelpers.js' import { getOriginOptions, getConfidentialityOptions } from '../../../utils/caseTypeValidation.js' +import DurationPicker from '../components/DurationPicker.vue' export default { name: 'GeneralTab', @@ -206,6 +204,7 @@ export default { NcTextField, NcSelect, NcCheckboxRadioSwitch, + DurationPicker, }, props: { form: {