0
0
Fork 0
This commit is contained in:
Joan Sanchez 2023-03-16 09:41:08 +01:00
commit ba81e82483
7 changed files with 42 additions and 6 deletions

View File

@ -14,14 +14,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
url: {
type: String,
default: '',
},
data: {
type: Array,
default: null,
},
url: {
type: String,
default: '',
},
filter: {
type: Object,
default: null,
@ -62,7 +62,7 @@ const arrayData = useArrayData(props.dataKey, {
where: props.where,
limit: props.limit,
order: props.order,
userParams: props.userParams
userParams: props.userParams,
});
const store = arrayData.store;

View File

@ -23,11 +23,42 @@ const props = defineProps({
required: false,
default: true,
},
url: {
type: String,
default: '',
},
filter: {
type: Object,
default: null,
},
where: {
type: Object,
default: null,
},
order: {
type: String,
default: '',
},
limit: {
type: Number,
default: 10,
},
userParams: {
type: Object,
default: null,
},
});
const router = useRouter();
const route = useRoute();
const arrayData = useArrayData(props.dataKey);
const arrayData = useArrayData(props.dataKey, {
url: props.url,
filter: props.filter,
where: props.where,
limit: props.limit,
order: props.order,
userParams: props.userParams,
});
const store = arrayData.store;
const searchText = ref('');

View File

@ -12,6 +12,7 @@ const { t } = useI18n();
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
<VnSearchbar
data-key="ClaimList"
url="Claims/filter"
:label="t('Search claim')"
:info="t('You can search by claim id or customer name')"
/>

View File

@ -12,6 +12,7 @@ const { t } = useI18n();
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
<VnSearchbar
data-key="CustomerList"
url="Clients/filter"
:label="t('Search customer')"
:info="t('You can search by customer id or name')"
/>

View File

@ -12,6 +12,7 @@ const { t } = useI18n();
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
<VnSearchbar
data-key="InvoiceOutList"
url="InvoiceOuts/filter"
:label="t('Search invoice')"
:info="t('You can search by invoice reference')"
/>

View File

@ -12,6 +12,7 @@ const { t } = useI18n();
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
<VnSearchbar
data-key="TicketList"
url="Tickets/filter"
:label="t('Search ticket')"
:info="t('You can search by ticket id or alias')"
/>

View File

@ -12,6 +12,7 @@ const { t } = useI18n();
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
<VnSearchbar
data-key="WorkerList"
url="Workers/filter"
:label="t('Search worker')"
:info="t('You can search by worker id or name')"
/>