From 9f1d6f08e34869cbead4165c282283b76b3dccf4 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 4 Mar 2024 19:06:15 +0300 Subject: [PATCH] Implement new features --- src/layout/AppLayout.vue | 1 + src/views/pages/Crud.vue | 58 +++++++++++++++++++--------------- src/views/uikit/File.vue | 1 - src/views/uikit/FloatLabel.vue | 36 ++++++++++----------- src/views/uikit/Input.vue | 6 ++-- src/views/uikit/Messages.vue | 23 ++++++-------- src/views/uikit/Overlay.vue | 1 - 7 files changed, 64 insertions(+), 62 deletions(-) diff --git a/src/layout/AppLayout.vue b/src/layout/AppLayout.vue index dd06324..6dc0c9c 100644 --- a/src/layout/AppLayout.vue +++ b/src/layout/AppLayout.vue @@ -72,6 +72,7 @@ const isOutsideClicked = (event) => {
+ diff --git a/src/views/pages/Crud.vue b/src/views/pages/Crud.vue index 8e332b9..51dfbf6 100644 --- a/src/views/pages/Crud.vue +++ b/src/views/pages/Crud.vue @@ -23,6 +23,19 @@ const statuses = ref([ const productService = new ProductService(); +const getBadgeSeverity = (inventoryStatus) => { + switch (inventoryStatus.toLowerCase()) { + case 'instock': + return 'success'; + case 'lowstock': + return 'warning'; + case 'outofstock': + return 'danger'; + default: + return 'info'; + } +}; + onBeforeMount(() => { initFilters(); }); @@ -66,7 +79,6 @@ const saveProduct = () => { const editProduct = (editProduct) => { product.value = { ...editProduct }; - console.log(product); productDialog.value = true; }; @@ -127,18 +139,17 @@ const initFilters = () => {
- @@ -153,16 +164,13 @@ const initFilters = () => { paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown" :rowsPerPageOptions="[5, 10, 25]" currentPageReportTemplate="Showing {first} to {last} of {totalRecords} products" - responsiveLayout="scroll" > @@ -183,7 +191,7 @@ const initFilters = () => { @@ -207,22 +215,22 @@ const initFilters = () => { - +
- + Name is required.
@@ -272,7 +280,7 @@ const initFilters = () => {
- + Price is required.
@@ -281,8 +289,8 @@ const initFilters = () => {
@@ -295,8 +303,8 @@ const initFilters = () => { >
@@ -306,13 +314,11 @@ const initFilters = () => { Are you sure you want to delete the selected products?
- - diff --git a/src/views/uikit/File.vue b/src/views/uikit/File.vue index 9b6710c..0a6d1e1 100644 --- a/src/views/uikit/File.vue +++ b/src/views/uikit/File.vue @@ -19,6 +19,5 @@ const onUpload = () => { - diff --git a/src/views/uikit/FloatLabel.vue b/src/views/uikit/FloatLabel.vue index a4cfef5..144c183 100644 --- a/src/views/uikit/FloatLabel.vue +++ b/src/views/uikit/FloatLabel.vue @@ -46,40 +46,40 @@ const searchCountry = (event) => {
Float Label
- + - +
- + - +
- + - +
- + - +
- + - +
- + - +
@@ -93,22 +93,22 @@ const searchCountry = (event) => {
- + - +
- + - +
- + - +
diff --git a/src/views/uikit/Input.vue b/src/views/uikit/Input.vue index 56eae3c..30b0cdb 100644 --- a/src/views/uikit/Input.vue +++ b/src/views/uikit/Input.vue @@ -88,7 +88,7 @@ const searchCountry = (event) => {
- +
@@ -109,10 +109,10 @@ const searchCountry = (event) => {
Float Label
- + - +
Textarea