#5926 - Worker/PDA docuware #387

Open
jsegarra wants to merge 22 commits from 5926_pda_worker_docuware into dev
1 changed files with 7 additions and 7 deletions
Showing only changes of commit 67cd4f9212 - Show all commits

View File

@ -62,10 +62,10 @@ const handleSendToTablet = async (row) => {
notify(t('PDF sended to signed'), 'positive');
row.isDocuware = true;
} catch (err) {
console.error('Error removing department');
console.error('Error sending to sign');
}
};
function checkFileFocuware({ deviceProductionFk }, signed) {
function checkFileDocuware({ deviceProductionFk }, signed) {
jsegarra marked this conversation as resolved Outdated
Outdated
Review

checkFileDocuware

checkFileDocuware
return axios.post(`Docuwares/${deviceProductionFk}/checkFile`, {
fileCabinet: FILECABINET_ID,
signed,
@ -74,12 +74,12 @@ function checkFileFocuware({ deviceProductionFk }, signed) {
const handleRefreshDocuware = async (row) => {
try {
if (isProduction()) {
await checkFileFocuware(row, true);
await checkFileDocuware(row, true);
}
notify(t('PDA Signed'), 'positive');
row.isSigned = true;
} catch (err) {
console.error('Error removing department');
console.error('Error refreshing docuware call');
jsegarra marked this conversation as resolved Outdated
Outdated
Review
    console.error('Error removing department'); ?
console.error('Error removing department'); ?
}
};
const handleDownloadDocuware = async (row) => {
@ -93,7 +93,7 @@ const handleDownloadDocuware = async (row) => {
}
notify(t('PDF downloaded'), 'positive');
} catch (err) {
console.error('Error removing department');
console.error('Error downloading docuware');
jsegarra marked this conversation as resolved Outdated
Outdated
Review
    console.error('Error removing department'); ?
console.error('Error removing department'); ?
}
};
function handlePromiseDocuware(promise, deviceProductions) {
@ -105,7 +105,7 @@ function handlePromiseDocuware(promise, deviceProductions) {
}
async function fetchDocuware(deviceProductions) {
const promisesIsDocuware = await Promise.allSettled(
deviceProductions.map((device) => checkFileFocuware(device, false))
deviceProductions.map((device) => checkFileDocuware(device, false))
);
let promisesIsSigned = [];
@ -115,7 +115,7 @@ async function fetchDocuware(deviceProductions) {
deviceProduction.isDocuware = promise.data;
if (promise.data)
promisesIsSigned.push(checkFileFocuware(deviceProduction, true));
promisesIsSigned.push(checkFileDocuware(deviceProduction, true));
});
promisesIsSigned = await Promise.allSettled(promisesIsSigned);