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

Project creation workflow fixes (task splitting) #1194

Merged
merged 9 commits into from
Feb 13, 2024

Conversation

spwoodcock
Copy link
Member

@spwoodcock spwoodcock commented Feb 12, 2024

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Related Issue

Fixes #1177
Possibly related to #1188, but untested for now.

Describe this PR

  • Lots of refactoring introduced a few bugs in project creation.
  • This PR should fix various issues.
  • TODO: fix extracting geoms from the flatgeobuf generated by raw-data-api (it contains multiple geom types).
fmtm-api-1  | 2024-02-12 17:17:51.122 | WARNING  | app.projects.project_crud:generate_appuser_files:1297 | (psycopg2.errors.InternalError_) flatgeobuf: GeometryReader::read: Unknown type 0
fmtm-api-1  |
fmtm-api-1  | [SQL:
fmtm-api-1  |         DROP TABLE IF EXISTS public.temp_fgb CASCADE;
fmtm-api-1  |
fmtm-api-1  |         SELECT ST_FromFlatGeobufToTable('public', 'temp_fgb', %(fgb_bytes)s);
fmtm-api-1  |
fmtm-api-1  |         SELECT jsonb_build_object(
fmtm-api-1  |             'type', 'FeatureCollection',
fmtm-api-1  |             'features', jsonb_agg(feature)
fmtm-api-1  |         ) AS feature_collection
fmtm-api-1  |         FROM (
fmtm-api-1  |             SELECT jsonb_build_object(
fmtm-api-1  |                 'type', 'Feature',
fmtm-api-1  |                 'geometry', ST_AsGeoJSON(fgb_data.geom)::jsonb,
fmtm-api-1  |                 'properties', fgb_data.properties::jsonb
fmtm-api-1  |             ) AS feature
fmtm-api-1  |             FROM (
fmtm-api-1  |             SELECT *,
fmtm-api-1  |                 NULL as properties
fmtm-api-1  |                 FROM ST_FromFlatGeobuf(null::temp_fgb, %(fgb_bytes)s)
fmtm-api-1  |             ) AS fgb_data
fmtm-api-1  |         ) AS features;
fmtm-api-1  |     ]
fmtm-api-1  | [parameters: {'fgb_bytes': b'fgb\x03fgb\x01\xc4\x04\x00\x00 \x00\x00\x00\x00\x00\x1a\x00\x1c\x00\x04\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x14\x00\x00\x00\ ... (555069 characters truncated) ... @+\x1c\x9c\xe37SU@\xe0\x02\xbf\xfc\x04\xb6;@T\xe0d\x1b8SU@s\x9c\x80\xcb\x08\xb6;@ 57\xf04SU@\xee\xf9\xab\x11\x0b\xb6;@\xf7pn\xb84SU@2\xe1<A\x07\xb6;@'}]
fmtm-api-1  | (Background on this error at: https://sqlalche.me/e/20/2j85)

Screenshots

Please provide screenshots of the change.

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

@spwoodcock spwoodcock self-assigned this Feb 12, 2024
@github-actions github-actions bot added frontend Related to frontend code backend Related to backend code labels Feb 12, 2024
@spwoodcock spwoodcock marked this pull request as ready for review February 13, 2024 09:19
@spwoodcock spwoodcock changed the title Project creation workflow fixes Project creation workflow fixes (task splitting) Feb 13, 2024
@spwoodcock spwoodcock merged commit bd6c743 into development Feb 13, 2024
6 checks passed
@spwoodcock spwoodcock deleted the fix/project-create branch February 13, 2024 09:26
spwoodcock added a commit that referenced this pull request Feb 23, 2024
* feat: project submissions page (#1150)

* fix (routes): projectSubmissions route added

* fix (icon): icon added

* fix (projectSubmissions): setup

* fix (projectSubmissions): styling adjustments

* feat (projectSubmissions): projectInfo section slicing

* feat (AssetModules): icon added

* feat (taskSubmissions): taskSection - UI slicing

* fix (projectSubmissions): UI fixes

* feat (AssetModules): icons added

* feat (select): className added to select

* feat (projectSubmission): submissionsTable - filter section UI completed

* feat: (AssetModules): icons added

* fix (routes): normal import for projectSubmissions

* feat (customTable): custom table added

* feat (submissionsPage): table added to submission page

* fix (taskSubmissions): mobile responsive

* feat (recharts): recharts package added

* icon added

* feat (recharts): bar & pie chart added

* feat (LineChart): lineChart added

* feat (ProjectSubmissions): infographics - infographics slicing

* feat (package): html2canvas package added

* feat (submissionsPage): chartDownload - download feature added to the charts

* fix (lineChart): line color changed

* fix (UI): UI changes

* fix (barChart): dynamic data for barChart

* fix (pieChart): dynamic data for pieChart

* fix (barChart): dynamic dataKey for xAxis

* fix (lineChart): dynamic data for lineChart

* fix (chart): bar/pie color changed

* fix (lineChart): x & y axis labels added

* feat (projectSubmissions): skeleton loader added

* fix (projectSubmissions): filter padding increase

* feat (projectSubmissions): skeletonLoader - skeletonLoader added to infographics and table

* created api that returns the submission count by date

* fix (projectSubmissions): infographicsCard - infographicsCard seperated to another component

* feat (projectSubmissions): barChart - api fetch for formSubmissions

* refactored response

* feat: (projectSubmissions): submissionBar - dummy data replaced with actual data

* fix (barChart): maxBarSize set

* feat (projectSubmissions): task api call

* feat (projectSubmissions): projectInfo - dynamic value for projTitle, tasks count, submission count

* feat (projectSubmissions): taskSidebar - dynamic data added

* feat (projectSubmissions): taskSidebar - zoomToTask feature added

* Created Project dashboard

* added organization info

* Exception handling in s3 if no object found

* refactor

* fix: string based date to custom date format for over 7days

* feat (projectSubmissions): contributorsTable - contributors table data fetch

* fix (projectSubmissions): UI fix

* fix (assetModules): duplicated icon removed

* feat (projectSubmissions): projectInfo - api integration

* fix (projectSubmissions): piechart - outerRadius adjusted

* fix (projectSubmissions): message display if no data available

* feat (projectSubmissions): taskLoading - skeleton loader added for tasks

* fix (projectSubmissions): filter - UI fix

* feat submissionsTable: api fetch for submissionsTable field & data

* feat projectSubmissionsTable: dynamic header & data add with skeleton loader

* fix projectSubmissions: relative path imports replaced with absolute path imports

* feat projectSubmissionsTable: refresh table data functionality add

* fix import: wrong validation import fix

* feat submissionTable: mui tablePagination added

* fix projectSubmissions: pagination api fetch

* fix createProjectSlice: import fix

* fix projectSubmissions: types added to slice

* fix projectSubmissions: loading state to false if error arise in table api fetch

* fix projectSubmissions: pagination disable on api fetch pending

* fix select: optional type of null to value, errorMsg optional

* fix projectSubmissions: table filter state added

* fix lineChart: line color changed, xLabel & yLabel hidden if not present

* fix projectSubmissions: validated vs mapped task lineChart add

* fix bar/pieChart - color updated

* fix projectSubmissions: redirection to submissionsPage on View Submissions click

* fix projectSubmissions: loading state add on projectProgress api fetch

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: sujanadh <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* fix loadingBar: loading bar moved to & imported from createnewproject folder

* refactor createproject: old createProject folder deleted

* refactor routes: removed import & removed old commented createproject routes

* docs: add docs and task board badges to README

* docs: update docs/task board badges to track development

* fix: project creation draw and max boundary area (#1157)

* fix uploadArea: areaValidation for fileUpload, draw hide if selectionType uploadFile, draw available if AOI reset

* fix stepSwitcher: remove cursor-pointer on step hover

* fix projctDetails: link to setting ODK server placed on Here text

* refactor: add extra error handling if data extract download fails (#1158)

* fix: downloading data extract accessing download_url key

* add error log if data extract download fails

* fix: project submission date and time formatted (#1160)

* fix button: other btnType UI change

* fix useOutsideClick: useOutsideClick hook add

* feat projectDetails: buttons added including handleOutsideClick

* feat projectOptions: options added for larger screens

* fix projectDetails: redirect to projectSubmissions page on viewInfographics click

* fix: zlib compress dynamic QR codes from frontend (#1159)

* build(frontend): add pako for zlib compression, relock via pnpm

* fix(frontend): add zlib compression to dynamic qrcodes

* fix: zlib compression for qrcodes pako v2 (Uint8Array)

* build: add qrcode conversion container to contrib

* fix(frontend): remove svcfmtm from loginSlice initialState

* fix(backend): append /v1/ to odk_token url for qrcodes

* fix: map default odk credentials to organisations (#1123)

* fix: add odk cred org schemas for db and pydantic

* fix: add HttpUrlStr type for Url validation of str values

* fix: fix OdkCentral schema to handle passwords, inherit

* refactor: use new ODKCentralDecrypted, simplify proj create

* fix: add org_deps get_org_odk_creds method

* refactor(frontend): update create_project json structure

* refactor(frontend): remove code to add #FMTM tag automatically

* test: fix project route tests

* refactor: revert setting outline_geojson in create_app_project

* feat(frontend): option to add default odk creds for organisation

* refactor(frontend): rename form during project creation --> category

* refactor: remove additional route added during rebase

* feat: set project delete endpoint to org_admin only

* feat(frontend): project deletion capability

* fix: organisation logo display full width (#1166)

* fix homePage: exploreProjectCard image crop fix

* fix splitTasks: text below progressBar remove

* fix: create popup outside of async request (fix ios login) (#1167)

* fix: baselayer url changed with token

* feat: project admin role (#1133)

* project_admin role deps

* fix: default value for role in user_role table

* feat: api to create new project manager

* fix: linting errors

* fix: linting errors

* delete projects endpoint restricted for organisation admin only

* fix:linting errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add new project admin allowed to project admin role

* updated project admin role deps

* feat: dependency org_admin to create project

* feat: implemented access to project_admin to edit the project

* feat: applied user dependency as per the requirement

* project_admin role deps

* fix: default value for role in user_role table

* feat: api to create new project manager

* fix: linting errors

* fix: linting errors

* delete projects endpoint restricted for organisation admin only

* fix:linting errors

* add new project admin allowed to project admin role

* updated project admin role deps

* feat: dependency org_admin to create project

* feat: implemented access to project_admin to edit the project

* feat: applied user dependency as per the requirement

* update and refactor: user roles

* refactor: simplify role access, combine into single query

* refactor: update usage of roles, org_admin return dict of objects

* fix: update project manager role usage

* perf: add db indexes for org managers and user roles

* dependency removed from validate_form endpoint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test: fix create_project pass url param

* fix: add role for DEBUG enabled user

* fix(frontend): pass org_id as url param to create_project

* test: create test user account as ADMIN permission

* fix: separate login logic from /me/ route

* test: fix tests requiring auth permissions

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: sujanadh <[email protected]>
Co-authored-by: spwoodcock <[email protected]>
Co-authored-by: Sam <[email protected]>

* fix: organisation routes role usage & approval

* fix: remove approved flag from organisations endpoint

* feat: mapper role (#1163)

* fix: remove approved flag from organisations endpoint

* feat: Implement Mapper role

* Refactor: check role from lower hierarchy and added role in end points

* refactor: update mapper role to use check_access func

* refactor: fix linting errors for backend

---------

Co-authored-by: spwoodcock <[email protected]>
Co-authored-by: sujanadh <[email protected]>

* feat: manage / edit project UI (#1154)

* fix (routes): projectSubmissions route added

* fix (icon): icon added

* fix (projectSubmissions): setup

* fix (projectSubmissions): styling adjustments

* feat (projectSubmissions): projectInfo section slicing

* feat (AssetModules): icon added

* feat (taskSubmissions): taskSection - UI slicing

* fix (projectSubmissions): UI fixes

* feat (AssetModules): icons added

* feat (select): className added to select

* feat (projectSubmission): submissionsTable - filter section UI completed

* feat: (AssetModules): icons added

* fix (routes): normal import for projectSubmissions

* feat (customTable): custom table added

* feat (submissionsPage): table added to submission page

* fix (taskSubmissions): mobile responsive

* feat (recharts): recharts package added

* icon added

* feat (recharts): bar & pie chart added

* feat (LineChart): lineChart added

* feat (ProjectSubmissions): infographics - infographics slicing

* feat (package): html2canvas package added

* feat (submissionsPage): chartDownload - download feature added to the charts

* fix (lineChart): line color changed

* fix (UI): UI changes

* fix (barChart): dynamic data for barChart

* fix (pieChart): dynamic data for pieChart

* fix (barChart): dynamic dataKey for xAxis

* fix (lineChart): dynamic data for lineChart

* fix (chart): bar/pie color changed

* fix (lineChart): x & y axis labels added

* feat (projectSubmissions): skeleton loader added

* fix (projectSubmissions): filter padding increase

* feat (projectSubmissions): skeletonLoader - skeletonLoader added to infographics and table

* created api that returns the submission count by date

* fix (projectSubmissions): infographicsCard - infographicsCard seperated to another component

* feat (projectSubmissions): barChart - api fetch for formSubmissions

* refactored response

* feat: (projectSubmissions): submissionBar - dummy data replaced with actual data

* fix (barChart): maxBarSize set

* feat (projectSubmissions): task api call

* feat (projectSubmissions): projectInfo - dynamic value for projTitle, tasks count, submission count

* feat (projectSubmissions): taskSidebar - dynamic data added

* feat (projectSubmissions): taskSidebar - zoomToTask feature added

* Created Project dashboard

* added organization info

* Exception handling in s3 if no object found

* refactor

* fix: string based date to custom date format for over 7days

* feat (projectSubmissions): contributorsTable - contributors table data fetch

* fix (projectSubmissions): UI fix

* fix (assetModules): duplicated icon removed

* feat (projectSubmissions): projectInfo - api integration

* fix (projectSubmissions): piechart - outerRadius adjusted

* fix (projectSubmissions): message display if no data available

* feat (projectSubmissions): taskLoading - skeleton loader added for tasks

* fix (projectSubmissions): filter - UI fix

* feat (manageProject): manageProject added

* feat (assetModules): icon added

* feat (chips): chips added

* fix (select): UI fix

* feat (manageProject): partial UI completion for manage-project

* feat (AssetModules): icon added

* feat (UploadArea): custom upload area added

* feat (manageProject): editTab - UI slicing completed for editTab

* fix (AssetModules): duplicate icon removed

* fix (select/manageProject): UI fix

* feat (ManageProject): userTab - table added

* fix (manageProject): mobile responsive fix

* fix (customTable): css fix

* feat (AssetModules): icons added

* feat kebabMenu: kebabMenu added

* feat (manageProject): table - kebab menu added to table

* fix manageProject - UI fixes

* fix (KebabMenu): added types

* fix select: title background transparent

* fix button: loading text checked first to display if button state loading

* feat (manageProject): editProject - edit project description add

* feat manageProject: formCategory list api fetch

* feat uuid: uuid package add to generated ids

* fix uploadArea: uuid add to uniquely identify each file

* fix (manageProject): edit - projectId passes as prop to child

* feat (manageProject): formUpdate - postFormUpdate api hit on update click

* fix manageProject: individualProjectDetails fetch on parent component

* fix navigation: navigation route added to manageProject and back btn

* feat newProjectDetails: viewInfographics & manageProject btn add for mobile view under project options

---------

Co-authored-by: sujanadh <[email protected]>

* ci: update all gh-workflows --> v1.4.7

* refactor: cast all fields for sqlalchemy with python types (#1173)

* refactor: cast all fields for sqlalchemy with python types

* fix: flatgeobuf conversion extract from Column first

* feat: task history end point with associated user (#1071)

* feat: separate task history end point

* fix: add user relationship backref to task history

* fix: add user details to task_history endpoint

* refactor: revert to sqlalchemy backref names

---------

Co-authored-by: sujanadh <[email protected]>
Co-authored-by: spwoodcock <[email protected]>

* feat(frontend): default organisation credentials during proj create  (#1174)

* fix: improve create organisation ui styling

* fix: set org odk password field to password type

* fix: allow for empty value for HttpUrlStr validation

* feat(frontend): create project using default organization creds

* refactor: update project creation comments --> tags

* refactor: task status update endpoint to adjust mapper role (#1180)

* update: task status update endpoint to adjust mapper role

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* fix: update db relations for generating submissions (#1179)

* fix: update submission in s3

* Fix: error handling in s3

* removed optional from get_obj_from_bucket

---------

Co-authored-by: sujanadh <[email protected]>

* fix uploadArea: geojson validation for uploaded file

* feat: create / edit organization form (#1178)

* feat createEditOrganization: routes/header setup

* feat createEditOrganization: conditionally showing consent/createEdit forms

* fix createEditOrganizationHeader: component renamed

* feat consentQuestions: consent questions schema setup in constants

* feat consentDetailsForm: leftSide container UI add

* feat checkbox: custom radixUI checkbox component add

* fix radioButton: className prop add to radioButton

* fix consentQuestions: questions update

* fix button: hover effect added to btn type other

* fix checkBox: UI fix

* feat consentDetailsForm: UI complete

* feat consentDetailsForm: useForm integration & validations add

* fix createEditOrganizationForm: organizationId props pass

* fix RadioButton: required prop added

* fix inputTextField: sublabel add

* feat createEditOrganizationForm: form UI & validation complete

* fix inputTextField: subLabel update

* fix consentQuestions: redirection links added

* fix organizationForm: post create organization detail

* feat editOrganizationForm: individualOrganization api fetch

* feat organizationForm: patch organizationData on update

* fix organizationForm: naming change

* fix organization: instructions updated & seperated to another component

* fix manageOrganization: hide profile, org_type, osm_profile fields for edit organization

* fix projectDetails: dowloadOptions open/close issue fix

* feat approveOrganization: UI complete

* fix organizationService: loading state false

* fix createEditOrganizationForm: osm_profile remove from form

* fix createEditOrganizationForm: filedType changed to password

* feat userRole: userRole set to localStorage

* fix manageOrganizations: UI fix, verified show/hide based on userRoles

* fix manageOrganization: UI update

* fix organizationDetailsValidation: osmProfile removed

* fix createEditOrganization: clear consentForm state on organization creation

* feat approveOrganization: approve api hit on verify click

* refactor: org creation page consent questions (#1185)

* fix consentQuestion: participated_in question required change to false

* fix consentDetailsValidation: updated validation where user should mark atleast one checkbox for log_into question

* feat: osm-rawdata for generating data extracts (#1183)

* refactor: remove old unused DefineMapArea component

* refactor: rename /generate endpoint --> /generate_project_data

* fix(frontend): correctly send data_extract_type to project create

* fix(frontend): add data_extract_url param, refactor DataExtract for clarity

* build: add migration for projects.data_extract_url field

* fix: add slash to osm-data-extract url for correct method

* fix(frontend): pass through data extract url & type during proj creation

* fix: set data extract url and type on generate endpoint

* fix(backend): use osm-rawdata for data extract generation + filtering

* fix(frontend): add form_category for osm data extract post params

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* build: update osm-rawdata --> v0.2.0

* build: update osm-rawdata --> v0.2.1

* feat: correctly set data extract url if custom upload or osm

* fix: load fgb data extract and get geojson geoms

* fix: accept xls forms in xls and xlsx format

* fix: optional data extracts for tasking splitting algo

* build: update fmtm-splitter --> v1.1.1

* refactor: simplify project file generation during creation

* fix(frontend): passing params for tasking splitting algo

* refactor: remove data extract type if osm generated

* build: update minio browser to use env var

* refactor: do not include minio port bind by default

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* test: fix create project generate_appuser_files usage

* fix: project submission card UI enhancement (#1186)

* feat assetModules: icon add

* fix projectSubmissions: projectDataCard UI enhancement

* fix: projectSubmissions: UI enhancement

* fix projectSubmissions: infographics section mobile responsive

* docs: use mdx_truly_sane_lists plugin for list ordering

* fix: feature type not being saved as a geojson type

* fix: axios interceptors fixing test

* fix: axios interceptor testing

* fix: project creation workflow fixes (task splitting) (#1194)

* fix: remove Field(Form()) from schemas

* refactor: move geometry generation to project_schemas

* fix(frontend): send project outline geojson during create

* fix: only send custom data extracts to splitter

* fix: optional project_task_name in schema

* refactor(frontend): remove refs to project_task_name

* refactor(backend): remove extract_type from data-extract-url

* fix(frontend): setting data extract url if osm generated extract

* test: fix or remove tests during project creation

* fix: add odk_central_url to org details returned

* feat: add community_type for organisations, add unapproved org list endpoint (#1197)

* create organisation permission updated to login_required

* api to list unapproved organisations

* Feat: Added email and community_type field in organisation

* fix: changed org_id to mandatory to create project

* fix: added organisation_id in payload of create project

* fix: await check crs, added email and community type in test organisation

* refactor: proper enum field community type in test organisation

* build: update community_type migration number & logic

* refactor: remove email field from organisation

* refactor: remove organisation_id from ProjectUpload model

* refactor: remove email from dborg model for conftest

* refactor: remove organisation_id from create_project POST json

* test: fix remove organisation_id from ProjectUpload

* fix: add optional organisation_id to ProjectUpload

* feat: add project to org_user_dict if present

* fix: extract project from org_user_dict on deletion

* test: fix tests to include organisation_id extracted from fixture

---------

Co-authored-by: Niraj Adhikari <[email protected]>
Co-authored-by: sujanadh <[email protected]>
Co-authored-by: spwoodcock <[email protected]>

* fix: org creation using Form params

* feat: endpoints for task comments (#1171)

* feat: taskcomment model added

* feat: crud task comment

* feat: task comment crud api route added

* feat: task comment schema added

* fix: removed use of dictionary to object

* fix: change row name by id with task_comment_id

* fix: renamed comment_task_id_to_id

* feat: migration add-task-comment

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* renamed task_comment index

* fix: removed new table migration for taskcomment

* feat: used task_history table to get task_comment and add task_comment
Using task_history table maintained action row as COMMENT and added comment

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: linting issue

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactor: improve sql, use query params, fix linting errors

* refactor: minor code cleanup bundled in merge

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: spwoodcock <[email protected]>

* fix: update task status when mapping starts (#1208)

Co-authored-by: sujanadh <[email protected]>

* feat: init public beta org and svcfmtm user migration (#1206)

* build: remove odk vars from frontend build dev compose

* build: remove user password field from init schema

* build: fix only continue migration if sql script succeeds

* build: update migration entrypoint envsubst + error handling

* build: migration to create fmtm public beta org + svcfmtm

* build: add gettext for envsubst command in dockerfile

* build: use odk user email for svcfmtm user email

* fix: replace org init with startup code for pass encrypt

* fix: specify user id for svcfmtm admin init

* build: fix remove sequential user id (create manually)

* build: remove default user creation from migration script

* build: fix project-roles migration if enum exists

* fix (manageProject) - formUpdate: remove formCategory dropdown for update

* fix (projectSubmissions): taskList: search functionality add to task-list section

* fix taskIdSearch: message display if searched taskId not present

* fix:added interceptor for cookie issue

* feat: filters on submission table (#1191)

Co-authored-by: sujanadh <[email protected]>

* build: increase proxy_read_timeout for longer connection time

* refactor: remove old edit-project code (#1210)

* refactor (frontend): rename changeset to hashtags (#1211)

* fix editProject: fieldName changeset change to tags, tags field required set to false

* fix namingChange: field title Tags changed to Hashtags

* feat: api returning details of unapproved org (#1218)

Co-authored-by: sujanadh <[email protected]>

* feat: improve submissions dynamic filtering (#1217)

* fix submissionTable: filterObj key name change, reviewStateData constant add

* feat: filters on submission table

* fix inputTextField: input label fix

* fix submissionTable: submitted by textField add

* feat customDatePicker: react-datepicker add

* fix projectSubmissions: datepicker add & payload add for api fetch

* fix projectSubmissions: submissionFilters UI enhancement

* fix projectSubmissions: toggle infographics/table view UI re-arrangement

* feat pieChart: legend add

* fix submissionInfographics: dynamic value for projectProgress pieChart

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: sujanadh <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* fix: data extract generation and task splitting with polylines (#1219)

* build: bump osm-rawdata & fmtm-splitter versions for fixes

* fix: use useStWithin=False for data extract generation with polyline

* fix: first coordinate check when check_crs geojson

* Updated osm-fieldwork version (#1222)

* fix: submissions form fields

* refactor central crud

* pdm lock file updated

---------

Co-authored-by: sujanadh <[email protected]>
Co-authored-by: Niraj Adhikari <[email protected]>

* feat (frontend): approve organization api integration (#1215)

* fix managProject: UI fix

* feat manageOrganization: redirect to approveOrganization on org click on To Be Verified tab org list

* fix rejectOrganization: service for rejectOrganization add

* feat organizationApproval: state management to show approving/rejecting status, redirect to manage-org after approval success

* fix: update schema to edit only required fields (#1223)

Co-authored-by: sujanadh <[email protected]>

* Instructions in create and edit project (#1224)

* fix: update schema to edit only required fields

* feat: added instructions in project create and edit

---------

Co-authored-by: sujanadh <[email protected]>

* fix editProject: formUpdate file extension spelling corrected to xlsx

* fix header: activeTab selection based on url pathname

* refactor primaryAppBar: unnecessary commented code remove

* feat: added approved in get organisation response (#1226)

Co-authored-by: sujanadh <[email protected]>

* feat assetModules: tuneIcon add

* feat shadcnDropdown: shadcn dropdown add

* fix select: zIndex add to selectContent

* fix submissionsFilter: UI enhancement

* fix submissionTable: logic add to handle Point & object to display dynamic table

* feat submissionsTable: buttons add

* fix modal: modal props type add

* fix taskService: josmService comment update

* feat projectSubmissions: uploadToJosm api integration & modalOpen on josmError

* fix: removed deps from delele org api (#1233)

Co-authored-by: sujanadh <[email protected]>

* fix dropdown: dropdownMenu UI fix

* feat submissionTable: download as csv & json dropdown add on download option

* fix taskService: axios get replace fetch for convertXMLToJOSM service

* fix: required odk credentials if no organisation default (#1205)

* fix ICreateProject: projectDetailsTypes fix

* fix projectDetialsForm: default of value #FMTM add to tags field

* fix projectDetailsForm: odk url, email, password made required

* fix projectDetailsForm: default FMTM tag removal

* fix checkbox: className props add

* fix createEditOrganization: remove email field, checkbox add to conditionally show ODK credentials field

* fix organizationForm: remove email field

* fix customDatePicker: types add

* fix createEditOrganizationFrom: ODK credential fields optional/required based on checkbox

* feat createNewProject: conditionally hide/unhide ODK credentials fields based on checkbox selection

* fix createNewProject: clear odkCredentials on defaultODKCredentials checkbox uncheck

* fix createNewProject - step1: UI enhancement, splitted form updated to single column form

* fix organizationForm: getUnapprovedOrganization api replacement

* fix unapprovedOrg: return obj instead of array

* fix organization: state not clear issue solve

* fix organization: editOrganization organizationFormData state clear

* fix createEditOrganization: comments add

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* feat (frontend,backend): my organisations tab implemented (#1227)

* feat: my organisations api route added

* feat: get my organisation function

* feat: added get organisation api service

* feat: organisationGridCard Component created

* feat: Type added to organisation slice

* Feat: My organisation tab for data fetching

* refactor: remove missed print statement

---------

Co-authored-by: spwoodcock <[email protected]>

* refactor: improve flatgeobuf loading and generation (#1235)

* refactor: update flatgeobuf --> geojson to extract properties

* fix: create flatgeobuf files with spatial index by default

* docs: comment note for future fgb generation

* docs: extra info on fgb generation with tags

* fix: project org UI issues (#1230)

* fix editProject: formUpdate file extension spelling corrected to xlsx

* fix header: activeTab selection based on url pathname

* refactor primaryAppBar: unnecessary commented code remove

* feat assetModules: tuneIcon add

* feat shadcnDropdown: shadcn dropdown add

* fix select: zIndex add to selectContent

* fix submissionsFilter: UI enhancement

* fix submissionTable: logic add to handle Point & object to display dynamic table

* feat submissionsTable: buttons add

* fix modal: modal props type add

* fix taskService: josmService comment update

* feat projectSubmissions: uploadToJosm api integration & modalOpen on josmError

* fix dropdown: dropdownMenu UI fix

* feat submissionTable: download as csv & json dropdown add on download option

* fix taskService: axios get replace fetch for convertXMLToJOSM service

* test (frontend): case config, add test cases (#1231)

* feat: Test cases configuration changes for vitest

* feat(Test): Button test cases added with docstring

* feat(Testcases): added a small test cases to check if test is working

* fix: add created_by user id to organisation table (#1232)

* feat: added user in organisation

* feat: make user org manager after org approval

* fix: added user_id in org pytest fixture

* refactor: simplify organisation user_id --> created_by int field

* build: update migrations to match org db model

* refactor: simplify org approval logic

* refactor: bullet point in migration file

---------

Co-authored-by: sujanadh <[email protected]>
Co-authored-by: spwoodcock <[email protected]>

* feat submissionsPage: redirect to respective submissions & task submissions page on button click

* Feat verification tag add (#1234)

* feat organizationList: verification tag add on organization card

* fix projectTaskStatus: enum value display

* fix manageOrganization: hide new btn if no token & show verified/unverified tab on ALL tab selection only

* fix manageOrganization: add verification tag & redirect to approve org if org not verified

* fix: qr popup on task status & styling (#1184)

* fix (environment): tasksStatus - actionKey name change, btnBG key add

* fix assetModules: icon add

* fix button: UI change, id prop inclusion

* fix qrCodeComponent: UI enhancement, component moved from projectDetails to taskSectionPopup

* fix dialogTaskActions: UI enhancements, buttons add

* fix qrCodeComponent: qrcode access form parent component, code cleanup, UI enhancement

* fix qrCodeComponent: UI fix

* fix projectdetails: old projectDetails page replaced with new

* fix button: id prop relaced with btnId prop

* fix qrPopup: btnid extract from event.currentTarget

* fix projectDetails: navigate path to project_details fix

* feat filterParams: filter out null objects

* feat projectSubmissions: searchParams add on individual submissions page navigation

* fix projectSubmissions: navigate to projectSubmissions with searchParams

* feat: added bbox in read project's outline (#1244)

Co-authored-by: sujanadh <[email protected]>

* feat: flatgeobuf data extracts on frontend & backend (#1241)

* refactor: add data_extract_url to ProjectOut schema

* feat: load remote flatgeobuf data extracts from S3

* fix(frontend): correctly load nested fgb GeometryCollection type

* feat: read/write flatgeobuf, split geoms by task in database

* feat: split fgb extract by t
ask, generate geojson form media

* refactor: deletion comment for frontend files not required

* build: remove features table from db

* feat: allow uploading of custom data extracts in fgb format

* test: update tests to use flatgeobuf data extracts

* refactor: rename var for clarity

* ci: minify backend test data + ignore from prettier

* fix: move OdkDecrypted logic into project_deps (#1239)

* fix:commit features to db before generating task files

* refactor: convert repeated odk_cred into a function

* fix: reuse DbProject object when retrieving odk creds

---------

Co-authored-by: sujanadh <[email protected]>
Co-authored-by: spwoodcock <[email protected]>

* fix: comment broken SubmissionMap import on frontend

* refactor: changed sync to async gather_all_submission_csvs (#1258)

Co-authored-by: sujanadh <[email protected]>

* feat(manage-organizations): add `OrganizationCardSkeleton` component

* feat(manage-organisations): implement skeleton loader while Organizations are being fetched

* refactor: reorganize the code to make it cleaner

* fix: send bbox from geojson properties to josm (#1256)

* build: upgrade osm-rawdata --> 0.2.3 & relock all versions

* fix: file validity check on fileUpload only once (#1262)

* fix: use raw sql for organisation crud (#1253)

* fix: update initial_feature_count --> feature_count and populate values (#1265)

* build: rename tasks.initial_feature_count --> tasks.feature_count

* refactor: rename initial_feauture_count in endpoints

* fix: dynamic submissions legend chloropeth (#1250)

* fix projectSubmissions: dynamic mapLegend and taskChloropeth on increasing submissions count

* feat projectSubmissionsMap: popup showing expected/submissions count add

* fix homeSCSS: width fix

* fix popupHeader: border fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* refactor: removing redundant code for removing extra closing </osm> tag (#1264)

Co-authored-by: sujanadh <[email protected]>

* fix: task splitting with custom data extract (#1255)

* fix: handle GeometryCollection wrappers in geojson parse

* fix: task splitting when custom data extract uploaded

* feat: add map popups to data extract geometries (#1266)

* refactor: always return all properties on map click

* refactor: rename submissionModel --> taskModel

* refactor: configurable primary property key for map AsyncPopup

* feat: add map popup on data extract geom click

* build: make initial_feature_count migration idempotent

---------

Co-authored-by: Nishit Suwal <[email protected]>
Co-authored-by: sujanadh <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: NSUWAL123 <[email protected]>
Co-authored-by: Deepak Pradhan (Varun) <[email protected]>
Co-authored-by: Deepak Pradhan <[email protected]>
Co-authored-by: Niraj Adhikari <[email protected]>
Co-authored-by: Sujan Adhikari <[email protected]>
Co-authored-by: Niraj Adhikari <[email protected]>
Co-authored-by: prajwalism <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code frontend Related to frontend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task splitting algorithm fails to split tasks when osm data extracts is selected
1 participant