diff --git a/deploy.yaml b/deploy.yaml index 9939c90..051fbeb 100644 --- a/deploy.yaml +++ b/deploy.yaml @@ -13,6 +13,8 @@ hosts: remote_user: deployer branch: newlook deploy_path: '/var/www/html/ikea' + bin/php: /usr/bin/php81 + tasks: build: diff --git a/resources/js/Pages/IkeaRoot.vue b/resources/js/Pages/IkeaRoot.vue index 9b54067..2e0a302 100644 --- a/resources/js/Pages/IkeaRoot.vue +++ b/resources/js/Pages/IkeaRoot.vue @@ -41,6 +41,8 @@ const countryHash = ref([]); const countryCurrency = ref({}); const showItemFilter = ref(false); const showDescFilter = ref(false); +const showUnitsFilter = ref(false); + const rates = ref([]); const options_items = ref([]); const itemCode = ref(null); @@ -100,6 +102,13 @@ const filterOptions = computed(() => { criteria: descCriteria.value, }); } + if (unitsCriteria.value != 'All' && unitsCriteria.value != null) { + filterOptionsArray.push({ + field: 'units', + comparison: '=', + criteria: unitsCriteria.value, + }); + } return filterOptionsArray; }); @@ -131,8 +140,23 @@ let uniqDesc = computed(() => { return output; }); +let uniqUnits = computed(() => { + var output = ['All',]; + var keys = []; + options_items.value.forEach((element) => { + var key = element.units; + if (keys.indexOf(key) === -1) { + keys.push(key); + output.push(element.units); + } + }); + console.log('OUT3', output); + return output; +}); + const productsCriteria = ref(uniqProducts.value[0]); const descCriteria = ref(uniqDesc.value[0]); +const unitsCriteria = ref(uniqUnits.value[0]); const type = 'GeoChart'; const form = useForm({ @@ -418,15 +442,24 @@ const submit = () => { - - + + @@ -472,11 +505,19 @@ const submit = () => { position: absolute; top: 40px; width: 328px; - + background-color: #fff; border: 1px solid #e0e0e0; } + +.filter-menu-units { + padding: 5px 5px; + z-index: 1; + position: absolute; + top: 40px; + width: 128px; +}