jovan.cirkovic пре 3 година
родитељ
комит
62a6bc7e43

+ 2
- 2
src/components/About/AboutComponent.js Прегледај датотеку

<AboutComponentContainer ref={ref}> <AboutComponentContainer ref={ref}>
<AboutHeader /> <AboutHeader />
<AboutSection <AboutSection
title={t("about.history.title")}
// title={t("about.history.title")}
text={t("about.history.text")} text={t("about.history.text")}
image={SectionImage1} image={SectionImage1}
/> />
<AboutSection <AboutSection
title={t("about.vision.title")}
// title={t("about.vision.title")}
text={t("about.vision.text")} text={t("about.vision.text")}
image={SectionImage2} image={SectionImage2}
reverse reverse

+ 11
- 11
src/components/About/AboutPageContent.js Прегледај датотеку

import { setAboutRouteSelected } from "../../store/actions/app/appActions"; import { setAboutRouteSelected } from "../../store/actions/app/appActions";
import { AboutPageContainer } from "./AboutPageContent.styled"; import { AboutPageContainer } from "./AboutPageContent.styled";
import AboutComponent from "./AboutComponent"; import AboutComponent from "./AboutComponent";
import PricesComponent from "../Prices/PricesComponent";
// import PricesComponent from "../Prices/PricesComponent";
import PrivacyPolicyComponent from "../PrivacyPolicy/PrivacyPolicyComponent"; import PrivacyPolicyComponent from "../PrivacyPolicy/PrivacyPolicyComponent";
import AboutFooter from "../Footer/AboutFooter"; import AboutFooter from "../Footer/AboutFooter";


