瀏覽代碼

Restaurant Details Screen + Functions

master
George Williams 4 年之前
父節點
當前提交
6a77caa254

+ 40
- 40
public/css/style.css 查看文件

18
 }
18
 }
19
 
19
 
20
 a:hover {
20
 a:hover {
21
-    color: #60CBEB;
21
+    color: #24aae1;
22
     text-decoration: none;
22
     text-decoration: none;
23
 }
23
 }
24
 
24
 
80
 }
80
 }
81
 
81
 
82
 .color-b {
82
 .color-b {
83
-    color: #60CBEB;
83
+    color: #24aae1;
84
 }
84
 }
85
 
85
 
86
 .color-d {
86
 .color-d {
119
     bottom: -1px;
119
     bottom: -1px;
120
     width: 100%;
120
     width: 100%;
121
     height: 2px;
121
     height: 2px;
122
-    background-color: #60CBEB;
122
+    background-color: #24aae1;
123
     z-index: 2;
123
     z-index: 2;
124
 }
124
 }
125
 
125
 
174
 .pagination-a .pagination .page-link:hover,
174
 .pagination-a .pagination .page-link:hover,
175
 .pagination-a .pagination .page-link:active,
175
 .pagination-a .pagination .page-link:active,
176
 .pagination-a .pagination .page-link:focus {
176
 .pagination-a .pagination .page-link:focus {
177
-    background-color: #60CBEB;
177
+    background-color: #24aae1;
178
 }
178
 }
179
 
179
 
180
 .pagination-a .pagination .page-link span {
180
 .pagination-a .pagination .page-link span {
201
 }
201
 }
202
 
202
 
203
 .pagination-a .pagination .page-item.active .page-link {
203
 .pagination-a .pagination .page-item.active .page-link {
204
-    background-color: #60CBEB;
204
+    background-color: #24aae1;
205
 }
205
 }
206
 
206
 
207
 .a {
207
 .a {
208
-    color: #60CBEB;
208
+    color: #24aae1;
209
     font-size: 1.3rem;
209
     font-size: 1.3rem;
210
 }
210
 }
211
 
211
 
292
     position: absolute;
292
     position: absolute;
293
     width: 70px;
293
     width: 70px;
294
     height: 4px;
294
     height: 4px;
295
-    background-color: #60CBEB;
295
+    background-color: #24aae1;
296
     bottom: 20px;
296
     bottom: 20px;
297
     left: 0;
297
     left: 0;
298
 }
298
 }
363
 }
363
 }
364
 
364
 
365
 .owl-theme .owl-dots .owl-dot:hover span {
365
 .owl-theme .owl-dots .owl-dot:hover span {
366
-    background-color: #60CBEB;
366
+    background-color: #24aae1;
367
 }
367
 }
368
 
368
 
369
 .owl-theme .owl-dots .owl-dot.active span {
369
 .owl-theme .owl-dots .owl-dot.active span {
370
-    background-color: #60CBEB;
370
+    background-color: #24aae1;
371
     width: 35px;
371
     width: 35px;
372
 }
372
 }
373
 
373
 
417
     display: inline-block;
417
     display: inline-block;
418
     transition: all 0.6s ease-in-out;
418
     transition: all 0.6s ease-in-out;
419
     color: #ffffff;
419
     color: #ffffff;
420
-    background-color: #60CBEB;
420
+    background-color: #24aae1;
421
     opacity: .9;
421
     opacity: .9;
422
 }
422
 }
423
 
423
 
429
 
429
 
430
 .nav-arrow-b .owl-arrow .owl-nav .owl-prev:hover,
430
 .nav-arrow-b .owl-arrow .owl-nav .owl-prev:hover,
431
 .nav-arrow-b .owl-arrow .owl-nav .owl-next:hover {
431
 .nav-arrow-b .owl-arrow .owl-nav .owl-next:hover {
432
-    background-color: #089bf0;
432
+    background-color: #25335d;
433
 }
433
 }
434
 
434
 
