Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
laura-bergoens authored and xav-car committed Mar 6, 2025
1 parent 502a00e commit a3f36a2
Show file tree
Hide file tree
Showing 12 changed files with 135 additions and 125 deletions.
2 changes: 1 addition & 1 deletion orga/app/components/campaign/activity/dashboard.gjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { service } from '@ember/service';
import Component from '@glimmer/component';
import { or } from 'ember-truth-helpers';
import { tracked } from '@glimmer/tracking';
import { or } from 'ember-truth-helpers';
import sumBy from 'lodash/sumBy';

import ParticipantsCount from '../cards/participants-count';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import PixTable from '@1024pix/pix-ui/components/pix-table';
import PixTableColumn from '@1024pix/pix-ui/components/pix-table-column';
import { array, fn } from '@ember/helper';
import { on } from '@ember/modifier';
import { or } from 'ember-truth-helpers';
import { action } from '@ember/object';
import { LinkTo } from '@ember/routing';
import { service } from '@ember/service';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { t } from 'ember-intl';
import { or } from 'ember-truth-helpers';

import ParticipationStatus from '../../ui/participation-status';
import ParticipationFilters from '../filter/participation-filters';
Expand Down
6 changes: 5 additions & 1 deletion orga/app/components/campaign/cards/shared-count.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { t } from 'ember-intl';

<template>
<PixIndicatorCard
@title={{if @shouldDisplayAssessmentLabels (t "cards.submitted-count.title") (t "cards.submitted-count.title-profiles")}}
@title={{if
@shouldDisplayAssessmentLabels
(t "cards.submitted-count.title")
(t "cards.submitted-count.title-profiles")
}}
@iconName="inboxIn"
@color="green"
@info={{t "cards.submitted-count.information"}}
Expand Down
4 changes: 2 additions & 2 deletions orga/app/components/campaign/filter/participation-filters.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ export default class ParticipationFilters extends Component {
get statusOptions() {
const { isTypeAssessment, isTypeExam, type } = this.args.campaign;

const statuses = (isTypeAssessment || isTypeExam) ? ['STARTED', 'TO_SHARE', 'SHARED'] : ['TO_SHARE', 'SHARED'];
const statuses = isTypeAssessment || isTypeExam ? ['STARTED', 'TO_SHARE', 'SHARED'] : ['TO_SHARE', 'SHARED'];

let finalType = type === 'EXAM' ? 'ASSESSMENT': type;
const finalType = type === 'EXAM' ? 'ASSESSMENT' : type;
return statuses.map((status) => {
const label = this.intl.t(`components.participation-status.${status}-${finalType}`);
return { value: status, label };
Expand Down
2 changes: 1 addition & 1 deletion orga/app/components/campaign/header/tabs.gjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import PixButton from '@1024pix/pix-ui/components/pix-button';
import { action } from '@ember/object';
import { or } from 'ember-truth-helpers';
import { LinkTo } from '@ember/routing';
import { service } from '@ember/service';
import Component from '@glimmer/component';
import { t } from 'ember-intl';
import { or } from 'ember-truth-helpers';

export default class CampaignTabs extends Component {
@service intl;
Expand Down
5 changes: 4 additions & 1 deletion orga/app/components/campaign/header/title.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export default class Header extends Component {
}

get isMultipleSendingsForAssessmentEnabled() {
return (this.args.campaign.isTypeAssessment || this.args.campaign.isTypeExam) && this.currentUser.prescriber.enableMultipleSendingAssessment;
return (
(this.args.campaign.isTypeAssessment || this.args.campaign.isTypeExam) &&
this.currentUser.prescriber.enableMultipleSendingAssessment
);
}

get multipleSendingText() {
Expand Down
5 changes: 1 addition & 4 deletions orga/app/components/campaign/results/assessment-cards.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import CampaignStageAverage from '../cards/stage-average';
<CampaignResultAverage @value={{@averageResult}} class="assessment-cards__average-card" />
{{/if}}

<CampaignSharedCount
@value={{@sharedParticipationsCount}}
@shouldDisplayAssessmentLabels={{true}}
/>
<CampaignSharedCount @value={{@sharedParticipationsCount}} @shouldDisplayAssessmentLabels={{true}} />
</div>
</template>
7 changes: 5 additions & 2 deletions orga/app/components/campaign/settings/view.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import PixButtonLink from '@1024pix/pix-ui/components/pix-button-link';
import PixIcon from '@1024pix/pix-ui/components/pix-icon';
import PixTooltip from '@1024pix/pix-ui/components/pix-tooltip';
import { fn } from '@ember/helper';
import { or } from 'ember-truth-helpers';
import { action } from '@ember/object';
import { service } from '@ember/service';
import Component from '@glimmer/component';
import { t } from 'ember-intl';
import { or } from 'ember-truth-helpers';

import { ID_PIX_TYPES } from '../../../helpers/id-pix-types';
import CopyPasteButton from '../../copy-paste-button';
Expand Down Expand Up @@ -64,7 +64,10 @@ export default class CampaignView extends Component {
}

get isMultipleSendingsForAssessmentEnabled() {
return (this.args.campaign.isTypeAssessment || this.args.campaign.isTypeExam) && this.currentUser.prescriber.enableMultipleSendingAssessment;
return (
(this.args.campaign.isTypeAssessment || this.args.campaign.isTypeExam) &&
this.currentUser.prescriber.enableMultipleSendingAssessment
);
}

get displayResetToZero() {
Expand Down
2 changes: 1 addition & 1 deletion orga/app/components/campaign/update-form.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import PixInput from '@1024pix/pix-ui/components/pix-input';
import PixSelect from '@1024pix/pix-ui/components/pix-select';
import PixTextarea from '@1024pix/pix-ui/components/pix-textarea';
import { fn } from '@ember/helper';
import { or } from 'ember-truth-helpers';
import { on } from '@ember/modifier';
import { action } from '@ember/object';
import { service } from '@ember/service';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { t } from 'ember-intl';
import { or } from 'ember-truth-helpers';

import displayCampaignErrors from '../../helpers/display-campaign-errors';

Expand Down
4 changes: 3 additions & 1 deletion orga/app/components/ui/participation-status.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export default class ParticipationStatus extends Component {

get label() {
const { status, campaignType } = this.args;
return this.intl.t(`components.participation-status.${status}-${campaignType === 'EXAM' ? 'ASSESSMENT' : campaignType}`);
return this.intl.t(
`components.participation-status.${status}-${campaignType === 'EXAM' ? 'ASSESSMENT' : campaignType}`,
);
}

<template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ export default class ActivityController extends Controller {

@action
goToParticipantPage(participant) {
const route = this.model.campaign.isTypeAssessment || this.model.campaign.isTypeExam
? 'authenticated.campaigns.participant-assessment'
: 'authenticated.campaigns.participant-profile';
const route =
this.model.campaign.isTypeAssessment || this.model.campaign.isTypeExam
? 'authenticated.campaigns.participant-assessment'
: 'authenticated.campaigns.participant-profile';

this.router.transitionTo(route, this.model.campaign.id, participant.lastCampaignParticipationId);
}
Expand Down
Loading

0 comments on commit a3f36a2

Please sign in to comment.