const AboutPageContent = () => { const AboutPageContent = () => {
const aboutRef = useRef(null); const aboutRef = useRef(null);
const pricesRef = useRef(null);
// const pricesRef = useRef(null);
const privacyPolicyRef = useRef(null); const privacyPolicyRef = useRef(null);
const dispatch = useDispatch(); const dispatch = useDispatch();
const aboutRouteSelected = useSelector(selectAboutRouteSelected); const aboutRouteSelected = useSelector(selectAboutRouteSelected);
dispatch(setAboutRouteSelected(scrollConstants.about.aboutPage)); dispatch(setAboutRouteSelected(scrollConstants.about.aboutPage));
} }
} }
if (location.state.navigation === scrollConstants.about.pricesPage) {
const yAxis = pricesRef.current.offsetTop;
window.scrollTo({ top: yAxis, behavior: "smooth" });
if (aboutRouteSelected !== scrollConstants.about.pricesPage) {
dispatch(setAboutRouteSelected(scrollConstants.about.pricesPage));
}
}
// if (location.state.navigation === scrollConstants.about.pricesPage) {
// const yAxis = pricesRef.current.offsetTop;
// window.scrollTo({ top: yAxis, behavior: "smooth" });
// if (aboutRouteSelected !== scrollConstants.about.pricesPage) {
// dispatch(setAboutRouteSelected(scrollConstants.about.pricesPage));
// }
// }
if ( if (
location.state.navigation === scrollConstants.about.privacyPolicyPage location.state.navigation === scrollConstants.about.privacyPolicyPage
) { ) {
const listener = () => { const listener = () => {
if ( if (
window.scrollY > window.scrollY >
pricesRef.current.offsetTop - window.innerHeight / 2
privacyPolicyRef.current.offsetTop - window.innerHeight / 2
) { ) {
if ( if (
window.scrollY > window.scrollY >
return ( return (
<AboutPageContainer> <AboutPageContainer>
<AboutComponent ref={aboutRef} id={scrollConstants.about.aboutPage} /> <AboutComponent ref={aboutRef} id={scrollConstants.about.aboutPage} />
<PricesComponent ref={pricesRef} id={scrollConstants.about.pricesPage} />
{/* <PricesComponent ref={pricesRef} id={scrollConstants.about.pricesPage} /> */}
<PrivacyPolicyComponent <PrivacyPolicyComponent
ref={privacyPolicyRef} ref={privacyPolicyRef}
id={scrollConstants.about.privacyPolicyPage} id={scrollConstants.about.privacyPolicyPage}

+ 35
- 15
src/components/Cards/ProfileCard/ProfileCard.js Прегледај датотеку

dispatch(fetchProfileOffers(profileId)); dispatch(fetchProfileOffers(profileId));
}; };


let numberOfExchanges =
profile?.statistics?.exchanges?.failedExchanges +
profile?.statistics?.exchanges?.succeededExchanges;
let numberOfExchanges;
if (
profile?.statistics?.exchanges?.succeededExchanges &&
profile?.statistics?.exchanges?.failedExchanges
) {
numberOfExchanges =
profile?.statistics?.exchanges?.failedExchanges +
profile?.statistics?.exchanges?.succeededExchanges;
} else if (profile?.statistics?.exchanges?.succeededExchanges) {
numberOfExchanges = profile?.statistics?.exchanges?.succeededExchanges;
} else {
numberOfExchanges = 0;
}


let percentOfSucceededExchanges; let percentOfSucceededExchanges;
if (profile?.statistics?.exchanges?.succeededExchanges === 0) {
percentOfSucceededExchanges = 0;
} else {
if (
profile?.statistics?.exchanges?.succeededExchanges &&
profile?.statistics?.exchanges?.failedExchanges
) {
percentOfSucceededExchanges = Math.round( percentOfSucceededExchanges = Math.round(
profile.statistics.exchanges.succeededExchanges /
((profile.statistics.exchanges.succeededExchanges +
profile.statistics.exchanges.failedExchanges) /
profile?.statistics?.exchanges?.succeededExchanges /
((profile?.statistics?.exchanges?.succeededExchanges +
profile?.statistics?.exchanges?.failedExchanges) /
100) 100)
); );
} else if (profile?.statistics?.exchanges?.succeededExchanges) {
percentOfSucceededExchanges = 100;
} else {
percentOfSucceededExchanges = 0;
} }


let percentOfSucceededCommunication; let percentOfSucceededCommunication;
if (profile?.statistics?.exchanges?.succeededCommunication === 0) {
percentOfSucceededCommunication = 0;
} else {
if (
profile?.statistics?.exchanges?.succeededCommunication &&
profile?.statistics?.exchanges?.failedCommunication
) {
percentOfSucceededCommunication = Math.round( percentOfSucceededCommunication = Math.round(
profile.statistics.exchanges.succeededCommunication /
((profile.statistics.exchanges.succeededCommunication +
profile.statistics.exchanges.failedCommunication) /
profile?.statistics?.exchanges?.succeededCommunication /
((profile?.statistics?.exchanges?.succeededCommunication +
profile?.statistics?.exchanges?.failedCommunication) /
100) 100)
); );
} else if (profile?.statistics?.exchanges?.succeededCommunication) {
percentOfSucceededCommunication = 100;
} else {
percentOfSucceededCommunication = 0;
} }


let verifiedUser = let verifiedUser =

+ 10
- 10
src/components/Header/AboutHeader/AboutHeader.js Прегледај датотеку

}, },
}); });
}; };
const navigatePrices = () => {
history.replace({
state: {
clicked: true,
navigation: scrollConstants.about.pricesPage,
},
});
};
// const navigatePrices = () => {
// history.replace({
// state: {
// clicked: true,
// navigation: scrollConstants.about.pricesPage,
// },
// });
// };
const navigatePrivacyPolicy = () => { const navigatePrivacyPolicy = () => {
history.replace({ history.replace({
state: { state: {
> >
{t("about.header.navigation")} {t("about.header.navigation")}
</LinkRoute> </LinkRoute>
<LinkRoute
{/* <LinkRoute
selected={aboutRouteSelected === scrollConstants.about.pricesPage} selected={aboutRouteSelected === scrollConstants.about.pricesPage}
onClick={navigatePrices} onClick={navigatePrices}
> >
{t("prices.header.navigation")} {t("prices.header.navigation")}
</LinkRoute>
</LinkRoute> */}
<LinkRoute <LinkRoute
selected={ selected={
aboutRouteSelected === scrollConstants.about.privacyPolicyPage aboutRouteSelected === scrollConstants.about.privacyPolicyPage

+ 2
- 2
src/components/Popovers/MyProfile/MyProfile.js Прегледај датотеку

import LogoutButton from "./LogoutButton/LogoutButton"; import LogoutButton from "./LogoutButton/LogoutButton";
import AboutButton from "./AboutButton/AboutButton"; import AboutButton from "./AboutButton/AboutButton";
import PrivacyPolicyButton from "./PrivacyPolicyButton/PrivacyPolicyButton"; import PrivacyPolicyButton from "./PrivacyPolicyButton/PrivacyPolicyButton";
import PricesButton from "./PricesButton/PricesButton";
// import PricesButton from "./PricesButton/PricesButton";
import { ADMIN_HOME_PAGE, PROFILE_PAGE } from "../../../constants/pages"; import { ADMIN_HOME_PAGE, PROFILE_PAGE } from "../../../constants/pages";
import { import {
dynamicRouteMatches, dynamicRouteMatches,
adminButtonOnClick={() => goToAdminHome()} adminButtonOnClick={() => goToAdminHome()}
> >
<GrayButtonsContainer> <GrayButtonsContainer>
<PricesButton closePopover={props.closePopover} />
{/* <PricesButton closePopover={props.closePopover} /> */}
<AboutButton closePopover={props.closePopover} /> <AboutButton closePopover={props.closePopover} />
<PrivacyPolicyButton closePopover={props.closePopover} /> <PrivacyPolicyButton closePopover={props.closePopover} />
</GrayButtonsContainer> </GrayButtonsContainer>

+ 5
- 5
src/components/PrivacyPolicy/PrivacyPolicyComponent.js Прегледај датотеку

import PropTypes from "prop-types"; import PropTypes from "prop-types";
import PrivacyPolicyHeader from "./PrivacyPolicyHeader/PrivacyPolicyHeader"; import PrivacyPolicyHeader from "./PrivacyPolicyHeader/PrivacyPolicyHeader";
import { PrivacyPolicyContainer } from "./PrivacyPolicyComponent.styled"; import { PrivacyPolicyContainer } from "./PrivacyPolicyComponent.styled";
import PrivacyPolicySection from "./PrivacyPolicySection/PrivacyPolicySection";
import { useTranslation } from "react-i18next";
// import PrivacyPolicySection from "./PrivacyPolicySection/PrivacyPolicySection";
// import { useTranslation } from "react-i18next";


const PrivacyPolicyComponent = forwardRef((props, ref) => { const PrivacyPolicyComponent = forwardRef((props, ref) => {
const { t } = useTranslation();
// const { t } = useTranslation();
return ( return (
<PrivacyPolicyContainer id={props.id} ref={ref}> <PrivacyPolicyContainer id={props.id} ref={ref}>
<PrivacyPolicyHeader /> <PrivacyPolicyHeader />
<PrivacyPolicySection
{/* <PrivacyPolicySection
title={t("privacyPolicy.firstSection.title")} title={t("privacyPolicy.firstSection.title")}
text={t("privacyPolicy.firstSection.text")} text={t("privacyPolicy.firstSection.text")}
/> />
<PrivacyPolicySection <PrivacyPolicySection
title={t("privacyPolicy.forthSection.title")} title={t("privacyPolicy.forthSection.title")}
text={t("privacyPolicy.forthSection.text")} text={t("privacyPolicy.forthSection.text")}
/>
/> */}
</PrivacyPolicyContainer> </PrivacyPolicyContainer>
); );
}); });

+ 9
- 3
src/components/PrivacyPolicy/PrivacyPolicyHeader/PrivacyPolicyHeader.js Прегледај датотеку

import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { PrivacyPolicyContainer } from "../../../pages/PrivacyPolicy/PrivacyPolicyPage.styled"; import { PrivacyPolicyContainer } from "../../../pages/PrivacyPolicy/PrivacyPolicyPage.styled";
import { PrivacyPolicyHeaderLine, PrivacyPolicyHeaderParagraph, PrivacyPolicyHeaderTitle } from "./PrivacyPolicyHeader.styled";
import {
PrivacyPolicyHeaderLine,
// PrivacyPolicyHeaderParagraph,
PrivacyPolicyHeaderTitle,
} from "./PrivacyPolicyHeader.styled";


const PrivacyPolicyHeader = () => { const PrivacyPolicyHeader = () => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<PrivacyPolicyContainer> <PrivacyPolicyContainer>
<PrivacyPolicyHeaderTitle>{t("privacyPolicy.header.title")}</PrivacyPolicyHeaderTitle>
<PrivacyPolicyHeaderTitle>
{t("privacyPolicy.header.title")}
</PrivacyPolicyHeaderTitle>
<PrivacyPolicyHeaderLine /> <PrivacyPolicyHeaderLine />
<PrivacyPolicyHeaderParagraph>{t("privacyPolicy.header.paragraph")}</PrivacyPolicyHeaderParagraph>
{/* <PrivacyPolicyHeaderParagraph>{t("privacyPolicy.header.paragraph")}</PrivacyPolicyHeaderParagraph> */}
</PrivacyPolicyContainer> </PrivacyPolicyContainer>
); );
}; };

+ 35
- 15
src/components/ProfileMini/ProfileMini.js Прегледај датотеку

return false; return false;
}, [offer, userId]); }, [offer, userId]);


let numberOfExchanges =
offer?.user?.statistics?.exchanges?.failedExchanges +
offer?.user?.statistics?.exchanges?.succeededExchanges;
let numberOfExchanges;
if (
offer?.user?.statistics?.exchanges?.succeededExchanges &&
offer?.user?.statistics?.exchanges?.failedExchanges
) {
numberOfExchanges =
offer?.user?.statistics?.exchanges?.failedExchanges +
offer?.user?.statistics?.exchanges?.succeededExchanges;
} else if (offer?.user?.statistics?.exchanges?.succeededExchanges) {
numberOfExchanges = offer?.user?.statistics?.exchanges?.succeededExchanges;
} else {
numberOfExchanges = 0;
}


let percentOfSucceededExchanges; let percentOfSucceededExchanges;
if (offer?.user?.statistics?.exchanges?.succeededExchanges === 0) {
percentOfSucceededExchanges = 0;
} else {
if (
offer?.user?.statistics?.exchanges?.succeededExchanges &&
offer?.user?.statistics?.exchanges?.failedExchanges
) {
percentOfSucceededExchanges = Math.round( percentOfSucceededExchanges = Math.round(
offer?.user?.statistics.exchanges.succeededExchanges /
((offer?.user?.statistics.exchanges.succeededExchanges +
offer?.user?.statistics.exchanges.failedExchanges) /
offer?.user?.statistics?.exchanges?.succeededExchanges /
((offer?.user?.statistics?.exchanges?.succeededExchanges +
offer?.user?.statistics?.exchanges?.failedExchanges) /
100) 100)
); );
} else if (offer?.user?.statistics?.exchanges?.succeededExchanges) {
percentOfSucceededExchanges = 100;
} else {
percentOfSucceededExchanges = 0;
} }


let percentOfSucceededCommunication; let percentOfSucceededCommunication;
if (offer?.user?.statistics?.exchanges?.succeededCommunication === 0) {
percentOfSucceededCommunication = 0;
} else {
if (
offer?.user?.statistics?.exchanges?.succeededCommunication &&
offer?.user?.statistics?.exchanges?.failedCommunication
) {
percentOfSucceededCommunication = Math.round( percentOfSucceededCommunication = Math.round(
offer?.user?.statistics.exchanges.succeededCommunication /
((offer?.user?.statistics.exchanges.succeededCommunication +
offer?.user?.statistics.exchanges.failedCommunication) /
offer?.user?.statistics?.exchanges?.succeededCommunication /
((offer?.user?.statistics?.exchanges?.succeededCommunication +
offer?.user?.statistics?.exchanges?.failedCommunication) /
100) 100)
); );
} else if (offer?.user?.statistics?.exchanges?.succeededCommunication) {
percentOfSucceededCommunication = 100;
} else {
percentOfSucceededCommunication = 0;
} }


let verifiedUser = let verifiedUser =

+ 6
- 5
src/i18n/resources/rs.js Прегледај датотеку

websiteError: "Unesite ispravnu adresu svog website!", websiteError: "Unesite ispravnu adresu svog website!",
websiteRequired: "Website je obavezan!", websiteRequired: "Website je obavezan!",
companyNameError: "Naziv kompanije je zauzet!", companyNameError: "Naziv kompanije je zauzet!",
acceptTermsCheckbox: "Saglasan sam sa pravima privatnosti",
}, },
forgotPassword: { forgotPassword: {
title: "Povrati lozinku", title: "Povrati lozinku",
}, },
about: { about: {
header: { header: {
title: "O Trampi",
navigation: "O nama",
title: "Priča o Trampi",
navigation: "Šta je Trampa?",
paragraph: paragraph:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac augue tortor. Nulla facilisi. Cras vestibulum risus eget tincidunt egestas. Duis blandit enim sit amet dui vehicula luctus. Suspendisse id blandit arcu, vitae consequat nisi. Duis ut vestibulum tellus. Curabitur eu fringilla nisi.",
"Znate ono kada smo bili mali pa je najveću radost u školi predstavljalo menjanje sličica na odmoru? Trampa je upravo to, samo što sada više nismo đaci u školi već poslovni, odrasli, ljudi.",
}, },
history: { history: {
title: "Istorija", title: "Istorija",
text: "Suspendisse non semper ligula. Nam nec neque non justo vehicula hendrerit vel ut ligula. Pellentesque venenatis leo at nisl facilisis euismod. Quisque at cursus quam. Praesent gravida metus erat, nec tempus nibh accumsan sed. Duis non ornare ipsum. Suspendisse justo metus, cursus eget efficitur vitae, imperdiet id neque. Ut vel commodo nunc. Morbi iaculis, arcu in commodo sollicitudin, est nisl feugiat mi, euismod accumsan odio ligula nec diam. Vestibulum eros est, ornare et varius sit amet, placerat sed nibh. Mauris elementum rutrum feugiat. Quisque consectetur, dui sed pharetra eleifend, augue nibh rhoncus felis, et feugiat tortor felis blandit dui. Ut gravida lacinia feugiat. In hac habitasse platea dictumst. Mauris cursus lectus ac libero ultrices lacinia. Sed vel nibh tincidunt, tristique arcu fermentum, sollicitudin lorem.",
text: "Ideja o Trampi je sinula sasvim spontano. Mladen i ja smo prijatelji iz detinjstva koji su nekada bili profesionalni latino plesači koje su kasnije drugačija životna interesovanja odvela na različite strane pa je tako Mladen otišao u preduzetnike, a ja u programere. Međutim, Trampa je učinila da nas dvoje opet budemo partneri, samo ovog puta ne plesni već poslovni. Zbog prirode biznisa kojim se Mladenova porodica bavi, neretko se desi da neke stvari ostanu da, žargonski rečeno, čuče u skladištu duži period. Neretko je to prehrambena roba i prave se veliki gubitci u samom poslovanju. Upravo se tu javila ideja o Trampi. Trampa je mesto gde rečenica ‘jedna strana u pregovorima uvek izlazi kao gubitnik’ jednostavno gubi smisao jer sa Trampom obe strane koje učestvuju pobeđuju!",
}, },
vision: { vision: {
title: "Naša vizija", title: "Naša vizija",
text: "Aenean ut risus faucibus, tempor urna id, luctus urna. Nam placerat scelerisque hendrerit. Nam tortor augue, porta sed nulla vitae, rutrum rhoncus arcu. Ut in leo turpis. Pellentesque eu laoreet orci. Nam id nisi mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer nulla leo, consequat a lacus in, sollicitudin sollicitudin ex. Nunc blandit tincidunt turpis nec vestibulum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Morbi tincidunt ipsum eget velit venenatis, quis sollicitudin nulla dapibus.",
text: "Predmet Trampe nije kupovina već razmena, dakle nema novčane nadoknade, sve se bazira na robnoj/uslužnoj razmeni.Trampa je razvijena sa idejom da Vaša roba nađe novu upotrebnu vrednost kod svog novog vlasnika ujedno zadovoljavajući vaše potrebe.",
}, },
searchOffers: "Pretražite oglase", searchOffers: "Pretražite oglase",
}, },

+ 17
- 6
src/pages/RegisterPages/Register/ThirdPart/ThirdPartOfRegistration.js Прегледај датотеку

import React, { useEffect } from "react";
import React, { useEffect, useState } from "react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { import {
CheckboxInput,
CheckboxInputContainer,
CheckboxInputText,
FormContainer, FormContainer,
// RegisterDescription, // RegisterDescription,
} from "./ThirdPartOfRegistration.styled"; } from "./ThirdPartOfRegistration.styled";
import { PrimaryAnimatedButton } from "../../../../components/Styles/globalStyleComponents"; import { PrimaryAnimatedButton } from "../../../../components/Styles/globalStyleComponents";


const ThirdPartOfRegistration = (props) => { const ThirdPartOfRegistration = (props) => {
const [checkboxValue, setCheckboxValue] = useState(false);
const { t } = useTranslation(); const { t } = useTranslation();
const locations = useSelector(selectLocations); const locations = useSelector(selectLocations);
const dispatch = useDispatch(); const dispatch = useDispatch();
console.log(checkboxValue);
useEffect(() => { useEffect(() => {
dispatch(fetchLocations()); dispatch(fetchLocations());
}, []); }, []);
{/* <RegisterDescription component="p" variant="p"> {/* <RegisterDescription component="p" variant="p">
{t("register.descriptionThird")} {t("register.descriptionThird")}
</RegisterDescription> */} </RegisterDescription> */}

<TextField <TextField
name="phoneNumber" name="phoneNumber"
placeholder={t("common.labelPhone")} placeholder={t("common.labelPhone")}
: Math.max(0, parseInt(e.target.value)).toString().slice(0, 14); : Math.max(0, parseInt(e.target.value)).toString().slice(0, 14);
}} }}
/> />

