Skip to content

Commit

Permalink
Merge pull request #6750 from ylavoie/relocate-vue
Browse files Browse the repository at this point in the history
Relocate vue
  • Loading branch information
ehuelsmann committed Sep 3, 2022
2 parents 54f40e6 + 8e36dab commit 8243090
Show file tree
Hide file tree
Showing 29 changed files with 15,331 additions and 1,061 deletions.
4 changes: 2 additions & 2 deletions UI/src/components/ConfigTable.vue
Expand Up @@ -6,8 +6,8 @@ import { storeToRefs } from "pinia";
import { contextRef } from "@/robot-vue";
import { useSessionUserStore } from "@/store/sessionUser";
import { createTableMachine } from "./ConfigTable.machines.js";
import ConfigTableRow from "./ConfigTableRow.vue";
import { createTableMachine } from "@/components/ConfigTable.machines.js";
import ConfigTableRow from "@/components/ConfigTableRow.vue";
const props = defineProps([
"columns",
Expand Down
2 changes: 1 addition & 1 deletion UI/src/components/ConfigTableRow.vue
Expand Up @@ -34,7 +34,7 @@

<script setup>
import { createRowMachine } from "./ConfigTable.machines.js";
import { createRowMachine } from "@/components/ConfigTable.machines.js";
import { computed, inject, watch } from "vue";
import { contextRef } from "@/robot-vue";
import { useI18n } from "vue-i18n";
Expand Down
2 changes: 1 addition & 1 deletion UI/src/components/Toast.vue
@@ -1,6 +1,6 @@
<script setup>
import { createToastMachine } from "./Toaster.machines";
import { createToastMachine } from "@/components/Toaster.machines";
const props = defineProps({"data": { }, "type": { default: "success" }});
const emit = defineEmits(["remove"]);
Expand Down
4 changes: 2 additions & 2 deletions UI/src/components/Toaster.vue
Expand Up @@ -4,8 +4,8 @@ import { computed, inject } from "vue";
import { contextRef } from "@/robot-vue";
import { useSessionUserStore } from "@/store/sessionUser";
import { createToasterMachine } from "./Toaster.machines";
import Toast from "./Toast.vue";
import { createToasterMachine } from "@/components/Toaster.machines";
import Toast from "@/components/Toast.vue";
const user = useSessionUserStore();
const wantToaster = computed(() => !user.preferences.__disableToaster);
Expand Down
2 changes: 1 addition & 1 deletion UI/src/elements/lsmb-base-input.js
@@ -1,7 +1,7 @@
/** @format */
/* eslint-disable class-methods-use-this */

import { LsmbDijit } from "./lsmb-dijit";
import { LsmbDijit } from "@/elements/lsmb-dijit";

const registry = require("dijit/registry");

Expand Down
2 changes: 1 addition & 1 deletion UI/src/elements/lsmb-button.js
@@ -1,7 +1,7 @@
/** @format */
/* eslint-disable class-methods-use-this */

import { LsmbDijit } from "./lsmb-dijit";
import { LsmbDijit } from "@/elements/lsmb-dijit";

const Button = require("dijit/form/Button");
const registry = require("dijit/registry");
Expand Down
2 changes: 1 addition & 1 deletion UI/src/elements/lsmb-date.js
@@ -1,7 +1,7 @@
/** @format */
/* eslint-disable class-methods-use-this, max-classes-per-file */

import { LsmbBaseInput } from "./lsmb-base-input";
import { LsmbBaseInput } from "@/elements/lsmb-base-input";

const dojoDateBox = require("lsmb/DateTextBox");

Expand Down
2 changes: 1 addition & 1 deletion UI/src/elements/lsmb-password.js
@@ -1,7 +1,7 @@
/** @format */
/* eslint-disable class-methods-use-this */

import { LsmbText } from "./lsmb-text";
import { LsmbText } from "@/elements/lsmb-text";

export class LsmbPassword extends LsmbText {
_stdProps() {
Expand Down
2 changes: 1 addition & 1 deletion UI/src/elements/lsmb-text.js
@@ -1,7 +1,7 @@
/** @format */
/* eslint-disable class-methods-use-this, max-classes-per-file */

import { LsmbBaseInput } from "./lsmb-base-input";
import { LsmbBaseInput } from "@/elements/lsmb-base-input";

const dojoTextBox = require("dijit/form/ValidationTextBox");

Expand Down
10 changes: 5 additions & 5 deletions UI/src/main-vue.js
Expand Up @@ -2,13 +2,13 @@
/* eslint-disable no-console, import/no-unresolved, vue/multi-word-component-names */

import { createApp } from "vue";
import router from "./router";
import router from "@/router";
import i18n, { setI18nLanguage } from "@/i18n";
import { useI18n } from "vue-i18n";
import LoginPage from "./components/LoginPage";
import Toaster from "./components/Toaster";
import { createToasterMachine } from "./components/Toaster.machines";
import { useSessionUserStore } from "./store/sessionUser";
import LoginPage from "@/views/LoginPage";
import Toaster from "@/components/Toaster";
import { createToasterMachine } from "@/components/Toaster.machines";
import { useSessionUserStore } from "@/store/sessionUser";

import { createPinia } from "pinia";

Expand Down
30 changes: 15 additions & 15 deletions UI/src/router.js
Expand Up @@ -3,21 +3,21 @@
/* eslint-disable-next-line import/no-unresolved */
import { createRouter, createWebHashHistory } from "vue-router";

import Home from "./components/Home";
import ServerUI from "./components/ServerUI";
import ImportCsvAaBatch from "./components/ImportCSV-AA-Batch";
import ImportCsvCoA from "./components/ImportCSV-CoA";
import ImportCsvGl from "./components/ImportCSV-GL";
import ImportCsvGlBatch from "./components/ImportCSV-GL-Batch";
import ImportCsvGSO from "./components/ImportCSV-GSO";
import ImportCsvInventory from "./components/ImportCSV-Inventory";
import ImportCsvTimecard from "./components/ImportCSV-Timecard";
import Warehouses from "./components/Warehouses.vue";
import Pricegroups from "./components/Pricegroups.vue";
import Languages from "./components/Languages.vue";
import SIC from "./components/SIC.vue";
import BusinessTypes from "./components/BusinessTypes.vue";
import GIFI from "./components/GIFI.vue";
import Home from "@/views/Home";
import ServerUI from "@/components/ServerUI";
import ImportCsvAaBatch from "@/views/ImportCSV-AA-Batch";
import ImportCsvCoA from "@/views/ImportCSV-CoA";
import ImportCsvGl from "@/views/ImportCSV-GL";
import ImportCsvGlBatch from "@/views/ImportCSV-GL-Batch";
import ImportCsvGSO from "@/views/ImportCSV-GSO";
import ImportCsvInventory from "@/views/ImportCSV-Inventory";
import ImportCsvTimecard from "@/views/ImportCSV-Timecard";
import Warehouses from "@/views/Warehouses.vue";
import Pricegroups from "@/views/Pricegroups.vue";
import Languages from "@/views/Languages.vue";
import SIC from "@/views/SIC.vue";
import BusinessTypes from "@/views/BusinessTypes.vue";
import GIFI from "@/views/GIFI.vue";

const routes = [
{ name: "home", path: "/", component: Home },
Expand Down
Expand Up @@ -2,7 +2,7 @@
import { useBusinessTypesStore } from "@/store/business-types";
import { useI18n } from "vue-i18n";
import ConfigTable from "./ConfigTable.vue";
import ConfigTable from "@/components/ConfigTable.vue";
const { t } = useI18n();
const COLUMNS = [
Expand Down
4 changes: 2 additions & 2 deletions UI/src/components/GIFI.vue → UI/src/views/GIFI.vue
Expand Up @@ -2,9 +2,9 @@
import { useGIFIsStore } from "@/store/gifis";
import { useI18n } from "vue-i18n";
import ConfigTable from "./ConfigTable.vue";
import ConfigTable from "@/components/ConfigTable.vue";
import ImportCsvGifi from "@/components/ImportCSV-GIFI";
import ImportCsvGifi from "@/views/ImportCSV-GIFI";
const { t } = useI18n();
const COLUMNS = [
Expand Down
File renamed without changes.
Expand Up @@ -49,7 +49,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -47,7 +47,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -36,7 +36,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -51,7 +51,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -63,7 +63,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -91,7 +91,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -38,7 +38,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -37,7 +37,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -52,7 +52,7 @@ dl > dd {

<script>
import ImportCSVBase from "./ImportCSV-Base";
import ImportCSVBase from "@/components/ImportCSV-Base";
export default {
Expand Down
Expand Up @@ -2,7 +2,7 @@
import { useLanguagesStore } from "@/store/languages";
import { useI18n } from "vue-i18n";
import ConfigTable from "./ConfigTable.vue";
import ConfigTable from "@/components/ConfigTable.vue";
const { t } = useI18n();
const COLUMNS = [
Expand Down
13 changes: 9 additions & 4 deletions UI/src/components/LoginPage.vue → UI/src/views/LoginPage.vue
Expand Up @@ -37,13 +37,13 @@
:value="company"
v-update:company="" />
</div>
<lsmb-button tabindex="4" id="login" @click="login">{{ $t('Login') }}</lsmb-button>
<lsmb-button tabindex="4" id="login" @click="login" :disabled="loginDisabled">{{ $t('Login') }}</lsmb-button>
</div>
</div>
</div>
<div v-show="inProgress">
{{ $t("Logging in... Please wait.") }}
</div>
<transition>
<div v-if="inProgress">{{ $t("Logging in... Please wait.") }}</div>
</transition>
</div>
</div>
</form>
Expand Down Expand Up @@ -71,6 +71,11 @@ export default defineComponent({
inProgress: false
};
},
computed: {
loginDisabled() {
return !this.username || !this.password || !this.company
}
},
methods: {
async login() {
this.inProgress = true;
Expand Down
Expand Up @@ -2,7 +2,7 @@
import { usePricegroupsStore } from "@/store/pricegroups";
import { useI18n } from "vue-i18n";
import ConfigTable from "./ConfigTable.vue";
import ConfigTable from "@/components/ConfigTable.vue";
const { t } = useI18n();
const COLUMNS = [
Expand Down
4 changes: 2 additions & 2 deletions UI/src/components/SIC.vue → UI/src/views/SIC.vue
Expand Up @@ -2,9 +2,9 @@
import { useSICsStore } from "@/store/sics";
import { useI18n } from "vue-i18n";
import ConfigTable from "./ConfigTable.vue";
import ConfigTable from "@/components/ConfigTable.vue";
import ImportCsvSic from "@/components/ImportCSV-SIC";
import ImportCsvSic from "@/views/ImportCSV-SIC";
const { t } = useI18n();
const COLUMNS = [
Expand Down
Expand Up @@ -2,7 +2,7 @@
import { useWarehousesStore } from "@/store/warehouses";
import { useI18n } from "vue-i18n";
import ConfigTable from "./ConfigTable.vue";
import ConfigTable from "@/components/ConfigTable.vue";
const { t } = useI18n();
const COLUMNS = [
Expand Down

0 comments on commit 8243090

Please sign in to comment.