@hed-hog/contact 0.0.279 → 0.0.285
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/README.md +2 -0
- package/dist/person/dto/create-followup.dto.d.ts +5 -0
- package/dist/person/dto/create-followup.dto.d.ts.map +1 -0
- package/dist/person/dto/create-followup.dto.js +31 -0
- package/dist/person/dto/create-followup.dto.js.map +1 -0
- package/dist/person/dto/create-interaction.dto.d.ts +12 -0
- package/dist/person/dto/create-interaction.dto.d.ts.map +1 -0
- package/dist/person/dto/create-interaction.dto.js +39 -0
- package/dist/person/dto/create-interaction.dto.js.map +1 -0
- package/dist/person/dto/create.dto.d.ts +24 -0
- package/dist/person/dto/create.dto.d.ts.map +1 -1
- package/dist/person/dto/create.dto.js +56 -1
- package/dist/person/dto/create.dto.js.map +1 -1
- package/dist/person/dto/duplicates-query.dto.d.ts +8 -0
- package/dist/person/dto/duplicates-query.dto.d.ts.map +1 -0
- package/dist/person/dto/duplicates-query.dto.js +45 -0
- package/dist/person/dto/duplicates-query.dto.js.map +1 -0
- package/dist/person/dto/merge.dto.d.ts +6 -0
- package/dist/person/dto/merge.dto.d.ts.map +1 -0
- package/dist/person/dto/merge.dto.js +35 -0
- package/dist/person/dto/merge.dto.js.map +1 -0
- package/dist/person/dto/update-lifecycle-stage.dto.d.ts +13 -0
- package/dist/person/dto/update-lifecycle-stage.dto.d.ts.map +1 -0
- package/dist/person/dto/update-lifecycle-stage.dto.js +34 -0
- package/dist/person/dto/update-lifecycle-stage.dto.js.map +1 -0
- package/dist/person/dto/update.dto.d.ts +8 -1
- package/dist/person/dto/update.dto.d.ts.map +1 -1
- package/dist/person/dto/update.dto.js +36 -0
- package/dist/person/dto/update.dto.js.map +1 -1
- package/dist/person/person.controller.d.ts +57 -1
- package/dist/person/person.controller.d.ts.map +1 -1
- package/dist/person/person.controller.js +85 -3
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.service.d.ts +79 -0
- package/dist/person/person.service.d.ts.map +1 -1
- package/dist/person/person.service.js +730 -9
- package/dist/person/person.service.js.map +1 -1
- package/hedhog/data/route.yaml +18 -0
- package/hedhog/frontend/app/_components/crm-coming-soon.tsx.ejs +110 -110
- package/hedhog/frontend/app/_components/crm-nav.tsx.ejs +73 -73
- package/hedhog/frontend/app/_lib/crm-mocks.ts.ejs +498 -256
- package/hedhog/frontend/app/_lib/crm-sections.tsx.ejs +81 -81
- package/hedhog/frontend/app/accounts/_components/account-form-sheet.tsx.ejs +477 -0
- package/hedhog/frontend/app/accounts/_components/account-types.ts.ejs +62 -0
- package/hedhog/frontend/app/accounts/page.tsx.ejs +886 -15
- package/hedhog/frontend/app/activities/page.tsx.ejs +15 -15
- package/hedhog/frontend/app/contact-type/page.tsx.ejs +105 -91
- package/hedhog/frontend/app/dashboard/page.tsx.ejs +506 -573
- package/hedhog/frontend/app/document-type/page.tsx.ejs +105 -91
- package/hedhog/frontend/app/follow-ups/page.tsx.ejs +15 -15
- package/hedhog/frontend/app/page.tsx.ejs +5 -5
- package/hedhog/frontend/app/person/_components/person-form-sheet.tsx.ejs +1440 -1103
- package/hedhog/frontend/app/person/_components/person-interaction-dialog.tsx.ejs +4 -3
- package/hedhog/frontend/app/person/_components/person-types.ts.ejs +14 -0
- package/hedhog/frontend/app/person/page.tsx.ejs +108 -190
- package/hedhog/frontend/app/pipeline/_components/lead-detail-sheet.tsx.ejs +599 -0
- package/hedhog/frontend/app/pipeline/page.tsx.ejs +1074 -299
- package/hedhog/frontend/app/reports/page.tsx.ejs +15 -15
- package/hedhog/frontend/messages/en.json +107 -0
- package/hedhog/frontend/messages/pt.json +106 -0
- package/package.json +6 -6
- package/src/person/dto/create-followup.dto.ts +15 -0
- package/src/person/dto/create-interaction.dto.ts +23 -0
- package/src/person/dto/create.dto.ts +50 -0
- package/src/person/dto/duplicates-query.dto.ts +34 -0
- package/src/person/dto/merge.dto.ts +15 -0
- package/src/person/dto/update-lifecycle-stage.dto.ts +19 -0
- package/src/person/dto/update.dto.ts +31 -1
- package/src/person/person.controller.ts +63 -2
- package/src/person/person.service.ts +1096 -7
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
EmptyState,
|
|
5
|
+
Page,
|
|
4
6
|
PageHeader,
|
|
5
7
|
PaginationFooter,
|
|
6
8
|
SearchBar,
|
|
7
9
|
} from '@/components/entity-list';
|
|
10
|
+
import {
|
|
11
|
+
AlertDialog,
|
|
12
|
+
AlertDialogAction,
|
|
13
|
+
AlertDialogCancel,
|
|
14
|
+
AlertDialogContent,
|
|
15
|
+
AlertDialogDescription,
|
|
16
|
+
AlertDialogFooter,
|
|
17
|
+
AlertDialogHeader,
|
|
18
|
+
AlertDialogTitle,
|
|
19
|
+
} from '@/components/ui/alert-dialog';
|
|
8
20
|
import { Button } from '@/components/ui/button';
|
|
9
21
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
Sheet,
|
|
23
|
+
SheetContent,
|
|
24
|
+
SheetDescription,
|
|
25
|
+
SheetFooter,
|
|
26
|
+
SheetHeader,
|
|
27
|
+
SheetTitle,
|
|
28
|
+
} from '@/components/ui/sheet';
|
|
16
29
|
import {
|
|
17
30
|
DropdownMenu,
|
|
18
31
|
DropdownMenuContent,
|
|
@@ -243,7 +256,7 @@ export default function DocumentTypePage() {
|
|
|
243
256
|
};
|
|
244
257
|
|
|
245
258
|
return (
|
|
246
|
-
<
|
|
259
|
+
<Page>
|
|
247
260
|
<PageHeader
|
|
248
261
|
breadcrumbs={[
|
|
249
262
|
{ label: t('breadcrumbContact'), href: '/contact/dashboard' },
|
|
@@ -270,31 +283,23 @@ export default function DocumentTypePage() {
|
|
|
270
283
|
/>
|
|
271
284
|
</div>
|
|
272
285
|
|
|
273
|
-
|
|
274
|
-
<
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
</TableRow>
|
|
282
|
-
</TableHeader>
|
|
283
|
-
<TableBody>
|
|
284
|
-
{isLoading ? (
|
|
285
|
-
<TableRow>
|
|
286
|
-
<TableCell colSpan={5} className="text-center">
|
|
287
|
-
{t('loading')}
|
|
288
|
-
</TableCell>
|
|
289
|
-
</TableRow>
|
|
290
|
-
) : paginate.data.length === 0 ? (
|
|
286
|
+
{isLoading ? (
|
|
287
|
+
<div className="rounded-md border p-8 text-center text-sm text-muted-foreground">
|
|
288
|
+
{t('loading')}
|
|
289
|
+
</div>
|
|
290
|
+
) : paginate.data.length > 0 ? (
|
|
291
|
+
<div className="rounded-md border mb-4">
|
|
292
|
+
<Table>
|
|
293
|
+
<TableHeader>
|
|
291
294
|
<TableRow>
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
</
|
|
295
|
+
<TableHead>{t('tableSlug')}</TableHead>
|
|
296
|
+
<TableHead>{t('tableName')}</TableHead>
|
|
297
|
+
<TableHead>{t('tableCreatedAt')}</TableHead>
|
|
298
|
+
<TableHead className="w-[70px]"></TableHead>
|
|
295
299
|
</TableRow>
|
|
296
|
-
|
|
297
|
-
|
|
300
|
+
</TableHeader>
|
|
301
|
+
<TableBody>
|
|
302
|
+
{paginate.data.map((documentType) => (
|
|
298
303
|
<TableRow
|
|
299
304
|
key={documentType.id}
|
|
300
305
|
onDoubleClick={() => handleEdit(documentType)}
|
|
@@ -348,11 +353,21 @@ export default function DocumentTypePage() {
|
|
|
348
353
|
</DropdownMenu>
|
|
349
354
|
</TableCell>
|
|
350
355
|
</TableRow>
|
|
351
|
-
))
|
|
352
|
-
|
|
353
|
-
</
|
|
354
|
-
</
|
|
355
|
-
|
|
356
|
+
))}
|
|
357
|
+
</TableBody>
|
|
358
|
+
</Table>
|
|
359
|
+
</div>
|
|
360
|
+
) : (
|
|
361
|
+
<div className="mb-4">
|
|
362
|
+
<EmptyState
|
|
363
|
+
icon={<Plus className="h-12 w-12" />}
|
|
364
|
+
title={t('noResults')}
|
|
365
|
+
description={t('emptyStateDescription')}
|
|
366
|
+
actionLabel={t('emptyStateAction')}
|
|
367
|
+
onAction={() => setIsDialogOpen(true)}
|
|
368
|
+
/>
|
|
369
|
+
</div>
|
|
370
|
+
)}
|
|
356
371
|
|
|
357
372
|
<PaginationFooter
|
|
358
373
|
currentPage={page}
|
|
@@ -363,15 +378,18 @@ export default function DocumentTypePage() {
|
|
|
363
378
|
pageSizeOptions={[10, 20, 30, 40, 50]}
|
|
364
379
|
/>
|
|
365
380
|
|
|
366
|
-
<
|
|
367
|
-
<
|
|
368
|
-
<
|
|
369
|
-
<
|
|
370
|
-
<
|
|
371
|
-
</
|
|
381
|
+
<Sheet open={isDialogOpen} onOpenChange={setIsDialogOpen}>
|
|
382
|
+
<SheetContent className="w-full sm:max-w-md">
|
|
383
|
+
<SheetHeader>
|
|
384
|
+
<SheetTitle>{t('dialogNewTitle')}</SheetTitle>
|
|
385
|
+
<SheetDescription>{t('dialogNewDescription')}</SheetDescription>
|
|
386
|
+
</SheetHeader>
|
|
372
387
|
|
|
373
388
|
<Form {...form}>
|
|
374
|
-
<form
|
|
389
|
+
<form
|
|
390
|
+
onSubmit={form.handleSubmit(onSubmit)}
|
|
391
|
+
className="space-y-4 px-4"
|
|
392
|
+
>
|
|
375
393
|
<FormField
|
|
376
394
|
control={form.control}
|
|
377
395
|
name="code"
|
|
@@ -458,32 +476,34 @@ export default function DocumentTypePage() {
|
|
|
458
476
|
/>
|
|
459
477
|
</div>
|
|
460
478
|
|
|
461
|
-
<
|
|
462
|
-
<Button
|
|
463
|
-
type="button"
|
|
464
|
-
variant="outline"
|
|
465
|
-
onClick={() => setIsDialogOpen(false)}
|
|
466
|
-
>
|
|
467
|
-
{t('buttonCancel')}
|
|
468
|
-
</Button>
|
|
479
|
+
<SheetFooter className="px-0">
|
|
469
480
|
<Button type="submit">{t('buttonCreate')}</Button>
|
|
470
|
-
</
|
|
481
|
+
</SheetFooter>
|
|
471
482
|
</form>
|
|
472
483
|
</Form>
|
|
473
|
-
</
|
|
474
|
-
</
|
|
475
|
-
|
|
476
|
-
<
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
484
|
+
</SheetContent>
|
|
485
|
+
</Sheet>
|
|
486
|
+
|
|
487
|
+
<Sheet
|
|
488
|
+
open={isEditDialogOpen}
|
|
489
|
+
onOpenChange={(open) => {
|
|
490
|
+
setIsEditDialogOpen(open);
|
|
491
|
+
if (!open) {
|
|
492
|
+
setEditingDocumentType(null);
|
|
493
|
+
editForm.reset();
|
|
494
|
+
}
|
|
495
|
+
}}
|
|
496
|
+
>
|
|
497
|
+
<SheetContent className="w-full sm:max-w-md">
|
|
498
|
+
<SheetHeader>
|
|
499
|
+
<SheetTitle>{t('dialogEditTitle')}</SheetTitle>
|
|
500
|
+
<SheetDescription>{t('dialogEditDescription')}</SheetDescription>
|
|
501
|
+
</SheetHeader>
|
|
482
502
|
|
|
483
503
|
<Form {...editForm}>
|
|
484
504
|
<form
|
|
485
505
|
onSubmit={editForm.handleSubmit(onEditSubmit)}
|
|
486
|
-
className="space-y-4"
|
|
506
|
+
className="space-y-4 px-4"
|
|
487
507
|
>
|
|
488
508
|
<FormField
|
|
489
509
|
control={editForm.control}
|
|
@@ -571,46 +591,40 @@ export default function DocumentTypePage() {
|
|
|
571
591
|
/>
|
|
572
592
|
</div>
|
|
573
593
|
|
|
574
|
-
<
|
|
575
|
-
<Button
|
|
576
|
-
type="button"
|
|
577
|
-
variant="outline"
|
|
578
|
-
onClick={() => setIsEditDialogOpen(false)}
|
|
579
|
-
>
|
|
580
|
-
{t('buttonCancel')}
|
|
581
|
-
</Button>
|
|
594
|
+
<SheetFooter className="px-0">
|
|
582
595
|
<Button type="submit">{t('buttonUpdate')}</Button>
|
|
583
|
-
</
|
|
596
|
+
</SheetFooter>
|
|
584
597
|
</form>
|
|
585
598
|
</Form>
|
|
586
|
-
</
|
|
587
|
-
</
|
|
588
|
-
|
|
589
|
-
<
|
|
590
|
-
<
|
|
591
|
-
<
|
|
592
|
-
<
|
|
593
|
-
<
|
|
599
|
+
</SheetContent>
|
|
600
|
+
</Sheet>
|
|
601
|
+
|
|
602
|
+
<AlertDialog open={deleteDialogOpen} onOpenChange={setDeleteDialogOpen}>
|
|
603
|
+
<AlertDialogContent>
|
|
604
|
+
<AlertDialogHeader>
|
|
605
|
+
<AlertDialogTitle>{t('dialogDeleteTitle')}</AlertDialogTitle>
|
|
606
|
+
<AlertDialogDescription>
|
|
594
607
|
{t('dialogDeleteDescription')}
|
|
595
|
-
</
|
|
596
|
-
</
|
|
597
|
-
<
|
|
598
|
-
<
|
|
599
|
-
type="button"
|
|
600
|
-
variant="outline"
|
|
608
|
+
</AlertDialogDescription>
|
|
609
|
+
</AlertDialogHeader>
|
|
610
|
+
<AlertDialogFooter>
|
|
611
|
+
<AlertDialogCancel
|
|
601
612
|
onClick={() => {
|
|
602
613
|
setDeleteDialogOpen(false);
|
|
603
614
|
setDeletingId(null);
|
|
604
615
|
}}
|
|
605
616
|
>
|
|
606
617
|
{t('buttonCancel')}
|
|
607
|
-
</
|
|
608
|
-
<
|
|
618
|
+
</AlertDialogCancel>
|
|
619
|
+
<AlertDialogAction
|
|
620
|
+
onClick={handleDelete}
|
|
621
|
+
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
622
|
+
>
|
|
609
623
|
{t('buttonDelete')}
|
|
610
|
-
</
|
|
611
|
-
</
|
|
612
|
-
</
|
|
613
|
-
</
|
|
614
|
-
</
|
|
624
|
+
</AlertDialogAction>
|
|
625
|
+
</AlertDialogFooter>
|
|
626
|
+
</AlertDialogContent>
|
|
627
|
+
</AlertDialog>
|
|
628
|
+
</Page>
|
|
615
629
|
);
|
|
616
630
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { CrmComingSoon } from '../_components/crm-coming-soon';
|
|
4
|
-
import { CalendarClock } from 'lucide-react';
|
|
5
|
-
|
|
6
|
-
export default function CrmFollowupsPage() {
|
|
7
|
-
return (
|
|
8
|
-
<CrmComingSoon
|
|
9
|
-
currentHref="/contact/follow-ups"
|
|
10
|
-
titleKey="followups"
|
|
11
|
-
descriptionKey="followups"
|
|
12
|
-
icon={CalendarClock}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { CrmComingSoon } from '../_components/crm-coming-soon';
|
|
4
|
+
import { CalendarClock } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
export default function CrmFollowupsPage() {
|
|
7
|
+
return (
|
|
8
|
+
<CrmComingSoon
|
|
9
|
+
currentHref="/contact/follow-ups"
|
|
10
|
+
titleKey="followups"
|
|
11
|
+
descriptionKey="followups"
|
|
12
|
+
icon={CalendarClock}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { redirect } from 'next/navigation';
|
|
2
|
-
|
|
3
|
-
export default function ContactPage() {
|
|
4
|
-
redirect('/contact/dashboard');
|
|
5
|
-
}
|
|
1
|
+
import { redirect } from 'next/navigation';
|
|
2
|
+
|
|
3
|
+
export default function ContactPage() {
|
|
4
|
+
redirect('/contact/dashboard');
|
|
5
|
+
}
|