Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for woodlot licensees #659

Open
7 tasks done
gormless87 opened this issue Jul 16, 2024 · 18 comments
Open
7 tasks done

Add support for woodlot licensees #659

gormless87 opened this issue Jul 16, 2024 · 18 comments
Assignees

Comments

@gormless87
Copy link
Collaborator

gormless87 commented Jul 16, 2024

Describe the task
Add support for woodlot licensees to enter their woodlot number instead of FSP ID

Acceptance Criteria

  • add 2 new database columns with correct types and size
  • update FOM Admin for create/edit/view/ and FOM summary pages
  • add frontend validations
  • update FOM Public for FOM details pages
  • data migration to adjust existing data for default license type
  • backend validation for license number
  • search result to include Woodlot License number at Plan Number column (previous FSP ID column)

Additional context

Image

Image

Image

Image

@OlgaLiber2
Copy link
Collaborator

Image
Image
Image
Image

@OlgaLiber2
Copy link
Collaborator

OlgaLiber2 commented Jul 17, 2024

Checked with Sean and a woodlot license is a combination of numbers and letters, always 5 characters total (W followed by 4 numbers).
Example: W1841; W0007, W2044

@ianliuwk1019 ianliuwk1019 self-assigned this Jul 22, 2024
@ianliuwk1019
Copy link
Collaborator

ianliuwk1019 commented Jul 22, 2024

Hi @basilv ,

I will crate a new code table "project_plan_code" to hold two code ("WOODLOT", "FSP") values.
And add two new columns in app_fom.project table: "project_plan_code" column and "woodlot_plan_number" column (VARCHAR(5)).
Does the table/column naming make sense to you?

@MCatherine1994

@ianliuwk1019
Copy link
Collaborator

Hi @OlgaLiber2 ,
Is there existing woodlot license FOMs in production(if you or Shan/Julius knows), and do you know what they entered at FSP field?

@ianliuwk1019
Copy link
Collaborator

ianliuwk1019 commented Jul 25, 2024

Hi @OlgaLiber2 ,
On "Admin" side, we might have an issue on search result table after adding another "plan type" (Woodlot License Plan) than initial FSP plan for FOM.

This is my local implementation screenshot:
Image

The result table has:

  • a FSP ID result column: and since we add another plan type (Woodlot License Plan), how do they (Julius/Shan) like to label this column and display the woodlot license number?
  • a FSP ID search field: FOM has this existing search field. If we add another plan type, do they (Julius/Shan) also like to let user search by the woodlot license number? (for now I ignore this as not to make ticket become too big).
  • any consideration for future new plan type with admin search UI design?

I guess probably the above questions might need some discussion with Julius/Shan.

These are draft pr links in dev environment:
public: https://fom-11.apps.silver.devops.gov.bc.ca/public
admin: https://fom-11.apps.silver.devops.gov.bc.ca/admin

@Kghiya @basilv

@basilv
Copy link
Collaborator

basilv commented Jul 25, 2024

One simple option is to change the column to Plan ID and add FSP # or WL # as prefix in the column values. The search by FSP ID could be left as-is, as long as its logic is correct to ignore woodlot licenses.

@OlgaLiber2
Copy link
Collaborator

That's all good questions @ianliuwk1019 Those are all design so I will let @Kghiya look into it and work with you.

@Kghiya
Copy link

Kghiya commented Jul 29, 2024

Mock up link

@OlgaLiber2 I have 2 options for you to select from

@ianliuwk1019
Copy link
Collaborator

I will modify previous "FSP ID" column based on the new Mock up link but label it as "Plan Number" instead of "ID" (to be similar like FOM Number) and use "WL #" as prefix rather than "WLN #".

@ianliuwk1019
Copy link
Collaborator

ianliuwk1019 commented Jul 29, 2024

Current FOM Production existing fsp_id;

fom=# select p.fsp_id from app_fom.project p group by p.fsp_id order by p.fsp_id asc;
 fsp_id 
