fix: function name
This commit is contained in:
parent
29998081d4
commit
8ce8c9a977
3 changed files with 29 additions and 24 deletions
|
|
@ -71,10 +71,10 @@ const optionStore = useOptionStore();
|
|||
|
||||
const {
|
||||
fetchStatsProductGroup,
|
||||
fetchListProductService,
|
||||
createProductService,
|
||||
editProductService,
|
||||
deleteProductService,
|
||||
fetchProductGroup,
|
||||
createProductGroup,
|
||||
editProductGroup,
|
||||
deleteProductGroup,
|
||||
|
||||
fetchStatsProduct,
|
||||
fetchListProduct,
|
||||
|
|
@ -561,7 +561,7 @@ async function fetchListOfOptionBranch() {
|
|||
}
|
||||
|
||||
async function fetchListGroups() {
|
||||
const res = await fetchListProductService({
|
||||
const res = await fetchProductGroup({
|
||||
page: currentPageGroup.value,
|
||||
pageSize: pageSizeGroup.value,
|
||||
query: !!inputSearch.value ? inputSearch.value : undefined,
|
||||
|
|
@ -688,7 +688,7 @@ async function toggleStatusService(id: string, status: Status) {
|
|||
}
|
||||
|
||||
async function toggleStatusGroup(id: string, status: Status) {
|
||||
const res = await editProductService(id, {
|
||||
const res = await editProductGroup(id, {
|
||||
status: status === 'INACTIVE' ? 'ACTIVE' : 'INACTIVE',
|
||||
});
|
||||
if (res) currentStatusGroupType.value = res.status;
|
||||
|
|
@ -806,7 +806,7 @@ async function deleteProductById(productId?: string) {
|
|||
if (editByTree.value !== undefined) {
|
||||
if (editByTree.value === 'group') {
|
||||
// Product Group
|
||||
const res = await deleteProductService(
|
||||
const res = await deleteProductGroup(
|
||||
productId ?? currentIdGrop.value,
|
||||
);
|
||||
if (res) {
|
||||
|
|
@ -821,7 +821,7 @@ async function deleteProductById(productId?: string) {
|
|||
} else {
|
||||
if (productMode.value === 'group') {
|
||||
// Product Group
|
||||
const res = await deleteProductService(
|
||||
const res = await deleteProductGroup(
|
||||
productId ?? currentIdGrop.value,
|
||||
);
|
||||
if (res) {
|
||||
|
|
@ -1154,10 +1154,10 @@ async function submitProduct(notClose = false) {
|
|||
async function submitGroup() {
|
||||
if (drawerInfo.value) {
|
||||
if (currentIdGropTree.value)
|
||||
await editProductService(currentIdGropTree.value, formDataGroup.value);
|
||||
else await editProductService(currentIdGrop.value, formDataGroup.value);
|
||||
await editProductGroup(currentIdGropTree.value, formDataGroup.value);
|
||||
else await editProductGroup(currentIdGrop.value, formDataGroup.value);
|
||||
} else {
|
||||
const res = await createProductService(formDataGroup.value);
|
||||
const res = await createProductGroup(formDataGroup.value);
|
||||
|
||||
if (res) {
|
||||
allStat.value[0].count = allStat.value[0].count + 1;
|
||||
|
|
@ -4152,7 +4152,12 @@ watch(
|
|||
v-if="!infoServiceEdit"
|
||||
id="btn-info-basic-edit"
|
||||
icon-only
|
||||
@click="infoServiceEdit = true"
|
||||
@click="
|
||||
() => {
|
||||
infoServiceEdit = true;
|
||||
serviceTreeView = false;
|
||||
}
|
||||
"
|
||||
type="button"
|
||||
/>
|
||||
<DeleteButton
|
||||
|
|
@ -4416,7 +4421,7 @@ watch(
|
|||
const res = await productServiceStore.addImageList(
|
||||
v,
|
||||
dialogProductEdit ? currentIdProduct : currentIdService,
|
||||
Date.now(),
|
||||
Date.now().toString(),
|
||||
dialogProductEdit ? 'product' : 'service',
|
||||
);
|
||||
await fetchImageList(
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ const productServiceList = ref<
|
|||
>([]);
|
||||
|
||||
async function assignToProductServiceList() {
|
||||
const ret = await productServiceStore.fetchListProductService({
|
||||
const ret = await productServiceStore.fetchProductGroup({
|
||||
page: 1,
|
||||
pageSize: 9999,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue