Skip to content

Commit

Permalink
Update getCategories for revolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashbrnrd committed Jun 10, 2024
1 parent 8d40568 commit 6fa369c
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 17 deletions.
1 change: 1 addition & 0 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
'@vue/eslint-config-typescript',
'plugin:vue/vue3-recommended',
'./.eslintrc-auto-import.json',
"prettier"
],
plugins: [
'vue',
Expand Down
2 changes: 2 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
dev-dist
54 changes: 42 additions & 12 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
"scripts": {
"preview": "vite preview",
"build": "vite build",
"compose:up": "docker compose -f ../docker-compose.yml --profile backend-only up -d",
"dev": "vite",
"start": "API_HOST=http://localhost:5000 vite",
"lint": "eslint . --ignore-path ../.gitignore",
"format": "eslint . --fix --ignore-path ../.gitignore",
"format:css": "stylelint --fix src/**/*.{css,vue}",
"pretest:unit": "npm run lint",
"format": "prettier . --write",
"test:e2e-ci": "FRONTEND_HOST=localhost FRONTEND_PORT=3000 cypress run --e2e --browser firefox",
"test:e2e-open": "FRONTEND_HOST=localhost FRONTEND_PORT=5173 cypress open --e2e --browser firefox"
},
Expand Down Expand Up @@ -42,13 +39,15 @@
"@vue/tsconfig": "^0.5.1",
"cypress": "^13.7.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.21.1",
"prettier": "3.3.1",
"start-server-and-test": "^2.0.3",
"stylelint": "^16.2.1",
"stylelint-config-standard": "^36.0.0",
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/utils/firearms-utils/revolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ Revolvers
*/
export const revolver = {
displayLabel: 'Revolver',
getCategory: () => isAlarmGun() || store.selectedOptions[0] === 'revolver_black_powder' ? 'D' : 'B ou D',
getCategory: () => {
if (isAlarmGun() || store.selectedOptions[0] === 'revolver_black_powder') return 'D'
else if (store.selectedOptions[0] === undefined || ['revolver_ancien_brisure', 'revolver_1873_us', 'revolver_enfield'].includes(store.selectedOptions[1])) return 'B ou D'
else return 'B'
},
securingSteps: [
{
text: 'En maintenant l’arme dans une <span class="font-bold">direction sécurisée</span> , sélectionnez ce que vous voyez.',
Expand Down

0 comments on commit 6fa369c

Please sign in to comment.