Skip to content

Commit

Permalink
Merge pull request #326 from Build-Squad/Feedback-Changes
Browse files Browse the repository at this point in the history
Feedback Changes
  • Loading branch information
Parikshit85 authored Apr 22, 2024
2 parents 389b9ac + 1ca8f13 commit e4a7645
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 50 deletions.
2 changes: 1 addition & 1 deletion src/api/marketplace/accounts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_user_id(self, twitter_account):

def get_service_types(self, twitter_account):
services = Service.objects.filter(
package__influencer__twitter_account=twitter_account
package__influencer__twitter_account=twitter_account, deleted_at=None
)

# Extract service types and prices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,18 +286,18 @@ export default function InfluencersCards({
justifyContent={"center"}
alignItems={"center"}
>
<Typography variant="subtitle1" fontWeight={"bold"}>
<Typography variant="subtitle2" fontWeight={"bold"}>
Followers:
</Typography>
<Typography
variant="subtitle1"
variant="subtitle2"
fontWeight={"light"}
sx={{ ml: 1 }}
>
{influencer?.followers}
</Typography>
</Box>
<Typography variant="subtitle1" fontWeight={"bold"}>
<Typography variant="subtitle2" fontWeight={"bold"}>
{`${influencer?.minPrice} - ${influencer?.maxPrice}`}
</Typography>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions src/ui/app/business/messages/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ export default function BusinessMessages() {
);
if (isSuccess) {
// Fetching all user-message and if there's exactly 1 object, show the user guide
if (data?.data?.orders?.length == 1) {
if (data?.pagination?.total_data_count == 1) {
setStepIndex(0);
setRun(true);
}
if (data?.data?.orders?.length > 0) {
if (data?.pagination?.total_data_count > 0) {
setHasAMessage(true);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ui/app/influencer/messages/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ export default function BusinessMessages() {
);
if (isSuccess) {
// Fetching all user-message and if there's exactly 1 object, show the user guide
if (data?.data?.orders?.length == 1) {
if (data?.pagination?.total_data_count == 1) {
setStepIndex(0);
setRun(true);
}
if (data?.data?.orders?.length > 0) {
if (data?.pagination?.total_data_count > 0) {
setHasAMessage(true);
}
}
Expand Down
35 changes: 4 additions & 31 deletions src/ui/app/influencer/orders/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export default function Orders() {
});
const [open, setOpen] = React.useState(false);
const [loading, setLoading] = useState(false);
const [redirectLoading, setRedirectLoading] = useState(false);
const [actionLoading, setActionLoading] = useState(false);
const [orders, setOrders] = useState<OrderType[]>([]);
const [rowSelectionModel, setRowSelectionModel] =
Expand Down Expand Up @@ -217,16 +216,6 @@ export default function Orders() {
total_data_count: data?.pagination?.total_data_count,
total_page_count: data?.pagination?.total_page_count,
});

// Redirecting to dashboard page after two seconds if there are no orders pending
if (data?.data?.orders.length == 0) {
setRedirectLoading(true);
setTimeout(() => {
router.push("/influencer/dashboard/?tab=orders");
}, 2000);
} else {
setRedirectLoading(false);
}
} else {
notification(message ? message : "Something went wrong", "error");
}
Expand Down Expand Up @@ -474,6 +463,10 @@ export default function Orders() {
selectedAction.status == "Accept" ? "accepted" : "rejected"
}`
);
// Redirect to the dashboard if it's the last accepted order
if (orders?.length <= 1) {
router.push("/influencer/dashboard/?tab=orders");
}
} else {
notification(
message
Expand Down Expand Up @@ -730,26 +723,6 @@ export default function Orders() {
}}
locale={{ last: "Finish" }}
/>
{redirectLoading ? (
<Backdrop
sx={{ color: "#fff", zIndex: (theme) => theme.zIndex.drawer + 1 }}
open={true}
>
<Box
sx={{
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
}}
>
<CircularProgress thickness={2} />
<Typography sx={{ mt: 3 }} variant="h6">
Redirecting to dashboard...
</Typography>
</Box>
</Backdrop>
) : null}
</RouteProtection>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const ContentTypeComponent = ({ meta_data }: { meta_data: any }) => {
display: "flex",
justifyContent: "space-between",
width: "100%",
alignItems: "center",
}}
>
<Link
Expand All @@ -66,7 +67,12 @@ const ContentTypeComponent = ({ meta_data }: { meta_data: any }) => {
target="_blank"
rel="noopener noreferrer"
underline="hover"
sx={{ color: "#676767" }}
sx={{
color: "#676767",
width: "100%",
overflow: "hidden",
textOverflow: "ellipsis",
}}
>
{meta_data.value}
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,14 @@ const CreateUpdateService = ({
>
<Box sx={{ display: "flex", flexDirection: "column" }}>
<Typography variant="body1">
Platform Fee{" "}
<span style={{ textDecoration: "line-through" }}>
({platform_fees}%)
</span>
Platform Fee
</span>{" "}
({platform_fees}%)
</Typography>
<Typography variant="caption">
<span style={{ color: "#C60C30" }}>
Free only for beta
Free for closed beta
</span>
</Typography>
</Box>
Expand Down
24 changes: 18 additions & 6 deletions src/ui/src/components/shared/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Box, Grid, Typography } from "@mui/material";
import { Box, Grid, Link, Typography } from "@mui/material";
import Image from "next/image";
import Facebook from "@/public/svg/Facebook.svg";
import Instgram from "@/public/svg/Instgram.svg";
Expand Down Expand Up @@ -63,11 +63,23 @@ const Footer = () => {
<Typography sx={styles.accountLinks} variant="h6">
Company
</Typography>
{["Blog", "Privacy Policy", "Xfluencer Pro (coming soon)"].map(
(link) => (
<Typography key={link}>{link}</Typography>
)
)}
<Typography>Blog</Typography>
<Link
href="https://docs.xfluencer.io/v1"
target="_blank"
sx={{
textDecoration: "none",
"&:hover": {
textDecoration: "underline",
},
color: "white",
}}
>
Docs
</Link>
{["Privacy Policy", "Xfluencer Pro (coming soon)"].map((link) => (
<Typography key={link}>{link}</Typography>
))}
</Grid>

{/** Column 4 */}
Expand Down

0 comments on commit e4a7645

Please sign in to comment.