resolve conflict

This commit is contained in:
Cayo Puigdefabregas 2022-05-16 18:33:34 +02:00
commit edeae562d6
3 changed files with 9 additions and 9 deletions

View File

@ -40,10 +40,10 @@ from ereuse_devicehub.resources.action.views.snapshot import (
from ereuse_devicehub.resources.device.models import (
SAI,
Cellphone,
ComputerMonitor,
Device,
Keyboard,
MemoryCardReader,
Monitor,
Mouse,
Smartphone,
Tablet,
@ -127,7 +127,7 @@ class FilterForm(FlaskForm):
# Generic Filters
if "All Devices" == self.device_type:
filter_type = COMPUTERS + ["Monitor"] + MOBILE
filter_type = COMPUTERS + MONITORS + MOBILE
elif "All Computers" == self.device_type:
filter_type = COMPUTERS
@ -305,7 +305,7 @@ class NewDeviceForm(FlaskForm):
"Smartphone": Smartphone,
"Tablet": Tablet,
"Cellphone": Cellphone,
"Monitor": Monitor,
"ComputerMonitor": ComputerMonitor,
"Mouse": Mouse,
"Keyboard": Keyboard,
"SAI": SAI,
@ -421,7 +421,7 @@ class NewDeviceForm(FlaskForm):
path_snapshot = save_json(json_snapshot, self.tmp_snapshots, g.user.email)
snapshot_json = schema.load(json_snapshot)
if self.type.data == 'Monitor':
if self.type.data == 'ComputerMonitor':
snapshot_json['device'].resolution_width = self.resolution.data
snapshot_json['device'].size = self.screen.data
@ -432,7 +432,7 @@ class NewDeviceForm(FlaskForm):
snapshot = upload_form.build(snapshot_json)
move_json(self.tmp_snapshots, path_snapshot, g.user.email)
if self.type.data == 'Monitor':
if self.type.data == 'ComputerMonitor':
snapshot.device.resolution = self.resolution.data
snapshot.device.screen = self.screen.data

View File

@ -4,7 +4,7 @@ $(document).ready(() => {
})
function deviceInputs() {
if ($("#type").val() == "Monitor") {
if ($("#type").val() == "ComputerMonitor") {
$("#screen").show();
$("#resolution").show();
$("#imei").hide();

View File

@ -36,9 +36,9 @@
<label for="name" class="form-label">Type *</label>
<select id="type" class="form-control" name="type" required="">
<option value="">Select one Type</option>
<optgroup label="Computer Monitor">
<option value="Monitor"
{% if form.type.data == 'Monitor' %} selected="selected"{% endif %}>Monitor</option>
<optgroup label="Monitor">
<option value="ComputerMonitor"
{% if form.type.data == 'Monitor' %} selected="selected"{% endif %}>Computer Monitor</option>
</optgroup>
<optgroup label="Mobile">
<option value="Smartphone"