import wixData from ‘wix-data’ ;
function VacancyListFilter() {
wixData.query( “” )
.eq( “VacancyList” , $w( “#nations” ).onClick)
.or(
wixData.query( “VacancyList” )
.eq( “Brazil” , $w( “#nations” ).onClick)
)
.or(
wixData.query( “VacancyList” )
.eq( “China” , $w( “#nations” ).onClick)
)
.or(
wixData.query( “VacancyList” )
.eq( “EU” , $w( “#nations” ).onClick)
)
// add or statements for the other checkboxes
.find()
.then((results) => {
//console.log(results.items);
let Products = results.items;
$w( ‘#repeater1’ ).data = Products;
})
}
// Query to get the information from the database
$w.onReady( function () {
VacancyListFilter();
$w( '#repeater1' ).onItemReady(($w, itemData) => {
// Add here all the relevant elements of the repeater
$w( ‘#text18’ ).text = itemData.title;
$w( ‘#text19’ ).text = itemData.date;
$w( ‘#text20’ ).text = itemData.description;
$w( ‘#image24’ ).src = itemData.image;
$w( ‘#button28’ ).src = itemData.button;
});
});
export function nations_click(event){
// Add your code for this event here:
VacancyListFilter();
}
export function Brazil_change(event, $w) {
VacancyListFilter();
}
export function China_click(event, $w) {
VacancyListFilter();
}
export function EU_click(event, $w) {
VacancyListFilter();
}
export function button27_click(event) {
// Add your code for this event here:
}