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

feat: fap data export for a call and refactor data collections for export #629

Merged
merged 64 commits into from
Aug 9, 2024

Conversation

TCMeldrum
Copy link
Contributor

@TCMeldrum TCMeldrum commented Jun 13, 2024

Closes: UserOfficeProject/issue-tracker#1050

Description

This pull request enhances the system's data export capabilities and refactors data collections for export.

Was built while the multiple faps changes were being made so for some reason those commits appear here.

Motivation and Context

The need for a more comprehensive and accurate data export for a call was identified. This PR not only solves this problem but also refactors the data collections for export, making the system more efficient and maintainable.

Changes

  1. Added a new SQL view review_data to aggregate necessary data for the export.
  2. Implemented getFapReviewData method in FapDataSource.ts that fetches data from the new SQL view.
  3. Created a new FapReviewsRecord interface to handle the data returned from getFapReviewData.
  4. Adjusted the Fap Data Row setup for the XLSX export to accommodate the new data structure.
  5. Added a new XLSXType CALL_FAP for the new export type.

This PR provides a more efficient way of exporting FAP data for a call and improves the maintainability of the code by refactoring data collections for export.

How Has This Been Tested?

Fixes Jira Issue

https://jira.esss.lu.se/browse/

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@martin-trajanovski
Copy link
Contributor

@TCMeldrum is this one ready for review?

@TCMeldrum
Copy link
Contributor Author

Sorry forgot to add the label

@martin-trajanovski martin-trajanovski self-requested a review June 20, 2024 10:11
Copy link
Contributor

@Scott-James-Hurley Scott-James-Hurley left a comment

Choose a reason for hiding this comment

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

I think it would be good if the column specified which FAP each reviewer belongs to. Could you also link to the factory PR? Are there tests you could write for this? Thanks.

@@ -0,0 +1,177 @@
// import { Review } from '../../models/Review';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be removed?

apps/backend/src/factory/xlsx/callFaps.ts Outdated Show resolved Hide resolved
apps/backend/src/factory/xlsx/callFaps.ts Outdated Show resolved Hide resolved
row.daysRequested ?? '<missing>',
row.propTitle ?? '<missing>',
row.propReviewAvgScore ?? '<missing>',
row.fapTimeAllocation ?? row.daysRequested ?? '<missing>',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be made clear whether the user is looking at the time allocated or requested.

@TCMeldrum
Copy link
Contributor Author

@martin-trajanovski Would you be able to have look at this?

Copy link
Contributor

@martin-trajanovski martin-trajanovski left a comment

Choose a reason for hiding this comment

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

It looks good in general. I left some small comments but also would be nice if we can add some test for it. I am happy to approve when everything gets resolved.

