Skip to content

Commit

Permalink
WIP tests front
Browse files Browse the repository at this point in the history
Co-authored-by: mcampourcy <[email protected]>
  • Loading branch information
Steph0 and mcampourcy committed May 3, 2024
1 parent 5853989 commit 9ae69ca
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 154 deletions.
8 changes: 4 additions & 4 deletions certif/app/components/enrolled-candidates.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PixButton
id="add-candidate"
class="certification-candidates-add-button__text"
@triggerAction={{this.openNewCertificationCandidateModal}}
@triggerAction={{this.openNewCandidateModal}}
@size="small"
>
{{t "pages.sessions.detail.candidates.list.actions.inscription.label"}}
Expand Down Expand Up @@ -172,9 +172,9 @@
/>
{{/if}}

<NewCertificationCandidateModal
@showModal={{this.showNewCertificationCandidateModal}}
@closeModal={{this.closeNewCertificationCandidateModal}}
<NewCandidateModal
@showModal={{this.showNewCandidateModal}}
@closeModal={{this.closeNewCandidateModal}}
@countries={{@countries}}
@saveCandidate={{this.addCertificationCandidate}}
@candidateData={{this.newCandidate}}
Expand Down
12 changes: 6 additions & 6 deletions certif/app/components/enrolled-candidates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class EnrolledCandidates extends Component {
@tracked newCandidate = {};
@tracked shouldDisplayCertificationCandidateModal = false;
@tracked certificationCandidateInDetailsModal = null;
@tracked showNewCertificationCandidateModal = false;
@tracked showNewCandidateModal = false;

@action
async deleteCertificationCandidate(certificationCandidate) {
Expand Down Expand Up @@ -67,7 +67,7 @@ export default class EnrolledCandidates extends Component {
const success = await this.saveCertificationCandidate(certificationCandidate);
if (success) {
this.candidatesInStaging.removeObject(candidate);
this.closeNewCertificationCandidateModal();
this.closeNewCandidateModal();
}
return success;
}
Expand Down Expand Up @@ -133,14 +133,14 @@ export default class EnrolledCandidates extends Component {
}

@action
openNewCertificationCandidateModal() {
openNewCandidateModal() {
this.addCertificationCandidateInStaging();
this.showNewCertificationCandidateModal = true;
this.showNewCandidateModal = true;
}

@action
closeNewCertificationCandidateModal() {
this.showNewCertificationCandidateModal = false;
closeNewCandidateModal() {
this.showNewCandidateModal = false;
}

_createCertificationCandidateRecord(certificationCandidateData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@
{{/if}}

{{#if this.complementaryCertificationsHabilitations.length}}
<NewCertificationCandidateModal::ComplementaryList
<NewCandidateModal::ComplementaryList
@complementaryCertificationsHabilitations={{this.complementaryCertificationsHabilitations}}
@updateComplementaryCertification={{this.updateComplementaryCertification}}
/>
{{#if this.couldHaveComplementaryCertificationOnly}}
<NewCertificationCandidateModal::ComplementaryWithReferential />
<NewCandidateModal::ComplementaryWithReferential />
{{/if}}
{{/if}}
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const FRANCE_INSEE_CODE = '99100';
const INSEE_CODE_OPTION = 'insee';
const POSTAL_CODE_OPTION = 'postal';

export default class NewCertificationCandidateModal extends Component {
export default class NewCandidateModal extends Component {
@service currentUser;
@service intl;

Expand Down

This file was deleted.

0 comments on commit 9ae69ca

Please sign in to comment.