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 formData = e.target.elements;
|
||||||
let createVehicle: CreateVehicleViewModel = {
|
let createVehicle: CreateVehicleViewModel = {
|
||||||
name: "",
|
name: "",
|
||||||
|
location: "",
|
||||||
|
vehicleTypeId: "",
|
||||||
};
|
};
|
||||||
this.status = "loading";
|
this.status = "loading";
|
||||||
this.createVehicle(createVehicle)
|
this.createVehicle(createVehicle)
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
import type { VehicleViewModel } from "../viewmodels/admin/unit/vehicle/vehicle.models";
|
import type { VehicleViewModel } from "../viewmodels/admin/unit/vehicle/vehicle.models";
|
||||||
|
import { vehicleTypeDemoData } from "./vehicleType";
|
||||||
|
|
||||||
export const vehicleDemoData: Array<VehicleViewModel> = [
|
export const vehicleDemoData: Array<VehicleViewModel> = [
|
||||||
{
|
{
|
||||||
id: "kjhb",
|
id: "kjhb",
|
||||||
name: "HLF",
|
name: "HLF",
|
||||||
type: "HLF 20/10",
|
location: "Tor 1",
|
||||||
|
vehicleTypeId: "xyz",
|
||||||
|
vehicleType: vehicleTypeDemoData[0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "kjhb",
|
id: "kjhb",
|
||||||
name: "LF",
|
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> = [
|
export const vehicleTypeDemoData: Array<VehicleTypeViewModel> = [
|
||||||
{
|
{
|
||||||
id: "xyz",
|
id: "xyz",
|
||||||
type: "HLF",
|
type: "HLF 20/10",
|
||||||
description: "HLF",
|
description: "HLF",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "abc",
|
||||||
|
type: "LF 8/6",
|
||||||
|
description: "LF",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -22,7 +22,7 @@ export interface UpdateInspectionPlanViewModel {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
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 {
|
export interface InspectionPointViewModel {
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
|
import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
||||||
|
|
||||||
export interface VehicleViewModel {
|
export interface VehicleViewModel {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
location: string;
|
location: string;
|
||||||
vehicleTypeId: string;
|
vehicleTypeId: string;
|
||||||
|
vehicleType: VehicleTypeViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateVehicleViewModel {
|
export interface CreateVehicleViewModel {
|
||||||
|
@ -15,5 +18,4 @@ export interface UpdateVehicleViewModel {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
location: string;
|
location: string;
|
||||||
vehicleTypeId: string;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue