Skip to content

Commit

Permalink
fix: remove file upload restraint from contents modal if modules are …
Browse files Browse the repository at this point in the history
…allowed - main (#855)

* fix: remove file upload restraint from contents modal if modules are allowed

* fix: added specific pathname in upload file restriction
  • Loading branch information
sabrina-bongiovanni authored Jan 15, 2025
1 parent 1e3bb1b commit 9fea7b2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
14 changes: 14 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@
- ...
-->

## Versione X.X.X (dd/mm/yyyy)

### Migliorie

- ...

### Novità

- ...

### Fix

- E' possibile caricare moduli in maniera massiva nei documenti all'interno delle aree corrette dentro Documenti e Dati > Modulistica

## Versione 11.26.1 (27/12/2024)

### Fix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ class ContentsUploadModal extends Component {
// as per agid guidelines, files cannot be uploaded in modulistica folder inside ct servizio
// show restraint and hide upload button when page is called modulistica and when there's a restraint
// this is enough to identify this only case bc even if another page is called 'modulistica', it will have 'File'
// as addable type
// and "Modulo" as addable type
const showFileRestraint =
this.props.pathname.includes('modulistica') &&
!this.props.types.some((type) => type.id === 'File');
getBaseUrl(this.props.pathname).match(/\/servizi\/.*\/modulistica\/?$/) &&
!this.props.types.some(
(type) => type.id === 'File' || type.id === 'Modulo',
);

return (
this.props.open && (
Expand Down

0 comments on commit 9fea7b2

Please sign in to comment.