-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00eb294
commit a71553f
Showing
23 changed files
with
910 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/entities/propostasComerciais/__tests__/change-situation-response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default null | ||
|
||
export const changeSituationRequest = { | ||
situacao: 'A' as const | ||
} |
69 changes: 69 additions & 0 deletions
69
src/entities/propostasComerciais/__tests__/create-response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
export default { | ||
data: { | ||
id: 12345678 | ||
} | ||
} | ||
|
||
export const createRequestBody = { | ||
data: "2024-04-29", | ||
situacao: "Concluído", | ||
numero: 13, | ||
contato: { | ||
id: 12345678 | ||
}, | ||
loja: { | ||
id: 12345678 | ||
}, | ||
desconto: 10, | ||
outrasDespesas: 11, | ||
garantia: 3, | ||
dataProximoContato: "2024-05-01", | ||
observacoes: "Observações da proposta comercial", | ||
observacaoInterna: "Observações internas da proposta comercial", | ||
totalOutrosItens: 1, | ||
aosCuidadosDe: "Nome do Contato", | ||
introducao: "Introdução da proposta comercial", | ||
prazoEntrega: "Prazo de entrega proposta comercial", | ||
itens: [ | ||
{ | ||
produto: { | ||
id: 12345678, | ||
descricao: "Bolo" | ||
}, | ||
codigo: "BLG-5", | ||
unidade: "UN", | ||
quantidade: 1.1, | ||
desconto: 1.2, | ||
valor: 3.1, | ||
descricaoDetalhada: "Descrição detalhada do produto" | ||
} | ||
], | ||
parcelas: [ | ||
{ | ||
numeroDias: 10, | ||
dataVencimento: "2024-04-29", | ||
valor: 10.55, | ||
observacoes: "Observacao da forma de pagamento", | ||
formaPagamento: [ | ||
{ | ||
id: 12345678 | ||
} | ||
] | ||
} | ||
], | ||
vendedor: { | ||
id: 12345678 | ||
}, | ||
transporte: { | ||
freteModalidade: 0 as const, | ||
frete: 2.34, | ||
quantidadeVolumes: 2.33, | ||
prazoEntrega: 2, | ||
pesoBruto: 2.4, | ||
contato: { | ||
id: 12345678, | ||
nome: "Nome do transportador" | ||
}, | ||
volumes: {} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/entities/propostasComerciais/__tests__/delete-many-response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export default { | ||
data: { | ||
alertas: [ | ||
{ | ||
error: { | ||
type: "VALIDATION_ERROR", | ||
message: "Não foi possível salvar a venda", | ||
description: "A venda não pode ser salva, pois ocorreram problemas em sua validação.", | ||
fields: [ | ||
{ | ||
code: 49, | ||
msg: "Uma ou mais parcelas da venda possuem erros de validação", | ||
element: "parcelas", | ||
namespace: "VENDAS", | ||
collection: [ | ||
{ | ||
index: 1, | ||
code: 12, | ||
msg: "Id da forma de pagamento inválido.", | ||
element: "formaPagamento", | ||
namespace: "VENDAS" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default null |
70 changes: 70 additions & 0 deletions
70
src/entities/propostasComerciais/__tests__/find-response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
export default { | ||
id: 123456789, | ||
data: "2024-04-29", | ||
situacao: "Concluído", | ||
total: 251, | ||
totalProdutos: 500, | ||
numero: 13, | ||
contato: { | ||
id: 12345678 | ||
}, | ||
loja: { | ||
id: 12345678 | ||
}, | ||
desconto: 10, | ||
outrasDespesas: 11, | ||
garantia: 3, | ||
dataProximoContato: "2024-05-01", | ||
observacoes: "Observações da proposta comercial", | ||
observacaoInterna: "Observações internas da proposta comercial", | ||
totalOutrosItens: 1, | ||
aosCuidadosDe: "Nome do Contato", | ||
introducao: "Introdução da proposta comercial", | ||
prazoEntrega: "Prazo de entrega proposta comercial", | ||
itens: [ | ||
{ | ||
produto: { | ||
id: 12345678, | ||
descricao: "Bolo" | ||
}, | ||
codigo: "BLG-5", | ||
unidade: "UN", | ||
quantidade: 1.1, | ||
desconto: 1.2, | ||
valor: 3.1, | ||
descricaoDetalhada: "Descrição detalhada do produto" | ||
} | ||
], | ||
parcelas: [ | ||
{ | ||
numeroDias: 10, | ||
dataVencimento: "2024-04-29", | ||
valor: 10.55, | ||
observacoes: "Observacao da forma de pagamento", | ||
formaPagamento: [ | ||
{ | ||
id: 12345678 | ||
} | ||
] | ||
} | ||
], | ||
vendedor: { | ||
id: 12345678 | ||
}, | ||
transporte: { | ||
freteModalidade: 0 as const, | ||
frete: 2.34, | ||
quantidadeVolumes: 2.33, | ||
prazoEntrega: 2, | ||
pesoBruto: 2.4, | ||
contato: { | ||
id: 12345678, | ||
nome: "Nome do transportador" | ||
}, | ||
volumes: { | ||
id: 12345678, | ||
servico: "Correios PAC", | ||
codigoRastreamento: "R56563A" | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/entities/propostasComerciais/__tests__/get-response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export default { | ||
data: [ | ||
{ | ||
id: 123456789, | ||
data: "2024-04-29", | ||
situacao: "Concluído", | ||
total: 251, | ||
totalProdutos: 500, | ||
numero: 13, | ||
contato: { | ||
id: 12345678 | ||
}, | ||
loja: { | ||
id: 12345678 | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.