faps.map(async (fap) => {
return {
sheetName: fap.code,
rows: await collectFAPRowData(fap.id, callId, user),
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that this collectFAPRowData function is used before it is defined. Maybe it is good to move it on the top.

const out: FapXLSXData = [];
return fapDataRow(
proposal.proposal_pk,
`${pi?.firstname} ${pi?.lastname}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

It will be cleaner if we extract this in it's own variable called something like piFullName and just pass it here

@TCMeldrum
Copy link
Contributor Author

It looks good in general. I left some small comments but also would be nice if we can add some test for it. I am happy to approve when everything gets resolved.

Cool, what kind of tests are you thinking of sorry? Like generating an Excel document and running it through e2e tests?

@martin-trajanovski
Copy link
Contributor

It looks good in general. I left some small comments but also would be nice if we can add some test for it. I am happy to approve when everything gets resolved.

Cool, what kind of tests are you thinking of sorry? Like generating an Excel document and running it through e2e tests?

Yes if that is possible. We have something similar with PDFs where we read and check the content if it includes some data that we expect.

cy.task('convertXlsxToJson', `${downloadsFolder}/${fileName}`).then(
(actualExport) => {
cy.fixture('exampleCallFapExport.json').then((expectedExport) => {
expect(expectedExport).to.deep.equal(actualExport);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice one!

Copy link
Contributor

@martin-trajanovski martin-trajanovski left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@Scott-James-Hurley
Copy link
Contributor

@TCMeldrum @bashanlam's already reviewed on our side. Still want my review?

@TCMeldrum
Copy link
Contributor Author

@TCMeldrum @bashanlam's already reviewed on our side. Still want my review?

@Scott-James-Hurley made some test changes so wanted a rereview sorry I can request both of you.

@TCMeldrum TCMeldrum requested a review from bashanlam August 1, 2024 15:54
@TCMeldrum TCMeldrum merged commit 694b743 into develop Aug 9, 2024
20 checks passed
@TCMeldrum TCMeldrum deleted the 1050-fap-data-export branch August 9, 2024 11:31
yoganandaness pushed a commit that referenced this pull request Aug 13, 2024
…port (#629)

* BREAKING CHANGE: multiple FAPs per proposal

* fix the assignment of proposal to multiple FAPs

* restructure and re-design of the proposal FAP assignments

* try to improve the whole structure of the proposal view

* fixing lint issues and finalizing the refactor

* reduce data dupplication and make filters work with jsonb fields

* fix linting issues

* proposal model change to faps, do some cleanup and start fixing tests

* fix backend unit tests

* fix some bugs found in the e2e testing

* fix some more bugs found while testing

* improve FAP e2e tests

* fix failing e2e tests

* refactor and fix last failing e2e tests

* find and fix problematic e2e test

* fixing very last bits of failing tests

* fix the auto assignment of multiple FAPs and add e2e test

* FAP auto assignment test fix

* fix newly added test

* fix failing e2e test

* Update 0151_MultipleFapPerProposal.sql

* fix proposal table name in select

* improve auto fap assignment after instrument

* remove some leftover commented code

* refactor: make fap data export view and clean up code

* fix review comments and refactor

* fixing review comments part 2

* add e2e test that covers some review improvements

* fix unit and e2e tests

* wip

* wip

* feat: add all call fap export

* missed merge clean up

* small fixes

* small improvments

* update to work with non stfc modes

* add test

---------

Co-authored-by: martintrajanovski <martin.trajanovski@gmail.com>
Scott-James-Hurley added a commit that referenced this pull request Aug 29, 2024
* review comments incorporation - using faker randon numeric to generate random numbers

* adding new config requestTime in instrument picker question in template_export json - this is to fix failing test case

* review comments incorporation

* fix for failing test case in templatesBasic

* New page creation

* Add techniques patch

* Add GraphQL groundwork

* Frontend grapghql changes

* Get Technique flow

* Add mutations

* Fix naming

* Get techniques flow

* Correction in get instruments flow

* Corrections to get techniques flow

* Fix schema generation

* Assign instruments flow

* Add technique creation

* Add initial backend testing

* Fix file

* Fix technique delete flow

* Minor corrections

* Add mutations backend tests

* Query unit test cases

* Validation schema for mutations

* Add technique e2e base

* Add technique e2e cypress commands

* Basic test cases

* Basic tests

* Add technique instrument assignment test

* Remove e2e restriction

* Move validation to user-office-lib

* Revert "Move validation to user-office-lib"

This reverts commit 3632e3b.

* Move validation to user-office-lib

* Fix typos

* Fix technique deletion

* Fix instrument deletion

* Review comment fixes

* Link technique setting commands

* Revert changing id to techniqueId

* Add backend tests

* removing fap sec and fap chair rights to submit instruments from FAP meetings

* Review comment fixes

* fix test cases

* review comments changes

* Validation version upgrade

* delete and update flow fix

* Improve error handling

* review comments incorporation

* Simplify condition

* Simplify values

* Change return value

* Simplify params

* feat: Update TechnicalReviewRecord and TechnicalReview classes (#643)

The TechnicalReviewRecord and TechnicalReview classes have been updated to include a nullable `technicalReviewAssigneeId` property. This change allows for more flexibility in assigning technical reviews.

* Remove multiple instruments in single call

* Fix tests

* Events handling

* Passing technique id for events

* Change assign/remove inst icon

* Use translation for technique

* Remove redundant else statement

* Update apps/frontend/src/components/fap/MeetingComponents/FapMeetingInstrumentsTable.tsx

Co-authored-by: Scott Hurley <44348929+Scott-James-Hurley@users.noreply.github.com>

* fix tests

* fix: api keys can get fap proposals

* feat: make all pages with tables to expand full-width (#640)

* feat: make all pages with tables to expand full-width

* update technique table

* feat: add User Office documentation (#646)

* feat: Add User Office documentation

This commit adds the User Office documentation to the repository. The documentation is written in markdown and uses the MkDocs framework with the Material theme. It also includes instructions for testing and deploying the documentation.

* chore: Add workflows for deploying documentation

---------

Co-authored-by: Fredrik Bolmsten <fredrik.bolmsten@ess.eu>
Co-authored-by: Martin <martin.trajanovski@gmail.com>

* feat: multi fap review assignment (#624)

* removes old mass assignment stuff, adds new backend functionality

* wip refactor fap reviews frontend

* frontend for multi review assignment

* refactor AssignFapReviewersToProposal mututation to support multiple proposals, add frontend elements for multiple propsal assignments at once

* fixes e2e tests

* reverts unneccessary changes

* reverts cypress config

* fixes faps e2e tests

* remove test skip

* try fix e2e2 test

* s

* fix type

* add comments explaining code

* fixes dodgy variable name

* fix state update

* fixes merge issue

* fixes fap e2e test

---------

Co-authored-by: Martin <martin.trajanovski@gmail.com>

* feat: make already generated proposal pdfs of migrated proposals available for download (#618)

* Add option to download migrated pdf

* Upgrade the duo-validation version number

* feat: un-submit instrument in FAP meetings and prevent reorder if instrument is submitted (#641)

* BREAKING CHANGE: multiple FAPs per proposal

* fix the assignment of proposal to multiple FAPs

* restructure and re-design of the proposal FAP assignments

* try to improve the whole structure of the proposal view

* fixing lint issues and finalizing the refactor

* reduce data dupplication and make filters work with jsonb fields

* fix linting issues

* proposal model change to faps, do some cleanup and start fixing tests

* fix backend unit tests

* fix some bugs found in the e2e testing

* fix some more bugs found while testing

* improve FAP e2e tests

* fix failing e2e tests

* refactor and fix last failing e2e tests

* find and fix problematic e2e test

* fixing very last bits of failing tests

* fix the auto assignment of multiple FAPs and add e2e test

* FAP auto assignment test fix

* fix newly added test

* fix failing e2e test

* Update 0151_MultipleFapPerProposal.sql

* handle multiple reviews and fap meeting decisions

* fix proposal table name in select

* improve auto fap assignment after instrument

* fix known FAP issues and linting errors

* remove some leftover commented code

* finetune multiple FAP handling inside FAPs

* follow the right formula to calculate the instrument availability time per FAP

* improve calculations and fix e2e tests

* add e2e tests that cover the new functionality

* fix review comments and refactor

* fixing review comments part 2

* add e2e test that covers some review improvements

* fix unit and e2e tests

* fix broken db patch

* fix: user officer table sorting

* test(e2e): add e2e test to cover the bugfix

* feat: add option to filter all multi-instrument proposals

* fix url parameter

* test(e2e): add e2e tests for the new feature

* feat: unsubmit instrument in FAP meetings and prevent reorder if instrument is submitted

* revert some unwanted changes

* fix e2e tests

* fix e2e tests part 2

* adress more review comments and fix e2e tests

* fix last review comments

* fix linting issues

---------

Co-authored-by: Fredrik Bolmsten <fredrik.bolmsten@ess.eu>

* feat: make tech reviews based on proposal workflow

* fix: some tests

* fix another test

* fix last test

* feat: Added new plugins to the documentation.

* add frontent validation when creating or updating technique

* feat: add conflict of interest feature flag

* fix test

* Add instrument to UO status action email

Part of UserOfficeProject/issue-tracker#1011

* Update documentation structure (#661)

Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>

* Bump husky from 9.0.11 to 9.1.1

Bumps [husky](https://github.com/typicode/husky) from 9.0.11 to 9.1.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v9.0.11...v9.1.1)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* remove only settings.cy.ts

* #1069: Disable clone legacy proposals

* Export proposals in Excel fix (#655)

* fix: generic templates not being marked complete when isCompleteOnCopy is true (#657)

* use transactions to mark coppied answers as complete

* add e2e test for generic templates isCompleteOnCopy

* update error message for graphql

* validate if answers  has results

* fix e2e tests

---------

Co-authored-by: Martin <martin.trajanovski@gmail.com>

* chore: handle case when no attachments are found in zip middleware and display appropriate message (#668)

* fix: update structure, add nav, update devguide and others (#670)

* docs: user officer guide structure (#669)

* User Officer Guide Structure

* Added new pages and template folder to User Officer folder
* Added images to the guide
* Created links to specific 'how-to' guides in the User Officer page

* docs: user officer guide structure

* Added new pages and template folder to User Officer folder
* Added images to the guide
* Created links to specific 'how-to' guides in the User Officer page
* Restructured the 'create calls' page, separating FAPs and Workflows from templates.
* Added images of templates from the users' perspective to the calls guide

---------

Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>
Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* feat: add support for initial user officer role assignment (#666)

This commit adds support for assigning the USER_OFFICER role to the initial user officer based on the value of the `INITIAL_USER_OFFICER_EMAIL` environment variable. If the email matches the value of `INITIAL_USER_OFFICER_EMAIL`, the USER_OFFICER role is assigned. Otherwise, the USER role is assigned. If `INITIAL_USER_OFFICER_EMAIL` is not set or if there is no email provided, the USER role is assigned.

* Bump husky from 9.1.1 to 9.1.3

Bumps [husky](https://github.com/typicode/husky) from 9.1.1 to 9.1.3.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v9.1.1...v9.1.3)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* docs: improved user guide templates (#671)

* doc: improved user guide templates

* Updated the documentation for the templates sections
* Updated information for FAPs and proposal workflows
* Created structure for future video tutorial pages

* Fix mkdocs.yml and add icons

---------

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* Update apps/frontend/src/components/fap/Proposals/FapProposalsAndAssignmentsTable.tsx

Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>

* feat: add an option to have bcc recipient for emails sent through proposal status actions (#667)

* Adding option to include bcc recipient in mails

* BREAKING CHANGE: react and material-ui upgrade with refactor cleanup (#653)

* BREAKING CHANGE: react and material-ui upgrade

* chore: upgrade mui packages and everything that comes with it

* start fixing some of the linting issues and upgrade migrations

* add TextField, Select, DatePicker and Autocomplete component wrappers for Formik

* chore: React and MUI upgrade

* continue with useStyles cleanup

* continue with makeStyles and withStyles removal

* finalize with material ui upgrade and makeStyles removal

* last bits of material ui upgrade changes

* react router upgrade

* fix some react router issues

* fix the broken routes after upgrating react-router

* fix linting issues

* fix tinymce editor

* introduce createBrowserRouter and our own prompt component

* add some new UI components

* continue fixing mui components

* use formik field as a base for the wrapper components

* fix date and datetime pickers

* fix all checkboxes

* try to fix date fields

* try to fix the date picker placeholder and some tests

* start fixing date and datetime pickers in e2e tests

* fixing call e2e tests and improving datetime picker input

* fix calls e2e tests

* try to fix as much fields as possible and some more e2e tests

* fix some more textfield issues

* continue fixing e2e tests

* fixing e2e tests

* contunue with e2e tests and improvements

* fix select components using with formik

* fixing tests and improving broken components

* try to fix visit date questions

* fix some more date field issues

* fixing failing template basic e2e tests

* fixing FAPs failing e2e tests

* some final fixes for e2e tests

* remove some leftovers

* try to improve and refactor the people table and use complete remote data for material-table

* fix some more e2e tests and improve fields

* user officer proposal table refactor part 1

* officer proposals table final refactor

* fix more tests and improve fields and the officer proposal table

* try to fix more e2e tests

* fix proposals e2e tests

* some e2e test improvements

* fix some review comments

* fix some styling issues

* try to improve tests and increase the command timeout

* fix linting issues

* try to remove as much waits as possible and fix some datetime picker issue

* refactor the main app components

* fixing and improving e2e templates tests

* fix review comments

---------

Co-authored-by: Farai Mutambara <71100224+mutambaraf@users.noreply.github.com>

* Bump tinymce from 7.1.0 to 7.2.0 in /apps/frontend

Bumps [tinymce](https://github.com/tinymce/tinymce/tree/HEAD/modules/tinymce) from 7.1.0 to 7.2.0.
- [Changelog](https://github.com/tinymce/tinymce/blob/main/modules/tinymce/CHANGELOG.md)
- [Commits](https://github.com/tinymce/tinymce/commits/7.2.0/modules/tinymce)

---
updated-dependencies:
- dependency-name: tinymce
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update FapProposalsAndAssignmentsTable.tsx

* rename feature

* rename function

* remove the extra 59 seconds added to the timestamp for call end-time fields (#674)

* fix: show only active, ongoing calls in the call selector on the proposal clone window (#675)

* feat: Add isEnded filter to useCallsData in CallSelectModalOnProposalClone window

The code changes in `CallSelectModalOnProposalClone.tsx` add the `isEnded` filter to the `useCallsData` hook, preventing ended calls from being shown.

* Improve error message for cloning proposal on ended call

* Update test for proposal cloning with ended call

* feat: Add isInternalUser check to CallStatusFilter

The code changes in `CallStatusFilter.tsx` add an `isInternalUser` check to conditionally render the "Active Internal" option in the call status filter dropdown. This ensures that only internal users can see and select the "Active Internal" option.

* feat: Add isActiveInternal filter to useCallsData in CallSelectModalOnProposalClone

* WIP

* WIP

* improvement: changed eam api xml to json

* fix: technical review check should be performed against the shortCode and not name (#680)

* chore(deps-dev): bump husky from 9.1.3 to 9.1.4

Bumps [husky](https://github.com/typicode/husky) from 9.1.3 to 9.1.4.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v9.1.3...v9.1.4)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump lint-staged from 15.2.7 to 15.2.8

Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.2.7 to 15.2.8.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v15.2.7...v15.2.8)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* docs: update nav, fix links, add versioning (#684)

* improvement: resizing option in pdf viewer enabled.

* Create page for configuration (#686)

* feat: add back the proper functionality for selection of all proposals in the table (#677)

* chore: upgrade mui packages and everything that comes with it

* start fixing some of the linting issues and upgrade migrations

* add TextField, Select, DatePicker and Autocomplete component wrappers for Formik

* chore: React and MUI upgrade

* continue with useStyles cleanup

* continue with makeStyles and withStyles removal

* finalize with material ui upgrade and makeStyles removal

* last bits of material ui upgrade changes

* react router upgrade

* fix some react router issues

* fix the broken routes after upgrating react-router

* fix linting issues

* fix tinymce editor

* introduce createBrowserRouter and our own prompt component

* add some new UI components

* continue fixing mui components

* use formik field as a base for the wrapper components

* fix date and datetime pickers

* fix all checkboxes

* try to fix date fields

* try to fix the date picker placeholder and some tests

* start fixing date and datetime pickers in e2e tests

* fixing call e2e tests and improving datetime picker input

* fix calls e2e tests

* try to fix as much fields as possible and some more e2e tests

* fix some more textfield issues

* continue fixing e2e tests

* fixing e2e tests

* contunue with e2e tests and improvements

* fix select components using with formik

* fixing tests and improving broken components

* try to fix visit date questions

* fix some more date field issues

* fixing failing template basic e2e tests

* fixing FAPs failing e2e tests

* some final fixes for e2e tests

* remove some leftovers

* try to improve and refactor the people table and use complete remote data for material-table

* fix some more e2e tests and improve fields

* user officer proposal table refactor part 1

* officer proposals table final refactor

* fix more tests and improve fields and the officer proposal table

* try to fix more e2e tests

* fix proposals e2e tests

* some e2e test improvements

* fix some review comments

* fix some styling issues

* try to improve tests and increase the command timeout

* fix linting issues

* try to remove as much waits as possible and fix some datetime picker issue

* refactor the main app components

* fixing and improving e2e templates tests

* feat: add back the proper functionallity for selection of all proposals in the table

* revert some unwanted changes

* Update apps/frontend/src/components/proposal/ProposalTableOfficer.tsx

Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>

* fix: review comments fix

---------

Co-authored-by: Farai Mutambara <71100224+mutambaraf@users.noreply.github.com>
Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>

* feat: on proposal assignment page show all proposals in table (#681)

* feat: on proposal assignment page show all proposals in table

* put max page length to var

* move sorting out of html

* fix sort function

* fix: proposal pdf download fails when instrument picker question is used in proposal question template (#663)

* fix for pdf download issue when instrument picker question is present in proposal questionnaire

* added a new test case to test the pdf download scenario when instrument picker question present in proposal

* 1.Allow only integers in request time field

* a small fix for the newly added test case

* fix test

* sql query to update old instrument picker answers

* removing the sql block to update multiple instrument ids answers as e2e tests shows failed to apply patch

* added pl/sql block to update answers with multiple instrument ids

* modifying the update query for single instrument id

* removing check so that test case runs on e2e scenario

* adding a check so that download pdf test case skips for stfc environment

* duo-validation version upgrade

* duo-validation version upgrade

---------

* feat: add the missing events after multiple FAPs were introduced (#685)

* chore: upgrade mui packages and everything that comes with it

* start fixing some of the linting issues and upgrade migrations

* add TextField, Select, DatePicker and Autocomplete component wrappers for Formik

* chore: React and MUI upgrade

* continue with useStyles cleanup

* continue with makeStyles and withStyles removal

* finalize with material ui upgrade and makeStyles removal

* last bits of material ui upgrade changes

* react router upgrade

* fix some react router issues

* fix the broken routes after upgrating react-router

* fix linting issues

* fix tinymce editor

* introduce createBrowserRouter and our own prompt component

* add some new UI components

* continue fixing mui components

* use formik field as a base for the wrapper components

* fix date and datetime pickers

* fix all checkboxes

* try to fix date fields

* try to fix the date picker placeholder and some tests

* start fixing date and datetime pickers in e2e tests

* fixing call e2e tests and improving datetime picker input

* fix calls e2e tests

* try to fix as much fields as possible and some more e2e tests

* fix some more textfield issues

* continue fixing e2e tests

* fixing e2e tests

* contunue with e2e tests and improvements

* fix select components using with formik

* fixing tests and improving broken components

* try to fix visit date questions

* fix some more date field issues

* fixing failing template basic e2e tests

* fixing FAPs failing e2e tests

* some final fixes for e2e tests

* remove some leftovers

* try to improve and refactor the people table and use complete remote data for material-table

* fix some more e2e tests and improve fields

* user officer proposal table refactor part 1

* officer proposals table final refactor

* fix more tests and improve fields and the officer proposal table

* try to fix more e2e tests

* fix proposals e2e tests

* some e2e test improvements

* fix some review comments

* fix some styling issues

* try to improve tests and increase the command timeout

* fix linting issues

* try to remove as much waits as possible and fix some datetime picker issue

* refactor the main app components

* fixing and improving e2e templates tests

* feat: add back the proper functionallity for selection of all proposals in the table

* revert some unwanted changes

* Update apps/frontend/src/components/proposal/ProposalTableOfficer.tsx

Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>

* fix the linting and proposal filtering issues

* feat: add the missing events after multiple FAPs were introduced

* fix the event naming

* feat: add even more missing events and triggers

* add missing records and remove unnecessery event from proposal_events table

---------

Co-authored-by: Farai Mutambara <71100224+mutambaraf@users.noreply.github.com>
Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>

* improvement: Created new MUI Dialog called StyledDialog and using it across the application to have a uniform experience.

* Added documentation to the react component

* Rename some files, add step-by-step guide, do minor fixes (#694)

* feat: fap data export for a call and refactor data collections for export (#629)

* BREAKING CHANGE: multiple FAPs per proposal

* fix the assignment of proposal to multiple FAPs

* restructure and re-design of the proposal FAP assignments

* try to improve the whole structure of the proposal view

* fixing lint issues and finalizing the refactor

* reduce data dupplication and make filters work with jsonb fields

* fix linting issues

* proposal model change to faps, do some cleanup and start fixing tests

* fix backend unit tests

* fix some bugs found in the e2e testing

* fix some more bugs found while testing

* improve FAP e2e tests

* fix failing e2e tests

* refactor and fix last failing e2e tests

* find and fix problematic e2e test

* fixing very last bits of failing tests

* fix the auto assignment of multiple FAPs and add e2e test

* FAP auto assignment test fix

* fix newly added test

* fix failing e2e test

* Update 0151_MultipleFapPerProposal.sql

* fix proposal table name in select

* improve auto fap assignment after instrument

* remove some leftover commented code

* refactor: make fap data export view and clean up code

* fix review comments and refactor

* fixing review comments part 2

* add e2e test that covers some review improvements

* fix unit and e2e tests

* wip

* wip

* feat: add all call fap export

* missed merge clean up

* small fixes

* small improvments

* update to work with non stfc modes

* add test

---------

Co-authored-by: martintrajanovski <martin.trajanovski@gmail.com>

* fix e2e test.

* fix: proposals table does not clean the sort direction and field state properly (#692)

* fix: proposals table does not clean the sort direction and field state properly

* test(e2e): add e2e test for the fix

* Add page for documentation changes, minor fixes (#698)

* STFC injection

* e2e test fix

* doc: improved user guide templates (#699)

* Updated the documentation for the templates sections
* Updated information for FAPs and proposal workflows
* Created structure for future video tutorial pages

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* e2e fix

* e2e fix

* Rollack Unused

* Rollack Unused 3

* Rollack Unused 4

* Fix lint issue

* Removed undici from package lock.

* Removedundici from package lock

* Undoing changes in package json and package lock json.

* fix: update fap proposal count to only include proposals currently in fap review (#689)

* fix: update fap proposal count to only include proposals currently in fap review

* update test

* rename getFapReviewerProposalCountCurrentRound to getCurrentFapReviewerProposalCount

---------

Co-authored-by: Martin <martin.trajanovski@gmail.com>

* Removing response check as it will always be true

* Fix lint issue 2

* Fix lint isssue 3

* feat: allow assignment of user to techniques (#652)

* add technique has scientists table

* add mutations and datasource for technique has scientists table

* add backend mocks

* add user office frontend changes to view and remove scientists from technique

* add user office frontend changes to add scientists to technique

* add e2e tests for assigning scientists to technique

* add backend validation

* fix some typos and improve structure

* romeve changes to package lock backend

* fix package lock backend formatting

* fix comments suggestions

* Update apps/backend/src/datasources/postgres/TechniqueDataSource.ts

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* Update apps/backend/src/config/dependencyConfigSTFC.ts

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

---------

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* chore(deps): bump axios from 1.6.7 to 1.7.4 in /apps/backend

Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.6.7...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump axios from 1.6.2 to 1.7.4

Bumps [axios](https://github.com/axios/axios) from 1.6.2 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.6.2...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix linter issue 4

* Fix linter issue 5

* docs: improve user guide info (#700)

* doc: improved user guide templates

* Updated the documentation for the templates sections
* Updated information for FAPs and proposal workflows
* Created structure for future video tutorial pages

* doc: user guide info

* doc: user guide info

* Added information to guides
* Renamed and reorganised templates pages in accordance with UO interface
* Added logos to home page
* Added icons to increase usability
* Fixed broken images and links

---------

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* feat: add fap document store (#696)

* feat: add fap document store

* fix: update tests for new document store

* fix tests

* Small fixes

* docs: user officer pages (#705)

* Added more information within pages for user officers

* feat: make optional tech reviews setting (#693)

* feat: make optional tech reviews setting

* fix imports

* update var name and date in patch

---------

Co-authored-by: Martin <martin.trajanovski@gmail.com>

* feat: double-check if proposal workflow needs to be run multiple times and do some UI improvements (#697)

* feat: double-check if proposal workflow needs to be run multiple times and do some UI improvements

* add e2e tests for workflow re-runs

* await the checkIfConditionsForNextStatusAreMet

* await for the workflowEngine

* try to fix failing e2e tests

---------

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* chore(deps-dev): bump lint-staged from 15.2.8 to 15.2.9

Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.2.8 to 15.2.9.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v15.2.8...v15.2.9)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: fix stfc email handler (#708)

* fix: sidebar menu selection optimised and fixed (#704)

* sidebar menu selection optimised and fixed.

* e2e test added.

* e2e test optimisation

---------

Co-authored-by: Yoganandan Pandiyan <p.yoganandan@gmail.com>
Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* Added option to open a warning popup with the title as warning color.

* docs: user officer page guide information (#706)

* Added page information for user officers

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* Add page for RabbitMQ, fix links, add ELI information, other minor tweaks (#710)

* fix: remove expired proposals for instrument scientists (#650)

* Remove expired proposals for instrument scientists

* Add filter to remove proposals of given status

* Remove unneeded sql

* Remove status filter from frontend

* Fix lint error

* Hide Expired status from filter

---------

Co-authored-by: Farai Mutambara <71100224+mutambaraf@users.noreply.github.com>

* resolving pr comments

* fix: make chair and sec proposal count more visible and update to use current count (#701)

* fix: make chair and sec proposal count more visible and update to use current count

* fix chair endpoint fetch sec counts

* fix tests

* chore: remove fapChairsProposalCounts and fapSecretariesProposalCounts

* fix tab opened in test

* feat: add ELI configuration (#690)

* Changes for ELI configuration

* Revert unnecessary changes

* Fix failed merge

* Fix review findings

* Fix review logs

* Fix review comments

---------

Co-authored-by: Gergely Nyiri <gergely.nyiri@eli-alps.hu>
Co-authored-by: Martin <martin.trajanovski@gmail.com>

* docs: user officer pages restructure (#712)

* doc-user-images

* Restructure

*Changed page structure to resemble User Office
*Changed page layouts
*Added main guides folder
*Changed colours

* docs: add kubernetes guide and small fixes (#713)

docs: add kubernetes guide and small fixes

* Made title as a mandatory props for the StyledDialog to have a consistent look and to avoid style breaks for the close icon.

* docs: fixed links, added page for setting up email service (#715)

* feat: add technique picker question (#688)

* Initial backend changes

* Initial changes

* Initial changes

* Initial changes

* Query and mutation changes

* path query fix

* Add initial frontend tech picker changes

Part of UserOfficeProject/issue-tracker#1097

* Fix picker answer search

Part of UserOfficeProject/issue-tracker#1097

* Assign all instruments to proposal

Part of UserOfficeProject/issue-tracker#1097

* Rename assign function

Part of UserOfficeProject/issue-tracker#1097

* Logging changes

* Unit tests

* Add single tech inst assignment test

Part of UserOfficeProject/issue-tracker#1097

* Add multiple tech inst assignment test

* Technique picker as dependency

* e2e tests

* Add technique seeds

Part of UserOfficeProject/issue-tracker#1097

* Fix test

Part of UserOfficeProject/issue-tracker#1097

* Add tests for which techniques display

Part of UserOfficeProject/issue-tracker#1097

* Rework logic for assigning instruments

* Fix test logic for inst assignment

Part of UserOfficeProject/issue-tracker#1097

* Fix delete e2e test

Part of UserOfficeProject/issue-tracker#1097

* Fix advanced e2e tests

Part of UserOfficeProject/issue-tracker#1097

* e2e advanced test fix

* Include technique in pdf

* Remove assignment of all instruments to proposal

* Fix before save method

* Resolve conflicts

* ui upgrade

* Add validation checks

* e2e fix

* Fix technique picker dependency

* Fix circular dependency test

* Fix template export test

* Remove debug statement

* Add tests for radio variant

* Refactoring tests

* Fix technique dependency test

* Add tests to multi selection

* Review comments fix

* Correct filename

* Run technique tests

* Add technique e2e test

* Fix techniques tests

* Revert "Add technique e2e test"

This reverts commit 9c93086.

* Fix assignment tests

* Techniques test fix

* Review comments fixes

* Fix/modify proposal tech assignment

* Fix delete test

* Remove unused line

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* Review comment fix

---------

Co-authored-by: Simon Fernandes <simon.fernandes@stfc.ac.uk>
Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

* fix: fix fap review and member selections (#679)

* fix: fix fap review and member selections

* fix total count on static data being wrong

---------

Co-authored-by: Martin <martin.trajanovski@gmail.com>

* fix: add validation to files endpoints (#714)

* fix: add validation to files endpoints

* Update apps/frontend/src/hooks/common/useFileUpload.ts

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

---------

Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Thomas Cottee Meldrum <81559866+TCMeldrum@users.noreply.github.com>
Co-authored-by: Bhaswati Dey <bhaswati1148@gmail.com>
Co-authored-by: Bhaswati Dey <bhaswati.dey@stfc.ac.uk>
Co-authored-by: deepak jaison <deepak.jaison@stfc.ac.uk>
Co-authored-by: Simon Fernandes <simon.fernandes@stfc.ac.uk>
Co-authored-by: Fredrik Bolmsten <fredrik.bolmsten@ess.eu>
Co-authored-by: Martin <martin.trajanovski@gmail.com>
Co-authored-by: janosbabik <143906591+janosbabik@users.noreply.github.com>
Co-authored-by: Thomas Cottee Meldrum <thomas.cottee-meldrum@stfc.ac.uk>
Co-authored-by: deepaksftc <149392207+deepaksftc@users.noreply.github.com>
Co-authored-by: Yoganandan Pandiyan <p.yoganandan@gmail.com>
Co-authored-by: Farai Mutambara <farai.mutambara@stfc.ac.uk>
Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>
Co-authored-by: Farai Mutambara <71100224+mutambaraf@users.noreply.github.com>
Co-authored-by: Oschroder <63235542+Oschroder@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chi Kai Lam <chi-kai.lam@stfc.ac.uk>
Co-authored-by: Sylvana <sylvanabrewer@gmail.com>
Co-authored-by: Chi Kai Lam <114708346+bashanlam@users.noreply.github.com>
Co-authored-by: Ellen Wright <144028998+ellen-wright@users.noreply.github.com>
Co-authored-by: Gergely Nyiri <gergely.nyiri@gmail.com>
Co-authored-by: Gergely Nyiri <gergely.nyiri@eli-alps.hu>
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.

Export all proposal from call with FAP allocations and reviews
4 participants