|
|
|
@ -148,7 +148,59 @@ class Machine implements JsonSerializable {
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
return [];
|
|
|
|
|
return [
|
|
|
|
|
"status" => "OK",
|
|
|
|
|
"id" => "",
|
|
|
|
|
"icon" => "",
|
|
|
|
|
"type" => [
|
|
|
|
|
"id" => "",
|
|
|
|
|
"label" => ""
|
|
|
|
|
],
|
|
|
|
|
"clientinfo" => [],
|
|
|
|
|
"info" => [],
|
|
|
|
|
"events" => [],
|
|
|
|
|
"components" => [],
|
|
|
|
|
"formdata" => [
|
|
|
|
|
"options" => [
|
|
|
|
|
"clientid" => ["" => ""] + Clients::getAllAsIDNameArray(),
|
|
|
|
|
"type" => Machine::getTypeList()
|
|
|
|
|
],
|
|
|
|
|
"inputtypes" => [
|
|
|
|
|
"model" => "text",
|
|
|
|
|
"condition" => "number",
|
|
|
|
|
"price" => "number",
|
|
|
|
|
"os" => "text",
|
|
|
|
|
"serial" => "text",
|
|
|
|
|
"manufacturer" => "text",
|
|
|
|
|
"clientid" => "select",
|
|
|
|
|
"privatenotes" => "textarea",
|
|
|
|
|
"publicnotes" => "textarea",
|
|
|
|
|
"type" => "select"
|
|
|
|
|
],
|
|
|
|
|
"labels" => [
|
|
|
|
|
"model" => $Strings->get("Model", false),
|
|
|
|
|
"condition" => $Strings->get("Condition", false),
|
|
|
|
|
"price" => $Strings->get("Price", false),
|
|
|
|
|
"os" => $Strings->get("OS/Software", false),
|
|
|
|
|
"serial" => $Strings->get("Serial", false),
|
|
|
|
|
"manufacturer" => $Strings->get("Manufacturer", false),
|
|
|
|
|
"clientid" => $Strings->get("Client", false),
|
|
|
|
|
"privatenotes" => $Strings->get("Private Notes", false),
|
|
|
|
|
"publicnotes" => $Strings->get("Public Notes", false),
|
|
|
|
|
"type" => $Strings->get("Type", false)
|
|
|
|
|
],
|
|
|
|
|
"icons" => [
|
|
|
|
|
"model" => "fas fa-hashtag",
|
|
|
|
|
"condition" => "fas fa-star-half-alt",
|
|
|
|
|
"price" => "fas fa-money-bill-wave",
|
|
|
|
|
"os" => "fas fa-hdd",
|
|
|
|
|
"serial" => "fas fa-barcode",
|
|
|
|
|
"manufacturer" => "fas fa-industry",
|
|
|
|
|
"privatenotes" => "fas fa-comment-dots",
|
|
|
|
|
"publicnotes" => "far fa-comment-dots"
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function toHTMLListGroup(bool $public = true): string {
|
|
|
|
@ -233,7 +285,7 @@ class Machine implements JsonSerializable {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
if ($type == "ID") {
|
|
|
|
|
return "<b>" . $publicsettings["ID number label"] . ":</b> " . htmlspecialchars($this->getID()) . "<br />";
|
|
|
|
|
return "<b>" . $publicsettings["ID number label"] . ":</b> " . htmlspecialchars($this->getID()) . "<br />";
|
|
|
|
|
}
|
|
|
|
|
if (empty($this->{"get$type"}())) {
|
|
|
|
|
return "";
|
|
|
|
|