Skip to content

Commit

Permalink
🦋 allow employee-only alternative desktop content on CMS page #1628
Browse files Browse the repository at this point in the history
ithiame committed Dec 9, 2024
1 parent a6ab5de commit 634afc0
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/routes/(app)/[slug]/+page.server.ts
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ export async function load({ params, locals, url }) {
!cmsPage.mobileContent
? {
content:
locals.user.roleId !== CUSTOMER_ROLE_ID &&
locals.user?.roleId !== CUSTOMER_ROLE_ID &&
cmsPage.hasEmployeeContent &&
cmsPage.employeeContent
? cmsPage.employeeContent
@@ -78,7 +78,7 @@ export async function load({ params, locals, url }) {
? { content: cmsPage.mobileContent }
: {
content:
locals.user.roleId !== CUSTOMER_ROLE_ID &&
locals.user?.roleId !== CUSTOMER_ROLE_ID &&
cmsPage.hasEmployeeContent &&
cmsPage.employeeContent
? cmsPage.employeeContent
4 changes: 2 additions & 2 deletions src/routes/(app)/cart/+page.server.ts
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ export async function load({ parent, locals }) {
cmsBasketTopData: cmsFromContent(
{
content:
locals.user.roleId !== CUSTOMER_ROLE_ID &&
locals.user?.roleId !== CUSTOMER_ROLE_ID &&
cmsBasketTop.hasEmployeeContent &&
cmsBasketTop.employeeContent
? cmsBasketTop.employeeContent
@@ -88,7 +88,7 @@ export async function load({ parent, locals }) {
cmsBasketBottomData: cmsFromContent(
{
content:
locals.user.roleId !== CUSTOMER_ROLE_ID &&
locals.user?.roleId !== CUSTOMER_ROLE_ID &&
cmsBasketBottom.hasEmployeeContent &&
cmsBasketBottom.employeeContent
? cmsBasketBottom.employeeContent
4 changes: 2 additions & 2 deletions src/routes/(app)/checkout/+page.server.ts
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ export async function load({ parent, locals }) {
cmsCheckoutTopData: cmsFromContent(
{
content:
locals.user.roleId !== CUSTOMER_ROLE_ID &&
locals.user?.roleId !== CUSTOMER_ROLE_ID &&
cmsCheckoutTop.hasEmployeeContent &&
cmsCheckoutTop.employeeContent
? cmsCheckoutTop.employeeContent
@@ -117,7 +117,7 @@ export async function load({ parent, locals }) {
cmsCheckoutBottomData: cmsFromContent(
{
content:
locals.user.roleId !== CUSTOMER_ROLE_ID &&
locals.user?.roleId !== CUSTOMER_ROLE_ID &&
cmsCheckoutBottom.hasEmployeeContent &&
cmsCheckoutBottom.employeeContent
? cmsCheckoutBottom.employeeContent
4 changes: 2 additions & 2 deletions src/routes/(app)/order/[id]/+page.server.ts
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ export async function load({ params, depends, locals }) {
cmsOrderTopData: cmsFromContent(
{
content:
locals.user.roleId !== CUSTOMER_ROLE_ID &&
locals.user?.roleId !== CUSTOMER_ROLE_ID &&
cmsOrderTop.hasEmployeeContent &&
cmsOrderTop.employeeContent
? cmsOrderTop.employeeContent
@@ -97,7 +97,7 @@ export async function load({ params, depends, locals }) {
cmsOrderBottomData: cmsFromContent(
{
content:
locals.user.roleId !== CUSTOMER_ROLE_ID &&
locals.user?.roleId !== CUSTOMER_ROLE_ID &&
cmsOrderBottom.hasEmployeeContent &&
cmsOrderBottom.employeeContent
? cmsOrderBottom.employeeContent

0 comments on commit 634afc0

Please sign in to comment.