correct type errors
This commit is contained in:
parent
bdc139f37f
commit
d5c33d899f
5 changed files with 19 additions and 5 deletions
|
@ -85,6 +85,8 @@ export default defineComponent({
|
|||
let formData = e.target.elements;
|
||||
let createVehicle: CreateVehicleViewModel = {
|
||||
name: "",
|
||||
location: "",
|
||||
vehicleTypeId: "",
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createVehicle(createVehicle)
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
import type { VehicleViewModel } from "../viewmodels/admin/unit/vehicle/vehicle.models";
|
||||
import { vehicleTypeDemoData } from "./vehicleType";
|
||||
|
||||
export const vehicleDemoData: Array<VehicleViewModel> = [
|
||||
{
|
||||
id: "kjhb",
|
||||
name: "HLF",
|
||||
type: "HLF 20/10",
|
||||
location: "Tor 1",
|
||||
vehicleTypeId: "xyz",
|
||||
vehicleType: vehicleTypeDemoData[0],
|
||||
},
|
||||
{
|
||||
id: "kjhb",
|
||||
name: "LF",
|
||||
type: "LF 8/6",
|
||||
location: "Tor 2",
|
||||
vehicleTypeId: "abc",
|
||||
vehicleType: vehicleTypeDemoData[1],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -3,7 +3,12 @@ import type { VehicleTypeViewModel } from "../viewmodels/admin/unit/vehicleType/
|
|||
export const vehicleTypeDemoData: Array<VehicleTypeViewModel> = [
|
||||
{
|
||||
id: "xyz",
|
||||
type: "HLF",
|
||||
type: "HLF 20/10",
|
||||
description: "HLF",
|
||||
},
|
||||
{
|
||||
id: "abc",
|
||||
type: "LF 8/6",
|
||||
description: "LF",
|
||||
},
|
||||
];
|
||||
|
|
|
@ -22,7 +22,7 @@ export interface UpdateInspectionPlanViewModel {
|
|||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
remindTime?: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
}
|
||||
|
||||
export interface InspectionPointViewModel {
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
||||
|
||||
export interface VehicleViewModel {
|
||||
id: string;
|
||||
name: string;
|
||||
location: string;
|
||||
vehicleTypeId: string;
|
||||
vehicleType: VehicleTypeViewModel;
|
||||
}
|
||||
|
||||
export interface CreateVehicleViewModel {
|
||||
|
@ -15,5 +18,4 @@ export interface UpdateVehicleViewModel {
|
|||
id: string;
|
||||
name: string;
|
||||
location: string;
|
||||
vehicleTypeId: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue