Add a shortened displayName for boats for a better mobile experience

This commit is contained in:
2023-12-18 20:23:17 -05:00
parent bc41b1a7a1
commit ac1730401a
2 changed files with 9 additions and 4 deletions

View File

@@ -55,11 +55,13 @@
v-model="selectedDate" v-model="selectedDate"
:model-resources="boatStore.boats" :model-resources="boatStore.boats"
resource-key="id" resource-key="id"
resource-label="name" resource-label="displayName"
resource-width="32"
:interval-start="12" :interval-start="12"
:interval-count="36" :interval-count="36"
:interval-minutes="30" :interval-minutes="30"
cell-width="48" cell-width="48"
style="--calendar-resources-width: 48px"
resource-min-height="40" resource-min-height="40"
animated animated
bordered bordered
@@ -79,8 +81,8 @@
</template> </template>
<template #resource-label="{ scope: { resource } }"> <template #resource-label="{ scope: { resource } }">
<div class="col-12"> <div class="col-12 .col-md-auto">
{{ resource.name }} {{ resource.displayName }}
<q-icon v-if="resource.defects" name="warning" color="warning" /> <q-icon v-if="resource.defects" name="warning" color="warning" />
</div> </div>
</template> </template>
@@ -98,7 +100,6 @@
><template v-slot:append><q-icon name="timelapse" /></template></q-select ><template v-slot:append><q-icon name="timelapse" /></template></q-select
></q-card-section> ></q-card-section>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import { import {

View File

@@ -5,6 +5,7 @@ import { defineStore } from 'pinia';
export interface Boat { export interface Boat {
id: number; id: number;
name: string; name: string;
displayName?: string;
class?: string; class?: string;
year?: number; year?: number;
imgsrc?: string; imgsrc?: string;
@@ -27,6 +28,7 @@ const getSampleData = () => [
{ {
id: 1, id: 1,
name: 'ProjectX', name: 'ProjectX',
displayName: 'PX',
class: 'J/27', class: 'J/27',
year: 1981, year: 1981,
imgsrc: '/tmpimg/j27.png', imgsrc: '/tmpimg/j27.png',
@@ -52,6 +54,7 @@ and rough engine performance.`,
{ {
id: 2, id: 2,
name: 'Take5', name: 'Take5',
displayName: 'T5',
class: 'J/27', class: 'J/27',
year: 1985, year: 1985,
imgsrc: '/tmpimg/j27.png', imgsrc: '/tmpimg/j27.png',
@@ -60,6 +63,7 @@ and rough engine performance.`,
{ {
id: 3, id: 3,
name: 'WeeBeestie', name: 'WeeBeestie',
displayName: 'WB',
class: 'Capri 25', class: 'Capri 25',
year: 1989, year: 1989,
imgsrc: '/tmpimg/capri25.png', imgsrc: '/tmpimg/capri25.png',