#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
serialNumber: Serial number
removePDA: Deallocate PDA
sendToTablet: Send to sign
refresh: Refresh
download: Download
create:
name: Name
lastName: Last name

View File

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

View File

@ -21,7 +21,6 @@ const paginate = ref();
const downloadDocuware = ref(true);
const sendToTablet = ref(true);
const dialog = ref();
const docuwarePDARef = ref(null);
const route = useRoute();
const { openConfirmationModal } = useVnConfirm();
const routeId = computed(() => route.params.id);
@ -52,19 +51,19 @@ function reloadData() {
paginate.value.fetch();
}
const handleSendToTablet = async () => {
const handleSendToTablet = async (deviceProductionFk) => {
try {
await axios.post(`Docuwares/upload`, {
fileCabinet: 'hr',
worker: route.params.id,
// pda: currentPDA.value.deviceProductionFk,
pda: deviceProductionFk,
});
notify(t('PDA Signed'), 'positive');
} catch (err) {
console.error('Error removing department');
}
};
const handleDownloadDocuware = async () => {};
const handleDownloadDocuware = async (deviceProductionFk) => {};
</script>
<template>
@ -146,6 +145,48 @@ const handleDownloadDocuware = async () => {};
{{ t('worker.pda.removePDA') }}
</QTooltip>
</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>
</QItem>
</QCard>