Merge branch 'develop'
commit
d55883a8cf
|
@ -104,10 +104,10 @@ const EquipmentTracking = ({ setRedirect, setRedirectUrl, t }) => {
|
||||||
return response.json();
|
return response.json();
|
||||||
}).then(json => {
|
}).then(json => {
|
||||||
if (isSecondResponseOK) {
|
if (isSecondResponseOK) {
|
||||||
json = JSON.parse(JSON.stringify([json]).split('"id":').join('"value":').split('"name":').join('"label":'));
|
let json_equipments = JSON.parse(JSON.stringify([json['equipments']]).split('"id":').join('"value":').split('"name":').join('"label":'));
|
||||||
console.log(json)
|
console.log(json)
|
||||||
let equipments = [];
|
let equipments = [];
|
||||||
json[0].forEach((currentValue, index) => {
|
json_equipments[0].forEach((currentValue, index) => {
|
||||||
equipments.push({
|
equipments.push({
|
||||||
'key': index,
|
'key': index,
|
||||||
'id': currentValue['id'],
|
'id': currentValue['id'],
|
||||||
|
@ -117,6 +117,9 @@ const EquipmentTracking = ({ setRedirect, setRedirectUrl, t }) => {
|
||||||
'description': currentValue['description']});
|
'description': currentValue['description']});
|
||||||
});
|
});
|
||||||
setEquipmentList(equipments);
|
setEquipmentList(equipments);
|
||||||
|
|
||||||
|
setExcelBytesBase64(json['excel_bytes_base64']);
|
||||||
|
|
||||||
// hide spinner
|
// hide spinner
|
||||||
setSpinnerHidden(true);
|
setSpinnerHidden(true);
|
||||||
// show export buttion
|
// show export buttion
|
||||||
|
|
Loading…
Reference in New Issue