Merge branch 'AccountingPages'

This commit is contained in:
2024-03-11 19:57:54 +01:00
71 changed files with 4234 additions and 230 deletions

View File

@ -1,9 +1,9 @@
<template>
<section :class="['customer-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Customer</div>
<pre v-if="!filtered" :class="['data', darkMode ? 'pre-darkmode' : 'pre-lightmode']">{{ customerFilter }}</pre>
<input v-if="filtered" v-model="customerFilter" @change="filterConfigItemList()"
:class="['data', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
<pre v-if="!filtered" :class="['data', 'pre-customer', darkMode ? 'pre-darkmode' : 'pre-lightmode']">{{ clientFilter }}</pre>
<input v-if="filtered" v-model="clientFilter" @change="filterList()"
:class="['data', 'input-customer', darkMode ? 'data-darkmode' : 'data-lightmode']">
</section>
</template>
@ -24,12 +24,20 @@ const updateFilterTerm = () => {
customerFilter.value = filteredTerm.value
}
const checkFiltered = () => {
if (!filtered.value) {
clientFilter.value = ''
filterList();
}
}
// update the filtered term in the store
const filterConfigItemList = () => {
store.commit('updateAssetFilterbyCustomer', customerFilter.value);
const filterList = () => {
store.commit('updateFilterbyClient', clientFilter.value);
}
watch(filteredTerm, updateFilterTerm)
watch(filtered, checkFiltered)
</script>
<script>
@ -102,6 +110,10 @@ export default {
border: none;
}
.pre-customer {
margin-left: 1rem;
}
.data-darkmode {
background-color: #212121;
color: #fff;