Djordje Mitrovic 3 年前
父节点
当前提交
60b50d497d

+ 6
- 4
src/components/Cards/ProfileCard/BlockedProfile/BlockedProfile.styled.js 查看文件

@@ -15,8 +15,9 @@ export const BlockedProfileText = styled(Typography)`
font-size: 12px;
line-height: 16px;
font-family: ${selectedTheme.fonts.textFont};
color: ${(props) =>
props.redText ? selectedTheme.colors.blockedColor : "white"};
/* color: ${(props) =>
props.redText ? selectedTheme.colors.blockedColor : "white"}; */
color: ${selectedTheme.colors.blockedTextColor};
`;
export const BlockedContainer = styled(Box)`
display: flex;
@@ -43,7 +44,8 @@ export const BlockedIcon = styled(Block)`
left: -2px;
}
& path {
stroke: ${(props) =>
props.redText ? selectedTheme.colors.blockedColor : "white"};
/* stroke: ${(props) =>
props.redText ? selectedTheme.colors.blockedColor : "white"}; */
stroke: ${selectedTheme.colors.blockedTextColor};
}
`;

+ 2
- 0
src/components/Cards/ProfileCard/ProfileCard.js 查看文件

@@ -233,12 +233,14 @@ const ProfileCard = (props) => {
isMyProfile={
(!props.isAdmin && profile?._blocked) || isMyProfile
}
isBlocked={!props.isAdmin && profile?._blocked}
/>
</ProfileInfoAndContactContainer>
{/* Profile Stats */}
<ProfileStats
profile={profile}
percentOfSucceededExchanges={percentOfSucceededExchanges}
isBlocked={!props.isAdmin && profile?._blocked}
/>
</ProfileInfoContainer>
</ProfileCardWrapper>

+ 2
- 1
src/components/Cards/ProfileCard/ProfileCard.styled.js 查看文件

@@ -39,7 +39,8 @@ export const EditButton = styled(Box)`
width: 40px;
height: 40px;
font-weight: 900;
background: ${selectedTheme.colors.primaryIconBackgroundColor};
background: ${(props) =>
props.disabled ? "white" : selectedTheme.colors.primaryIconBackgroundColor};
border-radius: 360px;
padding: 0.45rem 0.45rem 0.27rem 0.57rem;
cursor: ${(props) => !props.disabled && `pointer`};

+ 4
- 0
src/components/Cards/ProfileCard/ProfileContact/ProfileContact.js 查看文件

@@ -27,6 +27,7 @@ const ProfileContact = (props) => {
isAdmin={props.isAdmin}
isMyProfile={props.isMyProfile}
variant="subtitle2"
isBlocked={props.isBlocked}
>
{props.profile?.company?.contacts?.location}
</ContactItem>
@@ -39,6 +40,7 @@ const ProfileContact = (props) => {
isAdmin={props.isAdmin}
isMyProfile={props.isMyProfile}
variant="subtitle2"
isBlocked={props.isBlocked}
>
{props.profile?.email}
</ContactItem>
@@ -51,6 +53,7 @@ const ProfileContact = (props) => {
isAdmin={props.isAdmin}
isMyProfile={props.isMyProfile}
variant="subtitle2"
isBlocked={props.isBlocked}
>
{props.profile?.company?.contacts?.web}
</ContactItem>
@@ -66,6 +69,7 @@ ProfileContact.propTypes = {
children: PropTypes.node,
isAdmin: PropTypes.bool,
bigProfileCard: PropTypes.bool,
isBlocked: PropTypes.bool,
};

export default ProfileContact;

+ 4
- 1
src/components/Cards/ProfileCard/ProfileContact/ProfileContact.styled.js 查看文件

@@ -45,7 +45,10 @@ export const ContactItem = styled(Typography)`
margin-right: 2rem;
margin-left: 0.4rem;
color: ${(props) =>
props.isMyProfile ? "white" : selectedTheme.colors.primaryDarkText};
props.isMyProfile && !props.isBlocked
? "white"
: selectedTheme.colors.primaryDarkText};
/* color: ${selectedTheme.colors.primaryDarkText}; */
display: unset;
font-family: ${selectedTheme.fonts.textFont};
letter-spacing: 0.02em;

+ 1
- 0
src/components/Cards/ProfileCard/ProfileMainInfo/ProfileMainInfo.js 查看文件

@@ -69,6 +69,7 @@ const ProfileMainInfo = (props) => {
<PocketIcon />
<ProfilePIB
isMyProfile={props?.isBlocked || props.isMyProfile}
isBlocked={props.isBlocked}
variant="subtitle2"
>
{t("profile.PIB")} {props.profile?.company?.PIB}

+ 5
- 2
src/components/Cards/ProfileCard/ProfileMainInfo/ProfileMainInfo.styled.js 查看文件

@@ -70,7 +70,7 @@ export const ProfileMainInfoGrid = styled(Grid)`
export const ProfileName = styled(Typography)`
color: ${(props) =>
props.isBlocked
? "white"
? selectedTheme.colors.primaryPurple
: props.isMyProfile
? selectedTheme.colors.primaryYellow
: selectedTheme.colors.primaryPurple};
@@ -131,7 +131,10 @@ export const PocketIcon = styled(Pocket)`
`;
export const ProfilePIB = styled(Typography)`
color: ${(props) =>
props.isMyProfile ? "white" : selectedTheme.colors.primaryDarkText};
props.isMyProfile && !props.isBlocked
? "white"
: selectedTheme.colors.primaryDarkText};
/* color: ${selectedTheme.colors.primaryDarkText}; */
margin-top: 0.18rem;
font-family: ${selectedTheme.fonts.textFont};
font-size: 16px;

+ 6
- 1
src/components/Cards/ProfileCard/ProfileStats/ProfileStats.js 查看文件

@@ -10,7 +10,11 @@ import { useTranslation } from "react-i18next";
const ProfileStats = (props) => {
const { t } = useTranslation();
return (
<ProfileStatsContainer className={props.className} twoRows={props.twoRows}>
<ProfileStatsContainer
className={props.className}
twoRows={props.twoRows}
isBlocked={props.isBlocked}
>
<ProfileStatsGrid>
<StatsItem variant="subtitle2">
<b>{props.profile?.statistics?.publishes?.count}</b>
@@ -41,6 +45,7 @@ ProfileStats.propTypes = {
percentOfSucceededExchanges: PropTypes.number,
className: PropTypes.string,
twoRows: PropTypes.bool,
isBlocked: PropTypes.bool,
};

export default ProfileStats;

+ 4
- 1
src/components/Cards/ProfileCard/ProfileStats/ProfileStats.styled.js 查看文件

@@ -6,7 +6,10 @@ export const ProfileStatsContainer = styled(Grid)`
display: flex;
justify-content: start;
flex-direction: row;
background: ${selectedTheme.colors.primaryDarkTextSecond};
background: ${(props) =>
props.isBlocked
? selectedTheme.colors.borderNormal
: selectedTheme.colors.primaryDarkTextSecond};
width: calc(100% + 36px);
padding-top: 18px;
padding-bottom: 18px;

+ 10
- 10
src/components/Modals/EditCategory/EditCategory.js 查看文件

@@ -5,16 +5,16 @@ import {
ButtonsContainer,
CategoryTitleField,
EditCategoryContainer,
EditCategoryImagePicker,
// EditCategoryImagePicker,
EditCategoryTitle,
FieldLabel,
InputContainer,
SaveButton,
SupportedFormats,
// SupportedFormats,
XIcon,
} from "./EditCategory.styled";
import { useState } from "react";
import { Trans, useTranslation } from "react-i18next";
import { useTranslation } from "react-i18next";
import { useFormik } from "formik";
import { useMemo } from "react";
import { useDispatch } from "react-redux";
@@ -26,7 +26,7 @@ const EditCategory = (props) => {
const { t } = useTranslation();
const dispatch = useDispatch();
const [clickedOnNext, setClickedOnNext] = useState(false);
const setImage = useState("")[1];
// const setImage = useState("")[1];
const inputRef = useRef(null);
const title = useMemo(() => {
return t(`admin.${props.type}.${props.method}.title`);
@@ -46,10 +46,10 @@ const EditCategory = (props) => {
const secondButtonText = useMemo(() => {
return t(`admin.${props.type}.${props.method}.save`);
}, [props.type, props.method]);
const setImageHandler = (image) => {
setImage(image);
formik.setFieldValue("image", image);
};
// const setImageHandler = (image) => {
// setImage(image);
// formik.setFieldValue("image", image);
// };

const closeModalHandler = () => {
dispatch(closeModal());
@@ -96,14 +96,14 @@ const EditCategory = (props) => {
<EditCategoryContainer hideImagePicker={props.hideImagePicker}>
<XIcon onClick={closeModalHandler} />
<EditCategoryTitle>{title}</EditCategoryTitle>
{!props.hideImagePicker && (
{/* {!props.hideImagePicker && (
<>
<EditCategoryImagePicker setImage={setImageHandler} singleImage />
<SupportedFormats>
<Trans i18nKey="offer.supportedImagesFormats" />
</SupportedFormats>
</>
)}
)} */}
<InputContainer hideImagePicker={props.hideImagePicker}>
<FieldLabel leftText={fieldLabel} />
<CategoryTitleField

+ 4
- 4
src/components/Modals/EditCategory/EditCategory.styled.js 查看文件

@@ -10,9 +10,9 @@ import { ReactComponent as X } from "../../../assets/images/svg/plus.svg";
export const EditCategoryContainer = styled(Box)`
position: fixed;
width: 623px;
height: ${(props) => (props.hideImagePicker ? "296px" : "510px")};
/* height: ${(props) => (props.hideImagePicker ? "296px" : "510px")}; */
top: ${(props) =>
props.hideImagePicker ? "calc(50vh - 148px)" : "calc(50vh - 255px)"};
props.hideImagePicker ? "calc(50vh - 148px)" : "calc(50vh - 146.5px)"};
left: calc(50vw - 311px);

background: white;
@@ -23,10 +23,10 @@ export const EditCategoryContainer = styled(Box)`
}
@media (max-width: 600px) {
width: 350px;
height: ${(props) => (props.hideImagePicker ? "207px" : "412px")};
/* height: ${(props) => (props.hideImagePicker ? "207px" : "412px")}; */
left: calc(50vw - 175px);
top: ${(props) =>
props.hideImagePicker ? "calc(50vh - 103px)" : "calc(50vh - 206px)"};
props.hideImagePicker ? "calc(50vh - 103px)" : "calc(50vh - 111px)"};
}
`;
export const EditCategoryTitle = styled(Typography)`

+ 1
- 0
src/components/UserReviews/NoReviews/UserReviewsSkeleton/UserReviewsSkeleton.styled.js 查看文件

@@ -35,6 +35,7 @@ export const UserReviewsSkeletonContainer = styled(Box)`
`;
export const UserReviewsSkeletonItemsContainer = styled(Box)`
width: 100%;
padding: 18px 0;
`;
export const UserReviewsSkeletonLine = styled(Box)`
display: flex;

+ 2
- 2
src/request/apiEndpoints.js 查看文件

@@ -213,7 +213,7 @@ export default {
deleteLocation: "admin/locations/{locationId}",
},
reviews: {
getUserReviewsAsAdmin: 'admin/reviews/{userId}'
}
getUserReviewsAsAdmin: "admin/reviews/{userId}",
},
},
};

+ 3
- 2
src/themes/primaryTheme/primaryThemeColors.js 查看文件

@@ -37,6 +37,7 @@ export const primaryThemeColors = {
filterSkeletonItemsSecond: "#DDDDDD",
staticBackgroundColor: "#F3EFF8",
stepProgressAltColor: "#F4F4F4",
blockedColor: "#EE3A3A",
errorColor: "#d32f2f"
blockedColor: "#E4E4E4",
blockedTextColor: "#D13333",
errorColor: "#d32f2f",
};

正在加载...
取消
保存