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

[6.5] Pages concernant les gîtes #6

Open
georgemoon opened this issue Nov 28, 2022 · 0 comments
Open

[6.5] Pages concernant les gîtes #6

georgemoon opened this issue Nov 28, 2022 · 0 comments
Labels
epic Epic, comme écrit dans les devis

Comments

@georgemoon
Copy link

No description provided.

@georgemoon georgemoon added the epic Epic, comme écrit dans les devis label Nov 28, 2022
andriacap added a commit that referenced this issue Apr 5, 2023
Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6
andriacap added a commit that referenced this issue Apr 5, 2023
Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 11, 2023
Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6
andriacap added a commit that referenced this issue Apr 12, 2023
get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 12, 2023
- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6
mvergez added a commit that referenced this issue Apr 14, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: todo comments about refactoring code

Add todo comment in order to don't forget what
is to improve inside the code

* chore(front): add comment and remove console.log

* chore(api): put back old formatting

* chore(api): remove useless comment

* refactor(api): move and rename create_update fct

* fix: put back inventor/digitiser & fix typo

* chore: remove useless files

Since columns are now loaded from json, they are not needed
anymore in separate typescript files

* chore: remove definition from sites_group.json

* fix: column problem on sites

* chore: remove useless comment

* refactor(front): remove comment and use rxjs

* chore(front): remove useless file

Since class BtnMultiSelectChipClass is not used anymore

* chore(front): remove useless comments/imports

* style(front): applied prettier

* chore(front): remove useless code

* refactor(front): regroup types into an interface

* style(front): applied prettier

* refactor(front): inherit config-json from config

---------

Co-authored-by: Andria Capai <[email protected]>
mvergez pushed a commit that referenced this issue Apr 14, 2023
Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6
mvergez pushed a commit that referenced this issue Apr 14, 2023
Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
mvergez pushed a commit that referenced this issue Apr 14, 2023
get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6
mvergez pushed a commit that referenced this issue Apr 14, 2023
- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6
mvergez added a commit that referenced this issue Apr 14, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: problem route navigation

Remove unused "urlRelative" create in last commit
Fix the action "add children" in datatable to redirect to the good
component
Change the way to redirect when cancel and delete on form component
based on last url

[Refs_ticket]: #40

* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: fix things broken by rebase

* chore: remove useless file

* chore(front): remove file/comment/console.log

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Apr 17, 2023
- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6
andriacap added a commit that referenced this issue Apr 18, 2023
- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 18, 2023
- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6
andriacap added a commit that referenced this issue Apr 18, 2023
- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 18, 2023
- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6
andriacap added a commit that referenced this issue Apr 18, 2023
- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 19, 2023
Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 19, 2023
- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54
andriacap added a commit that referenced this issue Apr 20, 2023
- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54
andriacap added a commit that referenced this issue Apr 20, 2023
Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 20, 2023
Reviewed-by: andriac
[Refs_ticket]: #5 , #6
mvergez pushed a commit that referenced this issue Apr 25, 2023
Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
mvergez pushed a commit that referenced this issue Apr 25, 2023
Reviewed-by: andriac
[Refs_ticket]: #5 , #6
mvergez pushed a commit that referenced this issue Apr 25, 2023
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 25, 2023
- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6
andriacap added a commit that referenced this issue Apr 25, 2023
- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Apr 25, 2023
Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Aug 22, 2023
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Aug 22, 2023
* feat: edit site (init value btn-select)

- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6

* feat: get information when edit site

- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: forgot add apiService property binding

Reviewed-by:andriac

* feat: update site with good properties

Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6

* feat: prevent form appear if no type-site

- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54

* feat: change order to emit event bEdit

- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54

* feat: solve request changes

- Apply prettier
- Change object key [''] by type properties
- Remove unused preprocess_data lines

[Refs_ticket] : closes #54
andriacap added a commit that referenced this issue Aug 23, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: todo comments about refactoring code

Add todo comment in order to don't forget what
is to improve inside the code

* chore(front): add comment and remove console.log

* chore(api): put back old formatting

* chore(api): remove useless comment

* refactor(api): move and rename create_update fct

* fix: put back inventor/digitiser & fix typo

* chore: remove useless files

Since columns are now loaded from json, they are not needed
anymore in separate typescript files

* chore: remove definition from sites_group.json

* fix: column problem on sites

* chore: remove useless comment

* refactor(front): remove comment and use rxjs

* chore(front): remove useless file

Since class BtnMultiSelectChipClass is not used anymore

* chore(front): remove useless comments/imports

* style(front): applied prettier

* chore(front): remove useless code

* refactor(front): regroup types into an interface

* style(front): applied prettier

* refactor(front): inherit config-json from config

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Aug 23, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: problem route navigation

Remove unused "urlRelative" create in last commit
Fix the action "add children" in datatable to redirect to the good
component
Change the way to redirect when cancel and delete on form component
based on last url

[Refs_ticket]: #40

* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: fix things broken by rebase

* chore: remove useless file

* chore(front): remove file/comment/console.log

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Aug 23, 2023
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Aug 23, 2023
* feat: edit site (init value btn-select)

- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6

* feat: get information when edit site

- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: forgot add apiService property binding

Reviewed-by:andriac

* feat: update site with good properties

Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6

* feat: prevent form appear if no type-site

- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54

* feat: change order to emit event bEdit

- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54

* feat: solve request changes

- Apply prettier
- Change object key [''] by type properties
- Remove unused preprocess_data lines

[Refs_ticket] : closes #54
andriacap added a commit that referenced this issue Sep 1, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: todo comments about refactoring code

Add todo comment in order to don't forget what
is to improve inside the code

* chore(front): add comment and remove console.log

* chore(api): put back old formatting

* chore(api): remove useless comment

* refactor(api): move and rename create_update fct

* fix: put back inventor/digitiser & fix typo

* chore: remove useless files

Since columns are now loaded from json, they are not needed
anymore in separate typescript files

* chore: remove definition from sites_group.json

* fix: column problem on sites

* chore: remove useless comment

* refactor(front): remove comment and use rxjs

* chore(front): remove useless file

Since class BtnMultiSelectChipClass is not used anymore

* chore(front): remove useless comments/imports

* style(front): applied prettier

* chore(front): remove useless code

* refactor(front): regroup types into an interface

* style(front): applied prettier

* refactor(front): inherit config-json from config

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Sep 1, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: problem route navigation

Remove unused "urlRelative" create in last commit
Fix the action "add children" in datatable to redirect to the good
component
Change the way to redirect when cancel and delete on form component
based on last url

[Refs_ticket]: #40

* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: fix things broken by rebase

* chore: remove useless file

* chore(front): remove file/comment/console.log

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Sep 1, 2023
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Sep 1, 2023
* feat: edit site (init value btn-select)

- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6

* feat: get information when edit site

- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: forgot add apiService property binding

Reviewed-by:andriac

* feat: update site with good properties

Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6

* feat: prevent form appear if no type-site

- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54

* feat: change order to emit event bEdit

- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54

* feat: solve request changes

- Apply prettier
- Change object key [''] by type properties
- Remove unused preprocess_data lines

[Refs_ticket] : closes #54
andriacap added a commit that referenced this issue Sep 7, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: todo comments about refactoring code

Add todo comment in order to don't forget what
is to improve inside the code

* chore(front): add comment and remove console.log

* chore(api): put back old formatting

* chore(api): remove useless comment

* refactor(api): move and rename create_update fct

* fix: put back inventor/digitiser & fix typo

* chore: remove useless files

Since columns are now loaded from json, they are not needed
anymore in separate typescript files

* chore: remove definition from sites_group.json

* fix: column problem on sites

* chore: remove useless comment

* refactor(front): remove comment and use rxjs

* chore(front): remove useless file

Since class BtnMultiSelectChipClass is not used anymore

* chore(front): remove useless comments/imports

* style(front): applied prettier

* chore(front): remove useless code

* refactor(front): regroup types into an interface

* style(front): applied prettier

* refactor(front): inherit config-json from config

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Sep 7, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: problem route navigation

Remove unused "urlRelative" create in last commit
Fix the action "add children" in datatable to redirect to the good
component
Change the way to redirect when cancel and delete on form component
based on last url

[Refs_ticket]: #40

* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: fix things broken by rebase

* chore: remove useless file

* chore(front): remove file/comment/console.log

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Sep 7, 2023
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Sep 7, 2023
* feat: edit site (init value btn-select)

- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6

* feat: get information when edit site

- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: forgot add apiService property binding

Reviewed-by:andriac

* feat: update site with good properties

Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6

* feat: prevent form appear if no type-site

- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54

* feat: change order to emit event bEdit

- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54

* feat: solve request changes

- Apply prettier
- Change object key [''] by type properties
- Remove unused preprocess_data lines

[Refs_ticket] : closes #54
amandine-sahl pushed a commit that referenced this issue Oct 5, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: todo comments about refactoring code

Add todo comment in order to don't forget what
is to improve inside the code

* chore(front): add comment and remove console.log

* chore(api): put back old formatting

* chore(api): remove useless comment

* refactor(api): move and rename create_update fct

* fix: put back inventor/digitiser & fix typo

* chore: remove useless files

Since columns are now loaded from json, they are not needed
anymore in separate typescript files

* chore: remove definition from sites_group.json

* fix: column problem on sites

* chore: remove useless comment

* refactor(front): remove comment and use rxjs

* chore(front): remove useless file

Since class BtnMultiSelectChipClass is not used anymore

* chore(front): remove useless comments/imports

* style(front): applied prettier

* chore(front): remove useless code

* refactor(front): regroup types into an interface

* style(front): applied prettier

* refactor(front): inherit config-json from config

---------

Co-authored-by: Andria Capai <[email protected]>
amandine-sahl pushed a commit that referenced this issue Oct 5, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: problem route navigation

Remove unused "urlRelative" create in last commit
Fix the action "add children" in datatable to redirect to the good
component
Change the way to redirect when cancel and delete on form component
based on last url

[Refs_ticket]: #40

* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: fix things broken by rebase

* chore: remove useless file

* chore(front): remove file/comment/console.log

---------

Co-authored-by: Andria Capai <[email protected]>
amandine-sahl pushed a commit that referenced this issue Oct 5, 2023
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
amandine-sahl pushed a commit that referenced this issue Oct 5, 2023
* feat: edit site (init value btn-select)

- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6

* feat: get information when edit site

- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: forgot add apiService property binding

Reviewed-by:andriac

* feat: update site with good properties

Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6

* feat: prevent form appear if no type-site

- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54

* feat: change order to emit event bEdit

- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54

* feat: solve request changes

- Apply prettier
- Change object key [''] by type properties
- Remove unused preprocess_data lines

[Refs_ticket] : closes #54
amandine-sahl pushed a commit that referenced this issue Oct 10, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: todo comments about refactoring code

Add todo comment in order to don't forget what
is to improve inside the code

* chore(front): add comment and remove console.log

* chore(api): put back old formatting

* chore(api): remove useless comment

* refactor(api): move and rename create_update fct

* fix: put back inventor/digitiser & fix typo

* chore: remove useless files

Since columns are now loaded from json, they are not needed
anymore in separate typescript files

* chore: remove definition from sites_group.json

* fix: column problem on sites

* chore: remove useless comment

* refactor(front): remove comment and use rxjs

* chore(front): remove useless file

Since class BtnMultiSelectChipClass is not used anymore

* chore(front): remove useless comments/imports

* style(front): applied prettier

* chore(front): remove useless code

* refactor(front): regroup types into an interface

* style(front): applied prettier

* refactor(front): inherit config-json from config

---------

Co-authored-by: Andria Capai <[email protected]>
amandine-sahl pushed a commit that referenced this issue Oct 10, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: problem route navigation

Remove unused "urlRelative" create in last commit
Fix the action "add children" in datatable to redirect to the good
component
Change the way to redirect when cancel and delete on form component
based on last url

[Refs_ticket]: #40

* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: fix things broken by rebase

* chore: remove useless file

* chore(front): remove file/comment/console.log

---------

Co-authored-by: Andria Capai <[email protected]>
amandine-sahl pushed a commit that referenced this issue Oct 10, 2023
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
amandine-sahl pushed a commit that referenced this issue Oct 10, 2023
* feat: edit site (init value btn-select)

- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6

* feat: get information when edit site

- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: forgot add apiService property binding

Reviewed-by:andriac

* feat: update site with good properties

Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6

* feat: prevent form appear if no type-site

- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54

* feat: change order to emit event bEdit

- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54

* feat: solve request changes

- Apply prettier
- Change object key [''] by type properties
- Remove unused preprocess_data lines

[Refs_ticket] : closes #54
amandine-sahl pushed a commit that referenced this issue Oct 10, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: todo comments about refactoring code

Add todo comment in order to don't forget what
is to improve inside the code

* chore(front): add comment and remove console.log

* chore(api): put back old formatting

* chore(api): remove useless comment

* refactor(api): move and rename create_update fct

* fix: put back inventor/digitiser & fix typo

* chore: remove useless files

Since columns are now loaded from json, they are not needed
anymore in separate typescript files

* chore: remove definition from sites_group.json

* fix: column problem on sites

* chore: remove useless comment

* refactor(front): remove comment and use rxjs

* chore(front): remove useless file

Since class BtnMultiSelectChipClass is not used anymore

* chore(front): remove useless comments/imports

* style(front): applied prettier

* chore(front): remove useless code

* refactor(front): regroup types into an interface

* style(front): applied prettier

* refactor(front): inherit config-json from config

---------

Co-authored-by: Andria Capai <[email protected]>
amandine-sahl pushed a commit that referenced this issue Oct 10, 2023
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: problem route navigation

Remove unused "urlRelative" create in last commit
Fix the action "add children" in datatable to redirect to the good
component
Change the way to redirect when cancel and delete on form component
based on last url

[Refs_ticket]: #40

* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: fix things broken by rebase

* chore: remove useless file

* chore(front): remove file/comment/console.log

---------

Co-authored-by: Andria Capai <[email protected]>
amandine-sahl pushed a commit that referenced this issue Oct 10, 2023
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
amandine-sahl pushed a commit that referenced this issue Oct 10, 2023
* feat: edit site (init value btn-select)

- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6

* feat: get information when edit site

- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: forgot add apiService property binding

Reviewed-by:andriac

* feat: update site with good properties

Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6

* feat: prevent form appear if no type-site

- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54

* feat: change order to emit event bEdit

- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54

* feat: solve request changes

- Apply prettier
- Change object key [''] by type properties
- Remove unused preprocess_data lines

[Refs_ticket] : closes #54
andriacap added a commit that referenced this issue Feb 12, 2024
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: todo comments about refactoring code

Add todo comment in order to don't forget what
is to improve inside the code

* chore(front): add comment and remove console.log

* chore(api): put back old formatting

* chore(api): remove useless comment

* refactor(api): move and rename create_update fct

* fix: put back inventor/digitiser & fix typo

* chore: remove useless files

Since columns are now loaded from json, they are not needed
anymore in separate typescript files

* chore: remove definition from sites_group.json

* fix: column problem on sites

* chore: remove useless comment

* refactor(front): remove comment and use rxjs

* chore(front): remove useless file

Since class BtnMultiSelectChipClass is not used anymore

* chore(front): remove useless comments/imports

* style(front): applied prettier

* chore(front): remove useless code

* refactor(front): regroup types into an interface

* style(front): applied prettier

* refactor(front): inherit config-json from config

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Feb 12, 2024
* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: problem of type object when loading form

Add endPoint and objectType to the observable using by the formservice
in order to use _apiGeomService with good context (endPoint)

[Refs_ticket]: #5 et #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: problem route navigation

Remove unused "urlRelative" create in last commit
Fix the action "add children" in datatable to redirect to the good
component
Change the way to redirect when cancel and delete on form component
based on last url

[Refs_ticket]: #40

* 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

* feat: column datatable from config json

Add logic into sitegroups service in order to use config json to diplay
column datatable (called "display_list")

Review-by: andriac
[Refs ticket]: #4

* feat: adjust backend to load config json

Adjust backend code to use existing code in order to load config from
file json and by starting with "sites_group"

Fix Media load and upload for site_group

TODO:
- [ ] check if config should be find from file or backend
- [ ] Optimize logic backend (use generic model with class method ?)

Reviewed-by: andriacap
[Refs ticket]: #4

* feat: add button multiselect with filter on backend

filter with params backend (new route -> see if it's possible to change
that)

Add button multiselect above form type site

TODO:
- improve Input / condition of use case of btn multiselect

Reviewed-by: andriac

* feat: btn multiselect option

-Add @input fn , placeholder, title, paramsToFilt
-Remove empty option
-prevent adding from keyboard input or not including in list
-Store config json into object

Reviewed-by: @AndriaC
[Refs-ticket]: #4

