refactor: remove console.log statements from various files for cleaner code
This commit is contained in:
parent
5f5aa18b87
commit
6cd09cce1b
7 changed files with 3 additions and 23 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
import { useEffect } from "react";
|
|
||||||
import { z } from "zod/v4";
|
import { z } from "zod/v4";
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
|
|
@ -68,12 +67,6 @@ export const FormPrezzo = ({
|
||||||
stringhe_condizioni_options.length > 0 &&
|
stringhe_condizioni_options.length > 0 &&
|
||||||
!stringhe_condizioni_options.includes(testo_condizioni)
|
!stringhe_condizioni_options.includes(testo_condizioni)
|
||||||
) {
|
) {
|
||||||
console.log("testo_condizioni", testo_condizioni);
|
|
||||||
console.log(
|
|
||||||
"stringhe_condizioni_options",
|
|
||||||
stringhe_condizioni_options,
|
|
||||||
);
|
|
||||||
|
|
||||||
ctx.addIssue({
|
ctx.addIssue({
|
||||||
code: "custom",
|
code: "custom",
|
||||||
input: testo_condizioni,
|
input: testo_condizioni,
|
||||||
|
|
@ -119,13 +112,6 @@ export const FormPrezzo = ({
|
||||||
|
|
||||||
const { watch } = form;
|
const { watch } = form;
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const subscription = watch((value, { name, type }) =>
|
|
||||||
console.log(value, name, type),
|
|
||||||
);
|
|
||||||
return () => subscription.unsubscribe();
|
|
||||||
}, [watch]);
|
|
||||||
|
|
||||||
const scontoWch = watch(["sconto", "prezzo_cent"]);
|
const scontoWch = watch(["sconto", "prezzo_cent"]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ export const useStaleImageReload = () => {
|
||||||
const hasStale = document.cookie.includes(`${STALE_KEY}=1`);
|
const hasStale = document.cookie.includes(`${STALE_KEY}=1`);
|
||||||
|
|
||||||
if (hasStale) {
|
if (hasStale) {
|
||||||
console.log("Stale resource cookie detected");
|
//console.log("Stale resource cookie detected");
|
||||||
// Clear the cookie
|
// Clear the cookie
|
||||||
deleteCookie(STALE_KEY);
|
deleteCookie(STALE_KEY);
|
||||||
attemptReload();
|
attemptReload();
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ async function uploadFile(
|
||||||
})
|
})
|
||||||
.parse(res);
|
.parse(res);
|
||||||
const fileID = parsed.id;
|
const fileID = parsed.id;
|
||||||
console.log("File uploaded successfully.");
|
|
||||||
return { success: true, id: fileID };
|
return { success: true, id: fileID };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -176,9 +176,6 @@ export const checkFiscalCodeValidity = ({
|
||||||
gen !== codiceFiscale.slice(0, 15) &&
|
gen !== codiceFiscale.slice(0, 15) &&
|
||||||
!(codiceFiscale in getAlternativeCF(gen))
|
!(codiceFiscale in getAlternativeCF(gen))
|
||||||
) {
|
) {
|
||||||
//console.log("gen", gen);
|
|
||||||
//console.log("codiceFiscale", codiceFiscale);
|
|
||||||
console.log("alternative", getAlternativeCF(gen));
|
|
||||||
refinementContext.issues.push({
|
refinementContext.issues.push({
|
||||||
code: "custom",
|
code: "custom",
|
||||||
input: "",
|
input: "",
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ export const comunicazioniRouter = createTRPCRouter({
|
||||||
.where("images_refs.ordine", "=", 0)
|
.where("images_refs.ordine", "=", 0)
|
||||||
.where("annunci.id", "in", input.annunci)
|
.where("annunci.id", "in", input.annunci)
|
||||||
.execute();
|
.execute();
|
||||||
console.log(annunci);
|
|
||||||
await NewMail({
|
await NewMail({
|
||||||
template: {
|
template: {
|
||||||
mailType: "shareAnnunci",
|
mailType: "shareAnnunci",
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,6 @@ export const postAcquistoDataHandler = async ({
|
||||||
servizio: ServizioUpdate;
|
servizio: ServizioUpdate;
|
||||||
}): Promise<{ ordineIdForPayment: OrdiniOrdineId | null }> => {
|
}): Promise<{ ordineIdForPayment: OrdiniOrdineId | null }> => {
|
||||||
try {
|
try {
|
||||||
console.log("servizio", servizio);
|
|
||||||
const servizioData = await db.transaction().execute(async (tx) => {
|
const servizioData = await db.transaction().execute(async (tx) => {
|
||||||
// Update user and anagrafica data
|
// Update user and anagrafica data
|
||||||
await tx
|
await tx
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ export async function editFile(
|
||||||
})
|
})
|
||||||
.parse(res);
|
.parse(res);
|
||||||
const fileID = parsed.id;
|
const fileID = parsed.id;
|
||||||
console.log("File edited successfully.");
|
|
||||||
return { success: true, id: fileID };
|
return { success: true, id: fileID };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,7 +139,6 @@ export async function deleteFile(fileID: string): Promise<DeleteResponse> {
|
||||||
|
|
||||||
// Treat redirect as success
|
// Treat redirect as success
|
||||||
if (response.ok || (response.status >= 300 && response.status < 400)) {
|
if (response.ok || (response.status >= 300 && response.status < 400)) {
|
||||||
console.log(`File ${fileID} deleted successfully.`);
|
|
||||||
return { success: true };
|
return { success: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue