From fa47cbac6b15e740215b35ceef8fe29cdb98cfa9 Mon Sep 17 00:00:00 2001
From: MatheusMello <mat.mello93@gmail.com>
Date: Nov 09 2017 19:37:36 +0000
Subject: [PATCH 1/4] merge fixtures


---

diff --git a/src/main.js b/src/main.js
index ce518c8..fb9f723 100644
--- a/src/main.js
+++ b/src/main.js
@@ -5,6 +5,18 @@ import VueRouter from 'vue-router'
 
 // Vuex Setup
 import store from './store'
+import 'vue-awesome/icons'
+import Icon from 'vue-awesome/components/Icon'
+import DataTables from 'vue-data-tables'
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-default/index.css'
+import lang from 'element-ui/lib/locale/lang/en'
+import locale from 'element-ui/lib/locale'
+import BootstrapVue from 'bootstrap-vue'
+
+Vue.component('icon', Icon)
+
+locale.use(lang)
 
 // Router Setup
 import { routes } from './router/routes'
@@ -29,6 +41,8 @@ const router = new VueRouter({
   routes: routes
 })
 
+Vue.component('icon', Icon)
+
 new Vue({
   el: '#app',
   router: router,

From ff5103681161c3e9f8a2831fa14cc91ff4c7069a Mon Sep 17 00:00:00 2001
From: Thiago Moreira <thiago.cmoreira@yahoo.com.br>
Date: Nov 09 2017 19:37:36 +0000
Subject: [PATCH 2/4] Fixing minor bugs


---

diff --git a/src/main.js b/src/main.js
index fb9f723..8af473e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -5,18 +5,6 @@ import VueRouter from 'vue-router'
 
 // Vuex Setup
 import store from './store'
-import 'vue-awesome/icons'
-import Icon from 'vue-awesome/components/Icon'
-import DataTables from 'vue-data-tables'
-import ElementUI from 'element-ui'
-import 'element-ui/lib/theme-default/index.css'
-import lang from 'element-ui/lib/locale/lang/en'
-import locale from 'element-ui/lib/locale'
-import BootstrapVue from 'bootstrap-vue'
-
-Vue.component('icon', Icon)
-
-locale.use(lang)
 
 // Router Setup
 import { routes } from './router/routes'
@@ -25,6 +13,11 @@ import { routes } from './router/routes'
 import 'vue-awesome/icons'
 import Icon from 'vue-awesome/components/Icon'
 import BootstrapVue from 'bootstrap-vue'
+
+Vue.component('icon', Icon)
+
+locale.use(lang)
+
 import 'bootstrap/dist/css/bootstrap.css'
 import 'bootstrap-vue/dist/bootstrap-vue.css'
 
@@ -41,8 +34,6 @@ const router = new VueRouter({
   routes: routes
 })
 
-Vue.component('icon', Icon)
-
 new Vue({
   el: '#app',
   router: router,

From a29341d317fae00e8b55ce81b8379291c55a747e Mon Sep 17 00:00:00 2001
From: rafaelrabetti <rafael.rabetti@gmail.com>
Date: Nov 09 2017 19:37:36 +0000
Subject: [PATCH 3/4] Refactoring List.vue and creating alert if search has no results.


Signed-off-by: rafaelrabetti <rafael.rabetti@gmail.com>
Signed-off-by: Eduardo Gomes <eduardoqgomes@gmail.com>

---

diff --git a/src/components/package/List.vue b/src/components/package/List.vue
index 063edc1..5c9907d 100644
--- a/src/components/package/List.vue
+++ b/src/components/package/List.vue
@@ -3,12 +3,12 @@
     <div class="row">
       <div class="col-md-12">
         <div class="alert">
-          <b-alert :show="sucessCountDown"
+          <b-alert :show="successCountDown"
                    dismissible
                    variant="success"
-                   @dismissed="sucessCountDown=0"
+                   @dismissed="successCountDown=0"
                    @dismiss-count-down="successCountDownChanged">
-            Packages successfully imported! ({{sucessCountDown}})
+            Packages successfully imported! ({{successCountDown}})
           </b-alert>
           <b-alert :show="errorCountDown"
                    dismissible
@@ -17,6 +17,11 @@
                    @dismiss-count-down="errorCountDownChanged">
             Packages not imported! ({{errorCountDown}})
           </b-alert>
+          <b-alert show v-if="allPackages.length == 0"
+                   dismissible
+                   variant="danger">
+            Your search returned no results!
+          </b-alert>
         </div>
       </div>
     </div>
@@ -50,7 +55,7 @@ export default {
       currentRow: null,
       timer: '',
       dismissSecs: 3,
-      sucessCountDown: 0,
+      successCountDown: 0,
       errorCountDown: 0
     }
   },
@@ -85,15 +90,15 @@ export default {
       this.notUpdating = true
       setTimeout(function () { console.log(this.notUpdating) }, 3000)
     },
-    successCountDownChanged (sucessCountDown) {
-      this.sucessCountDown = sucessCountDown
+    successCountDownChanged (successCountDown) {
+      this.successCountDown = successCountDown
     },
     errorCountDownChanged (errorCountDown) {
       this.errorCountDown = errorCountDown
     },
-    showAlert (sucessMessage) {
-      if (sucessMessage === true) {
-        this.sucessCountDown = this.dismissSecs
+    showAlert (successMessage) {
+      if (successMessage === true) {
+        this.successCountDown = this.dismissSecs
       } else {
         this.errorCountDown = this.dismissSecs
       }
diff --git a/src/main.js b/src/main.js
index 8af473e..ce518c8 100644
--- a/src/main.js
+++ b/src/main.js
@@ -13,11 +13,6 @@ import { routes } from './router/routes'
 import 'vue-awesome/icons'
 import Icon from 'vue-awesome/components/Icon'
 import BootstrapVue from 'bootstrap-vue'
-
-Vue.component('icon', Icon)
-
-locale.use(lang)
-
 import 'bootstrap/dist/css/bootstrap.css'
 import 'bootstrap-vue/dist/bootstrap-vue.css'
 

From 954ec527e537afd3d35344a9c5e9fc8f2a15173f Mon Sep 17 00:00:00 2001
From: rafaelrabetti <rafael.rabetti@gmail.com>
Date: Nov 09 2017 19:37:36 +0000
Subject: [PATCH 4/4] Refactoring List


Signed-off-by: rafaelrabetti <rafael.rabetti@gmail.com>
Signed-off-by: eduqg <eduardoqgomes@gmail.com>

---

diff --git a/src/components/package/ErrorsTable.vue b/src/components/package/ErrorsTable.vue
index 1579cf9..7f0545a 100644
--- a/src/components/package/ErrorsTable.vue
+++ b/src/components/package/ErrorsTable.vue
@@ -1,20 +1,6 @@
 <template>
 <div>
   <b-card header-tag="header" footer-tag="footer">
-    <!-- <h6 slot="header" class="mb-0">
-            <div class="my-1 row">
-                <div class="col-md-6">
-                    <b-form-fieldset horizontal label="Rows per page" :label-cols="6">
-                        <b-form-select :options="pageOptions" v-model="perPage" />
-                        </b-form-fieldset>
-                    </div>
-                    <div class="col-md-6">
-                        <b-form-fieldset horizontal label="Filter" :label-cols="3">
-                            <b-form-input v-model="filter" placeholder="Type to Search" />
-                            </b-form-fieldset>
-                        </div>
-                    </div>
-                </h6> -->
     <em slot="footer">
       <b-pagination align="center" :total-rows="totalRows" :per-page="perPage" v-model="currentPage"/>
     </em>
diff --git a/src/components/package/List.vue b/src/components/package/List.vue
index 5c9907d..50b1bd4 100644
--- a/src/components/package/List.vue
+++ b/src/components/package/List.vue
@@ -20,7 +20,7 @@
           <b-alert show v-if="allPackages.length == 0"
                    dismissible
                    variant="danger">
-            Your search returned no results!
+            No packages were found!
           </b-alert>
         </div>
       </div>
@@ -97,11 +97,7 @@ export default {
       this.errorCountDown = errorCountDown
     },
     showAlert (successMessage) {
-      if (successMessage === true) {
-        this.successCountDown = this.dismissSecs
-      } else {
-        this.errorCountDown = this.dismissSecs
-      }
+      (successMessage) ? this.successCountDown = this.dismissSecs : this.errorCountDown = this.dismissSecs
     }
   },
   created () {
diff --git a/src/store/modules/packages.js b/src/store/modules/packages.js
index 1bd03b2..008592f 100644
--- a/src/store/modules/packages.js
+++ b/src/store/modules/packages.js
@@ -83,7 +83,6 @@ const getters = {
 const actions = {
   async [actionTypes.FETCH_PACKAGES] ({commit, getters, state}, search) {
     // let { data } = await api.get()
-    console.log(`action: ${search}`)
     let data = []
     if (!search) {
       data = mockedPackages

