Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion senhor-sorvete/src/Components/CarrosselImagens/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function BasicDemo() {
useEffect(() => {
const fetchRecomendacoes = async () => {
try {
const response = await axios.get("http://10.0.0.26:80/api/produtos/recomendacao")
const response = await axios.get("http://50.19.70.8:80/api/produtos/recomendacao")
setRecomendacoes(response.data);
} catch (error) {
console.error("Erro ao buscar recomendacoes:", error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ModalAdicionarFornecedor = ({
}

try {
const response = await fetch('http://10.0.0.26:80/api/fornecedores', {
const response = await fetch('http://50.19.70.8:80/api/fornecedores', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down
2 changes: 1 addition & 1 deletion senhor-sorvete/src/Components/ModalEditarLote/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ModalEditarProduto = ({
debugger
try {
await axios.patch(
`http://10.0.0.26:80/api/lotes/${idLote}`,
`http://50.19.70.8:80/api/lotes/${idLote}`,
corpoParaAtualizarStatus,
{
headers: {
Expand Down
2 changes: 1 addition & 1 deletion senhor-sorvete/src/Components/ModalGerenciamento/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const ModalGerenciamento = ({
const buscarProdutos = async () => {
const token = sessionStorage.getItem('token');
try {
const response = await axios.get('http://10.0.0.26:80/api/produtos', {
const response = await axios.get('http://50.19.70.8:80/api/produtos', {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down
4 changes: 2 additions & 2 deletions senhor-sorvete/src/Pages/ADM/Dashboard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const Dashboard = () => {
const fetchGerarCsv = async () => {
const token = sessionStorage.getItem("token");
try {
const response = await fetch('http://10.0.0.26:80/api/csv/download', {
const response = await fetch('http://50.19.70.8:80/api/csv/download', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
Expand Down Expand Up @@ -125,7 +125,7 @@ const Dashboard = () => {
setError(null);

try {
const response = await fetch("http://10.0.0.26:80/api/dashboard/", {
const response = await fetch("http://50.19.70.8:80/api/dashboard/", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
Expand Down
6 changes: 3 additions & 3 deletions senhor-sorvete/src/Pages/ADM/Destaque/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Destaque = () => {
// Função para buscar o produto recomendado
const fetchProdutoRecomendado = async (token) => {
try {
const response = await axios.get('http://10.0.0.26:80/api/produtos/destaque', {
const response = await axios.get('http://50.19.70.8:80/api/produtos/destaque', {
headers: { 'Authorization': `Bearer ${token}` }
});

Expand All @@ -60,7 +60,7 @@ const Destaque = () => {
// Função para buscar todos os produtos
const fetchTodosProdutos = async (token) => {
try {
const response = await axios.get('http://10.0.0.26:80/api/produtos', {
const response = await axios.get('http://50.19.70.8:80/api/produtos', {
headers: { 'Authorization': `Bearer ${token}` }
});

Expand Down Expand Up @@ -122,7 +122,7 @@ const Destaque = () => {
}

try {
const response = await fetch(`http://10.0.0.26:80/api/produtos/destaque`, {
const response = await fetch(`http://50.19.70.8:80/api/produtos/destaque`, {
method: "PUT",
headers: {
'Content-Type': 'application/json',
Expand Down
12 changes: 6 additions & 6 deletions senhor-sorvete/src/Pages/ADM/Estoque/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const Estoque = () => {
const fetchEstoque = async () => {
const token = sessionStorage.getItem('token');
try {
const response = await axios.get('http://10.0.0.26:80/api/produtos', {
const response = await axios.get('http://50.19.70.8:80/api/produtos', {
headers: {
Authorization: `Bearer ${token}`
}
Expand All @@ -78,7 +78,7 @@ const Estoque = () => {
// const baixarRelatorioExcel = async () => {
// const token = sessionStorage.getItem('token');
// try {
// await axios.get('http://10.0.0.26:80/api/relatorio', {
// await axios.get('http://50.19.70.8:80/api/relatorio', {
// headers: {
// Authorization: `Bearer ${token}`
// }
Expand All @@ -93,7 +93,7 @@ const Estoque = () => {
const token = sessionStorage.getItem('token');

try {
const response = await axios.get('http://10.0.0.26:80/api/relatorio', {
const response = await axios.get('http://50.19.70.8:80/api/relatorio', {
headers: {
Authorization: `Bearer ${token}`
},
Expand Down Expand Up @@ -126,7 +126,7 @@ const Estoque = () => {
const abrirModalAdicionarLote = async () => {
const token = sessionStorage.getItem('token');
try {
const response = await axios.get('http://10.0.0.26:80/api/fornecedores', {
const response = await axios.get('http://50.19.70.8:80/api/fornecedores', {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down Expand Up @@ -221,7 +221,7 @@ const Estoque = () => {
};

try {
await axios.post('http://10.0.0.26:80/api/lotes', jsonParaCriarLote, {
await axios.post('http://50.19.70.8:80/api/lotes', jsonParaCriarLote, {
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
Expand All @@ -232,7 +232,7 @@ const Estoque = () => {
fecharModalAdicionarLote();

// Atualiza a lista de produtos
const response = await axios.get('http://10.0.0.26:80/api/produtos', {
const response = await axios.get('http://50.19.70.8:80/api/produtos', {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down
4 changes: 2 additions & 2 deletions senhor-sorvete/src/Pages/ADM/ProdutoEstoque/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const ProdutoEstoque = () => {
const fetchEstoque = async () => {
const token = sessionStorage.getItem('token');
try {
const response = await axios.get(`http://10.0.0.26:80/api/lotes/produtos/${id}`, {
const response = await axios.get(`http://50.19.70.8:80/api/lotes/produtos/${id}`, {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down Expand Up @@ -90,7 +90,7 @@ const ProdutoEstoque = () => {
const handleDeletar = async () => {
const token = sessionStorage.getItem("token");
try {
await axios.delete(`http://10.0.0.26:80/api/lotes/${idLote}`, {
await axios.delete(`http://50.19.70.8:80/api/lotes/${idLote}`, {
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
Expand Down
14 changes: 7 additions & 7 deletions senhor-sorvete/src/Pages/ADM/Recomendacoes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Recomendacoes = () => {
const token = sessionStorage.getItem('token');
try {
// Buscar todos os Produtos
const resposta = await fetch('http://10.0.0.26:80/api/produtos/ativos', {
const resposta = await fetch('http://50.19.70.8:80/api/produtos/ativos', {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down Expand Up @@ -102,7 +102,7 @@ const Recomendacoes = () => {
setCarregando(true);
try {
// Buscar todos os Produtos
const resposta = await fetch('http://10.0.0.26:80/api/produtos/recomendacao', {
const resposta = await fetch('http://50.19.70.8:80/api/produtos/recomendacao', {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down Expand Up @@ -161,7 +161,7 @@ const Recomendacoes = () => {

const atualizarRecomendacao = JSON.parse(JSON.stringify({ produtoId: produto.id }));

const resposta = await fetch(`http://10.0.0.26:80/api/produtos/recomendacao/${idRecomendacao}`, {
const resposta = await fetch(`http://50.19.70.8:80/api/produtos/recomendacao/${idRecomendacao}`, {
method: "PUT",
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -208,9 +208,9 @@ const Recomendacoes = () => {
setCarregando(true);
try {
const urls = [
{ key: "marcas", url: "http://10.0.0.26:80/api/marcas" },
{ key: "subtipos", url: "http://10.0.0.26:80/api/subtipos" },
{ key: "tipos", url: "http://10.0.0.26:80/api/tipos" }
{ key: "marcas", url: "http://50.19.70.8:80/api/marcas" },
{ key: "subtipos", url: "http://50.19.70.8:80/api/subtipos" },
{ key: "tipos", url: "http://50.19.70.8:80/api/tipos" }
];

const respostas = await Promise.all(
Expand Down Expand Up @@ -306,7 +306,7 @@ const Recomendacoes = () => {
.normalize("NFD")
.replace(/[\u0300-\u036f]/g, "");

const response = await fetch(`http://10.0.0.26:80/api/produtos/filtrar-nome-marca?termo=${termoNormalizado}`, {
const response = await fetch(`http://50.19.70.8:80/api/produtos/filtrar-nome-marca?termo=${termoNormalizado}`, {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down
14 changes: 7 additions & 7 deletions senhor-sorvete/src/Pages/ADM/Saidas/saidas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Saidas = () => {
}

axios
.get("http://10.0.0.26:80/api/saidas-estoque", {
.get("http://50.19.70.8:80/api/saidas-estoque", {
headers: {
Authorization: `Bearer ${token}`,
},
Expand All @@ -118,7 +118,7 @@ const Saidas = () => {
const token = sessionStorage.getItem("token");

try {
const response = await axios.get("http://10.0.0.26:80/api/produtos", {
const response = await axios.get("http://50.19.70.8:80/api/produtos", {
headers: {
Authorization: `Bearer ${token}`,
},
Expand Down Expand Up @@ -257,7 +257,7 @@ const Saidas = () => {
saidaEstoques: saida,
};

await axios.post("http://10.0.0.26:80/api/saidas-estoque", saidaEstoque, {
await axios.post("http://50.19.70.8:80/api/saidas-estoque", saidaEstoque, {
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
Expand Down Expand Up @@ -285,7 +285,7 @@ const Saidas = () => {

try {
const dataFormatada = dataBusca;
const response = await axios.get("http://10.0.0.26:80/api/saidas-estoque/data", {
const response = await axios.get("http://50.19.70.8:80/api/saidas-estoque/data", {
params: { data: dataFormatada },
headers: {
Authorization: `Bearer ${token}`,
Expand Down Expand Up @@ -326,7 +326,7 @@ const Saidas = () => {
}

try {
await axios.put(`http://10.0.0.26:80/api/saidas-estoque/${saidaEditada.id}`, saidaEditada, {
await axios.put(`http://50.19.70.8:80/api/saidas-estoque/${saidaEditada.id}`, saidaEditada, {
headers: {
Authorization: `Bearer ${token}`,
},
Expand Down Expand Up @@ -360,7 +360,7 @@ const Saidas = () => {
const token = sessionStorage.getItem("token");

try {
const response = await axios.get("http://10.0.0.26:80/api/produtos", {
const response = await axios.get("http://50.19.70.8:80/api/produtos", {
headers: {
Authorization: `Bearer ${token}`,
},
Expand Down Expand Up @@ -392,7 +392,7 @@ const Saidas = () => {
};

try {
await axios.delete("http://10.0.0.26:80/api/saidas-estoque", {
await axios.delete("http://50.19.70.8:80/api/saidas-estoque", {
data: saidaEstoque, // o body da requisição
headers: {
Authorization: `Bearer ${token}`,
Expand Down
30 changes: 15 additions & 15 deletions senhor-sorvete/src/Pages/ADM/listarProdutos/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const ListarProdutos = () => {
setCarregando(true);
try {
// Buscar todos os Produtos
const resposta = await fetch('http://10.0.0.26:80/api/produtos', {
const resposta = await fetch('http://50.19.70.8:80/api/produtos', {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down Expand Up @@ -126,7 +126,7 @@ const ListarProdutos = () => {
}

try {
const response = await fetch('http://10.0.0.26:80/api/marcas', {
const response = await fetch('http://50.19.70.8:80/api/marcas', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -178,7 +178,7 @@ const ListarProdutos = () => {
}

try {
const response = await fetch('http://10.0.0.26:80/api/tipos', {
const response = await fetch('http://50.19.70.8:80/api/tipos', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -236,7 +236,7 @@ const ListarProdutos = () => {
}

try {
const response = await fetch('http://10.0.0.26:80/api/subtipos', {
const response = await fetch('http://50.19.70.8:80/api/subtipos', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -265,7 +265,7 @@ const ListarProdutos = () => {
};
// const obterTokenSasAzure = async () => {
// const token = sessionStorage.getItem('token');
// const resposta = await fetch('http://10.0.0.26:80/api/azure', {
// const resposta = await fetch('http://50.19.70.8:80/api/azure', {
// method: 'GET',
// headers: {
// 'Authorization': `Bearer ${token}`
Expand Down Expand Up @@ -316,7 +316,7 @@ const ListarProdutos = () => {
.normalize("NFD")
.replace(/[\u0300-\u036f]/g, "");

const response = await fetch(`http://10.0.0.26:80/api/produtos/filtrar-nome-marca?termo=${termoNormalizado}`, {
const response = await fetch(`http://50.19.70.8:80/api/produtos/filtrar-nome-marca?termo=${termoNormalizado}`, {
headers: {
Authorization: `Bearer ${token}`
}
Expand Down Expand Up @@ -364,9 +364,9 @@ const ListarProdutos = () => {
setCarregando(true);
try {
const urls = [
{ key: "marcas", url: "http://10.0.0.26:80/api/marcas" },
{ key: "subtipos", url: "http://10.0.0.26:80/api/subtipos" },
{ key: "tipos", url: "http://10.0.0.26:80/api/tipos" }
{ key: "marcas", url: "http://50.19.70.8:80/api/marcas" },
{ key: "subtipos", url: "http://50.19.70.8:80/api/subtipos" },
{ key: "tipos", url: "http://50.19.70.8:80/api/tipos" }
];

const respostas = await Promise.all(
Expand Down Expand Up @@ -653,7 +653,7 @@ const ListarProdutos = () => {
temLactose: typeof novoProduto.temLactose === "boolean" ? novoProduto.temLactose : false,
temGluten: typeof novoProduto.temGluten === "boolean" ? novoProduto.temGluten : false
};
const resposta = await fetch('http://10.0.0.26:80/api/produtos', {
const resposta = await fetch('http://50.19.70.8:80/api/produtos', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
Expand Down Expand Up @@ -733,7 +733,7 @@ const ListarProdutos = () => {
imagemUrl: urlImagem
};

const resposta = await fetch(`http://10.0.0.26:80/api/produtos/${produto.id}`, {
const resposta = await fetch(`http://50.19.70.8:80/api/produtos/${produto.id}`, {
method: "PUT",
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -811,9 +811,9 @@ const ListarProdutos = () => {
setCarregando(true);
try {
const urls = [
{ key: "marcas", url: "http://10.0.0.26:80/api/marcas" },
{ key: "subtipos", url: "http://10.0.0.26:80/api/subtipos" },
{ key: "tipos", url: "http://10.0.0.26:80/api/tipos" }
{ key: "marcas", url: "http://50.19.70.8:80/api/marcas" },
{ key: "subtipos", url: "http://50.19.70.8:80/api/subtipos" },
{ key: "tipos", url: "http://50.19.70.8:80/api/tipos" }
];

const respostas = await Promise.all(
Expand Down Expand Up @@ -867,7 +867,7 @@ const ListarProdutos = () => {
const token = sessionStorage.getItem('token');
const isAtivoGenerico = !produto.isAtivo; // Inverte o status atual
try {
const response = await fetch(`http://10.0.0.26:80/api/produtos/ativar/${produto.id}?isAtivo=${isAtivoGenerico}`, {
const response = await fetch(`http://50.19.70.8:80/api/produtos/ativar/${produto.id}?isAtivo=${isAtivoGenerico}`, {
method: "PATCH",
headers: {
'Content-Type': 'application/json',
Expand Down
Loading