Bläddra i källkod

Orders - WIP

master
George Williams 4 år sedan
förälder
incheckning
0a9227081c
44 ändrade filer med 32385 tillägg och 22962 borttagningar
  1. 61
    22
      package-lock.json
  2. 4
    1
      package.json
  3. 7921
    7817
      public/css/bootstrap.css
  4. 7921
    7817
      public/css/bootstrap.min.css
  5. 1108
    1115
      public/css/style.css
  6. Binär
      public/img/sort-down.png
  7. Binär
      public/img/sort-up.png
  8. 6043
    5694
      public/lib/bootstrap/css/bootstrap.css
  9. 8284
    2
      public/lib/bootstrap/css/bootstrap.min.css
  10. 159
    1
      public/lib/bootstrap/css/bootstrap.min.css.map
  11. 12
    12
      src/App.vue
  12. 5
    8
      src/components/accounts/login.vue
  13. 25
    16
      src/components/accounts/register.vue
  14. 25
    22
      src/components/accounts/restaurantRegistration.vue
  15. 9
    13
      src/components/accounts/tradingHours.vue
  16. 22
    27
      src/components/customer/customerDetails.vue
  17. 170
    0
      src/components/customer/customerOrder.vue
  18. 57
    21
      src/components/customer/customerOrders.vue
  19. 190
    77
      src/components/orders/cart.vue
  20. 29
    0
      src/components/orders/cartCard.vue
  21. 7
    0
      src/components/orders/confirmOrder.vue
  22. 22
    17
      src/components/orders/orderConf/confAddress.vue
  23. 14
    13
      src/components/restaurants/restaurantCategory.vue
  24. 29
    34
      src/components/restaurants/restaurantDetails.vue
  25. 10
    10
      src/components/restaurants/restaurantMenuCateory.vue
  26. 25
    27
      src/components/restaurants/restaurantMenuItem.vue
  27. 25
    21
      src/components/restaurants/restaurantMenuItemOptions.vue
  28. 27
    39
      src/components/restaurants/restaurantMenuOption.vue
  29. 13
    13
      src/components/restaurants/restaurantMenuOptionItem.vue
  30. 4
    4
      src/components/restaurants/restaurantRole.vue
  31. 12
    12
      src/components/restaurants/restaurantUser.vue
  32. 11
    11
      src/components/restaurants/rolePremission.vue
  33. 4
    2
      src/components/shared/autoComplete.vue
  34. 4
    4
      src/components/shared/basePaginationItem.vue
  35. 1
    1
      src/components/shared/checkItem.vue
  36. 14
    27
      src/components/shared/fieldEditor.vue
  37. 12
    2
      src/components/shared/home.vue
  38. 1
    1
      src/components/shared/imageLoader.vue
  39. 49
    53
      src/components/shared/listView.vue
  40. 1
    1
      src/components/shared/mapSetLocation.vue
  41. 2
    3
      src/components/shared/navBar.vue
  42. 10
    0
      src/main.js
  43. 7
    1
      src/router/index.js
  44. 36
    1
      src/store/modules/orders/order.js

+ 61
- 22
package-lock.json Visa fil

@@ -921,6 +921,11 @@
921 921
         "@fortawesome/fontawesome-common-types": "^0.2.28"
922 922
       }
923 923
     },
924
+    "@fortawesome/vue-fontawesome": {
925
+      "version": "0.1.10",
926
+      "resolved": "https://registry.npmjs.org/@fortawesome/vue-fontawesome/-/vue-fontawesome-0.1.10.tgz",
927
+      "integrity": "sha512-b2+SLF31h32LSepVcXe+BQ63yvbq5qmTCy4KfFogCYm2bn68H5sDWUnX+U7MBqnM2aeEk9M7xSoqGnu+wSdY6w=="
928
+    },
924 929
     "@hapi/address": {
925 930
       "version": "2.1.4",
926 931
       "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
@@ -987,6 +992,16 @@
987 992
       "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
988 993
       "dev": true
989 994
     },
995
+    "@nuxt/opencollective": {
996
+      "version": "0.3.0",
997
+      "resolved": "https://registry.npmjs.org/@nuxt/opencollective/-/opencollective-0.3.0.tgz",
998
+      "integrity": "sha512-Vf09BxCdj1iT2IRqVwX5snaY2WCTkvM0O4cWWSO1ThCFuc4if0Q/nNwAgCxRU0FeYHJ7DdyMUNSdswCLKlVqeg==",
999
+      "requires": {
1000
+        "chalk": "^2.4.2",
1001
+        "consola": "^2.10.1",
1002
+        "node-fetch": "^2.6.0"
1003
+      }
1004
+    },
990 1005
     "@nuxtjs/axios": {
991 1006
       "version": "5.9.3",
992 1007
       "resolved": "https://registry.npmjs.org/@nuxtjs/axios/-/axios-5.9.3.tgz",
@@ -2398,6 +2413,23 @@
2398 2413
       "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
2399 2414
       "dev": true
2400 2415
     },
2416
+    "bootstrap": {
2417
+      "version": "4.5.2",
2418
+      "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.2.tgz",
2419
+      "integrity": "sha512-vlGn0bcySYl/iV+BGA544JkkZP5LB3jsmkeKLFQakCOwCM3AOk7VkldBz4jrzSe+Z0Ezn99NVXa1o45cQY4R6A=="
2420
+    },
2421
+    "bootstrap-vue": {
2422
+      "version": "2.16.0",
2423
+      "resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.16.0.tgz",
2424
+      "integrity": "sha512-gLETwPmeRHCe5WHmhGxzb5PtTEuKqQPGl0TFvZ2Odbkg/7UuIHdqIexrJRerpnomP4ZzDQ+qYGL91Ls9lcQsJQ==",
2425
+      "requires": {
2426
+        "@nuxt/opencollective": "^0.3.0",
2427
+        "bootstrap": ">=4.5.0 <5.0.0",
2428
+        "popper.js": "^1.16.1",
2429
+        "portal-vue": "^2.1.7",
2430
+        "vue-functional-data-merge": "^3.1.0"
2431
+      }
2432
+    },
2401 2433
     "brace-expansion": {
2402 2434
       "version": "1.1.11",
2403 2435
       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -2719,7 +2751,6 @@
2719 2751
       "version": "2.4.2",
2720 2752
       "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
2721 2753
       "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
2722
-      "dev": true,
2723 2754
       "requires": {
2724 2755
         "ansi-styles": "^3.2.1",
2725 2756
         "escape-string-regexp": "^1.0.5",
@@ -4177,12 +4208,8 @@
4177 4208
     },
4178 4209
     "dot-prop": {
4179 4210
       "version": "4.2.0",
4180
-      "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
4181
-      "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
4182
-      "dev": true,
4183
-      "requires": {
4184
-        "is-obj": "^1.0.0"
4185
-      }
4211
+      "resolved": "",
4212
+      "dev": true
4186 4213
     },
4187 4214
     "dotenv": {
4188 4215
       "version": "7.0.0",
@@ -4253,9 +4280,9 @@
4253 4280
       "dev": true
4254 4281
     },
4255 4282
     "elliptic": {
4256
-      "version": "6.5.2",
4257
-      "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz",
4258
-      "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==",
4283
+      "version": "6.5.3",
4284
+      "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
4285
+      "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
4259 4286
       "dev": true,
4260 4287
       "requires": {
4261 4288
         "bn.js": "^4.4.0",
@@ -6369,8 +6396,7 @@
6369 6396
     "has-flag": {
6370 6397
       "version": "3.0.0",
6371 6398
       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
6372
-      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
6373
-      "dev": true
6399
+      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
6374 6400
     },
6375 6401
     "has-symbols": {
6376 6402
       "version": "1.0.1",
@@ -7120,12 +7146,6 @@
7120 7146
         }
7121 7147
       }
7122 7148
     },
7123
-    "is-obj": {
7124
-      "version": "1.0.1",
7125
-      "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
7126
-      "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
7127
-      "dev": true
7128
-    },
7129 7149
     "is-path-cwd": {
7130 7150
       "version": "2.2.0",
7131 7151
       "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
@@ -7555,9 +7575,9 @@
7555 7575
       }
7556 7576
     },
7557 7577
     "lodash": {
7558
-      "version": "4.17.15",
7559
-      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
7560
-      "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
7578
+      "version": "4.17.20",
7579
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
7580
+      "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
7561 7581
     },
7562 7582
     "lodash.clonedeep": {
7563 7583
       "version": "4.5.0",
@@ -8123,6 +8143,11 @@
8123 8143
         "lower-case": "^1.1.1"
8124 8144
       }
8125 8145
     },
8146
+    "node-fetch": {
8147
+      "version": "2.6.0",
8148
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
8149
+      "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
8150
+    },
8126 8151
     "node-forge": {
8127 8152
       "version": "0.9.0",
8128 8153
       "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz",
@@ -13100,6 +13125,16 @@
13100 13125
       "dev": true,
13101 13126
       "optional": true
13102 13127
     },
13128
+    "popper.js": {
13129
+      "version": "1.16.1",
13130
+      "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
13131
+      "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
13132
+    },
13133
+    "portal-vue": {
13134
+      "version": "2.1.7",
13135
+      "resolved": "https://registry.npmjs.org/portal-vue/-/portal-vue-2.1.7.tgz",
13136
+      "integrity": "sha512-+yCno2oB3xA7irTt0EU5Ezw22L2J51uKAacE/6hMPMoO/mx3h4rXFkkBkT4GFsMDv/vEe8TNKC3ujJJ0PTwb6g=="
13137
+    },
13103 13138
     "portfinder": {
13104 13139
       "version": "1.0.26",
13105 13140
       "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz",
@@ -15314,7 +15349,6 @@
15314 15349
       "version": "5.5.0",
15315 15350
       "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
15316 15351
       "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
15317
-      "dev": true,
15318 15352
       "requires": {
15319 15353
         "has-flag": "^3.0.0"
15320 15354
       }
@@ -16098,6 +16132,11 @@
16098 16132
         "vue": "^2.6.10"
16099 16133
       }
16100 16134
     },
16135
+    "vue-functional-data-merge": {
16136
+      "version": "3.1.0",
16137
+      "resolved": "https://registry.npmjs.org/vue-functional-data-merge/-/vue-functional-data-merge-3.1.0.tgz",
16138
+      "integrity": "sha512-leT4kdJVQyeZNY1kmnS1xiUlQ9z1B/kdBFCILIjYYQDqZgLqCLa0UhjSSeRX6c3mUe6U5qYeM8LrEqkHJ1B4LA=="
16139
+    },
16101 16140
     "vue-hot-reload-api": {
16102 16141
       "version": "2.3.4",
16103 16142
       "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",

+ 4
- 1
package.json Visa fil

@@ -11,15 +11,18 @@
11 11
   "dependencies": {
12 12
     "@fortawesome/fontawesome-svg-core": "^1.2.28",
13 13
     "@fortawesome/free-solid-svg-icons": "^5.13.0",
14
+    "@fortawesome/vue-fontawesome": "^0.1.10",
14 15
     "@nuxtjs/axios": "^5.9.3",
15 16
     "animate.css": "^3.7.2",
16 17
     "axios": "^0.19.2",
18
+    "bootstrap": "^4.5.2",
19
+    "bootstrap-vue": "^2.16.0",
17 20
     "core-js": "^2.6.11",
18 21
     "datatables.net": "^1.10.20",
19 22
     "font-awesome": "^4.7.0",
20 23
     "jquery": "^3.5.1",
21 24
     "js-sha256": "^0.9.0",
22
-    "lodash": "^4.17.15",
25
+    "lodash": "^4.17.20",
23 26
     "material-design-icons-iconfont": "^3.0.3",
24 27
     "moment": "^2.24.0",
25 28
     "node-sass": "^4.14.1",

+ 7921
- 7817
public/css/bootstrap.css
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 7921
- 7817
public/css/bootstrap.min.css
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1108
- 1115
public/css/style.css
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


Binär
public/img/sort-down.png Visa fil


Binär
public/img/sort-up.png Visa fil


+ 6043
- 5694
public/lib/bootstrap/css/bootstrap.css
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 8284
- 2
public/lib/bootstrap/css/bootstrap.min.css
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 159
- 1
public/lib/bootstrap/css/bootstrap.min.css.map
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 12
- 12
src/App.vue Visa fil

@@ -19,13 +19,13 @@ export default {
19 19
   name: "app",
20 20
   components: {
21 21
     NavBar,
22
-    FooterSection,
22
+    FooterSection
23 23
   },
24 24
   methods: {
25 25
     routerGoTo(goTo) {
26 26
       this.$router.push(goTo);
27
-    },
28
-  },
27
+    }
28
+  }
29 29
 };
30 30
 </script>
31 31
 
@@ -34,11 +34,11 @@ button:hover {
34 34
   cursor: pointer;
35 35
 }
36 36
 hr {
37
-  background-color: #24aae1;
37
+  background-color: #6c757d;
38 38
 }
39 39
 .my-btn {
40 40
   margin: 2px;
41
-  color: #24aae1;
41
+  color: #6c757d;
42 42
 }
43 43
 .title-img {
44 44
   width: 800px;
@@ -51,12 +51,12 @@ hr {
51 51
   border-radius: 15px;
52 52
 }
53 53
 .myBackground {
54
-  border-color: #24aae1;
55
-  background-color: #24aae1;
54
+  border-color: #6c757d;
55
+  background-color: #6c757d;
56 56
 }
57 57
 .myFill {
58
-  fill: #24aae1;
59
-  color: #24aae1;
58
+  fill: #6c757d;
59
+  color: #6c757d;
60 60
 }
61 61
 .mySuccess {
62 62
   border-color: rgba(2, 184, 117, 0.5);
@@ -78,7 +78,7 @@ a {
78 78
   cursor: pointer;
79 79
 }
80 80
 a:hover {
81
-  color: #24aae1;
81
+  color: #6c757d;
82 82
 }
83 83
 #app {
84 84
   font-family: "Avenir", Helvetica, Arial, sans-serif;
@@ -99,7 +99,7 @@ html {
99 99
   margin: 0;
100 100
 }
101 101
 .isSelected {
102
-  border-color: white white #24aae1 white;
102
+  border-color: white white #6c757d white;
103 103
 }
104 104
 .isUnSelected {
105 105
   border-color: white white white white;
@@ -118,7 +118,7 @@ html {
118 118
   color: white;
119 119
 }
120 120
 .normalText {
121
-  background-color: #24aae1;
121
+  background-color: #6c757d;
122 122
 }
123 123
 .pendingOffer {
124 124
   background-color: #ff8344;

+ 5
- 8
src/components/accounts/login.vue Visa fil

@@ -12,7 +12,7 @@
12 12
           <div class="input-group mb-3">
13 13
             <div class="input-group-prepend">
14 14
               <span class="input-group-text">
15
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
15
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
16 16
               </span>
17 17
               <input
18 18
                 class="form-control"
@@ -26,7 +26,7 @@
26 26
           <div class="input-group mb-3">
27 27
             <div class="input-group-prepend">
28 28
               <span class="input-group-text">
29
-                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
29
+                <eva-icon name="lock-outline" fill="#6c757d"></eva-icon>
30 30
               </span>
31 31
               <input
32 32
                 class="form-control"
@@ -38,8 +38,8 @@
38 38
               />
39 39
               <div class="input-group-append">
40 40
                 <span class="input-group-text" @click="togglePassword()">
41
-                  <eva-icon v-if="showPassword" name="eye-off-outline" fill="#24aae1"></eva-icon>
42
-                  <eva-icon v-else name="eye-outline" fill="#24aae1"></eva-icon>
41
+                  <eva-icon v-if="showPassword" name="eye-off-outline" fill="#6c757d"></eva-icon>
42
+                  <eva-icon v-else name="eye-outline" fill="#6c757d"></eva-icon>
43 43
                 </span>
44 44
               </div>
45 45
             </div>
@@ -69,10 +69,7 @@ export default {
69 69
     };
70 70
   },
71 71
   methods: {
72
-    ...mapActions("authentiaction", [
73
-      "getAuthentication",
74
-      "checkAuthentication"
75
-    ]),
72
+    ...mapActions("authentiaction", ["getAuthentication", "checkAuthentication"]),
76 73
     Login() {
77 74
       this.checkAuthentication(this.auth).then(() => {
78 75
         //console.log(JSON.stringify(this.$store.state.authentiaction.result));

+ 25
- 16
src/components/accounts/register.vue Visa fil

@@ -14,9 +14,14 @@
14 14
             <label>Name</label>
15 15
             <div class="input-group-prepend">
16 16
               <span class="input-group-text">
17
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
17
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
18 18
               </span>
19
-              <input class="form-control" type="text" name="name" v-model="userContainer.firstName" />
19
+              <input
20
+                class="form-control"
21
+                type="text"
22
+                name="name"
23
+                v-model="userContainer.firstName"
24
+              />
20 25
             </div>
21 26
           </div>
22 27
         </div>
@@ -25,7 +30,7 @@
25 30
             <label>Surname</label>
26 31
             <div class="input-group-prepend">
27 32
               <span class="input-group-text">
28
-                <eva-icon name="book-outline" fill="#24aae1"></eva-icon>
33
+                <eva-icon name="book-outline" fill="#6c757d"></eva-icon>
29 34
               </span>
30 35
               <input
31 36
                 class="form-control"
@@ -41,7 +46,7 @@
41 46
             <label>Email Address</label>
42 47
             <div class="input-group-prepend">
43 48
               <span class="input-group-text">
44
-                <eva-icon name="email-outline" fill="#24aae1"></eva-icon>
49
+                <eva-icon name="email-outline" fill="#6c757d"></eva-icon>
45 50
               </span>
46 51
               <input
47 52
                 class="form-control"
@@ -57,7 +62,7 @@
57 62
             <label>Cellphone</label>
58 63
             <div class="input-group-prepend">
59 64
               <span class="input-group-text">
60
-                <eva-icon name="phone-outline" fill="#24aae1"></eva-icon>
65
+                <eva-icon name="phone-outline" fill="#6c757d"></eva-icon>
61 66
               </span>
62 67
               <input
63 68
                 class="form-control"
@@ -73,7 +78,7 @@
73 78
             <label>Password</label>
74 79
             <div class="input-group-prepend">
75 80
               <span class="input-group-text">
76
-                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
81
+                <eva-icon name="lock-outline" fill="#6c757d"></eva-icon>
77 82
               </span>
78 83
               <input
79 84
                 class="form-control"
@@ -91,7 +96,7 @@
91 96
             <label>Confirm Password</label>
92 97
             <div class="input-group-prepend">
93 98
               <span class="input-group-text">
94
-                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
99
+                <eva-icon name="lock-outline" fill="#6c757d"></eva-icon>
95 100
               </span>
96 101
               <input
97 102
                 class="form-control"
@@ -107,10 +112,15 @@
107 112
                     <eva-icon
108 113
                       v-if="showPassword"
109 114
                       name="eye-off-outline"
110
-                      fill="#24aae1"
115
+                      fill="#6c757d"
116
+                      @click="togglePassword()"
117
+                    ></eva-icon>
118
+                    <eva-icon
119
+                      v-else
120
+                      name="eye-outline"
121
+                      fill="#6c757d"
111 122
                       @click="togglePassword()"
112 123
                     ></eva-icon>
113
-                    <eva-icon v-else name="eye-outline" fill="#24aae1" @click="togglePassword()"></eva-icon>
114 124
                   </span>
115 125
                 </div>
116 126
               </div>
@@ -120,15 +130,14 @@
120 130
         <div class="form-group row"></div>
121 131
         <div class="row offset-md-4">
122 132
           <div class="col-md-2">
123
-            <button
124
-              @click="RegisterData()"
125
-              class="btn btn-b-n"
126
-              type="submit"
127
-              data-dismiss="modal"
128
-            >Submit</button>
133
+            <button @click="RegisterData()" class="btn btn-b-n" type="submit" data-dismiss="modal">
134
+              Submit
135
+            </button>
129 136
           </div>
130 137
           <div class="col-md-2 offset-md-1">
131
-            <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">Cancel</button>
138
+            <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">
139
+              Cancel
140
+            </button>
132 141
           </div>
133 142
         </div>
134 143
       </div>

+ 25
- 22
src/components/accounts/restaurantRegistration.vue Visa fil

@@ -19,7 +19,7 @@
19 19
             <label>Name</label>
20 20
             <div class="input-group-prepend">
21 21
               <span class="input-group-text">
22
-                <eva-icon name="edit-2-outline" fill="#24aae1"></eva-icon>
22
+                <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
23 23
               </span>
24 24
               <input
25 25
                 class="form-control"
@@ -61,7 +61,7 @@
61 61
             <label>Delivery Fee</label>
62 62
             <div class="input-group-prepend">
63 63
               <span class="input-group-text">
64
-                <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
64
+                <eva-icon name="credit-card-outline" fill="#6c757d"></eva-icon>
65 65
               </span>
66 66
               <input
67 67
                 class="form-control"
@@ -77,7 +77,7 @@
77 77
             <label>Delivery Radius (KM)</label>
78 78
             <div class="input-group-prepend">
79 79
               <span class="input-group-text">
80
-                <eva-icon name="pin-outline" fill="#24aae1"></eva-icon>
80
+                <eva-icon name="pin-outline" fill="#6c757d"></eva-icon>
81 81
               </span>
82 82
               <input
83 83
                 class="form-control"
@@ -93,7 +93,7 @@
93 93
             <label>Delivery Time (Minutes)</label>
94 94
             <div class="input-group-prepend">
95 95
               <span class="input-group-text">
96
-                <eva-icon name="clock-outline" fill="#24aae1"></eva-icon>
96
+                <eva-icon name="clock-outline" fill="#6c757d"></eva-icon>
97 97
               </span>
98 98
               <input
99 99
                 class="form-control"
@@ -130,7 +130,7 @@
130 130
             <label>Shopping Centre</label>
131 131
             <div class="input-group-prepend">
132 132
               <span class="input-group-text">
133
-                <eva-icon name="shopping-cart-outline" fill="#24aae1"></eva-icon>
133
+                <eva-icon name="shopping-cart-outline" fill="#6c757d"></eva-icon>
134 134
               </span>
135 135
               <input
136 136
                 class="form-control"
@@ -146,7 +146,7 @@
146 146
             <label>Shop Number</label>
147 147
             <div class="input-group-prepend">
148 148
               <span class="input-group-text">
149
-                <eva-icon name="hash-outline" fill="#24aae1"></eva-icon>
149
+                <eva-icon name="hash-outline" fill="#6c757d"></eva-icon>
150 150
               </span>
151 151
               <input
152 152
                 class="form-control"
@@ -207,7 +207,7 @@
207 207
             <label>First Name</label>
208 208
             <div class="input-group-prepend">
209 209
               <span class="input-group-text">
210
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
210
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
211 211
               </span>
212 212
               <input
213 213
                 class="form-control"
@@ -221,7 +221,7 @@
221 221
             <label>Surname</label>
222 222
             <div class="input-group-prepend">
223 223
               <span class="input-group-text">
224
-                <eva-icon name="book-outline" fill="#24aae1"></eva-icon>
224
+                <eva-icon name="book-outline" fill="#6c757d"></eva-icon>
225 225
               </span>
226 226
               <input
227 227
                 class="form-control"
@@ -235,7 +235,7 @@
235 235
             <label>Email Address</label>
236 236
             <div class="input-group-prepend">
237 237
               <span class="input-group-text">
238
-                <eva-icon name="email-outline" fill="#24aae1"></eva-icon>
238
+                <eva-icon name="email-outline" fill="#6c757d"></eva-icon>
239 239
               </span>
240 240
               <input
241 241
                 class="form-control"
@@ -251,7 +251,7 @@
251 251
             <label>Password</label>
252 252
             <div class="input-group-prepend">
253 253
               <span class="input-group-text">
254
-                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
254
+                <eva-icon name="lock-outline" fill="#6c757d"></eva-icon>
255 255
               </span>
256 256
               <input
257 257
                 class="form-control"
@@ -267,7 +267,7 @@
267 267
             <label>Confirm Password</label>
268 268
             <div class="input-group-prepend">
269 269
               <span class="input-group-text">
270
-                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
270
+                <eva-icon name="lock-outline" fill="#6c757d"></eva-icon>
271 271
               </span>
272 272
               <input
273 273
                 class="form-control"
@@ -283,10 +283,15 @@
283 283
                     <eva-icon
284 284
                       v-if="showPassword"
285 285
                       name="eye-off-outline"
286
-                      fill="#24aae1"
286
+                      fill="#6c757d"
287
+                      @click="togglePassword()"
288
+                    ></eva-icon>
289
+                    <eva-icon
290
+                      v-else
291
+                      name="eye-outline"
292
+                      fill="#6c757d"
287 293
                       @click="togglePassword()"
288 294
                     ></eva-icon>
289
-                    <eva-icon v-else name="eye-outline" fill="#24aae1" @click="togglePassword()"></eva-icon>
290 295
                   </span>
291 296
                 </div>
292 297
               </div>
@@ -296,15 +301,14 @@
296 301
         <div class="form-group row"></div>
297 302
         <div class="row offset-md-4">
298 303
           <div class="col-md-2">
299
-            <button
300
-              @click="SubmitData()"
301
-              class="btn btn-b-n"
302
-              type="button"
303
-              data-dismiss="modal"
304
-            >Submit</button>
304
+            <button @click="SubmitData()" class="btn btn-b-n" type="button" data-dismiss="modal">
305
+              Submit
306
+            </button>
305 307
           </div>
306 308
           <div class="col-md-2 offset-md-1">
307
-            <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">Cancel</button>
309
+            <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">
310
+              Cancel
311
+            </button>
308 312
           </div>
309 313
         </div>
310 314
         <div class="row" style="text-align:left">
@@ -416,8 +420,7 @@ export default {
416 420
 
417 421
       this.restaurantContainer.categories = cats;
418 422
       this.restaurantContainer.methodsOfPayment = mops;
419
-      this.restaurantContainer.deliveryTime =
420
-        this.deliverfrom + " - " + this.deliverTo + " Min";
423
+      this.restaurantContainer.deliveryTime = this.deliverfrom + " - " + this.deliverTo + " Min";
421 424
 
422 425
       if (this.restaurantContainer.userPassword !== this.confirmpassword) {
423 426
         this.hasError = true;

+ 9
- 13
src/components/accounts/tradingHours.vue Visa fil

@@ -17,7 +17,7 @@
17 17
       <div class="col-md-12" style="margin-bottom: 1em">
18 18
         <label>Description</label>
19 19
         <div class="input-group-prepend">
20
-          <span class="input-group-text" style="color: #24aae1">
20
+          <span class="input-group-text" style="color: #6c757d">
21 21
             <b>D</b>
22 22
           </span>
23 23
           <input class="form-control" type="text" v-model="tradingData.description" />
@@ -28,7 +28,7 @@
28 28
       <div class="col-md-6" style="margin-bottom: 1em">
29 29
         <label>From</label>
30 30
         <div class="input-group-prepend">
31
-          <span class="input-group-text" style="color: #24aae1">
31
+          <span class="input-group-text" style="color: #6c757d">
32 32
             <b>F</b>
33 33
           </span>
34 34
           <VueTimepicker v-model="tradingData.from" :disabled="EnableTime"></VueTimepicker>
@@ -37,7 +37,7 @@
37 37
       <div class="col-md-6" style="margin-bottom: 1em">
38 38
         <label>To</label>
39 39
         <div class="input-group-prepend">
40
-          <span class="input-group-text" style="color: #24aae1">
40
+          <span class="input-group-text" style="color: #6c757d">
41 41
             <b>T</b>
42 42
           </span>
43 43
           <VueTimepicker v-model="tradingData.to" :disabled="EnableTime"></VueTimepicker>
@@ -57,11 +57,9 @@
57 57
             @change="selectionChangedHours"
58 58
             :disabled="tradingData.closed"
59 59
           />
60
-          <label
61
-            class="custom-control-label"
62
-            for="th24HSwitch"
63
-            style="margin-left: 40px"
64
-          >{{tradingData.open24 ? 'Yes' : 'No'}}</label>
60
+          <label class="custom-control-label" for="th24HSwitch" style="margin-left: 40px">{{
61
+            tradingData.open24 ? "Yes" : "No"
62
+          }}</label>
65 63
         </div>
66 64
       </div>
67 65
     </div>
@@ -78,11 +76,9 @@
78 76
             @change="selectionChanged"
79 77
             :disabled="tradingData.open24"
80 78
           />
81
-          <label
82
-            class="custom-control-label"
83
-            for="thCloseSwitch"
84
-            style="margin-left: 40px"
85
-          >{{tradingData.closed ? 'Yes' : 'No'}}</label>
79
+          <label class="custom-control-label" for="thCloseSwitch" style="margin-left: 40px">{{
80
+            tradingData.closed ? "Yes" : "No"
81
+          }}</label>
86 82
         </div>
87 83
       </div>
88 84
     </div>

+ 22
- 27
src/components/customer/customerDetails.vue Visa fil

@@ -16,7 +16,7 @@
16 16
             <label>Name</label>
17 17
             <div class="input-group-prepend">
18 18
               <span class="input-group-text">
19
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
19
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
20 20
               </span>
21 21
               <input class="form-control" type="text" name="FirstName" v-model="user.firstName" />
22 22
             </div>
@@ -25,7 +25,7 @@
25 25
             <label>Surname</label>
26 26
             <div class="input-group-prepend">
27 27
               <span class="input-group-text">
28
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
28
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
29 29
               </span>
30 30
               <input class="form-control" type="text" name="Surname" v-model="user.surname" />
31 31
             </div>
@@ -36,7 +36,7 @@
36 36
             <label>Eamil Addres</label>
37 37
             <div class="input-group-prepend">
38 38
               <span class="input-group-text">
39
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
39
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
40 40
               </span>
41 41
               <input
42 42
                 class="form-control"
@@ -50,7 +50,7 @@
50 50
             <label>Cellphone</label>
51 51
             <div class="input-group-prepend">
52 52
               <span class="input-group-text">
53
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
53
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
54 54
               </span>
55 55
               <input class="form-control" type="text" name="cellphone" v-model="user.cellphone" />
56 56
             </div>
@@ -76,22 +76,17 @@
76 76
                 :checked="userAddress.isComplex"
77 77
                 @change="selectionChanged"
78 78
               />
79
-              <label
80
-                class="custom-control-label"
81
-                for="thCloseSwitch"
82
-                style="margin-left: 40px"
83
-              >{{userAddress.isComplex ? 'Yes' : 'No'}}</label>
79
+              <label class="custom-control-label" for="thCloseSwitch" style="margin-left: 40px">
80
+                {{
81
+                userAddress.isComplex ? "Yes" : "No"
82
+                }}
83
+              </label>
84 84
             </div>
85 85
           </div>
86 86
         </div>
87 87
         <div class="row" style="text-align:left">
88 88
           <div class="col-md-4" style="margin-bottom: 1em">
89
-            <button
90
-              @click="ShowMap()"
91
-              class="btn btn-b-n"
92
-              type="button"
93
-              data-dismiss="modal"
94
-            >Update Address</button>
89
+            <b-button class="mt-2" @click="ShowMap()">Update Address</b-button>
95 90
           </div>
96 91
         </div>
97 92
         <div v-if="userAddress.isComplex" class="row" style="text-align:left">
@@ -99,7 +94,7 @@
99 94
             <label>Complex Name</label>
100 95
             <div class="input-group-prepend">
101 96
               <span class="input-group-text">
102
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
97
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
103 98
               </span>
104 99
               <input
105 100
                 class="form-control"
@@ -113,7 +108,7 @@
113 108
             <label>Unit Number</label>
114 109
             <div class="input-group-prepend">
115 110
               <span class="input-group-text">
116
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
111
+                <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
117 112
               </span>
118 113
               <input
119 114
                 class="form-control"
@@ -131,7 +126,7 @@
131 126
                 <label>Street Number</label>
132 127
                 <div class="input-group-prepend">
133 128
                   <span class="input-group-text">
134
-                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
129
+                    <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
135 130
                   </span>
136 131
                   <input
137 132
                     class="form-control"
@@ -148,7 +143,7 @@
148 143
                 <label>Street Name</label>
149 144
                 <div class="input-group-prepend">
150 145
                   <span class="input-group-text">
151
-                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
146
+                    <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
152 147
                   </span>
153 148
                   <input
154 149
                     class="form-control"
@@ -165,7 +160,7 @@
165 160
                 <label>Suburb</label>
166 161
                 <div class="input-group-prepend">
167 162
                   <span class="input-group-text">
168
-                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
163
+                    <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
169 164
                   </span>
170 165
                   <input
171 166
                     class="form-control"
@@ -182,7 +177,7 @@
182 177
                 <label>City</label>
183 178
                 <div class="input-group-prepend">
184 179
                   <span class="input-group-text">
185
-                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
180
+                    <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
186 181
                   </span>
187 182
                   <input
188 183
                     class="form-control"
@@ -199,7 +194,7 @@
199 194
                 <label>Province</label>
200 195
                 <div class="input-group-prepend">
201 196
                   <span class="input-group-text">
202
-                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
197
+                    <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
203 198
                   </span>
204 199
                   <input
205 200
                     class="form-control"
@@ -216,7 +211,7 @@
216 211
                 <label>Postal Code</label>
217 212
                 <div class="input-group-prepend">
218 213
                   <span class="input-group-text">
219
-                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
214
+                    <eva-icon name="person-outline" fill="#6c757d"></eva-icon>
220 215
                   </span>
221 216
                   <input
222 217
                     class="form-control"
@@ -235,10 +230,10 @@
235 230
         </div>
236 231
         <div class="row offset-md-5">
237 232
           <div class="col-md-2">
238
-            <button @click="Save()" class="btn btn-b-n" type="button" data-dismiss="modal">Save</button>
233
+            <b-button class="mt-2" @click="Save()">Save</b-button>
239 234
           </div>
240 235
           <div class="col-md-2">
241
-            <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">Close</button>
236
+            <b-button class="mt-2" @click="Close()">Close</b-button>
242 237
           </div>
243 238
         </div>
244 239
       </div>
@@ -250,7 +245,7 @@
250 245
         <Map :showLocationLabel="false" @GoogleAddress="UpdateAddress" />
251 246
         <div class="row" style="text-align:left">
252 247
           <div class="col-md-4" style="margin-bottom: 1em">
253
-            <button @click="HideMap()" class="btn btn-b-n" type="button" data-dismiss="modal">Close</button>
248
+            <b-button class="mt-2" @click="HideMap()">Close</b-button>
254 249
           </div>
255 250
         </div>
256 251
       </div>
@@ -321,4 +316,4 @@ export default {
321 316
     this.getUserAddress(Log.userId());
322 317
   },
323 318
 };
324
-</script>
319
+</script>

+ 170
- 0
src/components/customer/customerOrder.vue Visa fil

@@ -0,0 +1,170 @@
1
+<template>
2
+  <b-container fluid class="mt-5 ml-5 mr-5 md">
3
+    <div class="row">
4
+      <div class="col-md-12 col-lg-8">
5
+        <div class="title-box-d">
6
+          <br />
7
+          <h1 class="title-d" style="text-align:left; font-size: 250%">Order Details</h1>
8
+        </div>
9
+      </div>
10
+    </div>
11
+    <b-row>
12
+      <b-card class="col-md-11 itemCard" style="text-align:left; cursor: pointer;">
13
+        <b-card-title>
14
+          <b>Order #{{ order.id }}</b>
15
+          | {{ order.restaurantName }}
16
+          | {{ order.date | toDate }}
17
+        </b-card-title>
18
+        <b-card-title>
19
+          <b-row>
20
+            <b-col cols="6">{{order.status}}</b-col>
21
+            <b-col></b-col>
22
+            <b-col></b-col>
23
+            <b-col></b-col>
24
+            <b-col></b-col>
25
+            <b-col>
26
+              <b-button v-if="order.status === 'Awaiting Payment'" class="mt-5">Make Payment</b-button>
27
+            </b-col>
28
+          </b-row>
29
+        </b-card-title>
30
+        <hr />
31
+        <b-card-body>
32
+          <b-row>
33
+            <b-col cols="6">
34
+              <b>Address</b>
35
+            </b-col>
36
+            <b-col>
37
+              <b>Method Of Payment</b>
38
+            </b-col>
39
+            <b-col></b-col>
40
+            <b-col></b-col>
41
+            <b-col>
42
+              <b>Order Summary</b>
43
+            </b-col>
44
+            <b-col></b-col>
45
+          </b-row>
46
+          <b-row>
47
+            <b-col cols="6">{{ order.customerName }}</b-col>
48
+            <b-col>{{ order.methodOfPayment }}</b-col>
49
+            <b-col></b-col>
50
+            <b-col></b-col>
51
+            <b-col>Items: {{ order.totalItems }}</b-col>
52
+            <b-col style="text-align:right;">{{ order.subTotal | toCurrency }}</b-col>
53
+          </b-row>
54
+          <b-row>
55
+            <b-col cols="6">{{ order.complexLine }}</b-col>
56
+            <b-col></b-col>
57
+            <b-col></b-col>
58
+            <b-col></b-col>
59
+            <b-col>Delivery Fee:</b-col>
60
+            <b-col style="text-align:right;">{{ order.deliveryFee | toCurrency }}</b-col>
61
+          </b-row>
62
+          <b-row>
63
+            <b-col cols="6">{{ order.streetLine }}</b-col>
64
+            <b-col>
65
+              <b>Delivery Method</b>
66
+            </b-col>
67
+            <b-col></b-col>
68
+            <b-col></b-col>
69
+            <b-col></b-col>
70
+            <b-col></b-col>
71
+          </b-row>
72
+          <b-row>
73
+            <b-col cols="6">{{ order.suburb }}</b-col>
74
+            <b-col>{{ order.deliveryMethod }}</b-col>
75
+            <b-col></b-col>
76
+            <b-col></b-col>
77
+            <b-col>Order Total:</b-col>
78
+            <b-col style="text-align:right;">
79
+              <b>{{ order.subTotal + order.deliveryFee | toCurrency }}</b>
80
+            </b-col>
81
+          </b-row>
82
+          <b-row>
83
+            <b-col cols="6">{{ order.city }}</b-col>
84
+            <b-col></b-col>
85
+            <b-col></b-col>
86
+            <b-col></b-col>
87
+            <b-col></b-col>
88
+            <b-col></b-col>
89
+          </b-row>
90
+          <b-row>
91
+            <b-col cols="6">{{ order.postalCode }}</b-col>
92
+            <b-col></b-col>
93
+            <b-col></b-col>
94
+            <b-col></b-col>
95
+            <b-col></b-col>
96
+          </b-row>
97
+        </b-card-body>
98
+        <h4>Items</h4>
99
+        <b-card-body>
100
+          <div v-for="item in order.lines" :key="item.id">
101
+            <b-card no-body class="overflow-hidden" style="cursor: pointer;">
102
+              <b-row no-gutters>
103
+                <b-col cols="1">
104
+                  <b-card-img
105
+                    :src="item.image"
106
+                    alt="Image"
107
+                    style="max-height: 100px; max-width:100px"
108
+                    class="rounded-0 mt-2 ml-2"
109
+                  ></b-card-img>
110
+                </b-col>
111
+                <b-col>
112
+                  <b-card-body>
113
+                    <b-row>
114
+                      <b-col cols="6">
115
+                        <h5>{{ item.name }}</h5>
116
+                      </b-col>
117
+                      <b-col>
118
+                        <strong>Price:</strong>
119
+                      </b-col>
120
+                      <b-col>
121
+                        <strong>Quantity:</strong>
122
+                      </b-col>
123
+                      <b-col>
124
+                        <strong>Line Total:</strong>
125
+                      </b-col>
126
+                      <b-col></b-col>
127
+                      <b-col></b-col>
128
+                    </b-row>
129
+                    <b-row class="mt-2">
130
+                      <b-col cols="6">{{ item.description }}</b-col>
131
+                      <b-col>{{ item.price }}</b-col>
132
+                      <b-col>{{ item.qty }}</b-col>
133
+                      <b-col>{{ item.subTotal }}</b-col>
134
+                      <b-col></b-col>
135
+                      <b-col></b-col>
136
+                    </b-row>
137
+                  </b-card-body>
138
+                </b-col>
139
+              </b-row>
140
+            </b-card>
141
+          </div>
142
+        </b-card-body>
143
+      </b-card>
144
+    </b-row>
145
+    <b-row>
146
+      <b-button fluid class="mt-5 ml-5 mr-5 md" @click="Back">Back</b-button>
147
+    </b-row>
148
+  </b-container>
149
+</template>
150
+
151
+<script>
152
+import { mapState, mapActions } from "vuex";
153
+import Log from "../../assets/Log";
154
+
155
+export default {
156
+  name: "OrderDetail",
157
+  methods: {
158
+    ...mapActions("order", ["getUserOrder"]),
159
+    Back() {
160
+      this.$router.push("/MyOrders");
161
+    },
162
+  },
163
+  computed: {
164
+    ...mapState("order", ["order"]),
165
+  },
166
+  mounted() {
167
+    this.getUserOrder(this.$route.params.id);
168
+  },
169
+};
170
+</script>

+ 57
- 21
src/components/customer/customerOrders.vue Visa fil

@@ -1,33 +1,69 @@
1 1
 <template>
2
-  <div>
3
-    <div class="conainer">
4
-      <div class="container">
5
-        <div class="row">
6
-          <div class="col-md-12 col-lg-8">
7
-            <div class="title-box-d">
8
-              <br />
9
-              <h1 class="title-d" style="text-align:left; font-size: 250%">My Orders</h1>
10
-            </div>
11
-          </div>
12
-        </div>
13
-        <div class="row"></div>
14
-        <div class="row">
15
-          <div class="col-md-12">
16
-            <listView />
17
-          </div>
2
+  <b-container fluid class="mt-5 ml-5 mr-5 md">
3
+    <div class="row">
4
+      <div class="col-md-12 col-lg-8">
5
+        <div class="title-box-d">
6
+          <br />
7
+          <h1 class="title-d" style="text-align:left; font-size: 250%">My Orders</h1>
18 8
         </div>
19 9
       </div>
20 10
     </div>
21
-  </div>
11
+    <b-row v-for="order in orders" :key="order.id">
12
+      <b-card
13
+        class="col-md-11 itemCard"
14
+        style="text-align:left; cursor: pointer;"
15
+        @click="ShowDetails(order.id)"
16
+      >
17
+        <b-card-title>
18
+          <b>Date:</b>
19
+          {{ order.date | toDate }}
20
+          <!-- <b-button style="text-align:right">Details</b-button> -->
21
+        </b-card-title>
22
+        <b-card-sub-title>
23
+          <b>Time:</b>
24
+          {{ order.date | toTime }}
25
+          <br />
26
+          <b>Status:</b>
27
+          {{ order.status }}
28
+        </b-card-sub-title>
29
+        <hr />
30
+
31
+        <b-card-img
32
+          v-for="(image, i) in order.images"
33
+          :key="i"
34
+          :src="image"
35
+          img-alt="Card image"
36
+          img-left
37
+          class="mb-3"
38
+          style="max-height: 96px; max-width:96px; margin-left: 10px;"
39
+        />
40
+
41
+        <b-card-footer>
42
+          <b>Total:</b>
43
+          {{ order.total | toCurrency }}
44
+        </b-card-footer>
45
+      </b-card>
46
+    </b-row>
47
+  </b-container>
22 48
 </template>
23 49
 
24 50
 <script>
25
-import listView from "../shared/listView";
51
+import { mapState, mapActions } from "vuex";
52
+import Log from "../../assets/Log";
26 53
 
27 54
 export default {
28 55
   name: "CustomerOrders",
29
-  components: {
30
-    listView
31
-  }
56
+  methods: {
57
+    ...mapActions("order", ["getUserOrders"]),
58
+    ShowDetails(id) {
59
+      this.$router.push(`/OrderDetails/${id}`);
60
+    },
61
+  },
62
+  computed: {
63
+    ...mapState("order", ["orders"]),
64
+  },
65
+  mounted() {
66
+    this.getUserOrders(Log.userId());
67
+  },
32 68
 };
33 69
 </script>

+ 190
- 77
src/components/orders/cart.vue Visa fil

@@ -1,89 +1,155 @@
1 1
 <template>
2
-  <div class="container">
3
-    <div class="container">
4
-      <div class="row">
5
-        <div class="col-md-12 col-lg-8">
6
-          <div class="title-box-d">
7
-            <br />
8
-            <h1 class="title-d" style="text-align:left; font-size: 250%">My Cart</h1>
9
-          </div>
10
-        </div>
11
-      </div>
12
-      <!-- ListView -->
13
-      <ListView
14
-        :items="cartItems"
15
-        :displayColumns="columns"
16
-        :displayFormats="formats"
17
-        :editable="true"
18
-        :deleteable="true"
19
-        @onEdit="Edit"
20
-        @onDelete="Delete"
21
-      />
22
-      <div class="row">
23
-        <div class="col-md-12" style="margin-bottomL 1em">
24
-          <!-- RestaurantFeeDel -->
25
-        </div>
26
-      </div>
27
-      <div class="row">
28
-        <div class="col-md-2 offset-md-8" style="margin-bottomL 1em">
29
-          <label style="margin-top: 0.5em">
30
-            <b>Delivery Fee:</b>
31
-          </label>
32
-        </div>
33
-        <div class="col-md-2" style="margin-bottomL 1em">
34
-          <label style="margin-top: 0.5em">
35
-            <b>{{deliveryFee | toCurrency}}</b>
36
-          </label>
37
-        </div>
38
-      </div>
39
-      <div class="row">
40
-        <div class="col-md-2 offset-md-8" style="margin-bottomL 1em">
41
-          <label style="margin-top: 0.5em">
42
-            <b>Order Total:</b>
43
-          </label>
44
-        </div>
45
-        <div class="col-md-2" style="margin-bottomL 1em">
46
-          <label style="margin-top: 0.5em">
47
-            <b>{{OrderTotal | toCurrency}}</b>
48
-          </label>
49
-        </div>
50
-      </div>
51
-      <modal name="menu" :width="800" :height="600">
52
-        <Cart :showItem="CurrentItem" @Close="CloseItem" />
53
-      </modal>
54
-      <br />
55
-      <div class="row">
56
-        <div class="col-md-12" style="margin-bottomL 1em">
57
-          <div class="row offset-md-4">
58
-            <div class="col-md-3">
59
-              <button
60
-                @click="CheckOut()"
61
-                class="btn btn-b-n"
62
-                type="button"
63
-                data-dismiss="modal"
64
-                :disabled="cartItems.length == 0"
65
-              >Check Out</button>
66
-            </div>
67
-            <div class="col-md-3">
68
-              <button
69
-                @click="ClearCart()"
70
-                class="btn btn-b-n"
71
-                type="button"
72
-                data-dismiss="modal"
73
-                :disabled="cartItems.length == 0"
74
-              >Clear Cart</button>
75
-            </div>
76
-          </div>
2
+  <!-- <div class="container"> -->
3
+  <b-container fluid class="mt-5 ml-5 mr-5 md">
4
+    <div class="row">
5
+      <div class="col-md-12 col-lg-8">
6
+        <div class="title-box-d">
7
+          <br />
8
+          <h1 class="title-d" style="text-align:left; font-size: 250%">My Cart</h1>
77 9
         </div>
78 10
       </div>
79 11
     </div>
80
-  </div>
12
+    <b-row v-if="cartItems.length > 0">
13
+      <b-col cols="8">
14
+        <div v-for="item in cartItems" :key="item.id">
15
+          <b-card
16
+            no-body
17
+            class="overflow-hidden itemCard mt-2"
18
+            @click="Edit(item)"
19
+            style="cursor: pointer;"
20
+          >
21
+            <b-row no-gutters>
22
+              <b-col cols="1">
23
+                <b-card-img
24
+                  :src="item.image"
25
+                  alt="Image"
26
+                  style="max-height: 150px; max-width:150px"
27
+                  class="rounded-0 mt-2 ml-2"
28
+                ></b-card-img>
29
+              </b-col>
30
+              <b-col>
31
+                <b-card-body>
32
+                  <b-row>
33
+                    <b-col cols="6">
34
+                      <h5>{{ item.name }}</h5>
35
+                    </b-col>
36
+                    <b-col>
37
+                      <strong>Price:</strong>
38
+                    </b-col>
39
+                    <b-col>
40
+                      <strong>Quantity:</strong>
41
+                    </b-col>
42
+                    <b-col>
43
+                      <strong>Line Total:</strong>
44
+                    </b-col>
45
+                    <b-col></b-col>
46
+                  </b-row>
47
+                  <b-row class="mt-2">
48
+                    <b-col cols="6">{{ item.description }}</b-col>
49
+                    <b-col>{{ item.price | toCurrency }}</b-col>
50
+                    <b-col class="mr-5">{{ item.qty }}</b-col>
51
+                    <b-col>{{ item.subTotal | toCurrency }}</b-col>
52
+                    <b-col>
53
+                      <b-button @click="Delete(item)" variant="danger">
54
+                        <strong>
55
+                          <font-awesome-icon icon="trash"></font-awesome-icon>
56
+                        </strong>
57
+                      </b-button>
58
+                    </b-col>
59
+                  </b-row>
60
+                </b-card-body>
61
+              </b-col>
62
+            </b-row>
63
+          </b-card>
64
+        </div>
65
+      </b-col>
66
+      <b-col style="margin-right: 200px;">
67
+        <!-- <b-container class="shoppingDetail mb-2">
68
+          <b-row>
69
+            <b-col>
70
+              <ProfileShipCart class="mb-3" />
71
+            </b-col>
72
+          </b-row>
73
+        </b-container>-->
74
+        <b-container class="shoppingDetail">
75
+          <b-row class="mt-3">
76
+            <b-col align="right">
77
+              <b-row>
78
+                <b-col>
79
+                  <h6>Total Cart Items</h6>
80
+                </b-col>
81
+                <b-col cols="3">
82
+                  <h6>{{ OrderQty }}</h6>
83
+                </b-col>
84
+              </b-row>
85
+              <hr />
86
+              <b-row>
87
+                <b-col>
88
+                  <h5>Subtotal</h5>
89
+                </b-col>
90
+                <b-col cols="3">
91
+                  <h5>{{ OrderSubTotal | toCurrency }}</h5>
92
+                </b-col>
93
+              </b-row>
94
+              <b-row>
95
+                <b-col>
96
+                  <h5>Delivery Fee</h5>
97
+                </b-col>
98
+                <b-col cols="3">
99
+                  <h5>{{ deliveryFee | toCurrency }}</h5>
100
+                </b-col>
101
+              </b-row>
102
+              <hr />
103
+              <b-row>
104
+                <b-col>
105
+                  <h4>Grand Total</h4>
106
+                </b-col>
107
+                <b-col cols="3">
108
+                  <h4>{{ OrderTotal | toCurrency }}</h4>
109
+                </b-col>
110
+              </b-row>
111
+              <hr />
112
+
113
+              <b-row class="mt-2 mb-2">
114
+                <b-col>
115
+                  <b-button @click="CheckOut">Checkout</b-button>
116
+                </b-col>
117
+              </b-row>
118
+            </b-col>
119
+          </b-row>
120
+        </b-container>
121
+      </b-col>
122
+    </b-row>
123
+    <b-container v-if="cartItems.length > 0">
124
+      <b-row>
125
+        <b-col></b-col>
126
+        <b-col>
127
+          <b-row class="mt-3">
128
+            <b-col class="ml-5" align="right">
129
+              <b-button class="mt-2" variant="danger" v-on:click="ClearCart">Clear Cart</b-button>
130
+            </b-col>
131
+            <b-col></b-col>
132
+          </b-row>
133
+        </b-col>
134
+      </b-row>
135
+    </b-container>
136
+    <b-container v-else>
137
+      <p>Your cart is empty</p>
138
+      <b-button class="mt-2" v-on:click="GoHome">Continue Shopping</b-button>
139
+    </b-container>
140
+    <modal name="menu" :width="800" :height="600">
141
+      <Cart :showItem="CurrentItem" @Close="CloseItem" />
142
+    </modal>
143
+  </b-container>
144
+  <!-- </div> -->
81 145
 </template>
82 146
 
83 147
 <script>
84 148
 import { mapState, mapActions } from "vuex";
85 149
 import ListView from "../shared/listView";
86 150
 import Cart from "./cartItem";
151
+import Log from "../../assets/Log";
152
+import orderOptionSelectionVue from "./orderOptionSelection.vue";
87 153
 
88 154
 export default {
89 155
   name: "MyCart",
@@ -101,6 +167,7 @@ export default {
101 167
   },
102 168
   methods: {
103 169
     ...mapActions("cart", ["getDeliveryFee"]),
170
+    ...mapActions("order", ["saveOrder"]),
104 171
     New() {},
105 172
     Edit(item) {
106 173
       this.item = item;
@@ -115,15 +182,47 @@ export default {
115 182
       }
116 183
     },
117 184
     CheckOut() {
118
-      this.$router.push("/ConfirmOrder");
185
+      let orderObject = {};
186
+      orderObject.deliveryAddress = { userid: Log.userId() };
187
+      orderObject.items = [];
188
+
189
+      for (let i = 0; i < this.cartItems.length; i++) {
190
+        let item = {
191
+          id: this.cartItems[i].id,
192
+          description: this.cartItems[i].description,
193
+          name: this.cartItems[i].name,
194
+          subTotal: this.cartItems[i].subTotal,
195
+          qty: this.cartItems[i].qty,
196
+          selection: this.cartItems[i].selection,
197
+          price: this.cartItems[i].price,
198
+          restaurantId: this.cartItems[i].restaurantId,
199
+        };
200
+
201
+        orderObject.items.push(item);
202
+      }
203
+
204
+      this.saveOrder(orderObject)
205
+        .then((fulfilled) => {
206
+          this.cartItems.splice(0, this.cartItems.length);
207
+          this.$router.push(`/ConfirmOrder/${this.order.orderId}`);
208
+        })
209
+        .catch((error) => {
210
+          alert(error.message);
211
+        });
212
+
213
+      //this.$router.push("/ConfirmOrder");
119 214
     },
120 215
     ClearCart() {
121 216
       this.deliveryFee = 0;
122 217
       this.cartItems.splice(0, this.cartItems.length);
123 218
     },
219
+    GoHome() {
220
+      this.$router.push("/");
221
+    },
124 222
   },
125 223
   computed: {
126 224
     ...mapState("cart", ["cartItems", "deliveryFee"]),
225
+    ...mapState("order", ["order"]),
127 226
     CurrentItem() {
128 227
       return this.item;
129 228
     },
@@ -134,6 +233,20 @@ export default {
134 233
       }
135 234
       return tot + this.deliveryFee;
136 235
     },
236
+    OrderSubTotal() {
237
+      var tot = 0;
238
+      for (let i = 0; i < this.cartItems.length; i++) {
239
+        tot = tot + this.cartItems[i].subTotal;
240
+      }
241
+      return tot;
242
+    },
243
+    OrderQty() {
244
+      var tot = 0;
245
+      for (let i = 0; i < this.cartItems.length; i++) {
246
+        tot = tot + this.cartItems[i].qty;
247
+      }
248
+      return tot;
249
+    },
137 250
   },
138 251
   mounted() {
139 252
     if (this.cartItems.length > 0) {

+ 29
- 0
src/components/orders/cartCard.vue Visa fil

@@ -0,0 +1,29 @@
1
+<template>
2
+  <div class="container">
3
+    <div class="row">
4
+      <div class="col-md-12 col-lg-8">
5
+        <div class="title-box-d">
6
+          <br />
7
+          <h1 class="title-d" style="text-align:left; font-size: 250%">My Cart</h1>
8
+        </div>
9
+      </div>
10
+    </div>
11
+  </div>
12
+</template>
13
+
14
+
15
+
16
+<style lang="scss" scoped>
17
+.shipHeader {
18
+  color: black;
19
+}
20
+.itemCard {
21
+  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.12);
22
+}
23
+.shoppingDetail {
24
+  background-color: #f5f5f5;
25
+  border-style: solid;
26
+  border-color: rgb(185, 185, 185);
27
+  border-width: thin;
28
+}
29
+</style>

+ 7
- 0
src/components/orders/confirmOrder.vue Visa fil

@@ -30,6 +30,9 @@ import StepOne from "./orderConf/confAddress";
30 30
 import StepTwo from "./orderConf/makePayment";
31 31
 import StepThree from "./orderConf/orderPlaced";
32 32
 
33
+import { mapState, mapActions } from "vuex";
34
+import Log from "../../assets/Log";
35
+
33 36
 export default {
34 37
   components: {
35 38
     HorizontalStepper,
@@ -65,6 +68,7 @@ export default {
65 68
     };
66 69
   },
67 70
   methods: {
71
+    ...mapActions("order", ["updateOrder", "getCartOrder"]),
68 72
     // Executed when @completed-step event is triggered
69 73
     completeStep(payload) {
70 74
       this.demoSteps.forEach((step) => {
@@ -88,5 +92,8 @@ export default {
88 92
       alert("end");
89 93
     },
90 94
   },
95
+  computed: {
96
+    ...mapState("order", ["order"]),
97
+  },
91 98
 };
92 99
 </script>

+ 22
- 17
src/components/orders/orderConf/confAddress.vue Visa fil

@@ -12,11 +12,11 @@
12 12
             :checked="userAddress.isComplex"
13 13
             @change="selectionChanged"
14 14
           />
15
-          <label class="custom-control-label" for="thCloseSwitch" style="margin-left: 40px">
16
-            {{
17
-            isComplex ? "Yes" : "No"
18
-            }}
19
-          </label>
15
+          <label
16
+            class="custom-control-label"
17
+            for="thCloseSwitch"
18
+            style="margin-left: 40px"
19
+          >{{ isComplex ? "Yes" : "No" }}</label>
20 20
         </div>
21 21
       </div>
22 22
     </div>
@@ -43,7 +43,7 @@
43 43
         <label>Complex Name</label>
44 44
         <div class="input-group-prepend">
45 45
           <span class="input-group-text">
46
-            <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
46
+            <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
47 47
           </span>
48 48
           <input
49 49
             class="form-control"
@@ -57,7 +57,7 @@
57 57
         <label>Unit Number</label>
58 58
         <div class="input-group-prepend">
59 59
           <span class="input-group-text">
60
-            <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
60
+            <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
61 61
           </span>
62 62
           <input class="form-control" type="text" name="Surname" v-model="userAddress.unitNumber" />
63 63
         </div>
@@ -70,7 +70,7 @@
70 70
             <label>Street Number</label>
71 71
             <div class="input-group-prepend">
72 72
               <span class="input-group-text">
73
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
73
+                <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
74 74
               </span>
75 75
               <input
76 76
                 class="form-control"
@@ -87,7 +87,7 @@
87 87
             <label>Street Name</label>
88 88
             <div class="input-group-prepend">
89 89
               <span class="input-group-text">
90
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
90
+                <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
91 91
               </span>
92 92
               <input
93 93
                 class="form-control"
@@ -104,7 +104,7 @@
104 104
             <label>Suburb</label>
105 105
             <div class="input-group-prepend">
106 106
               <span class="input-group-text">
107
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
107
+                <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
108 108
               </span>
109 109
               <input
110 110
                 class="form-control"
@@ -121,7 +121,7 @@
121 121
             <label>City</label>
122 122
             <div class="input-group-prepend">
123 123
               <span class="input-group-text">
124
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
124
+                <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
125 125
               </span>
126 126
               <input
127 127
                 class="form-control"
@@ -138,7 +138,7 @@
138 138
             <label>Province</label>
139 139
             <div class="input-group-prepend">
140 140
               <span class="input-group-text">
141
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
141
+                <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
142 142
               </span>
143 143
               <input
144 144
                 class="form-control"
@@ -155,7 +155,7 @@
155 155
             <label>Postal Code</label>
156 156
             <div class="input-group-prepend">
157 157
               <span class="input-group-text">
158
-                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
158
+                <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
159 159
               </span>
160 160
               <input
161 161
                 class="form-control"
@@ -210,6 +210,7 @@ export default {
210 210
   },
211 211
   methods: {
212 212
     ...mapActions("user", ["getUserAddress"]),
213
+    ...mapActions("order", ["updateAddress"]),
213 214
     selectionChanged() {
214 215
       this.userAddress.isComplex = !this.userAddress.isComplex;
215 216
     },
@@ -229,9 +230,7 @@ export default {
229 230
       });
230 231
     },
231 232
     Continue() {
232
-      this.order.deliveryAddress = this.userAddress;
233
-      this.order.items = this.cartItems;
234
-      this.$emit("can-continue", { value: true });
233
+      this.UpdateAddressContinue();
235 234
     },
236 235
     UpdateAddress(address) {
237 236
       this.userAddress.streetNumber = address.streetNumber;
@@ -244,7 +243,13 @@ export default {
244 243
       this.userAddress.googleMapUrl = address.url;
245 244
       this.userAddress.latitude = address.coordinates.lat;
246 245
       this.userAddress.longitude = address.coordinates.lng;
247
-      this.$emit("can-continue", { value: true });
246
+      this.order.deliveryAddress = this.userAddress;
247
+      this.UpdateAddressContinue();
248
+    },
249
+    UpdateAddressContinue() {
250
+      let obj = this.userAddress;
251
+      obj.orderId = this.order.orderId;
252
+      this.updateAddress(obj).then(this.$emit("can-continue", { value: true }));
248 253
     },
249 254
   },
250 255
   computed: {

+ 14
- 13
src/components/restaurants/restaurantCategory.vue Visa fil

@@ -10,7 +10,7 @@
10 10
         <label>Description</label>
11 11
         <div class="input-group-prepend">
12 12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
13
+            <eva-icon name="credit-card-outline" fill="#6c757d"></eva-icon>
14 14
           </span>
15 15
           <input class="form-control" type="text" name="description" v-model="category.description" />
16 16
         </div>
@@ -47,7 +47,7 @@
47 47
         <img :src="category.image" style="height:200px; width:200px; object-fit: cover;" />
48 48
         <br />
49 49
         <span class="input-group-text" align="center" style="width:150px" @click="removeImage()">
50
-          <eva-icon name="trash-2-outline" fill="#24aae1"></eva-icon>Delete
50
+          <eva-icon name="trash-2-outline" fill="#6c757d"></eva-icon>Delete
51 51
         </span>
52 52
       </div>
53 53
     </div>
@@ -55,7 +55,8 @@
55 55
     <div class="row">
56 56
       <div class="col-md-12" style="margin-bottom: 1em">
57 57
         <div class="input-group-prepend">
58
-          <b-button class="btn btn-b-n" @click="Ok">Ok</b-button>
58
+          <!-- <b-button class="btn btn-b-n" @click="Ok">Ok</b-button> -->
59
+          <b-button class="mt-2" @click="Ok">Ok</b-button>
59 60
         </div>
60 61
       </div>
61 62
     </div>
@@ -68,10 +69,10 @@ import ImageUploader from "vue-image-upload-resize";
68 69
 export default {
69 70
   name: "Category",
70 71
   props: {
71
-    editCategory: { default: {} }
72
+    editCategory: { default: {} },
72 73
   },
73 74
   components: {
74
-    ImageUploader
75
+    ImageUploader,
75 76
   },
76 77
   data() {
77 78
     return {
@@ -79,12 +80,12 @@ export default {
79 80
       category: {
80 81
         id: 0,
81 82
         image: null,
82
-        description: ""
83
-      }
83
+        description: "",
84
+      },
84 85
     };
85 86
   },
86 87
   methods: {
87
-    setImage: function(output) {
88
+    setImage: function (output) {
88 89
       this.hasImage = true;
89 90
       this.category.image = output.dataUrl;
90 91
     },
@@ -93,7 +94,7 @@ export default {
93 94
     },
94 95
     removeImage() {
95 96
       this.category.image = null;
96
-    }
97
+    },
97 98
   },
98 99
   watch: {
99 100
     editCategory: {
@@ -102,8 +103,8 @@ export default {
102 103
         if (val) {
103 104
           this.category = val;
104 105
         }
105
-      }
106
-    }
107
-  }
106
+      },
107
+    },
108
+  },
108 109
 };
109
-</script>
110
+</script>

+ 29
- 34
src/components/restaurants/restaurantDetails.vue Visa fil

@@ -24,7 +24,7 @@
24 24
               <label>Update Logo</label>
25 25
               <div class="input-group-prepend">
26 26
                 <span class="input-group-text" style="cursor: pointer;" @click="UpdateLogo">
27
-                  <eva-icon @click="UpdateLogo" name="image-outline" fill="#24aae1"></eva-icon>
27
+                  <eva-icon @click="UpdateLogo" name="image-outline" fill="#6c757d"></eva-icon>
28 28
                 </span>
29 29
               </div>
30 30
             </div>
@@ -39,7 +39,7 @@
39 39
               <label>Name</label>
40 40
               <div class="input-group-prepend">
41 41
                 <span class="input-group-text">
42
-                  <eva-icon name="edit-2-outline" fill="#24aae1"></eva-icon>
42
+                  <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
43 43
                 </span>
44 44
                 <input class="form-control" type="text" name="rname" v-model="restaurant.name" />
45 45
               </div>
@@ -63,7 +63,7 @@
63 63
               <label>Delivery Fee</label>
64 64
               <div class="input-group-prepend">
65 65
                 <span class="input-group-text">
66
-                  <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
66
+                  <eva-icon name="credit-card-outline" fill="#6c757d"></eva-icon>
67 67
                 </span>
68 68
                 <input
69 69
                   class="form-control"
@@ -79,7 +79,7 @@
79 79
               <label>Delivery Radius (KM)</label>
80 80
               <div class="input-group-prepend">
81 81
                 <span class="input-group-text">
82
-                  <eva-icon name="pin-outline" fill="#24aae1"></eva-icon>
82
+                  <eva-icon name="pin-outline" fill="#6c757d"></eva-icon>
83 83
                 </span>
84 84
                 <input
85 85
                   class="form-control"
@@ -95,7 +95,7 @@
95 95
               <label>Delivery Time (Minutes)</label>
96 96
               <div class="input-group-prepend">
97 97
                 <span class="input-group-text">
98
-                  <eva-icon name="clock-outline" fill="#24aae1"></eva-icon>
98
+                  <eva-icon name="clock-outline" fill="#6c757d"></eva-icon>
99 99
                 </span>
100 100
                 <input
101 101
                   class="form-control"
@@ -164,7 +164,7 @@
164 164
               <label>Shopping Centre</label>
165 165
               <div class="input-group-prepend">
166 166
                 <span class="input-group-text">
167
-                  <eva-icon name="shopping-cart-outline" fill="#24aae1"></eva-icon>
167
+                  <eva-icon name="shopping-cart-outline" fill="#6c757d"></eva-icon>
168 168
                 </span>
169 169
                 <input
170 170
                   class="form-control"
@@ -180,7 +180,7 @@
180 180
               <label>Shop Number</label>
181 181
               <div class="input-group-prepend">
182 182
                 <span class="input-group-text">
183
-                  <eva-icon name="hash-outline" fill="#24aae1"></eva-icon>
183
+                  <eva-icon name="hash-outline" fill="#6c757d"></eva-icon>
184 184
                 </span>
185 185
                 <input
186 186
                   class="form-control"
@@ -196,7 +196,7 @@
196 196
               <label>Street Number</label>
197 197
               <div class="input-group-prepend">
198 198
                 <span class="input-group-text">
199
-                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
199
+                  <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
200 200
                 </span>
201 201
                 <input
202 202
                   class="form-control"
@@ -213,7 +213,7 @@
213 213
               <label>Street Name</label>
214 214
               <div class="input-group-prepend">
215 215
                 <span class="input-group-text">
216
-                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
216
+                  <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
217 217
                 </span>
218 218
                 <input
219 219
                   class="form-control"
@@ -230,7 +230,7 @@
230 230
               <label>Suburb</label>
231 231
               <div class="input-group-prepend">
232 232
                 <span class="input-group-text">
233
-                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
233
+                  <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
234 234
                 </span>
235 235
                 <input
236 236
                   class="form-control"
@@ -247,7 +247,7 @@
247 247
               <label>City</label>
248 248
               <div class="input-group-prepend">
249 249
                 <span class="input-group-text">
250
-                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
250
+                  <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
251 251
                 </span>
252 252
                 <input
253 253
                   class="form-control"
@@ -264,7 +264,7 @@
264 264
               <label>Province</label>
265 265
               <div class="input-group-prepend">
266 266
                 <span class="input-group-text">
267
-                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
267
+                  <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
268 268
                 </span>
269 269
                 <input
270 270
                   class="form-control"
@@ -281,7 +281,7 @@
281 281
               <label>Postal Code</label>
282 282
               <div class="input-group-prepend">
283 283
                 <span class="input-group-text">
284
-                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
284
+                  <eva-icon name="navigation-2-outline" fill="#6c757d"></eva-icon>
285 285
                 </span>
286 286
                 <input
287 287
                   class="form-control"
@@ -298,12 +298,7 @@
298 298
         <div class="col-md-6" style="margin-bottomL 1em">
299 299
           <div class="row" style="text-align:left">
300 300
             <div class="col-md-4" style="margin-bottom: 1em">
301
-              <button
302
-                @click="ShowMap()"
303
-                class="btn btn-b-n"
304
-                type="button"
305
-                data-dismiss="modal"
306
-              >Update Address</button>
301
+              <b-button class="mt-2" @click="ShowMap()">Update Address</b-button>
307 302
             </div>
308 303
           </div>
309 304
           <Map :showAutoComplete="false" :showLocationLabel="false" :setLocation="mapCoords" />
@@ -311,10 +306,10 @@
311 306
       </div>
312 307
       <div class="row offset-md-5">
313 308
         <div class="col-md-2">
314
-          <button @click="Save()" class="btn btn-b-n" type="button" data-dismiss="modal">Save</button>
309
+          <b-button class="mt-2" @click="Save()">Save</b-button>
315 310
         </div>
316 311
         <div class="col-md-2">
317
-          <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">Close</button>
312
+          <b-button class="mt-2" @click="Close()">Close</b-button>
318 313
         </div>
319 314
       </div>
320 315
     </div>
@@ -387,7 +382,7 @@ export default {
387 382
     ListView,
388 383
     Categories,
389 384
     TradingHours,
390
-    ImageUploader
385
+    ImageUploader,
391 386
   },
392 387
   data() {
393 388
     return {
@@ -396,19 +391,19 @@ export default {
396 391
         "openingTime",
397 392
         "closingTime",
398 393
         "closed",
399
-        "opened24H"
394
+        "opened24H",
400 395
       ],
401 396
       wait: false,
402 397
       selectedMops: [],
403 398
       hasImage: false,
404
-      restaurantId: Log.restaurantId()
399
+      restaurantId: Log.restaurantId(),
405 400
     };
406 401
   },
407 402
   methods: {
408 403
     ...mapActions("restaurant", [
409 404
       "getRestaurant",
410 405
       "updateRestaurant",
411
-      "removeTradingHours"
406
+      "removeTradingHours",
412 407
     ]),
413 408
     Save() {
414 409
       this.wait = true;
@@ -428,10 +423,10 @@ export default {
428 423
       this.restaurant.methodsOfPayment = mops;
429 424
 
430 425
       this.updateRestaurant(this.restaurant)
431
-        .then(fulfilled => {
426
+        .then((fulfilled) => {
432 427
           this.$router.push("/");
433 428
         })
434
-        .catch(error => {
429
+        .catch((error) => {
435 430
           console.log(error.message);
436 431
         });
437 432
     },
@@ -481,10 +476,10 @@ export default {
481 476
     UpdateLogo() {
482 477
       this.$modal.show("loadImage");
483 478
     },
484
-    setImage: function(output) {
479
+    setImage: function (output) {
485 480
       this.$modal.hide("loadImage");
486 481
       this.restaurant.logo = output.dataUrl;
487
-    }
482
+    },
488 483
   },
489 484
   computed: {
490 485
     ...mapState("restaurant", ["restaurant"]),
@@ -492,7 +487,7 @@ export default {
492 487
     mapCoords() {
493 488
       var coords = {
494 489
         lat: this.restaurant.latitude,
495
-        lng: this.restaurant.longitude
490
+        lng: this.restaurant.longitude,
496 491
       };
497 492
       return coords;
498 493
     },
@@ -504,7 +499,7 @@ export default {
504 499
     },
505 500
     SavedMops() {
506 501
       this.selectedMops = this.restaurant.selectedMethodsOfPayments;
507
-    }
502
+    },
508 503
   },
509 504
   mounted() {
510 505
     this.wait = false;
@@ -513,7 +508,7 @@ export default {
513 508
   watch: {
514 509
     SavedMops() {
515 510
       alert("bla");
516
-    }
517
-  }
511
+    },
512
+  },
518 513
 };
519
-</script>
514
+</script>

+ 10
- 10
src/components/restaurants/restaurantMenuCateory.vue Visa fil

@@ -10,7 +10,7 @@
10 10
         <label>Description</label>
11 11
         <div class="input-group-prepend">
12 12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
13
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
14 14
           </span>
15 15
           <input class="form-control" type="text" name="description" v-model="category.description" />
16 16
         </div>
@@ -20,7 +20,7 @@
20 20
     <div class="row">
21 21
       <div class="col-md-12" style="margin-bottom: 1em">
22 22
         <div class="input-group-prepend">
23
-          <b-button class="btn btn-b-n" @click="Ok">Ok</b-button>
23
+          <b-button class="mt-2" @click="Ok">Ok</b-button>
24 24
         </div>
25 25
       </div>
26 26
     </div>
@@ -31,20 +31,20 @@
31 31
 export default {
32 32
   name: "Category",
33 33
   props: {
34
-    editCategory: { default: {} }
34
+    editCategory: { default: {} },
35 35
   },
36 36
   data() {
37 37
     return {
38 38
       category: {
39 39
         id: 0,
40
-        description: ""
41
-      }
40
+        description: "",
41
+      },
42 42
     };
43 43
   },
44 44
   methods: {
45 45
     Ok() {
46 46
       this.$emit("CategoryUpdate", this.category);
47
-    }
47
+    },
48 48
   },
49 49
   watch: {
50 50
     editCategory: {
@@ -53,8 +53,8 @@ export default {
53 53
         if (val) {
54 54
           this.category = val;
55 55
         }
56
-      }
57
-    }
58
-  }
56
+      },
57
+    },
58
+  },
59 59
 };
60
-</script>
60
+</script>

+ 25
- 27
src/components/restaurants/restaurantMenuItem.vue Visa fil

@@ -18,14 +18,10 @@
18 18
           <label>Category</label>
19 19
           <div class="input-group-prepend">
20 20
             <span class="input-group-text">
21
-              <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
21
+              <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
22 22
             </span>
23 23
             <select class="form-control" v-model="menuItem.category">
24
-              <option v-for="(cat, i) in categories" :key="i">
25
-                {{
26
-                cat.description
27
-                }}
28
-              </option>
24
+              <option v-for="(cat, i) in categories" :key="i">{{ cat.description }}</option>
29 25
             </select>
30 26
           </div>
31 27
         </div>
@@ -35,7 +31,7 @@
35 31
           <label>Name</label>
36 32
           <div class="input-group-prepend">
37 33
             <span class="input-group-text">
38
-              <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
34
+              <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
39 35
             </span>
40 36
             <input class="form-control" type="text" v-model="menuItem.name" />
41 37
           </div>
@@ -46,7 +42,7 @@
46 42
           <label>Description</label>
47 43
           <div class="input-group-prepend">
48 44
             <span class="input-group-text">
49
-              <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
45
+              <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
50 46
             </span>
51 47
             <input class="form-control" type="text" v-model="menuItem.description" />
52 48
           </div>
@@ -56,8 +52,8 @@
56 52
         <div class="col-md-6" style="margin-bottom: 1em">
57 53
           <label>Price</label>
58 54
           <div class="input-group-prepend">
59
-            <span class="input-group-text">
60
-              <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
55
+            <span class="input-group-text" style="color:#6c757d">
56
+              <b>R</b>
61 57
             </span>
62 58
             <input class="form-control" type="number" v-model="menuItem.price" />
63 59
           </div>
@@ -94,7 +90,7 @@
94 90
           <img :src="menuItem.image" style="height:100px; width:100px; object-fit: cover;" />
95 91
           <br />
96 92
           <span class="input-group-text" align="center" style="width:100px" @click="removeImage()">
97
-            <eva-icon name="trash-2-outline" fill="#24aae1"></eva-icon>Delete
93
+            <eva-icon name="trash-2-outline" fill="#6c757d"></eva-icon>Delete
98 94
           </span>
99 95
         </div>
100 96
       </div>
@@ -110,11 +106,13 @@
110 106
               :checked="menuItem.overrideOptions"
111 107
               @change="selectionChanged"
112 108
             />
113
-            <label
114
-              class="custom-control-label"
115
-              for="thCloseSwitch"
116
-              style="margin-left: 40px"
117
-            >{{menuItem.overrideOptions ? 'Yes - This will override any menu options set on the category' : 'No - This will append category options to the below options'}}</label>
109
+            <label class="custom-control-label" for="thCloseSwitch" style="margin-left: 40px">
110
+              {{
111
+              menuItem.overrideOptions
112
+              ? "Yes - This will override any menu options set on the category"
113
+              : "No - This will append category options to the below options"
114
+              }}
115
+            </label>
118 116
           </div>
119 117
         </div>
120 118
       </div>
@@ -134,10 +132,10 @@
134 132
         <div class="col-md-12" style="margin-bottomL 1em">
135 133
           <div class="row offset-md-5">
136 134
             <div class="col-md-2">
137
-              <button @click="Save()" class="btn btn-b-n" type="button" data-dismiss="modal">Save</button>
135
+              <b-button class="mt-2" @click="Save()">Save</b-button>
138 136
             </div>
139 137
             <div class="col-md-2">
140
-              <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">Close</button>
138
+              <b-button class="mt-2" @click="Close()">Close</b-button>
141 139
             </div>
142 140
           </div>
143 141
         </div>
@@ -162,7 +160,7 @@ export default {
162 160
   components: {
163 161
     ImageUploader,
164 162
     ListView,
165
-    ItemOption
163
+    ItemOption,
166 164
   },
167 165
   data() {
168 166
     return {
@@ -170,7 +168,7 @@ export default {
170 168
       hasImage: false,
171 169
       restaurantId: Log.restaurantId(),
172 170
       showOption: false,
173
-      menuOption: {}
171
+      menuOption: {},
174 172
     };
175 173
   },
176 174
   methods: {
@@ -181,20 +179,20 @@ export default {
181 179
       this.menuItem.restaurantId = this.restaurantId;
182 180
       if (this.menuItem.category !== "") {
183 181
         var category = this.categories.find(
184
-          c => c.description === this.menuItem.category
182
+          (c) => c.description === this.menuItem.category
185 183
         );
186 184
         this.menuItem.categoryId = category.id;
187 185
       }
188 186
       console.log(JSON.stringify(this.menuItem));
189 187
 
190
-      this.insertMenuItem(this.menuItem).then(fulfilled => {
188
+      this.insertMenuItem(this.menuItem).then((fulfilled) => {
191 189
         this.$router.push("/RestaurantMenu");
192 190
       });
193 191
     },
194 192
     Close() {
195 193
       this.$router.push("/RestaurantMenu");
196 194
     },
197
-    setImage: function(output) {
195
+    setImage: function (output) {
198 196
       this.hasImage = true;
199 197
       this.menuItem.image = output.dataUrl;
200 198
     },
@@ -221,20 +219,20 @@ export default {
221 219
       if (item) {
222 220
         this.showOption = false;
223 221
       }
224
-    }
222
+    },
225 223
   },
226 224
   computed: {
227 225
     ...mapState("menuCategories", ["categories"]),
228 226
     ...mapState("menu", ["menuItem"]),
229 227
     CurrentOption() {
230 228
       return this.menuOption;
231
-    }
229
+    },
232 230
   },
233 231
   mounted() {
234 232
     this.wait = true;
235 233
     this.getCategories(this.restaurantId);
236 234
     this.getMenuItem(this.$route.params.itemid);
237 235
     this.wait = false;
238
-  }
236
+  },
239 237
 };
240
-</script>
238
+</script>

+ 25
- 21
src/components/restaurants/restaurantMenuItemOptions.vue Visa fil

@@ -10,7 +10,7 @@
10 10
         <label>Description</label>
11 11
         <div class="input-group-prepend">
12 12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
13
+            <eva-icon name="credit-card-outline" fill="#6c757d"></eva-icon>
14 14
           </span>
15 15
           <input class="form-control" type="text" v-model="menuOption.description" />
16 16
         </div>
@@ -21,10 +21,14 @@
21 21
         <label>Option Type</label>
22 22
         <div class="input-group-prepend">
23 23
           <span class="input-group-text">
24
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
24
+            <eva-icon name="credit-card-outline" fill="#6c757d"></eva-icon>
25 25
           </span>
26 26
           <select class="form-control" v-model="menuOption.optionType">
27
-            <option v-for="item in optionTypes" :value="item.id" :key="item.id">{{item.description}}</option>
27
+            <option v-for="item in optionTypes" :value="item.id" :key="item.id">
28
+              {{
29
+              item.description
30
+              }}
31
+            </option>
28 32
           </select>
29 33
         </div>
30 34
       </div>
@@ -32,7 +36,7 @@
32 36
         <label>Option Limit</label>
33 37
         <div class="input-group-prepend">
34 38
           <span class="input-group-text">
35
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
39
+            <eva-icon name="credit-card-outline" fill="#6c757d"></eva-icon>
36 40
           </span>
37 41
           <input class="form-control" type="number" v-model="menuOption.optionLimit" />
38 42
         </div>
@@ -50,11 +54,11 @@
50 54
             :checked="menuOption.isBasePrice"
51 55
             @change="selectionChanged"
52 56
           />
53
-          <label
54
-            class="custom-control-label"
55
-            for="thCloseSwitch"
56
-            style="margin-left: 40px"
57
-          >{{menuOption.isBasePrice ? 'Yes' : 'No'}}</label>
57
+          <label class="custom-control-label" for="thCloseSwitch" style="margin-left: 40px">
58
+            {{
59
+            menuOption.isBasePrice ? "Yes" : "No"
60
+            }}
61
+          </label>
58 62
         </div>
59 63
       </div>
60 64
     </div>
@@ -63,7 +67,7 @@
63 67
         <label>Rank</label>
64 68
         <div class="input-group-prepend">
65 69
           <span class="input-group-text">
66
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
70
+            <eva-icon name="credit-card-outline" fill="#6c757d"></eva-icon>
67 71
           </span>
68 72
           <input class="form-control" type="number" v-model="menuOption.rank" />
69 73
         </div>
@@ -92,10 +96,10 @@
92 96
       <div class="col-md-12" style="margin-bottomL 1em">
93 97
         <div class="row offset-md-5">
94 98
           <div class="col-md-2">
95
-            <button @click="Save()" class="btn btn-b-n" type="button" data-dismiss="modal">Save</button>
99
+            <b-button class="mt-2" @click="Save()">Save</b-button>
96 100
           </div>
97 101
           <div class="col-md-2">
98
-            <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">Close</button>
102
+            <b-button class="mt-2" @click="Close()">Close</b-button>
99 103
           </div>
100 104
         </div>
101 105
       </div>
@@ -114,10 +118,10 @@ export default {
114 118
   name: "MenuOption",
115 119
   components: {
116 120
     ListView,
117
-    OptionItem
121
+    OptionItem,
118 122
   },
119 123
   props: {
120
-    menuOption: { default: {} }
124
+    menuOption: { default: {} },
121 125
   },
122 126
   data() {
123 127
     return {
@@ -127,7 +131,7 @@ export default {
127 131
       columns: ["description", "price", "rank"],
128 132
       wait: false,
129 133
       restaurantId: Log.restaurantId(),
130
-      menuItemId: 0
134
+      menuItemId: 0,
131 135
     };
132 136
   },
133 137
   methods: {
@@ -180,10 +184,10 @@ export default {
180 184
 
181 185
       this.$modal.hide("OptionItem");
182 186
       this.isEdit = false;
183
-    }
187
+    },
184 188
   },
185 189
   computed: {
186
-    ...mapState("menuOptions", ["optionTypes"])
190
+    ...mapState("menuOptions", ["optionTypes"]),
187 191
   },
188 192
   mounted() {
189 193
     this.wait = false;
@@ -196,8 +200,8 @@ export default {
196 200
         if (val) {
197 201
           this.menuOption = val;
198 202
         }
199
-      }
200
-    }
201
-  }
203
+      },
204
+    },
205
+  },
202 206
 };
203
-</script>
207
+</script>

+ 27
- 39
src/components/restaurants/restaurantMenuOption.vue Visa fil

@@ -10,15 +10,11 @@
10 10
         <label>Menu Category</label>
11 11
         <div class="input-group-prepend">
12 12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
13
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
14 14
           </span>
15 15
           <select class="form-control" v-model="menuOption.categoryDescription">
16 16
             <option>All</option>
17
-            <option v-for="(cat, i) in categories" :key="i">
18
-              {{
19
-              cat.description
20
-              }}
21
-            </option>
17
+            <option v-for="(cat, i) in categories" :key="i">{{ cat.description }}</option>
22 18
           </select>
23 19
         </div>
24 20
       </div>
@@ -28,7 +24,7 @@
28 24
         <label>Description</label>
29 25
         <div class="input-group-prepend">
30 26
           <span class="input-group-text">
31
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
27
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
32 28
           </span>
33 29
           <input class="form-control" type="text" v-model="menuOption.description" />
34 30
         </div>
@@ -39,10 +35,14 @@
39 35
         <label>Option Type</label>
40 36
         <div class="input-group-prepend">
41 37
           <span class="input-group-text">
42
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
38
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
43 39
           </span>
44 40
           <select class="form-control" v-model="menuOption.optionType">
45
-            <option v-for="item in optionTypes" :value="item.id" :key="item.id">{{item.description}}</option>
41
+            <option v-for="item in optionTypes" :value="item.id" :key="item.id">
42
+              {{
43
+              item.description
44
+              }}
45
+            </option>
46 46
           </select>
47 47
         </div>
48 48
       </div>
@@ -50,7 +50,7 @@
50 50
         <label>Option Limit</label>
51 51
         <div class="input-group-prepend">
52 52
           <span class="input-group-text">
53
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
53
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
54 54
           </span>
55 55
           <input class="form-control" type="number" v-model="menuOption.optionLimit" />
56 56
         </div>
@@ -68,11 +68,11 @@
68 68
             :checked="menuOption.isBasePrice"
69 69
             @change="selectionChanged"
70 70
           />
71
-          <label
72
-            class="custom-control-label"
73
-            for="thCloseSwitch"
74
-            style="margin-left: 40px"
75
-          >{{menuOption.isBasePrice ? 'Yes' : 'No'}}</label>
71
+          <label class="custom-control-label" for="thCloseSwitch" style="margin-left: 40px">
72
+            {{
73
+            menuOption.isBasePrice ? "Yes" : "No"
74
+            }}
75
+          </label>
76 76
         </div>
77 77
       </div>
78 78
     </div>
@@ -81,7 +81,7 @@
81 81
         <label>Rank</label>
82 82
         <div class="input-group-prepend">
83 83
           <span class="input-group-text">
84
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
84
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
85 85
           </span>
86 86
           <input class="form-control" type="number" v-model="menuOption.rank" />
87 87
         </div>
@@ -110,22 +110,10 @@
110 110
       <div class="col-md-12" style="margin-bottomL 1em">
111 111
         <div class="row offset-md-5">
112 112
           <div class="col-md-2">
113
-            <button
114
-              @click="Save()"
115
-              class="btn btn-b-n"
116
-              type="button"
117
-              data-dismiss="modal"
118
-              name="SaveButton"
119
-            >Save</button>
113
+            <b-button class="mt-2" @click="Save()">Save</b-button>
120 114
           </div>
121 115
           <div class="col-md-2">
122
-            <button
123
-              @click="Close()"
124
-              class="btn btn-b-n"
125
-              type="button"
126
-              data-dismiss="modal"
127
-              name="CloseButton"
128
-            >Close</button>
116
+            <b-button class="mt-2" @click="Close()">Close</b-button>
129 117
           </div>
130 118
         </div>
131 119
       </div>
@@ -144,7 +132,7 @@ export default {
144 132
   name: "MenuOption",
145 133
   components: {
146 134
     ListView,
147
-    OptionItem
135
+    OptionItem,
148 136
   },
149 137
   data() {
150 138
     return {
@@ -154,7 +142,7 @@ export default {
154 142
       columns: ["description", "price", "rank"],
155 143
       wait: false,
156 144
       restaurantId: Log.restaurantId(),
157
-      menuItemId: 0
145
+      menuItemId: 0,
158 146
     };
159 147
   },
160 148
   methods: {
@@ -163,7 +151,7 @@ export default {
163 151
       "deleteMenuOptionItem",
164 152
       "addMenuOption",
165 153
       "updateMenuOption",
166
-      "getOptionTypes"
154
+      "getOptionTypes",
167 155
     ]),
168 156
     ...mapActions("menuCategories", ["getCategories"]),
169 157
     selectionChanged() {
@@ -177,7 +165,7 @@ export default {
177 165
       this.menuOption.restaurantId = this.restaurantId;
178 166
       if (this.menuOption.categoryDescription !== "All") {
179 167
         var category = this.categories.find(
180
-          c => c.description === this.menuOption.categoryDescription
168
+          (c) => c.description === this.menuOption.categoryDescription
181 169
         );
182 170
         this.menuOption.categoryId = category.id;
183 171
       } else {
@@ -185,7 +173,7 @@ export default {
185 173
       }
186 174
       alert(JSON.stringify(this.menuOption));
187 175
       if (this.menuOption.id === 0) {
188
-        this.addMenuOption(this.menuOption).then(result => {
176
+        this.addMenuOption(this.menuOption).then((result) => {
189 177
           this.$router.push("/MenuOptions");
190 178
         });
191 179
       } else {
@@ -213,11 +201,11 @@ export default {
213 201
 
214 202
       this.$modal.hide("OptionItem");
215 203
       this.isEdit = false;
216
-    }
204
+    },
217 205
   },
218 206
   computed: {
219 207
     ...mapState("menuOptions", ["menuOption", "optionTypes"]),
220
-    ...mapState("menuCategories", ["categories"])
208
+    ...mapState("menuCategories", ["categories"]),
221 209
   },
222 210
   mounted() {
223 211
     this.wait = false;
@@ -225,6 +213,6 @@ export default {
225 213
     this.getMenuOption(this.$route.params.optionid);
226 214
     this.menuItemId = this.$route.params.menuItemId;
227 215
     this.getOptionTypes();
228
-  }
216
+  },
229 217
 };
230
-</script>
218
+</script>

+ 13
- 13
src/components/restaurants/restaurantMenuOptionItem.vue Visa fil

@@ -10,7 +10,7 @@
10 10
         <label>Description</label>
11 11
         <div class="input-group-prepend">
12 12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
13
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
14 14
           </span>
15 15
           <input
16 16
             class="form-control"
@@ -26,7 +26,7 @@
26 26
         <label>Price</label>
27 27
         <div class="input-group-prepend">
28 28
           <span class="input-group-text">
29
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
29
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
30 30
           </span>
31 31
           <input
32 32
             class="form-control"
@@ -42,7 +42,7 @@
42 42
         <label>Rank</label>
43 43
         <div class="input-group-prepend">
44 44
           <span class="input-group-text">
45
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
45
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
46 46
           </span>
47 47
           <input
48 48
             class="form-control"
@@ -57,7 +57,7 @@
57 57
     <div class="row">
58 58
       <div class="col-md-12" style="margin-bottom: 1em">
59 59
         <div class="input-group-prepend">
60
-          <b-button class="btn btn-b-n" @click="Ok">Ok</b-button>
60
+          <b-button class="mt-2" @click="Ok">Ok</b-button>
61 61
         </div>
62 62
       </div>
63 63
     </div>
@@ -70,10 +70,10 @@ import ImageUploader from "vue-image-upload-resize";
70 70
 export default {
71 71
   name: "MenuOptionItem",
72 72
   props: {
73
-    editMenuOptionItem: { default: {} }
73
+    editMenuOptionItem: { default: {} },
74 74
   },
75 75
   components: {
76
-    ImageUploader
76
+    ImageUploader,
77 77
   },
78 78
   data() {
79 79
     return {
@@ -83,14 +83,14 @@ export default {
83 83
         description: "",
84 84
         price: 0,
85 85
         rank: 0,
86
-        menuOptionId: 0
87
-      }
86
+        menuOptionId: 0,
87
+      },
88 88
     };
89 89
   },
90 90
   methods: {
91 91
     Ok() {
92 92
       this.$emit("MenuItemUpdated", this.menuOptionItem);
93
-    }
93
+    },
94 94
   },
95 95
   watch: {
96 96
     editMenuOptionItem: {
@@ -99,8 +99,8 @@ export default {
99 99
         if (val) {
100 100
           this.menuOptionItem = val;
101 101
         }
102
-      }
103
-    }
104
-  }
102
+      },
103
+    },
104
+  },
105 105
 };
106
-</script>
106
+</script>

+ 4
- 4
src/components/restaurants/restaurantRole.vue Visa fil

@@ -10,7 +10,7 @@
10 10
         <label>Role Name</label>
11 11
         <div class="input-group-prepend">
12 12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
13
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
14 14
           </span>
15 15
           <input class="form-control" type="text" name="description" v-model="role.roleName" />
16 16
         </div>
@@ -95,10 +95,10 @@
95 95
       <div class="col-md-12" style="margin-bottomL 1em">
96 96
         <div class="row offset-md-5">
97 97
           <div class="col-md-2">
98
-            <button @click="Save()" class="btn btn-b-n" type="button" data-dismiss="modal">Save</button>
98
+            <b-button class="mt-2" @click="Save()">Save</b-button>
99 99
           </div>
100 100
           <div class="col-md-2">
101
-            <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">Close</button>
101
+            <b-button class="mt-2" @click="Close()">Close</b-button>
102 102
           </div>
103 103
         </div>
104 104
       </div>
@@ -213,4 +213,4 @@ export default {
213 213
     this.getRole(this.$route.params.id);
214 214
   },
215 215
 };
216
-</script>
216
+</script>

+ 12
- 12
src/components/restaurants/restaurantUser.vue Visa fil

@@ -10,7 +10,7 @@
10 10
         <label>Email</label>
11 11
         <div class="input-group-prepend">
12 12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
13
+            <eva-icon name="email-outline" fill="#6c757d"></eva-icon>
14 14
           </span>
15 15
           <input class="form-control" type="text" name="description" v-model="user.emailAddress" />
16 16
         </div>
@@ -21,7 +21,7 @@
21 21
         <label>First Name</label>
22 22
         <div class="input-group-prepend">
23 23
           <span class="input-group-text">
24
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
24
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
25 25
           </span>
26 26
           <input class="form-control" type="text" name="description" v-model="user.firstName" />
27 27
         </div>
@@ -32,7 +32,7 @@
32 32
         <label>Surname</label>
33 33
         <div class="input-group-prepend">
34 34
           <span class="input-group-text">
35
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
35
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
36 36
           </span>
37 37
           <input class="form-control" type="text" name="description" v-model="user.surname" />
38 38
         </div>
@@ -43,7 +43,7 @@
43 43
         <label>Cellphone</label>
44 44
         <div class="input-group-prepend">
45 45
           <span class="input-group-text">
46
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
46
+            <eva-icon name="phone-call-outline" fill="#6c757d"></eva-icon>
47 47
           </span>
48 48
           <input class="form-control" type="text" name="description" v-model="user.cellphone" />
49 49
         </div>
@@ -53,7 +53,7 @@
53 53
     <div class="row">
54 54
       <div class="col-md-12" style="margin-bottom: 1em">
55 55
         <div class="input-group-prepend">
56
-          <b-button class="btn btn-b-n" @click="Ok">Ok</b-button>
56
+          <b-button class="mt-2" @click="Ok()">Ok</b-button>
57 57
         </div>
58 58
       </div>
59 59
     </div>
@@ -64,18 +64,18 @@
64 64
 export default {
65 65
   name: "RestaurantUser",
66 66
   props: {
67
-    editUser: { default: {} }
67
+    editUser: { default: {} },
68 68
   },
69 69
   data() {
70 70
     return {
71 71
       hasImage: false,
72
-      user: {}
72
+      user: {},
73 73
     };
74 74
   },
75 75
   methods: {
76 76
     Ok() {
77 77
       this.$emit("UpdateUser", this.user);
78
-    }
78
+    },
79 79
   },
80 80
   watch: {
81 81
     editUser: {
@@ -84,8 +84,8 @@ export default {
84 84
         if (val) {
85 85
           this.user = val;
86 86
         }
87
-      }
88
-    }
89
-  }
87
+      },
88
+    },
89
+  },
90 90
 };
91
-</script>
91
+</script>

+ 11
- 11
src/components/restaurants/rolePremission.vue Visa fil

@@ -10,7 +10,7 @@
10 10
         <label>Target</label>
11 11
         <div class="input-group-prepend">
12 12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
13
+            <eva-icon name="edit-2-outline" fill="#6c757d"></eva-icon>
14 14
           </span>
15 15
           <select class="form-control" v-model="role.target">
16 16
             <option value="Select"></option>
@@ -29,7 +29,7 @@
29 29
       <div class="col-md-2" style="margin-bottom: 1em">
30 30
         <label>Navigation</label>
31 31
         <div class="input-group-prepend">
32
-          <input style="margin-left: 1px" type="checkbox" v-model="role.navigate" />
32
+          <input style="margin-left: 1px;" type="checkbox" v-model="role.navigate" />
33 33
         </div>
34 34
       </div>
35 35
       <div class="col-md-2" style="margin-bottom: 1em">
@@ -62,7 +62,7 @@
62 62
     <div class="row">
63 63
       <div class="col-md-12" style="margin-bottom: 1em">
64 64
         <div class="input-group-prepend">
65
-          <b-button class="btn btn-b-n" @click="Ok">Ok</b-button>
65
+          <b-button class="mt-2" @click="Ok">Ok</b-button>
66 66
         </div>
67 67
       </div>
68 68
     </div>
@@ -74,20 +74,20 @@ import ListView from "../shared/listView";
74 74
 export default {
75 75
   name: "Role",
76 76
   props: {
77
-    role: { default: {} }
77
+    role: { default: {} },
78 78
   },
79 79
   components: {
80
-    ListView
80
+    ListView,
81 81
   },
82 82
   data() {
83 83
     return {
84
-      wait: false
84
+      wait: false,
85 85
     };
86 86
   },
87 87
   methods: {
88 88
     Ok() {
89 89
       this.$emit("UpdatePrems", this.role);
90
-    }
90
+    },
91 91
   },
92 92
   watch: {
93 93
     role: {
@@ -96,8 +96,8 @@ export default {
96 96
         if (val) {
97 97
           this.role = val;
98 98
         }
99
-      }
100
-    }
101
-  }
99
+      },
100
+    },
101
+  },
102 102
 };
