Browse Source

add image and i18n modules; update MyProfile model to use pinia-orm

Olivier Massot 3 years ago
parent
commit
fa3b63b1a1
3 changed files with 10 additions and 4 deletions
  1. 3 2
      models/Access/MyProfile.ts
  2. 3 1
      nuxt.config.ts
  3. 4 1
      package.json

+ 3 - 2
models/Access/MyProfile.ts

@@ -1,4 +1,5 @@
-import {Attr, Num, Model, Uid} from 'pinia-orm'
+import {Model} from 'pinia-orm'
+import {Num, Uid, Attr} from 'pinia-orm/dist/decorators'
 import { Historical } from '~/types/interfaces'
 
 export class MyProfile extends Model {
@@ -7,7 +8,7 @@ export class MyProfile extends Model {
   @Uid()
   id!: number | string | null
 
-  @Num(0, { nullable: true })
+  @Num(0, { notNullable: false })
   activityYear!: number
 
   @Attr({})

+ 3 - 1
nuxt.config.ts

@@ -2,6 +2,7 @@ import { defineNuxtConfig } from 'nuxt'
 import fs from 'fs';
 
 // https://v3.nuxtjs.org/api/configuration/nuxt.config
+// @ts-ignore
 export default defineNuxtConfig({
     vuetify: {
         customVariables: ['~/assets/css/variables.scss'],
@@ -102,7 +103,8 @@ export default defineNuxtConfig({
         define: {
             'process.env.DEBUG': false,
         },
-        server: {
+        //@ts-ignore
+        server : {
             https: {
                 key: fs.readFileSync('local.app-v3.opentalent.fr.key'),
                 cert: fs.readFileSync('local.app-v3.opentalent.fr.crt'),

+ 4 - 1
package.json

@@ -17,6 +17,7 @@
     "infos": "npx nuxi info"
   },
   "devDependencies": {
+    "@nuxt/test-utils-edge": "^3.0.0-rc.11-27727864.720da64",
     "@nuxtjs/eslint-config": "^10.0.0",
     "@nuxtjs/eslint-module": "^3.1.0",
     "@types/event-source-polyfill": "^1.0.0",
@@ -26,12 +27,15 @@
     "eslint-plugin-nuxt": "^4.0.0",
     "jest": "^29.0.3",
     "ts-jest": "^29.0.1",
+    "vitest": "^0.23.4",
     "vue-jest": "^3.0.7"
   },
   "dependencies": {
     "@casl/ability": "^6.0.0",
     "@casl/vue": "^2.1.3",
     "@fortawesome/fontawesome-free": "^6.2.0",
+    "@nuxt/image": "^0.7.1",
+    "@nuxtjs/i18n-edge": "npm:@nuxtjs/i18n-edge",
     "@pinia-orm/nuxt": "^1.0.18",
     "@pinia/nuxt": "^0.4.0",
     "@types/js-yaml": "^4.0.5",
@@ -39,7 +43,6 @@
     "js-yaml": "^4.1.0",
     "libphonenumber-js": "^1.10.13",
     "nuxt": "^3.0.0-rc.10",
-    "nuxt-leaflet": "^0.0.27",
     "pinia-orm": "^1.0.0-rc.5",
     "sass": "^1.54.5",
     "vuetify": "^3.0.0-beta.11",