bcgov / bcgov/entity

Filings-UI: Remove duplication and separate concerns in FutureEffective.vue and FutureEffectivePending.vue

Open
#15,822 0 comments 0 reactions 0 assignees View on GitHub
ENTITY - DO NOT USE techdebt
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

## What is the problem?
At present, the FutureEffective.vue component includes multiple concerns:

```javascript


{{_.subtitle}}


The {{_.filingLabel}} date and time for {{getLegalName || 'this company'}}
will be {{effectiveDateTime}}.


Court Order Number: {{filing.courtOrderNumber}}


Pursuant to a Plan of Arrangement


If you wish to change the information in this {{_.filingLabel}}, you must contact BC
Registries staff to file a withdrawal. Withdrawing this {{_.filingTitle}} will remove
this {{_.filingLabel}} and all associated information, and will incur a $20.00 fee.

BC Registries Contact Information:


```

## What is the impact?
Because we're mixing concerns, the logic has to be duplicated in other components, for example, there are a lot of similarities with the FutureEffectivePending component:

```javascript


{{_.subtitle}}


The {{_.filingLabel}} date and time for {{getLegalName || 'this company'}}
has been recorded as {{effectiveDateTime}}.


Court Order Number: {{filing.courtOrderNumber}}


Pursuant to a Plan of Arrangement


It may take up to one hour to process this filing. If this issue persists,
please contact us.


```

## Proposed solution
Break up component with multiple concerns into tiny components. Like this:
```javascript

{{ subtitle }}







```

Some may argue that small bits of logic don't warrant their own component, but I think as project complexity grows and more developers are added, it's important to be more rigorous in our application of SOLID principles.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.