✨ active subscription working
This commit is contained in:
parent
396268088c
commit
a5cdeb96d7
@ -24,6 +24,7 @@ export default function BlockList({ blocks, onSelectedBlock }: IProps) {
|
|||||||
},
|
},
|
||||||
[blocks, onSelectedBlock],
|
[blocks, onSelectedBlock],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{blocks.map((folder) => {
|
{blocks.map((folder) => {
|
||||||
@ -35,8 +36,8 @@ export default function BlockList({ blocks, onSelectedBlock }: IProps) {
|
|||||||
</div>
|
</div>
|
||||||
<div className={classes["right-side"]}>
|
<div className={classes["right-side"]}>
|
||||||
{folder.hasFlag && <WarningBadge />}
|
{folder.hasFlag && <WarningBadge />}
|
||||||
|
{folder.rightIcon}
|
||||||
<Image alt="chevron" src={ChevronIcon} />
|
<Image alt="chevron" src={ChevronIcon} />
|
||||||
{folder.rightIcon && folder.rightIcon}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,6 +53,18 @@ export default function CollaboratorListContainer(props: IProps) {
|
|||||||
name: user.contact?.first_name + " " + user.contact?.last_name,
|
name: user.contact?.first_name + " " + user.contact?.last_name,
|
||||||
id: user.uid!,
|
id: user.uid!,
|
||||||
selected: user.uid === collaboratorUid,
|
selected: user.uid === collaboratorUid,
|
||||||
|
rightIcon: user.seats?.some((seat) => new Date(seat.subscription!.end_date) >= new Date()) ? (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
height: "12px",
|
||||||
|
width: "12px",
|
||||||
|
borderRadius: "100px",
|
||||||
|
backgroundColor: "var(--green-flash)",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
),
|
||||||
};
|
};
|
||||||
})}
|
})}
|
||||||
onSelectedBlock={onSelectedBlock}
|
onSelectedBlock={onSelectedBlock}
|
||||||
|
@ -103,7 +103,6 @@ export default class DefaultCollaboratorDashboard extends React.Component<IProps
|
|||||||
};
|
};
|
||||||
|
|
||||||
const collaborators = await Users.getInstance().get(query);
|
const collaborators = await Users.getInstance().get(query);
|
||||||
console.log(collaborators);
|
|
||||||
this.setState({ collaborators });
|
this.setState({ collaborators });
|
||||||
}
|
}
|
||||||
public override componentWillUnmount() {
|
public override componentWillUnmount() {
|
||||||
|
@ -1,6 +1,22 @@
|
|||||||
@import "@Themes/constants.scss";
|
@import "@Themes/constants.scss";
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
|
.folder-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.subscription-active {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
.subscription-active-dot {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
background-color: var(--green-flash);
|
||||||
|
border-radius: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.user-infos {
|
.user-infos {
|
||||||
background-color: var(--grey-soft);
|
background-color: var(--grey-soft);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -123,6 +123,11 @@ export default function CollaboratorInformations(props: IProps) {
|
|||||||
contact: true,
|
contact: true,
|
||||||
office_role: true,
|
office_role: true,
|
||||||
role: true,
|
role: true,
|
||||||
|
seats: {
|
||||||
|
include: {
|
||||||
|
subscription: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
@ -145,6 +150,14 @@ export default function CollaboratorInformations(props: IProps) {
|
|||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
<div className={classes["folder-header"]}>
|
<div className={classes["folder-header"]}>
|
||||||
<Typography typo={ITypo.H1Bis}>{userSelected?.contact?.first_name + " " + userSelected?.contact?.last_name}</Typography>
|
<Typography typo={ITypo.H1Bis}>{userSelected?.contact?.first_name + " " + userSelected?.contact?.last_name}</Typography>
|
||||||
|
{userSelected && userSelected.seats?.some((seat) => new Date(seat.subscription!.end_date) >= new Date()) && (
|
||||||
|
<div className={classes["subscription-active"]}>
|
||||||
|
<div className={classes["subscription-active-dot"]} />
|
||||||
|
<Typography typo={ITypo.P_18} color={ITypoColor.GREEN_FLASH}>
|
||||||
|
Abonnement actif
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["user-infos"]}>
|
<div className={classes["user-infos"]}>
|
||||||
<div className={classes["user-infos-row"]}>
|
<div className={classes["user-infos-row"]}>
|
||||||
|
@ -81,7 +81,6 @@ export default function SubscriptionFacturation() {
|
|||||||
loadSubscription();
|
loadSubscription();
|
||||||
}, [loadSubscription]);
|
}, [loadSubscription]);
|
||||||
|
|
||||||
console.log(forfeitsPrices[EForfeitType.unlimited].toString());
|
|
||||||
return (
|
return (
|
||||||
<DefaultTemplate title="Nouvelle souscription">
|
<DefaultTemplate title="Nouvelle souscription">
|
||||||
{subscription && (
|
{subscription && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user