<AutoSuggestTextField <AutoSuggestTextField
placeholder={t("common.labelLocation")} placeholder={t("common.labelLocation")}
data={locations.map((item) => ({ name: item.city }))} data={locations.map((item) => ({ name: item.city }))}
formik.setFieldValue("location", newValue) formik.setFieldValue("location", newValue)
} }
/> />

<TextField <TextField
name="website" name="website"
placeholder={t("common.labelWebsite")} placeholder={t("common.labelWebsite")}
helperText={formik.touched.website && formik.errors.website} helperText={formik.touched.website && formik.errors.website}
fullWidth fullWidth
/> />
<CheckboxInputContainer>
<CheckboxInput onClick={() => setCheckboxValue(!checkboxValue)} />
<CheckboxInputText>
{t("register.acceptTermsCheckbox")}
</CheckboxInputText>
</CheckboxInputContainer>


<ErrorMessage formik={formik} /> <ErrorMessage formik={formik} />

<PrimaryAnimatedButton <PrimaryAnimatedButton
type="submit" type="submit"
variant="contained" variant="contained"
fullWidth fullWidth
textcolor="white" textcolor="white"
isLoading={props.isLoading} isLoading={props.isLoading}
disabled={
formik.values.phoneNumber.length === 0 ||
formik.values.location.length === 0 ||
!checkboxValue
}
> >
{t("common.continue")} {t("common.continue")}
</PrimaryAnimatedButton> </PrimaryAnimatedButton>