103
-</script>
103
+</script>

+ 4
- 2
src/components/shared/autoComplete.vue Visa fil

@@ -7,7 +7,9 @@
7 7
         :key="i"
8 8
         class="autocomplete-result"
9 9
         @click="setResult(result)"
10
-      >{{ result }}</li>
10
+      >
11
+        {{ result }}
12
+      </li>
11 13
     </ul>
12 14
   </div>
13 15
 </template>
@@ -73,7 +75,7 @@ export default {
73 75
 }
74 76
 
75 77
 .autocomplete-result:hover {
76
-  background-color: #24aae1;
78
+  background-color: #6c757d;
77 79
   color: white;
78 80
 }
79 81
 </style>

+ 4
- 4
src/components/shared/basePaginationItem.vue Visa fil

@@ -13,15 +13,15 @@ export default {
13 13
   props: {
14 14
     pageNumber: {
15 15
       type: Number,
16
-      required: true
16
+      required: true,
17 17
     },
18
-    isCurrentPage: undefined
18
+    isCurrentPage: undefined,
19 19
   },
20 20
   methods: {
21 21
     onClick() {
22 22
       this.$emit("loadPage", this.pageNumber);
23
-    }
24
-  }
23
+    },
24
+  },
25 25
 };
26 26
 </script>
