#7187 - refactorWokerPda #378

Merged
pablone merged 10 commits from 7187-refactorWokerPda into dev 2024-05-21 06:35:15 +00:00
2 changed files with 25 additions and 15 deletions
Showing only changes of commit bc9c1fdf8e - Show all commits

View File

@ -135,6 +135,7 @@ const filterOptions = {
:rules="validate('client.mobile')" :rules="validate('client.mobile')"
clearable clearable
v-model="data.mobile" v-model="data.mobile"
type="number"
/> />
</div> </div>
</VnRow> </VnRow>

View File

@ -2,16 +2,14 @@
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import { useRole } from 'src/composables/useRole';
import axios from 'axios'; import axios from 'axios';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
import FetchData from 'components/FetchData.vue'; import FetchData from 'components/FetchData.vue';
import FormModelPopup from 'src/components/FormModelPopup.vue';
import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue';
import FormModelPopup from 'src/components/FormModelPopup.vue';
import VnRow from 'components/ui/VnRow.vue'; import VnRow from 'components/ui/VnRow.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import VnSelect from 'src/components/common/VnSelect.vue'; import VnSelect from 'src/components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue'; import VnInput from 'src/components/common/VnInput.vue';
@ -47,8 +45,7 @@ const deallocatePDA = async (deviceProductionFk) => {
<template> <template>
<QPage class="column items-center q-pa-md centerCard"> <QPage class="column items-center q-pa-md centerCard">
<FetchData <FetchData
url="deviceProductions" url="workers/getAvailablePDAs"
:filter="{ where: { stateFk: 'idle' } }"
@on-fetch="(data) => (deviceProductions = data)" @on-fetch="(data) => (deviceProductions = data)"
auto-load auto-load
/> />
@ -77,12 +74,21 @@ const deallocatePDA = async (deviceProductionFk) => {
disable disable
> >
<template #control> <template #control>
<div tabindex="0"> <div tabindex="0" style="padding: none">
<span>Id: </span>
<span>
{{ row?.deviceProductionFk }}&nbsp;
</span>
<span>{{ t('Model') }}: </span>
<span>
{{ row?.deviceProduction?.modelFk }}&nbsp;
</span>
<span>{{ t('Serial number') }}: </span>
<span>
{{ {{
row?.deviceProductionFk + row?.deviceProduction?.serialNumber
' - ' + }}&nbsp;
row?.deviceProduction?.modelFk </span>
}}
</div> </div>
</template> </template>
</QField> </QField>
@ -168,19 +174,22 @@ const deallocatePDA = async (deviceProductionFk) => {
.centerCard { .centerCard {
padding: 5%; padding: 5%;
width: 100%; width: 100%;
max-width: 60%; max-width: 70%;
margin: 0 auto; margin: 0 auto;
} }
.label { .label {
color: red; color: red;
} }
.q-field { .q-field {
margin-bottom: 0px; height: 65px;
padding-bottom: 0px;
} }
</style> </style>
<i18n> <i18n>
es: es:
PDA deallocated: PDA desasignada PDA deallocated: PDA desasignada
Current SIM: SIM actual Current SIM: SIM actual
Model: Modelo
Serial number: Número de serie
This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario
Add new device: Añadir nuevo dispositivo
</i18n> </i18n>