Question:
Hello everyone
I’m letting you know about a problem I’m encountering:
my orders appear in a table, until then everything is OK. I would like to modify the status of my customer orders (Processing in progress, shipped, In progress, Delivered, etc.), via a dropdown, by selecting the order ( when I click on it).
I achieve this with a repeater, but not with a table: the data is not displayed. Aesthetically, I prefer the board, but if this is not possible, I will then switch to a repeater.
Thank you all for your help. (Attached my page)
Product:
WIX EDITOR
What are you trying to achieve:
Modify status of customers orders.
What have you already tried:
$w(“#MesCommandes”).onRowSelect((event) => {
let rowData = event.rowData;
let rowIndex = event.rowIndex;
$w(‘#IDCde’).value=rowData._id
$w(‘#RefCommande’).value=rowData.reference
$w(‘#NomClt’).value=rowData.nomClient
$w(‘#Total’).value=rowData.total
console.log(rowData)
console.log(rowIndex)
});
$w(‘#button30’).onClick((event) => {
return wixData.query('Mescommandes')
.eq("_id",$w('#IDCde').value)
.find()
.then(async(results) => {
console.log(results.items[0]);
const MAJStatutCde = results.items.map(item => ({ ...item, statutCommande: $w('#dropdown1').value}));
await wixData.bulkUpdate('Mescommandes', MAJStatutCde);
})
})
$w(‘#MesCommandes’).onClick((event) => {
})