435
 .nav-arrow-b .owl-arrow .owl-nav .owl-next {
435
 .nav-arrow-b .owl-arrow .owl-nav .owl-next {
449
 .back-to-top {
449
 .back-to-top {
450
     position: fixed;
450
     position: fixed;
451
     display: none;
451
     display: none;
452
-    background: #60CBEB;
452
+    background: #24aae1;
453
     color: #fff;
453
     color: #fff;
454
     width: 44px;
454
     width: 44px;
455
     height: 44px;
455
     height: 44px;
488
     top: calc(50% - 30px);
488
     top: calc(50% - 30px);
489
     left: calc(50% - 30px);
489
     left: calc(50% - 30px);
490
     border: 6px solid #f2f2f2;
490
     border: 6px solid #f2f2f2;
491
-    border-top: 6px solid #60CBEB;
491
+    border-top: 6px solid #24aae1;
492
     border-radius: 50%;
492
     border-radius: 50%;
493
     width: 60px;
493
     width: 60px;
494
     height: 60px;
494
     height: 60px;
579
     width: 100%;
579
     width: 100%;
580
     height: 2px;
580
     height: 2px;
581
     z-index: 0;
581
     z-index: 0;
582
-    background-color: #60CBEB;
582
+    background-color: #24aae1;
583
     -webkit-transform: scaleX(0);
583
     -webkit-transform: scaleX(0);
584
     transform: scaleX(0);
584
     transform: scaleX(0);
585
     -webkit-transform-origin: right;
585
     -webkit-transform-origin: right;
615
 }
615
 }
616
 
616
 
617
 .navbar-default.navbar-trans .nav-link:before {
617
 .navbar-default.navbar-trans .nav-link:before {
618
-    background-color: #60CBEB;
618
+    background-color: #24aae1;
619
 }
619
 }
620
 
620
 
621
 .navbar-default.navbar-trans .nav-link:hover {
621
 .navbar-default.navbar-trans .nav-link:hover {
640
 }
640
 }
641
 
641
 
642
 .navbar-default.navbar-reduce .nav-link:before {
642
 .navbar-default.navbar-reduce .nav-link:before {
643
-    background-color: #60CBEB;
643
+    background-color: #24aae1;
644
 }
644
 }
645
 
645
 
646
 .navbar-default.navbar-reduce .nav-link:hover {
646
 .navbar-default.navbar-reduce .nav-link:hover {
660
 
660
 
661
 .navbar-default .dropdown .dropdown-menu {
661
 .navbar-default .dropdown .dropdown-menu {
662
     border-top: 0;
662
     border-top: 0;
663
-    border-left: 4px solid #60CBEB;
663
+    border-left: 4px solid #24aae1;
664
     border-right: 0;
664
     border-right: 0;
665
     border-bottom: 0;
665
     border-bottom: 0;
666
     -webkit-transform: translate3d(0px, -40px, 0px);
666
     -webkit-transform: translate3d(0px, -40px, 0px);
683
 
683
 
684
 .navbar-default .dropdown .dropdown-menu .dropdown-item:hover {
684
 .navbar-default .dropdown .dropdown-menu .dropdown-item:hover {
685
     background-color: #ffffff;
685
     background-color: #ffffff;
686
-    color: #60CBEB;
686
+    color: #24aae1;
687
     transition: all 500ms ease;
687
     transition: all 500ms ease;
688
 }
688
 }
689
 
689
 
690
 .navbar-default .dropdown .dropdown-menu .dropdown-item.active {
690
 .navbar-default .dropdown .dropdown-menu .dropdown-item.active {
691
     background-color: #ffffff;
691
     background-color: #ffffff;
692
-    color: #60CBEB;
692
+    color: #24aae1;
693
 }
693
 }
694
 
694
 
695
 .navbar-default .dropdown:hover .dropdown-menu {
695
 .navbar-default .dropdown:hover .dropdown-menu {
888
 }
888
 }
889
 
889
 
890
 .intro .owl-theme .owl-dots .owl-dot:hover span {
890
 .intro .owl-theme .owl-dots .owl-dot:hover span {
891
-    background-color: #60CBEB;
891
+    background-color: #24aae1;
892
 }
892
 }
893
 
893
 
894
 .intro .owl-theme .owl-dots .owl-dot.active span {
894
 .intro .owl-theme .owl-dots .owl-dot.active span {
895
-    background-color: #60CBEB;
895
+    background-color: #24aae1;
896
 }
896
 }
897
 
897
 
898
 .intro .intro-item {
898
 .intro .intro-item {
919
 .intro .intro-body .price-a {
919
 .intro .intro-body .price-a {
920
     color: #ffffff;
920
     color: #ffffff;
921
     padding: 1rem 1.5rem;
921
     padding: 1rem 1.5rem;
922
-    border: 2px solid #60CBEB;
922
+    border: 2px solid #24aae1;
923
     border-radius: 50px;
923
     border-radius: 50px;
924
     text-transform: uppercase;
924
     text-transform: uppercase;
925
     letter-spacing: 0.030em;
925
     letter-spacing: 0.030em;
970
 }
970
 }
971
 
971
 
972
 .intro-single .title-single-box {
972
 .intro-single .title-single-box {
973
-    border-left: 3px solid #60CBEB;
973
+    border-left: 3px solid #24aae1;
974
 }
974
 }
975
 
975
 
976
 .intro-single .title-single-box .title-single {
976
 .intro-single .title-single-box .title-single {
1074
 .price-a {
1074
 .price-a {
1075
     color: #ffffff;
1075
     color: #ffffff;
1076
     padding: .6rem .8rem;
1076
     padding: .6rem .8rem;
1077
-    border: 2px solid #60CBEB;
1077
+    border: 2px solid #24aae1;
1078
     border-radius: 50px;
1078
     border-radius: 50px;
1079
     text-transform: uppercase;
1079
     text-transform: uppercase;
1080
     letter-spacing: 0.030em;
1080
     letter-spacing: 0.030em;
1084
     width: 100%;
1084
     width: 100%;
1085
     position: absolute;
1085
     position: absolute;
1086
     z-index: 2;
1086
     z-index: 2;
1087
-    background-color: #60CBEB;
1087
+    background-color: #24aae1;
1088
 }
1088
 }
1089
 
1089
 
1090
 .card-info {
1090
 .card-info {
1184
 
1184
 
1185
 .card-header-b .category-b {
1185
 .card-header-b .category-b {
1186
     font-size: .9rem;
1186
     font-size: .9rem;
1187
-    background-color: #60CBEB;
1187
+    background-color: #24aae1;
1188
     padding: .3rem .7rem;
1188
     padding: .3rem .7rem;
1189
     color: #313131;
1189
     color: #313131;
1190
     letter-spacing: 0.030em;
1190
     letter-spacing: 0.030em;
1236
 
1236
 
1237
 .post-content .blockquote {
1237
 .post-content .blockquote {
1238
     padding: 1rem 3rem 1.7rem 3rem;
1238
     padding: 1rem 3rem 1.7rem 3rem;
1239
-    border-left: 3px solid #60CBEB;
1239
+    border-left: 3px solid #24aae1;
1240
     color: #000000;
1240
     color: #000000;
1241
 }
1241
 }
1242
 
1242
 
1325
 
1325
 
1326
 .card-box-ico {
1326
 .card-box-ico {
1327
     padding: 1rem 3rem 1rem 2.5rem;
1327
     padding: 1rem 3rem 1rem 2.5rem;
1328
-    border: 5px solid #60CBEB;
1328
+    border: 5px solid #24aae1;
1329
 }
1329
 }
1330
 
1330
 
1331
 .card-box-ico span {
1331
 .card-box-ico span {
1387
 }
1387
 }
1388
 
1388
 
1389
 .card-box-d:hover .card-overlay-hover {
1389
 .card-box-d:hover .card-overlay-hover {
1390
-    background-color: #60CBEB;
1390
+    background-color: #24aae1;
1391
     opacity: .9;
1391
     opacity: .9;
1392
 }
1392
 }
1393
 
1393
 
1435
 }
1435
 }
1436
 
1436
 
1437
 .sinse-box {
1437
 .sinse-box {
1438
-    background-color: #60CBEB;
1438
+    background-color: #24aae1;
1439
     padding: 1rem 2rem;
1439
     padding: 1rem 2rem;
1440
     position: absolute;
1440
     position: absolute;
1441
     left: 15px;
1441
     left: 15px;
1490
 
1490
 
1491
 .testimonial-ico span {
1491
 .testimonial-ico span {
1492
     font-size: 1.8rem;
1492
     font-size: 1.8rem;
1493
-    background-color: #60CBEB;
1493
+    background-color: #24aae1;
1494
     color: #ffffff;
1494
     color: #ffffff;
1495
     padding: .4rem 1rem;
1495
     padding: .4rem 1rem;
1496
     border-radius: 50px;
1496
     border-radius: 50px;
1548
 .section-footer .item-list-a i {
1548
 .section-footer .item-list-a i {
1549
     font-size: 18px;
1549
     font-size: 18px;
1550
     padding-right: 4px;
1550
     padding-right: 4px;
1551
-    color: #60CBEB;
1551
+    color: #24aae1;
1552
 }
1552
 }
1553
 
1553
 
1554
 .section-footer .widget-a .w-title-a {
1554
 .section-footer .widget-a .w-title-a {
1614
 
1614
 
1615
 
1615
 
1616
 .form-a #sendmessage {
1616
 .form-a #sendmessage {
1617
-    color: #60CBEB;
1618
-    border: 1px solid #089bf0;
1617
+    color: #24aae1;
1618
+    border: 1px solid #25335d;
1619
     display: none;
1619
     display: none;
1620
     text-align: center;
1620
     text-align: center;
1621
     padding: 15px;
1621
     padding: 15px;
1668
 
1668
 
1669
 .form-a .form-control:focus {
1669
 .form-a .form-control:focus {
1670
     box-shadow: none;
1670
     box-shadow: none;
1671
-    border-color: #60CBEB;
1671
+    border-color: #24aae1;
1672
 }
1672
 }
1673
 
1673
 
1674
 
1674
 
1693
 }
1693
 }
1694
 
1694
 
1695
 .btn.btn-a:hover {
1695
 .btn.btn-a:hover {
1696
-    background-color: #60CBEB;
1696
+    background-color: #24aae1;
1697
     color: #000000;
1697
     color: #000000;
1698
 }
1698
 }
1699
 
1699
 
1700
 .btn.btn-b {
1700
 .btn.btn-b {
1701
-    background-color: #60CBEB;
1701
+    background-color: #24aae1;
1702
     color: #000000;
1702
     color: #000000;
1703
 }
1703
 }
1704
 
1704
 
1708
 }
1708
 }
1709
 
1709
 
1710
 .btn.btn-b-n {
1710
 .btn.btn-b-n {
1711
-    background-color: #60CBEB;
1711
+    background-color: #24aae1;
1712
     color: #ffffff;
1712
     color: #ffffff;
1713
     border-radius: 0;
1713
     border-radius: 0;
1714
 }
1714
 }
1715
 
1715
 
1716
 .btn.btn-b-n:hover {
1716
 .btn.btn-b-n:hover {
1717
-    background-color: #089bf0;
1717
+    background-color: #25335d;
1718
     color: #ffffff;
1718
     color: #ffffff;
1719
 }
1719
 }
1720
 
1720
 
1764
     }
1764
     }
1765
 
1765
 
1766
     .navbar-default .dropdown .dropdown-menu {
1766
     .navbar-default .dropdown .dropdown-menu {
1767
-        border-top: 4px solid #60CBEB;
1767
+        border-top: 4px solid #24aae1;
1768
         border-left: 0;
1768
         border-left: 0;
1769
         display: block;
1769
         display: block;
1770
         position: absolute;
1770
         position: absolute;

+ 9
- 9
src/App.vue 查看文件

34
   cursor: pointer;
34
   cursor: pointer;
35
 }
35
 }
36
 hr {
36
 hr {
37
-  background-color: #60cbeb;
37
+  background-color: #24aae1;
38
 }
38
 }
39
 .my-btn {
39
 .my-btn {
40
   margin: 2px;
40
   margin: 2px;
41
-  color: #60cbeb;
41
+  color: #24aae1;
42
 }
42
 }
43
 .title-img {
43
 .title-img {
44
   width: 800px;
44
   width: 800px;
51
   border-radius: 15px;
51
   border-radius: 15px;
52
 }
52
 }
53
 .myBackground {
53
 .myBackground {
54
-  border-color: #60cbeb;
55
-  background-color: #60cbeb;
54
+  border-color: #24aae1;
55
+  background-color: #24aae1;
56
 }
56
 }
57
 .myFill {
57
 .myFill {
58
-  fill: #60cbeb;
59
-  color: #60cbeb;
58
+  fill: #24aae1;
59
+  color: #24aae1;
60
 }
60
 }
61
 .mySuccess {
61
 .mySuccess {
62
   border-color: rgba(2, 184, 117, 0.5);
62
   border-color: rgba(2, 184, 117, 0.5);
78
   cursor: pointer;
78
   cursor: pointer;
79
 }
79
 }
80
 a:hover {
80
 a:hover {
81
-  color: #60cbeb;
81
+  color: #24aae1;
82
 }
82
 }
83
 #app {
83
 #app {
84
   font-family: "Avenir", Helvetica, Arial, sans-serif;
84
   font-family: "Avenir", Helvetica, Arial, sans-serif;
99
   margin: 0;
99
   margin: 0;
100
 }
100
 }
101
 .isSelected {
101
 .isSelected {
102
-  border-color: white white #60cbeb white;
102
+  border-color: white white #24aae1 white;
103
 }
103
 }
104
 .isUnSelected {
104
 .isUnSelected {
105
   border-color: white white white white;
105
   border-color: white white white white;
118
   color: white;
118
   color: white;
119
 }
119
 }
120
 .normalText {
120
 .normalText {
121
-  background-color: #60cbeb;
121
+  background-color: #24aae1;
122
 }
122
 }
123
 .pendingOffer {
123
 .pendingOffer {
124
   background-color: #ff8344;
124
   background-color: #ff8344;

+ 4
- 4
src/components/accounts/login.vue 查看文件

12
           <div class="input-group mb-3">
12
           <div class="input-group mb-3">
13
             <div class="input-group-prepend">
13
             <div class="input-group-prepend">
14
               <span class="input-group-text">
14
               <span class="input-group-text">
15
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
15
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
16
               </span>
16
               </span>
17
               <input
17
               <input
18
                 class="form-control"
18
                 class="form-control"
26
           <div class="input-group mb-3">
26
           <div class="input-group mb-3">
27
             <div class="input-group-prepend">
27
             <div class="input-group-prepend">
28
               <span class="input-group-text">
28
               <span class="input-group-text">
29
-                <eva-icon name="lock-outline" fill="#60CBEB"></eva-icon>
29
+                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
30
               </span>
30
               </span>
31
               <input
31
               <input
32
                 class="form-control"
32
                 class="form-control"
38
               />
38
               />
39
               <div class="input-group-append">
39
               <div class="input-group-append">
40
                 <span class="input-group-text" @click="togglePassword()">
40
                 <span class="input-group-text" @click="togglePassword()">
41
-                  <eva-icon v-if="showPassword" name="eye-off-outline" fill="#60CBEB"></eva-icon>
42
-                  <eva-icon v-else name="eye-outline" fill="#60CBEB"></eva-icon>
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>
43
                 </span>
43
                 </span>
44
               </div>
44
               </div>
45
             </div>
45
             </div>

+ 8
- 8
src/components/accounts/register.vue 查看文件

14
             <label>Name</label>
14
             <label>Name</label>
15
             <div class="input-group-prepend">
15
             <div class="input-group-prepend">
16
               <span class="input-group-text">
16
               <span class="input-group-text">
17
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
17
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
18
               </span>
18
               </span>
19
               <input class="form-control" type="text" name="name" v-model="userContainer.firstName" />
19
               <input class="form-control" type="text" name="name" v-model="userContainer.firstName" />
20
             </div>
20
             </div>
25
             <label>Surname</label>
25
             <label>Surname</label>
26
             <div class="input-group-prepend">
26
             <div class="input-group-prepend">
27
               <span class="input-group-text">
27
               <span class="input-group-text">
28
-                <eva-icon name="book-outline" fill="#60CBEB"></eva-icon>
28
+                <eva-icon name="book-outline" fill="#24aae1"></eva-icon>
29
               </span>
29
               </span>
30
               <input
30
               <input
31
                 class="form-control"
31
                 class="form-control"
41
             <label>Email Address</label>
41
             <label>Email Address</label>
42
             <div class="input-group-prepend">
42
             <div class="input-group-prepend">
43
               <span class="input-group-text">
43
               <span class="input-group-text">
44
-                <eva-icon name="email-outline" fill="#60CBEB"></eva-icon>
44
+                <eva-icon name="email-outline" fill="#24aae1"></eva-icon>
45
               </span>
45
               </span>
46
               <input
46
               <input
47
                 class="form-control"
47
                 class="form-control"
57
             <label>Cellphone</label>
57
             <label>Cellphone</label>
58
             <div class="input-group-prepend">
58
             <div class="input-group-prepend">
59
               <span class="input-group-text">
59
               <span class="input-group-text">
60
-                <eva-icon name="phone-outline" fill="#60CBEB"></eva-icon>
60
+                <eva-icon name="phone-outline" fill="#24aae1"></eva-icon>
61
               </span>
61
               </span>
62
               <input
62
               <input
63
                 class="form-control"
63
                 class="form-control"
73
             <label>Password</label>
73
             <label>Password</label>
74
             <div class="input-group-prepend">
74
             <div class="input-group-prepend">
75
               <span class="input-group-text">
75
               <span class="input-group-text">
76
-                <eva-icon name="lock-outline" fill="#60CBEB"></eva-icon>
76
+                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
77
               </span>
77
               </span>
78
               <input
78
               <input
79
                 class="form-control"
79
                 class="form-control"
91
             <label>Confirm Password</label>
91
             <label>Confirm Password</label>
92
             <div class="input-group-prepend">
92
             <div class="input-group-prepend">
93
               <span class="input-group-text">
93
               <span class="input-group-text">
94
-                <eva-icon name="lock-outline" fill="#60CBEB"></eva-icon>
94
+                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
95
               </span>
95
               </span>
96
               <input
96
               <input
97
                 class="form-control"
97
                 class="form-control"
107
                     <eva-icon
107
                     <eva-icon
108
                       v-if="showPassword"
108
                       v-if="showPassword"
109
                       name="eye-off-outline"
109
                       name="eye-off-outline"
110
-                      fill="#60CBEB"
110
+                      fill="#24aae1"
111
                       @click="togglePassword()"
111
                       @click="togglePassword()"
112
                     ></eva-icon>
112
                     ></eva-icon>
113
-                    <eva-icon v-else name="eye-outline" fill="#60CBEB" @click="togglePassword()"></eva-icon>
113
+                    <eva-icon v-else name="eye-outline" fill="#24aae1" @click="togglePassword()"></eva-icon>
114
                   </span>
114
                   </span>
115
                 </div>
115
                 </div>
116
               </div>
116
               </div>

+ 14
- 20
src/components/accounts/restaurantRegistration.vue 查看文件

19
             <label>Name</label>
19
             <label>Name</label>
20
             <div class="input-group-prepend">
20
             <div class="input-group-prepend">
21
               <span class="input-group-text">
21
               <span class="input-group-text">
22
-                <eva-icon name="edit-2-outline" fill="#60CBEB"></eva-icon>
22
+                <eva-icon name="edit-2-outline" fill="#24aae1"></eva-icon>
23
               </span>
23
               </span>
24
               <input
24
               <input
25
                 class="form-control"
25
                 class="form-control"
61
             <label>Delivery Fee</label>
61
             <label>Delivery Fee</label>
62
             <div class="input-group-prepend">
62
             <div class="input-group-prepend">
63
               <span class="input-group-text">
63
               <span class="input-group-text">
64
-                <eva-icon name="credit-card-outline" fill="#60CBEB"></eva-icon>
64
+                <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
65
               </span>
65
               </span>
66
               <input
66
               <input
67
                 class="form-control"
67
                 class="form-control"
77
             <label>Delivery Radius (KM)</label>
77
             <label>Delivery Radius (KM)</label>
78
             <div class="input-group-prepend">
78
             <div class="input-group-prepend">
79
               <span class="input-group-text">
79
               <span class="input-group-text">
80
-                <eva-icon name="pin-outline" fill="#60CBEB"></eva-icon>
80
+                <eva-icon name="pin-outline" fill="#24aae1"></eva-icon>
81
               </span>
81
               </span>
82
               <input
82
               <input
83
                 class="form-control"
83
                 class="form-control"
93
             <label>Delivery Time (Minutes)</label>
93
             <label>Delivery Time (Minutes)</label>
94
             <div class="input-group-prepend">
94
             <div class="input-group-prepend">
95
               <span class="input-group-text">
95
               <span class="input-group-text">
96
-                <eva-icon name="clock-outline" fill="#60CBEB"></eva-icon>
96
+                <eva-icon name="clock-outline" fill="#24aae1"></eva-icon>
97
               </span>
97
               </span>
98
               <input
98
               <input
99
                 class="form-control"
99
                 class="form-control"
130
             <label>Shopping Centre</label>
130
             <label>Shopping Centre</label>
131
             <div class="input-group-prepend">
131
             <div class="input-group-prepend">
132
               <span class="input-group-text">
132
               <span class="input-group-text">
133
-                <eva-icon name="shopping-cart-outline" fill="#60CBEB"></eva-icon>
133
+                <eva-icon name="shopping-cart-outline" fill="#24aae1"></eva-icon>
134
               </span>
134
               </span>
135
               <input
135
               <input
136
                 class="form-control"
136
                 class="form-control"
146
             <label>Shop Number</label>
146
             <label>Shop Number</label>
147
             <div class="input-group-prepend">
147
             <div class="input-group-prepend">
148
               <span class="input-group-text">
148
               <span class="input-group-text">
149
-                <eva-icon name="hash-outline" fill="#60CBEB"></eva-icon>
149
+                <eva-icon name="hash-outline" fill="#24aae1"></eva-icon>
150
               </span>
150
               </span>
151
               <input
151
               <input
152
                 class="form-control"
152
                 class="form-control"
207
             <label>First Name</label>
207
             <label>First Name</label>
208
             <div class="input-group-prepend">
208
             <div class="input-group-prepend">
209
               <span class="input-group-text">
209
               <span class="input-group-text">
210
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
210
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
211
               </span>
211
               </span>
212
               <input
212
               <input
213
                 class="form-control"
213
                 class="form-control"
221
             <label>Surname</label>
221
             <label>Surname</label>
222
             <div class="input-group-prepend">
222
             <div class="input-group-prepend">
223
               <span class="input-group-text">
223
               <span class="input-group-text">
224
-                <eva-icon name="book-outline" fill="#60CBEB"></eva-icon>
224
+                <eva-icon name="book-outline" fill="#24aae1"></eva-icon>
225
               </span>
225
               </span>
226
               <input
226
               <input
227
                 class="form-control"
227
                 class="form-control"
235
             <label>Email Address</label>
235
             <label>Email Address</label>
236
             <div class="input-group-prepend">
236
             <div class="input-group-prepend">
237
               <span class="input-group-text">
237
               <span class="input-group-text">
238
-                <eva-icon name="email-outline" fill="#60CBEB"></eva-icon>
238
+                <eva-icon name="email-outline" fill="#24aae1"></eva-icon>
239
               </span>
239
               </span>
240
               <input
240
               <input
241
                 class="form-control"
241
                 class="form-control"
251
             <label>Password</label>
251
             <label>Password</label>
252
             <div class="input-group-prepend">
252
             <div class="input-group-prepend">
253
               <span class="input-group-text">
253
               <span class="input-group-text">
254
-                <eva-icon name="lock-outline" fill="#60CBEB"></eva-icon>
254
+                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
255
               </span>
255
               </span>
256
               <input
256
               <input
257
                 class="form-control"
257
                 class="form-control"
267
             <label>Confirm Password</label>
267
             <label>Confirm Password</label>
268
             <div class="input-group-prepend">
268
             <div class="input-group-prepend">
269
               <span class="input-group-text">
269
               <span class="input-group-text">
270
-                <eva-icon name="lock-outline" fill="#60CBEB"></eva-icon>
270
+                <eva-icon name="lock-outline" fill="#24aae1"></eva-icon>
271
               </span>
271
               </span>
272
               <input
272
               <input
273
                 class="form-control"
273
                 class="form-control"
283
                     <eva-icon
283
                     <eva-icon
284
                       v-if="showPassword"
284
                       v-if="showPassword"
285
                       name="eye-off-outline"
285
                       name="eye-off-outline"
286
-                      fill="#60CBEB"
286
+                      fill="#24aae1"
287
                       @click="togglePassword()"
287
                       @click="togglePassword()"
288
                     ></eva-icon>
288
                     ></eva-icon>
289
-                    <eva-icon v-else name="eye-outline" fill="#60CBEB" @click="togglePassword()"></eva-icon>
289
+                    <eva-icon v-else name="eye-outline" fill="#24aae1" @click="togglePassword()"></eva-icon>
290
                   </span>
290
                   </span>
291
                 </div>
291
                 </div>
292
               </div>
292
               </div>
344
     return {
344
     return {
345
       selectedMops: [],
345
       selectedMops: [],
346
       chain: false,
346
       chain: false,
347
-      mops: [
348
-        { name: "Credit Card" },
349
-        { name: "EFT" },
350
-        { name: "Account" },
351
-        { name: "Cash On Delivery" },
352
-        { name: "Instant EFT" }
353
-      ],
354
       tradingHours: [],
347
       tradingHours: [],
355
       categories: [],
348
       categories: [],
356
       hasError: false,
349
       hasError: false,
450
   },
443
   },
451
   computed: {
444
   computed: {
452
     ...mapState("registration", ["restaurantContainer"]),
445
     ...mapState("registration", ["restaurantContainer"]),
446
+    ...mapState("mop", ["mops"]),
453
     resultString() {
447
     resultString() {
454
       return this.restaurantContainer.result;
448
       return this.restaurantContainer.result;
455
     }
449
     }

+ 3
- 3
src/components/accounts/tradingHours.vue 查看文件

17
       <div class="col-md-12" style="margin-bottom: 1em">
17
       <div class="col-md-12" style="margin-bottom: 1em">
18
         <label>Description</label>
18
         <label>Description</label>
19
         <div class="input-group-prepend">
19
         <div class="input-group-prepend">
20
-          <span class="input-group-text" style="color: #60CBEB">
20
+          <span class="input-group-text" style="color: #24aae1">
21
             <b>D</b>
21
             <b>D</b>
22
           </span>
22
           </span>
23
           <input class="form-control" type="text" v-model="tradingData.description" />
23
           <input class="form-control" type="text" v-model="tradingData.description" />
28
       <div class="col-md-6" style="margin-bottom: 1em">
28
       <div class="col-md-6" style="margin-bottom: 1em">
29
         <label>From</label>
29
         <label>From</label>
30
         <div class="input-group-prepend">
30
         <div class="input-group-prepend">
31
-          <span class="input-group-text" style="color: #60CBEB">
31
+          <span class="input-group-text" style="color: #24aae1">
32
             <b>F</b>
32
             <b>F</b>
33
           </span>
33
           </span>
34
           <VueTimepicker v-model="tradingData.from" :disabled="EnableTime"></VueTimepicker>
34
           <VueTimepicker v-model="tradingData.from" :disabled="EnableTime"></VueTimepicker>
37
       <div class="col-md-6" style="margin-bottom: 1em">
37
       <div class="col-md-6" style="margin-bottom: 1em">
38
         <label>To</label>
38
         <label>To</label>
39
         <div class="input-group-prepend">
39
         <div class="input-group-prepend">
40
-          <span class="input-group-text" style="color: #60CBEB">
40
+          <span class="input-group-text" style="color: #24aae1">
41
             <b>T</b>
41
             <b>T</b>
42
           </span>
42
           </span>
43
           <VueTimepicker v-model="tradingData.to" :disabled="EnableTime"></VueTimepicker>
43
           <VueTimepicker v-model="tradingData.to" :disabled="EnableTime"></VueTimepicker>

+ 15
- 12
src/components/customer/customerDetails.vue 查看文件

16
             <label>Name</label>
16
             <label>Name</label>
17
             <div class="input-group-prepend">
17
             <div class="input-group-prepend">
18
               <span class="input-group-text">
18
               <span class="input-group-text">
19
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
19
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
20
               </span>
20
               </span>
21
               <input class="form-control" type="text" name="FirstName" v-model="user.firstName" />
21
               <input class="form-control" type="text" name="FirstName" v-model="user.firstName" />
22
             </div>
22
             </div>
25
             <label>Surname</label>
25
             <label>Surname</label>
26
             <div class="input-group-prepend">
26
             <div class="input-group-prepend">
27
               <span class="input-group-text">
27
               <span class="input-group-text">
28
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
28
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
29
               </span>
29
               </span>
30
               <input class="form-control" type="text" name="Surname" v-model="user.surname" />
30
               <input class="form-control" type="text" name="Surname" v-model="user.surname" />
31
             </div>
31
             </div>
36
             <label>Eamil Addres</label>
36
             <label>Eamil Addres</label>
37
             <div class="input-group-prepend">
37
             <div class="input-group-prepend">
38
               <span class="input-group-text">
38
               <span class="input-group-text">
39
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
39
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
40
               </span>
40
               </span>
41
               <input
41
               <input
42
                 class="form-control"
42
                 class="form-control"
50
             <label>Cellphone</label>
50
             <label>Cellphone</label>
51
             <div class="input-group-prepend">
51
             <div class="input-group-prepend">
52
               <span class="input-group-text">
52
               <span class="input-group-text">
53
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
53
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
54
               </span>
54
               </span>
55
               <input class="form-control" type="text" name="cellphone" v-model="user.cellphone" />
55
               <input class="form-control" type="text" name="cellphone" v-model="user.cellphone" />
56
             </div>
56
             </div>
99
             <label>Complex Name</label>
99
             <label>Complex Name</label>
100
             <div class="input-group-prepend">
100
             <div class="input-group-prepend">
101
               <span class="input-group-text">
101
               <span class="input-group-text">
102
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
102
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
103
               </span>
103
               </span>
104
               <input
104
               <input
105
                 class="form-control"
105
                 class="form-control"
113
             <label>Unit Number</label>
113
             <label>Unit Number</label>
114
             <div class="input-group-prepend">
114
             <div class="input-group-prepend">
115
               <span class="input-group-text">
115
               <span class="input-group-text">
116
-                <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
116
+                <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
117
               </span>
117
               </span>
118
               <input
118
               <input
119
                 class="form-control"
119
                 class="form-control"
131
                 <label>Street Number</label>
131
                 <label>Street Number</label>
132
                 <div class="input-group-prepend">
132
                 <div class="input-group-prepend">
133
                   <span class="input-group-text">
133
                   <span class="input-group-text">
134
-                    <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
134
+                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
135
                   </span>
135
                   </span>
136
                   <input
136
                   <input
137
                     class="form-control"
137
                     class="form-control"
148
                 <label>Street Name</label>
148
                 <label>Street Name</label>
149
                 <div class="input-group-prepend">
149
                 <div class="input-group-prepend">
150
                   <span class="input-group-text">
150
                   <span class="input-group-text">
151
-                    <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
151
+                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
152
                   </span>
152
                   </span>
153
                   <input
153
                   <input
154
                     class="form-control"
154
                     class="form-control"
165
                 <label>Suburb</label>
165
                 <label>Suburb</label>
166
                 <div class="input-group-prepend">
166
                 <div class="input-group-prepend">
167
                   <span class="input-group-text">
167
                   <span class="input-group-text">
168
-                    <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
168
+                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
169
                   </span>
169
                   </span>
170
                   <input
170
                   <input
171
                     class="form-control"
171
                     class="form-control"
182
                 <label>City</label>
182
                 <label>City</label>
183
                 <div class="input-group-prepend">
183
                 <div class="input-group-prepend">
184
                   <span class="input-group-text">
184
                   <span class="input-group-text">
185
-                    <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
185
+                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
186
                   </span>
186
                   </span>
187
                   <input
187
                   <input
188
                     class="form-control"
188
                     class="form-control"
199
                 <label>Province</label>
199
                 <label>Province</label>
200
                 <div class="input-group-prepend">
200
                 <div class="input-group-prepend">
201
                   <span class="input-group-text">
201
                   <span class="input-group-text">
202
-                    <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
202
+                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
203
                   </span>
203
                   </span>
204
                   <input
204
                   <input
205
                     class="form-control"
205
                     class="form-control"
216
                 <label>Postal Code</label>
216
                 <label>Postal Code</label>
217
                 <div class="input-group-prepend">
217
                 <div class="input-group-prepend">
218
                   <span class="input-group-text">
218
                   <span class="input-group-text">
219
-                    <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
219
+                    <eva-icon name="person-outline" fill="#24aae1"></eva-icon>
220
                   </span>
220
                   </span>
221
                   <input
221
                   <input
222
                     class="form-control"
222
                     class="form-control"
300
       this.user.addresses = [];
300
       this.user.addresses = [];
301
       this.user.addresses.push(this.userAddress);
301
       this.user.addresses.push(this.userAddress);
302
       this.updateUser(this.user);
302
       this.updateUser(this.user);
303
+    },
304
+    Close() {
305
+      this.$router.push("/");
303
     }
306
     }
304
   },
307
   },
305
   computed: {
308
   computed: {

+ 2
- 2
src/components/restaurants/restaurantCategory.vue 查看文件

10
         <label>Description</label>
10
         <label>Description</label>
11
         <div class="input-group-prepend">
11
         <div class="input-group-prepend">
12
           <span class="input-group-text">
12
           <span class="input-group-text">
13
-            <eva-icon name="credit-card-outline" fill="#60CBEB"></eva-icon>
13
+            <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
14
           </span>
14
           </span>
15
           <input class="form-control" type="text" name="description" v-model="category.description" />
15
           <input class="form-control" type="text" name="description" v-model="category.description" />
16
         </div>
16
         </div>
47
         <img :src="category.image" style="height:200px; width:200px; object-fit: cover;" />
47
         <img :src="category.image" style="height:200px; width:200px; object-fit: cover;" />
48
         <br />
48
         <br />
49
         <span class="input-group-text" align="center" style="width:150px" @click="removeImage()">
49
         <span class="input-group-text" align="center" style="width:150px" @click="removeImage()">
50
-          <eva-icon name="trash-2-outline" fill="#60CBEB"></eva-icon>Delete
50
+          <eva-icon name="trash-2-outline" fill="#24aae1"></eva-icon>Delete
51
         </span>
51
         </span>
52
       </div>
52
       </div>
53
     </div>
53
     </div>

+ 3
- 4
src/components/restaurants/restaurantCategorySelect.vue 查看文件

13
           :hideSearch="false"
13
           :hideSearch="false"
14
           :deleteable="false"
14
           :deleteable="false"
15
           :displayColumn="columns"
15
           :displayColumn="columns"
16
-          :sortKey="Description"
17
           :showNew="false"
16
           :showNew="false"
18
           @onRowClick="onRowClick"
17
           @onRowClick="onRowClick"
19
         />
18
         />
34
   },
33
   },
35
   data() {
34
   data() {
36
     return {
35
     return {
37
-      columns: ["Description"]
36
+      columns: ["id", "description"]
38
     };
37
     };
39
   },
38
   },
40
   methods: {
39
   methods: {
41
-    ...mapActions("restaurantCategories", ["getCategories"]),
40
+    ...mapActions("restaurantCategories", ["getSelectCategories"]),
42
     onRowClick(item) {
41
     onRowClick(item) {
43
       this.$emit("selected", item);
42
       this.$emit("selected", item);
44
     }
43
     }
47
     ...mapState("restaurantCategories", ["restaurantsCategories"])
46
     ...mapState("restaurantCategories", ["restaurantsCategories"])
48
   },
47
   },
49
   mounted() {
48
   mounted() {
50
-    this.getCategories();
49
+    this.getSelectCategories();
51
   }
50
   }
52
 };
51
 };
53
 </script>
52
 </script>

+ 517
- 0
src/components/restaurants/restaurantDetails.vue 查看文件

1
+<template>
2
+  <!-- eslint-disable max-len -->
3
+  <div class="container">
4
+    <br />
5
+    <div class="container col-md-12">
6
+      <div class="col-sm-12">
7
+        <div class="about-img-box">
8
+          <img
9
+            :src="restaurant.logo"
10
+            alt="Restaurant Details"
11
+            class="img-fluid"
12
+            style="width:800px;height:400px; border-radius:10px"
13
+          />
14
+        </div>
15
+        <div class="sinse-box" style="border-radius:10px">
16
+          <h3 class="sinse-title">Restaurant Details</h3>
17
+        </div>
18
+      </div>
19
+      <br />
20
+      <div class="row" style="text-align:left">
21
+        <div class="col-md-6" style="margin-bottomL 1em">
22
+          <div class="row" style="text-align:left">
23
+            <div class="col-md-12" style="margin-bottom: 1em">
24
+              <label>Update Logo</label>
25
+              <div class="input-group-prepend">
26
+                <span class="input-group-text" style="cursor: pointer;" @click="UpdateLogo">
27
+                  <eva-icon @click="UpdateLogo" name="image-outline" fill="#24aae1"></eva-icon>
28
+                </span>
29
+              </div>
30
+            </div>
31
+          </div>
32
+        </div>
33
+      </div>
34
+      <div class="row" style="text-align:left">
35
+        <!--Column 1 -->
36
+        <div class="col-md-6" style="margin-bottomL 1em">
37
+          <div class="row" style="text-align:left">
38
+            <div class="col-md-12" style="margin-bottom: 1em">
39
+              <label>Name</label>
40
+              <div class="input-group-prepend">
41
+                <span class="input-group-text">
42
+                  <eva-icon name="edit-2-outline" fill="#24aae1"></eva-icon>
43
+                </span>
44
+                <input class="form-control" type="text" name="rname" v-model="restaurant.name" />
45
+              </div>
46
+            </div>
47
+          </div>
48
+          <div class="row" style="text-align:left">
49
+            <div class="col-md-12" style="margin-bottom: 1em">
50
+              <div class="input-group-prepend">
51
+                <label>Methods Of Payment</label>
52
+                <ul>
53
+                  <li v-for="(mop, i) in mops" :key="i">
54
+                    <input type="checkbox" :id="mop.name" :value="mop.name" v-model="selectedMops" />
55
+                    <label :for="mop.name">{{ mop.name }}</label>
56
+                  </li>
57
+                </ul>
58
+              </div>
59
+            </div>
60
+          </div>
61
+          <div class="row" style="text-align:left">
62
+            <div class="col-md-12" style="margin-bottom: 1em">
63
+              <label>Delivery Fee</label>
64
+              <div class="input-group-prepend">
65
+                <span class="input-group-text">
66
+                  <eva-icon name="credit-card-outline" fill="#24aae1"></eva-icon>
67
+                </span>
68
+                <input
69
+                  class="form-control"
70
+                  type="number"
71
+                  name="deliveryFee"
72
+                  v-model="restaurant.deliveryFee"
73
+                />
74
+              </div>
75
+            </div>
76
+          </div>
77
+          <div class="row" style="text-align:left">
78
+            <div class="col-md-12" style="margin-bottom: 1em">
79
+              <label>Delivery Radius (KM)</label>
80
+              <div class="input-group-prepend">
81
+                <span class="input-group-text">
82
+                  <eva-icon name="pin-outline" fill="#24aae1"></eva-icon>
83
+                </span>
84
+                <input
85
+                  class="form-control"
86
+                  type="number"
87
+                  name="deliveryRadius"
88
+                  v-model="restaurant.deliveryRadius"
89
+                />
90
+              </div>
91
+            </div>
92
+          </div>
93
+          <div class="row" style="text-align:left">
94
+            <div class="col-md-12" style="margin-bottom: 1em">
95
+              <label>Delivery Time (Minutes)</label>
96
+              <div class="input-group-prepend">
97
+                <span class="input-group-text">
98
+                  <eva-icon name="clock-outline" fill="#24aae1"></eva-icon>
99
+                </span>
100
+                <input
101
+                  class="form-control"
102
+                  type="number"
103
+                  name="deliveryRadius"
104
+                  placeholder="From"
105
+                  v-model="restaurant.deliveryFrom"
106
+                />
107
+                <input
108
+                  class="form-control"
109
+                  type="number"
110
+                  name="deliveryRadius"
111
+                  placeholder="To"
112
+                  v-model="restaurant.deliveryTo"
113
+                />
114
+              </div>
115
+            </div>
116
+          </div>
117
+        </div>
118
+        <!--Column 2 -->
119
+        <div class="col-md-6" style="margin-bottomL 1em">
120
+          <div class="row" style="text-align:left">
121
+            <div class="col-md-12" style="margin-bottom: 1em">
122
+              <label>Trading Hours</label>
123
+              <ListView
124
+                :items="tradingHours"
125
+                :showColumnChooser="false"
126
+                :hideSearch="true"
127
+                :deleteable="true"
128
+                :displayColumn="thColumns"
129
+                @onDelete="Delete"
130
+                @onNew="New"
131
+              />
132
+            </div>
133
+          </div>
134
+          <div class="row" style="text-align:left">
135
+            <div class="col-md-12" style="margin-bottom: 1em">
136
+              <label>Categories</label>
137
+              <ListView
138
+                :items="categories"
139
+                :showColumnChooser="false"
140
+                :hideSearch="true"
141
+                :deleteable="true"
142
+                :displayColumn="columns"
143
+                :sortKey="Description"
144
+                @onDelete="DeleteCat"
145
+                @onNew="NewCat"
146
+              />
147
+            </div>
148
+          </div>
149
+        </div>
150
+      </div>
151
+      <div class="row">
152
+        <div class="col-md-12 col-lg-8">
153
+          <div class="title-box-d">
154
+            <br />
155
+            <h3 class="title-d" style="text-align:left;">Address</h3>
156
+          </div>
157
+        </div>
158
+      </div>
159
+      <div class="row" style="text-align:left">
160
+        <!--Column 1 -->
161
+        <div class="col-md-6" style="margin-bottomL 1em">
162
+          <div class="row" style="text-align:left">
163
+            <div class="col-md-12" style="margin-bottom: 1em">
164
+              <label>Shopping Centre</label>
165
+              <div class="input-group-prepend">
166
+                <span class="input-group-text">
167
+                  <eva-icon name="shopping-cart-outline" fill="#24aae1"></eva-icon>
168
+                </span>
169
+                <input
170
+                  class="form-control"
171
+                  type="text"
172
+                  name="shopName"
173
+                  v-model="restaurant.shoppingCentre"
174
+                />
175
+              </div>
176
+            </div>
177
+          </div>
178
+          <div class="row" style="text-align:left">
179
+            <div class="col-md-12" style="margin-bottom: 1em">
180
+              <label>Shop Number</label>
181
+              <div class="input-group-prepend">
182
+                <span class="input-group-text">
183
+                  <eva-icon name="hash-outline" fill="#24aae1"></eva-icon>
184
+                </span>
185
+                <input
186
+                  class="form-control"
187
+                  type="text"
188
+                  name="shopNo"
189
+                  v-model="restaurant.shopNumber"
190
+                />
191
+              </div>
192
+            </div>
193
+          </div>
194
+          <div class="row" style="text-align:left">
195
+            <div class="col-md-12" style="margin-bottom: 1em">
196
+              <label>Street Number</label>
197
+              <div class="input-group-prepend">
198
+                <span class="input-group-text">
199
+                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
200
+                </span>
201
+                <input
202
+                  class="form-control"
203
+                  type="text"
204
+                  name="FirstName"
205
+                  v-model="restaurant.streetNumber"
206
+                  disabled
207
+                />
208
+              </div>
209
+            </div>
210
+          </div>
211
+          <div class="row" style="text-align:left">
212
+            <div class="col-md-12" style="margin-bottom: 1em">
213
+              <label>Street Name</label>
214
+              <div class="input-group-prepend">
215
+                <span class="input-group-text">
216
+                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
217
+                </span>
218
+                <input
219
+                  class="form-control"
220
+                  type="text"
221
+                  name="FirstName"
222
+                  v-model="restaurant.streetName"
223
+                  disabled
224
+                />
225
+              </div>
226
+            </div>
227
+          </div>
228
+          <div class="row" style="text-align:left">
229
+            <div class="col-md-12" style="margin-bottom: 1em">
230
+              <label>Suburb</label>
231
+              <div class="input-group-prepend">
232
+                <span class="input-group-text">
233
+                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
234
+                </span>
235
+                <input
236
+                  class="form-control"
237
+                  type="text"
238
+                  name="FirstName"
239
+                  v-model="restaurant.suburb"
240
+                  disabled
241
+                />
242
+              </div>
243
+            </div>
244
+          </div>
245
+          <div class="row" style="text-align:left">
246
+            <div class="col-md-12" style="margin-bottom: 1em">
247
+              <label>City</label>
248
+              <div class="input-group-prepend">
249
+                <span class="input-group-text">
250
+                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
251
+                </span>
252
+                <input
253
+                  class="form-control"
254
+                  type="text"
255
+                  name="FirstName"
256
+                  v-model="restaurant.city"
257
+                  disabled
258
+                />
259
+              </div>
260
+            </div>
261
+          </div>
262
+          <div class="row" style="text-align:left">
263
+            <div class="col-md-12" style="margin-bottom: 1em">
264
+              <label>Province</label>
265
+              <div class="input-group-prepend">
266
+                <span class="input-group-text">
267
+                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
268
+                </span>
269
+                <input
270
+                  class="form-control"
271
+                  type="text"
272
+                  name="FirstName"
273
+                  v-model="restaurant.province"
274
+                  disabled
275
+                />
276
+              </div>
277
+            </div>
278
+          </div>
279
+          <div class="row" style="text-align:left">
280
+            <div class="col-md-12" style="margin-bottom: 1em">
281
+              <label>Postal Code</label>
282
+              <div class="input-group-prepend">
283
+                <span class="input-group-text">
284
+                  <eva-icon name="navigation-2-outline" fill="#24aae1"></eva-icon>
285
+                </span>
286
+                <input
287
+                  class="form-control"
288
+                  type="text"
289
+                  name="FirstName"
290
+                  v-model="restaurant.postalCode"
291
+                  disabled
292
+                />
293
+              </div>
294
+            </div>
295
+          </div>
296
+        </div>
297
+        <!--Column 2 -->
298
+        <div class="col-md-6" style="margin-bottomL 1em">
299
+          <div class="row" style="text-align:left">
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>
307
+            </div>
308
+          </div>
309
+          <Map :showAutoComplete="false" :showLocationLabel="false" :setLocation="mapCoords" />
310
+        </div>
311
+      </div>
312
+      <div class="row offset-md-5">
313
+        <div class="col-md-2">
314
+          <button @click="Save()" class="btn btn-b-n" type="button" data-dismiss="modal">Save</button>
315
+        </div>
316
+        <div class="col-md-2">
317
+          <button @click="Close()" class="btn btn-b-n" type="button" data-dismiss="modal">Close</button>
318
+        </div>
319
+      </div>
320
+    </div>
321
+    <!-- need to still gey this working -->
322
+    <modal name="loadImage" :width="600" :height="100">
323
+      <div class="container">
324
+        <div class="row" style="text-align:left">
325
+          <div class="col-md-12" style="margin-bottom: 1em">
326
+            <label>Select Image</label>
327
+            <div class="input-group-prepend">
328
+              <image-uploader
329
+                :preview="true"
330
+                :className="['fileinput', { 'fileinput--loaded': hasImage }]"
331
+                capture="environment"
332
+                :debug="1"
333
+                doNotResize="gif"
334
+                :autoRotate="true"
335
+                outputFormat="verbose"
336
+                @input="setImage"
337
+              >
338
+                <label for="fileInput" slot="upload-label">
339
+                  <figure>
340
+                    <path
341
+                      class="path1"
342
+                      d="M9.5 19c0 3.59 2.91 6.5 6.5 6.5s6.5-2.91 6.5-6.5-2.91-6.5-6.5-6.5-6.5 2.91-6.5 6.5zM30 8h-7c-0.5-2-1-4-3-4h-8c-2 0-2.5 2-3 4h-7c-1.1 0-2 0.9-2 2v18c0 1.1 0.9 2 2 2h28c1.1 0 2-0.9 2-2v-18c0-1.1-0.9-2-2-2zM16 27.875c-4.902 0-8.875-3.973-8.875-8.875s3.973-8.875 8.875-8.875c4.902 0 8.875 3.973 8.875 8.875s-3.973 8.875-8.875 8.875zM30 14h-4v-2h4v2z"
343
+                    ></path>
344
+                  </figure>
345
+                </label>
346
+              </image-uploader>
347
+            </div>
348
+          </div>
349
+        </div>
350
+      </div>
351
+    </modal>
352
+    <modal name="map" :width="600" :height="620">
353
+      <div class="container">
354
+        <h2>Update Location</h2>
355
+        <br />
356
+        <Map :showLocationLabel="false" @GoogleAddress="UpdateAddress" />
357
+        <div class="row" style="text-align:left">
358
+          <div class="col-md-4" style="margin-bottom: 1em">
359
+            <button @click="HideMap()" class="btn btn-b-n" type="button" data-dismiss="modal">Close</button>
360
+          </div>
361
+        </div>
362
+      </div>
363
+    </modal>
364
+    <modal name="tradingHours" :width="600" :height="380">
365
+      <TradingHours @tradingUpdate="TradingUpdate" />
366
+    </modal>
367
+    <modal name="Categories" :width="600" :height="500">
368
+      <Categories @selected="selectedCategory" />
369
+    </modal>
370
+    <div v-if="wait" id="preloader"></div>
371
+  </div>
372
+</template>
373
+
374
+<script>
375
+import { mapState, mapActions } from "vuex";
376
+import Map from "../shared/mapSetLocation";
377
+import ListView from "../shared/listView";
378
+import Categories from "../restaurants/restaurantCategorySelect";
379
+import TradingHours from "../accounts/tradingHours";
380
+import ImageUploader from "vue-image-upload-resize";
381
+
382
+export default {
383
+  name: "RestaurantDetails",
384
+  components: {
385
+    Map,
386
+    ListView,
387
+    Categories,
388
+    TradingHours,
389
+    ImageUploader
390
+  },
391
+  data() {
392
+    return {
393
+      thColumns: [
394
+        "description",
395
+        "openingTime",
396
+        "closingTime",
397
+        "closed",
398
+        "opened24H"
399
+      ],
400
+      wait: false,
401
+      selectedMops: [],
402
+      hasImage: false
403
+    };
404
+  },
405
+  methods: {
406
+    ...mapActions("restaurant", [
407
+      "getRestaurant",
408
+      "updateRestaurant",
409
+      "removeTradingHours"
410
+    ]),
411
+    Save() {
412
+      this.wait = true;
413
+
414
+      var mops = "";
415
+      for (let i = 0; i < this.selectedMops.length; i++) {
416
+        mops = mops + this.selectedMops[i] + "|";
417
+      }
418
+
419
+      var cats = "";
420
+      for (let i = 0; i < this.categories.length; i++) {
421
+        cats = cats + this.categories[i].description + "|";
422
+      }
423
+
424
+      this.restaurant.savedTradingHours = this.tradingHours;
425
+      this.restaurant.categories = cats;
426
+      this.restaurant.methodsOfPayment = mops;
427
+
428
+      this.updateRestaurant(this.restaurant)
429
+        .then(fulfilled => {
430
+          this.$router.push("/");
431
+        })
432
+        .catch(error => {
433
+          console.log(error.message);
434
+        });
435
+    },
436
+
437
+    Close() {
438
+      this.$router.push("/");
439
+    },
440
+    ShowMap() {
441
+      this.$modal.show("map");
442
+    },
443
+    HideMap() {
444
+      this.$modal.hide("map");
445
+    },
446
+    New() {
447
+      this.$modal.show("tradingHours");
448
+    },
449
+    NewCat() {
450
+      this.$modal.show("Categories");
451
+    },
452
+    UpdateAddress(address) {
453
+      this.restaurant.streetNumber = address.streetNumber;
454
+      this.restaurant.streetName = address.streetName;
455
+      this.restaurant.suburb = address.suburb;
456
+      this.restaurant.city = address.city;
457
+      this.restaurant.province = address.province;
458
+      this.restaurant.country = address.country;
459
+      this.restaurant.postalCode = address.postalCode;
460
+      this.restaurant.googleMapUrl = address.url;
461
+      this.restaurant.latitude = address.coordinates.lat;
462
+      this.restaurant.longitude = address.coordinates.lng;
463
+    },
464
+    TradingUpdate(item) {
465
+      this.tradingHours.push(item);
466
+      this.$modal.hide("tradingHours");
467
+    },
468
+    selectedCategory(item) {
469
+      this.categories.push(item[0]);
470
+      this.$modal.hide("Categories");
471
+    },
472
+    DeleteCat(item) {
473
+      this.categories.pop(item);
474
+    },
475
+    Delete(item) {
476
+      this.removeTradingHours(item.id);
477
+      this.tradingHours.pop(item);
478
+    },
479
+    UpdateLogo() {
480
+      this.$modal.show("loadImage");
481
+    },
482
+    setImage: function(output) {
483
+      this.$modal.hide("loadImage");
484
+      this.restaurant.logo = output.dataUrl;
485
+    }
486
+  },
487
+  computed: {
488
+    ...mapState("restaurant", ["restaurant"]),
489
+    ...mapState("mop", ["mops"]),
490
+    mapCoords() {
491
+      var coords = {
492
+        lat: this.restaurant.latitude,
493
+        lng: this.restaurant.longitude
494
+      };
495
+      return coords;
496
+    },
497
+    tradingHours() {
498
+      return this.restaurant.savedTradingHours;
499
+    },
500
+    categories() {
501
+      return this.restaurant.savedCategories;
502
+    },
503
+    SavedMops() {
504
+      this.selectedMops = this.restaurant.selectedMethodsOfPayments;
505
+    }
506
+  },
507
+  mounted() {
508
+    this.wait = false;
509
+    this.getRestaurant(5);
510
+  },
511
+  watch: {
512
+    SavedMops() {
513
+      alert("bla");
514
+    }
515
+  }
516
+};
517
+</script>

+ 10
- 12
src/components/shared/autoComplete.vue 查看文件

7
         :key="i"
7
         :key="i"
8
         class="autocomplete-result"
8
         class="autocomplete-result"
9
         @click="setResult(result)"
9
         @click="setResult(result)"
10
-      >
11
-        {{ result }}
12
-      </li>
10
+      >{{ result }}</li>
13
     </ul>
11
     </ul>
14
   </div>
12
   </div>
15
 </template>
13
 </template>
20
     items: {
18
     items: {
21
       type: Array,
19
       type: Array,
22
       required: false,
20
       required: false,
23
-      default: () => [],
24
-    },
21
+      default: () => []
22
+    }
25
   },
23
   },
26
   data() {
24
   data() {
27
     return {
25
     return {
28
-      search: '',
26
+      search: "",
29
       results: [],
27
       results: [],
30
-      isOpen: false,
28
+      isOpen: false
31
     };
29
     };
32
   },
30
   },
33
   methods: {
31
   methods: {
41
     },
39
     },
42
     filterResults() {
40
     filterResults() {
43
       this.results = this.items.filter(
41
       this.results = this.items.filter(
44
-        item => item.toLowerCase().indexOf(this.search.toLowerCase()) > -1,
42
+        item => item.toLowerCase().indexOf(this.search.toLowerCase()) > -1
45
       );
43
       );
46
     },
44
     },
47
     setResult(result) {
45
     setResult(result) {
48
       this.search = result;
46
       this.search = result;
49
       this.isOpen = false;
47
       this.isOpen = false;
50
-      this.$emit('selection', this.search);
51
-    },
52
-  },
48
+      this.$emit("selection", this.search);
49
+    }
50
+  }
53
 };
51
 };
54
 </script>
52
 </script>
55
 
53
 
75
 }
73
 }
