refactor: type name
This commit is contained in:
parent
548f10feab
commit
f26f6b51d6
7 changed files with 24 additions and 24 deletions
|
|
@ -46,7 +46,7 @@ import {
|
|||
} from 'src/pages/03_customer-management/constant';
|
||||
import {
|
||||
ProductGroup,
|
||||
ProductList,
|
||||
Product,
|
||||
Service,
|
||||
} from 'src/stores/product-service/types';
|
||||
|
||||
|
|
@ -121,11 +121,11 @@ const router = useRouter();
|
|||
type ProductGroupId = string;
|
||||
|
||||
const productGroup = ref<ProductGroup[]>([]);
|
||||
const productList = ref<Partial<Record<ProductGroupId, ProductList[]>>>({});
|
||||
const productList = ref<Partial<Record<ProductGroupId, Product[]>>>({});
|
||||
const serviceList = ref<Partial<Record<ProductGroupId, Service[]>>>({});
|
||||
|
||||
type Id = string;
|
||||
const product = ref<Record<Id, ProductList>>({});
|
||||
const product = ref<Record<Id, Product>>({});
|
||||
const service = ref<Record<Id, Service>>({});
|
||||
|
||||
const selectedGroup = ref<ProductGroup | null>(null);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import DeleteButton from 'src/components/button/DeleteButton.vue';
|
|||
import { isRoleInclude } from 'src/stores/utils';
|
||||
import {
|
||||
ProductGroup,
|
||||
ProductList,
|
||||
Product,
|
||||
Service,
|
||||
Work,
|
||||
} from 'src/stores/product-service/types';
|
||||
|
|
@ -40,7 +40,7 @@ const inputSearch = defineModel<string>('inputSearch');
|
|||
const productGroup = defineModel<ProductGroup[]>('productGroup', {
|
||||
default: [],
|
||||
});
|
||||
const productList = defineModel<Partial<Record<ProductGroupId, ProductList[]>>>(
|
||||
const productList = defineModel<Partial<Record<ProductGroupId, Product[]>>>(
|
||||
'productList',
|
||||
{ default: {} },
|
||||
);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import { QuotationPayload } from 'src/stores/quotations/types';
|
|||
import { Employee } from 'src/stores/employee/types';
|
||||
import {
|
||||
ProductGroup,
|
||||
ProductList,
|
||||
Product,
|
||||
Service,
|
||||
} from 'src/stores/product-service/types';
|
||||
|
||||
|
|
@ -98,11 +98,11 @@ const pageState = reactive({
|
|||
productServiceModal: false,
|
||||
});
|
||||
|
||||
const productList = ref<Partial<Record<ProductGroupId, ProductList[]>>>({});
|
||||
const productList = ref<Partial<Record<ProductGroupId, Product[]>>>({});
|
||||
const serviceList = ref<Partial<Record<ProductGroupId, Service[]>>>({});
|
||||
const productGroup = ref<ProductGroup[]>([]);
|
||||
|
||||
const product = ref<Record<Id, ProductList>>({});
|
||||
const product = ref<Record<Id, Product>>({});
|
||||
const service = ref<Record<Id, Service>>({});
|
||||
|
||||
const selectedGroupSub = ref<'product' | 'service' | null>(null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue