✨ 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],
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
{blocks.map((folder) => {
|
||||
@ -35,8 +36,8 @@ export default function BlockList({ blocks, onSelectedBlock }: IProps) {
|
||||
</div>
|
||||
<div className={classes["right-side"]}>
|
||||
{folder.hasFlag && <WarningBadge />}
|
||||
{folder.rightIcon}
|
||||
<Image alt="chevron" src={ChevronIcon} />
|
||||
{folder.rightIcon && folder.rightIcon}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -53,6 +53,18 @@ export default function CollaboratorListContainer(props: IProps) {
|
||||
name: user.contact?.first_name + " " + user.contact?.last_name,
|
||||
id: user.uid!,
|
||||
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}
|
||||
|
@ -103,7 +103,6 @@ export default class DefaultCollaboratorDashboard extends React.Component<IProps
|
||||
};
|
||||
|
||||
const collaborators = await Users.getInstance().get(query);
|
||||
console.log(collaborators);
|
||||
this.setState({ collaborators });
|
||||
}
|
||||
public override componentWillUnmount() {
|
||||
|
@ -1,6 +1,22 @@
|
||||
@import "@Themes/constants.scss";
|
||||
|
||||
.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 {
|
||||
background-color: var(--grey-soft);
|
||||
display: flex;
|
||||
|
@ -123,6 +123,11 @@ export default function CollaboratorInformations(props: IProps) {
|
||||
contact: true,
|
||||
office_role: true,
|
||||
role: true,
|
||||
seats: {
|
||||
include: {
|
||||
subscription: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
if (!user) return;
|
||||
@ -145,6 +150,14 @@ export default function CollaboratorInformations(props: IProps) {
|
||||
<div className={classes["root"]}>
|
||||
<div className={classes["folder-header"]}>
|
||||
<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 className={classes["user-infos"]}>
|
||||
<div className={classes["user-infos-row"]}>
|
||||
|
@ -81,7 +81,6 @@ export default function SubscriptionFacturation() {
|
||||
loadSubscription();
|
||||
}, [loadSubscription]);
|
||||
|
||||
console.log(forfeitsPrices[EForfeitType.unlimited].toString());
|
||||
return (
|
||||
<DefaultTemplate title="Nouvelle souscription">
|
||||
{subscription && (
|
||||
|
Loading…
x
Reference in New Issue
Block a user