76
 
74
 
77
 .autocomplete-result:hover {
75
 .autocomplete-result:hover {
78
-  background-color: #60cbeb;
76
+  background-color: #24aae1;
79
   color: white;
77
   color: white;
80
 }
78
 }
81
 </style>
79
 </style>

+ 26
- 26
src/components/shared/fieldEditor.vue 查看文件

6
         v-if="mayEdit"
6
         v-if="mayEdit"
7
         @click="EditClick()"
7
         @click="EditClick()"
8
         class="input-group-text spanCursor"
8
         class="input-group-text spanCursor"
9
-        style="color: #60CBEB"
9
+        style="color: #24aae1"
10
       >
10
       >
11
-        <eva-icon name="edit-outline" fill="#60CBEB"></eva-icon>
11
+        <eva-icon name="edit-outline" fill="#24aae1"></eva-icon>
12
       </span>
12
       </span>
13
     </div>
13
     </div>
14
     <div v-if="edit" class="input-group-prepend">
14
     <div v-if="edit" class="input-group-prepend">
31
         v-if="edit"
31
         v-if="edit"
32
         @click="UpdateValue()"
32
         @click="UpdateValue()"
33
         class="input-group-text spanCursor"
33
         class="input-group-text spanCursor"
34
-        style="color: #60CBEB"
34
+        style="color: #24aae1"
35
       >
