Skip to content

Refactor: Rename 'customer' to 'citizen' and translate German terms to English in waiting statistics #1820

@coderabbitai

Description

@coderabbitai

Description

This PR introduces new customer type constants and methods in the waiting statistics module that use mixed German/English terminology and the term 'customer' which is inconsistent with the civic domain of this e-appointment system.

Changes Needed

1. Rename 'customer' to 'citizen'

The project uses 'citizen' terminology throughout (zmscitizenapi, zmscitizenview), but the new statistics code uses 'customer'. These should be aligned:

In zmsstatistic/src/Zmsstatistic/Download/WaitingReport.php:

  • Rename constants:
    • CUSTOMER_TYPE_GESAMTCITIZEN_TYPE_TOTAL
    • CUSTOMER_TYPE_TERMINCITIZEN_TYPE_SCHEDULED
    • CUSTOMER_TYPE_SPONTANCITIZEN_TYPE_WALK_IN
  • Rename method: assertValidCustomerType()assertValidCitizenType()
  • Rename method: getCustomerTypeKeys()getCitizenTypeKeys()
  • Update parameter names: $customerType$citizenType

2. Translate German string values to English

The constant values use German terms which reduces international maintainability:

  • 'gesamt''total'
  • 'termin''scheduled'
  • 'spontan''walkin'

Files to update:

  • zmsstatistic/src/Zmsstatistic/Download/WaitingReport.php (constant values, method logic)
  • zmsstatistic/src/Zmsstatistic/Helper/ReportHelper.php (if referencing these values)
  • zmsdb/src/Zmsdb/Query/ExchangeWaitingscope.php (suffix logic)
  • zmsdb/src/Zmsdb/Helper/CalculateDailyWaitingStatisticByCron.php (type determination)
  • Any test files referencing these values

Context

Related to PR #1813 which introduced the new total customer statistics functionality.

Backlinks:

Requested by: @ThomasAFink

Priority

Low - This is a code quality/consistency improvement that can be addressed in a future PR.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions