mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 01:48:40 +00:00
Allow hidden notification
This commit is contained in:
parent
d2c454a215
commit
52f8b4d6e1
|
|
@ -10,5 +10,6 @@ export const NotificationLevel = Object.freeze({
|
|||
OK: 'ok',
|
||||
INFO: 'info',
|
||||
WARNING: 'warning',
|
||||
ERROR: 'error'
|
||||
ERROR: 'error',
|
||||
HIDDEN: 'hidden'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { RequestMethod } from './RequestMethod.js'
|
||||
import { RequestType } from './RequestType.js'
|
||||
import { BrowserType } from './BrowserType.js'
|
||||
import { OSType } from './OSType.js'
|
||||
import { UriFactory } from '../../Uri/UriFactory.js'
|
||||
import { Logger } from '../../Log/Logger.js'
|
||||
import { Logger } from '../../Log/Logger.js';
|
||||
import { UriFactory } from '../../Uri/UriFactory.js';
|
||||
import { BrowserType } from './BrowserType.js';
|
||||
import { OSType } from './OSType.js';
|
||||
import { RequestMethod } from './RequestMethod.js';
|
||||
import { RequestType } from './RequestType.js';
|
||||
|
||||
/**
|
||||
* Request class.
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ export class Form {
|
|||
// maybe there could be global response actions where injecting them to every form would not make any sense
|
||||
// however not many if any use cases come to mind right now where this would be necessary
|
||||
self.app.responseManager.run(response.get('type'), response.get(), request);
|
||||
} else if (typeof o.status !== 'undefined') {
|
||||
} else if (typeof o.status !== 'undefined' && o.status !== NotificationLevel.HIDDEN) {
|
||||
self.app.notifyManager.send(
|
||||
new NotificationMessage(o.status, o.title, o.message), NotificationType.APP_NOTIFICATION
|
||||
);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ describe('NotificationLevelTest', function ()
|
|||
expect(jsOMS.Message.Notification.NotificationLevel.INFO).toBe('info');
|
||||
expect(jsOMS.Message.Notification.NotificationLevel.WARNING).toBe('warning');
|
||||
expect(jsOMS.Message.Notification.NotificationLevel.ERROR).toBe('error');
|
||||
expect(jsOMS.Message.Notification.NotificationLevel.HIDDEN).toBe('hidden');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user