diff --git a/Layout/default/Device/Form.php b/Layout/default/Device/Form.php index 12aa22a09..caacef2ca 100644 --- a/Layout/default/Device/Form.php +++ b/Layout/default/Device/Form.php @@ -177,8 +177,18 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "device-detail") { +
+ +
+
+ autobackup == "1") ? "checked='checked'" : "" ?> class="custom-control-input" value="1" id="autobackup" name="autobackup"> + +
+
+
+
diff --git a/Layout/default/Device/Index.php b/Layout/default/Device/Index.php index 139ad0155..15c4fc105 100644 --- a/Layout/default/Device/Index.php +++ b/Layout/default/Device/Index.php @@ -67,7 +67,7 @@ $pagination_entity_name = "Device"; - + @@ -97,7 +97,9 @@ $pagination_entity_name = "Device"; } else { $backup = 'N/A'; } - + if ($device->autobackup==1) { + $backup = 'Auto'.$backup; + } if ($device->pop->id) { $destination = ' $device->pop->id]) . '">' . $device->pop->name . ''; } else if ($device->addr_street) { @@ -153,7 +155,7 @@ $pagination_entity_name = "Device"; var columndefs = {type: 'ip-address', targets: 4}; var columnfilter = [9]; - var columnoptions = ''; + var columnoptions = ''; $(document).ready(function () { }); diff --git a/application/Api/v1/DeviceApicontroller.php b/application/Api/v1/DeviceApicontroller.php index f2ceaad0d..c0a57c055 100644 --- a/application/Api/v1/DeviceApicontroller.php +++ b/application/Api/v1/DeviceApicontroller.php @@ -21,6 +21,7 @@ class DeviceApicontroller extends mfBaseApicontroller $deviceReturn[$key]['serial'] = $device->serial; $deviceReturn[$key]['last_config_backup'] = $device->last_config_backup; $deviceReturn[$key]['manufactor'] = $device->devicetype->devicemanufactor->name; + $deviceReturn[$key]['autobackup'] = $device->autobackup; } diff --git a/application/Device/DeviceController.php b/application/Device/DeviceController.php index 8c54f89e2..35b43e57f 100644 --- a/application/Device/DeviceController.php +++ b/application/Device/DeviceController.php @@ -102,6 +102,8 @@ class DeviceController extends mfBaseController $data = []; $data['name'] = trim($r->name); $data['devicetype_id'] = $r->devicetype_id; + $data['autobackup'] = trim($r->autobackup); + if (trim($r->pop_id) == "0") { $data['pop_id'] = NULL; } else { @@ -127,6 +129,9 @@ class DeviceController extends mfBaseController $data['gps_lat'] = $r->gps_lat; $data['gps_long'] = $r->gps_long; } + if ($data['autobackup'] != "1") { + $data['autobackup'] = "0"; + } $data['ip'] = $r->ip; $data['mac'] = $r->mac; $data['serial'] = $r->serial; diff --git a/application/Device/DeviceModel.php b/application/Device/DeviceModel.php index af124e74b..05a0d9bb6 100644 --- a/application/Device/DeviceModel.php +++ b/application/Device/DeviceModel.php @@ -16,6 +16,7 @@ class DeviceModel public $gps_lat = null; public $addr_city = null; public $gps_long = null; + public $autobackup = null; public $create_by = null; public $snmp_version = null; public $edit_by = null; diff --git a/application/TimerecordingCategory/TimerecordingCategoryModel.php b/application/TimerecordingCategory/TimerecordingCategoryModel.php index 5ff7f26f5..a4c7f0d2a 100644 --- a/application/TimerecordingCategory/TimerecordingCategoryModel.php +++ b/application/TimerecordingCategory/TimerecordingCategoryModel.php @@ -9,7 +9,7 @@ class TimerecordingCategoryModel private $require_comment; private $only_admin; private $businesstrip; - public static $hourday_definition = array(1 => "Uhrzeit (von/bis)", 2 => "Tage (von/bis)", 3 => "Startdatum", 4 => "Enddatum", 5 => "Anzahl Tage"); + public static $hourday_definition = array(1 => "Uhrzeit (von/bis)", 2 => "Tage (von/bis)", 3 => "Startdatum", 4 => "Enddatum", 5 => "Anzahl Tage", 6 => "ZA Stunden"); public static $approval_definition = array(0 => "Nein", 1 => "Ja"); public static $require_comment_definition = array(0 => "Nein", 1 => "Ja"); public static $businesstrip_definition = array(0 => "Nein", 1 => "Ja"); diff --git a/db/migrations/20240307112945_timerecording_add_field_enddate.php b/db/migrations/20240307112945_timerecording_add_field_enddate.php new file mode 100644 index 000000000..303b975b4 --- /dev/null +++ b/db/migrations/20240307112945_timerecording_add_field_enddate.php @@ -0,0 +1,31 @@ +getEnvironment() == "thetool") { + $table = $this->table("TimerecordingEmployee", ["signed" => true]); + $table->addColumn("enddate", "integer", ["null" => true,"default" => NULL, "after" => "startdate"]); + $table->update(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + $this->table("TimerecordingEmployee")->removeColumn("enddate")->save(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } +} diff --git a/db/migrations/20240307123050_timerecording_add_field_hours.php b/db/migrations/20240307123050_timerecording_add_field_hours.php new file mode 100644 index 000000000..0add6d1fc --- /dev/null +++ b/db/migrations/20240307123050_timerecording_add_field_hours.php @@ -0,0 +1,31 @@ +getEnvironment() == "thetool") { + $table = $this->table("Timerecording", ["signed" => true]); + $table->addColumn("hours", "integer", ["null" => true, "default" => NULL, "after" => "end"]); + $table->update(); + } + + if ($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if ($this->getEnvironment() == "thetool") { + $this->table("Timerecording")->removeColumn("hours")->save(); + } + + if ($this->getEnvironment() == "addressdb") { + + } + } +} diff --git a/db/migrations/20240310193146_device_add_field_autobackup.php b/db/migrations/20240310193146_device_add_field_autobackup.php new file mode 100644 index 000000000..f8634094b --- /dev/null +++ b/db/migrations/20240310193146_device_add_field_autobackup.php @@ -0,0 +1,31 @@ +getEnvironment() == "thetool") { + $table = $this->table("Device", ["signed" => true]); + $table->addColumn("autobackup", "integer", ["null" => false, "default" => '0', "after" => "last_config_backup"]); + $table->update(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + $this->table("Device")->removeColumn("autobackup")->save(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } +} diff --git a/public/assets/css/datatables-std.css b/public/assets/css/datatables-std.css index 06364cc9e..64ed2180c 100644 --- a/public/assets/css/datatables-std.css +++ b/public/assets/css/datatables-std.css @@ -107,7 +107,7 @@ table.dataTable > tbody > tr.child span.dtr-data { font-size: 15px; } -.fa-circle-check { +.fa-circle-check,.fa-circle-a { color: #23b900; font-size: 15px; } @@ -151,6 +151,13 @@ table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) { min-width: 150px; } +.no-user-select { + -ms-user-select: None; + -moz-user-select: None; + -webkit-user-select: None; + user-select: None; +} + @media (max-width: 1200px) { .fa-circle-xmark, .fa-ban, .fa-trash, .fa-edit, .fa-square-check, .fa-arrows-up-down-left-right { font-size: 25px;