feat: use week start from owner (#7072)
This commit is contained in:
parent
c2a8f799ff
commit
a2549bd7b6
|
@ -100,6 +100,22 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
|||
availability: true,
|
||||
},
|
||||
},
|
||||
team: {
|
||||
select: {
|
||||
members: {
|
||||
where: {
|
||||
role: "OWNER",
|
||||
},
|
||||
select: {
|
||||
user: {
|
||||
select: {
|
||||
weekStart: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -148,6 +164,8 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
|||
booking = await getBooking(prisma, rescheduleUid);
|
||||
}
|
||||
|
||||
const weekStart = eventType.team?.members?.[0]?.user?.weekStart;
|
||||
|
||||
return {
|
||||
props: {
|
||||
profile: {
|
||||
|
@ -155,7 +173,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
|||
slug: team.slug,
|
||||
image: team.logo,
|
||||
theme: team.theme,
|
||||
weekStart: "Sunday",
|
||||
weekStart: weekStart ?? "Sunday",
|
||||
brandColor: team.brandColor,
|
||||
darkBrandColor: team.darkBrandColor,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user