mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
DataTable products demo updated
This commit is contained in:
parent
df6cc056a3
commit
00f0fecb90
1 changed files with 31 additions and 0 deletions
|
@ -509,6 +509,21 @@ export default {
|
||||||
this.filters = {
|
this.filters = {
|
||||||
'global': {value: null, matchMode: FilterMatchMode.CONTAINS},
|
'global': {value: null, matchMode: FilterMatchMode.CONTAINS},
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
getStatusLabel(status) {
|
||||||
|
switch (status) {
|
||||||
|
case 'INSTOCK':
|
||||||
|
return 'success';
|
||||||
|
|
||||||
|
case 'LOWSTOCK':
|
||||||
|
return 'warning';
|
||||||
|
|
||||||
|
case 'OUTOFSTOCK':
|
||||||
|
return 'danger';
|
||||||
|
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -778,6 +793,22 @@ const deleteSelectedProducts = () => {
|
||||||
toast.add({severity:'success', summary: 'Successful', detail: 'Products Deleted', life: 3000});
|
toast.add({severity:'success', summary: 'Successful', detail: 'Products Deleted', life: 3000});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getStatusLabel = (status) => {
|
||||||
|
switch (status) {
|
||||||
|
case 'INSTOCK':
|
||||||
|
return 'success';
|
||||||
|
|
||||||
|
case 'LOWSTOCK':
|
||||||
|
return 'warning';
|
||||||
|
|
||||||
|
case 'OUTOFSTOCK':
|
||||||
|
return 'danger';
|
||||||
|
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
<\/script>
|
<\/script>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue