@carlonicora/nextjs-jsonapi 1.66.0 → 1.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-GQM2TZG2.js → BlockNoteEditor-QHWPE3BJ.js} +14 -14
- package/dist/{BlockNoteEditor-GQM2TZG2.js.map → BlockNoteEditor-QHWPE3BJ.js.map} +1 -1
- package/dist/{BlockNoteEditor-KCJMA6LW.mjs → BlockNoteEditor-TIX3GDVZ.mjs} +4 -4
- package/dist/billing/index.js +346 -346
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-QIFM4G7T.js → chunk-3BWYWS3A.js} +1476 -1298
- package/dist/chunk-3BWYWS3A.js.map +1 -0
- package/dist/{chunk-NVXYOQFW.js → chunk-CJY63D6U.js} +12 -5
- package/dist/chunk-CJY63D6U.js.map +1 -0
- package/dist/{chunk-OQRBY22T.js → chunk-KFIQTY4O.js} +11 -11
- package/dist/{chunk-OQRBY22T.js.map → chunk-KFIQTY4O.js.map} +1 -1
- package/dist/{chunk-35GWVOYZ.mjs → chunk-RIG2BEXJ.mjs} +12 -5
- package/dist/{chunk-35GWVOYZ.mjs.map → chunk-RIG2BEXJ.mjs.map} +1 -1
- package/dist/{chunk-4E74ZTRT.mjs → chunk-WWP32QYC.mjs} +2606 -2428
- package/dist/chunk-WWP32QYC.mjs.map +1 -0
- package/dist/{chunk-UXGPZZ6V.mjs → chunk-ZYAAJMZZ.mjs} +2 -2
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +29 -7
- package/dist/components/index.d.ts +29 -7
- package/dist/components/index.js +8 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +9 -5
- package/dist/contexts/index.d.mts +1 -1
- package/dist/contexts/index.d.ts +1 -1
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{s3.service-DIR6Su9B.d.ts → s3.service-Cg5TmbU_.d.ts} +3 -0
- package/dist/{s3.service-XchHd3ii.d.mts → s3.service-DLf_a0xS.d.mts} +3 -0
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/EditableAvatar.tsx +175 -0
- package/src/components/index.ts +1 -0
- package/src/features/company/components/forms/CompanyEditor.tsx +1 -3
- package/src/features/role/components/forms/FormRoles.tsx +5 -4
- package/src/features/user/components/containers/AllUsersListContainer.tsx +36 -0
- package/src/features/user/components/containers/UserContainer.tsx +10 -13
- package/src/features/user/components/containers/UsersListContainer.tsx +15 -24
- package/src/features/user/components/containers/index.ts +1 -0
- package/src/features/user/components/details/UserContent.tsx +92 -0
- package/src/features/user/components/details/index.ts +1 -1
- package/src/features/user/components/forms/UserEditor.tsx +233 -233
- package/src/features/user/components/lists/CompanyUsersList.tsx +3 -1
- package/src/features/user/contexts/UserContext.tsx +1 -6
- package/src/features/user/data/user.service.ts +9 -0
- package/src/features/user/data/user.ts +3 -4
- package/dist/chunk-4E74ZTRT.mjs.map +0 -1
- package/dist/chunk-NVXYOQFW.js.map +0 -1
- package/dist/chunk-QIFM4G7T.js.map +0 -1
- package/src/features/user/components/details/UserDetails.tsx +0 -74
- /package/dist/{BlockNoteEditor-KCJMA6LW.mjs.map → BlockNoteEditor-TIX3GDVZ.mjs.map} +0 -0
- /package/dist/{chunk-UXGPZZ6V.mjs.map → chunk-ZYAAJMZZ.mjs.map} +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useTranslations } from "next-intl";
|
|
4
|
-
import Image from "next/image";
|
|
5
|
-
import { ReactElement } from "react";
|
|
6
|
-
import { AttributeElement, ContentTitle } from "../../../../components";
|
|
7
|
-
import { useSharedContext } from "../../../../contexts";
|
|
8
|
-
import { Modules } from "../../../../core";
|
|
9
|
-
import { usePageUrlGenerator } from "../../../../hooks";
|
|
10
|
-
import { Badge, Link } from "../../../../shadcnui";
|
|
11
|
-
import { RoleInterface } from "../../../role";
|
|
12
|
-
import { UserInterface } from "../../data";
|
|
13
|
-
|
|
14
|
-
type UserDetailsProps = {
|
|
15
|
-
user: UserInterface;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export function UserDetails({ user }: UserDetailsProps) {
|
|
19
|
-
const generateUrl = usePageUrlGenerator();
|
|
20
|
-
const t = useTranslations();
|
|
21
|
-
const { title } = useSharedContext();
|
|
22
|
-
|
|
23
|
-
let roles: ReactElement<any> = <></>;
|
|
24
|
-
|
|
25
|
-
if (user.roles && user.roles.length > 0) {
|
|
26
|
-
roles = (
|
|
27
|
-
<div className="mb-4 w-full">
|
|
28
|
-
<div className="flex flex-wrap gap-2">
|
|
29
|
-
{user.roles.map((role: RoleInterface, _index: number) => (
|
|
30
|
-
<Link key={role.id} href={generateUrl({ page: Modules.Role, id: role.id })}>
|
|
31
|
-
<Badge className="mr-2" variant={`default`}>
|
|
32
|
-
{t(`role.roles`, { role: role.id.replaceAll(`-`, ``) })}
|
|
33
|
-
</Badge>
|
|
34
|
-
</Link>
|
|
35
|
-
))}
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div className="flex w-full flex-col gap-y-2">
|
|
43
|
-
{user.avatar && (
|
|
44
|
-
<div className="relative aspect-auto w-full max-w-md overflow-hidden rounded-lg">
|
|
45
|
-
<Image
|
|
46
|
-
src={user.avatar}
|
|
47
|
-
alt={user.name}
|
|
48
|
-
width={800}
|
|
49
|
-
height={600}
|
|
50
|
-
className="h-auto w-full rounded-lg object-contain"
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
)}
|
|
54
|
-
<ContentTitle module={Modules.User} type={title.type} element={title.element} functions={title.functions} />
|
|
55
|
-
{user.isDeleted ? (
|
|
56
|
-
<div>
|
|
57
|
-
<Badge variant="destructive">{t(`user.errors.deleted`)}</Badge>
|
|
58
|
-
</div>
|
|
59
|
-
) : (
|
|
60
|
-
<>
|
|
61
|
-
{!user.isActivated && (
|
|
62
|
-
<div>
|
|
63
|
-
<Badge variant="destructive">{t(`user.errors.inactive`)}</Badge>
|
|
64
|
-
</div>
|
|
65
|
-
)}
|
|
66
|
-
</>
|
|
67
|
-
)}
|
|
68
|
-
{roles}
|
|
69
|
-
<AttributeElement inline={true} title={t(`user.fields.title.label`)} value={user.title} />
|
|
70
|
-
<AttributeElement inline={true} title={t(`common.fields.email.label`)} value={user.email} />
|
|
71
|
-
<AttributeElement inline={false} title={t(`user.fields.bio.label`)} value={user.bio} />
|
|
72
|
-
</div>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
File without changes
|
|
File without changes
|