added some mocked data calls
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,101 @@
|
||||
export default(req, res) =>{
|
||||
res.statusCode= 200;
|
||||
res.json(
|
||||
{
|
||||
"@odata.context": "https://devcrm2016.llcdt.gov.wales/DVPINS/api/data/v8.2/$metadata#incidents(_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title)",
|
||||
"@odata.count": 9,
|
||||
"value": [
|
||||
{
|
||||
"@odata.etag": "W/\"704047\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040000,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00009-W8N6W4",
|
||||
"title": "CAS-00009-W8N6W4",
|
||||
"incidentid": "9919eac3-21af-eb11-aac3-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"704095\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040011,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00010-J9W6L5",
|
||||
"title": "CAS-00010-J9W6L5",
|
||||
"incidentid": "55f4fc74-33af-eb11-aac3-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"709250\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "41fead24-29ba-eb11-aac4-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040001,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00011-K1N0J8",
|
||||
"title": "CAS-00011-K1N0J8",
|
||||
"incidentid": "6bd04d33-29ba-eb11-aac4-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"710463\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040000,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00012-D9W6S8",
|
||||
"title": "CAS-00012-D9W6S8",
|
||||
"incidentid": "b9c9cbe4-6abc-eb11-aac4-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"746096\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "80d99a34-82ad-eb11-aac3-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040025,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00013-Z0B5Z9",
|
||||
"title": "CAS-00013-Z0B5Z9",
|
||||
"incidentid": "34071ec4-54d3-eb11-aac5-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"749764\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040021,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00014-S3L9B4",
|
||||
"title": "CAS-00014-S3L9B4",
|
||||
"incidentid": "2230700b-ebd7-eb11-aac5-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"750875\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "cfb7b446-a7d8-eb11-aac5-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040000,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00015-L7J9H1",
|
||||
"title": "CAS-00015-L7J9H1",
|
||||
"incidentid": "d5b7b446-a7d8-eb11-aac5-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"755001\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "cfb7b446-a7d8-eb11-aac5-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040004,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00016-Y9K9Q0",
|
||||
"title": "CAS-00016-Y9K9Q0",
|
||||
"incidentid": "cc6f93ea-bdd9-eb11-aac5-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"755216\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value": "243c0009-49da-eb11-aac5-00224800be9c",
|
||||
"pinswg_appealcasetype": 846040004,
|
||||
"statuscode": 1,
|
||||
"ticketnumber": "CAS-00017-B8X7N0",
|
||||
"title": "CAS-00017-B8X7N0",
|
||||
"incidentid": "73895a1b-68dd-eb11-aac5-00224800be9c"
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
};
|
||||
@@ -0,0 +1,146 @@
|
||||
export default(req, res) =>{
|
||||
res.statusCode= 200;
|
||||
res.json(
|
||||
{
|
||||
"@odata.context": "https://devcrm2016.llcdt.gov.wales/DVPINS/api/data/v8.2/$metadata#incidents(_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title)",
|
||||
"@odata.count": "9",
|
||||
"value": [
|
||||
{
|
||||
"@odata.etag": "W/\"704047\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "Bridgend CBC",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_account",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "account",
|
||||
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "Planning Appeal - S78",
|
||||
"pinswg_appealcasetype": "846040000",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00009-W8N6W4",
|
||||
"title": "CAS-00009-W8N6W4",
|
||||
"incidentid": "9919eac3-21af-eb11-aac3-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"704095\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "Bridgend CBC",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_account",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "account",
|
||||
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "DNS",
|
||||
"pinswg_appealcasetype": "846040011",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00010-J9W6L5",
|
||||
"title": "CAS-00010-J9W6L5",
|
||||
"incidentid": "55f4fc74-33af-eb11-aac3-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"709250\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "Zoe",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_account",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "account",
|
||||
"_customerid_value": "41fead24-29ba-eb11-aac4-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "Planning Conditions - S73 + S79",
|
||||
"pinswg_appealcasetype": "846040001",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00011-K1N0J8",
|
||||
"title": "CAS-00011-K1N0J8",
|
||||
"incidentid": "6bd04d33-29ba-eb11-aac4-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"710463\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "Bridgend CBC",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_account",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "account",
|
||||
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "Planning Appeal - S78",
|
||||
"pinswg_appealcasetype": "846040000",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00012-D9W6S8",
|
||||
"title": "CAS-00012-D9W6S8",
|
||||
"incidentid": "b9c9cbe4-6abc-eb11-aac4-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"74609\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "Barry Boys High School",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_account",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "account",
|
||||
"_customerid_value": "80d99a34-82ad-eb11-aac3-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "Listed Building and Convention S73 + S79",
|
||||
"pinswg_appealcasetype": "846040025",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00013-Z0B5Z9",
|
||||
"title": "CAS-00013-Z0B5Z9",
|
||||
"incidentid": "34071ec4-54d3-eb11-aac5-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"749764\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "Bridgend CBC",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_account",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "account",
|
||||
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "Wayleave",
|
||||
"pinswg_appealcasetype": "846040021",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00014-S3L9B4",
|
||||
"title": "CAS-00014-S3L9B4",
|
||||
"incidentid": "2230700b-ebd7-eb11-aac5-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"750875\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "test customer",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_contact",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "contact",
|
||||
"_customerid_value": "cfb7b446-a7d8-eb11-aac5-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "Planning Appeal - S78",
|
||||
"pinswg_appealcasetype": "846040000",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00015-L7J9H1",
|
||||
"title": "CAS-00015-L7J9H1",
|
||||
"incidentid": "d5b7b446-a7d8-eb11-aac5-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"755001\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "test customer",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_contact",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "contact",
|
||||
"_customerid_value": "cfb7b446-a7d8-eb11-aac5-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "Householder Appeal (HAS)",
|
||||
"pinswg_appealcasetype": "846040004",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00016-Y9K9Q0",
|
||||
"title": "CAS-00016-Y9K9Q0",
|
||||
"incidentid": "cc6f93ea-bdd9-eb11-aac5-00224800be9c"
|
||||
},
|
||||
{
|
||||
"@odata.etag": "W/\"755216\"",
|
||||
"_accountid_value": null,
|
||||
"_customerid_value@OData.Community.Display.V1.FormattedValue": "Caerphilly County Borough Council",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "customerid_account",
|
||||
"_customerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "account",
|
||||
"_customerid_value": "243c0009-49da-eb11-aac5-00224800be9c",
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue": "Householder Appeal (HAS)",
|
||||
"pinswg_appealcasetype": "846040004",
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue": "In Progress",
|
||||
"statuscode": "1",
|
||||
"ticketnumber": "CAS-00017-B8X7N0",
|
||||
"title": "CAS-00017-B8X7N0",
|
||||
"incidentid": "73895a1b-68dd-eb11-aac5-00224800be9c"
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
};
|
||||
@@ -15,7 +15,7 @@ import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
|
||||
import { setSearch, getSearchObj } from "../store/search/action";
|
||||
|
||||
import { setSearchResults, getSearchResultsObj } from "../store/searchOutput/action";
|
||||
import {getBasicSearch} from "../actions"
|
||||
|
||||
const Home = (props) => {
|
||||
@@ -37,7 +37,7 @@ const Home = (props) => {
|
||||
<Header courseName={t("common:service-name")} />
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<SearchResults searchString={props.search.searchString} />
|
||||
<SearchResults searchString={props.search.searchString} searchResultsObj={props.searchResultsObj} />
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
@@ -49,7 +49,8 @@ export const getServerSideProps = wrapper.getServerSideProps (
|
||||
store => async({ query, req, res }) =>
|
||||
{
|
||||
console.log('query-',query);
|
||||
const searchResults = await getBasicSearch(query.q)
|
||||
const searchResultsObj = await getBasicSearch(query.q) || null;
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearch(query.q));
|
||||
}
|
||||
);
|
||||
@@ -81,6 +82,7 @@ const mapStateToProps = (state) => {
|
||||
|
||||
return {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj
|
||||
// // apiroot: state.apiroot,
|
||||
// // courseListContent: state.courseListContent.courseListContent,
|
||||
// // pages: state.pages.pages,
|
||||
|
||||
Reference in New Issue
Block a user