bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 58 forks source link

UI - Transport Permit (Amend/Cancel on Exempt Home) #21218

Closed LizGovier closed 3 months ago

LizGovier commented 3 months ago

Issue: Currently in DEV and TEST, the user can not amend or cancel a home that was exempt due to a transport permit

Expect Result: Staff and Qualified Suppliers can amend and cancel a transport permit if the home was exempt due to Transport Permit Note: Service BC staff can not cancel a transport permit in any circumstance.

UI Conditions:

Screen Shot 2024-05-10 at 2.48.11 PM.png Screen Shot 2024-05-16 at 11.11.12 AM.png

Figma File

LizGovier commented 3 months ago

@arlentees I've added this to the grooming block

LizGovier commented 3 months ago

Hey team! Please add your planning poker estimate with Zenhub @cameron-eyds @chdivyareddy @dimak1 @doug-lovett

dimak1 commented 3 months ago

Ready for UXA: https://bcregistry-assets-dev--pr-1885-in4p5a3c.web.app/ cc: @LizGovier @saragunnarsson

saragunnarsson commented 3 months ago

Looking good @dimak1 ! The only issue i encountered was submitting an amendment of the transport permit as a QS. I got the below message (MHR number: 108314):

image.png
dimak1 commented 3 months ago

Thanks @saragunnarsson. How did you get to Amend 108314? Amend/Cancel is disabled for QS.

saragunnarsson commented 3 months ago

@dimak1 The description of the ticket is saying that QS and Staff should be able to amend/cancel a permit if the home is exempt due to a Transport Permit. It was exempt and location outside of bc..at first i tried amending, it didn't work. Submitting the cancellation of the permit didn't work either.

doug-lovett commented 3 months ago

@saragunnarsson @dimak1 an API data validation rule is causing the transport permit amendment error: Additional validation: The existing location must be a dealer or manufacturer lot for this registration.

This rule should not fire for transport permit amendments. The fix is tracked under 21002 and is now in DEV. The cancel permit failed because the submitting party was missing in the API request.

LizGovier commented 3 months ago

@saragunnarsson @dimak1 This rule should already be in place, but as a reminder QS can only amend and cancel a permit that they have issued.

Screen Shot 2024-05-22 at 10.31.26 AM.png
dimak1 commented 3 months ago

Thanks @doug-lovett @LizGovier for clarifications. @saragunnarsson, Sara could you please retry and let me know if there is an issue and how to reproduce. Thanks!

saragunnarsson commented 3 months ago

Thanks @doug-lovett and @dimak1

I get the same error when trying to cancel the transport permit.

This is what I'm doing (mhr# 108312):

doug-lovett commented 3 months ago

@saragunnarsson @dimak1 the cancel permit is failing for the same reason as noted above. Here is API error from the log:

{
  "errorMessage": "API backend third party service error.",
  "rootCause": "detail:[Schema validation: 'submittingParty' is a required property.,Additional validation: Submitting Party is required for MH registrations. ],message:003: Registration request data validation errors. "
}
dimak1 commented 3 months ago

@saragunnarsson Thanks Sara, just to clarify, the initial permit cancellation you were trying as QS, which didn't work?

saragunnarsson commented 3 months ago

@dimak1 Yes that's right 👍

dimak1 commented 3 months ago

Fixed in version 3.1.32, pending review and deployment.

dimak1 commented 3 months ago

Fix is ready in DEV. QS Cancel Permit submission should be working now. Thanks!

LizGovier commented 3 months ago

@dimak1 (cc @saragunnarsson )

I was able to cancel a permit as a QS (Manufacturer), but can not test 'Cancel Permit' as a QS Lawyer/Notary (BCREG0018) because I am unable to file a transport permit. Would you like me to create a separate ticket for this Transport Permit Error? This ticket and ticket #21011 would be dependant on it.

dimak1 commented 3 months ago

@LizGovier I reviewed your comment in the other ticket (#21011) and asked Doug if he could update API validation.

LizGovier commented 3 months ago

Hey @dimak1 I was able to amend and cancel a permit on an exempt home for both QS Lawyers/Notary(using BCREG0062) and Manufacture. This is RFQA

/cc @chdivyareddy Do you have access to a Home Dealer account? That was one user I wasn't able to test for. They would have the same rules as Manufactures :

QS - Homedealers

  • File a Transport Permit on a home that is currently stored on their dealer's lot
  • Amend and cancel a transport permit they issued
chdivyareddy commented 3 months ago

Hey @dimak1 , I'm trying to file transport permit in DEV for Home Dealer account (BCREG0049 - ID: 3324) and submission fails with the following error. Please take a look, thanks!! cc @doug-lovett

{ "errorMessage": "API backend third party service error.", "rootCause": "detail:[Additional validation: No existing qualified supplier lot address found. ],message:003: Registration request data validation errors. " }

MHR 108346:

image.png
doug-lovett commented 3 months ago

@chdivyareddy looking at the roles assigned to the JWT for account id 3324 in DEV it is not set up as a QS dealership. Maybe use BCREG0050 id 3249 instead?

chdivyareddy commented 3 months ago

@doug-lovett , I don't recall the qualified supplier lot address submitted for the BCREG0050 account in DEV. Is it possible for you to pull the lot address information? thank you!!

doug-lovett commented 3 months ago

@chdivyareddy I just reviewed the code and that error is only for manufacturer permits so you should not see it for BCREG0050 in DEV.

chdivyareddy commented 3 months ago

@doug-lovett , currently for BCREG0050 (Home dealers), I don't have a registration that is matching the registered qualified supplier lot address, so that I could perform Transport Permits (Transport permit button in the UI is disabled for Home dealers when the lot address don't match). I don't recall the lot address which I have submitted while creating the account so I could create the registration with the same lot address and would be able to file transport permits in BCREG0050 account. Is it possible to pull the account information using API?

https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBOUI1QXc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--e1b5096fe8633495323cfeacc1a1bb66e5e1bee7/Screen%20Shot%202024-02-21%20at%209.21.08%20AM.png

doug-lovett commented 3 months ago

@chdivyareddy here is the service agreement info for account 3249: GET https://bcregistry-dev.apigee.net/mhr/api/v1/qualified-suppliers with the 3249 JWT

{
  "address": {
    "city": "KAMLOOPS",
    "country": "CA",
    "postalCode": "V2H 1L1",
    "region": "BC",
    "street": "4236 SABISTON RD"
  },
  "authorizationName": "BCREGTEST MOSES FIFTY",
  "businessName": "INCENTA MARKETING GROUP INC.",
  "dbaName": "ALAN SERVICES LIMITED",
  "partyType": "CONTACT",
  "phoneExtension": "1",
  "phoneNumber": "9385982395",
  "termsAccepted": false
}
chdivyareddy commented 3 months ago

@doug-lovett Great, thank you so much...it worked:)

Verified in DEV!

Home Dealers: 108347

image.png

Staff: 108344

image.png

QS - Lawyers and Notaries: 108325

image.png

QS - Home Manufacturers: 108338

image.png