2023-11-16 23:25:34 +08:00
|
|
|
import PerfectScrollbar from 'vue3-perfect-scrollbar';
|
|
|
|
import { createApp } from 'vue/dist/vue.esm-bundler.js';
|
2023-10-27 16:31:38 +08:00
|
|
|
import ManageStockValueModal from '../../vue/repository_row/manage_stock_value_modal.vue';
|
2023-11-16 23:25:34 +08:00
|
|
|
import { mountWithTurbolinks } from './helpers/turbolinks.js';
|
2023-10-27 16:31:38 +08:00
|
|
|
|
2023-11-20 22:26:01 +08:00
|
|
|
|
|
|
|
window.initManageStockValueModalComponent = () => {
|
|
|
|
if (window.manageStockModalComponent) return;
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
if (notTurbolinksPreview()) {
|
|
|
|
const app = createApp({});
|
|
|
|
app.component('ManageStockValueModal', ManageStockValueModal);
|
|
|
|
app.use(PerfectScrollbar);
|
|
|
|
app.config.globalProperties.i18n = window.I18n;
|
|
|
|
mountWithTurbolinks(app, '#manageStockValueModal');
|
|
|
|
}
|
|
|
|
};
|