@hed-hog/contact 0.0.279 → 0.0.286
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/contact.service.d.ts +2 -148
- package/dist/contact.service.d.ts.map +1 -1
- 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 +892 -15
- package/hedhog/frontend/app/activities/page.tsx.ejs +812 -15
- package/hedhog/frontend/app/contact-type/page.tsx.ejs +105 -91
- package/hedhog/frontend/app/dashboard/page.tsx.ejs +491 -573
- package/hedhog/frontend/app/document-type/page.tsx.ejs +105 -91
- package/hedhog/frontend/app/follow-ups/page.tsx.ejs +696 -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 +112 -190
- package/hedhog/frontend/app/pipeline/_components/lead-detail-sheet.tsx.ejs +599 -0
- package/hedhog/frontend/app/pipeline/page.tsx.ejs +1048 -299
- package/hedhog/frontend/app/reports/page.tsx.ejs +15 -15
- package/hedhog/frontend/messages/en.json +268 -0
- package/hedhog/frontend/messages/pt.json +233 -0
- package/package.json +6 -6
- package/src/contact.service.ts +2 -2
- 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,
|
|
@@ -211,7 +224,7 @@ export default function ContactTypePage() {
|
|
|
211
224
|
};
|
|
212
225
|
|
|
213
226
|
return (
|
|
214
|
-
<
|
|
227
|
+
<Page>
|
|
215
228
|
<PageHeader
|
|
216
229
|
breadcrumbs={[
|
|
217
230
|
{ label: t('breadcrumbContact'), href: '/contact/dashboard' },
|
|
@@ -238,31 +251,23 @@ export default function ContactTypePage() {
|
|
|
238
251
|
/>
|
|
239
252
|
</div>
|
|
240
253
|
|
|
241
|
-
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</TableRow>
|
|
250
|
-
</TableHeader>
|
|
251
|
-
<TableBody>
|
|
252
|
-
{isLoading ? (
|
|
253
|
-
<TableRow>
|
|
254
|
-
<TableCell colSpan={5} className="text-center">
|
|
255
|
-
{t('loading')}
|
|
256
|
-
</TableCell>
|
|
257
|
-
</TableRow>
|
|
258
|
-
) : paginate.data.length === 0 ? (
|
|
254
|
+
{isLoading ? (
|
|
255
|
+
<div className="rounded-md border p-8 text-center text-sm text-muted-foreground">
|
|
256
|
+
{t('loading')}
|
|
257
|
+
</div>
|
|
258
|
+
) : paginate.data.length > 0 ? (
|
|
259
|
+
<div className="rounded-md border mb-4">
|
|
260
|
+
<Table>
|
|
261
|
+
<TableHeader>
|
|
259
262
|
<TableRow>
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
</
|
|
263
|
+
<TableHead>{t('tableSlug')}</TableHead>
|
|
264
|
+
<TableHead>{t('tableName')}</TableHead>
|
|
265
|
+
<TableHead>{t('tableCreatedAt')}</TableHead>
|
|
266
|
+
<TableHead className="w-[70px]"></TableHead>
|
|
263
267
|
</TableRow>
|
|
264
|
-
|
|
265
|
-
|
|
268
|
+
</TableHeader>
|
|
269
|
+
<TableBody>
|
|
270
|
+
{paginate.data.map((contactType) => (
|
|
266
271
|
<TableRow
|
|
267
272
|
key={contactType.id}
|
|
268
273
|
onDoubleClick={() => handleEdit(contactType)}
|
|
@@ -316,11 +321,21 @@ export default function ContactTypePage() {
|
|
|
316
321
|
</DropdownMenu>
|
|
317
322
|
</TableCell>
|
|
318
323
|
</TableRow>
|
|
319
|
-
))
|
|
320
|
-
|
|
321
|
-
</
|
|
322
|
-
</
|
|
323
|
-
|
|
324
|
+
))}
|
|
325
|
+
</TableBody>
|
|
326
|
+
</Table>
|
|
327
|
+
</div>
|
|
328
|
+
) : (
|
|
329
|
+
<div className="mb-4">
|
|
330
|
+
<EmptyState
|
|
331
|
+
icon={<Plus className="h-12 w-12" />}
|
|
332
|
+
title={t('noResults')}
|
|
333
|
+
description={t('emptyStateDescription')}
|
|
334
|
+
actionLabel={t('emptyStateAction')}
|
|
335
|
+
onAction={() => setIsDialogOpen(true)}
|
|
336
|
+
/>
|
|
337
|
+
</div>
|
|
338
|
+
)}
|
|
324
339
|
|
|
325
340
|
<PaginationFooter
|
|
326
341
|
currentPage={page}
|
|
@@ -331,15 +346,18 @@ export default function ContactTypePage() {
|
|
|
331
346
|
pageSizeOptions={[10, 20, 30, 40, 50]}
|
|
332
347
|
/>
|
|
333
348
|
|
|
334
|
-
<
|
|
335
|
-
<
|
|
336
|
-
<
|
|
337
|
-
<
|
|
338
|
-
<
|
|
339
|
-
</
|
|
349
|
+
<Sheet open={isDialogOpen} onOpenChange={setIsDialogOpen}>
|
|
350
|
+
<SheetContent className="w-full sm:max-w-md">
|
|
351
|
+
<SheetHeader>
|
|
352
|
+
<SheetTitle>{t('dialogNewTitle')}</SheetTitle>
|
|
353
|
+
<SheetDescription>{t('dialogNewDescription')}</SheetDescription>
|
|
354
|
+
</SheetHeader>
|
|
340
355
|
|
|
341
356
|
<Form {...form}>
|
|
342
|
-
<form
|
|
357
|
+
<form
|
|
358
|
+
onSubmit={form.handleSubmit(onSubmit)}
|
|
359
|
+
className="space-y-4 px-4"
|
|
360
|
+
>
|
|
343
361
|
<FormField
|
|
344
362
|
control={form.control}
|
|
345
363
|
name="code"
|
|
@@ -374,32 +392,34 @@ export default function ContactTypePage() {
|
|
|
374
392
|
)}
|
|
375
393
|
/>
|
|
376
394
|
|
|
377
|
-
<
|
|
378
|
-
<Button
|
|
379
|
-
type="button"
|
|
380
|
-
variant="outline"
|
|
381
|
-
onClick={() => setIsDialogOpen(false)}
|
|
382
|
-
>
|
|
383
|
-
{t('buttonCancel')}
|
|
384
|
-
</Button>
|
|
395
|
+
<SheetFooter className="px-0">
|
|
385
396
|
<Button type="submit">{t('buttonCreate')}</Button>
|
|
386
|
-
</
|
|
397
|
+
</SheetFooter>
|
|
387
398
|
</form>
|
|
388
399
|
</Form>
|
|
389
|
-
</
|
|
390
|
-
</
|
|
391
|
-
|
|
392
|
-
<
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
400
|
+
</SheetContent>
|
|
401
|
+
</Sheet>
|
|
402
|
+
|
|
403
|
+
<Sheet
|
|
404
|
+
open={isEditDialogOpen}
|
|
405
|
+
onOpenChange={(open) => {
|
|
406
|
+
setIsEditDialogOpen(open);
|
|
407
|
+
if (!open) {
|
|
408
|
+
setEditingContactType(null);
|
|
409
|
+
editForm.reset();
|
|
410
|
+
}
|
|
411
|
+
}}
|
|
412
|
+
>
|
|
413
|
+
<SheetContent className="w-full sm:max-w-md">
|
|
414
|
+
<SheetHeader>
|
|
415
|
+
<SheetTitle>{t('dialogEditTitle')}</SheetTitle>
|
|
416
|
+
<SheetDescription>{t('dialogEditDescription')}</SheetDescription>
|
|
417
|
+
</SheetHeader>
|
|
398
418
|
|
|
399
419
|
<Form {...editForm}>
|
|
400
420
|
<form
|
|
401
421
|
onSubmit={editForm.handleSubmit(onEditSubmit)}
|
|
402
|
-
className="space-y-4"
|
|
422
|
+
className="space-y-4 px-4"
|
|
403
423
|
>
|
|
404
424
|
<FormField
|
|
405
425
|
control={editForm.control}
|
|
@@ -435,46 +455,40 @@ export default function ContactTypePage() {
|
|
|
435
455
|
)}
|
|
436
456
|
/>
|
|
437
457
|
|
|
438
|
-
<
|
|
439
|
-
<Button
|
|
440
|
-
type="button"
|
|
441
|
-
variant="outline"
|
|
442
|
-
onClick={() => setIsEditDialogOpen(false)}
|
|
443
|
-
>
|
|
444
|
-
{t('buttonCancel')}
|
|
445
|
-
</Button>
|
|
458
|
+
<SheetFooter className="px-0">
|
|
446
459
|
<Button type="submit">{t('buttonUpdate')}</Button>
|
|
447
|
-
</
|
|
460
|
+
</SheetFooter>
|
|
448
461
|
</form>
|
|
449
462
|
</Form>
|
|
450
|
-
</
|
|
451
|
-
</
|
|
452
|
-
|
|
453
|
-
<
|
|
454
|
-
<
|
|
455
|
-
<
|
|
456
|
-
<
|
|
457
|
-
<
|
|
463
|
+
</SheetContent>
|
|
464
|
+
</Sheet>
|
|
465
|
+
|
|
466
|
+
<AlertDialog open={deleteDialogOpen} onOpenChange={setDeleteDialogOpen}>
|
|
467
|
+
<AlertDialogContent>
|
|
468
|
+
<AlertDialogHeader>
|
|
469
|
+
<AlertDialogTitle>{t('dialogDeleteTitle')}</AlertDialogTitle>
|
|
470
|
+
<AlertDialogDescription>
|
|
458
471
|
{t('dialogDeleteDescription')}
|
|
459
|
-
</
|
|
460
|
-
</
|
|
461
|
-
<
|
|
462
|
-
<
|
|
463
|
-
type="button"
|
|
464
|
-
variant="outline"
|
|
472
|
+
</AlertDialogDescription>
|
|
473
|
+
</AlertDialogHeader>
|
|
474
|
+
<AlertDialogFooter>
|
|
475
|
+
<AlertDialogCancel
|
|
465
476
|
onClick={() => {
|
|
466
477
|
setDeleteDialogOpen(false);
|
|
467
478
|
setDeletingId(null);
|
|
468
479
|
}}
|
|
469
480
|
>
|
|
470
481
|
{t('buttonCancel')}
|
|
471
|
-
</
|
|
472
|
-
<
|
|
482
|
+
</AlertDialogCancel>
|
|
483
|
+
<AlertDialogAction
|
|
484
|
+
onClick={handleDelete}
|
|
485
|
+
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
486
|
+
>
|
|
473
487
|
{t('buttonDelete')}
|
|
474
|
-
</
|
|
475
|
-
</
|
|
476
|
-
</
|
|
477
|
-
</
|
|
478
|
-
</
|
|
488
|
+
</AlertDialogAction>
|
|
489
|
+
</AlertDialogFooter>
|
|
490
|
+
</AlertDialogContent>
|
|
491
|
+
</AlertDialog>
|
|
492
|
+
</Page>
|
|
479
493
|
);
|
|
480
494
|
}
|