--------
     10
     11
     14
     17
     24
     26
     32
     51
     55
     58
     76
     93
     96
    102
    109
    111
    119
    142
    144
    181
    214
    240
    336
    379
    408
    448
    488
    523
    584
    620
    625
    630
    631
    632
    637
    640
    641
    643
    644
    645
    649
    651
    660
    671
    672
    675
    684
    687
    692
    694
    696
    705
    707
    729
    730
    731
    733
    738
    740
    742
    743
    755
    758
    759
    761
    771
    773
    774
    780
    782
    784
    786
    787
    790
    801
    803
    806
    807
    812
    816
    822
    823
    825
    828
    836
    837
    840
    851
    852
    855
    858
    868
    872
    873
    875
    881
    882
    891
    892
    895
    897
    902
    903
    905
    914
    930
    936
    941
    943
    944
    946
    948
    958
    959
    960
    962
    980
    981
    984
    992
    999
   1234
   1271
 115364

Wonder if there is number(s) in PROD that's for existing Woodlot FOM(s) or if not, then we are good. Should we ask Julius/Shan (I don't see 000 because the existing datatype is an Integer)?
@basilv @OlgaLiber2

@basilv
Copy link
Collaborator

basilv commented Jul 30, 2024

I suspect the 115364 FSP ID is likely an incorrect entry, by the way. And the query should return a value of "0", so if it doesn't I suspect that's because there are no woodlot licenses having created any FOM.

@OlgaLiber2
Copy link
Collaborator

@ianliuwk1019 @basilv
I confirmed with Sean that there are no FOM submission from woodlot licensees so far.

ianliuwk1019 added a commit that referenced this issue Aug 1, 2024
* Add new migration script for project_plan_code table and woodlot_plan_number column

* Add projecrt-plan entity

* Add new columns 'woodlotPlanNumber' and 'projectPlanCode' to project entity.

* Add projectPlan and woodlotPlanNumber properties to request/response dto.

* Add ProjectPlanCode to project module

* Update swagger and gen new api client.

* Rename woodlotLicenseNumber column

* Add woodlotLicenseNumber and fsp fom field and validations.

* Rest fields when plan selection change.

* Remove console log

* Update projectPlan to projectPlanCode

* Fix column mapping

* Add readonly fields

* Add WOODLOT to summary

* Add woodlot license to view detail

* Add woodlotLicenseNumber and projectPlanCode fields to publicSummary

* Use projectPlanCodeEnum in page so no need to hardcode.

* Fix some background-color for search result table

* Remove unused projectPlanDescription

* Fix test

* Open FSP and Woodlot# for edit.

* Add getProjectPlanNumber()

* Remove commented out coede.

* Fix indentation.

* Fix script mistake.

* Update swagger after merging from main

* Add woodlot/fsp_id condition rendering for public notice.

* align number to center
@ianliuwk1019
Copy link
Collaborator

TEST deployment is done. Please have a look:
Admin: https://fom-test.nrs.gov.bc.ca/admin
Public: https://fom-test.nrs.gov.bc.ca/public

Thanks @OlgaLiber2 !

@OlgaLiber2
Copy link
Collaborator

@ianliuwk1019 do you have a FOM number with Woodlot license published in test to look at?

@ianliuwk1019
Copy link
Collaborator

@ianliuwk1019 do you have a FOM number with Woodlot license published in test to look at?

Hi @OlgaLiber2 , I added one yesterday in TEST environment. (FOM:100385)

@OlgaLiber2
Copy link
Collaborator

@ianliuwk1019 It looks good. Just one thing. I think we can remove the "WL #" prefix from the table (in the UI). So it shows W4321 under Plan number.

Capture-WL

@ianliuwk1019
Copy link
Collaborator

Hi @OlgaLiber2 ,
Hope the FSP ones prefix with "FSP" looks ok for you with no "WL #" for woodlot together:
Image

@OlgaLiber2
Copy link
Collaborator

@ianliuwk1019 Ah, ok. I didn't realize FSP was prefixed with FSP #. So that makes sense to have WL #....
Sorry for the confusion

@OlgaLiber2 OlgaLiber2 removed the task label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants