Skip to content

Commit

Permalink
[TECH] Mise à jour de Pix Orga sur Ember4.0.1 (Pix-6372)
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Nov 24, 2022
2 parents 7700bb2 + 58faf7b commit d8f2c27
Show file tree
Hide file tree
Showing 74 changed files with 2,441 additions and 3,608 deletions.
3 changes: 3 additions & 0 deletions admin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# JetBrains
.idea
Expand Down
3 changes: 3 additions & 0 deletions orga/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
4 changes: 3 additions & 1 deletion orga/app/controllers/join-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import get from 'lodash/get';

import { inject as service } from '@ember/service';
export default class JoinRequestController extends Controller {
@service store;

@tracked isSubmit = false;
@tracked errorMessage = null;

Expand Down
3 changes: 3 additions & 0 deletions orga/app/models/campaign.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import Model, { belongsTo, hasMany, attr } from '@ember-data/model';
import ENV from 'pix-orga/config/environment';
import { inject as service } from '@ember/service';

const PROFILES_COLLECTION_TEXT = 'Collecte de profils';
const ASSESSMENT_TEXT = 'Évaluation';

export default class Campaign extends Model {
@service store;

@attr('nullable-string') name;
@attr('string') code;
@attr('string') type;
Expand Down
4 changes: 3 additions & 1 deletion orga/app/routes/authenticated/campaigns/campaign.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import Route from '@ember/routing/route';

import { inject as service } from '@ember/service';
export default class CampaignRoute extends Route {
@service store;

async model(params) {
try {
const campaign = await this.store.findRecord('campaign', params.campaign_id);
Expand Down
4 changes: 3 additions & 1 deletion orga/app/routes/authenticated/campaigns/campaign/activity.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import Route from '@ember/routing/route';
import RSVP from 'rsvp';
import { action } from '@ember/object';

import { inject as service } from '@ember/service';
export default class ActivityRoute extends Route {
@service store;

queryParams = {
pageNumber: {
refreshModel: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import Route from '@ember/routing/route';
import RSVP from 'rsvp';
import { action } from '@ember/object';

import { inject as service } from '@ember/service';
export default class AssessmentResultsRoute extends Route {
@service store;

queryParams = {
pageNumber: {
refreshModel: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import Route from '@ember/routing/route';
import RSVP from 'rsvp';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';

export default class ProfilesRoute extends Route {
@service store;

queryParams = {
pageNumber: {
refreshModel: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default class AuthenticatedCampaignsListAllCampaignsRoute extends Route {
},
};

@service store;
@service currentUser;

model(params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default class AuthenticatedCampaignsListAllCampaignsRoute extends Route {
};

@service currentUser;
@service store;

model(params) {
return this.store.query(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { inject as service } from '@ember/service';

export default class AssessmentRoute extends Route {
@service router;
@service store;

async model(params) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import RSVP from 'rsvp';
import { inject as service } from '@ember/service';
export default class ProfileRoute extends Route {
@service router;
@service store;

async model(params) {
try {
Expand Down
1 change: 1 addition & 0 deletions orga/app/routes/authenticated/campaigns/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { inject as service } from '@ember/service';

export default class UpdateRoute extends Route {
@service currentUser;
@service store;

async model(params) {
const organization = this.currentUser.organization;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class ListRoute extends Route {
};

@service currentUser;
@service store;

model(params) {
return this.store.query('organization-participant', {
Expand Down
1 change: 1 addition & 0 deletions orga/app/routes/authenticated/preselect-target-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Route from '@ember/routing/route';

export default class PreselectTargetProfileRoute extends Route {
@service currentUser;
@service store;

async model() {
const organization = this.currentUser.organization;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default class ListRoute extends Route {
};

@service currentUser;
@service store;

model(params) {
return this.store.query('sco-organization-participant', {
Expand Down
1 change: 1 addition & 0 deletions orga/app/routes/authenticated/team/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class ListRoute extends Route {
};

@service currentUser;
@service store;

async model(params) {
const organization = this.currentUser.organization;
Expand Down
1 change: 1 addition & 0 deletions orga/app/routes/join.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { inject as service } from '@ember/service';
export default class JoinRoute extends Route {
@service router;
@service session;
@service store;

routeIfAlreadyAuthenticated = 'join-when-authenticated';

Expand Down
2 changes: 1 addition & 1 deletion orga/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "3.23.0",
"version": "4.0.1",
"blueprints": [
{
"name": "app",
Expand Down
9 changes: 1 addition & 8 deletions orga/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
'use strict';

const browsers = ['> 1%'];

const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}
const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];

module.exports = {
browsers,
Expand Down
Loading

0 comments on commit d8f2c27

Please sign in to comment.