35
       >
36
-        <eva-icon name="checkmark-outline" fill="#60CBEB"></eva-icon>
36
+        <eva-icon name="checkmark-outline" fill="#24aae1"></eva-icon>
37
       </span>
37
       </span>
38
-      <span v-if="edit" @click="Close()" class="input-group-text spanCursor" style="color: #60CBEB">
39
-        <eva-icon name="close-outline" fill="#60CBEB"></eva-icon>
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>
40
       </span>
40
       </span>
41
     </div>
41
     </div>
42
   </div>
42
   </div>
45
 <script>
45
 <script>
46
 export default {
46
 export default {
47
   props: [
47
   props: [
48
-    'value',
49
-    'type',
50
-    'mayEdit',
51
-    'selectOptions',
52
-    'selectValue',
53
-    'selectText',
54
-    'display',
48
+    "value",
49
+    "type",
50
+    "mayEdit",
51
+    "selectOptions",
52
+    "selectValue",
53
+    "selectText",
54
+    "display"
55
   ],
55
   ],
56
   data() {
56
   data() {
57
     return {
57
     return {
58
       edit: false,
58
       edit: false,
59
-      myDisplay: '',
59
+      myDisplay: ""
60
     };
60
     };
61
   },
61
   },
62
   methods: {
62
   methods: {
63
     UpdateValue() {
63
     UpdateValue() {
64
       this.edit = false;
64
       this.edit = false;
65
-      if (this.type !== 'select' && this.value) {
66
-        this.$emit('input', this.value);
67
-        this.$emit('change', this.value);
65
+      if (this.type !== "select" && this.value) {
66
+        this.$emit("input", this.value);
67
+        this.$emit("change", this.value);
68
       }
68
       }
69
     },
69
     },
70
     EditClick() {
70
     EditClick() {
82
         }
82
         }
83
         if (this.selectOptions[item.target.options.selectedIndex - 1]) {
83
         if (this.selectOptions[item.target.options.selectedIndex - 1]) {
84
           this.$emit(
84
           this.$emit(
85
-            'input',
86
-            this.selectOptions[item.target.options.selectedIndex - 1],
85
+            "input",
86
+            this.selectOptions[item.target.options.selectedIndex - 1]
87
           );
87
           );
88
           this.$emit(
88
           this.$emit(
89
-            'change',
90
-            this.selectOptions[item.target.options.selectedIndex - 1],
89
+            "change",
90
+            this.selectOptions[item.target.options.selectedIndex - 1]
91
           );
91
           );
92
         }
92
         }
93
       }
93
       }
94
-    },
94
+    }
95
   },
95
   },
96
   mounted() {
96
   mounted() {
97
     if (this.value) {
97
     if (this.value) {
105
     if (this.display) {
105
     if (this.display) {
106
       this.myDisplay = this.display;
106
       this.myDisplay = this.display;
107
     }
107
     }
108
-    if (this.type === 'date') {
108
+    if (this.type === "date") {
109
       this.myDisplay = this.$options.filters.toDate(this.value);
109
       this.myDisplay = this.$options.filters.toDate(this.value);
110
     }
110
     }
111
   },
111
   },
124
         // eslint-disable-next-line vue/no-side-effects-in-computed-properties
124
         // eslint-disable-next-line vue/no-side-effects-in-computed-properties
125
         this.myDisplay = this.display;
125
         this.myDisplay = this.display;
126
       }
126
       }
127
-    },
127
+    }
128
   },
128
   },
129
   watch: {
129
   watch: {
130
     checkValue() {
130
     checkValue() {
131
       return null;
131
       return null;
132
-    },
133
-  },
132
+    }
133
+  }
134
 };
134
 };
135
 </script>
135
 </script>

+ 1
- 1
src/components/shared/imageLoader.vue 查看文件

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

+ 1
- 1
src/components/shared/mapSetLocation.vue 查看文件

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

+ 7
- 6
src/components/shared/navBar.vue 查看文件

38
         <div class="input-group-prepend">
38
         <div class="input-group-prepend">
39
           <input type="text" placeholder="search" />
39
           <input type="text" placeholder="search" />
40
           <span class="input-group-text" @click="Search">
40
           <span class="input-group-text" @click="Search">
41
-            <i class="fa fa-search" style="color:#60CBEB"></i>
41
+            <i class="fa fa-search" style="color:#24aae1"></i>
42
           </span>
42
           </span>
43
         </div>
43
         </div>
44
       </div>
44
       </div>
92
                 class="dropdown-menu"
92
                 class="dropdown-menu"
93
                 aria-labelledby="navbarDropdown"
93
                 aria-labelledby="navbarDropdown"
94
               >
94
               >
95
+                <a class="dropdown-item cursor-pointer" @click="routerGoTo('/Restaurant')">Details</a>
95
                 <a
96
                 <a
96
                   class="dropdown-item cursor-pointer"
97
                   class="dropdown-item cursor-pointer"
97
-                  @click="routerGoTo('/status/list')"
98
-                >Restaurant Details</a>
98
+                  @click="routerGoTo('/status/timeshareAdmin')"
99
+                >Menu</a>
99
                 <a
100
                 <a
100
                   class="dropdown-item cursor-pointer"
101
                   class="dropdown-item cursor-pointer"
