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

3214 - Files and links per Cycle: Refetch items on edit #3472

Conversation

sorja
Copy link
Contributor

@sorja sorja commented Feb 5, 2024

No description provided.

@sorja sorja requested a review from minotogna February 5, 2024 11:25
@sorja sorja self-assigned this Feb 5, 2024
@sorja sorja marked this pull request as draft February 5, 2024 14:28
@sorja sorja marked this pull request as ready for review February 6, 2024 08:45
sorja added 2 commits February 6, 2024 10:54
…hub.com:openforis/fra-platform into 3214-links-repository-per-cycle_refetch-on-edit
@mergify mergify bot merged commit 69a8961 into 3214-links-repository-per-cycle Feb 6, 2024
5 checks passed
@mergify mergify bot deleted the 3214-links-repository-per-cycle_refetch-on-edit branch February 6, 2024 09:00
mergify bot added a commit that referenced this pull request Mar 6, 2024
* public.file (#3399)

* Initial commit for ddl

* Add migration: public.file

* drop unused tables

* dataMigration: files and repository

* Revert "dataMigration: files and repository"

This reverts commit b0cba2f.

* add migration for public.file

* 3214 - Files and links per Cycle: Sliding Panel UI (#3405)

* Add sliding panel for files

* remove unused classname

* create-file -> repository-form

* Move panel close button to panel component

* sorted props

* 3214 - Files and links per Cycle: Create new file and links (BE) (#3434)

* 3214 - Create new files and links (BE)

* sort alphabetically

* remove client from args

* update activity log

* use single insert for link and file

* use single type for Repository link and file

* fix import

* separate file creation, activitylog target created repository

* remove file from Repository type

* 3214 - Files and links per Cycle: UI (#3440)

* TablePaginated: optional counter

* 3214 - initial commit for ui

* 3214 - clean up code and design

* 3214 - clean up Panel component

* 3214 - add repository store

* 3214 - add selectors

* 3214 - fix naming and imports

* 3214 - move Panel a level higher

* 3214 - move Panel a level higher

* 3214 - move nationalDataPoint.delete to common.delete

* Fix incorrectly renamed scss variable

* use common.done

* 3214 - update scss

* 3214 - rename stateType to state, move initial state to state

* 3214 - rename CreateFile to EditForm

* 3214 - add prefix repository__ to edit-form

* 3214 - Files and links per Cycle: getMany files and links endpoint (#3443)

* 3214 - getMany{Links,Files} endpoint

* 3214 - introduce file.many endpoint

* 3214 - getMany{Files,Links} -> getMany

* 3214 - Fix api paths, rename Repository -> RepositoryItem

* Rename RepositoryProps -> RepositoryItemProps

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: Edit UI (#3457)

* 3214 - ButtonEdit: Support link/url and button/onClick

* 3214 - InputField: support value

* 3214 - Actions: On Edit click set current item to store

* 3214 - Refactor Repository logic

* remove duplicated hook

* Add types

* 3214 - createRepositoryItem -> upsertRepositoryItem

* 3214 - introduce client/context and add selectedFilesContext

* 3214 - add context to panel, separate file upload and input fields

* Fix nullcheck

* i18n: review.add -> common.add

* Remove unnecessary prop drilling

* 3214 - Add React.FC to WrappedPanel

* 3214 - FileUploadContext

* 3214 - createRepositoryItemReducer -> upsertRepositoryItemReducer and explicit exports

* 3214 - Files and links per Cycle: API DELETE Repository Item (#3465)

* 3214 - API: DELETE RepositoryItem

* Include cycle in activityLog

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: Remove updated_at, rename prop, delete repository item (#3466)

* 3214 - setOpenPanel -> closePanel

* 3214 - remove public.updated_at

* 3214 - repository: onDelete

* Fix import

* 3214 - Files and links per Cycle: Download a file (#3470)

* 3214 - add meta type: File

* 3214 - Response utils: Send file

* 3214 - Add download repository file flow

* 3214 - Authorizer: canViewRepositoryItem

* 3214 - Authorize file downloading

* 3214 - code quality

* Fix naming convention

* Objects.camelize

* 3214 - Files and links per Cycle: Refetch items on edit (#3472)

* 3214 - refetch items on edit

* 3214 - fetchRepositoryItems

* 3214 - useRepositoryItemChangeListener

* 3214 - repository/store/hooks fix imports and exports

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: Update repository item (name, link, file) (#3477)

* 3214 - fix authorizer for repository items props not set

* 3214 - add file adapter

* 3214 - server: update repository item

* 3214 - redux: update repository item

* 3214 - Files and links per Cycle: Add possibility to set a file as public or private (#3479)

* 3214 - edit private/public access

clean up code
remove excess code from upsert
bring server side methods closer to each other - use repositoryItem when creating

* Use Partial

* 3214 - Files and links per Cycle: API: Upload one or more files (#3483)

* 3214 - API: Multiple file upload

* add authorizer

* 3214 - api file -> files and activitylog message: fileCreate

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - file upload store (#3489)

* 3214 - Files and links per Cycle: Progress bar and file upload progress (#3492)

* 3214 - new component ProgressBar

also update redux store to include progress in FileUpload slice

* 3214 - remove extra separator

* 3214 - update styling

* 3214 - Files and links per Cycle: File upload (#3494)

* 3214 - File upload component and flow

* 3214 - File upload component and flow

* Introduce util Files

* Code quality and separation of concerns

* 3214 - fix separation of concerns

* Fix typo

* always update name on upload

* Fix useEffect deps

* setRepositoryItemProp

* 3214 - clean up hook, introduce Partial setRepositoryItemProps

* Add file cleanup (#3502)

* 3214 - merge upsertRepositoryItemReducer and removeRepositoryItemReducer to repositoryItemReducer (#3510)

* 3214 - Files and links per Cycle: Basic validation flow (RFC) (#3509)

* 3214 - initial validation flow

* 3214 - add translations (en)

* 3214 - RepositoryItemValidator

* 3214 - i18n: en/validation.js

* 3214 - RepositoryItemValidator

* 3214 - update ui validation

* 3214 - validate fileupload

* 3214 - use button delete

* 3214 - add repositoryitem validation in store

* 3214 - fix imports and naming convention

* Fix RepositoryItemValidation type

* new hook: useIsRepositoryItemValid

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: Update repository dialog in WYSIWYG (#3513)

* 3214 - EditorWYSIWYGLinks refactor: add existing files

* 3214 - Remove FileDrop

* 3214 - FileUpload: scss

* 3214 - EditorWYSIWYGLinks: Upload and update access for selected items

* 3214 - delete useOnDrop

* fix imports

* update imports

* fix import

* 3214 - Merge Panel and EditForm

Co-authored-by: Miró Sorja <[email protected]>

* 3214 - Merge Panel and EditForm

Co-authored-by: Miró Sorja <[email protected]>

* 3214 - Update SlidingPanel style

Co-authored-by: Miró Sorja <[email protected]>

* 3214 - Add Common ButtonCLose

Co-authored-by: Miró Sorja <[email protected]>

* 3214 - Update style

Co-authored-by: Miró Sorja <[email protected]>

* 3214 - getRepositoryItems => TablePaginatedActions.getData

* 3214 - getRepositoryItems => TablePaginatedActions.getData

* 3214 - useRepositoryItems return Array<RepositoryItem> | undefined

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: minotogna <[email protected]>

* 3214 - Files and links per Cycle: Static links (#3536)

* 3214 - update repositoryType, remove name add props.translations

* 3214 - move repositoryItem.name to props.translations.en

* 3214 - fix typo in migration

* 3214 - add migration step for links

* 3214 - introduce generic meta/Translation type

* 3214 - remove RepositoryItems.getName

* 3214 - Files and links per Cycle: Admin can add global Repository Items (#3540)

* 3214 - sort by id, add todo rowIndex

* 3214 - include original file extension in download

* 3214 - Admin can add repository items in Global (Links)

* rename to ButtonAdd

* Use Button component

* 3214 - add hooks: useIsCountryRepositoryEditable, useIsGlobalRepositoryEditable

* 3214 - hide 'add' button if not editable

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: ActivityLog migration (#3542)

* Add new repository ActivityLogMessages

* Initial commit for migrate activity log assessmentFile messages

* dont run file cleanup on start

* sort, remove comment

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: Show selected item for repository item (#3544)

* 3214 - backend: support requesting file metadata

* 3214 - introduce state.repository.file for currently selected file

* 3214 - remove file listing from file uploader

* 3214 - use new Button component

* 3214 - show selected file, allow deletion

* 3214 - reset on upsert and close

* 3214 - set repository.file on upload

* 3214 - clean up RepositoryLink, support prop.name

* eslint: require sorted props

* 3214 - ui updates

* 3214 - ui updates

* 3214 - ui updates

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: minotogna <[email protected]>

* 3214 - Update repository item authorizer (#3549)

* 3214 - Add ui level badge + Ui Form improvements  (#3548)

* 3214 - Add ui level badge

* 3214 - Add ui level badge

* 3214 - Update ui form style

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Add FileSummary + BE code cleanup (#3553)

* 3214 - Add FileSummary + BE code cleanup

* 3214 - Add FileSummary + BE code cleanup

* 3214 - Make FileUpload controlled (#3554)

* 3214 - Files and links per Cycle: FileMeta and disable UI elements (#3555)

* 3214 - meta: FileUsage, FileUsages

* 3214 - be: fileSummary

* 3214 - ButtonCheckBox: Support disabled

* 3214 - store: get file metadata

* 3214 - disable UI elements if file in use

* 3214 - minor code quality

* 3214 - getSummary

* 3214 - requireEdit

* getUsages returns: sectionName and locations

* fix typo

* 3214 - update meta/file

* fix typo

* fix imports

* use promise.all

* 3214 - Files and links per Cycle: File usages (#3566)

* 3214 - display file usages

* 3214 - display file usages

* add support suffix

* fix wysiwyg (#3568)

* 3214 - fetch fileMeta only on repositoryItem exist (#3571)

* 3214 - Files and links per Cycle: Allow file download in side panel (#3572)

* 3214 - include repository item uuid in file meta

* 3214 - InputFieldFile: canDownload

* 3214 - FileDownload component

* remove prop: canDownload

* 3214 - Files and links per Cycle: Update repository item validation when deleting the file (#3573)

* fix validation

* remove duplication

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: Confirm delete (#3575)

* Confirm delete repository item

* update translation

* 3214 - Files and links per Cycle: Actity log: include cycle and use updated ActivityLog messages (#3580)

* update activity log creation for repository items

* remove unused section name

* use repository for link (#3581)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* update sdg file (#3583)

* 3214 - Files and links per Cycle #3404: Update activity log and sort items correctly (#3582)

* Initial commit for activity log migration

* 3214 - fix merge

* 3214 - fix migrations

* fix svg

* remove unused translations

* reset svg to development

* fix svg

* new line

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: Remove SDG Focal points API (#3586)

* remmove sdgfocalpoints api

* Remove unused file

* remove fra links (#3587)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Files and links per Cycle: remove unused and deprecated code (#3588)

* remove unused and deprecated code

* remove unused file

* remove unused code

* remove unused tool

* 3214 - hidden files (#3590)

* fix migration labels (#3591)

* 3214 - Files and links per Cycle: Add translations (#3585)

* add common translations

* add repositoryItem translations

* update es/ar

* add zh, fr

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3214 - Fix file meta multiple fetch + Upgrade node 20.11.1 (#3593)

* 3214 UI improv (#3594)

* 3214 - Update TablePaginated Paginator style

* 3214 - Update Admin sticky headers

* 3214 - Update RecentActivity style

* 3214 - Update Repository row height

* 3214 - Update Repository Edit button

* 3214 - Update Repository Edit button

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: minotogna <[email protected]>
Co-authored-by: Mino Togna <[email protected]>
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.

2 participants