@carlonicora/nextjs-jsonapi 1.65.1 → 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/{AuthComponent-B4rNZRYE.d.ts → AuthComponent-DL1D3y7f.d.ts} +1 -1
- package/dist/{AuthComponent-nzabiz68.d.mts → AuthComponent-NwQ_ZXsv.d.mts} +1 -1
- package/dist/{BlockNoteEditor-QGNV6E4X.js → BlockNoteEditor-QHWPE3BJ.js} +14 -14
- package/dist/{BlockNoteEditor-QGNV6E4X.js.map → BlockNoteEditor-QHWPE3BJ.js.map} +1 -1
- package/dist/{BlockNoteEditor-CZOW7J5K.mjs → BlockNoteEditor-TIX3GDVZ.mjs} +4 -4
- package/dist/{auth.interface-C1WjZ0fM.d.ts → auth.interface-BX_1qZZJ.d.ts} +1 -1
- package/dist/{auth.interface-fBFqIrw4.d.mts → auth.interface-yeLelxdI.d.mts} +1 -1
- package/dist/billing/index.js +346 -346
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-CDCGQFIA.js → chunk-3BWYWS3A.js} +2118 -1659
- package/dist/chunk-3BWYWS3A.js.map +1 -0
- package/dist/{chunk-LRXJT656.js → chunk-CJY63D6U.js} +72 -5
- package/dist/chunk-CJY63D6U.js.map +1 -0
- package/dist/{chunk-RA4RYKYB.js → chunk-KFIQTY4O.js} +11 -11
- package/dist/{chunk-RA4RYKYB.js.map → chunk-KFIQTY4O.js.map} +1 -1
- package/dist/{chunk-G7PGWMFO.mjs → chunk-RIG2BEXJ.mjs} +72 -5
- package/dist/{chunk-G7PGWMFO.mjs.map → chunk-RIG2BEXJ.mjs.map} +1 -1
- package/dist/{chunk-ESGUCYJS.mjs → chunk-WWP32QYC.mjs} +3534 -3075
- package/dist/chunk-WWP32QYC.mjs.map +1 -0
- package/dist/{chunk-5KMKI23S.mjs → chunk-ZYAAJMZZ.mjs} +2 -2
- package/dist/client/index.d.mts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +69 -12
- package/dist/components/index.d.ts +69 -12
- package/dist/components/index.js +18 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +19 -5
- package/dist/{config-DZWAFB7H.d.ts → config-CyCAWW-d.d.ts} +1 -1
- package/dist/{config-ndRJIQsP.d.mts → config-D-mqttuF.d.mts} +1 -1
- package/dist/{content.interface-B5ySfiOE.d.mts → content.interface-8T5-G84c.d.mts} +1 -1
- package/dist/{content.interface-mmz0uMwm.d.ts → content.interface-D-xdYxjt.d.ts} +1 -1
- package/dist/contexts/index.d.mts +3 -3
- package/dist/contexts/index.d.ts +3 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +29 -9
- package/dist/core/index.d.ts +29 -9
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{notification.interface-DG7cq9oG.d.mts → notification.interface-C6UcmJqu.d.mts} +20 -0
- package/dist/{notification.interface-COKHDQeE.d.ts → notification.interface-ItBxq2au.d.ts} +20 -0
- package/dist/{s3.service-ppn9iGJU.d.ts → s3.service-Cg5TmbU_.d.ts} +6 -3
- package/dist/{s3.service-BoRPFx82.d.mts → s3.service-DLf_a0xS.d.mts} +6 -3
- package/dist/server/index.d.mts +4 -4
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/dist/{useRbacState-DhuYYr0S.d.mts → useRbacState-Btk1gkQg.d.mts} +1 -1
- package/dist/{useRbacState-NnzNL2ED.d.ts → useRbacState-CUj0hp8t.d.ts} +1 -1
- package/dist/{useSocket-bsV-K4qR.d.ts → useSocket-BSUN9s3p.d.ts} +1 -1
- package/dist/{useSocket-CtfuR5wD.d.mts → useSocket-DKI92Fbg.d.mts} +1 -1
- package/package.json +2 -1
- package/src/components/EditableAvatar.tsx +175 -0
- package/src/components/containers/RoundPageContainer.tsx +1 -1
- package/src/components/fiscal/FiscalDataDisplay.tsx +26 -0
- package/src/components/fiscal/ItalianFiscalData.tsx +120 -0
- package/src/components/fiscal/ItalianFiscalDataDisplay.tsx +24 -0
- package/src/components/fiscal/index.ts +4 -0
- package/src/components/index.ts +3 -0
- package/src/components/navigations/RecentPagesNavigator.tsx +3 -3
- package/src/features/company/components/details/CompanyContent.tsx +105 -0
- package/src/features/company/components/details/CompanyDetails.tsx +2 -19
- package/src/features/company/components/details/index.ts +1 -0
- package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +38 -70
- package/src/features/company/components/forms/CompanyEditor.tsx +212 -172
- package/src/features/company/data/company.interface.ts +20 -0
- package/src/features/company/data/company.ts +73 -0
- 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/src/utils/fiscal-utils.ts +7 -0
- package/src/utils/italian-validators.ts +79 -0
- package/dist/chunk-CDCGQFIA.js.map +0 -1
- package/dist/chunk-ESGUCYJS.mjs.map +0 -1
- package/dist/chunk-LRXJT656.js.map +0 -1
- package/src/features/user/components/details/UserDetails.tsx +0 -74
- /package/dist/{BlockNoteEditor-CZOW7J5K.mjs.map → BlockNoteEditor-TIX3GDVZ.mjs.map} +0 -0
- /package/dist/{chunk-5KMKI23S.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
|