| padding: 18px; | padding: 18px; | ||||
| max-width: 2000px; | max-width: 2000px; | ||||
| position: relative; | position: relative; | ||||
| width: auto; | |||||
| ${(props) => !props.previewCard && `height: 654px;`} | ${(props) => !props.previewCard && `height: 654px;`} | ||||
| /* height: 654px; */ | /* height: 654px; */ | ||||
| /* padding-bottom: 70px; */ | /* padding-bottom: 70px; */ |
| position: relative; | position: relative; | ||||
| width: ${(props) => props.width || `min-content`}; | width: ${(props) => props.width || `min-content`}; | ||||
| height: ${(props) => props.height || `57px`}; | height: ${(props) => props.height || `57px`}; | ||||
| /* max-width: 350px; | |||||
| overflow: hidden; | |||||
| white-space: nowrap; | |||||
| display: inline-block; | |||||
| text-overflow: ellipsis; */ | |||||
| padding: 18px; | padding: 18px; | ||||
| `; | `; | ||||
| export const LabeledCardIconContainer = styled(Box)` | export const LabeledCardIconContainer = styled(Box)` |
| : selectedTheme.coloros.primaryText}; | : selectedTheme.coloros.primaryText}; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| font-size: 14px; | font-size: 14px; | ||||
| width: 260px; | |||||
| max-width: 260px; | |||||
| } | } | ||||
| `; | `; | ||||
| <LocationIcon /> | <LocationIcon /> | ||||
| </DetailIcon> | </DetailIcon> | ||||
| <DetailText ismyprofile={props.isMyProfile}> | <DetailText ismyprofile={props.isMyProfile}> | ||||
| {offer.offer.location.city} | |||||
| {offer.offer?.location?.city} | |||||
| </DetailText> | </DetailText> | ||||
| </DetailContainer> | </DetailContainer> | ||||
| ); | ); |
| font-size: 16px; | font-size: 16px; | ||||
| white-space: nowrap; | white-space: nowrap; | ||||
| line-height: 21px; | line-height: 21px; | ||||
| max-width: 350px; | |||||
| overflow: hidden; | |||||
| white-space: nowrap; | |||||
| display: inline-block; | |||||
| text-overflow: ellipsis; | |||||
| color: ${selectedTheme.colors.primaryPurple}; | color: ${selectedTheme.colors.primaryPurple}; | ||||
| `; | `; | ||||
| export const ReassuranceText = styled(Typography)` | export const ReassuranceText = styled(Typography)` |
| addSubcategory: "Dodaj podkategoriju", | addSubcategory: "Dodaj podkategoriju", | ||||
| cancel: "Otkaži", | cancel: "Otkaži", | ||||
| delete: "Obriši", | delete: "Obriši", | ||||
| goBack: "Nazad na sve kategorije", | |||||
| reassuranceDelete: | reassuranceDelete: | ||||
| "Da li ste sigurni da želite da obrišete odabranu podkategoriju?", | "Da li ste sigurni da želite da obrišete odabranu podkategoriju?", | ||||
| edit: { | edit: { |
| > | > | ||||
| {props.children} | {props.children} | ||||
| <ContentRightCardContainer> | <ContentRightCardContainer> | ||||
| <Content item>{props.content}</Content> | |||||
| <RightCard item singleOffer={props.singleOffer} profile={props.profile}> | |||||
| <Content lg={5} item>{props.content}</Content> | |||||
| <RightCard lg={7} item singleOffer={props.singleOffer} profile={props.profile}> | |||||
| {props.rightCard} | {props.rightCard} | ||||
| </RightCard> | </RightCard> | ||||
| </ContentRightCardContainer> | </ContentRightCardContainer> |
| /* padding-left: 36px; */ | /* padding-left: 36px; */ | ||||
| /* padding-right: ${(props) => (props.singleOffer ? "76px" : 0)}; */ | /* padding-right: ${(props) => (props.singleOffer ? "76px" : 0)}; */ | ||||
| margin: 0; | margin: 0; | ||||
| width: 100vw; | |||||
| width: calc(100vw - 17px); | |||||
| max-width: 100vw; | max-width: 100vw; | ||||
| /* display: flex; */ | /* display: flex; */ | ||||
| position: relative; | position: relative; |
| AdminSubcategoriesHeader, | AdminSubcategoriesHeader, | ||||
| AdminSubcategoriesPageContainer, | AdminSubcategoriesPageContainer, | ||||
| AdminSubcategoriesSearchField, | AdminSubcategoriesSearchField, | ||||
| ButtonContainer, | |||||
| HeaderText, | |||||
| NewSubcategoryButton, | NewSubcategoryButton, | ||||
| SponsoredCategoryCard, | SponsoredCategoryCard, | ||||
| SubcategoriesList, | SubcategoriesList, | ||||
| import useSorting from "../../../hooks/useOffers/useSorting"; | import useSorting from "../../../hooks/useOffers/useSorting"; | ||||
| import { sortCategoriesEnum } from "../../../enums/sortEnum"; | import { sortCategoriesEnum } from "../../../enums/sortEnum"; | ||||
| import { adminSortMethod } from "../../../util/helpers/adminSortHelper"; | import { adminSortMethod } from "../../../util/helpers/adminSortHelper"; | ||||
| import { ArrowButton } from "../../../components/Buttons/ArrowButton/ArrowButton"; | |||||
| import history from "../../../store/utils/history"; | |||||
| const AdminSubcategoriesPage = () => { | const AdminSubcategoriesPage = () => { | ||||
| const { t } = useTranslation(); | const { t } = useTranslation(); | ||||
| return []; | return []; | ||||
| }, [category, manualSearchString, sorting.selectedSortOptionLocally]); | }, [category, manualSearchString, sorting.selectedSortOptionLocally]); | ||||
| console.log("subc", categories); | console.log("subc", categories); | ||||
| const goBack = () => { | |||||
| history.goBack(); | |||||
| }; | |||||
| return ( | return ( | ||||
| <> | <> | ||||
| handleSearch={handleSearch} | handleSearch={handleSearch} | ||||
| placeholder={t("admin.subcategories.placeholder")} | placeholder={t("admin.subcategories.placeholder")} | ||||
| /> | /> | ||||
| <ButtonContainer onClick={goBack}> | |||||
| <ArrowButton side={"left"}></ArrowButton> | |||||
| <HeaderText>{t("admin.subcategories.goBack")}</HeaderText> | |||||
| </ButtonContainer> | |||||
| <AdminSubcategoriesHeader | <AdminSubcategoriesHeader | ||||
| hideSorting | hideSorting | ||||
| myOffers | myOffers |
| import { Box } from "@mui/material"; | |||||
| import { Box, Link, Typography } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| import { PrimaryButton } from "../../../components/Buttons/PrimaryButton/PrimaryButton"; | import { PrimaryButton } from "../../../components/Buttons/PrimaryButton/PrimaryButton"; | ||||
| import CategoryCard from "../../../components/Cards/CategoryCard/CategoryCard"; | import CategoryCard from "../../../components/Cards/CategoryCard/CategoryCard"; | ||||
| export const AdminSubcategoriesHeader = styled(Header)` | export const AdminSubcategoriesHeader = styled(Header)` | ||||
| top: 4px; | top: 4px; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| top: -10px; | |||||
| height: 10px; | |||||
| top: -65px; | |||||
| &:nth-child(4) { | |||||
| top: 4px; | |||||
| & div:nth-child(2) { | |||||
| margin-top: 0; | |||||
| } | |||||
| } | |||||
| margin-top: 18px; | margin-top: 18px; | ||||
| & div { | |||||
| & > div:nth-child(1) { | |||||
| margin-top: 10px; | margin-top: 10px; | ||||
| } | } | ||||
| & div div:nth-child(1) { | |||||
| & div div:nth-child(2) { | |||||
| top: 22px; | top: 22px; | ||||
| } | } | ||||
| } | } | ||||
| `; | `; | ||||
| export const SubcategoriesList = styled(Box)` | export const SubcategoriesList = styled(Box)` | ||||
| padding-top: 18px; | padding-top: 18px; | ||||
| @media (max-width: 600px) { | |||||
| &:nth-child(4) { | |||||
| padding-top: 0; | |||||
| } | |||||
| } | |||||
| ` | ` | ||||
| export const SponsoredCategoryCard = styled(CategoryCard)` | export const SponsoredCategoryCard = styled(CategoryCard)` | ||||
| background: ${selectedTheme.colors.backgroundSponsoredColor}; | background: ${selectedTheme.colors.backgroundSponsoredColor}; | ||||
| right: 16px; | right: 16px; | ||||
| } | } | ||||
| ` | ` | ||||
| export const ButtonContainer = styled(Link)` | |||||
| width:fit-content; | |||||
| cursor:pointer; | |||||
| display: flex; | |||||
| justify-content: start; | |||||
| align-items:center; | |||||
| gap:12px; | |||||
| text-decoration: none; | |||||
| ` | |||||
| export const HeaderText = styled(Typography) ` | |||||
| font-family: ${selectedTheme.fonts.textFont}; | |||||
| line-height: 22px; | |||||
| font-size: 16px; | |||||
| color: ${selectedTheme.colors.primaryPurple}; | |||||
| text-decoration: none; | |||||
| border-bottom: 1px dotted ${selectedTheme.colors.primaryPurple}; | |||||
| ` |