forked from verdnatura/salix-front
fix: notify icon style
This commit is contained in:
parent
9ce49bf108
commit
febc7f1f46
|
@ -1,11 +1,10 @@
|
|||
import axios from 'axios';
|
||||
import { Notify } from 'quasar';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import { Router } from 'src/router';
|
||||
import { i18n } from './i18n';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
|
||||
const session = useSession();
|
||||
const { t } = i18n.global;
|
||||
const { notify } = useNotify();
|
||||
|
||||
axios.defaults.baseURL = '/api/';
|
||||
|
||||
|
@ -27,10 +26,7 @@ const onResponse = (response) => {
|
|||
|
||||
const isSaveRequest = method === 'patch';
|
||||
if (isSaveRequest) {
|
||||
Notify.create({
|
||||
message: t('globals.dataSaved'),
|
||||
type: 'positive',
|
||||
});
|
||||
notify('globals.dataSaved', 'positive');
|
||||
}
|
||||
|
||||
return response;
|
||||
|
@ -67,10 +63,7 @@ const onResponseError = (error) => {
|
|||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
Notify.create({
|
||||
message: t(message),
|
||||
type: 'negative',
|
||||
});
|
||||
notify(message, 'negative');
|
||||
|
||||
return Promise.reject(error);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue