0
0
Fork 0

refs #5056 changed from kebab-case to PascalCase

This commit is contained in:
Alexandre Riera 2023-04-14 08:29:46 +02:00
parent 12f7b51717
commit a3b63396c8
5 changed files with 129 additions and 140 deletions

View File

@ -238,20 +238,19 @@ function exceedMaxHeight(pos) {
</script> </script>
<template> <template>
<q-page class="q-pa-sm q-mx-xl"> <QPage class="q-pa-sm q-mx-xl">
<q-card class="q-pa-sm"> <QCard class="q-pa-sm">
<q-form @submit="onSubmit()" @reset="onReset()" class="q-pa-md"> <QForm @submit="onSubmit()" @reset="onReset()" class="q-pa-md">
<!-- <div v-for="tray in wagon" :key="tray.id">{{ tray }}</div> --> <QInput
<q-input
filled filled
v-model="name" v-model="name"
:label="t('wagon.type.name')" :label="t('wagon.type.name')"
:rules="[(val) => !!val || t('wagon.warnings.nameNotEmpty')]" :rules="[(val) => !!val || t('wagon.warnings.nameNotEmpty')]"
/> />
<q-checkbox class="q-mb-sm" v-model="divisible" label="Divisible" /> <QCheckbox class="q-mb-sm" v-model="divisible" label="Divisible" />
<div class="wagon-tray q-mx-xl" v-for="tray in wagon" :key="tray.id"> <div class="wagon-tray q-mx-xl" v-for="tray in wagon" :key="tray.id">
<div class="position"> <div class="position">
<q-input <QInput
autofocus autofocus
filled filled
type="number" type="number"
@ -259,20 +258,20 @@ function exceedMaxHeight(pos) {
v-model="tray.position" v-model="tray.position"
@blur="onPositionBlur(tray)" @blur="onPositionBlur(tray)"
> >
<q-tooltip :delay="2000"> <QTooltip :delay="2000">
{{ {{
t('wagon.warnings.minHeightBetweenTrays') + t('wagon.warnings.minHeightBetweenTrays') +
wagonConfig.minHeightBetweenTrays + wagonConfig.minHeightBetweenTrays +
' cm' ' cm'
}} }}
<q-space /> <QSpace />
{{ {{
t('wagon.warnings.maxWagonHeight') + t('wagon.warnings.maxWagonHeight') +
wagonConfig.maxWagonHeight + wagonConfig.maxWagonHeight +
' cm' ' cm'
}} }}
</q-tooltip> </QTooltip>
</q-input> </QInput>
</div> </div>
<div class="shelving"> <div class="shelving">
<div class="shelving-half"> <div class="shelving-half">
@ -297,7 +296,7 @@ function exceedMaxHeight(pos) {
</div> </div>
</div> </div>
<div class="action-button"> <div class="action-button">
<q-btn <QBtn
flat flat
round round
color="primary" color="primary"
@ -307,16 +306,12 @@ function exceedMaxHeight(pos) {
</div> </div>
</div> </div>
<div class="q-mb-sm wheels"> <div class="q-mb-sm wheels">
<q-icon color="grey-6" name="trip_origin" size="3rem" /> <QIcon color="grey-6" name="trip_origin" size="3rem" />
<q-icon color="grey-6" name="trip_origin" size="3rem" /> <QIcon color="grey-6" name="trip_origin" size="3rem" />
</div> </div>
<div> <div>
<q-btn <QBtn :label="t('wagon.type.submit')" type="submit" color="primary" />
:label="t('wagon.type.submit')" <QBtn
type="submit"
color="primary"
/>
<q-btn
:label="t('wagon.type.reset')" :label="t('wagon.type.reset')"
type="reset" type="reset"
color="primary" color="primary"
@ -324,17 +319,17 @@ function exceedMaxHeight(pos) {
class="q-ml-sm" class="q-ml-sm"
/> />
</div> </div>
<q-dialog <QDialog
v-model="colorPickerActive" v-model="colorPickerActive"
position="right" position="right"
:no-backdrop-dismiss="false" :no-backdrop-dismiss="false"
> >
<q-card> <QCard>
<q-card-section> <QCardSection>
<div class="text-h6">{{ t('wagon.type.trayColor') }}</div> <div class="text-h6">{{ t('wagon.type.trayColor') }}</div>
</q-card-section> </QCardSection>
<q-card-section class="row items-center no-wrap"> <QCardSection class="row items-center no-wrap">
<q-color <QColor
flat flat
v-model="wagon[currentTrayColorPicked].color.rgb" v-model="wagon[currentTrayColorPicked].color.rgb"
no-header no-header
@ -347,13 +342,13 @@ function exceedMaxHeight(pos) {
" "
@change="updateColor($event)" @change="updateColor($event)"
/> />
<q-btn flat round icon="close" v-close-popup /> <QBtn flat round icon="close" v-close-popup />
</q-card-section> </QCardSection>
</q-card> </QCard>
</q-dialog> </QDialog>
</q-form> </QForm>
</q-card> </QCard>
</q-page> </QPage>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,9 +1,8 @@
<script setup> <script setup>
import axios from 'axios'; import axios from 'axios';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import Paginate from 'src/components/PaginateData.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import { ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
@ -40,59 +39,59 @@ async function remove(row) {
</script> </script>
<template> <template>
<q-page class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<div class="card-list"> <div class="card-list">
<paginate <VnPaginate
data-key="WagonTypeList" data-key="WagonTypeList"
url="/WagonTypes" url="/WagonTypes"
order="id DESC" order="id DESC"
auto-load auto-load
> >
<template #body="{ rows }"> <template #body="{ rows }">
<q-card class="card q-mb-md" v-for="row of rows" :key="row.id"> <QCard class="card q-mb-md" v-for="row of rows" :key="row.id">
<q-item <QItem
class="q-pa-none items-start cursor-pointer q-hoverable" class="q-pa-none items-start cursor-pointer q-hoverable"
v-ripple v-ripple
clickable clickable
> >
<q-item-section class="q-pa-md" @click="navigate(row.id)"> <QItemSection class="q-pa-md" @click="navigate(row.id)">
<div class="text-h6">{{ row.name }}</div> <div class="text-h6">{{ row.name }}</div>
<q-item-label caption>#{{ row.id }}</q-item-label> <QItem-label caption>#{{ row.id }}</QItem-label>
</q-item-section> </QItemSection>
<q-separator vertical /> <QSeparator vertical />
<q-card-actions vertical class="justify-between"> <QCardActions vertical class="justify-between">
<q-btn <QBtn
flat flat
round round
color="primary" color="primary"
icon="arrow_circle_right" icon="arrow_circle_right"
@click="navigate(row.id)" @click="navigate(row.id)"
> >
<q-tooltip> <QTooltip>
{{ t('components.smartCard.openCard') }} {{ t('components.smartCard.openCard') }}
</q-tooltip> </QTooltip>
</q-btn> </QBtn>
<q-btn <QBtn
flat flat
round round
color="primary" color="primary"
icon="delete" icon="delete"
@click="remove(row)" @click="remove(row)"
> >
<q-tooltip> <QTooltip>
{{ t('wagon.list.remove') }} {{ t('wagon.list.remove') }}
</q-tooltip> </QTooltip>
</q-btn> </QBtn>
</q-card-actions> </QCardActions>
</q-item> </QItem>
</q-card> </QCard>
</template> </template>
</paginate> </VnPaginate>
</div> </div>
<q-page-sticky position="bottom-right" :offset="[18, 18]"> <QPageSticky position="bottom-right" :offset="[18, 18]">
<q-btn @click="create" fab icon="add" color="primary" /> <QBtn @click="create" fab icon="add" color="primary" />
</q-page-sticky> </QPageSticky>
</q-page> </QPage>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,5 +1,6 @@
<script setup> <script setup>
import axios from 'axios'; import axios from 'axios';
import { QIcon, QInput, QItem, QItemSection, QSelect } from 'quasar';
import { computed, onMounted, onUpdated, ref } from 'vue'; import { computed, onMounted, onUpdated, ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
@ -84,12 +85,12 @@ function filterType(val, update) {
</script> </script>
<template> <template>
<q-page class="q-pa-sm q-mx-xl"> <QPage class="q-pa-sm q-mx-xl">
<q-card class="q-pa-sm"> <QCard class="q-pa-sm">
<q-form @submit="onSubmit()" @reset="onReset()" class="q-pa-md"> <QForm @submit="onSubmit()" @reset="onReset()" class="q-pa-md">
<div class="row q-col-gutter-md q-mb-md"> <div class="row q-col-gutter-md q-mb-md">
<div class="col"> <div class="col">
<q-input <QInput
filled filled
v-model="wagon.label" v-model="wagon.label"
:label="t('wagon.create.label')" :label="t('wagon.create.label')"
@ -99,7 +100,7 @@ function filterType(val, update) {
/> />
</div> </div>
<div class="col"> <div class="col">
<q-input <QInput
filled filled
v-model="wagon.plate" v-model="wagon.plate"
:label="t('wagon.create.plate')" :label="t('wagon.create.plate')"
@ -109,7 +110,7 @@ function filterType(val, update) {
</div> </div>
<div class="row q-col-gutter-md q-mb-md"> <div class="row q-col-gutter-md q-mb-md">
<div class="col"> <div class="col">
<q-input <QInput
filled filled
v-model="wagon.volume" v-model="wagon.volume"
:label="t('wagon.create.volume')" :label="t('wagon.create.volume')"
@ -121,7 +122,7 @@ function filterType(val, update) {
/> />
</div> </div>
<div class="col"> <div class="col">
<q-select <QSelect
filled filled
v-model="wagon.typeFk" v-model="wagon.typeFk"
use-input use-input
@ -138,29 +139,25 @@ function filterType(val, update) {
@filter="filterType" @filter="filterType"
> >
<template v-if="wagon.typeFk" #append> <template v-if="wagon.typeFk" #append>
<q-icon <QIcon
name="cancel" name="cancel"
@click.stop.prevent="wagon.typeFk = null" @click.stop.prevent="wagon.typeFk = null"
class="cursor-pointer" class="cursor-pointer"
/> />
</template> </template>
<template #no-option> <template #no-option>
<q-item> <QItem>
<q-item-section class="text-grey"> <QItemSection class="text-grey">
{{ t('wagon.warnings.noData') }} {{ t('wagon.warnings.noData') }}
</q-item-section> </QItemSection>
</q-item> </QItem>
</template> </template>
</q-select> </QSelect>
</div> </div>
</div> </div>
<div> <div>
<q-btn <QBtn :label="t('wagon.type.submit')" type="submit" color="primary" />
:label="t('wagon.type.submit')" <QBtn
type="submit"
color="primary"
/>
<q-btn
:label="t('wagon.type.reset')" :label="t('wagon.type.reset')"
type="reset" type="reset"
color="primary" color="primary"
@ -168,9 +165,9 @@ function filterType(val, update) {
class="q-ml-sm" class="q-ml-sm"
/> />
</div> </div>
</q-form> </QForm>
</q-card> </QCard>
</q-page> </QPage>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,7 +1,7 @@
<script setup> <script setup>
import axios from 'axios'; import axios from 'axios';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import Paginate from 'src/components/PaginateData.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
@ -45,9 +45,9 @@ async function remove(row) {
</script> </script>
<template> <template>
<q-page class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<div class="card-list"> <div class="card-list">
<paginate <VnPaginate
data-key="WagonList" data-key="WagonList"
url="/Wagons" url="/Wagons"
order="id DESC" order="id DESC"
@ -55,78 +55,76 @@ async function remove(row) {
auto-load auto-load
> >
<template #body="{ rows }"> <template #body="{ rows }">
<q-card class="card q-mb-md" v-for="row of rows" :key="row.id"> <QCard class="card q-mb-md" v-for="row of rows" :key="row.id">
<q-item <QItem
class="q-pa-none items-start cursor-pointer q-hoverable" class="q-pa-none items-start cursor-pointer q-hoverable"
v-ripple v-ripple
clickable clickable
> >
<q-item-section class="q-pa-md" @click="navigate(row.id)"> <QItemSection class="q-pa-md" @click="navigate(row.id)">
<div class="text-h6">{{ row.label }}</div> <div class="text-h6">{{ row.label }}</div>
<q-item-label caption>#{{ row.id }}</q-item-label> <QItemLabel caption>#{{ row.id }}</QItemLabel>
<q-list> <QList>
<q-item class="q-pa-none"> <QItem class="q-pa-none">
<q-item-section> <QItemSection>
<q-item-label caption> <QItemLabel caption>
{{ t('wagon.list.plate') }} {{ t('wagon.list.plate') }}
</q-item-label> </QItemLabel>
<q-item-label>{{ row.plate }}</q-item-label> <QItemLabel>{{ row.plate }}</QItemLabel>
</q-item-section> </QItemSection>
</q-item> </QItem>
<q-item class="q-pa-none"> <QItem class="q-pa-none">
<q-item-section> <QItemSection>
<q-item-label caption> <QItemLabel caption>
{{ t('wagon.list.volume') }} {{ t('wagon.list.volume') }}
</q-item-label> </QItemLabel>
<q-item-label>{{ row.volume }}</q-item-label> <QItemLabel>{{ row.volume }}</QItemLabel>
</q-item-section> </QItemSection>
</q-item> </QItem>
<q-item class="q-pa-none"> <QItem class="q-pa-none">
<q-item-section> <QItemSection>
<q-item-label caption> <QItemLabel caption>
{{ t('wagon.list.type') }} {{ t('wagon.list.type') }}
</q-item-label> </QItemLabel>
<q-item-label>{{ <QItemLabel>{{ row.type.name }}</QItemLabel>
row.type.name </QItemSection>
}}</q-item-label> </QItem>
</q-item-section> </QList>
</q-item> </QItemSection>
</q-list> <QSeparator vertical />
</q-item-section> <QCardActions vertical class="justify-between">
<q-separator vertical /> <QBtn
<q-card-actions vertical class="justify-between">
<q-btn
flat flat
round round
color="primary" color="primary"
icon="arrow_circle_right" icon="arrow_circle_right"
@click="navigate(row.id)" @click="navigate(row.id)"
> >
<q-tooltip> <QTooltip>
{{ t('components.smartCard.openCard') }} {{ t('components.smartCard.openCard') }}
</q-tooltip> </QTooltip>
</q-btn> </QBtn>
<q-btn <QBtn
flat flat
round round
color="primary" color="primary"
icon="delete" icon="delete"
@click="remove(row)" @click="remove(row)"
> >
<q-tooltip> <QTooltip>
{{ t('wagon.list.remove') }} {{ t('wagon.list.remove') }}
</q-tooltip> </QTooltip>
</q-btn> </QBtn>
</q-card-actions> </QCardActions>
</q-item> </QItem>
</q-card> </QCard>
</template> </template>
</paginate> </VnPaginate>
</div> </div>
<q-page-sticky position="bottom-right" :offset="[18, 18]"> <QPageSticky position="bottom-right" :offset="[18, 18]">
<q-btn @click="create" fab icon="add" color="primary" /> <QBtn @click="create" fab icon="add" color="primary" />
</q-page-sticky> </QPageSticky>
</q-page> </QPage>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -6,12 +6,12 @@ const stateStore = useStateStore();
</script> </script>
<template> <template>
<q-drawer v-model="stateStore.leftDrawer" show-if-above :width="256"> <QDrawer v-model="stateStore.leftDrawer" show-if-above :width="256">
<q-scroll-area class="fit text-grey-8"> <QScrollArea class="fit text-grey-8">
<LeftMenu /> <LeftMenu />
</q-scroll-area> </QScrollArea>
</q-drawer> </QDrawer>
<q-page-container> <QPageContainer>
<router-view></router-view> <RouterView></RouterView>
</q-page-container> </QPageContainer>
</template> </template>