101
                   @click="routerGoTo('/status/timeshareAdmin')"
102
                   @click="routerGoTo('/status/timeshareAdmin')"
102
-                >Menu</a>
103
+                >Orders</a>
103
                 <hr />
104
                 <hr />
104
                 <a
105
                 <a
105
                   class="dropdown-item cursor-pointer"
106
                   class="dropdown-item cursor-pointer"
171
     },
172
     },
172
     SystemRole() {
173
     SystemRole() {
173
       //return "Customer";
174
       //return "Customer";
174
-      return "SuperAdmin";
175
-      //return "RestaurantAdmin";
175
+      //return "SuperAdmin";
176
+      return "RestaurantAdmin";
176
     },
177
     },
177
     // eslint-disable-next-line vue/return-in-computed-property
178
     // eslint-disable-next-line vue/return-in-computed-property
178
     Logout() {
179
     Logout() {

+ 0
- 1
src/main.js 查看文件

24
 Vue.use(EvaIcons);
24
 Vue.use(EvaIcons);
25
 
25
 
26
 Vue.config.productionTip = false;
26
 Vue.config.productionTip = false;
27
-// axios.defaults.baseURL = 'http://localhost:57260/';
28
 Vue.prototype.$axios = axios;
27
 Vue.prototype.$axios = axios;
29
 
28
 
30
 Vue.prototype.$http = axios;
29
 Vue.prototype.$http = axios;

+ 6
- 0
src/router/index.js 查看文件

11
 import RestaurantCategory from "../components/restaurants/restaurantCategories.vue";
11
 import RestaurantCategory from "../components/restaurants/restaurantCategories.vue";
12
 import RestaurantSearch from "../components/home/restaurantSearch.vue";
12
 import RestaurantSearch from "../components/home/restaurantSearch.vue";
13
 import RestuarantList from "../components/restaurants/restaurantList.vue";
13
 import RestuarantList from "../components/restaurants/restaurantList.vue";
14
+import Restaurant from "../components/restaurants/restaurantDetails.vue";
14
 import CustomerDetails from "../components/customer/customerDetails.vue";
15
 import CustomerDetails from "../components/customer/customerDetails.vue";
15
 import CustomerOrders from "../components/customer/customerOrders.vue";
16
 import CustomerOrders from "../components/customer/customerOrders.vue";
16
 import CustomerList from "../components/customer/customerList.vue";
17
 import CustomerList from "../components/customer/customerList.vue";
79
       path: "/CustomerList",
80
       path: "/CustomerList",
80
       name: "CustomerList",
81
       name: "CustomerList",
81
       component: CustomerList
82
       component: CustomerList
83
+    },
84
+    {
85
+      path: "/Restaurant",
86
+      name: "Restaurant",
87
+      component: Restaurant
82
     }
88
     }
