@hed-hog/contact 0.0.270 → 0.0.275
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 +483 -0
- package/dist/person/person.controller.d.ts +4 -0
- package/dist/person/person.controller.d.ts.map +1 -1
- package/dist/person/person.controller.js +10 -0
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.service.d.ts +12 -3
- package/dist/person/person.service.d.ts.map +1 -1
- package/dist/person/person.service.js +62 -11
- package/dist/person/person.service.js.map +1 -1
- package/hedhog/data/role.yaml +9 -1
- package/hedhog/data/route.yaml +8 -0
- package/hedhog/frontend/app/person/_components/person-form-sheet.tsx.ejs +865 -585
- package/hedhog/frontend/app/person/_components/person-types.ts.ejs +157 -115
- package/hedhog/frontend/app/person/page.tsx.ejs +1353 -1209
- package/hedhog/frontend/messages/pt.json +41 -0
- package/package.json +5 -5
- package/src/person/person.controller.ts +48 -43
- package/src/person/person.service.ts +1137 -1071
|
@@ -162,6 +162,47 @@
|
|
|
162
162
|
"avatarRemoveSuccess": "Avatar removido.",
|
|
163
163
|
"avatarInvalidType": "Selecione um arquivo de imagem válido.",
|
|
164
164
|
"avatarTooLarge": "A imagem deve ter no máximo 5MB.",
|
|
165
|
+
"owner": "Responsável",
|
|
166
|
+
"unassigned": "Não atribuído",
|
|
167
|
+
"source": "Origem",
|
|
168
|
+
"sourceReferral": "Indicação",
|
|
169
|
+
"sourceWebsite": "Site",
|
|
170
|
+
"sourceSocial": "Social",
|
|
171
|
+
"sourceInbound": "Inbound",
|
|
172
|
+
"sourceOutbound": "Outbound",
|
|
173
|
+
"sourceOther": "Outro",
|
|
174
|
+
"lifecycleStage": "Estágio",
|
|
175
|
+
"lifecycleNew": "Novo",
|
|
176
|
+
"lifecycleContacted": "Contatado",
|
|
177
|
+
"lifecycleQualified": "Qualificado",
|
|
178
|
+
"lifecycleProposal": "Proposta",
|
|
179
|
+
"lifecycleNegotiation": "Negociação",
|
|
180
|
+
"lifecycleCustomer": "Cliente",
|
|
181
|
+
"lifecycleLost": "Perdido",
|
|
182
|
+
"nextActionAt": "Próxima ação",
|
|
183
|
+
"nextActionEmpty": "Sem follow-up",
|
|
184
|
+
"registerInteraction": "Registrar interação",
|
|
185
|
+
"registerInteractionDescription": "Registre o último contato com esta pessoa.",
|
|
186
|
+
"scheduleFollowup": "Agendar follow-up",
|
|
187
|
+
"scheduleFollowupDescription": "Defina data e responsável para a próxima ação.",
|
|
188
|
+
"interactionType": "Tipo de interação",
|
|
189
|
+
"interactionTypeCall": "Ligação",
|
|
190
|
+
"interactionTypeEmail": "E-mail",
|
|
191
|
+
"interactionTypeWhatsapp": "WhatsApp",
|
|
192
|
+
"interactionTypeMeeting": "Reunião",
|
|
193
|
+
"interactionTypeNote": "Nota",
|
|
194
|
+
"interactionDate": "Data da interação",
|
|
195
|
+
"interactionOutcome": "Resultado",
|
|
196
|
+
"interactionOutcomePlaceholder": "Ex: Interessado, pediu proposta...",
|
|
197
|
+
"interactionNotesPlaceholder": "Escreva um resumo rápido...",
|
|
198
|
+
"interactionCreateSuccess": "Interação registrada com sucesso.",
|
|
199
|
+
"interactionCreateError": "Falha ao registrar interação.",
|
|
200
|
+
"nextActionRequired": "A data da próxima ação é obrigatória.",
|
|
201
|
+
"schedule": "Agendar",
|
|
202
|
+
"register": "Registrar",
|
|
203
|
+
"saveAndNew": "Salvar e novo",
|
|
204
|
+
"formShortcutsHint": "Atalhos: Ctrl/Cmd+S para salvar, Esc para fechar.",
|
|
205
|
+
"duplicateWarning": "Possível duplicidade encontrada: {names}.",
|
|
165
206
|
"createdAt": "Criado em",
|
|
166
207
|
"close": "Fechar",
|
|
167
208
|
"copiedToClipboard": "Copiado para a área de transferência!",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hed-hog/contact",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.275",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"@nestjs/core": "^11",
|
|
10
10
|
"@nestjs/jwt": "^11",
|
|
11
11
|
"@nestjs/mapped-types": "*",
|
|
12
|
-
"@hed-hog/
|
|
13
|
-
"@hed-hog/
|
|
14
|
-
"@hed-hog/api-locale": "0.0.13",
|
|
15
|
-
"@hed-hog/core": "0.0.270",
|
|
12
|
+
"@hed-hog/address": "0.0.275",
|
|
13
|
+
"@hed-hog/core": "0.0.275",
|
|
16
14
|
"@hed-hog/api-pagination": "0.0.6",
|
|
15
|
+
"@hed-hog/api-locale": "0.0.13",
|
|
16
|
+
"@hed-hog/api-prisma": "0.0.5",
|
|
17
17
|
"@hed-hog/api-mail": "0.0.8",
|
|
18
18
|
"@hed-hog/api": "0.0.4"
|
|
19
19
|
},
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { DeleteDTO, Public, Role } from '@hed-hog/api';
|
|
2
|
-
import { Locale } from '@hed-hog/api-locale';
|
|
3
|
-
import { Pagination } from '@hed-hog/api-pagination';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from '@nestjs/common';
|
|
18
|
-
import { Response } from 'express';
|
|
19
|
-
import { CreateDTO } from './dto/create.dto';
|
|
20
|
-
import { UpdateAllPersonDTO } from './dto/update.dto';
|
|
21
|
-
import { PersonService } from './person.service';
|
|
1
|
+
import { DeleteDTO, Public, Role, User } from '@hed-hog/api';
|
|
2
|
+
import { Locale } from '@hed-hog/api-locale';
|
|
3
|
+
import { Pagination } from '@hed-hog/api-pagination';
|
|
4
|
+
import {
|
|
5
|
+
Body,
|
|
6
|
+
Controller,
|
|
7
|
+
Delete,
|
|
8
|
+
Get,
|
|
9
|
+
Inject,
|
|
10
|
+
Param,
|
|
11
|
+
ParseIntPipe,
|
|
12
|
+
Patch,
|
|
13
|
+
Post,
|
|
14
|
+
Query,
|
|
15
|
+
Res,
|
|
16
|
+
forwardRef
|
|
17
|
+
} from '@nestjs/common';
|
|
18
|
+
import { Response } from 'express';
|
|
19
|
+
import { CreateDTO } from './dto/create.dto';
|
|
20
|
+
import { UpdateAllPersonDTO } from './dto/update.dto';
|
|
21
|
+
import { PersonService } from './person.service';
|
|
22
22
|
|
|
23
23
|
@Role()
|
|
24
24
|
@Controller('person')
|
|
@@ -33,30 +33,35 @@ export class PersonController {
|
|
|
33
33
|
return this.personService.getStats();
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
@Get('owner-options')
|
|
37
|
+
async getOwnerOptions(@User() user) {
|
|
38
|
+
return this.personService.getOwnerOptions(Number(user?.id || 0));
|
|
39
|
+
}
|
|
40
|
+
|
|
36
41
|
@Get()
|
|
37
|
-
async list(@Pagination() paginationParams, @Query() filters) {
|
|
38
|
-
return this.personService.list({ ...paginationParams, ...filters });
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@Public()
|
|
42
|
-
@Get('avatar/:id')
|
|
43
|
-
async openAvatar(
|
|
44
|
-
@Param('id', ParseIntPipe) id: number,
|
|
45
|
-
@Res() res: Response,
|
|
46
|
-
@Locale() locale: string,
|
|
47
|
-
) {
|
|
48
|
-
return this.personService.openPublicAvatar(locale, id, res);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@Get(':id')
|
|
52
|
-
async get(@Param('id', ParseIntPipe) id: number, @Locale() locale: string) {
|
|
53
|
-
return this.personService.get(locale, id);
|
|
54
|
-
}
|
|
42
|
+
async list(@Pagination() paginationParams, @Query() filters) {
|
|
43
|
+
return this.personService.list({ ...paginationParams, ...filters });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@Public()
|
|
47
|
+
@Get('avatar/:id')
|
|
48
|
+
async openAvatar(
|
|
49
|
+
@Param('id', ParseIntPipe) id: number,
|
|
50
|
+
@Res() res: Response,
|
|
51
|
+
@Locale() locale: string,
|
|
52
|
+
) {
|
|
53
|
+
return this.personService.openPublicAvatar(locale, id, res);
|
|
54
|
+
}
|
|
55
55
|
|
|
56
|
-
@
|
|
57
|
-
async
|
|
58
|
-
return this.personService.
|
|
59
|
-
}
|
|
56
|
+
@Get(':id')
|
|
57
|
+
async get(@Param('id', ParseIntPipe) id: number, @Locale() locale: string) {
|
|
58
|
+
return this.personService.get(locale, id);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@Post()
|
|
62
|
+
async create(@Body() data: CreateDTO, @Locale() locale: string) {
|
|
63
|
+
return this.personService.create(data, locale);
|
|
64
|
+
}
|
|
60
65
|
|
|
61
66
|
@Patch(':id')
|
|
62
67
|
async update(
|