updates to make generic functions work
This commit is contained in:
@@ -6,6 +6,7 @@ class ChildRegistrationUtils {
|
||||
}
|
||||
|
||||
async registerChild(child, positionVsParent) {
|
||||
|
||||
const { softwareType } = child.config.functionality;
|
||||
const { name, id, unit } = child.config.general;
|
||||
const { type = "", subType = "" } = child.config.asset || {};
|
||||
@@ -28,24 +29,6 @@ class ChildRegistrationUtils {
|
||||
this.mainClass.child[softwareType][type][subType] = [];
|
||||
}
|
||||
|
||||
// Update the child in the cloud when available and supply the new child on base of tagcode OLIFANT WE NEED TO FIX THIS SO ITS DYNAMIC!
|
||||
/*
|
||||
try{
|
||||
const url = "https://pimmoerman.nl/rdlab/tagcode.app/v2.1/api/asset/create_asset.php?";
|
||||
const TagCode = child.config.asset.tagCode;
|
||||
//console.log(`Register child => ${TagCode}`);
|
||||
const completeURL = url + `asset_product_model_id=1&asset_product_model_uuid=123456789&asset_name=AssetNaam&asset_description=Beschrijving&asset_status=actief&asset_profile_id=1&asset_location_id=1&asset_process_id=11&asset_tag_number=${TagCode}&child_assets=[L6616]`;
|
||||
|
||||
await fetch(completeURL, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
}catch(e){
|
||||
console.log("Error saving assetID and tagnumber", e);
|
||||
}*/
|
||||
|
||||
// Push the new child to the array of the mainclass so we can track the childs
|
||||
this.mainClass.child[softwareType][type][subType].push({
|
||||
|
||||
Reference in New Issue
Block a user