Skip to content

Commit d634a37

Browse files
Benoit NgoNgob
authored andcommitted
chore(primevue): Upgrading to primevue module and updating dependencies
1 parent 8ed8025 commit d634a37

File tree

22 files changed

+1824
-607
lines changed

22 files changed

+1824
-607
lines changed

apps/front/nuxt.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ import svgLoader from "vite-svg-loader";
33

44
export default defineNuxtConfig({
55
srcDir: "src/",
6-
modules: ["@pinia/nuxt", "@nuxtjs/i18n"],
6+
modules: ["@pinia/nuxt", "@nuxtjs/i18n", "nuxt-primevue"],
77
runtimeConfig: {
88
API_URL: process.env.API_URL || "",
99
},
10+
primevue: {
11+
/* Options */
12+
},
1013
i18n: {
11-
vueI18n: "./modules_config/nuxt/i18n.config.ts", // if you are using custom path, default
14+
vueI18n: "./modules_config/nuxt/i18n.config.ts",
1215
},
1316
app: {
1417
head: {

apps/front/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"private": true,
3+
34
"scripts": {
45
"build": "nuxt build",
56
"dev": "rm -rf /tmp/nitro/worker-* && nuxt dev | pino-pretty -c",
@@ -17,28 +18,27 @@
1718
"eslint-config-prettier": "^8.8.0",
1819
"eslint-plugin-prettier": "^4.2.1",
1920
"pino-pretty": "^10.0.0",
20-
"typescript": "^5.0.4",
21+
"typescript": "~5.1.6",
22+
"nuxt-primevue": "^0.0.3",
2123
"vue-tsc": "^1.6.5"
2224
},
23-
24-
2525
"dependencies": {
2626
"@nuxtjs/i18n": "^8.0.0-rc.5",
2727
"@pinia/nuxt": "^0.4.11",
2828
"defu": "^6.1.2",
2929
"h3": "^1.8.2",
3030
"nitropack": "^2.4.1",
31-
"nuxt": "3.7.4",
31+
"nuxt": "3.8.0",
3232
"ofetch": "^1.3.3",
3333
"ohash": "^1.1.2",
34-
"pinia": "^2.1.6",
34+
"pinia": "^2.1.7",
3535
"pino": "^8.8.0",
3636
"prettier": "^2.8.8",
3737
"primeflex": "^3.3.1",
3838
"primeicons": "^6.0.1",
39-
"primevue": "^3.35.0",
39+
"primevue": "^3.37.0",
4040
"sass": "^1.57.1",
4141
"vite-svg-loader": "^4.0.0",
42-
"vue": "^3.3.4"
42+
"vue": "^3.3.6"
4343
}
4444
}

apps/front/src/components/layout/menu/AppMenu.vue

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
<template>
2-
<TieredMenu :model="items" class="h-screen sticky w-full"> </TieredMenu>
2+
<TieredMenu :model="items" class="h-screen sticky w-full">
3+
<template #item="{ label, item, props, hasSubmenu }">
4+
<NuxtLink v-if="item.route" v-slot="routerProps" :to="item.route" custom>
5+
<a
6+
:href="routerProps.href"
7+
v-bind="props.action"
8+
@click="routerProps.navigate"
9+
>
10+
<span v-bind="props.icon" />
11+
<span v-bind="props.label">{{ label }}</span>
12+
</a>
13+
</NuxtLink>
14+
<a v-else :href="item.url" :target="item.target" v-bind="props.action">
15+
<span v-bind="props.icon" />
16+
<span v-bind="props.label">{{ label }}</span>
17+
<span
18+
v-if="hasSubmenu"
19+
class="pi pi-fw pi-angle-right"
20+
v-bind="props.submenuicon"
21+
/>
22+
</a>
23+
</template>
24+
</TieredMenu>
325
</template>
426
<script setup lang="ts">
527
import useAuthUser from "~/store/auth";
@@ -11,22 +33,22 @@ const items = computed(() => [
1133
{
1234
label: t("components.layout.menu.appMenu.users"),
1335
icon: "pi pi-fw pi-file",
14-
to: "/users",
36+
route: "/users",
1537
},
1638
{
1739
label: t("components.layout.menu.appMenu.page1"),
1840
icon: "pi pi-fw pi-pencil",
19-
to: "/demo/page1",
41+
route: "/demo/page1",
2042
},
2143
{
2244
label: t("components.layout.menu.appMenu.page2"),
2345
icon: "pi pi-fw pi-pencil",
24-
to: "/demo/page2",
46+
route: "/demo/page2",
2547
},
2648
{
2749
label: t("components.layout.menu.appMenu.page3"),
2850
icon: "pi pi-fw pi-pencil",
29-
to: "/demo/page3",
51+
route: "/demo/page3",
3052
},
3153
{
3254
separator: true,

apps/front/src/components/user/UserForm.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</div>
3333
</template>
3434
<script setup lang="ts">
35-
import { User } from "~/types/User";
35+
import type { User } from "~/types/User";
3636
3737
defineProps<
3838
Omit<User, "id"> & {
@@ -41,7 +41,6 @@ defineProps<
4141
passwordConfirm: string;
4242
}
4343
>();
44-
4544
interface EventEmitter {
4645
(e: "update:email", email: string): void;
4746
(e: "update:password", password: string): void;

apps/front/src/composables/api/healthCheck/useHealthCheckFetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FetchError } from "ofetch";
2-
import { AsyncData } from "#app";
2+
import type { AsyncData } from "#app";
33
import useAppFetch from "~/composables/useAppFetch";
44

55
interface LoggedHealthCheckResponse {

apps/front/src/composables/api/user/useCreateUser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { POST } from "~/constants/http";
2-
import { User } from "~/types/User";
3-
import { Ref } from "vue";
2+
import type { User } from "~/types/User";
3+
import type { Ref } from "vue";
44
import useBasicError from "~/composables/useBasicError";
55

66
export default function useCreateUser(): {

apps/front/src/composables/api/user/useDeleteUser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { User } from "~/types/User";
1+
import type { User } from "~/types/User";
22
import { DELETE } from "~/constants/http";
33
import useBasicError from "~/composables/useBasicError";
44

apps/front/src/composables/api/user/useGetUser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { GET } from "~/constants/http";
2-
import { User } from "~/types/User";
2+
import type { User } from "~/types/User";
33
import useAppFetch from "~/composables/useAppFetch";
44

55
export default async function useGetUser(userId: string) {

apps/front/src/composables/api/user/useListUsers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { User } from "~/types/User";
1+
import type { User } from "~/types/User";
22
import { GET } from "~/constants/http";
33
import useAppFetch from "~/composables/useAppFetch";
44

apps/front/src/composables/api/user/useUpdateUser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { PUT } from "~/constants/http";
2-
import { User, UserId } from "~/types/User";
2+
import type { User, UserId } from "~/types/User";
33
import useBasicError from "~/composables/useBasicError";
44

55
type UserInput = Omit<User, "id">;

0 commit comments

Comments
 (0)