Skip to content

Commit

Permalink
sf_mobile_base: refactor vuex initialization
Browse files Browse the repository at this point in the history
a
  • Loading branch information
JuMiSanAr authored and simahawk committed Jan 28, 2022
1 parent f4dd7f9 commit 66a455d
Show file tree
Hide file tree
Showing 9 changed files with 1,272 additions and 4 deletions.
1,250 changes: 1,250 additions & 0 deletions shopfloor_mobile_base/static/wms/src/lib/vuex.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions shopfloor_mobile_base/static/wms/src/lib/vuex.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions shopfloor_mobile_base/static/wms/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {color_registry} from "./services/color_registry.js";
import {auth_handler_registry} from "./services/auth_handler_registry.js";
import {Odoo, OdooMocked} from "./services/odoo.js";
import VueSuperMethod from "./lib/vue-super-call.min.js";
import store from "./store/index.js";

Vue.prototype.$super = VueSuperMethod;

Expand Down Expand Up @@ -53,6 +54,7 @@ config_registry.add("authenticated", {default: false, reset_on_clear: true});
new Vue({
i18n,
router: router,
store,
vuetify: new Vuetify({
theme: {
themes: color_registry.get_themes(),
Expand Down
10 changes: 10 additions & 0 deletions shopfloor_mobile_base/templates/assets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
id="script_vue"
t-attf-src="/shopfloor_mobile_base/static/wms/src/lib/vue.js?v=#{app_version}"
/>
<script
t-if="not debug"
id="script_vuex_min"
t-attf-src="/shopfloor_mobile_base/static/wms/src/lib/vuex.min.js?v=#{app_version}"
/>
<script
t-if="debug"
id="script_vuex"
t-attf-src="/shopfloor_mobile_base/static/wms/src/lib/vuex.js?v=#{app_version}"
/>
<script
id="script_vue_router"
t-attf-src="/shopfloor_mobile_base/static/wms/src/lib/vue-router.min.js?v=#{app_version}"
Expand Down
2 changes: 1 addition & 1 deletion shopfloor_shopinvader_mobile_base/static/wms/src/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
*/

import store from "./store/index.js";
import store from "/shopfloor_mobile_base/static/wms/src/store/index.js";

import CartModule from "./store/modules/cart_store.js";
import {translation_registry} from "/shopfloor_mobile_base/static/wms/src/services/translation_registry.js";
Expand Down
2 changes: 1 addition & 1 deletion shopfloor_shopinvader_mobile_base/static/wms/src/orders.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js";
import {translation_registry} from "/shopfloor_mobile_base/static/wms/src/services/translation_registry.js";

import store from "./store/index.js";
import store from "/shopfloor_mobile_base/static/wms/src/store/index.js";

import OrderModule from "./store/modules/order_store.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js";
import {translation_registry} from "/shopfloor_mobile_base/static/wms/src/services/translation_registry.js";
import ProductModule from "./store/modules/product_store.js";
import store from "./store/index.js";
import store from "/shopfloor_mobile_base/static/wms/src/store/index.js";

const products_module = new ProductModule();
store.registerModule("products_module", products_module);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {utils_registry} from "/shopfloor_mobile_base/static/wms/src/services/utils_registry.js";
import store from "./store/index.js";
import store from "/shopfloor_mobile_base/static/wms/src/store/index.js";

export class CartUtils {
get_cart() {
Expand Down

0 comments on commit 66a455d

Please sign in to comment.