-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactorisation et fusion de la gestion des formulaires (#349)
* Remove customSpecConfig * Limitation de l'appel à get_config * Add test module config * refact(wip): type site config with obj Reviewed-by: andriacap * refact(wip): init typeSite, generic and specific conf Reviewed: andriaca * refact(wip): make observable to init form componen Reviewed-by: andriacap * fix: change EMPTY to of(null) Change return observable EMPTY by of(null) in order to keep chained observable Reviewed-by: andriacap * refact(wip) : refact form component Remove old methods Use loop on dynamicForm WIP: problem on initialize formControl (see geonature/frontend/src/app/GN2CommonModule/form/dynamic-form-generator/dynamic-form-generator.component.ts) Reviewed-by: andriacap * refact: delete "dataComplement" Remove dataComplement on form component Remove dataComplement in backend on create_or_update (called and used in pre_process) --> Check if "TODO" code if is still necessary Reviewed-by: andriacap * refact:add extra dynamic form On CREATION SITE - Create objFormsDynamic - Loop on these objFormsDynamic and display name for each group - Update values for theses objFormsDynamic and link to objForm TODO: Check if EDITION SITE and other object type works Reviewed-by: andriacap * style: apply linter prettier Reviewed-by: andriacap * fix: unused code and fix condition - Change condition to initFormDynamic - Change condition to change typeSite on formValue Reviewed-by: andriacap * refact: changed way to subscribe to dynamicForm - Remove place where variable called - Centralize on subscribe of length of dynamicForm Array Reviewed-by: andriacap * fix: problem on init objFormDynamic on Edit object - Need to filtered on types_site link to obj.properties['types_site'] - Add method to filtered (TODO: check if exist everywhere in utils ?) Reviewed-by: andriacap * fix/refact: change the way to initialize objForm - Fix Problem on specific operator (the forkjoin didn't work) - No more used of forkjoin and use defer in order to wait for specificValues$ is well completed before to subscribe and apply formValue Reviewed-by: andriacap * refact: remove unused code and use JSonData type Reviewed-by: andriacap * refact/fix: code bloc onInit and fix keep changes - Fix: Problem on delete type site in dynamic form (keep changes and re initialize values same as begining of edition) - Refact(wip) : code on onInit to be more readable Reviewed-by: andriacap * refact(wip): more readable by separate concerns Reviewed-by: andriacap * refact(wip): move method to formService and utils Reviewed-by: andriacap * refact/doc: add docs and move dynamicForm$ - Move outside initialize typeSiteConfig to generate objFomDynamic - Add doc for all methods added Reviewed-by: andriacap * fix: error for object without dynamicFormArray Add check if dynamicFormArray exist in objForm Reviewed-by: andriac * refact: remove unused/useless code/commençant Reviewed-by: andriacap * style: lint frontend Reviewed-by: andriacap * Simplification code * fix: remove return observable for objFormdefintion - Remove return observable and remove pipe operator Reviewed-by: andriac * fix: check if list of types_site are integer - FIXME : need to send only ids of types site and not types site as string (fix in backend) Reviewed-by: andriac * fix: get all properties of additional data Reviewed-by: andriacap * fix: keep types sites prop from other modules Backend :Need to add some code in backend to store extra properties in order to find them in frontend Frontend (form-component) : Get extra properties stores in "additional_keys" in order to target them when properties are filtered in post/patch method. Reviewed-by: andriacp * fix: use ids type site update when submit Reviewed-by: andriacap * Remove form-g and change route names * Black * refactor additionnal fields type site * format * fix update * fix routing errors * fix routing * Use form component for site creation * Rename component * fix display properties in site manager * Ne pas tenir compte du module lors de la récupération des sites parents * Remove form-g + Routing * Add child from datatable-g * Prettier * Navigation depuis le groupe de site * Bloquer l'ajout de visite depuis generic site create * Add parent path * Popup * Prettier * Breadcrumb * Correction pytest * Router * change permission order * do not filter by module if generic module * add missing grp_site object to monitoring module * don't call group site group if no grp site * fix routing --------- Co-authored-by: Andria Capai <[email protected]> Co-authored-by: TheoLechemia <[email protected]> Co-authored-by: Théo Lechémia <[email protected]>
- Loading branch information
1 parent
3c4274d
commit a738231
Showing
50 changed files
with
1,283 additions
and
1,819 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...end/gn_module_monitoring/migrations/be30fb5c1a56_add_site_group_object_for_monitoring_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"""add site group object for monitoring module | ||
Revision ID: be30fb5c1a56 | ||
Revises: 34253c8fa9b9 | ||
Create Date: 2024-07-12 14:42:28.611638 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'be30fb5c1a56' | ||
down_revision = '34253c8fa9b9' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.execute( | ||
""" | ||
INSERT INTO gn_permissions.cor_object_module (id_object ,id_module) | ||
VALUES | ||
((select id_object from gn_permissions.t_objects where code_object = 'MONITORINGS_GRP_SITES'), | ||
(select id_module from gn_commons.t_modules where module_code = 'MONITORINGS')); | ||
""" | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.execute( | ||
""" | ||
DELETE FROM gn_permissions.cor_object_module | ||
WHERE id_object = (select id_object from gn_permissions.t_objects where code_object = 'MONITORINGS_GRP_SITES') | ||
AND id_module = (select id_module from gn_commons.t_modules where module_code = 'MONITORINGS'); | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.