ok
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
|
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Aboreto&family=Rubik+Doodle+Shadow&display=swap");
|
||||||
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&ital,wght@0,200..800;1,200..800&display=swap");
|
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&ital,wght@0,200..800;1,200..800&display=swap");
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
|
|||||||
@@ -4,18 +4,32 @@ import { useLocation } from "react-router-dom";
|
|||||||
import { useNavigationHelpers } from "../helpers/navigationHelpers";
|
import { useNavigationHelpers } from "../helpers/navigationHelpers";
|
||||||
import Switch from "react-switch";
|
import Switch from "react-switch";
|
||||||
|
|
||||||
|
const HeaderBarbackground = styled.div`
|
||||||
|
${({ shopName }) =>
|
||||||
|
shopName &&
|
||||||
|
`
|
||||||
|
background: linear-gradient(360deg, rgb(255 255 255) 0%, rgb(95 121 89) 100%);
|
||||||
|
`}
|
||||||
|
`;
|
||||||
|
|
||||||
const HeaderBar = styled.div`
|
const HeaderBar = styled.div`
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
margin-top:${(props) => (props.HeaderMargin)};
|
margin-top: ${(props) => props.HeaderMargin};
|
||||||
|
box-shadow: ${(props) => (props.shopName ? '2px 2px #c1c1c1' : 'none')};
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20px 15px;
|
padding: 20px 15px;
|
||||||
color: black;
|
color: black;
|
||||||
background-color: white;
|
background-color: #ffffff;
|
||||||
z-index: 200;
|
z-index: 200;
|
||||||
|
border: 1px solid #00000000;
|
||||||
|
margin: 20px 12px;
|
||||||
|
border-radius: 13px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const Title = styled.h2`
|
const Title = styled.h2`
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: "Plus Jakarta Sans", sans-serif;
|
font-family: "Plus Jakarta Sans", sans-serif;
|
||||||
@@ -23,6 +37,7 @@ const Title = styled.h2`
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size:${(props) => (props.HeaderSize)};
|
font-size:${(props) => (props.HeaderSize)};
|
||||||
color: rgba(88, 55, 50, 1);
|
color: rgba(88, 55, 50, 1);
|
||||||
|
text-transform: uppercase;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ProfileName = styled.h2`
|
const ProfileName = styled.h2`
|
||||||
@@ -113,7 +128,7 @@ const g = keyframes`
|
|||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
top: 28px;
|
top: 28px;
|
||||||
right: 247px;
|
right: 242px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
@@ -122,7 +137,7 @@ const g = keyframes`
|
|||||||
const s = keyframes`
|
const s = keyframes`
|
||||||
0% {
|
0% {
|
||||||
top: 28px;
|
top: 28px;
|
||||||
right: 247px;
|
right: 242px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
@@ -136,12 +151,14 @@ const s = keyframes`
|
|||||||
|
|
||||||
const grow = keyframes`
|
const grow = keyframes`
|
||||||
0% {
|
0% {
|
||||||
|
right: 12px;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
border-top-left-radius: 50%;
|
border-top-left-radius: 50%;
|
||||||
border-bottom-left-radius: 50%;
|
border-bottom-left-radius: 50%;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
|
right: 28px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
border-top-left-radius: 15px;
|
border-top-left-radius: 15px;
|
||||||
border-bottom-left-radius: 15px;
|
border-bottom-left-radius: 15px;
|
||||||
@@ -150,20 +167,23 @@ const grow = keyframes`
|
|||||||
|
|
||||||
const shrink = keyframes`
|
const shrink = keyframes`
|
||||||
0% {
|
0% {
|
||||||
|
right: 12px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
|
right: 28px;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
const Rectangle = styled.div`
|
const Rectangle = styled.div`
|
||||||
|
overflow-y: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 45px;
|
top: 39px;
|
||||||
right: 15px;
|
right: 12px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
max-height: 87vh; /* or another appropriate value */
|
max-height: 87vh; /* or another appropriate value */
|
||||||
background-color: white;
|
background-color: white;
|
||||||
@@ -171,7 +191,6 @@ const Rectangle = styled.div`
|
|||||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
animation: ${(props) => (props.animate === "grow" ? grow : shrink)} 0.5s
|
animation: ${(props) => (props.animate === "grow" ? grow : shrink)} 0.5s
|
||||||
forwards;
|
forwards;
|
||||||
overflow-y: auto; /* Enable vertical scrolling */
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
@@ -303,13 +322,14 @@ const Header = ({
|
|||||||
return `${cafeName}'s menu`;
|
return `${cafeName}'s menu`;
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<HeaderBar HeaderMargin={HeaderMargin} >
|
<HeaderBarbackground shopName={shopName}>
|
||||||
|
<HeaderBar HeaderMargin={HeaderMargin} shopName={shopName}>
|
||||||
<Title HeaderSize={HeaderSize}>
|
<Title HeaderSize={HeaderSize}>
|
||||||
{shopName == null
|
{shopName == null
|
||||||
? HeaderText == null
|
? HeaderText == null
|
||||||
? "kedaimaster"
|
? "kedaimaster"
|
||||||
: HeaderText
|
: HeaderText
|
||||||
: generateMenuHeader(shopName)}
|
: shopName}
|
||||||
</Title>
|
</Title>
|
||||||
<div style={{ visibility: showProfile ? "visible" : "hidden" }}>
|
<div style={{ visibility: showProfile ? "visible" : "hidden" }}>
|
||||||
<ProfileImage
|
<ProfileImage
|
||||||
@@ -403,7 +423,7 @@ const Header = ({
|
|||||||
<Child>{shopName}</Child>
|
<Child>{shopName}</Child>
|
||||||
|
|
||||||
<Child>
|
<Child>
|
||||||
Mode edit
|
Mode pengembangan
|
||||||
<Switch
|
<Switch
|
||||||
borderRadius={0}
|
borderRadius={0}
|
||||||
checked={isEditMode}
|
checked={isEditMode}
|
||||||
@@ -411,8 +431,21 @@ const Header = ({
|
|||||||
/>
|
/>
|
||||||
</Child>
|
</Child>
|
||||||
<Child onClick={() => setModal("add_material")}>
|
<Child onClick={() => setModal("add_material")}>
|
||||||
stok
|
Kelola bahan baku
|
||||||
</Child>
|
</Child>
|
||||||
|
|
||||||
|
<Child hasChildren>
|
||||||
|
<Child>Konfigurasi</Child>
|
||||||
|
<Child onClick={() => setModal("welcome_config")}>
|
||||||
|
Desain kafe
|
||||||
|
</Child>
|
||||||
|
<Child onClick={() => setModal("edit_tables")}>
|
||||||
|
Identifikasi kedai
|
||||||
|
</Child>
|
||||||
|
<Child onClick={() => setModal("payment_option")}>
|
||||||
|
Metode pembayaran
|
||||||
|
</Child>
|
||||||
|
</Child>
|
||||||
{user.username !== undefined &&
|
{user.username !== undefined &&
|
||||||
user.roleId == 2 &&
|
user.roleId == 2 &&
|
||||||
user.cafeId == shopId && (
|
user.cafeId == shopId && (
|
||||||
@@ -449,7 +482,7 @@ const Header = ({
|
|||||||
</Rectangle>
|
</Rectangle>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</HeaderBar>
|
</HeaderBar></HeaderBarbackground>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
width: 26vw;
|
width: 26vw;
|
||||||
height: 26vw;
|
height: 26vw;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ export const loginUser = async (username, password) => {
|
|||||||
success: true,
|
success: true,
|
||||||
token: responseData.token,
|
token: responseData.token,
|
||||||
cafeId: responseData.cafeId,
|
cafeId: responseData.cafeId,
|
||||||
|
cafeIdentifyName: responseData.cafeIdentifyName
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return { success: false, token: null };
|
return { success: false, token: null };
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ function CafePage({
|
|||||||
) : ( */}
|
) : ( */}
|
||||||
<div className={`Cafe ${isExceededDeadline ? 'grayscale' : ''}`}>
|
<div className={`Cafe ${isExceededDeadline ? 'grayscale' : ''}`}>
|
||||||
|
|
||||||
{API_BASE_URL != 'https://dev.api.kedaimaster.com' &&
|
{API_BASE_URL != 'https://dev.api.kedaimaster.com' && API_BASE_URL != 'https://api.kedaimaster.com' &&
|
||||||
<div className="Watermark"></div>
|
<div className="Watermark"></div>
|
||||||
}
|
}
|
||||||
<div className="App-header">
|
<div className="App-header">
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ const LinktreePage = ({ user, setModal }) => {
|
|||||||
const response = await loginUser(username, password);
|
const response = await loginUser(username, password);
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
localStorage.setItem('auth', response.token);
|
localStorage.setItem('auth', response.token);
|
||||||
window.location.href = response.cafeId ? `/${response.cafeId}` : '/';
|
console.log(response)
|
||||||
|
window.location.href = response.cafeIdentifyName ? `/${response.cafeIdentifyName}` : '/';
|
||||||
} else {
|
} else {
|
||||||
setError(true);
|
setError(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -506,7 +506,6 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(25vh - 25px);
|
height: calc(25vh - 25px);
|
||||||
padding-top: 25px;
|
|
||||||
margin-bottom: 85px;
|
margin-bottom: 85px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user