Skip to content

Commit

Permalink
natura della comunicazione
Browse files Browse the repository at this point in the history
  • Loading branch information
gallomaf committed Oct 12, 2024
1 parent 29de567 commit 15ed5a3
Show file tree
Hide file tree
Showing 28 changed files with 520 additions and 2,162 deletions.
28 changes: 28 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.16.7",
"@popperjs/core": "^2.11.8",
"@ramonak/react-progress-bar": "^5.2.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@babel/plugin-proposal-private-property-in-object" : "^7.16.7",
"axios": "^1.6.8",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
Expand All @@ -20,6 +20,7 @@
"react-bootstrap": "^2.10.1",
"react-bootstrap-icons": "^1.11.3",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-router-dom": "^6.22.1",
"react-scripts": "5.0.1",
"react-toastify": "^10.0.5",
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ function CollapsibleExample() {
</Nav.Link>
<Nav.Link
eventKey={2}
href="https://www.spedireadesso.com/modulo-richiesta-preventivo-postale.html"
title="Advertising mail quote form"
href="https://spedireadesso.com/modulo-preventivo-postale/"
title="Modulo richiesta preventivo postale"
>
<img
src={`${process.env.PUBLIC_URL}/Images/Navbar/icon-2.svg`}
alt="Advertising mail quote form"
alt="Modulo richiesta preventivo postale"
/>
</Nav.Link>
<Nav.Link
Expand Down
9 changes: 4 additions & 5 deletions src/Pages/Cartoline/Step4/Step2of4/Step2of4Cartoline.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import React from "react";
//import Form from "react-bootstrap/Form";
import "./Step2of4Cartoline.css";
//import Button from "react-bootstrap/Button";
import { Row, Col } from "react-bootstrap";
import ProgressBar from "react-bootstrap/ProgressBar";
import { useState } from "react";
import Navbar from "../../../../Components/Navbar/Navbar";
import { useNavigate } from "react-router-dom";
//import { useSearchParams, useLocation, useParams } from "react-router-dom";
import axios from "axios";
//import { API_URL } from "../../../../services/client";
//import { SuccessToast } from "../../../../Components/Navbar/Toast/Toast";
import {ToastContainer} from "react-toastify";
import { ErrorToast } from "../../../../Components/Navbar/Toast/Toast";
import ColonnaSx from "../../../../Components/Colonne/ColonnaSx";
import BreadcrumbBt from "../../../../Components/Footer/BreadcrumbBt";
import {Helmet} from "react-helmet";

export default function Step2of4Cartoline() {

Expand Down Expand Up @@ -226,6 +222,9 @@ export default function Step2of4Cartoline() {

return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
</Helmet>
<ToastContainer/>
<div className="over-flow-setting">
<Navbar />
Expand Down
31 changes: 4 additions & 27 deletions src/Pages/Cartoline/Step4/Step4Cartoline.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import React, {useEffect, useRef} from "react";
import "./Step4Cartoline.css";
//import Button from "react-bootstrap/Button";
import { Row, Col } from "react-bootstrap";
import ProgressBar from "react-bootstrap/ProgressBar";
import { useState } from "react";
import Navbar from "../../../Components/Navbar/Navbar";
//import Dropdown from "react-bootstrap/Dropdown";
//import { useSearchParams, useLocation, useParams } from "react-router-dom";
import { useNavigate } from "react-router-dom";
//import axios from "axios";
//import { API_URL } from "../../../services/client";
//import { SuccessToast } from "../../../Components/Navbar/Toast/Toast";
import {ToastContainer} from "react-toastify";
import { ErrorToast } from "../../../Components/Navbar/Toast/Toast";
import ColonnaSx from "../../../Components/Colonne/ColonnaSx";
import BreadcrumbBt from "../../../Components/Footer/BreadcrumbBt";
import {Helmet} from "react-helmet";

export default function Step4Cartoline() {

Expand Down Expand Up @@ -107,9 +102,7 @@ export default function Step4Cartoline() {
navigate('/Step-3');
};


const formValidation = () => {
console.log(formatoBuste);

if (formatoBuste == 3) {
let lunghezzaInt= parseInt(lunghezza);
Expand Down Expand Up @@ -151,25 +144,6 @@ export default function Step4Cartoline() {
return;
}

/*
const userId = localStorage.getItem("_id");
const EnvelopePrintingOption = isChecked
? "Stampate dal Cliente"
: isChecked2
? "Stampate da Spedire Adesso"
: "";
const res = await axios.post(
`${API_URL}/auth/addQA_cartoline_step4a`,
{
id: userId,
envelope_format: dropselectedValue,
measurements: measurement,
envelope_printing: EnvelopePrintingOption,
}
);
*/

let res = {'status' : 200};
if (res.status === 200) {
handleRoutes();
Expand All @@ -188,6 +162,9 @@ export default function Step4Cartoline() {

return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
</Helmet>
<ToastContainer/>
<div className="over-flow-setting">
<Navbar />
Expand Down
8 changes: 6 additions & 2 deletions src/Pages/Cartoline/Step5/Step5Cartoline.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react";
import "./Step5Cartoline.css"//;
import Button from "react-bootstrap/Button";
import { Row, Col } from "react-bootstrap";
import ProgressBar from "react-bootstrap/ProgressBar";
import { useState, useEffect } from "react";
Expand All @@ -9,7 +8,9 @@ import { useNavigate } from "react-router-dom";
import { useLocation } from "react-router-dom";
import { API_URL } from "../../../services/client";
import axios from "axios";
//import { SuccessToast } from "../../../Components/Navbar/Toast/Toast";
import {Helmet} from "react-helmet";


export default function Step5Cartoline() {
const [sendItem, setItem] = useState();

Expand Down Expand Up @@ -60,6 +61,9 @@ export default function Step5Cartoline() {
}
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
</Helmet>
<div className="over-flow-setting">
<Navbar />
<div>
Expand Down
4 changes: 4 additions & 0 deletions src/Pages/Cartoline/Step6/Step6Cartoline.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useLocation } from "react-router-dom";
import { API_URL } from "../../../services/client";
import axios from "axios";
import { ErrorToast } from "../../../Components/Navbar/Toast/Toast";
import {Helmet} from "react-helmet";

export default function Step6Cartoline() {
const now = 98;
Expand Down Expand Up @@ -65,6 +66,9 @@ export default function Step6Cartoline() {
};
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
</Helmet>
<div className="over-flow-setting">
<Navbar />
<div>
Expand Down
55 changes: 5 additions & 50 deletions src/Pages/Cataloghi/Step4/Step2of4/Step2of4Cataloghi.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import React from "react";
//import Form from "react-bootstrap/Form";
import "./Step2of4Cataloghi.css";
//import Button from "react-bootstrap/Button";
import { Row, Col } from "react-bootstrap";
import ProgressBar from "react-bootstrap/ProgressBar";
import { useState } from "react";
import Navbar from "../../../../Components/Navbar/Navbar";
import { useNavigate } from "react-router-dom";
//import { useSearchParams, useLocation, useParams } from "react-router-dom";
//import axios from "axios";
//import { API_URL } from "../../../../services/client";
//import { SuccessToast } from "../../../../Components/Navbar/Toast/Toast";
import ColonnaSx from "../../../../Components/Colonne/ColonnaSx";
import BreadcrumbBt from "../../../../Components/Footer/BreadcrumbBt";
import {Helmet} from "react-helmet";
export default function Step2of4Cataloghi() {
const navigate = useNavigate();
const now = 60;
Expand All @@ -25,28 +20,9 @@ export default function Step2of4Cataloghi() {

const step4Colore = localStorage.getItem("step4Colore");

//const step4Busta = localStorage.getItem("step4Busta");
//const step4Misure = localStorage.getItem("step4Misure");
//const step4Stampa = localStorage.getItem("step4Stampa");
// const step4peso = localStorage.getItem("step4peso");
//fine variabili da passare tra i vari steps

//const [sendItem, setItem] = useState();

//useEffect(() => {
// setItem(localStorage.getItem("sendoption"));
// });

//const [isChecked1, setIsChecked1] = useState(false);
//const [isChecked2, setIsChecked2] = useState(false);

const [isChecked1, setIsChecked1] = useState(step4Colore == "Bianco/Nero" ? true: false);
const [isChecked2, setIsChecked2] = useState(step4Colore == "Colore" ? true: false);

//const location = useLocation();
//const queryParams = new URLSearchParams(location.search);
//const sendoption = queryParams.get("sendoption");
//console.log("this is ", sendoption);
const handleRoutes = () => {

if (isChecked1){
Expand All @@ -56,41 +32,17 @@ export default function Step2of4Cataloghi() {
localStorage.setItem("step4Colore", "Colore");
}


if (isChecked1 || isChecked2) {
navigate(`/Cataloghi/Step-4-3`);
}
};
async function nextstep() {
try {
/*
const userId = localStorage.getItem("_id");
const LogoPrintQuality= isChecked1
? "Bianco/Nero"
: isChecked2
? "Colore"
: "";
const res = await axios.post(
`${API_URL}/auth/addQA_cataloghi_step4b`,
{
id: userId,
Print_quality_sender_logo:LogoPrintQuality,
}
);
*/

let res = {status:200};
if (res.status === 200) {
//console.log("Sending Option ", sendoption)
//console.log("Sender Logo Print Quality is", LogoPrintQuality);
handleRoutes();
// SuccessToast("updated");
}
handleRoutes();
} catch (error) {
console.log(error);
}
}

const breadcrumbArray = [
{ value: sendoption, url: "/Step-1" },
{ value: step2Quantity, url: "/Step-2" },
Expand All @@ -104,6 +56,9 @@ export default function Step2of4Cataloghi() {

return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
</Helmet>
<div className="over-flow-setting" >
<Navbar />
<div>
Expand Down
Loading

0 comments on commit 15ed5a3

Please sign in to comment.