Skip to content

feat: create purpose first step API thresholds (PIN-9125)#1663

Merged
borgesis95 merged 5 commits intofeature/PIN-8882_soglie_differenziatefrom
feature/PIN-9125_create-purpose-first-step
Feb 13, 2026
Merged

feat: create purpose first step API thresholds (PIN-9125)#1663
borgesis95 merged 5 commits intofeature/PIN-8882_soglie_differenziatefrom
feature/PIN-9125_create-purpose-first-step

Conversation

@l-giacomini
Copy link
Collaborator

@l-giacomini l-giacomini commented Feb 10, 2026

Issue

Description / Context / Why

  • Replaced text on create purpose first step page
  • Added e-service thresholds details
  • Added custom hook for threshold alerts with tests

@borgesis95 borgesis95 marked this pull request as ready for review February 12, 2026 10:57
Copilot AI review requested due to automatic review settings February 12, 2026 10:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements API threshold information and alerts for the purpose creation flow. It adds visual feedback to help users understand e-service provider thresholds and whether their estimated API calls require approval. The changes include updated localization, a new custom hook for threshold validation, comprehensive tests, and UI components to display threshold information.

Changes:

  • Updated navigation breadcrumb label from "Finalità inoltrate"/"Submitted Purposes" to "Le tue finalità"/"Your Purposes"
  • Added new localization keys for API call estimation section including threshold information and alert messages
  • Created useGetConsumerPurporseEditPageInfoAlertProps hook to determine which alert to show based on daily call thresholds
  • Enhanced the purpose edit form with threshold display, alerts, and required field indicators

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/static/locales/it/shared-components.json Updated breadcrumb label for purpose list page
src/static/locales/it/purpose.json Added Italian translations for required label, revised field labels, and new load estimation section with threshold info
src/static/locales/en/shared-components.json Updated breadcrumb label for purpose list page
src/static/locales/en/purpose.json Added English translations for required label, revised field labels, and new load estimation section with threshold info
src/pages/ConsumerPurposeEditPage/hooks/useGetConsumerPurporseEditPageInfoAlertProps.tsx New hook to determine appropriate alert based on threshold comparisons
src/pages/ConsumerPurposeEditPage/hooks/tests/useGetConsumerPurposeEditPageInfoAlertProps.test.ts Test coverage for the new threshold alert hook
src/pages/ConsumerPurposeEditPage/components/PurposeEditStepGeneral/PurposeEditStepGeneralForm.tsx Integrated threshold display, alerts, and added required props to form fields
src/pages/ConsumerPurposeEditPage/ConsumerPurposeEdit.page.tsx Added required fields label at the top of the form
Comments suppressed due to low confidence (1)

src/pages/ConsumerPurposeEditPage/components/PurposeEditStepGeneral/PurposeEditStepGeneralForm.tsx:122

  • The isFreeOfCharge field label ends with an asterisk (*) indicating it's required, but the field lacks validation rules. Consider adding rules={{ required: true }} for consistency and to ensure proper form validation, even though a default value is always provided.
          <RHFRadioGroup
            name="isFreeOfCharge"
            label={t('edit.stepGeneral.isFreeOfChargeField.label')}
            options={[
              { label: t('edit.stepGeneral.isFreeOfChargeField.options.YES'), value: 'YES' },
              { label: t('edit.stepGeneral.isFreeOfChargeField.options.NO'), value: 'NO' },
            ]}
          />

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
36.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@borgesis95 borgesis95 merged commit 34d884e into feature/PIN-8882_soglie_differenziate Feb 13, 2026
5 of 6 checks passed
@borgesis95 borgesis95 deleted the feature/PIN-9125_create-purpose-first-step branch February 13, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants