refactor: type name
This commit is contained in:
parent
548f10feab
commit
f26f6b51d6
7 changed files with 24 additions and 24 deletions
|
|
@ -55,7 +55,7 @@ import {
|
|||
ProductGroup,
|
||||
ProductGroupCreate,
|
||||
ProductCreate,
|
||||
ProductList,
|
||||
Product,
|
||||
ServiceCreate,
|
||||
Service,
|
||||
ServiceById,
|
||||
|
|
@ -227,10 +227,10 @@ const productMode = ref<'group' | 'service' | 'product'>('group');
|
|||
|
||||
const productTab = ref(1);
|
||||
const productGroup = ref<ProductGroup[]>();
|
||||
const product = ref<(ProductList & { type: 'product' })[]>();
|
||||
const productIsAdd = ref<(ProductList & { type: 'product' })[]>();
|
||||
const product = ref<(Product & { type: 'product' })[]>();
|
||||
const productIsAdd = ref<(Product & { type: 'product' })[]>();
|
||||
const service = ref<(Service & { type: 'service' })[]>();
|
||||
const resultSearchProduct = ref<ProductList[]>();
|
||||
const resultSearchProduct = ref<Product[]>();
|
||||
|
||||
const productAndServiceTab = ref<'product' | 'service'>('service');
|
||||
const manageWorkNameDialog = ref(false);
|
||||
|
|
@ -460,7 +460,7 @@ const $q = useQuasar();
|
|||
|
||||
const workItems = ref<WorkItems[]>([]);
|
||||
const workNameRef = ref();
|
||||
const selectProduct = ref<ProductList[]>([]);
|
||||
const selectProduct = ref<Product[]>([]);
|
||||
const currentWorkIndex = ref<number>(0);
|
||||
|
||||
const serviceTab = ref(1);
|
||||
|
|
@ -525,7 +525,7 @@ async function searchProduct(isAdd: boolean = true) {
|
|||
flowStore.rotate();
|
||||
}
|
||||
|
||||
function selectAllProduct(list: ProductList[]) {
|
||||
function selectAllProduct(list: Product[]) {
|
||||
list
|
||||
?.filter((i) => {
|
||||
if (i.status === 'INACTIVE') {
|
||||
|
|
@ -964,7 +964,7 @@ const prevProduct = ref<ProductCreate>({
|
|||
image: undefined,
|
||||
});
|
||||
|
||||
async function assignFormDataProduct(data: ProductList) {
|
||||
async function assignFormDataProduct(data: Product) {
|
||||
productTab.value = 1;
|
||||
statusToggle.value = data.status === 'INACTIVE' ? false : true;
|
||||
profileUrl.value = `${baseUrl.value}/product/${data?.id}/image/${data?.selectedImage}`;
|
||||
|
|
|
|||
|
|
@ -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