#5926 - Worker/PDA docuware #387

Open
jsegarra wants to merge 22 commits from 5926_pda_worker_docuware into dev
3 changed files with 51 additions and 4 deletions
Showing only changes of commit 67db3bc5bb - Show all commits

View File

@ -882,6 +882,9 @@ worker:
model: Model model: Model
serialNumber: Serial number serialNumber: Serial number
removePDA: Deallocate PDA removePDA: Deallocate PDA
sendToTablet: Send to sign
refresh: Refresh
download: Download
create: create:
name: Name name: Name
lastName: Last name lastName: Last name

View File

@ -870,6 +870,9 @@ worker:
model: Modelo model: Modelo
serialNumber: Número de serie serialNumber: Número de serie
removePDA: Desasignar PDA removePDA: Desasignar PDA
sendToTablet: Enviar a tablet
refresh: Refrescar
download: Descargar justificante
create: create:
name: Nombre name: Nombre
lastName: Apellido lastName: Apellido

View File

@ -21,7 +21,6 @@ const paginate = ref();
const downloadDocuware = ref(true); const downloadDocuware = ref(true);
const sendToTablet = ref(true); const sendToTablet = ref(true);
const dialog = ref(); const dialog = ref();
const docuwarePDARef = ref(null);
const route = useRoute(); const route = useRoute();
const { openConfirmationModal } = useVnConfirm(); const { openConfirmationModal } = useVnConfirm();
const routeId = computed(() => route.params.id); const routeId = computed(() => route.params.id);
@ -52,19 +51,19 @@ function reloadData() {
paginate.value.fetch(); paginate.value.fetch();
} }
const handleSendToTablet = async () => { const handleSendToTablet = async (deviceProductionFk) => {
try { try {
await axios.post(`Docuwares/upload`, { await axios.post(`Docuwares/upload`, {
fileCabinet: 'hr', fileCabinet: 'hr',
worker: route.params.id, worker: route.params.id,
// pda: currentPDA.value.deviceProductionFk, pda: deviceProductionFk,
}); });
notify(t('PDA Signed'), 'positive'); notify(t('PDA Signed'), 'positive');
} catch (err) { } catch (err) {
console.error('Error removing department'); console.error('Error removing department');
} }
}; };
const handleDownloadDocuware = async () => {}; const handleDownloadDocuware = async (deviceProductionFk) => {};
</script> </script>
<template> <template>
@ -146,6 +145,48 @@ const handleDownloadDocuware = async () => {};
{{ t('worker.pda.removePDA') }} {{ t('worker.pda.removePDA') }}
</QTooltip> </QTooltip>
</QIcon> </QIcon>
<QIcon
v-if="downloadDocuware"
name="cloud_download"
size="sm"
class="cursor-pointer"
color="primary"
@click="handleDownloadDocuware(data)"
>
<QTooltip>
{{ t('worker.pda.download') }}
</QTooltip>
</QIcon>
<QIcon
v-if="downloadDocuware"
name="refresh"
size="sm"
class="cursor-pointer"
color="primary"
@click="handleDownloadDocuware(data)"
>
<QTooltip>
{{ t('worker.pda.refresh') }}
</QTooltip>
</QIcon>
<QIcon
v-if="sendToTablet"
name="vn:client"
size="sm"
class="cursor-pointer"
color="primary"
@click="
openConfirmationModal(
t('Are you sure you want to send it?'),
t('Sign PDA'),
handleSendToTablet
)
"
>
<QTooltip>
{{ t('worker.pda.sendToTablet') }}
</QTooltip>
</QIcon>
</QItemSection> </QItemSection>
</QItem> </QItem>
</QCard> </QCard>