BFLOWS 4982df4e60 feat(amendment): ROUND 3 UI istruttore completo + service + benef WIP
Parte FE del soccorso istruttorio v3, allineata al pattern UI della
piattaforma (SoccorsoAddInstructorManager / SoccorsoEditPreInstructor).

==SERVICE (rendicontazioneService.js)==
7 metodi nuovi, pattern fetch identico all'esistente:
  - updateAmendment(practiceId, id, body)          PUT  /{pid}/amendment/{id}
  - deleteAmendment(practiceId, id)                DELETE
  - sendAmendment(practiceId, id)                  POST /send
  - extendAmendment(practiceId, id, days, motiv)   POST /extend
  - sendAmendmentReminder(practiceId, id)          POST /reminder
  - uploadAmendmentDocument(practiceId, id, file)  POST multipart
  - deleteAmendmentDocument(practiceId, id)        DELETE upload-document
  - uploadResponseDocument(practiceId, id, file)   POST multipart

==ISTRUTTORIA (IstruttoriaPratica.js) — COMPLETO==
- AMENDMENT_STATUS esteso con DRAFT
- Import Editor (rich text) + FileUpload
- State amendDialog arricchito: mode create|edit, response_days, internal_note, instructor_file
- State extendDialog nuovo per dialog proroga
- Filter openAmendments include DRAFT (oltre AWAITING, RESPONSE_RECEIVED)
- Pulsante 'Soccorso istruttorio' usa openCreateAmendDialog; tooltip spiega lock
- Funzioni nuove: openCreateAmendDialog, openEditAmendDialog, resetAmendDialog,
  doAmend(sendAfterSave), sendDraftAmendment, deleteDraftAmendment,
  doExtendAmendment, sendReminder. closeAmendment preservato.
- doAmend gestisce anche upload allegato con callback-chain (create/update ->
  uploadAmendmentDocument -> eventualmente sendAmendment).
- Sezione amendments arricchita:
    * pulsanti contestuali per status:
        DRAFT:     Modifica / Invia / Elimina
        AWAITING:  Proroga / Reminder / Chiudi
        RESPONSE_RECEIVED / EXPIRED: Chiudi
    * render HTML richiesta (Editor ha prodotto HTML)
    * mostra: scadenza, response_days, extended_days, creazione, pec_sent_at, protocol_id
    * badge 'Allegato istruttore presente' se amendment_document_path
    * nota interna in box giallo (visibile solo istruttore)
    * risposta benef con eventuale badge 'Allegato risposta presente'
    * errore PEC in box rosso se pec_failed_reason
- Dialog creazione/modifica (720px):
    * Editor rich text per request_text (height 180px)
    * Calendar scadenza con minDate=today
    * InputNumber response_days (default 15, 1-120)
    * InputTextarea internal_note con lucchetto
    * FileUpload mode='basic' PDF max 10MB
    * Due CTA: 'Salva bozza' (submit form) + 'Salva e invia al beneficiario'
- Dialog proroga (480px):
    * Visualizza scadenza attuale
    * InputNumber extended_days (1-60)
    * InputTextarea motivation (registrata in internal_note lato BE)

==BENEFICIARIO (PraticaRendicontazioneEdit.js) — WIP parziale==
Patch applicate (sintatticamente OK, integrazione JSX non finita):
  - Import Editor + FileUpload
  - State amendDialog con response_file + responseFileRef
  - Helper _stripHtmlBenef + validazione su plainText

RIMANE DA FARE (prossima sessione):
  - Chain upload del response_document dentro submitAmendmentResponse
  - Filtrare DRAFT dalla sezione amendments (benef non deve vederle)
  - Render HTML dangerouslySetInnerHTML per request_text
  - Mostrare badge 'Allegato istruttore presente' se amendment_document_path
  - Nel dialog risposta: Editor al posto di InputTextarea + FileUpload response_document

==VALIDAZIONE==
Entrambi i file passati con @babel/parser plugins=jsx,classProperties,
optionalChaining,nullishCoalescingOperator — no sintassi errori.

==NEXT==
R3.bis: completare UI benef (5-10min), testare flusso E2E dalla UI sandbox
(crea DRAFT -> modifica -> invia -> [mark-pec-sent manuale] -> benef risponde con
upload -> istruttore chiude). Scrivere documento integrazione Cecilia Moretti
con spec endpoint /internal che BE Gepafin deve sviluppare (poller cron,
tenant routing multi-hub, PEC Massiva Gepafin + Mailgun SviluppUmbria,
protocol-service 65.108.55.96:8080, shared secret).
2026-04-20 22:55:30 +02:00
2024-10-31 10:08:59 +01:00
2024-08-09 10:41:54 +02:00
2026-03-23 14:57:01 +01:00
2026-01-21 11:01:11 +01:00
2026-03-27 12:14:28 +01:00
2026-03-27 12:14:28 +01:00
2024-08-09 08:51:20 +02:00
2026-03-27 12:48:05 +01:00
:
2024-12-23 11:37:10 +01:00

GEPAFIN-FE

Gepafin Front End

Commands

npm run start - start development server npm run build:dev - make build based on 'dev' env variables npm run build:prod - make build based on 'prod' env variables

HUB IDs

p4lk3bcx1RStqTaIVVbXs - gepafin t7jh5wfg9QXylNaTZkPoE - sviluppumbria

Description
BFLOWS — bflows-bandi-fe
Readme 3.7 MiB
Languages
JavaScript 85.9%
SCSS 14.1%