defect fixes
This commit is contained in:
+10
-10
@@ -1,8 +1,8 @@
|
||||
RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||
RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||
RELAYPATH = "dev-pedw-hc"
|
||||
SASKEY = "Ml0Y/S/nfRcmIrHFRkO4jNm2J3iH52TSxPiak7+E1+Y="
|
||||
SASKEYNAME = "devpedwnspolicy"
|
||||
//RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||
//RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||
//RELAYPATH = "dev-pedw-hc"
|
||||
//SASKEY = "Ml0Y/S/nfRcmIrHFRkO4jNm2J3iH52TSxPiak7+E1+Y="
|
||||
//SASKEYNAME = "devpedwnspolicy"
|
||||
|
||||
|
||||
PORT= "3000"
|
||||
@@ -14,8 +14,8 @@ I18N_DOMAIN = "cymru.local"
|
||||
//I18N_DOMAIN ="gwaithcynllunio.gwasanaeth.llyw.cymru"
|
||||
|
||||
|
||||
//RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
||||
//RELAYURI = "test-pedw-ns.servicebus.windows.net"
|
||||
//RELAYPATH = "test-pedw-hc"
|
||||
//SASKEY = "kTLrs9UHwuW9Msc9uNfjf+89qLYT6ly80lK0zdTYJW4="
|
||||
//SASKEYNAME = "testpedwhcpolicy"
|
||||
RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
||||
RELAYURI = "test-pedw-ns.servicebus.windows.net"
|
||||
RELAYPATH = "test-pedw-hc"
|
||||
SASKEY = "kTLrs9UHwuW9Msc9uNfjf+89qLYT6ly80lK0zdTYJW4="
|
||||
SASKEYNAME = "testpedwhcpolicy"
|
||||
|
||||
+8
-7
@@ -166,7 +166,7 @@ export const getBasicDNSSearch = (token, searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
||||
"accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
||||
azureHeaders(token)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
@@ -209,7 +209,7 @@ export const getAdvancedSearch = (token, searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title&$filter=" +
|
||||
"incidents?$select=_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||
queryString +
|
||||
" and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true&$top=201",
|
||||
|
||||
@@ -238,6 +238,7 @@ export const getBasicSearchDetails = (token, appealType, caseReference) => {
|
||||
};
|
||||
|
||||
export const getSearchDocumentDetails = (token, incidentID) => {
|
||||
console.log(incidentID);
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
@@ -267,13 +268,13 @@ export const getSearchDocumentHistory = (token, documentID) => {
|
||||
};
|
||||
|
||||
export const getSearchDocumentDetails1 = (incidentID) => {
|
||||
//console.log(incidentID);
|
||||
var token = getSASToken();
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/pinswg_documents?$count=true&$filter=_pinswg_documentids_value eq " +
|
||||
"/api/proxy/pinswg_documents?$count=true&$filter=pinswg_publishtoweb eq true and _pinswg_documentids_value eq " +
|
||||
incidentID +
|
||||
" and pinswg_publishtoweb eq true&$select=pinswg_isharedocumentlocations,_pinswg_documentids_value,pinswg_isharelabelcasetype,pinswg_isharelabellpaname,pinswg_publishtoweb,pinswg_uploadstatus,pinswg_isharedocumentclassification,pinswg_isharedocumentreference",
|
||||
azureHeaders(token)
|
||||
"&$select=pinswg_isharedocumentlocations,_pinswg_documentids_value,pinswg_isharelabelcasetype,pinswg_isharelabellpaname,pinswg_publishtoweb,pinswg_uploadstatus,pinswg_isharedocumentclassification,pinswg_isharedocumentreference"
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
@@ -282,12 +283,12 @@ export const getSearchDocumentDetails1 = (incidentID) => {
|
||||
};
|
||||
|
||||
export const getSearchDocumentHistory1 = (documentID) => {
|
||||
console.log(documentID);
|
||||
var token = getSASToken();
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/pinswg_documenthistories?$count=true&$select=_pinswg_documentid_value,pinswg_createddate,pinswg_state,pinswg_fileexists,statecode,pinswg_publisheddate&$filter=_pinswg_documentid_value eq " +
|
||||
documentID,
|
||||
azureHeaders(token)
|
||||
documentID
|
||||
)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
"appealTypes": [
|
||||
{
|
||||
"value": "Planning Appeal - S78",
|
||||
"value_cy": "Apêl Cynllunio - S78",
|
||||
"value_cy": "Apêl Gynllunio - A78",
|
||||
"stringmapid": "cb4aa9f2-e275-eb11-aabd-00224800be9c",
|
||||
"attributevalue": 846040000
|
||||
},
|
||||
{
|
||||
"value": "Planning Conditions - S73 + S79",
|
||||
"value_cy": "Amodau Cynllunio - S73 + S79",
|
||||
"value_cy": "Amodau Cynllunio - A73 + A79",
|
||||
"stringmapid": "cc4aa9f2-e275-eb11-aabd-00224800be9c",
|
||||
"attributevalue": 846040001
|
||||
},
|
||||
{
|
||||
"value": "Planning Obligation Appeal - S106",
|
||||
"value_cy": "Apêl Rhwymedigaeth Cynllunio - S106",
|
||||
"value_cy": "Apêl Rhwymedigaeth Gynllunio - A106",
|
||||
"stringmapid": "ce4aa9f2-e275-eb11-aabd-00224800be9c",
|
||||
"attributevalue": 846040003
|
||||
},
|
||||
@@ -26,43 +26,43 @@
|
||||
},
|
||||
{
|
||||
"value": "Enforcement Notice Appeal - S174",
|
||||
"value_cy": "Apêl Rhybudd Gorfodi - S174",
|
||||
"value_cy": "Apêl Hysbysiad Gorfodi - A174",
|
||||
"stringmapid": "b656f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040005
|
||||
},
|
||||
{
|
||||
"value": "Enforcement Listed Building and Conservation Appeal - S39",
|
||||
"value_cy": "Apêl Adeiladu a Chadwraeth Rhestredig Gorfodi - S39",
|
||||
"value_cy": "Apêl Gorfodi Adeilad Rhestredig ac Ardal Gadwraeth - A39",
|
||||
"stringmapid": "b756f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040006
|
||||
},
|
||||
{
|
||||
"value": "Maintenance of Land - S217",
|
||||
"value_cy": "Cynnal a Chadw Tir - S217",
|
||||
"value_cy": "Cynnal a Chadw Tir - A217",
|
||||
"stringmapid": "b856f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040007
|
||||
},
|
||||
{
|
||||
"value": "Lawful Development Certificate Appeal - S194 + 195",
|
||||
"value_cy": "Apêl Tystysgrif Datblygu Cyfreithlon - S194 + 195",
|
||||
"value_cy": "Apêl Tystysgrif Datblygiad Cyfreithlon - A194 + 195",
|
||||
"stringmapid": "b956f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040008
|
||||
},
|
||||
{
|
||||
"value": "Community Infrastructure Levy - S117, 118, & 119",
|
||||
"value_cy": "Ardoll Seilwaith Cymunedol - S117, 118, & 119",
|
||||
"value_cy": "Ardoll Seilwaith Cymunedol - A117 , 118 & 119",
|
||||
"stringmapid": "ba56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040009
|
||||
},
|
||||
{
|
||||
"value": "Call-Ins - S77",
|
||||
"value_cy": "Galw-i-Mewn - S77",
|
||||
"value_cy": "Galwadau i Mewn - A77",
|
||||
"stringmapid": "bb56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040010
|
||||
},
|
||||
{
|
||||
"value": "DNS",
|
||||
"value_cy": "DNS",
|
||||
"value_cy": "Datblygiadau o Arwyddocâd Cenedlaethol",
|
||||
"stringmapid": "bc56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040011
|
||||
},
|
||||
@@ -74,31 +74,31 @@
|
||||
},
|
||||
{
|
||||
"value": "Transport and Works Act",
|
||||
"value_cy": "Deddf Trafnidiaeth a Gwaith",
|
||||
"value_cy": "Deddf Trafnidiaeth a Gweithfeydd",
|
||||
"stringmapid": "be56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040013
|
||||
},
|
||||
{
|
||||
"value": "Harbour Revision Order",
|
||||
"value_cy": "Gorchymyn Adolygu'r Harbwr",
|
||||
"value_cy": "Gorchymyn Diwygio Harbwr",
|
||||
"stringmapid": "bf56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040014
|
||||
},
|
||||
{
|
||||
"value": "ROW",
|
||||
"value_cy": "ROW",
|
||||
"value_cy": "Hawliau Tramwy",
|
||||
"stringmapid": "c056f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040015
|
||||
},
|
||||
{
|
||||
"value": "Common Land",
|
||||
"value_cy": "Tir Cyffredin",
|
||||
"value_cy": "Tir Comin",
|
||||
"stringmapid": "c156f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040016
|
||||
},
|
||||
{
|
||||
"value": "High Hedges, Tree Preservation orders, Hedgerows, Tree Replacement Notice.",
|
||||
"value_cy": "Gwrychoedd Uchel, Gorchmynion Cadw Coed, Gwrychoedd, Rhybudd Amnewid Coed.",
|
||||
"value_cy": "Gwrychoedd neu Berthi Uchel, Gorchmynion Cadw Coed, Perthi/Gwrychoedd, Hysbysiadau Ailblannu Coed",
|
||||
"stringmapid": "c256f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040017
|
||||
},
|
||||
@@ -116,13 +116,13 @@
|
||||
},
|
||||
{
|
||||
"value": "Environmental Permitting",
|
||||
"value_cy": "Caniatáu Amgylcheddol",
|
||||
"value_cy": "Trwyddedu Amgylcheddol",
|
||||
"stringmapid": "c556f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040020
|
||||
},
|
||||
{
|
||||
"value": "Wayleave",
|
||||
"value_cy": "Wayleave",
|
||||
"value_cy": "Fforddfreintiau",
|
||||
"stringmapid": "c656f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040021
|
||||
},
|
||||
@@ -134,19 +134,19 @@
|
||||
},
|
||||
{
|
||||
"value": "LDP",
|
||||
"value_cy": "LDP",
|
||||
"value_cy": "Cynlluniau Datblygu Lleol",
|
||||
"stringmapid": "c856f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040023
|
||||
},
|
||||
{
|
||||
"value": "Non-Validation",
|
||||
"value_cy": "Peidio â dilysu",
|
||||
"value_cy": "Barnu’n Annilys",
|
||||
"stringmapid": "c956f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040024
|
||||
},
|
||||
{
|
||||
"value": "Listed Building and Conservation Area Consent S73 + S79",
|
||||
"value_cy": "Cydsyniad Ardal Adeiladu a Chadwraeth Rhestredig S73 + S79",
|
||||
"value_cy": "Caniatâd Adeilad Rhestredig ac Ardal Gadwraeth - A20",
|
||||
"stringmapid": "977522df-8aef-eb11-aac7-00224800be9c",
|
||||
"attributevalue": 846040025
|
||||
}
|
||||
@@ -154,17 +154,17 @@
|
||||
"statusCodes": [
|
||||
{
|
||||
"value": "Active",
|
||||
"value_cy": "Egnïol",
|
||||
"value_cy": "Gweithredol",
|
||||
"statuscode": 1
|
||||
},
|
||||
{
|
||||
"value": "In Progress",
|
||||
"value_cy": "Ar y gweill",
|
||||
"value_cy": "Ar Waith",
|
||||
"statuscode": 2
|
||||
},
|
||||
{
|
||||
"value": "On Hold",
|
||||
"value_cy": "Ar Ddal",
|
||||
"value_cy": "Wedi’i Ohirio",
|
||||
"statuscode": 3
|
||||
},
|
||||
{
|
||||
@@ -179,14 +179,14 @@
|
||||
},
|
||||
{
|
||||
"value": "Problem Solved",
|
||||
"value_cy": "Datrys Problemau",
|
||||
"value_cy": "Problem wedi’i Datrys",
|
||||
"statuscode": 6
|
||||
}
|
||||
],
|
||||
"pinswg_decision": [
|
||||
{
|
||||
"value": "Dismissed",
|
||||
"value_cy": "Diswyddo",
|
||||
"value_cy": "Gwrthodwyd",
|
||||
"pinswg_decision": 846040001
|
||||
},
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"summary-status-label": "Statws",
|
||||
"summary-decision-label": "Penderfyniad a chanlyniad",
|
||||
"summary-case-link-status-label": "Statws cysylltiad yr Achos",
|
||||
"summary-case-link-status-not-linked": "Heb gysylltiad",
|
||||
"summary-case-link-status-not-linked": "Heb ei Gysylltu",
|
||||
"summary-linked-cases-label": "Achosion cysylltiedig",
|
||||
"summary-dates-label": "Dyddiadau",
|
||||
"summary-no-date-entered-label": "dim dyddiad wedi'i nodi",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"login-card-title-temp": "Croeso",
|
||||
"login-comingsoon-temp-1": "Mae'r wefan hon yn dal i gael ei datblygu, os ydych am gyflwyno apêl neu gais newydd, cyflwynwch hi, ynghyd ag unrhyw ddogfennaeth berthnasol, i ",
|
||||
"login-comingsoon-temp-2": "Gellir gofyn am ffurflenni apelio a chais trwy e-bost neu eu lawrlwytho gan ddilyn y ddolen isod.",
|
||||
"login-comingsoon-temp-1": "Mae’r wefan hon yn cael ei datblygu o hyd. Os hoffech gyflwyno apêl neu gais newydd, neu wneud sylwadau ar un sydd eisoes yn bodoli, cyflwynwch yr apêl, y cais neu’r sylwadau, ynghyd ag unrhyw ddogfennau cysylltiedig perthnasol, i ",
|
||||
"login-comingsoon-temp-2": "Gellir gofyn am ffurflenni apelio a ffurflenni cais trwy e-bost neu gellir eu lawrlwytho trwy ddilyn y ddolen isod. ",
|
||||
"login-card-title": "Mewngofnodi i apelio yn erbyn penderfyniad cynllunio",
|
||||
"login-card-id-label": "Dynodydd Defnyddiwr (ID) Porth y Llywodraeth",
|
||||
"login-card-id-hint": "Gallai hyn fod hyd at 12 o gymeriadau.",
|
||||
@@ -11,16 +11,16 @@
|
||||
"login-card-register-link": "Gofrestru",
|
||||
"login-card-forgotten-label": "Rwyf wedi anghofio fy nghyfrinair",
|
||||
"login-card-forgotten-link": "Cliciwch yma",
|
||||
"casesearch-card-title": "Chwilio am achos",
|
||||
"casesearch-card-title": "Chwilio am ddogfennau apêl",
|
||||
"casesearch-card-search-hint": "Chwiliwch drwy roi cyfeirnod 7 digid yr achos",
|
||||
"casesearch-card-search-example-label": "Enghraifft:",
|
||||
"casesearch-card-button": "Cyflwyno chwiliad",
|
||||
"casesearch-card-advanced-link": "Fel arall, gallwch chwilio gan ddefnyddio ein meini prawf eraill gyda'n chwiliad uwch",
|
||||
"casesearch-search-validation-required": "Angenrheidiol",
|
||||
"casesearch-search-validation-minlength": "Rhaid bod yn 4 nod neu fwy",
|
||||
"casescomment-card-title": "Gwneud sylw ar achos",
|
||||
"casescomment-card-paragraph-one": "Yn syml, chwiliwch am eich achos i weld y ddogfennaeth sy'n gysylltiedig â'r achos. Yna cyflwynwch eich cynrychiolaeth i ",
|
||||
"casescomment-card-paragraph-two": "Ar gyfer apeliadau Deiliaid Tai a Masnachol, ni all partïon â diddordeb gyflwyno sylwadau yn ystod y cam apelio. Bydd unrhyw sylwadau a wneir yn ystod y cam ymgeisio yn cael eu darparu gan yr awdurdod cynllunio lleol a'u hystyried gan yr arolygydd.",
|
||||
"casescomment-card-title": "Cyflwyno neu Wneud Sylwadau ar Apêl/Cais",
|
||||
"casescomment-card-paragraph-one": "Os hoffech gyflwyno apêl neu gais newydd, neu wneud sylwadau ar un sydd eisoes yn bodoli, cyflwynwch yr apêl, y cais neu’r sylwadau, ynghyd ag unrhyw ddogfennau cysylltiedig perthnasol, i ",
|
||||
"casescomment-card-paragraph-two": "O ran apeliadau Deiliaid Tai a Masnachol, ni all partïon â buddiant wneud sylwadau yn ystod y cam apêl. Bydd unrhyw sylwadau a wnaed yn ystod y cam ymgeisio’n cael eu darparu gan yr awdurdod cynllunio lleol a’u hystyried gan yr arolygydd.",
|
||||
"inspectorate-card-visit-label": "Ymweld Yr Arolygiaeth Gynllunio",
|
||||
"inspectorate-card-visit-link": "Hafan",
|
||||
"dns-card-title": "Datblygiadau o Arwyddocâd Cenedlaethol",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"login-card-title-temp": "Welcome",
|
||||
"login-comingsoon-temp-1": "This website is still in development, if you wish to submit a new appeal or application please submit it, along with any relevant documentation, to ",
|
||||
"login-comingsoon-temp-2": "Appeal and application forms can be requested by email or downloaded following the below link.",
|
||||
"login-comingsoon-temp-1": "This website is still in development, if you wish to submit a new appeal or application please submit it, along with any relevant associated documentation, to ",
|
||||
"login-comingsoon-temp-2": "Appeal and application forms can be requested by e-mail or downloaded following the below link.",
|
||||
"login-card-title": "Sign in to appeal a planning decision",
|
||||
"login-card-id-label": "Government Gateway user ID",
|
||||
"login-card-id-hint": "This could be up to 12 characters.",
|
||||
@@ -11,15 +11,15 @@
|
||||
"login-card-register-link": "Register",
|
||||
"login-card-forgotten-label": "I have forgotten my password",
|
||||
"login-card-forgotten-link": "Click here",
|
||||
"casesearch-card-title": "Search for a case",
|
||||
"casesearch-card-title": "Appeal documentation search",
|
||||
"casesearch-card-search-hint": "Search by entering the 7 digit case reference number",
|
||||
"casesearch-card-search-example-label": "Example:",
|
||||
"casesearch-card-button": "Submit search",
|
||||
"casesearch-card-advanced-link": "Advanced search",
|
||||
"casesearch-search-validation-required": "Required",
|
||||
"casesearch-search-validation-minlength": "Must be 4 characters or more",
|
||||
"casescomment-card-title": "Comment on a case",
|
||||
"casescomment-card-paragraph-one": "Simply search for your case to view the documentation associated to the case. Then submit your representation to ",
|
||||
"casescomment-card-title": "Lodge or Comment on an Appeal/Application",
|
||||
"casescomment-card-paragraph-one": "If you wish to submit a new appeal or application, or comment on an existing one, please submit it, along with any relevant associated documentation, to ",
|
||||
"casescomment-card-paragraph-two": "For Householder and Commercial appeals, interested parties are unable to make representations at appeal stage. Any representations made at application stage will be provided by the local planning authority and considered by the inspector.",
|
||||
"inspectorate-card-visit-label": "Visit the Planning Inspectorate",
|
||||
"inspectorate-card-visit-link": "Home",
|
||||
|
||||
@@ -78,21 +78,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
token,
|
||||
searchResultsObj
|
||||
);
|
||||
const searchDocumentResultsObj = await getDocumentDetails(
|
||||
token,
|
||||
searchResultsObj
|
||||
);
|
||||
|
||||
const searchDocumentHistoryObj = await getDocumentHistory(
|
||||
token,
|
||||
searchDocumentResultsObj
|
||||
);
|
||||
//console.log(searchDocumentHistoryObj);
|
||||
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
store.dispatch(setDocumentDetails(searchDocumentResultsObj));
|
||||
store.dispatch(setDocumentHistory(searchDocumentHistoryObj));
|
||||
}
|
||||
);
|
||||
|
||||
@@ -136,51 +124,6 @@ const getSearchDetails = (token, searchResultsObj) => {
|
||||
return Promise.all(detailsArr);
|
||||
};
|
||||
|
||||
const getDocumentDetails = (token, searchResultsObj) => {
|
||||
//console.log(searchResultsObj);
|
||||
|
||||
let detailsArr = [];
|
||||
//console.log("search results", searchResultsObj);
|
||||
searchResultsObj = searchResultsObj.value;
|
||||
const detailsObj = searchResultsObj.map((searchDetail, index) => {
|
||||
if (searchDetail.pinswg_appealcasetype == null) {
|
||||
console.log(searchDetail.incidentid);
|
||||
} else {
|
||||
detailsArr.push(
|
||||
getSearchDocumentDetails(token, searchDetail.incidentid)
|
||||
);
|
||||
}
|
||||
});
|
||||
//console.log(detailsArr);
|
||||
return Promise.all(detailsArr);
|
||||
};
|
||||
|
||||
const getDocumentHistory = (token, searchDocumentDetailsObj) => {
|
||||
//console.log(searchResultsObj);
|
||||
|
||||
let historyArr = [];
|
||||
//console.log("search results", searchDocumentDetailsObj);
|
||||
searchDocumentDetailsObj = searchDocumentDetailsObj[0].value;
|
||||
|
||||
//console.log(searchDocumentDetailsObj);
|
||||
const detailsObj = searchDocumentDetailsObj.map((historyDetail, index) => {
|
||||
//console.log(historyDetail);
|
||||
if (historyDetail.pinswg_publishtoweb != true) {
|
||||
console.log(historyDetail.pinswg_documentid);
|
||||
} else {
|
||||
// console.log(
|
||||
// "history detail documentid:",
|
||||
// historyDetail.pinswg_documentid
|
||||
// );
|
||||
historyArr.push(
|
||||
getSearchDocumentHistory(token, historyDetail.pinswg_documentid)
|
||||
);
|
||||
}
|
||||
});
|
||||
console.log(historyArr);
|
||||
return Promise.all(historyArr);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
currentView: state.currentView,
|
||||
|
||||
@@ -2,18 +2,9 @@ import axios from "axios";
|
||||
import https from "https";
|
||||
import CryptoJS from "crypto-js";
|
||||
|
||||
const WEBAPI_URL = "https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
// const azureHeaders = {
|
||||
// headers: {
|
||||
// "OData-MaxVersion": "4.0",
|
||||
// "OData-Version": "4.0",
|
||||
// "Accept": "application/json",
|
||||
// "Prefer": 'odata.include-annotations="*",return=representation',
|
||||
// "Content-Type": "application/json",
|
||||
// "ServiceBusAuthorization": SASToken,
|
||||
// },
|
||||
// };
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
const getSASToken = () => {
|
||||
var m_ResourceURI = "dev-pedw-ns.servicebus.windows.net";
|
||||
@@ -52,7 +43,7 @@ const getSASToken = () => {
|
||||
};
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
// console.log(req.method);
|
||||
console.log(req.method);
|
||||
|
||||
var updateBody = {
|
||||
"pinswg_areaofsiteinhectaresdec": 21,
|
||||
@@ -104,14 +95,14 @@ export default async function ApiProxy(req, res) {
|
||||
console.log(req.url.split("/api/proxy/")[1]);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
// console.log(config);
|
||||
//console.log(config);
|
||||
axios(req.method == "GET" ? configNoData : config)
|
||||
.then((response) => {
|
||||
res.statusCode = 200;
|
||||
res.setHeader("Content-Type", "application/json");
|
||||
res.setHeader("Cache-Control", "max-age=1800000");
|
||||
res.end(JSON.stringify(response.data));
|
||||
// console.log("response data", response.data);
|
||||
//console.log("response data", response.data);
|
||||
resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user