diff --git a/Gemfile.lock b/Gemfile.lock
index 31ba591..a8f67c3 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -245,4 +245,4 @@ DEPENDENCIES
webpacker (= 3.5.3)
BUNDLED WITH
- 1.16.1
+ 1.16.2
diff --git a/app/javascript/components/AppExpandTransition.vue b/app/javascript/components/AppExpandTransition.vue
new file mode 100644
index 0000000..21d8cbd
--- /dev/null
+++ b/app/javascript/components/AppExpandTransition.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/javascript/components/TaskItemEdit.vue b/app/javascript/components/TaskItemEdit.vue
new file mode 100644
index 0000000..b0c1d18
--- /dev/null
+++ b/app/javascript/components/TaskItemEdit.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/javascript/components/TaskItemList.vue b/app/javascript/components/TaskItemList.vue
new file mode 100644
index 0000000..503fc77
--- /dev/null
+++ b/app/javascript/components/TaskItemList.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+ |
+ Name |
+ Quantity |
+
+
+ |
+
+
+
+
+ |
+ {{ i.name }} |
+ {{ i.quantity }} |
+ |
+
+
+
+ No Items
+ |
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/javascript/components/TaskListDropdownItem.vue b/app/javascript/components/TaskListDropdownItem.vue
new file mode 100644
index 0000000..9c84fae
--- /dev/null
+++ b/app/javascript/components/TaskListDropdownItem.vue
@@ -0,0 +1,72 @@
+
+
+
+
{{taskList.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/javascript/components/TheTaskListList.vue b/app/javascript/components/TheTaskListList.vue
index 3446475..f3534bd 100644
--- a/app/javascript/components/TheTaskListList.vue
+++ b/app/javascript/components/TheTaskListList.vue
@@ -2,16 +2,9 @@
Tasks
-
-
-
-
-
-
+
@@ -53,6 +26,8 @@
import api from "../lib/Api";
import * as Errors from '../lib/Errors';
import TaskListMiniForm from "./TaskListMiniForm";
+ import TaskListDropdownItem from "./TaskListDropdownItem";
+ import TaskItemList from "./TaskItemList";
const newListTemplate = function() {
return {
@@ -60,13 +35,6 @@
};
};
- const newItemTemplate = function() {
- return {
- name: '',
- quantity: ''
- };
- };
-
export default {
data() {
return {
@@ -74,11 +42,7 @@
showListDropdown: false,
currentList: null,
newList: newListTemplate(),
- newListValidationErrors: {},
- showAddItem: false,
- newItem: newItemTemplate(),
- newItemValidationErrors: {},
- listToDelete: null
+ newListValidationErrors: {}
}
},
@@ -93,8 +57,8 @@
},
methods: {
- selectList(l) {
- this.currentList = l;
+ selectList(list) {
+ this.currentList = list;
this.showListDropdown = false;
},
@@ -124,11 +88,10 @@
}
},
- confirmListDelete() {
+ deleteList(list) {
this.loadResource(
- api.deleteTaskList(this.listToDelete)
+ api.deleteTaskList(list)
.then(() => this.updateData())
- .then(() => this.listToDelete = null)
);
}
},
@@ -138,7 +101,9 @@
},
components: {
- TaskListMiniForm
+ TaskListMiniForm,
+ TaskListDropdownItem,
+ TaskItemList
}
}
diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js
index 88dce21..223e469 100644
--- a/app/javascript/packs/application.js
+++ b/app/javascript/packs/application.js
@@ -15,6 +15,7 @@ import AppConfirm from "../components/AppConfirm";
import AppDateTime from "../components/AppDateTime";
import AppDatePicker from "../components/AppDatePicker";
import AppDropdown from "../components/AppDropdown";
+import AppExpandTransition from "../components/AppExpandTransition";
import AppIcon from "../components/AppIcon";
import AppModal from "../components/AppModal";
import AppNavbar from "../components/AppNavbar";
@@ -29,6 +30,7 @@ Vue.component("AppConfirm", AppConfirm);
Vue.component("AppDateTime", AppDateTime);
Vue.component("AppDatePicker", AppDatePicker);
Vue.component("AppDropdown", AppDropdown);
+Vue.component("AppExpandTransition", AppExpandTransition);
Vue.component("AppIcon", AppIcon);
Vue.component("AppModal", AppModal);
Vue.component("AppNavbar", AppNavbar);
diff --git a/app/javascript/styles/_transitions.scss b/app/javascript/styles/_transitions.scss
new file mode 100644
index 0000000..cd9bc7f
--- /dev/null
+++ b/app/javascript/styles/_transitions.scss
@@ -0,0 +1,21 @@
+
+.fade-enter-active, .fade-leave-active {
+ transition: opacity .5s, max-height .5s;
+ max-height: 300px;
+}
+.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
+ opacity: 0;
+ max-height: 0;
+}
+
+
+.expand-enter-active,
+.expand-leave-active {
+ transition: height .5s ease-in-out;
+ overflow: hidden;
+}
+
+//.expand-enter,
+//.expand-leave-to {
+// height: 0;
+//}
\ No newline at end of file
diff --git a/app/javascript/styles/_variables.scss b/app/javascript/styles/_variables.scss
index bb4405d..79b67f3 100644
--- a/app/javascript/styles/_variables.scss
+++ b/app/javascript/styles/_variables.scss
@@ -30,4 +30,6 @@ $modal-content-width: 750px;
// Make all Bulma variables and functions available
@import "~bulma/sass/utilities/initial-variables";
@import "~bulma/sass/utilities/functions";
+@import "~bulma/sass/utilities/derived-variables";
+//$dropdown-item-hover-background-color: $white-ter;
\ No newline at end of file
diff --git a/app/javascript/styles/index.scss b/app/javascript/styles/index.scss
index f49c5e4..7881a35 100644
--- a/app/javascript/styles/index.scss
+++ b/app/javascript/styles/index.scss
@@ -15,6 +15,7 @@
@import "./responsive_controls";
@import "./wide_modal";
@import "./iconic";
+@import "./transitions";
html {
height: 100%;