diff --git a/src/components/04_product-service/TotalProductCardComponent.vue b/src/components/04_product-service/TotalProductCardComponent.vue
index 80300205..d374f5be 100644
--- a/src/components/04_product-service/TotalProductCardComponent.vue
+++ b/src/components/04_product-service/TotalProductCardComponent.vue
@@ -43,7 +43,7 @@ withDefaults(
no-padding
bordered
:class="{ 'is-add-product': isAddProduct }"
- style="box-shadow: var(--shadow-3); width: 240px; height: 286px"
+ style="box-shadow: var(--shadow-3); min-height: 300px"
@click="$emit('select', data)"
>
diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue
index e06e263e..8ccb34fe 100644
--- a/src/pages/04_product-service/MainPage.vue
+++ b/src/pages/04_product-service/MainPage.vue
@@ -132,6 +132,7 @@ const productMode = ref<'group' | 'type' | 'service' | 'product'>('group');
const productGroup = ref
();
const productType = ref();
const product = ref();
+const resultSearchProduct = ref();
const service = ref();
const productAndServiceTab = ref('all');
@@ -231,6 +232,16 @@ async function searchGroup() {
}
}
+async function searchProductAndService() {}
+
+async function searchProduct() {
+ const result = await fetchListProduct({ query: searchTotalProduct.value });
+
+ if (result) {
+ resultSearchProduct.value = result.result;
+ }
+}
+
async function fetchListType() {
const res = await fetchListProductServiceType({
productGroupId: currentId.value,
@@ -669,7 +680,10 @@ onMounted(async () => {
await fetchListGroups();
});
-watch(productMode, () => (inputSearch.value = ''));
+watch(productMode, () => {
+ inputSearch.value = '';
+ currentStatus.value = 'All';
+});
watch(currentStatus, async () => {
if (productMode.value === 'group') {
@@ -1122,21 +1136,21 @@ watch(currentStatus, async () => {
{{ $t('all') }}
{{ $t('statusACTIVE') }}
{{ $t('statusINACTIVE') }}
@@ -1156,20 +1170,26 @@ watch(currentStatus, async () => {
{
:id="i.id"
typeProduct="product"
:title="i.name"
- :status="i.status === 'INACTIVE' ? true : false"
+ :isDisabled="i.status === 'INACTIVE' ? true : false"
@menuViewDetail="
() => {
currentIdProduct = i.id;
@@ -1209,11 +1229,23 @@ watch(currentStatus, async () => {
{
:code="i.code"
:id="i.id"
:title="i.name"
- :status="i.status === 'INACTIVE' ? true : false"
+ :isDisabled="i.status === 'INACTIVE' ? true : false"
:created-at="i.createdAt"
@menuViewDetail="
() => {
@@ -1337,7 +1369,11 @@ watch(currentStatus, async () => {
selectProduct = [];
}
"
- :close="() => {}"
+ :close="
+ () => {
+ searchTotalProduct = '';
+ }
+ "
>
-
+
{
:bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="searchTotalProduct"
debounce="500"
- @update:model-value=""
+ @update:model-value="searchProduct()"
>
@@ -1365,19 +1401,13 @@ watch(currentStatus, async () => {
-
+