0
0
Fork 0

feat: #5926 resolve comments

This commit is contained in:
Javier Segarra 2024-07-08 12:23:52 +02:00
parent 8c1048b5af
commit 67cd4f9212
1 changed files with 7 additions and 7 deletions

View File

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