Merge branch 'improve-clickable-items' into 'master'
Improve clickable items See merge request saburly/marketalarm/web!45
This commit was merged in pull request #45.
This commit is contained in:
@@ -86,7 +86,8 @@ const AD_CATEGORY = {
|
|||||||
title: "Vikendica",
|
title: "Vikendica",
|
||||||
hasGardenSize: true,
|
hasGardenSize: true,
|
||||||
priceSliderOptions: PRICE_SLIDER_OPTIONS,
|
priceSliderOptions: PRICE_SLIDER_OPTIONS,
|
||||||
sizeSliderOptions: HOME_SIZE_SLIDER_OPTIONS
|
sizeSliderOptions: HOME_SIZE_SLIDER_OPTIONS,
|
||||||
|
gardenSizeSliderOptions: GARDEN_SIZE_SLIDER_OPTIONS
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ const getLocation = async (req, res) => {
|
|||||||
const postLocation = async (req, res) => {
|
const postLocation = async (req, res) => {
|
||||||
let searchRequest = await currentSearchRequest(req);
|
let searchRequest = await currentSearchRequest(req);
|
||||||
|
|
||||||
|
if (!searchRequest || !searchRequest.dataValues) {
|
||||||
|
res.render("notFound", { title: " " });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const northWest = [req.body.west, req.body.north];
|
const northWest = [req.body.west, req.body.north];
|
||||||
const northEast = [req.body.east, req.body.north];
|
const northEast = [req.body.east, req.body.north];
|
||||||
const southEast = [req.body.east, req.body.south];
|
const southEast = [req.body.east, req.body.south];
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const getQueryReviewData = searchRequest => {
|
|||||||
{
|
{
|
||||||
id: "realEstateType",
|
id: "realEstateType",
|
||||||
title: realEstateTypeTitle,
|
title: realEstateTypeTitle,
|
||||||
url: `/vrstanekretnine/${id}?nextStep=pregled`
|
url: `/vrstanekretnine/${id}?nextStep=filteri`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "location",
|
id: "location",
|
||||||
@@ -66,7 +66,8 @@ const getQueryReview = async (req, res) => {
|
|||||||
const searchRequest = await currentSearchRequest(req);
|
const searchRequest = await currentSearchRequest(req);
|
||||||
|
|
||||||
if (!searchRequest || !searchRequest.dataValues) {
|
if (!searchRequest || !searchRequest.dataValues) {
|
||||||
return null;
|
res.render("notFound", { title: " " });
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = "Da li je ovo to što ste tražili ?";
|
const title = "Da li je ovo to što ste tražili ?";
|
||||||
|
|||||||
@@ -3,6 +3,12 @@ const { AD_CATEGORY } = require("../common/enums");
|
|||||||
|
|
||||||
const getFilters = async (req, res) => {
|
const getFilters = async (req, res) => {
|
||||||
const searchRequest = await currentSearchRequest(req);
|
const searchRequest = await currentSearchRequest(req);
|
||||||
|
|
||||||
|
if (!searchRequest || !searchRequest.dataValues) {
|
||||||
|
res.render("notFound", { title: " " });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const title = "Filteri za pretraživanje";
|
const title = "Filteri za pretraživanje";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -47,6 +53,11 @@ const getFilters = async (req, res) => {
|
|||||||
const postFilters = async (req, res) => {
|
const postFilters = async (req, res) => {
|
||||||
const searchRequest = await currentSearchRequest(req);
|
const searchRequest = await currentSearchRequest(req);
|
||||||
|
|
||||||
|
if (!searchRequest || !searchRequest.dataValues) {
|
||||||
|
res.render("notFound", { title: " " });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const nextStepPage = req.query.nextStep || "pregled";
|
const nextStepPage = req.query.nextStep || "pregled";
|
||||||
const nextStepUrl = `/${nextStepPage}/${searchRequest.id}`;
|
const nextStepUrl = `/${nextStepPage}/${searchRequest.id}`;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ const sequelize = require("sequelize");
|
|||||||
const Op = sequelize.Op;
|
const Op = sequelize.Op;
|
||||||
|
|
||||||
const getSearchRequest = async searchRequestId => {
|
const getSearchRequest = async searchRequestId => {
|
||||||
return await db.SearchRequest.findByPk(searchRequestId);
|
try {
|
||||||
|
return await db.SearchRequest.findByPk(searchRequestId);
|
||||||
|
} catch (error) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const createSearchRequest = async (searchRequestFields = {}) => {
|
const createSearchRequest = async (searchRequestFields = {}) => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<li class="collection-item" >
|
<li class="collection-item" >
|
||||||
<div id="<%= stepData.id %>" ><%= stepData.title || '-' %>
|
<div id="<%= stepData.id %>" ><%= stepData.title || '-' %>
|
||||||
<a href="<%= stepData.url %>" class="kivi-color secondary-content">
|
<a href="<%= stepData.url %>" class="kivi-color secondary-content">
|
||||||
<i class="material-icons">edit</i>
|
<i class="waves-effect material-icons">edit</i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
<form method="POST" id="form-real-estate-type">
|
<form method="POST" id="form-real-estate-type">
|
||||||
<div class="row center-align">
|
<div class="row center-align">
|
||||||
<ul class="collection with-header">
|
<div class="collection">
|
||||||
<% for(const realEstateType of realEstateTypes) { %>
|
<% for(const realEstateType of realEstateTypes) { %>
|
||||||
<li class="collection-item">
|
|
||||||
<div id="<%= realEstateType.id %>" onclick="saveAndSubmit(this.id)"><%= realEstateType.title %>
|
<a href="#" class="waves-effect collection-item"
|
||||||
<a href="#" class="kivi-color secondary-content">
|
id="<%= realEstateType.id %>"
|
||||||
<i class="material-icons">send</i>
|
onclick="saveAndSubmit(this.id)"
|
||||||
</a>
|
>
|
||||||
</div>
|
<%= realEstateType.title %>
|
||||||
</li>
|
</a>
|
||||||
|
|
||||||
<% } %>
|
<% } %>
|
||||||
</ul>
|
</div>
|
||||||
<input type="hidden" name="realEstateType" id="realEstateType" />
|
<input type="hidden" name="realEstateType" id="realEstateType" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user