All checks were successful
Build BAB Application Deployment Artifact / build (push) Successful in 2m4s
102 lines
2.1 KiB
TypeScript
102 lines
2.1 KiB
TypeScript
import { defineStore } from 'pinia';
|
|
|
|
// const boatSource = null;
|
|
|
|
export interface Boat {
|
|
$id: string;
|
|
name: string;
|
|
displayName?: string;
|
|
class?: string;
|
|
year?: number;
|
|
imgSrc?: string;
|
|
iconSrc?: string;
|
|
bookingAvailable?: boolean;
|
|
requiredCerts: string[];
|
|
maxPassengers: number;
|
|
defects?: {
|
|
type: string;
|
|
severity: string;
|
|
description: string;
|
|
detail?: string;
|
|
}[];
|
|
}
|
|
|
|
const getSampleData = () => [
|
|
{
|
|
$id: '1',
|
|
name: 'ProjectX',
|
|
displayName: 'PX',
|
|
class: 'J/27',
|
|
year: 1981,
|
|
imgSrc: '/tmpimg/j27.png',
|
|
iconSrc: '/tmpimg/projectx_avatar256.png',
|
|
bookingAvailable: true,
|
|
maxPassengers: 8,
|
|
requiredCerts: [],
|
|
defects: [
|
|
{
|
|
type: 'engine',
|
|
severity: 'moderate',
|
|
description: 'Fuel line leaks at engine fitting.',
|
|
detail: `The gasket in the end of the fuel hose is damaged, and does not properly seal.
|
|
This will cause fuel to leak, and will allow air into the fuel chamber, causing a lean mixture,
|
|
and rough engine performance.`,
|
|
},
|
|
{
|
|
type: 'rigging',
|
|
severity: 'moderate',
|
|
description: 'Tiller extension is broken.',
|
|
detail:
|
|
'The tiller extension swivel is broken, and will not attach to the tiller.',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
$id: '2',
|
|
name: 'Take5',
|
|
displayName: 'T5',
|
|
class: 'J/27',
|
|
year: 1985,
|
|
imgSrc: '/tmpimg/j27.png',
|
|
iconsrc: '/tmpimg/take5_avatar32.png',
|
|
bookingAvailable: true,
|
|
maxPassengers: 8,
|
|
requiredCerts: [],
|
|
},
|
|
{
|
|
$id: '3',
|
|
name: 'WeeBeestie',
|
|
displayName: 'WB',
|
|
class: 'Capri 25',
|
|
year: 1989,
|
|
imgSrc: '/tmpimg/capri25.png',
|
|
bookingAvailable: true,
|
|
maxPassengers: 6,
|
|
requiredCerts: [],
|
|
},
|
|
{
|
|
$id: '4',
|
|
name: 'Just My Imagination',
|
|
displayName: 'JMI',
|
|
class: 'Sirius 28',
|
|
year: 1989,
|
|
imgSrc: '/tmpimg/JMI.jpg',
|
|
bookingAvailable: true,
|
|
maxPassengers: 8,
|
|
requiredCerts: [],
|
|
},
|
|
];
|
|
|
|
export const useBoatStore = defineStore('boat', {
|
|
state: () => ({
|
|
boats: getSampleData(),
|
|
}),
|
|
|
|
getters: {},
|
|
|
|
actions: {
|
|
// update () {
|
|
// }
|
|
},
|
|
});
|