forked from PnX-SI/gn_module_monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Gestion des géométries (création/edition pour site et groupe de site) #68
Draft
andriacap
wants to merge
27
commits into
dev-suivi-eolien
Choose a base branch
from
feat/crud-map
base: dev-suivi-eolien
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6b0d947
feat(front): try to make breadcrumb work
c0336ef
feat(front): make breadcrumn logic inside component
andriacap 21900b2
feat(wip): merge chainInput and display-data-info
andriacap f4ebd20
feat: remove unused function
andriacap 849afd2
fix: put outside updateBreadCrumb in sitegp comp
andriacap 0bde3ba
feat: remove onInit to mapListComponent
andriacap 838db26
feat(wip): manage geometry type into form
andriacap 18e312c
feat(wip) change way to manage map obj component
andriacap cf5d431
fix: rename obj Form and fix pb load confi obj
andriacap 2ed2008
fix: remove unused edit site component
andriacap 1429320
fix: loading config object site
andriacap 5133540
fix: existing little problem
andriacap d4705e3
fix: problem to load specific site
andriacap 8b630c7
feat(wip) : manage map
andriacap 0d33303
fix: error on form with obj properties/config
andriacap 82fb775
fix(css): height of form zone scrollable
andriacap a8bc1e2
fix: problem when delete site child
andriacap cb626ba
fix: problem adding site child by data-table comp
andriacap a856e4c
fix: problem redirection on delete site action
andriacap 65303ae
fix: untracked gitlab-ci.yml
andriacap bb40d7a
fix: load specific properties obj
andriacap 110d970
feat: page not found specific to monitoring
andriacap 81df188
feat: not found working for request status 404
andriacap b5adc4d
fix: change format scc to css not-found comp
andriacap a6ed3dc
feat: display types_site label in table and prop
andriacap 2a0969c
feat(api): return label of nomenclature type site
52f359e
style(config): types site attribut label
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,31 +16,48 @@ import { ConfigService } from "../../services/config.service"; | |
import { MonitoringObject } from "../../class/monitoring-object"; | ||
import { Router } from "@angular/router"; | ||
import { ActivatedRoute } from "@angular/router"; | ||
import { ObjectService } from "../../services/object.service"; | ||
import { SiteSiteGroup } from "../../interfaces/objObs"; | ||
import { IBreadCrumb } from "../../interfaces/object"; | ||
|
||
export const breadCrumbElementBase: IBreadCrumb = { | ||
"description":"Liste des groupes de site", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Je rajouterai un "s" à site car un groupe est composé souvent de plusieurs sites. Ou alors un "(s)" |
||
"label":"", | ||
"url": "sites_group" | ||
} | ||
|
||
@Component({ | ||
selector: "pnx-monitoring-breadcrumbs", | ||
templateUrl: "./breadcrumbs.component.html", | ||
styleUrls: ["./breadcrumbs.component.css"], | ||
}) | ||
export class BreadcrumbsComponent implements OnInit { | ||
public breadcrumbs; | ||
|
||
public breadcrumbs: IBreadCrumb[] =[]; | ||
@Input() bEdit: boolean; | ||
@Output() bEditChange = new EventEmitter<boolean>(); | ||
|
||
public frontendModuleMonitoringUrl: string; | ||
|
||
public newLabel: string; | ||
public new_desc: string; | ||
@Input() obj: MonitoringObject; | ||
// Specific to the site access | ||
siteSiteGroup: SiteSiteGroup | null = null; | ||
|
||
constructor( | ||
private _dataMonitoringObjectService: DataMonitoringObjectService, | ||
private _configService: ConfigService, | ||
private _router: Router, | ||
private _route: ActivatedRoute | ||
private _route: ActivatedRoute, | ||
private _objectService: ObjectService | ||
) {} | ||
|
||
ngOnInit() { | ||
// this.initBreadcrumbs(); | ||
if (this.obj === undefined) { | ||
this._objectService.currentDataBreadCrumb.subscribe( | ||
(breadCrumb) => (this.breadcrumbs = breadCrumb) | ||
); | ||
return; | ||
} | ||
} | ||
|
||
initBreadcrumbs() { | ||
|
@@ -76,22 +93,25 @@ export class BreadcrumbsComponent implements OnInit { | |
this.bEditChange.emit(false); | ||
setTimeout(() => { | ||
if (elem) { | ||
this._router.navigate( | ||
[ | ||
this._configService.frontendModuleMonitoringUrl(), | ||
"object", | ||
elem.module_code, | ||
elem.object_type, | ||
elem.id, | ||
], | ||
{ | ||
queryParams: elem.params, | ||
} | ||
); | ||
if (this.obj == undefined) { | ||
const url = [this._configService.frontendModuleMonitoringUrl(), elem.url].join('/'); | ||
this._router.navigateByUrl(url); | ||
} else { | ||
this._router.navigate( | ||
[ | ||
this._configService.frontendModuleMonitoringUrl(), | ||
'object', | ||
elem.module_code, | ||
elem.object_type, | ||
elem.id, | ||
], | ||
{ | ||
queryParams: elem.params, | ||
} | ||
); | ||
} | ||
} else { | ||
this._router.navigate([ | ||
this._configService.frontendModuleMonitoringUrl(), | ||
]); | ||
this._router.navigate([this._configService.frontendModuleMonitoringUrl()]); | ||
} | ||
}, 100); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est pour tester le
"coordinates": [2.5, 50]
?