Fixed zulässige Gesamtmasse
This commit is contained in:
parent
afeaa4159f
commit
77158bd635
|
@ -7,7 +7,7 @@ create table vehicles
|
|||
description text,
|
||||
next_inspection date,
|
||||
is_operational boolean default true not null,
|
||||
admissible_total_weight real,
|
||||
admissible_total_weight int,
|
||||
required_license text,
|
||||
constraint vehicles_pk
|
||||
primary key (entity_id),
|
||||
|
|
|
@ -59,6 +59,7 @@ VehicleModule = ( function() {
|
|||
var load_vehicle_details = function(){
|
||||
var tr = this;
|
||||
$("#vehicle_detailed_view > input").val("");
|
||||
$(".scheduler-tbody").html("");
|
||||
$("#vehicle_detailed_view").show();
|
||||
$(vehicle_list).each(function(){
|
||||
if(this.entity_id === $(tr).data("vehicle-id")){
|
||||
|
@ -81,7 +82,6 @@ VehicleModule = ( function() {
|
|||
},
|
||||
success: function (data) {
|
||||
if(is_ok(data)) {
|
||||
console.log(data);
|
||||
if(data){
|
||||
$(".scheduler").show();
|
||||
$(".scheduler_add_appointment_entity_id").val(entity_id);
|
||||
|
@ -108,14 +108,13 @@ VehicleModule = ( function() {
|
|||
vehicle.is_operational = false;
|
||||
}
|
||||
if($("#vehicle_detailed_view_admissable_total_weight_input").val().length > 0){
|
||||
//vehicle.admissible_total_weight = $("#vehicle_detailed_view_admissable_total_weight_input").val();
|
||||
vehicle.admissible_total_weight = parseInt($("#vehicle_detailed_view_admissable_total_weight_input").val());
|
||||
}
|
||||
if($("#vehicle_detailed_view_category_input option:selected").data("category-id") !== null){
|
||||
vehicle.vehicle_category = $("#vehicle_detailed_view_category_input option:selected").data("category-id");
|
||||
}
|
||||
vehicle.entity_id = $("#vehicle_detailed_view_entity_id").val();
|
||||
|
||||
console.log(vehicle);
|
||||
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
|
@ -128,7 +127,7 @@ VehicleModule = ( function() {
|
|||
},
|
||||
success: function (data) {
|
||||
if(is_ok(data)) {
|
||||
alert("OK!");
|
||||
window.location.reload(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1 +1 @@
|
|||
v0.1-23-g2736772
|
||||
v0.1-24-gafeaa41
|
||||
|
|
|
@ -11,7 +11,7 @@ pub struct Vehicle{
|
|||
pub(crate) numberplate: Option<String>,
|
||||
pub(crate) description: Option<String>,
|
||||
pub(crate) is_operational: bool,
|
||||
pub(crate) admissible_total_weight: Option<f32>,
|
||||
pub(crate) admissible_total_weight: Option<i32>,
|
||||
pub(crate) required_license: Option<String>,
|
||||
pub(crate) vehicle_category: Option<uuid::Uuid>,
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ pub struct CreateVehicleData{
|
|||
pub(crate) description: Option<String>,
|
||||
pub(crate) next_inspection: Option<String>,
|
||||
pub(crate) is_operational: bool,
|
||||
pub(crate) admissible_total_weight: Option<f32>,
|
||||
pub(crate) admissible_total_weight: Option<i32>,
|
||||
pub(crate) vehicle_category: Option<String>,
|
||||
pub(crate) required_license: Option<String>,
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ table! {
|
|||
numberplate -> Nullable<Text>,
|
||||
description -> Nullable<Text>,
|
||||
is_operational -> Bool,
|
||||
admissible_total_weight -> Nullable<Float4>,
|
||||
admissible_total_weight -> Nullable<Int4>,
|
||||
required_license -> Nullable<Text>,
|
||||
vehicle_category -> Nullable<Uuid>,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue