refactor: import alias
This commit is contained in:
parent
1f09edbb59
commit
99a8822cb8
7 changed files with 104 additions and 104 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { moveItemUp, moveItemDown, deleteItem, dialog } from 'src/stores/utils';
|
import { moveItemUp, moveItemDown, deleteItem, dialog } from 'src/stores/utils';
|
||||||
|
|
||||||
import NoData from 'src/components/NoData.vue';
|
import NoData from 'components/NoData.vue';
|
||||||
import WorkManagementComponent from './WorkManagementComponent.vue';
|
import WorkManagementComponent from './WorkManagementComponent.vue';
|
||||||
|
|
||||||
import { WorkItems } from 'src/stores/product-service/types';
|
import { WorkItems } from 'src/stores/product-service/types';
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import DrawerComponent from 'components/DrawerComponent.vue';
|
||||||
import CanvasComponent from 'components/CanvasComponent.vue';
|
import CanvasComponent from 'components/CanvasComponent.vue';
|
||||||
import ProfileMenu from 'components/ProfileMenu.vue';
|
import ProfileMenu from 'components/ProfileMenu.vue';
|
||||||
import useUserStore from 'src/stores/user';
|
import useUserStore from 'src/stores/user';
|
||||||
import FormDialog from 'src/components/FormDialog.vue';
|
import FormDialog from 'components/FormDialog.vue';
|
||||||
import useOptionStore from 'src/stores/options';
|
import useOptionStore from 'src/stores/options';
|
||||||
import { Option } from 'src/stores/user/types';
|
import { Option } from 'src/stores/user/types';
|
||||||
import { dialog } from 'src/stores/utils';
|
import { dialog } from 'src/stores/utils';
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ import AppBox from 'components/app/AppBox.vue';
|
||||||
import AddButton from 'components/AddButton.vue';
|
import AddButton from 'components/AddButton.vue';
|
||||||
import TooltipComponent from 'components/TooltipComponent.vue';
|
import TooltipComponent from 'components/TooltipComponent.vue';
|
||||||
import StatCard from 'components/StatCardComponent.vue';
|
import StatCard from 'components/StatCardComponent.vue';
|
||||||
import BranchCard from 'src/components/01_branch-management/BranchCard.vue';
|
import BranchCard from 'components/01_branch-management/BranchCard.vue';
|
||||||
import FormDialog from 'src/components/FormDialog.vue';
|
import FormDialog from 'components/FormDialog.vue';
|
||||||
import FormBranchInformation from 'src/components/01_branch-management/FormBranchInformation.vue';
|
import FormBranchInformation from 'components/01_branch-management/FormBranchInformation.vue';
|
||||||
import FormLocation from 'src/components/01_branch-management/FormLocation.vue';
|
import FormLocation from 'components/01_branch-management/FormLocation.vue';
|
||||||
import FormQr from 'src/components/01_branch-management/FormQr.vue';
|
import FormQr from 'components/01_branch-management/FormQr.vue';
|
||||||
import FormBranchContact from 'src/components/01_branch-management/FormBranchContact.vue';
|
import FormBranchContact from 'components/01_branch-management/FormBranchContact.vue';
|
||||||
import FormImage from 'src/components/01_branch-management/FormImage.vue';
|
import FormImage from 'components/01_branch-management/FormImage.vue';
|
||||||
import DrawerInfo from 'src/components/DrawerInfo.vue';
|
import DrawerInfo from 'components/DrawerInfo.vue';
|
||||||
import InfoForm from 'src/components/02_personnel-management/InfoForm.vue';
|
import InfoForm from 'components/02_personnel-management/InfoForm.vue';
|
||||||
|
|
||||||
import { BranchWithChildren, BranchCreate } from 'stores/branch/types';
|
import { BranchWithChildren, BranchCreate } from 'stores/branch/types';
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
|
|
|
||||||
|
|
@ -15,20 +15,21 @@ import {
|
||||||
} from 'src/stores/user/types';
|
} from 'src/stores/user/types';
|
||||||
import { BranchUserStats } from 'src/stores/branch/types';
|
import { BranchUserStats } from 'src/stores/branch/types';
|
||||||
import useAddressStore from 'src/stores/address';
|
import useAddressStore from 'src/stores/address';
|
||||||
import ButtonAddComponent from 'src/components/ButtonAddCompoent.vue';
|
import ButtonAddComponent from 'components/ButtonAddCompoent.vue';
|
||||||
import PersonCard from 'components/home/PersonCard.vue';
|
import PersonCard from 'components/home/PersonCard.vue';
|
||||||
import AppBox from 'components/app/AppBox.vue';
|
import AppBox from 'components/app/AppBox.vue';
|
||||||
import StatCardComponent from 'components/StatCardComponent.vue';
|
import StatCardComponent from 'components/StatCardComponent.vue';
|
||||||
import SelectorList from 'components/SelectorList.vue';
|
import SelectorList from 'components/SelectorList.vue';
|
||||||
import AddButton from 'components/AddButton.vue';
|
import AddButton from 'components/AddButton.vue';
|
||||||
import TooltipComponent from 'components/TooltipComponent.vue';
|
import TooltipComponent from 'components/TooltipComponent.vue';
|
||||||
import FormDialog from 'src/components/FormDialog.vue';
|
import FormDialog from 'components/FormDialog.vue';
|
||||||
import FormInformation from 'src/components/02_personnel-management/FormInformation.vue';
|
import FormInformation from 'components/02_personnel-management/FormInformation.vue';
|
||||||
import FormPerson from 'src/components/02_personnel-management/FormPerson.vue';
|
import FormPerson from 'components/02_personnel-management/FormPerson.vue';
|
||||||
import FormByType from 'src/components/02_personnel-management/FormByType.vue';
|
import FormByType from 'components/02_personnel-management/FormByType.vue';
|
||||||
import DrawerInfo from 'src/components/DrawerInfo.vue';
|
import DrawerInfo from 'components/DrawerInfo.vue';
|
||||||
import InfoForm from 'src/components/02_personnel-management/InfoForm.vue';
|
import InfoForm from 'components/02_personnel-management/InfoForm.vue';
|
||||||
import ProfileUpload from 'src/components/ProfileUpload.vue';
|
import NoData from 'components/NoData.vue';
|
||||||
|
import ProfileUpload from 'components/ProfileUpload.vue';
|
||||||
|
|
||||||
const { locale } = useI18n();
|
const { locale } = useI18n();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,24 @@
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import AppBox from 'components/app/AppBox.vue';
|
import AppBox from 'components/app/AppBox.vue';
|
||||||
import AddButton from 'components/AddButton.vue';
|
import AddButton from 'components/AddButton.vue';
|
||||||
import ProductCardComponent from 'src/components/04_product-service/ProductCardComponent.vue';
|
import ProductCardComponent from 'components/04_product-service/ProductCardComponent.vue';
|
||||||
import StatCard from 'components/StatCardComponent.vue';
|
import StatCard from 'components/StatCardComponent.vue';
|
||||||
import NewProductCardCompoent from 'components/04_product-service/NewProductCardComponent.vue';
|
import NewProductCardCompoent from 'components/04_product-service/NewProductCardComponent.vue';
|
||||||
import DrawerInfo from 'src/components/DrawerInfo.vue';
|
import DrawerInfo from 'components/DrawerInfo.vue';
|
||||||
import BasicInformation from 'src/components/04_product-service/BasicInformation.vue';
|
import BasicInformation from 'components/04_product-service/BasicInformation.vue';
|
||||||
import FormDialog from 'src/components/FormDialog.vue';
|
import FormDialog from 'components/FormDialog.vue';
|
||||||
import TooltipComponent from 'components/TooltipComponent.vue';
|
import TooltipComponent from 'components/TooltipComponent.vue';
|
||||||
import ButtonAddComponent from 'src/components/ButtonAddCompoent.vue';
|
import ButtonAddComponent from 'components/ButtonAddCompoent.vue';
|
||||||
import BasicInfoProduct from 'src/components/04_product-service/BasicInfoProduct.vue';
|
import BasicInfoProduct from 'components/04_product-service/BasicInfoProduct.vue';
|
||||||
import PriceDataComponent from 'src/components/04_product-service/PriceDataComponent.vue';
|
import PriceDataComponent from 'components/04_product-service/PriceDataComponent.vue';
|
||||||
import ProfileUpload from 'src/components/ProfileUpload.vue';
|
import ProfileUpload from 'components/ProfileUpload.vue';
|
||||||
import TotalProductCardComponent from 'components/04_product-service/TotalProductCardComponent.vue';
|
import TotalProductCardComponent from 'components/04_product-service/TotalProductCardComponent.vue';
|
||||||
import FormServiceWork from 'src/components/04_product-service/FormServiceWork.vue';
|
import FormServiceWork from 'components/04_product-service/FormServiceWork.vue';
|
||||||
import ServiceProperties from 'src/components/04_product-service/ServiceProperties.vue';
|
import ServiceProperties from 'components/04_product-service/ServiceProperties.vue';
|
||||||
import WorkNameManagement from 'src/components/04_product-service/WorkNameManagement.vue';
|
import WorkNameManagement from 'components/04_product-service/WorkNameManagement.vue';
|
||||||
import useOptionStore from 'src/stores/options';
|
import useOptionStore from 'src/stores/options';
|
||||||
import FormServiceProperties from 'src/components/04_product-service/FormServiceProperties.vue';
|
import FormServiceProperties from 'components/04_product-service/FormServiceProperties.vue';
|
||||||
import InfoForm from 'src/components/02_personnel-management/InfoForm.vue';
|
import InfoForm from 'components/02_personnel-management/InfoForm.vue';
|
||||||
|
|
||||||
import useFlowStore from 'src/stores/flow';
|
import useFlowStore from 'src/stores/flow';
|
||||||
import { Status } from 'src/stores/types';
|
import { Status } from 'src/stores/types';
|
||||||
|
|
@ -86,8 +86,8 @@ const {
|
||||||
|
|
||||||
const { workNameItems } = storeToRefs(productServiceStore);
|
const { workNameItems } = storeToRefs(productServiceStore);
|
||||||
|
|
||||||
import ItemCard from 'src/components/ItemCard.vue';
|
import ItemCard from 'components/ItemCard.vue';
|
||||||
import TotalProductComponent from 'src/components/04_product-service/TotalProductComponent.vue';
|
import TotalProductComponent from 'components/04_product-service/TotalProductComponent.vue';
|
||||||
|
|
||||||
const stat = ref<
|
const stat = ref<
|
||||||
{
|
{
|
||||||
|
|
@ -1135,48 +1135,42 @@ watch(currentPageService, async () => {
|
||||||
|
|
||||||
<div v-if="stat[0].count !== 0">
|
<div v-if="stat[0].count !== 0">
|
||||||
<div
|
<div
|
||||||
v-if="productMode === 'group'"
|
|
||||||
class="text-h6 text-weight-bold q-mb-md"
|
|
||||||
></div>
|
|
||||||
<div v-else-if="productMode === 'type'" class="row items-center q-mb-md">
|
|
||||||
<q-btn
|
|
||||||
round
|
|
||||||
icon="mdi-arrow-left"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
@click="productMode = 'group'"
|
|
||||||
class="q-mr-md"
|
|
||||||
/>
|
|
||||||
<div class="text-h6 app-text-muted q-mr-sm hover-underline">
|
|
||||||
{{ pathGroupName }}
|
|
||||||
</div>
|
|
||||||
<div class="text-h6 app-text-muted q-mx-sm">/</div>
|
|
||||||
<div class="text-h6 text-weight-bold">
|
|
||||||
{{ $t('productAndServiceType') }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="productMode === 'service'"
|
|
||||||
class="row items-center q-mb-md"
|
class="row items-center q-mb-md"
|
||||||
|
v-if="productMode === 'service' || productMode === 'type'"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
round
|
||||||
icon="mdi-arrow-left"
|
icon="mdi-arrow-left"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
@click="productMode = 'type'"
|
@click="productMode = productMode === 'service' ? 'type' : 'group'"
|
||||||
class="q-mr-md"
|
class="q-mr-md"
|
||||||
/>
|
/>
|
||||||
<div class="text-h6 app-text-muted q-mr-sm hover-underline">
|
<div
|
||||||
|
class="text-h6 hover-underline"
|
||||||
|
:class="{
|
||||||
|
'app-text-muted': productMode !== 'group',
|
||||||
|
'text-weight-bold': productMode === 'group',
|
||||||
|
}"
|
||||||
|
@click="productMode = 'type'"
|
||||||
|
>
|
||||||
{{ pathGroupName }}
|
{{ pathGroupName }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-h6 app-text-muted q-mx-sm">/</div>
|
<div
|
||||||
<div class="text-h6 app-text-muted q-mr-sm hover-underline">
|
class="text-h6 app-text-muted q-mx-sm"
|
||||||
{{ pathTypeName }}
|
v-if="productMode === 'service'"
|
||||||
|
>
|
||||||
|
/
|
||||||
</div>
|
</div>
|
||||||
<div class="text-h6 app-text-muted q-mx-sm">/</div>
|
<div
|
||||||
<div class="text-h6 text-weight-bold">
|
v-if="productMode === 'service'"
|
||||||
{{ $t('mainProductTitle') }}
|
class="text-h6"
|
||||||
|
:class="{
|
||||||
|
'app-text-muted': productMode !== 'service',
|
||||||
|
'text-weight-bold': productMode === 'service',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ pathTypeName }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1405,34 +1399,35 @@ watch(currentPageService, async () => {
|
||||||
>
|
>
|
||||||
<NoData notFound />
|
<NoData notFound />
|
||||||
</div>
|
</div>
|
||||||
|
<template v-else>
|
||||||
|
<div
|
||||||
|
v-if="productMode === 'group' && !inputSearch"
|
||||||
|
class="flex justify-center q-pt-xl"
|
||||||
|
>
|
||||||
|
<q-pagination
|
||||||
|
claess="pagination"
|
||||||
|
v-model="currentPageGroup"
|
||||||
|
:max="maxPageGroup"
|
||||||
|
direction-links
|
||||||
|
active-color="primary"
|
||||||
|
gutter="sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="productMode === 'group' && !inputSearch"
|
v-if="productMode === 'type' && !inputSearch"
|
||||||
class="flex justify-center q-pt-xl"
|
class="flex justify-center q-pt-xl"
|
||||||
>
|
>
|
||||||
<q-pagination
|
<q-pagination
|
||||||
claess="pagination"
|
claess="pagination"
|
||||||
v-model="currentPageGroup"
|
v-model="currentPageType"
|
||||||
:max="maxPageGroup"
|
:max="maxPageType"
|
||||||
direction-links
|
direction-links
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
gutter="sm"
|
gutter="sm"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
<div
|
|
||||||
v-if="productMode === 'type' && !inputSearch"
|
|
||||||
class="flex justify-center q-pt-xl"
|
|
||||||
>
|
|
||||||
<q-pagination
|
|
||||||
claess="pagination"
|
|
||||||
v-model="currentPageType"
|
|
||||||
:max="maxPageType"
|
|
||||||
direction-links
|
|
||||||
active-color="primary"
|
|
||||||
gutter="sm"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</AppBox>
|
</AppBox>
|
||||||
<AppBox bordered v-else-if="productMode === 'service'" no-padding>
|
<AppBox bordered v-else-if="productMode === 'service'" no-padding>
|
||||||
<div class="row justify-between q-px-md">
|
<div class="row justify-between q-px-md">
|
||||||
|
|
@ -1685,7 +1680,11 @@ watch(currentPageService, async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="productAndServiceTab === 'all' && !inputSearchProductAndService"
|
v-if="
|
||||||
|
productAndServiceTab === 'all' &&
|
||||||
|
productAndService.length > 0 &&
|
||||||
|
!inputSearchProductAndService
|
||||||
|
"
|
||||||
class="row justify-center q-pb-md"
|
class="row justify-center q-pb-md"
|
||||||
>
|
>
|
||||||
<q-pagination
|
<q-pagination
|
||||||
|
|
@ -1699,9 +1698,7 @@ watch(currentPageService, async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="productAndServiceTab === 'product'"
|
||||||
productAndServiceTab === 'product' && !inputSearchProductAndService
|
|
||||||
"
|
|
||||||
class="row justify-center q-pb-md"
|
class="row justify-center q-pb-md"
|
||||||
>
|
>
|
||||||
<q-pagination
|
<q-pagination
|
||||||
|
|
@ -1715,9 +1712,7 @@ watch(currentPageService, async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="productAndServiceTab === 'service'"
|
||||||
productAndServiceTab === 'service' && !inputSearchProductAndService
|
|
||||||
"
|
|
||||||
class="row justify-center q-pb-md"
|
class="row justify-center q-pb-md"
|
||||||
>
|
>
|
||||||
<q-pagination
|
<q-pagination
|
||||||
|
|
@ -1755,7 +1750,11 @@ watch(currentPageService, async () => {
|
||||||
:show-edit="!currentStatusProduct"
|
:show-edit="!currentStatusProduct"
|
||||||
ref="formDialogRef"
|
ref="formDialogRef"
|
||||||
v-model:drawerOpen="drawerInfo"
|
v-model:drawerOpen="drawerInfo"
|
||||||
:title="'test'"
|
:title="
|
||||||
|
$t(productMode === 'group' ? 'productGroup' : 'productType', {
|
||||||
|
name: formDataGroup.code,
|
||||||
|
})
|
||||||
|
"
|
||||||
:undo="() => undoProductGroup()"
|
:undo="() => undoProductGroup()"
|
||||||
:isEdit="isEdit"
|
:isEdit="isEdit"
|
||||||
:editData="() => (isEdit = true)"
|
:editData="() => (isEdit = true)"
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import QuatationForm from './QuatationForm.vue';
|
import QuatationForm from './QuatationForm.vue';
|
||||||
|
|
||||||
import FormDialog from 'src/components/FormDialog.vue';
|
import FormDialog from 'components/FormDialog.vue';
|
||||||
import HistoryEditComponent from 'src/components/03_customer-management/HistoryEditComponent.vue';
|
import HistoryEditComponent from 'components/03_customer-management/HistoryEditComponent.vue';
|
||||||
|
|
||||||
const test = ref(true);
|
const test = ref(true);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
|
|
||||||
import MainDialog from 'src/components/05_buy-sale/MainDialog.vue';
|
import MainDialog from 'components/05_buy-sale/MainDialog.vue';
|
||||||
import WorkerItem from 'src/components/05_buy-sale/WorkerItem.vue';
|
import WorkerItem from 'components/05_buy-sale/WorkerItem.vue';
|
||||||
import AppBox from 'src/components/app/AppBox.vue';
|
import AppBox from 'components/app/AppBox.vue';
|
||||||
|
|
||||||
const dialogState = ref(true);
|
const dialogState = ref(true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue