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

Implemented staff payment #386

Merged
merged 1 commit into from
May 19, 2021
Merged

Conversation

severinbeauvais
Copy link
Collaborator

@severinbeauvais severinbeauvais commented May 18, 2021

Issue #: /bcgov/entity#6554

This is the first part of the UI implementation, so that it can be reviewed by the UX team. Although this is exactly according to the design comps, I expect some changes will be requested. Also, the implementation needs to be completed in a future PR when the namex API is updated to support staff payment data.

Description of changes:

  • imported shared component, enum and interface
  • implemented tabs in Payment modal
  • implemented Staff Payment "interface component" (between tab and shared component)
  • added auth-getter plugin
  • fetched keycloak roles
  • added state/setter/getter for keycloak roles
  • added state/setter/getter for staff payment data
  • added staff-payment feature flag
  • updated app version
  • NB: needs completion when Namex API can handle staff payment data
  • NB: this feature is guarded by a new feature flag (staff-payment-enabled) so that it can be tested in Dev before being completed and released in Test/Prod

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namerequest license (Apache 2.0).

@severinbeauvais severinbeauvais self-assigned this May 18, 2021
@severinbeauvais severinbeauvais force-pushed the 6288 branch 5 times, most recently from af537f5 to 0a3af44 Compare May 19, 2021 16:32
@severinbeauvais severinbeauvais marked this pull request as ready for review May 19, 2021 16:32
- implemented tabs in Payment modal
- implemented Staff Payment "interface component" (between tab and shared component)
- added auth-getter plugin
- fetched keycloak roles
- added state/setter/getter for keycloak roles
- added state/setter/getter for staff payment data
- added staff-payment feature flag
- updated app version
- NB: needs completion when Namex API can handle staff payment data
- NB: this feature is guarded by a new feature flag (staff-payment-enabled) so that it can be tested in Dev before being completed and released in Test/Prod
console.info('Got roles!') // eslint-disable-line no-console
} catch (error) {
// just log the error message
console.log(`Did not get roles (${error.message})`) // eslint-disable-line no-console
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to just log a friendly-looking message here (ie, not the stack trace) since this will happen every time a non-logged-in user loads this app.

onCancel: {
type: Function,
default: async () => {}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced onCancel with a prop decorator/declaration below, and deleted onActivate which is no longer used.

@@ -0,0 +1,103 @@
<template>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I call an "interface component" that sits between the tab item and the shared component. It exists so that the tab item doesn't need to know about the low level details, and the shared component doesn't need to know about the high level getters/setters/etc. This interface component will be different in different apps.

newRequestModel: NewRequestIF
errorModel?: {},
staffPayment: StaffPaymentIF
Copy link
Collaborator Author

@severinbeauvais severinbeauvais May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where staff payment data is stored. It is not saved in the NR or payment yet -- this is future work that will be dictated by the spike ticket and API ticket in this story (6288).

@@ -0,0 +1,33 @@
import { SessionStorageKeys } from 'sbc-common-components/src/util/constants'
Copy link
Collaborator Author

@severinbeauvais severinbeauvais May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a copy of this helper/util file from our other apps.

Copy link
Collaborator

@cameron-eyds cameron-eyds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
With some work pending and the fact it's FF, low impact. g2g!

@severinbeauvais severinbeauvais merged commit 9b3ff47 into bcgov:main May 19, 2021
Copy link
Contributor

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review. Looks good to me too!

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

Successfully merging this pull request may close these issues.

3 participants