+ 14
- 1
src/pages/RegisterPages/Register/ThirdPart/ThirdPartOfRegistration.styled.js Прегледај датотеку

import { Typography } from "@mui/material";
import { Typography, Checkbox, Box } from "@mui/material";
import styled from "styled-components"; import styled from "styled-components";
import selectedTheme from "../../../../themes"; import selectedTheme from "../../../../themes";


margin-top: 14px; margin-top: 14px;
} }
`; `;

export const CheckboxInputContainer = styled(Box)`
display: flex;
align-items: center;
margin: -5px 0 10px -5px;
`;

export const CheckboxInput = styled(Checkbox)``;

export const CheckboxInputText = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont};
font-size: 14px;
`;

+ 1
- 1
src/validations/editProfileValidation.js Прегледај датотеку

i18n.t("editProfile.labelLocationValid") i18n.t("editProfile.labelLocationValid")
) )
.required(i18n.t("register.labelLocationRequired")), .required(i18n.t("register.labelLocationRequired")),
firmWebsite: Yup.string().required(i18n.t("register.websiteRequired")),
firmWebsite: Yup.string(),
// firmApplink: Yup.string(), // firmApplink: Yup.string(),
firmPhone: Yup.string() firmPhone: Yup.string()
.min(6, i18n.t("editProfile.labelPhoneValid")) .min(6, i18n.t("editProfile.labelPhoneValid"))

+ 5
- 6
src/validations/registerValidations/thirdPartValidation.js Прегледај датотеку

i18n.t("register.labelLocationValid") i18n.t("register.labelLocationValid")
) )
.required(i18n.t("register.labelLocationRequired")), .required(i18n.t("register.labelLocationRequired")),
website: Yup.string()
.matches(
/^((ftp|http|https):\/\/)?(www.)?(?!.*(ftp|http|https|www.))[a-zA-Z0-9_-]+(\.[a-zA-Z]+)+((\/)[\w#]+)*(\/\w+\?[a-zA-Z0-9_]+=\w+(&[a-zA-Z0-9_]+=\w+)*)?$/gm,
i18n.t("register.websiteError")
)
.required(i18n.t("register.websiteRequired")),
website: Yup.string().matches(
/^((ftp|http|https):\/\/)?(www.)?(?!.*(ftp|http|https|www.))[a-zA-Z0-9_-]+(\.[a-zA-Z]+)+((\/)[\w#]+)*(\/\w+\?[a-zA-Z0-9_]+=\w+(&[a-zA-Z0-9_]+=\w+)*)?$/gm,
i18n.t("register.websiteError")
),
// .required(i18n.t("register.websiteRequired")),
}); });

Loading…
Откажи
Сачувај