From 8ceaabf5b82a6b3ee42d1c50deb8c98fc2fc4b0d Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Thu, 19 Jan 2017 20:46:17 +0100 Subject: [PATCH] fixes #2: dialogs to show errors --- src/App.vue | 10 ++++++---- src/Attendee.vue | 17 ++++++++++++----- src/Group.vue | 8 +++++--- src/IbtDialog.vue | 22 ++++++++++++++++++++++ src/Toolbar.vue | 42 ++++++++++++++++++++++++++++++------------ src/User.vue | 12 +++++++++--- src/Users.vue | 11 ++++++++--- tests/ibt2_tests.py | 8 +++----- 8 files changed, 95 insertions(+), 35 deletions(-) create mode 100644 src/IbtDialog.vue diff --git a/src/App.vue b/src/App.vue index 167a688..fbac8f2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,12 +11,14 @@ + diff --git a/src/Attendee.vue b/src/Attendee.vue index a218f99..9909d6b 100644 --- a/src/Attendee.vue +++ b/src/Attendee.vue @@ -1,5 +1,5 @@ diff --git a/src/Group.vue b/src/Group.vue index 507bd84..9432d73 100644 --- a/src/Group.vue +++ b/src/Group.vue @@ -41,11 +41,13 @@ + @@ -127,7 +129,7 @@ export default { } .new-group { - width: 260px; + min-width: 250px; } .new-group-header i:after { diff --git a/src/IbtDialog.vue b/src/IbtDialog.vue new file mode 100644 index 0000000..89ec3bd --- /dev/null +++ b/src/IbtDialog.vue @@ -0,0 +1,22 @@ + + + diff --git a/src/Toolbar.vue b/src/Toolbar.vue index 00ba98d..1e2f40f 100644 --- a/src/Toolbar.vue +++ b/src/Toolbar.vue @@ -28,11 +28,7 @@ - - login or create a new user - power_settings_new - - + + + {{ snackbackMessage }} + [x] + + diff --git a/src/User.vue b/src/User.vue index 4522cb3..15790a2 100644 --- a/src/User.vue +++ b/src/User.vue @@ -19,10 +19,13 @@ Save + diff --git a/src/Users.vue b/src/Users.vue index b97afa5..56683f0 100644 --- a/src/Users.vue +++ b/src/Users.vue @@ -27,10 +27,13 @@ + diff --git a/tests/ibt2_tests.py b/tests/ibt2_tests.py index e3af52d..d8b7a87 100755 --- a/tests/ibt2_tests.py +++ b/tests/ibt2_tests.py @@ -41,11 +41,9 @@ class Ibt2Tests(unittest.TestCase): self.db['users'].remove({'username': 'newuser2'}) def tearDown(self): - return - self.add_attendee({'day': '2017-01-15', 'name': 'A name', 'group': 'group A'}) - self.add_attendee({'day': '2017-01-16', 'name': 'A new name', 'group': 'group C'}) - self.add_attendee({'day': '2017-01-15', 'name': 'Another name', 'group': 'group A'}) - self.add_attendee({'day': '2017-01-15', 'name': 'Yet another name', 'group': 'group B'}) + self.db['attendees'].drop() + self.db['users'].remove({'username': 'newuser'}) + self.db['users'].remove({'username': 'newuser2'}) def add_attendee(self, attendee): r = requests.post('%sattendees' % BASE_URL, json=attendee)