ok
This commit is contained in:
@@ -359,7 +359,7 @@ const Header = ({
|
||||
{shopId && user.roleId == 1 && (
|
||||
<Child onClick={goToAdminCafes}>Dashboard</Child>)}
|
||||
{shopId &&
|
||||
user.userId == shopOwnerId &&
|
||||
user.user_id == shopOwnerId &&
|
||||
user.username !== undefined &&
|
||||
user.roleId === 1 && (
|
||||
<>
|
||||
|
||||
@@ -598,7 +598,7 @@ const ItemLister = ({
|
||||
return (
|
||||
<>
|
||||
{(items.length > 0 ||
|
||||
(user && (user.cafeId == shopId || user.userId == shopOwnerId))) && (
|
||||
(user && (user.cafeId == shopId || user.user_id == shopOwnerId))) && (
|
||||
<div
|
||||
key={itemTypeId}
|
||||
className={`${styles["item-lister"]} ${isEdit ? styles["fullscreen"] : ""
|
||||
@@ -866,7 +866,7 @@ const ItemLister = ({
|
||||
<h2 className={styles["item-list-title"]}>{items && items.length < 1 ? 'Buat item' : 'Daftar item'}</h2></div>}
|
||||
<div className={styles["item-list"]}>
|
||||
{user && (
|
||||
user.userId == shopOwnerId || user.cafeId == shopId) &&
|
||||
user.user_id == shopOwnerId || user.cafeId == shopId) &&
|
||||
isEditMode && (
|
||||
<>
|
||||
{!isAddingNewItem && (
|
||||
@@ -1113,7 +1113,7 @@ const ItemLister = ({
|
||||
|
||||
{user &&
|
||||
user.roleId == 1 &&
|
||||
user.userId == shopOwnerId &&
|
||||
user.user_id == shopOwnerId &&
|
||||
isEdit && (
|
||||
<>
|
||||
{/* <button
|
||||
|
||||
@@ -103,7 +103,7 @@ const ItemTypeLister = ({
|
||||
{isEditMode &&
|
||||
!isAddingNewItem &&
|
||||
user && (
|
||||
user.userId == shopOwnerId || user.cafeId == shopId) && (
|
||||
user.user_id == shopOwnerId || user.cafeId == shopId) && (
|
||||
<ItemType
|
||||
onClick={toggleAddNewItem}
|
||||
name={"buat baru"}
|
||||
@@ -111,7 +111,7 @@ const ItemTypeLister = ({
|
||||
/>
|
||||
)}
|
||||
{user &&(
|
||||
user.userId == shopOwnerId || user.cafeId == shopId) &&
|
||||
user.user_id == shopOwnerId || user.cafeId == shopId) &&
|
||||
isAddingNewItem && (
|
||||
<>
|
||||
<ItemLister
|
||||
@@ -141,7 +141,7 @@ const ItemTypeLister = ({
|
||||
itemTypes.map(
|
||||
(itemType) =>
|
||||
(
|
||||
itemType.itemList.length > 0 || (user && (user.userId == shopOwnerId || user.cafeId == shopId))) && (
|
||||
itemType.itemList.length > 0 || (user && (user.user_id == shopOwnerId || user.cafeId == shopId))) && (
|
||||
<ItemType
|
||||
key={itemType.itemTypeId}
|
||||
name={itemType.name}
|
||||
|
||||
@@ -108,7 +108,7 @@ export function MusicPlayer({ socket, shopId, user, shopOwnerId, isSpotifyNeedLo
|
||||
// setSubtitleColor("white");
|
||||
// setSubtitleBG("black");
|
||||
// }
|
||||
const proxiedUrl = `https://dev.api.kedaimaster.com/image?url=${encodeURIComponent(modifyUrl(imageUrl))}`; // Use your proxy to fetch the image
|
||||
const proxiedUrl = `https://api.kedaimaster.com/image?url=${encodeURIComponent(modifyUrl(imageUrl))}`; // Use your proxy to fetch the image
|
||||
|
||||
setBackgroundImage(proxiedUrl);
|
||||
} catch (error) {
|
||||
@@ -479,7 +479,7 @@ export function MusicPlayer({ socket, shopId, user, shopOwnerId, isSpotifyNeedLo
|
||||
className={`expandable-container ${expanded ? "expanded" : ""}`}
|
||||
ref={expandableContainerRef}
|
||||
>
|
||||
{user.cafeId == shopId || user.userId == shopOwnerId && (
|
||||
{user.cafeId == shopId || user.user_id == shopOwnerId && (
|
||||
<>
|
||||
<div className="auth-box">
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user