Skip to content

UI - business-ui: Refactor formatter utils #35140

Closed
5 of 5 issues completed
Closed

Description

@deetz99

This is a parent ticket to align all format functionality.

IMPORTANT: Additional changes may be asked in the child tickets relevant to that specific item.

In order to keep our projects maintainable, we should aim to stay consistent across implementations. Additional improvements will still be required but those will be done in the future pending some decisions.

Directory structure

  • Utils to be moved under 'formatters' directory. eg utils/format-share-classes.ts -> utils/formatters/format-share-classes.ts

New Function/s

  • format{SUBJECT}Section
    • should accept optional original data and optional draft data
    • should map and merge the data as necessary to the relevant table state

  • format{SUBJECT}Api
    • converts table state to api payload
    • should return undefined if there are no changes to the data (see offices in corrections - this is so the property will be excluded during json serialization when submitted)

Implementation Refactor

  • Only if necessary - update usage in playground examples and current filings
  • Ensure all current tests pass, dev to add additional relevant to the new utils
  • Dev to ensure they do not introduce new bugs into any current filings (init, save and resume, typecheck, tests, etc should all still work correctly after refactor)

Sub-issues

Sub-issues

5 of 5 Issues completed
Loading 5 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Colin EgressNuxt Layers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions