forked from PnX-SI/gn_module_monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to prepare for visits (#44)
* Fix/db migrations (#31) * feat(db): upgrade down_revision following rebase Since rebase with develop: changed the down_revision number * fix(db): fix bind params enabling downgrade Beforehand the downgrade was not possible... * refactor(db): removed cor_site_type_category * refactor(db): changed category into type in cor * refactor(db): create cor_type_site * fix(db): renamed column * refactor(api): update models to fit migrations * fix(db):change bib_categorie_site to bib_type_site Adding : cor_site_module cor_site_type revision alembic to create function and trigger in order to add bib_type_site but only with nomenclature 'TYPE_SITE' upgrade and downgrade works [Refs ticket]: #3 Reviewed-by: andriac * fix(api): updated models from migrations * fix(api): wip: fix admin following migrations * fix(api): update routes and tests To match migration changes * feat: flask admin bib_type_site Change bib_categories to bib_type_site into flask admin Adding filtering in list label_fr of type_site to secure the unique constraint Reviewed-by: andriac [Refs ticket]: #3 * fix(api): updated schema to match models * fix(api): module edition * style(api): uniformize type_site * style(api): change relationship name for type_site * feat(api): validator admin * fix(api): make unique BibTypeSite in admin * test(api): fix test when existing nomenclatures In database Co-authored-by: Andria Capai <[email protected]> * refactor: object.service with observable obj Change the objectType string to objectType obj in order to subscribe to multilple properties link to this object Reviewed-by: andriacap [Refs_ticket]: #40 * feat: adapt service to get config json Get fieldsName and fieldsLabel for display properties (properties component) Add logic to setItem in LocalStorage to keepLast Value of observable on reload page TODO: - [ ] see if Localstorage is really necessary with the configService used inside api-geom.service ) - [ ] adapt monitoring-form-g.component with the new service Reviewed-by: andriacap [Refs ticket]: #4 * refactor(front): svc: better use of types * feat(front): add Visits component and service * feat(back): add get site by id route & test * feat(api): add visits routes and schema * fix(api): join modules to have the modulecode For the frontend to be able to redirect to the correct route * feat(api): add sites/id/module route To retrieve all the modules compatibles with this site This lead to add a relationship. Set to noload so that it is not loaded by other not "raiseloaded" queries * test(api): add test to test the /sites/id/module Route. Also changed some fixture to be able to write these tests * fix(front): remove double def of IGeomService * refactor(front): remove Resp interface Since it is not usefull anymore * fix(api): exclude sites relationship * fix(config): change KeyValue Since id changed * feat(front): make datatable accepts other add btn To be able to customize the "add object" button * feat(front): add btn select protocole for visit Add new component: select-btn Add call to route to get modules from a base site id Call the new component in the visit component Add interfaces Add type in config service * feat(front): parameter for label and placeholder For the btn component. Style menu and form-field to make them larger * refactor(front): api service with generic types * fix(front): div removed following rebase * refactor(front): add service as input for formComp So that formComp is more type generic * fix(config): remove "s" from sites_group * refactor(front): put initConfig in ApiService * fix(front): remove "s" from visit * fix(front): put back condition on css class To make ng-content conditionnal * fix: following rebase Fix imports, double declarations... * fix(api): redirect to url * refactor(front): rename select-btn to option-list * fix: remove contrib --------- Co-authored-by: Andria Capai <[email protected]>
- Loading branch information
Showing
36 changed files
with
380 additions
and
252 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
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
BibTypeSite, | ||
TMonitoringSites, | ||
TMonitoringSitesGroups, | ||
TMonitoringVisits | ||
TMonitoringVisits, | ||
) | ||
|
||
|
||
|
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
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
2 changes: 1 addition & 1 deletion
2
...app/components/monitoring-sitesgroups-create/monitoring-sitesgroups-create.component.html
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!-- IF prefered observable compare to ngOnChanges we can remove rows and colsname--> | ||
<div> | ||
<pnx-monitoring-form-g [objForm]="form"></pnx-monitoring-form-g> | ||
<pnx-monitoring-form-g [apiService]="sitesGroupService" [objForm]="form"></pnx-monitoring-form-g> | ||
</div> |
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.