83
   ]
89
   ]
84
 });
90
 });

+ 3
- 1
src/store/index.js 查看文件

6
 import RestaurantSearch from './modules/restaurants/restaurantSearch';
6
 import RestaurantSearch from './modules/restaurants/restaurantSearch';
7
 import RestaurantCategories from './modules/restaurants/restaurantCategories';
7
 import RestaurantCategories from './modules/restaurants/restaurantCategories';
8
 import Restaurant from './modules/restaurants/restaurant';
8
 import Restaurant from './modules/restaurants/restaurant';
9
+import MOPs from './modules/shared/restaurantMOP'
9
 import User from './modules/users/user';
10
 import User from './modules/users/user';
10
 
11
 
11
 Vue.use(Vuex);
12
 Vue.use(Vuex);
18
     restaurantSearch: RestaurantSearch,
19
     restaurantSearch: RestaurantSearch,
19
     restaurantCategories: RestaurantCategories,
20
     restaurantCategories: RestaurantCategories,
20
     restaurant: Restaurant,
21
     restaurant: Restaurant,
21
-    user: User
22
+    user: User,
23
+    mop: MOPs
22
   },
24
   },
23
 });
25
 });

+ 41
- 3
src/store/modules/restaurants/restaurant.js 查看文件

1
 import axios from 'axios'
1
 import axios from 'axios'
2
+import {
3
+  result
4
+} from 'lodash';
2
 
5
 
3
 export default {
6
 export default {
4
   namespaced: true,
7
   namespaced: true,
5
   state: {
8
   state: {
6
     restaurants: [],
9
     restaurants: [],
7
-    restaurant: {}
10
+    restaurant: {},
11
+    tradingHour: {},
12
+    tradingHours: []
8
   },
13
   },
9
   mutations: {
14
   mutations: {
10
     setRestaurants(state, restaurants) {
15
     setRestaurants(state, restaurants) {
11
-      state.restaurants = restaurants
16
+      state.restaurants = restaurants;
17
+    },
18
+    setRestaurant(state, restaurant) {
19
+      state.restaurant = restaurant;
20
+    },
21
+    setTradingHours(state, thours) {
22
+      state.tradingHours = thours;
12
     }
23
     }
13
   },
24
   },
14
   getters: {},
25
   getters: {},
18
     }) {
29
     }) {
19
       axios
30
       axios
20
         .get('/api/restaurant/getrestaurants')
31
         .get('/api/restaurant/getrestaurants')
21
-        .then(result => commit("setRestaurants", result.data))
32
+        .then(result => commit("setRestaurants", result.data));
33
+    },
34
+    getRestaurant({
35
+      commit
36
+    }, id) {
37
+      axios
38
+        .get(`/api/restaurant/${id}`)
39
+        .then(result => commit("setRestaurant", result.data));
40
+    },
41
+    getTradingHours({
42
+      commit
43
+    }, id) {
44
+      axios
45
+        .get(`/api/restaurant/GetTradingHours/${id}`)
46
+        .then(result => commit("setTradingHours", result.data));
47
+    },
48
+    updateRestaurant({
49
+      commit
50
+    }, restaurant) {
51
+      axios
52
+        .put('/api/Restaurant', restaurant)
53
+        .then(result => commit("setRestaurant", restaurant))
54
+    },
55
+    removeTradingHours({
56
+      commit
57
+    }, id) {
58
+      axios
59
+        .delete(`/api/Restaurant/RemoveTradingHours/${id}`)
22
     }
60
     }
23
   }
61
   }
24
 }
62
 }

+ 10
- 0
src/store/modules/restaurants/restaurantCategories.js 查看文件

1
 import axios from 'axios';
1
 import axios from 'axios';
2
+import {
3
+  result
4
+} from 'lodash';
2
 
5
 
3
 export default {
6
 export default {
4
   namespaced: true,
7
   namespaced: true,
53
       axios
56
       axios
54
         .delete(`/api/RestaurantCategory/${id}`)
57
         .delete(`/api/RestaurantCategory/${id}`)
55
         .then(result => commit('removeCategories', id));
58
         .then(result => commit('removeCategories', id));
59
+    },
60
+    getSelectCategories({
61
+      commit
62
+    }) {
63
+      axios
64
+        .get('/api/RestaurantCategory/GetSelectCategories')
65
+        .then(result => commit("setRestaurantsCategories", result.data));
56
     }
66
     }
57
   }
67
   }
58
 }
68
 }

+ 24
- 0
src/store/modules/shared/restaurantMOP.js 查看文件

1
+export default {
2
+  namespaced: true,
3
+  state: {
4
+    mops: [{
5
+        name: "Credit Card"
6
+      },
7
+      {
8
+        name: "EFT"
9
+      },
10
+      {
11
+        name: "Account"
12
+      },
13
+      {
14
+        name: "Cash On Delivery"
15
+      },
16
+      {
17
+        name: "Instant EFT"
18
+      }
19
+    ],
20
+  },
21
+  mutations: {},
22
+  getters: {},
23
+  actions: {}
24
+}

Loading…
取消
儲存