feature: modify step two e-service create (PIN-9117)#1664
feature: modify step two e-service create (PIN-9117)#1664antofo wants to merge 8 commits intofeature/PIN-8882_soglie_differenziatefrom
Conversation
| <> | ||
| <FormProvider {...formMethods}> | ||
| <Box component={'form'} noValidate onSubmit={formMethods.handleSubmit(onSubmit)}> | ||
| <SectionContainer title={t('step2.thresholdSection.title')} sx={{ mt: 3 }}> |
There was a problem hiding this comment.
could we move section about dailyCalls (i mean 'classic' dailyCalls) on a separated component? I'd like to call it Three thresholdFieldSection
| if (!attribute || !attributeKey || attributeGroupIndex === undefined) return | ||
|
|
||
| const attributes = formMethods.getValues('attributes') | ||
| const groups = attributes[attributeKey as keyof typeof attributes] |
There was a problem hiding this comment.
threshold will be configurable only for attributKey === 'certified'. should put attributeKey = 'certified' ?
| const groups = attributes[attributeKey as keyof typeof attributes] | ||
| const group = groups[attributeGroupIndex] | ||
|
|
||
| groups[attributeGroupIndex] = group.map((att) => { |
There was a problem hiding this comment.
| groups[attributeGroupIndex] = group.map((att) => { | |
| groups[attributeGroupIndex] = group.map((att) => | |
| att.id === attribute.id | |
| ? { ...att, dailyCallsPerConsumer: threshold } | |
| : att | |
| ) |
| </Stack> | ||
| </SectionContainer> | ||
|
|
||
| <SectionContainer |
There was a problem hiding this comment.
could we move this section into a separeted component?
| attributeKey: AttributeKey | ||
| readOnly: boolean | ||
| openCreateAttributeDrawer?: VoidFunction | ||
| openCustomizeThresholdDrawer?: ( |
There was a problem hiding this comment.
about this: I see 'props drilling' about this. Could we found a solution for this?
There was a problem hiding this comment.
I adopted the same approach used for the "CreateAttributeDrawer", you mean to change its behaviour too?
|
| import { useTranslation } from 'react-i18next' | ||
|
|
||
| type AttributesSectionProps = { | ||
| version?: string |
There was a problem hiding this comment.
here or we use descriptorVersion (in order to be more clear about that) or instead of link version and title (at row 28) should be better pass "title" prop from outside
| mockUseJwt() | ||
|
|
||
| describe('Provider E-service create page', () => { | ||
| it('Should be visible section', () => { |
There was a problem hiding this comment.
This test should be for Step1 (if you want to test it). ProviderEserviceCreatePage is a container our several step
There was a problem hiding this comment.
Yes, the checks are referred to the step 1 because in order to be properly rendered the ProviderEServiceCreatePage should contain the elements of the step 1. I am not trying to test single steps, the aim is to test the entire process


Jira Issue
PIN-9117
Context/Why
Services Impacted
Key Changes
Traceability Checklist