DataTable products demo updated

pull/3699/head
Tuğçe Küçükoğlu 2023-03-02 17:17:54 +03:00
parent df6cc056a3
commit 00f0fecb90
1 changed files with 31 additions and 0 deletions

View File

@ -509,6 +509,21 @@ export default {
this.filters = {
'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});
};
const getStatusLabel = (status) => {
switch (status) {
case 'INSTOCK':
return 'success';
case 'LOWSTOCK':
return 'warning';
case 'OUTOFSTOCK':
return 'danger';
default:
return null;
}
};
<\/script>
`
}