Preorder fix attribute statusflag

This commit is contained in:
Luca Haid
2025-01-21 13:18:50 +00:00
parent eaa885e97d
commit ee7c1469f5
3 changed files with 52 additions and 5 deletions
+22
View File
@@ -502,6 +502,28 @@ $pagination_entity_name = "Vorbestellungen";
"json"
);
// if attribute is inhouse_cabling_supplied and is checked or unchecked send an api request
// api
// do: setStatusFlag, preorder_id, flag_id: 1, value (0 or 1)
if (attrib == "inhouse_cabling_supplied") {
var flag_id = 1;
$.post("<?=self::getUrl("Preorder", "Api")?>", {
do: "setStatusFlag",
preorder_id: preorder_id,
flag_id: flag_id,
value: value
},
function(success) {
if(success.status == "OK") {
attributeSuccess(success.result);
} else {
attributeError(success.result.id, success.result.attribute);
}
},
"json"
);
}
});
});
});