* refactor: change form-service and object-service

refactor form-service
add observable into object-service (WIP: futur use for refresh page ?)

Rieviewed-by: andriac

[Refs_ticket]: #40

* refactor: test refresh page and comportment obs

refresh page seems to works with localstorage of different obj in
object_service

Reviewed-by: andriac

* feat: dynamic form

- Add:
- pass config json to form.component-g.ts
- add config json to this.obj and refresh form into form.component-g.ts
- add css for form component to deal when long form selected

-fix :
- refresh page form component (this._configService.init is necessary
  ...)
- comportment different between add or edit into form component and
  form service

Reviewed-by: andriac
[Refs_ticket]: #4

* feat: dynamic form - Correction PR

Remove unused console.log
Rxjs : use concatMap to avoid subscribe inside subscribe
Apply: prettier and sort prettier for import ts file

Reviewed-by: @AndriaC
[Refs_PR]: #42

* feat: dynamic create site

- Add change current-object when click "Add <object>" from datatable
  component
- api-geom.service: change the way to init the api-geom
- WIP:  two subscribes in one .. (the subscription is call only once ..)
- WIP : get config json from backend

Reviewed-by: andriac

* feat: add relationship id into sendData form site

Add type_site and id_site_group to the form site

Reviewed-by: andriac
[Refs_ticket]: #5 et #6

* feat(back): add custom config when post site

Change backend files in order to choose specific config when site is
created.

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: tooltip and label inside datatable-component

Add a childLabel inside interface objObs.ts
in order to use this tooltip inside datatable-component

* feat: get back work visitcomponent

get back work from feat/visit to use visitcomponent
but adapted to current branch

[Refs_ticket]: #5 , #6

* fix: forgot 3 modifications needed from feat/site

Add conftest visit
Add test_get_visits
Add get_site_by_id

* fix: passing data between components and property

- Action button "consult..." is working for group_site and site
- Action with button "cancel" , "come back history routing" send to the
  right component
- Label and tooltip are according to the parent and child object loaded
  in the corresponding component

- Action "Add site" directly from datatable-g.component (WIP: need to
  remove send to sites_group/:id/create

[Refs_ticket]: #40 , #4 , #5 and #6

* fix: error of url relative when using form

Fix problem of id_module has ["id_module"] in
create_or_update_object_api function
Fix path "sites/:id" to "site/:id"
Add urlRelative when editing component

* fix: fix things broken by rebase

* chore: remove useless file

* chore(front): remove file/comment/console.log

---------

Co-authored-by: Andria Capai <[email protected]>
andriacap added a commit that referenced this issue Feb 12, 2024
* feat: delete site

Add code from backend to delete site (frontend is already implemented)

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* test: add test for delete item site

Reviewed-by: andriac
[Refs_ticket]: #5 , #6
andriacap added a commit that referenced this issue Feb 12, 2024
* feat: edit site (init value btn-select)

- Change button select to accept incoming intial values
- Change visit component to add btn-select and form-g inside html

- WIP: update form component when initial values is up to date

Reviewed-by: andriac
[Refs_ticket] :  #5 , #6

* feat: get information when edit site

- Get all fields from specific site.json into editform
- Fix problem redirection if edit object site

- WIP : check how to update specific fields from object
- WIP : check how to manage listOption types site when reload or when
  come back into component after first init

Reviewed-by: andriac
[Refs_ticket]: #5 , #6

* fix: forgot add apiService property binding

Reviewed-by:andriac

* feat: update site with good properties

Change types_site object to array of ids
Remove extra key "dataComplement" to assign config

Reviewed-by:andriac
[Refs_ticket]: #5 , #6

* feat: prevent form appear if no type-site

- Hide form if btn-list type-site not selected
- Add custom error message mat-error if not selected (directive + custom
  message)

WIP: error message is showing up only if not selected after touched .
Maybe need to use asyncValidator ?

Reviewed-by: andriac
[Refs_tickets]: #5 , #6 , #54

* feat: change order to emit event bEdit

- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54

* feat: solve request changes

- Apply prettier
- Change object key [''] by type properties
- Remove unused preprocess_data lines

[Refs_ticket] : closes #54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Epic, comme écrit dans les devis
Projects
None yet
Development

No branches or pull requests

1 participant