Merge pull request 'refs #5876 spinnerOnLoading' (!125) from 5876-spinnerOnLoading into dev
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #125
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Jorge Penadés 2023-12-07 15:23:53 +00:00
commit 09ff922c94
1 changed files with 6 additions and 3 deletions

View File

@ -26,6 +26,7 @@ const client = ref({});
const inputFile = ref(); const inputFile = ref();
const files = ref({}); const files = ref({});
const spinnerRef = ref();
const claimDmsRef = ref(); const claimDmsRef = ref();
const dmsType = ref({}); const dmsType = ref({});
const config = ref({}); const config = ref({});
@ -118,11 +119,11 @@ async function create() {
clientId: client.value.id, clientId: client.value.id,
}).toUpperCase(), }).toUpperCase(),
}; };
spinnerRef.value.show();
await axios.post(query, formData, { await axios.post(query, formData, {
params: dms, params: dms,
}); });
spinnerRef.value.hide();
quasar.notify({ quasar.notify({
message: t('globals.dataSaved'), message: t('globals.dataSaved'),
type: 'positive', type: 'positive',
@ -234,7 +235,9 @@ function onDrag() {
</div> </div>
</div> </div>
</div> </div>
<QDialog ref="spinnerRef">
<QSpinner color="primary" size="xl" />
</QDialog>
<QPageSticky position="bottom-right" :offset="[25, 25]"> <QPageSticky position="bottom-right" :offset="[25, 25]">
<label for="fileInput"> <label for="fileInput">
<QBtn fab @click="inputFile.nativeEl.click()" icon="add" color="primary"> <QBtn fab @click="inputFile.nativeEl.click()" icon="add" color="primary">