Skip to content

Commit 56f4333

Browse files
feat: change label height to 100mm and fit content
1 parent b6b1c2d commit 56f4333

File tree

2 files changed

+34
-27
lines changed

2 files changed

+34
-27
lines changed

packages/app/src/components/pet/PetLabel.vue

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
>
1818
</div>
1919
<div class="col-span-24 grid grid-cols-subgrid">
20-
<div class="col-span-16 text-h5">
20+
<div class="col-span-18 text-h6">
2121
{{
2222
truncate(`${modelValue.name} ${modelValue.customer?.lastName}`, 12)
2323
}}
@@ -27,7 +27,7 @@
2727
:filled="false"
2828
stack-label
2929
dense
30-
class="col-span-8"
30+
class="col-span-6"
3131
>
3232
<template #control>
3333
<div
@@ -42,12 +42,13 @@
4242
<q-field
4343
:label="lang.pet.fields.breed"
4444
:filled="false"
45-
class="col-span-17"
45+
class="col-span-13"
4646
stack-label
47+
dense
4748
>
4849
<template #control>
4950
<div
50-
class="self-center text text-h6 full-width no-outline q-ma-none"
51+
class="self-center text text-trucate text-h6 full-width no-outline q-ma-none"
5152
tabindex="0"
5253
>
5354
{{ modelValue.breed }}
@@ -60,6 +61,7 @@
6061
stack-label
6162
:filled="false"
6263
class="col-span-6"
64+
dense
6365
>
6466
<template #control>
6567
<div
@@ -71,6 +73,27 @@
7173
</template>
7274
</q-field>
7375

76+
<q-field
77+
:label="lang.pet.fields.medicines"
78+
stack-label
79+
:filled="false"
80+
class="col-span-4"
81+
dense
82+
>
83+
<template #control>
84+
<div
85+
class="self-center text-h5 full-width no-outline q-ma-none"
86+
tabindex="0"
87+
>
88+
<q-icon
89+
size="sm"
90+
:color="modelValue.medicines ? 'green' : 'red'"
91+
:name="modelValue.medicines ? 'i-mdi-check' : 'i-mdi-close'"
92+
/>
93+
</div>
94+
</template>
95+
</q-field>
96+
7497
<!-- <q-field
7598
:label="lang.pet.fields.sterilized"
7699
:filled="false"
@@ -124,11 +147,11 @@
124147
:label="lang.pet.fields.food"
125148
stack-label
126149
:filled="false"
127-
class="col-span-17"
150+
class="col-span-24"
128151
>
129152
<template #control>
130153
<div
131-
class="self-center text-h5 full-width no-outline q-ma-none"
154+
class="self-center text-h6 full-width no-outline q-ma-none"
132155
tabindex="0"
133156
>
134157
{{
@@ -170,25 +193,6 @@
170193
</div>
171194
</template>
172195
</q-field> -->
173-
<q-field
174-
:label="lang.pet.fields.medicines"
175-
stack-label
176-
:filled="false"
177-
class="col-span-7"
178-
>
179-
<template #control>
180-
<div
181-
class="self-center text-h5 full-width no-outline q-ma-none"
182-
tabindex="0"
183-
>
184-
<q-icon
185-
size="sm"
186-
:color="modelValue.medicines ? 'green' : 'red'"
187-
:name="modelValue.medicines ? 'i-mdi-check' : 'i-mdi-close'"
188-
/>
189-
</div>
190-
</template>
191-
</q-field>
192196

193197
<q-field
194198
:label="lang.pet.fields.particularities"
@@ -198,7 +202,7 @@
198202
>
199203
<template #control>
200204
<div
201-
class="self-center text-h5 full-width no-outline q-ma-none"
205+
class="self-center text-h6 full-width no-outline q-ma-none"
202206
style="line-height: 80%"
203207
tabindex="0"
204208
>
@@ -237,7 +241,7 @@ export interface Props {
237241
}
238242
const props = withDefaults(defineProps<Props>(), {
239243
width: import.meta.env.VITE_LABEL_WIDTH || 62,
240-
height: import.meta.env.VITE_LABEL_HEIGHT || 124
244+
height: import.meta.env.VITE_LABEL_HEIGHT || 100
241245
})
242246
const lang = useLang()
243247

packages/app/src/pages/print/PetLabelsPage.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import PetLabel from '../../components/pet/PetLabel.vue'
1818
import { onBeforeRouteUpdate, useRoute } from 'vue-router'
1919
import { useEmployeeGetPetLabelsQuery } from 'src/queries/employee/labels/pet'
2020
21+
const LABEL_WIDTH = (import.meta.env.VITE_LABEL_WIDTH || 62) - 1
22+
const LABEL_HEIGHT = (import.meta.env.VITE_LABEL_HEIGHT || 100) - 1
23+
2124
const route = useRoute()
2225
const labelsRef = ref()
2326
// const selectedPetIds = ref<number[]>([])

0 commit comments

Comments
 (0)