27 27
 <style scoped>

+ 1
- 1
src/components/shared/checkItem.vue Visa fil

@@ -17,7 +17,7 @@ export default {
17 17
   },
18 18
   methods: {
19 19
     checkItem() {
20
-      this.$emit('checkItem', this.title, !this.show);
20
+      this.$emit("checkItem", this.title, !this.show);
21 21
     },
22 22
   },
23 23
   computed: {

+ 14
- 27
src/components/shared/fieldEditor.vue Visa fil

@@ -6,9 +6,9 @@
6 6
         v-if="mayEdit"
7 7
         @click="EditClick()"
8 8
         class="input-group-text spanCursor"
9
-        style="color: #24aae1"
9
+        style="color: #6c757d"
10 10
       >
11
-        <eva-icon name="edit-outline" fill="#24aae1"></eva-icon>
11
+        <eva-icon name="edit-outline" fill="#6c757d"></eva-icon>
12 12
       </span>
13 13
     </div>
14 14
     <div v-if="edit" class="input-group-prepend">
@@ -21,7 +21,8 @@
21 21
           v-for="option in selectOptions"
22 22
           :value="option[selectValue]"
23 23
           :key="option[selectValue]"
24
-        >{{ option[selectText] }}</option>
24
+          >{{ option[selectText] }}</option
25
+        >
25 26
       </select>
26 27
       <select v-if="type === 'selectlist'" class="form-control" v-model="value">
27 28
         <option v-for="item in selectOptions" :value="item" :key="item">{{ item }}</option>
@@ -31,12 +32,12 @@
31 32
         v-if="edit"
32 33
         @click="UpdateValue()"
33 34
         class="input-group-text spanCursor"
34
-        style="color: #24aae1"
35
+        style="color: #6c757d"
35 36
       >
36
-        <eva-icon name="checkmark-outline" fill="#24aae1"></eva-icon>
37
+        <eva-icon name="checkmark-outline" fill="#6c757d"></eva-icon>
37 38
       </span>
38
-      <span v-if="edit" @click="Close()" class="input-group-text spanCursor" style="color: #24aae1">
39
-        <eva-icon name="close-outline" fill="#24aae1"></eva-icon>
39
+      <span v-if="edit" @click="Close()" class="input-group-text spanCursor" style="color: #6c757d">
40
+        <eva-icon name="close-outline" fill="#6c757d"></eva-icon>
40 41
       </span>
41 42
     </div>
42 43
   </div>
@@ -44,15 +45,7 @@
44 45
 
45 46
 <script>
46 47
 export default {
47
-  props: [
48
-    "value",
49
-    "type",
50
-    "mayEdit",
51
-    "selectOptions",
52
-    "selectValue",
53
-    "selectText",
54
-    "display"
55
-  ],
48
+  props: ["value", "type", "mayEdit", "selectOptions", "selectValue", "selectText", "display"],
56 49
   data() {
57 50
     return {
58 51
       edit: false,
@@ -76,19 +69,13 @@ export default {
76 69
     selectionClick(item) {
77 70
       if (item.target.options.selectedIndex > 0) {
78 71
         if (!this.value) {
79
-          this.myDisplay = this.selectOptions[
80
-            item.target.options.selectedIndex - 1
81
-          ][this.selectText];
72
+          this.myDisplay = this.selectOptions[item.target.options.selectedIndex - 1][
73
+            this.selectText
74
+          ];
82 75
         }
83 76
         if (this.selectOptions[item.target.options.selectedIndex - 1]) {
84
-          this.$emit(
85
-            "input",
86
-            this.selectOptions[item.target.options.selectedIndex - 1]
87
-          );
88
-          this.$emit(
89
-            "change",
90
-            this.selectOptions[item.target.options.selectedIndex - 1]
91
-          );
77
+          this.$emit("input", this.selectOptions[item.target.options.selectedIndex - 1]);
78
+          this.$emit("change", this.selectOptions[item.target.options.selectedIndex - 1]);
92 79
         }
93 80
       }
94 81
     }

+ 12
- 2
src/components/shared/home.vue Visa fil

@@ -2,6 +2,14 @@
2 2
   <div class="container">
3 3
     <div class="form-group row">
4 4
       <div class="col-md-10 offset-md-1">
5
+        <!-- <b-tabs class="nav nav-pills-a nav-pills mb-3 section-t3">
6
+          <b-tab title="Restaurants" active
7
+            ><b-card-text><Cards /></b-card-text
8
+          ></b-tab>
9
+          <b-tab title="Categories" lazy
10
+            ><b-card-text><Categories /></b-card-text
11
+          ></b-tab>
12
+        </b-tabs> -->
5 13
         <ul class="nav nav-pills-a nav-pills mb-3 section-t3" id="pills-tab" role="tablist">
6 14
           <li class="nav-item">
7 15
             <a
@@ -12,7 +20,8 @@
12 20
               role="tab"
13 21
               aria-controls="pills-video"
14 22
               aria-selected="true"
15
-            >Restaurants</a>
23
+              >Restaurants</a
24
+            >
16 25
           </li>
17 26
           <li class="nav-item">
18 27
             <a
@@ -23,7 +32,8 @@
23 32
               role="tab"
24 33
               aria-controls="pills-plans"
25 34
               aria-selected="false"
26
-            >Categories</a>
35
+              >Categories</a
36
+            >
27 37
           </li>
28 38
         </ul>
29 39
         <div class="tab-content" id="pills-tabContent">

+ 1
- 1
src/components/shared/imageLoader.vue Visa fil

@@ -21,7 +21,7 @@
21 21
         <img :src="img" style="height:200px; width:150px; object-fit: cover;" />
22 22
         <br />
23 23
         <span class="input-group-text" align="center" style="width:150px" @click="removeImage(key)">
24
-          <eva-icon name="trash-2-outline" fill="#24aae1"></eva-icon>Delete
24
+          <eva-icon name="trash-2-outline" fill="#6c757d"></eva-icon>Delete
25 25
         </span>
26 26
       </div>
27 27
       <br />

+ 49
- 53
src/components/shared/listView.vue Visa fil

@@ -11,11 +11,8 @@
11 11
       <div class="p-2">
12 12
         <div class="d-flex flex-row">
13 13
           <div class="p2" v-if="showColumnChooser">
14
-            <div
15
-              class="btn btn-primary myBackground btn-width cursor-pointer"
16
-              data-toggle="modal"
17
-              data-target="#myModal"
18
-            >Column Chooser</div>
14
+            <!-- <div class="mt-2" data-toggle="modal" data-target="#myModal">Column Chooser</div> -->
15
+            <b-button class="mt-2" data-toggle="modal" data-target="#myModal">Column Chooser</b-button>
19 16
             <div class="col-md-12">
20 17
               <div id="myModal" class="modal fade" role="dialog">
21 18
                 <div class="modal-dialog modal-lg">
@@ -23,7 +20,8 @@
23 20
                   <div class="modal-content">
24 21
                     <div class="modal-header">
25 22
                       <h5>Column Chooser</h5>
26
-                      <button type="button" class="close" data-dismiss="modal">&times;</button>
23
+                      <!-- <button type="button" class="close" data-dismiss="modal">&times;</button> -->
24
+                      <b-button class="mt-2" data-dismiss="modal">&times;</b-button>
27 25
                     </div>
28 26
                     <div style="margin-left:50px; margin-right:50px;margin-bottom:50px;">
29 27
                       <ListViewControl :items="allColumn" @checkItem="checkItem" />
@@ -34,13 +32,10 @@
34 32
             </div>
35 33
           </div>
36 34
           <div class="p2" v-if="selectedItems.length > 0">
37
-            <div
38
-              class="btn btn-primary myBackground btn-width cursor-pointer"
39
-              @click="onClearSelected()"
40
-            >Clear Selected</div>
35
+            <b-button class="mt-2" @click="onClearSelected()">Clear Selected</b-button>
41 36
           </div>
42 37
           <div class="p2" v-if="showNew">
43
-            <div class="btn btn-primary myBackground btn-width cursor-pointer" @click="onNew()">New</div>
38
+            <b-button class="mt-2" @click="onNew()">New</b-button>
44 39
           </div>
45 40
         </div>
46 41
       </div>
@@ -179,7 +174,7 @@ export default {
179 174
   components: {
180 175
     BasePagination,
181 176
     Alert,
182
-    ListViewControl
177
+    ListViewControl,
183 178
   },
184 179
   mounted() {
185 180
     if (this.itemsPerPageList && this.itemsPerPageList.length > 0) {
@@ -190,75 +185,75 @@ export default {
190 185
   },
191 186
   props: {
192 187
     compact: {
193
-      default: true
188
+      default: true,
194 189
     },
195 190
     allowSelect: {
196
-      default: true
191
+      default: true,
197 192
     },
198 193
     allowMultipleSelect: {
199
-      default: false
194
+      default: false,
200 195
     },
201 196
     hideSearch: {
202
-      default: false
197
+      default: false,
203 198
     },
204 199
     showNew: {
205
-      default: true
200
+      default: true,
206 201
     },
207 202
     items: undefined,
208 203
     editable: {
209
-      default: false
204
+      default: false,
210 205
     },
211 206
     deleteable: {
212
-      default: false
207
+      default: false,
213 208
     },
214 209
     columnCount: {
215
-      default: 6
210
+      default: 6,
216 211
     },
217 212
     showPager: {
218
-      default: true
213
+      default: true,
219 214
     },
220 215
     title: {
221
-      default: undefined
216
+      default: undefined,
222 217
     },
223 218
     sortKey: {
224
-      default: "id"
219
+      default: "id",
225 220
     },
226 221
     hideItemCount: {
227
-      default: false
222
+      default: false,
228 223
     },
229 224
     currentPage: {
230
-      default: 1
225
+      default: 1,
231 226
     },
232 227
     bordered: {
233
-      default: true
228
+      default: true,
234 229
     },
235 230
     striped: {
236
-      default: true
231
+      default: true,
237 232
     },
238 233
     showColumnChooser: {
239
-      default: true
234
+      default: true,
240 235
     },
241 236
     displayColumns: {
242 237
       type: Array,
243
-      default: () => []
238
+      default: () => [],
244 239
     },
245 240
     displayFormats: {
246 241
       type: Array,
247
-      default: () => []
242
+      default: () => [],
248 243
     },
249 244
     displayHeaders: {
250 245
       type: Array,
251
-      default: () => []
246
+      default: () => [],
252 247
     },
253 248
     showCustomAction: {
254
-      default: false
249
+      default: false,
255 250
     },
256 251
     CustomActionHeading: {
257
-      default: ""
252
+      default: "",
258 253
     },
259 254
     CustomActionCondition: {
260
-      default: ""
261
-    }
255
+      default: "",
256
+    },
262 257
   },
263 258
   data() {
264 259
     return {
@@ -270,7 +265,7 @@ export default {
270 265
       visibleItemsPerPageCount: 20,
271 266
       itemsPerPageList: ItemsPerPageList,
272 267
       visibleColumn: [],
273
-      allColumn: []
268
+      allColumn: [],
274 269
     };
275 270
   },
276 271
   methods: {
@@ -296,10 +291,11 @@ export default {
296 291
               !Array.isArray(Object.values(item)[o])
297 292
             ) {
298 293
               const columnName = Object.keys(item)[o];
299
-              if (!listAll.some(x => x.column === columnName)) {
294
+              if (!listAll.some((x) => x.column === columnName)) {
300 295
                 listAll.push({
301 296
                   column: columnName,
302
-                  show: _.filter(listAll, x => x.show).length < this.columnCount
297
+                  show:
298
+                    _.filter(listAll, (x) => x.show).length < this.columnCount,
303 299
                 });
304 300
               }
305 301
             }
@@ -314,7 +310,7 @@ export default {
314 310
     },
315 311
     isSelected(i) {
316 312
       const ind = this.getActualIndex(i);
317
-      return _.some(this.selectedItems, x => x === ind);
313
+      return _.some(this.selectedItems, (x) => x === ind);
318 314
     },
319 315
     onNew() {
320 316
       this.$emit("onNew");
@@ -350,8 +346,8 @@ export default {
350 346
     },
351 347
     onRowClick(item, i) {
352 348
       const ind = this.getActualIndex(i);
353
-      if (_.some(this.selectedItems, x => x === ind)) {
354
-        this.selectedItems = this.selectedItems.filter(x => x !== ind);
349
+      if (_.some(this.selectedItems, (x) => x === ind)) {
350
+        this.selectedItems = this.selectedItems.filter((x) => x !== ind);
355 351
       } else {
356 352
         if (!this.allowMultipleSelect) {
357 353
           this.selectedItems = [];
@@ -404,7 +400,7 @@ export default {
404 400
         if (array[i] === value) return true;
405 401
       }
406 402
       return false;
407
-    }
403
+    },
408 404
   },
409 405
   computed: {
410 406
     ListWidth() {
@@ -431,7 +427,7 @@ export default {
431 427
           listColumns.push(this.displayColumns[i]);
432 428
         }
433 429
       } else {
434
-        const list = _.filter(this.allColumn, x => x.show);
430
+        const list = _.filter(this.allColumn, (x) => x.show);
435 431
         for (const i in list) {
436 432
           const item = list[i];
437 433
           if (item) {
@@ -446,9 +442,9 @@ export default {
446 442
       return list;
447 443
     },
448 444
     FilteredItems() {
449
-      const list = _.filter(this.items, item =>
445
+      const list = _.filter(this.items, (item) =>
450 446
         Object.values(item).some(
451
-          i =>
447
+          (i) =>
452 448
             JSON.stringify(i)
453 449
               .toLowerCase()
454 450
               .indexOf(this.searchItem.toLowerCase()) > -1
@@ -464,9 +460,9 @@ export default {
464 460
         endSlice = list.length;
465 461
       }
466 462
       return list.slice(startSlice, endSlice);
467
-    }
463
+    },
468 464
     //GetAllColumn() {}
469
-  }
465
+  },
470 466
 };
471 467
 </script>
472 468
 <style scoped>
@@ -502,29 +498,29 @@ th[draggable] a {
502 498
   opacity: 0.25;
503 499
 }
504 500
 .over {
505
-  background-color: rgba(0, 0, 255, 0.35);
501
+  background-color: rgba(87, 87, 92, 0.35);
506 502
 }
507 503
 .my-border {
508 504
   border: solid 3px silver;
509 505
 }
510 506
 .selected {
511
-  background-color: rgba(96, 203, 235, 0.5);
507
+  background-color: rgba(174, 180, 182, 0.5);
512 508
   border: white 2px double;
513 509
 }
514 510
 .selected:hover {
515
-  background-color: rgba(96, 203, 235, 0.85);
511
+  background-color: rgba(166, 181, 185, 0.85);
516 512
 }
517 513
 .btn-width {
518 514
   width: 125px;
519 515
 }
520 516
 .table-title {
521 517
   padding: 5px;
522
-  border: rgba(200, 200, 200, 0.66) double 2px;
518
+  border: rgba(56, 58, 59, 0.66) double 2px;
523 519
   border-radius: 5px;
524
-  background-color: rgba(96, 203, 235, 0.25);
520
+  background-color: rgba(176, 188, 192, 0.25);
525 521
 }
526 522
 .table-title:hover {
527
-  background-color: rgba(96, 203, 235, 0.4);
523
+  background-color: rgba(64, 64, 65, 0.4);
528 524
 }
529 525
 .table-header {
530 526
   background-color: rgba(200, 200, 200, 0.66);

+ 1
- 1
src/components/shared/mapSetLocation.vue Visa fil

@@ -3,7 +3,7 @@
3 3
     <label v-if="showLocationLabel">Location</label>
4 4
     <div v-if="showAutoComplete" class="input-group-prepend">
5 5
       <span class="input-group-text">
6
-        <eva-icon name="map" fill="#24aae1"></eva-icon>
6
+        <eva-icon name="map" fill="#6c757d"></eva-icon>
7 7
       </span>
8 8
       <gmap-autocomplete class="form-control" @place_changed="setPlace"></gmap-autocomplete>
9 9
       <button class="btn btn-primary btn-l" @click="addMarker">Add</button>

+ 2
- 3
src/components/shared/navBar.vue Visa fil

@@ -38,7 +38,7 @@
38 38
         <div class="input-group-prepend">
39 39
           <input type="text" placeholder="search" />
40 40
           <span class="input-group-text" @click="Search">
41
-            <i class="fa fa-search" style="color:#24aae1"></i>
41
+            <i class="fa fa-search" style="color:#6c757d"></i>
42 42
           </span>
43 43
         </div>
44 44
       </div>
@@ -175,7 +175,7 @@ export default {
175 175
     isLoggedIn() {
176 176
       // console.log(Log.isLoggedIn());
177 177
       // return Log.isLoggedIn();
178
-      return false;
178
+      return true;
179 179
     },
180 180
     NAME() {
181 181
       //return Log.getPerson().name;
@@ -184,7 +184,6 @@ export default {
184 184
     SystemRole() {
185 185
       return "Customer";
186 186
       //return "SuperAdmin";
187
-
188 187
       //return "RestaurantAdmin";
189 188
     },
190 189
     // eslint-disable-next-line vue/return-in-computed-property

+ 10
- 0
src/main.js Visa fil

@@ -10,7 +10,17 @@ import VModal from "vue-js-modal";
10 10
 import "font-awesome/css/font-awesome.min.css";
11 11
 import VueGeolocation from "vue-browser-geolocation";
12 12
 import * as VueGoogleMaps from "vue2-google-maps";
13
+import { BootstrapVue, IconsPlugin } from "bootstrap-vue";
14
+import "bootstrap/dist/css/bootstrap.css";
15
+import "bootstrap-vue/dist/bootstrap-vue.css";
16
+import { library } from "@fortawesome/fontawesome-svg-core";
17
+import { fas } from "@fortawesome/free-solid-svg-icons";
18
+import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
13 19
 
20
+library.add(fas);
21
+Vue.component("font-awesome-icon", FontAwesomeIcon);
22
+Vue.use(BootstrapVue);
23
+Vue.use(IconsPlugin);
14 24
 Vue.use(VueGeolocation);
15 25
 Vue.use(VueGoogleMaps, {
16 26
   load: {

+ 7
- 1
src/router/index.js Visa fil

@@ -27,6 +27,7 @@ import RestaurantUsers from "../components/restaurants/restaurantUsers.vue";
27 27
 import RestaurantRoles from "../components/restaurants/restaurantRoles.vue";
28 28
 import RestaurantRole from "../components/restaurants/restaurantRole.vue";
29 29
 import OrderConfirmation from "../components/orders/confirmOrder.vue";
30
+import CustomerOrder from "../components/customer/customerOrder.vue";
30 31
 
31 32
 Vue.use(Router);
32 33
 
@@ -155,9 +156,14 @@ export default new Router({
155 156
       component: RestaurantRole
156 157
     },
157 158
     {
158
-      path: "/ConfirmOrder",
159
+      path: "/ConfirmOrder/:id",
159 160
       name: "OrderConfirmation",
160 161
       component: OrderConfirmation
162
+    },
163
+    {
164
+      path: "/OrderDetails/:id",
165
+      name: "CustomerOrder",
166
+      component: CustomerOrder
161 167
     }
162 168
   ]
163 169
 });

+ 36
- 1
src/store/modules/orders/order.js Visa fil

@@ -1,4 +1,6 @@
1 1
 import axios from "axios";
2
+import { result } from "lodash";
3
+import { resolve, reject } from "core-js/fn/promise";
2 4
 
3 5
 export default {
4 6
   namespaced: true,
@@ -16,6 +18,9 @@ export default {
16 18
     },
17 19
     setOrderItems(state, items) {
18 20
       state.orderItems = items;
21
+    },
22
+    updateAddress(state, address) {
23
+      state.order.deliveryAddress = address;
19 24
     }
20 25
   },
21 26
   getters: {},
@@ -28,6 +33,11 @@ export default {
28 33
         .get(`/api/order/GetUserOrders/${userId}`)
29 34
         .then(result => commit("setOrders", result.data));
30 35
     },
36
+    getUserOrder({ commit }, userId) {
37
+      axios
38
+        .get(`/api/order/GetUserOrder/${userId}`)
39
+        .then(result => commit("setOrder", result.data));
40
+    },
31 41
     getRestaurantOrders({ commit }, restaurantId) {
32 42
       axios
33 43
         .get(`/api/order/GetRestaurantOrders/${restaurantId}`)
@@ -38,8 +48,33 @@ export default {
38 48
         .get(`/api/order/GetOrderItems/${orderId}`)
39 49
         .then(result => commit("setOrderItems", result.data));
40 50
     },
51
+    getCartOrder({ commit }, id) {
52
+      axios.get(`/api/order/GetCartOrder/${id}`).then(result => commit("setOrder", result.data));
53
+    },
41 54
     saveOrder({ commit }, order) {
42
-      axios.post("/api/order", order).then(result => commit("setOrders", result.data));
55
+      return new Promise((resolve, reject) => {
56
+        axios
57
+          .post("/api/order", order)
58
+          .then(result => {
59
+            commit("setOrder", result.data);
60
+            resolve();
61
+          })
62
+          .catch(error => reject(new Error(error.message)));
63
+      });
64
+    },
65
+    updateOrder({ commit }, order) {
66
+      axios.put("/api/order", order).then(result => commit("setOrder", result.data));
67
+    },
68
+    updateAddress({ commit }, address) {
69
+      return new Promise((resolve, reject) => {
70
+        axios
71
+          .put("/api/order/UpdateAddress", address)
72
+          .then(result => {
73
+            commit("updateAddress", result.data);
74
+            resolve();
75
+          })
76
+          .catch(error => reject(new Error(error.message)));
77
+      });
43 78
     }
44 79
   }
45 80
 };

Laddar…
Avbryt
Spara