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

[IMPORT] feat: create and set import buttons #387

Open
wants to merge 3 commits into
base: feat/import-monitoring
Choose a base branch
from

Conversation

JulienCorny
Copy link

[IMPORT][MONITORING] IM_INIT_FROM_DEST_1 - Intégrer des boutons à l'interface de monitoring : https://github.com/orgs/PnX-SI/projects/13/views/6?pane=issue&itemId=83488034

  • création boutons routerLink vers import pour sites, visits, obs
  • envoie queryParams vers module import
  • check cruved module origine et module import

A discuter :
est-ce utile de renvoyer id_base_site et id_dataset en queryParams pour le bouton situé dans la liste des observations (id_dataset peut être requêté directement à partir de l'id_base_visit, donc évite un check puisque si on l'envoie avec les queryParams il faudra vérifier de toute façon si l'id_dataset existe et est bien associé à la visite)

@jacquesfize jacquesfize changed the base branch from develop to feat/import-monitoring December 13, 2024 09:32
@jacquesfize jacquesfize changed the title feat: create and set import buttons [IMPORT] feat: create and set import buttons Dec 13, 2024
*ngIf="this.canImport"
color="primary"
class="btn-action uppercase float-right"
[routerLink]="['/import']"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

il faut que la redirection dirige vers la page de création d'un import

Comment on lines +75 to +78
const canCreateImport = cruvedImport.C > 0;
const canCreateMonitoring = this.userCruved.C > 0;

this.canImport = canCreateImport && canCreateMonitoring;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const canCreateImport = cruvedImport.C > 0;
const canCreateMonitoring = this.userCruved.C > 0;
this.canImport = canCreateImport && canCreateMonitoring;
this.canImport = cruvedImport.C > 0 && this.userCruved.C > 0;


// medias;
canCreateChild: { [key: string]: boolean } = {};
toolTipNotAllowed: string = TOOLTIPMESSAGEALERT;

public userCruved: any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uniquement utilisée dans le ngOnInit... à supprimer pour moi

// get user cruved
const currentModule = this._moduleService.currentModule;
this.userCruved = currentModule.module_objects.MONITORINGS_SITES.cruved;
let cruvedImport: any = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let cruvedImport: any = {};
let cruvedImport: any = {C:0};


// get user cruved
const currentModule = this._moduleService.currentModule;
this.userCruved = currentModule.module_objects.MONITORINGS_SITES.cruved;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi ne pas passer directement par le cruvedStore ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants