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