Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🦋 allow employee-only alternative desktop content on CMS page #1628 #1630

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🦋 allow employee-only alternative desktop content on CMS page #1628
  • Loading branch information
ithiame committed Dec 9, 2024
commit 634afc029b5e8023c3df48af9717b4a37c14fa33
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
Loading