Fixed backend URL | Some features
This commit is contained in:
@@ -205,7 +205,7 @@ export default function EditDish() {
|
|||||||
};
|
};
|
||||||
dispatch(showBackdrop());
|
dispatch(showBackdrop());
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/dish",
|
url: backend + "dish",
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ export default function NewRestaurant() {
|
|||||||
};
|
};
|
||||||
dispatch(showBackdrop());
|
dispatch(showBackdrop());
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/dish",
|
url: backend + "dish",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export default function NewRestaurant() {
|
|||||||
};
|
};
|
||||||
dispatch(showBackdrop());
|
dispatch(showBackdrop());
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/restaurant",
|
url: backend + "restaurant",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ export default function EditRestaurantInfo(props) {
|
|||||||
};
|
};
|
||||||
dispatch(showBackdrop());
|
dispatch(showBackdrop());
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/restaurant",
|
url: backend + "restaurant",
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export default function EditRestaurantLocation(props) {
|
|||||||
hidden: hidden,
|
hidden: hidden,
|
||||||
};
|
};
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/restaurant",
|
url: backend + "restaurant",
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default function EditRestaurantMenu(props) {
|
|||||||
action: "add",
|
action: "add",
|
||||||
};
|
};
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/restaurant/category",
|
url: backend + "restaurant/category",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -86,7 +86,7 @@ export default function EditRestaurantMenu(props) {
|
|||||||
action: "delete",
|
action: "delete",
|
||||||
};
|
};
|
||||||
axios({
|
axios({
|
||||||
url: "http://localhost:4000/restaurant/category",
|
url: backend + "restaurant/category",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function EditRestaurantPhoto(props) {
|
|||||||
hidden: hidden,
|
hidden: hidden,
|
||||||
};
|
};
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/restaurant",
|
url: backend + "restaurant",
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { backend } from "../../config.js";
|
|||||||
import { showBackdrop, hideBackdrop } from "../../actions/toggles";
|
import { showBackdrop, hideBackdrop } from "../../actions/toggles";
|
||||||
import PaymentDialog from "../Dialogs/PaymentDialog";
|
import PaymentDialog from "../Dialogs/PaymentDialog";
|
||||||
import { openInNewTab, formatDateBasic } from "../../Services.js";
|
import { openInNewTab, formatDateBasic } from "../../Services.js";
|
||||||
|
import LocalOfferIcon from '@material-ui/icons/LocalOffer';
|
||||||
|
|
||||||
export default function EditRestaurantSubscription(props) {
|
export default function EditRestaurantSubscription(props) {
|
||||||
const { subscriptionActive, subscriptionDue } = props.restaurant;
|
const { subscriptionActive, subscriptionDue } = props.restaurant;
|
||||||
@@ -37,7 +38,7 @@ export default function EditRestaurantSubscription(props) {
|
|||||||
dispatch(showBackdrop());
|
dispatch(showBackdrop());
|
||||||
axios({
|
axios({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: backend + "/restaurant/subscription",
|
url: backend + "restaurant/subscription",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
"x-auth-token": token,
|
"x-auth-token": token,
|
||||||
@@ -78,38 +79,62 @@ export default function EditRestaurantSubscription(props) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{!subscriptionActive && (
|
{!subscriptionActive && (
|
||||||
<div>
|
<div className="subscription-content">
|
||||||
|
<p>
|
||||||
|
Aktywuj subskrypcję, aby Twoja restauracja była widoczna. Na tydzień
|
||||||
|
przed końcem subskrypcji wyślemy Ci email z możliwością opłacenia
|
||||||
|
subskrypcji na kolejny okres.
|
||||||
|
</p>
|
||||||
<div className="subscription-cards">
|
<div className="subscription-cards">
|
||||||
<div className="subscription-card">
|
<div className="subscription-card">
|
||||||
<h1>1 rok</h1>
|
<div className="subscription-title">
|
||||||
|
<LocalOfferIcon/>
|
||||||
|
<h1>Za darmo</h1>
|
||||||
|
</div>
|
||||||
<Divider style={{ width: "100%" }} />
|
<Divider style={{ width: "100%" }} />
|
||||||
<h2>
|
<h2>3 miesiące</h2>
|
||||||
<strike>600zł</strike> 500zł (netto)
|
<div className="subscription-desc">
|
||||||
</h2>
|
<p>Możesz jednorazowo aktywować darmowe 3 miesiące subskrypcji, by móc spokojnie uzupełnić menu.</p>
|
||||||
<p>Aktywuj subskrypcję na 12 miesięcy i zapłać mniej.</p>
|
</div>
|
||||||
<Divider style={{ width: "100%" }} />
|
<Divider style={{ width: "100%" }} />
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
text="Aktywuj"
|
text="Aktywuj"
|
||||||
onClick={() => handleActivateSubscription(12)}
|
onClick={() => handleActivateSubscription(3)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="subscription-card">
|
<div className="subscription-card">
|
||||||
<h1>1 miesiąc</h1>
|
<div className="subscription-title">
|
||||||
|
<LocalOfferIcon/>
|
||||||
|
<h1>50zł</h1>
|
||||||
|
</div>
|
||||||
<Divider style={{ width: "100%" }} />
|
<Divider style={{ width: "100%" }} />
|
||||||
<h2>50zł (netto)</h2>
|
<h2>1 miesiąc</h2>
|
||||||
<p>Aktywuj subskrypcję na jeden miesiąc.</p>
|
<div className="subscription-desc">
|
||||||
|
<p>Aktywuj subskrypcję na jeden miesiąc.</p>
|
||||||
|
</div>
|
||||||
<Divider style={{ width: "100%" }} />
|
<Divider style={{ width: "100%" }} />
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
text="Aktywuj"
|
text="Aktywuj"
|
||||||
onClick={() => handleActivateSubscription(1)}
|
onClick={() => handleActivateSubscription(1)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="subscription-card">
|
||||||
|
<div className="subscription-title">
|
||||||
|
<LocalOfferIcon/>
|
||||||
|
<h1>500zł</h1>
|
||||||
|
</div>
|
||||||
|
<Divider style={{ width: "100%" }} />
|
||||||
|
<h2>1 rok</h2>
|
||||||
|
<div className="subscription-desc">
|
||||||
|
<p>Zapłać z góry za cały rok, a otrzymasz dwa miesiące w prezencie.</p>
|
||||||
|
</div>
|
||||||
|
<Divider style={{ width: "100%" }} />
|
||||||
|
<ButtonSecondary
|
||||||
|
text="Aktywuj"
|
||||||
|
onClick={() => handleActivateSubscription(12)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
|
||||||
Aktywuj subskrypcję, aby Twoja restauracja była widoczna. Na tydzień
|
|
||||||
przed końcem subskrypcji wyślemy Ci email z możliwością opłacenia
|
|
||||||
subskrypcji na kolejny okres.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{subscriptionActive && (
|
{subscriptionActive && (
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ export default function EditCategoriesList(props) {
|
|||||||
dispatch(showBackdrop());
|
dispatch(showBackdrop());
|
||||||
axios({
|
axios({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: backend + "/restaurant/lunchSet",
|
url: backend + "restaurant/lunchSet",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
"x-auth-token": token,
|
"x-auth-token": token,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default function ImageUpload(props) {
|
|||||||
data.append("menuiImage", event.target.files[0]);
|
data.append("menuiImage", event.target.files[0]);
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/img",
|
url: backend + "img",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default function ImageUpload(props) {
|
|||||||
data.append("menuiImage", event.target.files[0]);
|
data.append("menuiImage", event.target.files[0]);
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axios({
|
axios({
|
||||||
url: backend + "/img",
|
url: backend + "img",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -131,6 +131,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
@@ -156,24 +157,26 @@
|
|||||||
.subscription-cards {
|
.subscription-cards {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
margin-top: 18px;
|
margin-top: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subscription-card {
|
.subscription-card {
|
||||||
background-color: #242424;
|
background-color: #474747;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 260px;
|
width: 220px;
|
||||||
max-width: 300px;
|
border-radius: 18px;
|
||||||
border-radius: 8px;
|
box-shadow: #0000002d 2px 2px 5px;
|
||||||
h1 {
|
h1 {
|
||||||
font-weight: 200;
|
font-weight: 500;
|
||||||
|
margin-left: 8px;
|
||||||
|
font-size: 1.5rem;
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
font-weight: 300;
|
font-weight: 400;
|
||||||
font-size: 1.2rem;
|
font-size: 1.1rem;
|
||||||
color: #c0c0c0;
|
color: #c0c0c0;
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
@@ -181,6 +184,25 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding-left: 16px;
|
padding-left: 16px;
|
||||||
padding-right: 16px;
|
padding-right: 16px;
|
||||||
color: #838383;
|
color: $secondary-color;
|
||||||
}
|
}
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subscription-card:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #575757;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subscription-desc {
|
||||||
|
background-color: #333333;
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subscription-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,20 @@
|
|||||||
margin: 18px;
|
margin: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hs-bottom {
|
||||||
|
h4 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.hs-bottom-icon {
|
.hs-bottom-icon {
|
||||||
|
opacity: 0.6;
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: opacity 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-bottom-icon:hover {
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user