2019-09-13 14:09:14 +00:00
|
|
|
import 'angular';
|
|
|
|
import 'angular-mocks';
|
2019-10-24 22:53:53 +00:00
|
|
|
import core from './front/core/module.js';
|
2019-09-13 14:09:14 +00:00
|
|
|
import './front/salix/components/app/app.js';
|
2020-02-25 07:08:13 +00:00
|
|
|
import './modules/zone/front/module.js';
|
2019-09-13 14:09:14 +00:00
|
|
|
import './modules/claim/front/module.js';
|
|
|
|
import './modules/client/front/module.js';
|
|
|
|
import './modules/invoiceOut/front/module.js';
|
2021-02-12 11:19:42 +00:00
|
|
|
import './modules/invoiceIn/front/module.js';
|
2019-09-13 14:09:14 +00:00
|
|
|
import './modules/item/front/module.js';
|
|
|
|
import './modules/order/front/module.js';
|
|
|
|
import './modules/route/front/module.js';
|
|
|
|
import './modules/ticket/front/module.js';
|
|
|
|
import './modules/travel/front/module.js';
|
|
|
|
import './modules/worker/front/module.js';
|
2022-05-24 10:50:22 +00:00
|
|
|
import './modules/shelving/front/module.js';
|
2019-10-24 22:53:53 +00:00
|
|
|
|
|
|
|
core.run(vnInterceptor => {
|
|
|
|
vnInterceptor.setApiPath(null);
|
|
|
|
});
|
|
|
|
|
2020-03-18 13:06:06 +00:00
|
|
|
window.ngModule = function(moduleName, ...args) {
|
|
|
|
let fns = [moduleName, function($provide, $translateProvider) {
|
2019-10-24 22:53:53 +00:00
|
|
|
// Avoid unexpected request warnings caused by angular translate
|
|
|
|
// https://angular-translate.github.io/docs/#/guide/22_unit-testing-with-angular-translate
|
|
|
|
$provide.factory('customLocaleLoader', function($q) {
|
|
|
|
return function() {
|
|
|
|
let deferred = $q.defer();
|
|
|
|
deferred.resolve({});
|
|
|
|
return deferred.promise;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
$translateProvider.useLoader('customLocaleLoader');
|
2020-03-18 13:06:06 +00:00
|
|
|
}];
|
|
|
|
|
|
|
|
if (args.length)
|
|
|
|
fns = fns.concat(args);
|
2023-01-17 14:36:39 +00:00
|
|
|
|
2023-01-16 14:18:00 +00:00
|
|
|
Date.vnUTC = () => {
|
2023-01-17 14:36:39 +00:00
|
|
|
return new Date(Date.UTC(2022, 5, 15, 11));
|
2023-01-16 14:18:00 +00:00
|
|
|
};
|
2020-03-18 13:06:06 +00:00
|
|
|
|
2023-01-16 14:18:00 +00:00
|
|
|
Date.vnNew = () => {
|
2023-01-17 14:36:39 +00:00
|
|
|
return new Date(Date.UTC(2022, 5, 15, 11));
|
2023-01-16 14:18:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
Date.vnNow = () => {
|
2023-01-17 14:36:39 +00:00
|
|
|
return new Date(Date.UTC(2022, 5, 15, 11)).getTime();
|
2023-01-16 14:18:00 +00:00
|
|
|
};
|
2020-03-18 13:06:06 +00:00
|
|
|
return angular.mock.module(...fns);
|
2019-10-24 22:53:53 +00:00
|
|
|
};
|
2023-01-16 14:18:00 +00:00
|
|
|
|