This commit is contained in:
Vassshhh
2025-08-25 23:41:35 +07:00
parent 53e091d3a4
commit 67cf759b31
16 changed files with 6738 additions and 4441 deletions

View File

@@ -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 && (
<>

View File

@@ -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

View File

@@ -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}

View File

@@ -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